1 line
38 KiB
JavaScript
1 line
38 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[587],{38215:function(e,o,n){n.d(o,{Z:function(){return c}});var r=n(17592),t=n(85281),i=n(46417),a=(0,r.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"}})),l=(0,r.ZP)("div")((function(){return{position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}})),c=function(){return(0,i.jsxs)(a,{children:[(0,i.jsx)(t.Z,{color:"primary",size:80,thickness:6}),(0,i.jsx)(l,{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/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3M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Y9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg==",alt:"Logo",style:{width:"100%",height:"100%"}})})]})}},50587:function(e,o,n){n.r(o),n.d(o,{default:function(){return ke}});var r=n(74165),t=n(15861),i=n(29439),a=n(1413),l=n(47313),c=n(56573),s=n(41962),d=n(90842),x=n(70501),p=n(48119),h=n(61113),u=n(57829),g=n(42832),f=n(76088),m=n(16783),Z=n(9019),b=n(84488),j=n(61689),v=n(54882),S=n(47131),w=n(51629),k=n(66835),W=n(23477),y=n(24076),C=n(67478),D=n(57861),R=n(65033),z=n(94469),A=n(96467),Y=n(69099),P=n(22539),M=n(10658),T=n.n(M),B=n(25223),N=n(99004),L=n(59376),I=n(34605),F=n(78392),J=n(41156),K=n(98589),E=n(79254),H=n(11577),G=n(19860),O=n(71049),V=n(38215),q=n(46417),U=n(91635);T().extend(U);var Q=999,X=16,_="0 14px 40px rgba(15, 23, 42, 0.10)",$="0 8px 24px rgba(15, 23, 42, 0.08)",ee="0 18px 50px rgba(15, 23, 42, 0.18)",oe="#0f172a",ne="#64748b",re="#94a3b8",te="#e2e8f0",ie="#f1f5f9",ae="#f8fafc",le=function(e,o){return"".concat(e).concat(o)},ce=function(e){return le(e,"08")},se=function(e){return le(e,"18")},de=function(e){return le(e,"26")},xe=function(e){return le(e,"55")},pe="#662582",he="#9255AB",ue="#0ea5e9",ge=pe,fe="#f59e0b",me="#10b981",Ze="#ef4444",be="#f59e0b",je=function(e){return(0,q.jsx)(x.Z,(0,a.Z)((0,a.Z)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ee,border:"1px solid",borderColor:"divider",overflow:"hidden"}}))},ve=function(e){var o=e.color,n=e.selected,r=e.size,t=void 0===r?24:r,i=e.children;return(0,q.jsx)(p.Z,{sx:{width:t,height:t,bgcolor:n?o:se(o),color:n?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},Se=function(e){var o=e.value,n=e.color,r=e.icon,t=e.isMoney,i=void 0!==t&&t,a=Number(o),l=i?we(a):Number.isFinite(a)?a:o||0;return!Number.isFinite(a)||0===a?(0,q.jsx)(h.Z,{variant:"caption",sx:{color:re,fontWeight:700},children:l}):(0,q.jsxs)(u.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:ce(n),border:"1px solid ".concat(xe(n)),color:n,fontSize:12,fontWeight:800,whiteSpace:"nowrap"},children:[r,l]})};function we(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(e||0)}function ke(){(0,G.Z)();var e,o=localStorage.getItem("tenantid"),n=(0,l.useState)(T()().format("YYYY-MM-DD")),M=(0,i.Z)(n,2),U=M[0],ee=M[1],le=(0,l.useState)(T()().format("YYYY-MM-DD")),ke=(0,i.Z)(le,2),We=ke[0],ye=ke[1],Ce=(0,l.useState)(!1),De=(0,i.Z)(Ce,2),Re=De[0],ze=De[1],Ae=(0,l.useState)(null),Ye=(0,i.Z)(Ae,2),Pe=Ye[0],Me=Ye[1],Te=(0,l.useState)("Today"),Be=(0,i.Z)(Te,2),Ne=Be[0],Le=Be[1],Ie=(0,l.useState)(0),Fe=(0,i.Z)(Ie,2),Je=(Fe[0],Fe[1]),Ke=(0,l.useState)(0),Ee=(0,i.Z)(Ke,2),He=Ee[0],Ge=Ee[1],Oe=(0,l.useState)(0),Ve=(0,i.Z)(Oe,2),qe=Ve[0],Ue=Ve[1],Qe=(0,l.useState)(0),Xe=(0,i.Z)(Qe,2),_e=Xe[0],$e=Xe[1],eo=(0,l.useState)(0),oo=(0,i.Z)(eo,2),no=oo[0],ro=oo[1],to=(0,l.useState)(0),io=(0,i.Z)(to,2),ao=io[0],lo=io[1],co=(0,l.useState)(0),so=(0,i.Z)(co,2),xo=so[0],po=so[1],ho=(0,l.useState)(0),uo=(0,i.Z)(ho,2),go=uo[0],fo=uo[1],mo=(0,l.useState)(""),Zo=(0,i.Z)(mo,2),bo=Zo[0],jo=Zo[1],vo=(0,l.useState)(""),So=(0,i.Z)(vo,2),wo=So[0],ko=So[1],Wo=(0,l.useRef)(null),yo=(0,l.useState)(null),Co=(0,i.Z)(yo,2),Do=Co[0],Ro=Co[1],zo=(0,l.useState)(null),Ao=(0,i.Z)(zo,2),Yo=Ao[0],Po=Ao[1],Mo=(0,l.useState)(0),To=(0,i.Z)(Mo,2),Bo=To[0],No=To[1],Lo=(0,l.useState)("All Locations"),Io=(0,i.Z)(Lo,2),Fo=Io[0],Jo=Io[1],Ko=(0,l.useState)(""),Eo=(0,i.Z)(Ko,1)[0];(0,l.useEffect)((function(){var e=setTimeout((function(){ko(bo)}),400);return function(){return clearTimeout(e)}}),[bo]),(0,l.useEffect)((function(){var e=function(e){"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),Wo.current&&Wo.current.focus()),"Escape"===e.key&&document.activeElement===Wo.current&&Wo.current.blur()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[]);var Ho=(0,s.a)({queryKey:["tenantlocations",Eo],queryFn:O.TG}),Go=Ho.data,Oo=Ho.isLoading,Vo=Ho.isError,qo=Ho.error,Uo=(0,s.a)({queryKey:[U,We,Bo,wo],queryFn:O.iI}),Qo=Uo.isLoading,Xo=Uo.isError,_o=Uo.data,$o=Uo.error,en=function(){var e=(0,t.Z)((0,r.Z)().mark((function e(n){var t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.Z.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?&tenantid=").concat(o,"&locationid=").concat(n,"&fromdate=").concat(U,"&todate=").concat(We));case 3:t=e.sent,Ro(t.data.details),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("riderRes",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(o){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){!function(){var e=0,o=0,n=0,r=0,t=0,i=0,a=0,l=0;_o&&_o.forEach((function(c){e+=c.charges,o+=c.totalorders,n+=c.Orderspending,r+=c.orderscompleted,t+=c.orderscancelled,i+=c.deliveriespending,a+=c.deliveriescompleted,l+=c.deliveriescancelled})),Je(e),Ge(o),Ue(n),$e(r),ro(t),lo(i),po(a),fo(l)}()}),[_o]);var on="";Xo&&null!==$o&&void 0!==$o&&$o.message?on="An error has occurred: (isErrorReports) ".concat($o.message):Vo&&null!==qo&&void 0!==qo&&qo.message&&(on="An error has occurred: (tenantLocationsIsError) ".concat(qo.message)),(0,l.useEffect)((function(){var e,o,n;on&&(e=on,o="warning",n=2e3,(0,d.yv)(e,{variant:o,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||1500}))}),[on]);var nn=[{key:"total",label:"Total Orders",color:pe,icon:P.ili,value:He},{key:"pending",label:"Pending",color:fe,icon:P.Ley,value:qe},{key:"completed",label:"Completed",color:me,icon:P.ZSR,value:_e},{key:"cancelled",label:"Cancelled",color:Ze,icon:P.B4e,value:no}];return(0,q.jsxs)(q.Fragment,{children:[(Qo||Oo)&&(0,q.jsx)(H.Z,{}),(Qo||Oo)&&(0,q.jsx)(V.Z,{}),(0,q.jsx)(x.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:te,background:"linear-gradient(135deg, ".concat(ce(pe)," 0%, ").concat(ce(he)," 100%)"),boxShadow:$},children:(0,q.jsxs)(g.Z,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1,sm:1.5},children:[(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,q.jsx)(p.Z,{variant:"rounded",sx:{width:36,height:36,bgcolor:pe,color:"#fff",borderRadius:1.5,boxShadow:"0 4px 12px ".concat(de(pe))},children:(0,q.jsx)(P.YgO,{size:19})}),(0,q.jsxs)(g.Z,{spacing:.125,children:[(0,q.jsx)(h.Z,{variant:"h3",sx:{fontWeight:800,color:oe,lineHeight:1.1,fontSize:{xs:"1.1rem",sm:"1.25rem",md:"1.375rem"}},children:"Orders Summary"}),(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:.75,children:[(0,q.jsx)(u.Z,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,q.jsxs)(h.Z,{sx:{fontSize:11.5,color:ne,fontWeight:600},children:["Live \xb7 ",Fo," \xb7 ",Ne]})]})]})]}),1===(null===Go||void 0===Go?void 0:Go.length)?(0,q.jsxs)(u.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.5,py:.75,borderRadius:999,bgcolor:ce(pe),border:"1.5px solid ".concat(xe(pe)),color:pe,fontWeight:800,fontSize:13},children:[(0,q.jsx)(P.x$F,{size:14})," ",null===(e=Go[0])||void 0===e?void 0:e.locationname]}):(0,q.jsx)(f.Z,{options:Go||[],value:Yo,getOptionLabel:function(e){return e?"".concat(e.locationname," (").concat(e.suburb||"",")"):""},PaperComponent:je,onChange:function(e,o){Po(o),No(o?o.locationid:0),Jo(o?o.locationname:"All Locations")},renderInput:function(e){return(0,q.jsx)(m.Z,(0,a.Z)((0,a.Z)({},e),{},{placeholder:"Select Location",size:"small",sx:(0,a.Z)((0,a.Z)({},(o=pe,{"& .MuiOutlinedInput-root":{borderRadius:Q+"px",bgcolor:ce(o),fontWeight:600,"& fieldset":{borderColor:xe(o),borderWidth:1.5},"&:hover fieldset":{borderColor:o},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(de(o))},"&.Mui-focused fieldset":{borderColor:o,borderWidth:2}}})),{},{width:{xs:"100%",sm:260}}),InputProps:(0,a.Z)((0,a.Z)({},e.InputProps),{},{startAdornment:(0,q.jsx)(g.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,q.jsx)(ve,{color:pe,size:22,selected:!0,children:(0,q.jsx)(P.x$F,{size:13})})})})}));var o},sx:{width:{xs:"100%",sm:280}}})]})}),(0,q.jsx)(Z.ZP,{container:!0,spacing:{xs:1,sm:1.25,md:1.5},children:nn.map((function(e){var o=e.icon;return(0,q.jsx)(Z.ZP,{item:!0,xs:6,sm:6,md:3,children:(0,q.jsxs)(x.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:te,background:"#fff",transition:"transform 0.15s, box-shadow 0.15s, border-color 0.15s","&:hover":{transform:"translateY(-1px)",boxShadow:$,borderColor:xe(e.color)}},children:[(0,q.jsx)(u.Z,{sx:{position:"absolute",top:0,left:0,bottom:0,width:3,background:e.color}}),(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,sx:{pl:.5},children:[(0,q.jsxs)(g.Z,{spacing:.125,sx:{minWidth:0,flex:1},children:[(0,q.jsx)(h.Z,{sx:{color:ne,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:10.5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.2},children:e.label}),(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:oe,lineHeight:1.15,fontSize:{xs:"0.95rem",sm:"1.1rem",md:"1.2rem"}},noWrap:!0,children:Qo?(0,q.jsx)(b.Z,{sx:{width:40},animation:"wave"}):e.isMoney?we(e.value):e.value})]}),(0,q.jsx)(p.Z,{variant:"rounded",sx:{width:30,height:30,bgcolor:se(e.color),color:e.color,borderRadius:1.25,flexShrink:0},children:(0,q.jsx)(o,{size:15})})]})]})},e.key)}))}),(0,q.jsx)(x.Z,{elevation:0,sx:{mt:{xs:1,md:1.25},p:{xs:1,md:1.125},borderRadius:2,border:"1px solid",borderColor:te,background:"#fff",boxShadow:_},children:(0,q.jsxs)(g.Z,{direction:{xs:"column",md:"row"},spacing:1.25,alignItems:{xs:"stretch",md:"center"},justifyContent:{xs:"flex-start",md:"space-between"},children:[(0,q.jsxs)(g.Z,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[(0,q.jsx)(j.Z,{title:"Date Filter",placement:"top",children:(0,q.jsxs)(u.Z,{onClick:function(){return ze(!0)},sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:ce("#f59e0b"),border:"1.5px solid ".concat(xe("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(de("#f59e0b"))}},children:[(0,q.jsx)(P.sHf,{size:14}),U&&We?"".concat(T()(U).format("DD/MM/YY")," \u2013 ").concat(T()(We).format("DD/MM/YY")):"All time"]})}),(0,q.jsxs)(u.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:ce(pe),border:"1px solid ".concat(xe(pe)),color:pe,fontSize:11,fontWeight:800},children:[(0,q.jsx)(P.VHP,{size:12})," ",Ne]})]}),(0,q.jsx)(u.Z,{sx:{width:{xs:"100%",md:320}},children:(0,q.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:999,bgcolor:ce(pe),border:"1.5px solid ".concat(xe(pe)),transition:"all 0.18s","&:focus-within":{borderColor:pe,boxShadow:"0 0 0 3px ".concat(de(pe))}},children:[(0,q.jsx)(P.vU7,{size:16,style:{color:pe,flexShrink:0}}),(0,q.jsx)(v.ZP,{inputRef:Wo,placeholder:"Search location (ctrl+k)",value:bo,onChange:function(e){return jo(e.target.value)},autoComplete:"off",sx:{flex:1,fontSize:13,fontWeight:600,color:oe,"& input::placeholder":{color:re,opacity:1}}}),bo&&(0,q.jsx)(S.Z,{size:"small",onClick:function(){return jo("")},sx:{p:.25,color:pe},children:(0,q.jsx)(P.lUB,{size:14})})]})})]})}),(0,q.jsx)(x.Z,{elevation:0,sx:{mt:{xs:1,md:1.25},borderRadius:X/8,border:"1px solid",borderColor:te,overflow:"hidden",background:"#fff"},children:(0,q.jsx)(w.Z,{sx:{overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:xe(pe),borderRadius:8,"&:hover":{backgroundColor:pe}},"&::-webkit-scrollbar-track":{backgroundColor:ae}},children:(0,q.jsxs)(k.Z,{sx:{minWidth:1100},children:[(0,q.jsxs)(W.Z,{children:[(0,q.jsxs)(y.Z,{sx:{"& th":{backgroundColor:ae,color:ne,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(te),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,q.jsx)(C.Z,{rowSpan:2,children:"#"}),(0,q.jsx)(C.Z,{rowSpan:2,children:"Location"}),(0,q.jsx)(C.Z,{rowSpan:2,align:"center",children:"All"}),(0,q.jsx)(C.Z,{colSpan:3,align:"center",sx:{bgcolor:"".concat(se(ue)," !important"),borderLeft:"2px solid ".concat(xe(ue)," !important"),borderRight:"2px solid ".concat(xe(ue)," !important"),py:"6px !important"},children:(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.75,children:[(0,q.jsx)(u.Z,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:999,bgcolor:ue,color:"#fff",boxShadow:"0 4px 10px ".concat(de(ue))},children:(0,q.jsx)(P.ByW,{size:12})}),(0,q.jsx)(h.Z,{sx:{fontWeight:900,fontSize:12,letterSpacing:1,color:ue},children:"Orders"})]})}),(0,q.jsx)(C.Z,{colSpan:3,align:"center",sx:{bgcolor:"".concat(se(ge)," !important"),borderLeft:"2px solid ".concat(xe(ge)," !important"),borderRight:"2px solid ".concat(xe(ge)," !important"),py:"6px !important"},children:(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.75,children:[(0,q.jsx)(u.Z,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:999,bgcolor:ge,color:"#fff",boxShadow:"0 4px 10px ".concat(de(ge))},children:(0,q.jsx)(P.ili,{size:12})}),(0,q.jsx)(h.Z,{sx:{fontWeight:900,fontSize:12,letterSpacing:1,color:ge},children:"Deliveries"})]})}),(0,q.jsx)(C.Z,{rowSpan:2,align:"center",children:"Kms"}),(0,q.jsx)(C.Z,{rowSpan:2,align:"center",children:"Actual KMs"}),(0,q.jsx)(C.Z,{rowSpan:2,align:"center",children:"Action"})]}),(0,q.jsxs)(y.Z,{sx:{"& th":{backgroundColor:ae,color:ne,fontSize:{xs:9.5,md:10.5},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(te),py:{xs:.75,md:1},px:{xs:1,md:1.5}}},children:[(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(fe," !important"),bgcolor:"".concat(ce(ue)," !important"),borderLeft:"2px solid ".concat(xe(ue)," !important")},children:"Pending"}),(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(me," !important"),bgcolor:"".concat(ce(ue)," !important")},children:"Completed"}),(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(Ze," !important"),bgcolor:"".concat(ce(ue)," !important"),borderRight:"2px solid ".concat(xe(ue)," !important")},children:"Cancelled"}),(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(fe," !important"),bgcolor:"".concat(ce(ge)," !important"),borderLeft:"2px solid ".concat(xe(ge)," !important")},children:"Pending"}),(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(me," !important"),bgcolor:"".concat(ce(ge)," !important")},children:"Completed"}),(0,q.jsx)(C.Z,{align:"center",sx:{color:"".concat(Ze," !important"),bgcolor:"".concat(ce(ge)," !important"),borderRight:"2px solid ".concat(xe(ge)," !important")},children:"Cancelled"})]})]}),(0,q.jsxs)(D.Z,{children:[_o&&0!==_o.length?_o.map((function(e,o){return(0,q.jsxs)(l.Fragment,{children:[(0,q.jsxs)(y.Z,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(ie),py:.5,px:1,verticalAlign:"middle"},"& td.band-o":{backgroundColor:ce(ue)},"& td.band-d":{backgroundColor:ce(ge)},"& td.band-o-first":{borderLeft:"2px solid ".concat(xe(ue))},"& td.band-o-last":{borderRight:"2px solid ".concat(xe(ue))},"& td.band-d-first":{borderLeft:"2px solid ".concat(xe(ge))},"& td.band-d-last":{borderRight:"2px solid ".concat(xe(ge))},backgroundColor:Pe===e.locationid?ce(pe):"transparent","&:hover":{backgroundColor:Pe===e.locationid?se(pe):ae},"&:hover td.band-o":{backgroundColor:se(ue)},"&:hover td.band-d":{backgroundColor:se(ge)}},children:[(0,q.jsx)(C.Z,{children:(0,q.jsx)(h.Z,{sx:{fontWeight:700,color:ne},children:o+1})}),(0,q.jsx)(C.Z,{children:(0,q.jsxs)(g.Z,{spacing:.125,children:[(0,q.jsx)(h.Z,{sx:{fontSize:12.5,fontWeight:700,color:oe,lineHeight:1.25},noWrap:!0,children:e.locationname}),(0,q.jsxs)(h.Z,{sx:{fontSize:10.5,fontWeight:600,color:re,lineHeight:1.3},children:["Id : ",e.locationid]})]})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:e.totalorders,color:pe,icon:(0,q.jsx)(P.ByW,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o band-o-first",children:(0,q.jsx)(Se,{value:e.Orderspending,color:fe,icon:(0,q.jsx)(P.Ley,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o",children:(0,q.jsx)(Se,{value:e.orderscompleted,color:me,icon:(0,q.jsx)(P.ZSR,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o band-o-last",children:(0,q.jsx)(Se,{value:e.orderscancelled,color:Ze,icon:(0,q.jsx)(P.B4e,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d band-d-first",children:(0,q.jsx)(Se,{value:e.deliveriespending,color:fe,icon:(0,q.jsx)(P.Ley,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d",children:(0,q.jsx)(Se,{value:e.deliveriescompleted,color:me,icon:(0,q.jsx)(P.ZSR,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d band-d-last",children:(0,q.jsx)(Se,{value:e.deliveriescancelled,color:Ze,icon:(0,q.jsx)(P.B4e,{size:11})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(j.Z,{title:"Cumulative Kms",placement:"top",children:(0,q.jsx)(u.Z,{sx:{display:"inline-block"},children:(0,q.jsx)(Se,{value:parseFloat(e.cumulativekms).toFixed(2),color:be,icon:(0,q.jsx)(P.v93,{size:11})})})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(j.Z,{title:"Actual KMs",placement:"top",children:(0,q.jsx)(u.Z,{sx:{display:"inline-block"},children:(0,q.jsx)(Se,{value:parseFloat(e.actualkms||0).toFixed(2),color:be,icon:(0,q.jsx)(P.v93,{size:11})})})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(j.Z,{title:Pe===e.locationid?"Collapse riders":"View riders",children:(0,q.jsx)(S.Z,{size:"small",onClick:function(){en(e.locationid),Me(Pe===e.locationid?null:e.locationid)},sx:{bgcolor:Pe===e.locationid?pe:ce(pe),border:"1px solid ".concat(Pe===e.locationid?pe:xe(pe)),color:Pe===e.locationid?"#fff":pe,borderRadius:999,p:.75,transition:"all 0.18s","&:hover":{bgcolor:Pe===e.locationid?pe:se(pe),borderColor:pe,boxShadow:"0 0 0 3px ".concat(de(pe))}},children:Pe===e.locationid?(0,q.jsx)(P.rWj,{size:14}):(0,q.jsx)(P.Ix0,{size:14})})})})]}),Pe===e.locationid&&(0,q.jsx)(y.Z,{children:(0,q.jsx)(C.Z,{colSpan:13,sx:{p:0,borderBottom:"1px solid ".concat(ie),bgcolor:ae},children:(0,q.jsx)(R.Z,{in:Pe===e.locationid,timeout:"auto",unmountOnExit:!0,children:(0,q.jsxs)(u.Z,{sx:{p:{xs:1,md:1.5}},children:[(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,q.jsx)(ve,{color:pe,size:22,selected:!0,children:(0,q.jsx)(P.ili,{size:12})}),(0,q.jsxs)(h.Z,{variant:"subtitle2",sx:{fontWeight:800,color:oe},children:["Riders Summary \xb7 ",e.locationname]})]}),(0,q.jsx)(x.Z,{elevation:0,sx:{borderRadius:2,border:"1px solid",borderColor:te,overflow:"hidden",background:"#fff"},children:(0,q.jsxs)(k.Z,{size:"small",children:[(0,q.jsx)(W.Z,{children:(0,q.jsxs)(y.Z,{sx:{"& th":{backgroundColor:ce(pe),color:pe,fontSize:10.5,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(xe(pe)),py:.75}},children:[(0,q.jsx)(C.Z,{align:"center",children:"#"}),(0,q.jsx)(C.Z,{children:"Rider"}),(0,q.jsx)(C.Z,{align:"center",children:"Deliveries"}),(0,q.jsx)(C.Z,{align:"center",children:"Pending"}),(0,q.jsx)(C.Z,{align:"center",children:"Assigned"}),(0,q.jsx)(C.Z,{align:"center",children:"Accepted"}),(0,q.jsx)(C.Z,{align:"center",children:"Arrived"}),(0,q.jsx)(C.Z,{align:"center",children:"Picked"}),(0,q.jsx)(C.Z,{align:"center",children:"Skipped"}),(0,q.jsx)(C.Z,{align:"center",children:"Delivered"}),(0,q.jsx)(C.Z,{align:"center",children:"Kms"})]})}),(0,q.jsx)(D.Z,{children:Do&&Do.length>0?Do.map((function(e,o){return(0,q.jsxs)(y.Z,{sx:{"& td":{borderBottom:"1px solid ".concat(ie),py:.5,px:1,verticalAlign:"middle"},"&:hover":{backgroundColor:ae}},children:[(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(h.Z,{sx:{fontWeight:700,color:ne,fontSize:12},children:o+1})}),(0,q.jsx)(C.Z,{children:(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:.75,children:[(0,q.jsx)(h.Z,{variant:"caption",sx:{fontWeight:700,color:oe},noWrap:!0,children:null===e||void 0===e?void 0:e.firstname}),"Active"==(null===e||void 0===e?void 0:e.status)?(0,q.jsx)(j.Z,{title:"Active",children:(0,q.jsx)("span",{style:{display:"inline-flex",color:me},children:(0,q.jsx)(P.ZnX,{size:14})})}):(0,q.jsx)(j.Z,{title:"Inactive",children:(0,q.jsx)("span",{style:{display:"inline-flex",color:Ze},children:(0,q.jsx)(P.MLo,{size:14})})})]})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.totalorders,color:pe,icon:(0,q.jsx)(P.ByW,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.pending,color:fe,icon:(0,q.jsx)(P.Ley,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.assigned,color:ue,icon:(0,q.jsx)(P.ZSR,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.accepted,color:"#6366f1",icon:(0,q.jsx)(P.ZSR,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.arrived,color:"#06b6d4",icon:(0,q.jsx)(P.ZSR,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.picked,color:"#8b5cf6",icon:(0,q.jsx)(P.ili,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.skipped,color:"#f97316",icon:(0,q.jsx)(P.B4e,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.delivered,color:me,icon:(0,q.jsx)(P.ZSR,{size:10})})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(Se,{value:null===e||void 0===e?void 0:e.cumulativekms,color:be,icon:(0,q.jsx)(P.v93,{size:10})})})]},"".concat(null===e||void 0===e?void 0:e.firstname,"-").concat(o))})):(0,q.jsx)(y.Z,{children:(0,q.jsx)(C.Z,{colSpan:11,sx:{py:3,borderBottom:"none"},children:(0,q.jsxs)(g.Z,{alignItems:"center",spacing:1,children:[(0,q.jsx)(p.Z,{sx:{width:40,height:40,bgcolor:se("#94a3b8"),color:re},children:(0,q.jsx)(P.ili,{size:18})}),(0,q.jsx)(h.Z,{variant:"caption",sx:{color:ne,fontWeight:700},children:"No rider data for this location"})]})})})})]})})]})})})})]},e.locationid)})):(0,q.jsx)(y.Z,{children:(0,q.jsx)(C.Z,{colSpan:13,sx:{py:6,borderBottom:"none"},children:(0,q.jsxs)(g.Z,{alignItems:"center",spacing:1.5,children:[(0,q.jsx)(p.Z,{sx:{width:64,height:64,bgcolor:se("#94a3b8"),color:re},children:(0,q.jsx)(P.YgO,{size:28})}),(0,q.jsx)(h.Z,{variant:"subtitle1",sx:{fontWeight:700,color:oe},children:"No summary data"}),(0,q.jsx)(h.Z,{variant:"caption",sx:{color:ne},children:"Adjust the date range or location filter above."})]})})}),_o&&0!==_o.length&&(0,q.jsxs)(y.Z,{sx:{"& td":{backgroundColor:ce(pe),borderTop:"2px solid ".concat(xe(pe)),borderBottom:"none",py:.75,px:1},"& td.band-o":{backgroundColor:se(ue)},"& td.band-d":{backgroundColor:se(ge)},"& td.band-o-first":{borderLeft:"2px solid ".concat(xe(ue))},"& td.band-o-last":{borderRight:"2px solid ".concat(xe(ue))},"& td.band-d-first":{borderLeft:"2px solid ".concat(xe(ge))},"& td.band-d-last":{borderRight:"2px solid ".concat(xe(ge))}},children:[(0,q.jsx)(C.Z,{colSpan:2,children:(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,q.jsx)(ve,{color:pe,size:24,selected:!0,children:(0,q.jsx)(P.VHP,{size:13})}),(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:pe,fontSize:13},children:"Total"})]})}),(0,q.jsx)(C.Z,{align:"center",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:oe},children:He})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o band-o-first",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:fe},children:qe})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:me},children:_e})}),(0,q.jsx)(C.Z,{align:"center",className:"band-o band-o-last",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:Ze},children:no})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d band-d-first",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:fe},children:ao})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:me},children:xo})}),(0,q.jsx)(C.Z,{align:"center",className:"band-d band-d-last",children:(0,q.jsx)(h.Z,{sx:{fontWeight:800,color:Ze},children:go})}),(0,q.jsx)(C.Z,{}),(0,q.jsx)(C.Z,{}),(0,q.jsx)(C.Z,{})]})]})]})})}),(0,q.jsxs)(z.Z,{open:Re,onClose:function(){return ze(!1)},PaperProps:{sx:{borderRadius:3}},children:[(0,q.jsx)(u.Z,{sx:{p:2.5,background:"linear-gradient(135deg, ".concat(ce(pe)," 0%, ").concat(ce(he)," 100%)"),borderBottom:"1px solid ".concat(te)},children:(0,q.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,q.jsx)(p.Z,{sx:{bgcolor:pe,color:"#fff",width:40,height:40,boxShadow:"0 6px 18px ".concat(de(pe))},children:(0,q.jsx)(P.sHf,{size:20})}),(0,q.jsxs)(g.Z,{children:[(0,q.jsx)(h.Z,{variant:"h5",sx:{fontWeight:800,color:oe},children:"Select Date Range"}),(0,q.jsx)(h.Z,{variant:"caption",sx:{color:ne,fontWeight:600},children:"Filter the summary by a date range or preset"})]})]})}),(0,q.jsx)(A.Z,{sx:{width:"100%"},className:"datedialog",children:(0,q.jsx)(B.D,{open:Re,toggle:function(){return ze(!Re)},id:"daterange1",onChange:function(e){"All"===e.label?(ee(""),ye(""),Le("All"),ze(!1)):(ee(T()(e.startDate).format("YYYY-MM-DD")),ye(T()(e.endDate).format("YYYY-MM-DD")),Le(e.label||""))},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,N.Z)(new Date,-1),endDate:(0,N.Z)(new Date,-1)},{label:"Tomorrow",startDate:(0,N.Z)(new Date,1),endDate:(0,N.Z)(new Date,1)},{label:"This Week",startDate:(0,L.Z)(new Date),endDate:(0,I.Z)(new Date)},{label:"Last Week",startDate:(0,L.Z)((0,F.Z)(new Date,-1)),endDate:(0,I.Z)((0,F.Z)(new Date,-1))},{label:"Last 7 Days",startDate:(0,F.Z)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,J.Z)(new Date),endDate:(0,K.Z)(new Date)},{label:"Last Month",startDate:(0,J.Z)((0,E.Z)(new Date,-1)),endDate:(0,K.Z)((0,E.Z)(new Date,-1))},{label:"All",startDate:new Date,endDate:(0,N.Z)(new Date,-1)}]})}),(0,q.jsxs)(g.Z,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{width:"100%",p:2,borderTop:"1px solid ".concat(ie)},children:[(0,q.jsx)(Y.Z,{variant:"outlined",onClick:function(){return ze(!1)},sx:{borderRadius:999,px:2.5,borderColor:te,color:ne,fontWeight:700,"&:hover":{borderColor:ne,bgcolor:ae}},children:"Cancel"}),(0,q.jsx)(Y.Z,{variant:"contained",onClick:function(){return ze(!1)},sx:{borderRadius:999,px:3,bgcolor:pe,fontWeight:700,boxShadow:"0 6px 18px ".concat(de(pe)),"&:hover":{bgcolor:"#4D1C61"}},children:"Apply"})]})]})]})}},96467:function(e,o,n){n.d(o,{Z:function(){return Z}});var r=n(4942),t=n(63366),i=n(87462),a=n(47313),l=n(83061),c=n(21921),s=n(17592),d=n(77342),x=n(77430),p=n(32298);function h(e){return(0,p.Z)("MuiDialogContent",e)}(0,x.Z)("MuiDialogContent",["root","dividers"]);var u=n(93174),g=n(46417),f=["className","dividers"],m=(0,s.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:function(e,o){var n=e.ownerState;return[o.root,n.dividers&&o.dividers]}})((function(e){var o=e.theme,n=e.ownerState;return(0,i.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((o.vars||o).palette.divider),borderBottom:"1px solid ".concat((o.vars||o).palette.divider)}:(0,r.Z)({},".".concat(u.Z.root," + &"),{paddingTop:0}))})),Z=a.forwardRef((function(e,o){var n=(0,d.Z)({props:e,name:"MuiDialogContent"}),r=n.className,a=n.dividers,s=void 0!==a&&a,x=(0,t.Z)(n,f),p=(0,i.Z)({},n,{dividers:s}),u=function(e){var o=e.classes,n={root:["root",e.dividers&&"dividers"]};return(0,c.Z)(n,h,o)}(p);return(0,g.jsx)(m,(0,i.Z)({className:(0,l.Z)(u.root,r),ownerState:p,ref:o},x))}))},93174:function(e,o,n){n.d(o,{a:function(){return i}});var r=n(77430),t=n(32298);function i(e){return(0,t.Z)("MuiDialogTitle",e)}var a=(0,r.Z)("MuiDialogTitle",["root"]);o.Z=a},94469:function(e,o,n){var r=n(4942),t=n(63366),i=n(87462),a=n(47313),l=n(83061),c=n(21921),s=n(28334),d=n(91615),x=n(10387),p=n(32530),h=n(70501),u=n(77342),g=n(17592),f=n(85560),m=n(63909),Z=n(91554),b=n(19860),j=n(46417),v=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],S=(0,g.ZP)(Z.Z,{name:"MuiDialog",slot:"Backdrop",overrides:function(e,o){return o.backdrop}})({zIndex:-1}),w=(0,g.ZP)(x.Z,{name:"MuiDialog",slot:"Root",overridesResolver:function(e,o){return o.root}})({"@media print":{position:"absolute !important"}}),k=(0,g.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:function(e,o){var n=e.ownerState;return[o.container,o["scroll".concat((0,d.Z)(n.scroll))]]}})((function(e){var o=e.ownerState;return(0,i.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===o.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===o.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),W=(0,g.ZP)(h.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:function(e,o){var n=e.ownerState;return[o.paper,o["scrollPaper".concat((0,d.Z)(n.scroll))],o["paperWidth".concat((0,d.Z)(String(n.maxWidth)))],n.fullWidth&&o.paperFullWidth,n.fullScreen&&o.paperFullScreen]}})((function(e){var o=e.theme,n=e.ownerState;return(0,i.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&(0,r.Z)({maxWidth:"px"===o.breakpoints.unit?Math.max(o.breakpoints.values.xs,444):"".concat(o.breakpoints.values.xs).concat(o.breakpoints.unit)},"&.".concat(f.Z.paperScrollBody),(0,r.Z)({},o.breakpoints.down(Math.max(o.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})),n.maxWidth&&"xs"!==n.maxWidth&&(0,r.Z)({maxWidth:"".concat(o.breakpoints.values[n.maxWidth]).concat(o.breakpoints.unit)},"&.".concat(f.Z.paperScrollBody),(0,r.Z)({},o.breakpoints.down(o.breakpoints.values[n.maxWidth]+64),{maxWidth:"calc(100% - 64px)"})),n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&(0,r.Z)({margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0},"&.".concat(f.Z.paperScrollBody),{margin:0,maxWidth:"100%"}))})),y=a.forwardRef((function(e,o){var n=(0,u.Z)({props:e,name:"MuiDialog"}),r=(0,b.Z)(),x={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},g=n["aria-describedby"],Z=n["aria-labelledby"],y=n.BackdropComponent,C=n.BackdropProps,D=n.children,R=n.className,z=n.disableEscapeKeyDown,A=void 0!==z&&z,Y=n.fullScreen,P=void 0!==Y&&Y,M=n.fullWidth,T=void 0!==M&&M,B=n.maxWidth,N=void 0===B?"sm":B,L=n.onBackdropClick,I=n.onClose,F=n.open,J=n.PaperComponent,K=void 0===J?h.Z:J,E=n.PaperProps,H=void 0===E?{}:E,G=n.scroll,O=void 0===G?"paper":G,V=n.TransitionComponent,q=void 0===V?p.Z:V,U=n.transitionDuration,Q=void 0===U?x:U,X=n.TransitionProps,_=(0,t.Z)(n,v),$=(0,i.Z)({},n,{disableEscapeKeyDown:A,fullScreen:P,fullWidth:T,maxWidth:N,scroll:O}),ee=function(e){var o=e.classes,n=e.scroll,r=e.maxWidth,t=e.fullWidth,i=e.fullScreen,a={root:["root"],container:["container","scroll".concat((0,d.Z)(n))],paper:["paper","paperScroll".concat((0,d.Z)(n)),"paperWidth".concat((0,d.Z)(String(r))),t&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(a,f.D,o)}($),oe=a.useRef(),ne=(0,s.Z)(Z),re=a.useMemo((function(){return{titleId:ne}}),[ne]);return(0,j.jsx)(w,(0,i.Z)({className:(0,l.Z)(ee.root,R),closeAfterTransition:!0,components:{Backdrop:S},componentsProps:{backdrop:(0,i.Z)({transitionDuration:Q,as:y},C)},disableEscapeKeyDown:A,onClose:I,open:F,ref:o,onClick:function(e){oe.current&&(oe.current=null,L&&L(e),I&&I(e,"backdropClick"))},ownerState:$},_,{children:(0,j.jsx)(q,(0,i.Z)({appear:!0,in:F,timeout:Q,role:"presentation"},X,{children:(0,j.jsx)(k,{className:(0,l.Z)(ee.container),onMouseDown:function(e){oe.current=e.target===e.currentTarget},ownerState:$,children:(0,j.jsx)(W,(0,i.Z)({as:K,elevation:24,role:"dialog","aria-describedby":g,"aria-labelledby":ne},H,{className:(0,l.Z)(ee.paper,H.className),ownerState:$,children:(0,j.jsx)(m.Z.Provider,{value:re,children:D})}))})}))}))}));o.Z=y},63909:function(e,o,n){var r=n(47313).createContext({});o.Z=r},85560:function(e,o,n){n.d(o,{D:function(){return i}});var r=n(77430),t=n(32298);function i(e){return(0,t.Z)("MuiDialog",e)}var a=(0,r.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);o.Z=a}}]); |