Files
Express_console_build/build/static/js/2533.ca2d198d.chunk.js

1 line
37 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2533],{23787:(e,o,i)=>{i.d(o,{FG:()=>u,nV:()=>x,pY:()=>f,pg:()=>h});var r=i(89379),t=i(80045),n=i(93230),l=i(2235),s=i(16491),c=i(82053),a=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:i=!1,onScroll:l,sx:s}=e,c=(0,t.A)(e,d);return(0,a.jsx)(n.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:l,sx:(0,r.A)((0,r.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:i,footer:t,selected:n=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[i,d,t]})]})},u=e=>{let{children:o,columns:i=2,sx:t}=e;return(0,a.jsx)(s.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},t),children:o})},f=e=>{let{label:o,value:i,children:r,full:t=!1,align:n="left"}=e;return(0,a.jsxs)(s.A,{sx:{gridColumn:t?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,o,i)=>{i.d(o,{A:()=>s});var r=i(93230),t=i(16491),n=i(82053),l=i(44414);function s(e){let{title:o,subtitle:i,live:s=!1,action:c}=e;return(0,l.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(t.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),i&&(0,l.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(t.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),c&&(0,l.jsx)(t.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:c})]})}},36803:(e,o,i)=>{i.d(o,{A:()=>x});var r=i(48089),t=i(50704),n=i(93230),l=i(16491),s=i(82053),c=i(82917),a=i(41413),d=i(44414);function x(e){let{title:o,value:i,icon:x,color:h="#662582",caption:u,loading:f=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(t.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),f?(0,d.jsx)(c.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(a.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,o,i)=>{i.d(o,{A:()=>u});var r=i(89379),t=i(9950),n=i(2660),l=i(2046),s=i(83274),c=i(25333),a=i(97125),d=i(7762),x=i(52097),h=i(44414);const u=e=>{let{value:o,onChange:i,onDebouncedChange:u,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const A=(0,t.useRef)(null),[v]=(0,x.d7)(o,f);return(0,t.useEffect)((()=>{u&&u(v)}),[v,u]),(0,t.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=A.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===A.current&&A.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(n.A,{sx:(0,r.A)({},g),inputRef:A,placeholder:p,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,o,i)=>{i.d(o,{A:()=>s});i(9950);var r=i(16491),t=i(46639),n=i(62217),l=i(44414);function s(e){let{size:o=70,imgSize:i=40,alt:s="loader"}=e;return(0,l.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(t.A,{size:o}),(0,l.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:i,height:i},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,i)=>{i.d(o,{A:()=>h});var r=i(89379),t=i(9950),n=i(93230),l=i(41413),s=i(77922),c=i(29925),a=i(26910),d=i(31222),x=i(44414);const h=(0,t.forwardRef)(((e,o)=>{let{setAppId:i,setLocoName:h,setPage:u,sx:f,textfeildSx:p,textfieldSx:g,pill:A=!1,accentColor:v="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:m}=e;const[y,S]=(0,t.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,t.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(v).concat(e),k=w("26"),W=w("18"),C=A?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},z=A&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:W,color:v,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:m,sx:(0,r.A)({},f),onChange:(e,o,r)=>{"clear"===r?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):o&&(null===i||void 0===i||i(o.applocationid),null===h||void 0===h||h(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>A?(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:z}),sx:(0,r.A)((0,r.A)({},C),g||p||{})})):(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,r.A)({},g||p||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNc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fW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},72533:(e,o,i)=>{i.r(o),i.d(o,{default:()=>de});var r=i(89379),t=i(9950),n=i(99459),l=i(28429),s=i(2235),c=i(41413),a=i(47223),d=i(55158),x=i(60899),h=i(93230),u=i(16491),f=i(82053),p=i(82917),g=i(1320),A=i(25333),v=i(15769),j=i(69780),b=i(9213),m=i(21671),y=i(34075),S=i(83274),w=i(33738),k=i(14857),W=i(4159),C=i.n(W),z=i(31222),R=i(59212),Y=i(27001),I=i(36803),T=i(23787),J=i(56311),M=i(94826),P=i(81425),L=i(36150),N=i(60010),B=i(58691),H=i(96646),K=i(20466),F=i(26910),D=i(44414),V=i(36220);C().extend(V);const Z=14,E="0 12px 32px rgba(15, 23, 42, 0.12)",q="#0f172a",G="#64748b",U="#94a3b8",O="#e2e8f0",Q="#f1f5f9",X="#ffffff",_="#f8fafc",$=(e,o)=>"".concat(e).concat(o),ee=e=>$(e,"08"),oe=e=>$(e,"18"),ie=e=>$(e,"55"),re="#662582",te=e=>(0,D.jsx)(s.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ne=e=>{let{color:o,selected:i,size:r=24,children:t}=e;return(0,D.jsx)(c.A,{sx:{width:r,height:r,bgcolor:i?o:oe(o),color:i?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:t})},le={active:{label:"Active",color:"#10b981",icon:z.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:z.uDv},online:{label:"Online",color:"#10b981",icon:z.mU9},offline:{label:"Offline",color:"#ef4444",icon:z.uDv},idle:{label:"Idle",color:"#f59e0b",icon:z.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:z.gsJ}},se=[{key:0,label:"All Riders",color:re,icon:z.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:z.mU9,countKey:"active"}],ce=e=>{var o,i,r;return[{key:"total",label:"Total Riders",color:re,icon:z.AYP,value:null!==(o=null===e||void 0===e?void 0:e.total)&&void 0!==o?o:0},{key:"active",label:"Active Riders",color:"#10b981",icon:z.cAP,value:null!==(i=null===e||void 0===e?void 0:e.active)&&void 0!==i?i:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:z.qiG,value:null!==(r=null===e||void 0===e?void 0:e.inactive)&&void 0!==r?r:0}]},ae=e=>{let{color:o,icon:i,label:r,value:t}=e;return(0,D.jsx)(x.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(ie(o)),minWidth:0},children:[(0,D.jsx)(ne,{color:o,size:28,children:(0,D.jsx)(i,{size:14})}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{color:U,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:r}),(0,D.jsx)(f.A,{sx:{color:q,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:t})]})]})})},de=()=>{const e=(0,l.Zp)(),o=(0,k.A)(),i=(0,a.A)(o.breakpoints.down("md")),W=(0,t.useRef)(),V=(0,t.useRef)(),[E,de]=(0,t.useState)(""),[xe,he]=(0,t.useState)(""),[ue,fe]=(0,t.useState)("All"),[pe,ge]=(0,t.useState)(0),[Ae,ve]=(0,t.useState)(0),je=localStorage.getItem("roleid"),[be,me]=(0,t.useState)(null),[ye,Se]=(0,t.useState)(null);n.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const{data:we,isLoading:ke}=(0,L.I)({queryKey:["allriders",pe,Ae],queryFn:P.eF}),We=async e=>{try{const o=await F.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==o.data.data.length?(me(null),(0,K.k)(o.data.message,"error",2e3)):Se(o.data.data)}catch(o){(0,K.k)(o.message,"error",2e3)}},{data:Ce,isLoading:ze,isError:Re,error:Ye}=(0,L.I)({queryKey:["ridersStatus"],queryFn:P.bY}),{data:Ie,isLoading:Te,isFetchingNextPage:Je,fetchNextPage:Me,hasNextPage:Pe}=(0,N.q)({queryKey:["allriders",pe,xe,Ae],queryFn:P.DM,getNextPageParam:(e,o)=>{var i;return null!==(i=e.details)&&void 0!==i&&i.length?o.length+1:void 0}}),Le=((null===Ie||void 0===Ie?void 0:Ie.pages.flatMap((e=>e.details||[])))||[]).filter(Boolean);(0,t.useEffect)((()=>{if(!Pe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Me()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return W.current&&e.observe(W.current),()=>{W.current&&e.unobserve(W.current)}}),[Pe,Me]);const Ne=Re?Ye:null;(0,t.useEffect)((()=>{Ne&&(0,K.k)(Ne,"error",2e3)}),[Ne]);const Be=e=>{if(0==Ae){const o="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return le[o]||le.unknown}const o=null===Ce||void 0===Ce?void 0:Ce.find((o=>o.userid===(null===e||void 0===e?void 0:e.userid))),i=((null===o||void 0===o?void 0:o.status)||"unknown").toLowerCase();return le[i]||le.unknown};return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Te||ke||ze,children:(0,D.jsx)(M.A,{color:"inherit"})}),(0,D.jsx)(Y.A,{title:"Riders",subtitle:"Live \xb7 ".concat(ue||"All Zones"),live:!0,action:(0,D.jsx)(R.A,{locaName:ue,setAppId:ge,setLocoName:fe,pill:!0,accentColor:re,icon:(0,D.jsx)(z.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,D.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ce(we).map((e=>{var o;const i=e.icon;return(0,D.jsx)(x.Ay,{item:!0,xs:12,sm:4,children:(0,D.jsx)(I.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,D.jsx)(i,{size:20}),color:e.color,loading:ke})},e.key)}))}),(0,D.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:Z/8,borderTopRightRadius:Z/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:O,borderBottom:0,background:"#fff"},children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,D.jsx)(h.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:O,borderRadius:4}},children:se.map((e=>{var o;const i=e.icon,r=Ae===e.key,t=null!==(o=null===we||void 0===we?void 0:we[e.countKey])&&void 0!==o?o:0;return(0,D.jsxs)(u.A,{onClick:()=>{return o=e.key,ve(o),void me(null);var o},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:"10px",border:"1px solid ".concat(r?e.color:O),bgcolor:r?e.color:X,color:r?"#fff":G,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:r?e.color:"#cbd5e1",bgcolor:r?e.color:"#f8fafc"}},children:[(0,D.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:r?"rgba(255,255,255,0.22)":oe(e.color),color:r?"#fff":e.color},children:(0,D.jsx)(i,{size:13})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,D.jsx)(u.A,{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:700,bgcolor:r?"rgba(255,255,255,0.22)":"#f8fafc",color:r?"#fff":"#64748b",border:"none"},children:ke?(0,D.jsx)(p.A,{variant:"text",width:14,height:10}):t})]},e.key)}))}),(0,D.jsx)(u.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,D.jsx)(J.A,{value:E,onChange:de,onDebouncedChange:he,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((He=re,$(He,"26")))}}})})]})}),(0,D.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:Z/8,borderBottomRightRadius:Z/8,border:"1px solid",borderColor:O,overflow:"hidden",background:"#fff"},children:(0,D.jsx)(g.A,{ref:V,onScroll:e=>{const{scrollTop:o,scrollHeight:i,clientHeight:r}=e.currentTarget;o+r>=i-50&&Pe&&!Je&&Me()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ie(re),borderRadius:8,"&:hover":{backgroundColor:re}},"&::-webkit-scrollbar-track":{backgroundColor:_}},children:i?(0,D.jsxs)(T.nV,{sx:{p:1.25},children:[Te&&(0,D.jsxs)(h.A,{alignItems:"center",sx:{py:6},children:[(0,D.jsx)(B.A,{}),(0,D.jsx)(f.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,textAlign:"center",px:2},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var r,t,n,l;const s=Be(o),a=s.icon,d=be===o.userid;return(0,D.jsxs)(T.pg,{accent:s.color,selected:d,header:(0,D.jsxs)(h.A,{spacing:1.25,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")}),(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11},children:["#",null===o||void 0===o?void 0:o.userid]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(s.color),border:"1px solid ".concat(ie(s.color)),color:s.color},children:[(0,D.jsx)(ne,{color:s.color,size:18,children:(0,D.jsx)(a,{size:11})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:s.label})]})]}),1==je&&(0,D.jsxs)(h.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})}),0!=Ae&&(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":oe("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:d?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})]})]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re)),flexShrink:0},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(u.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{fontWeight:800,color:q,fontSize:15},noWrap:!0,children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},noWrap:!0,children:o.contactno||"\u2014"})]})]})]}),children:[(0,D.jsxs)(T.FG,{children:[(0,D.jsxs)(T.pY,{label:"Address",full:!0,children:[(0,D.jsx)(f.A,{sx:{fontSize:13,fontWeight:600,color:G},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]}),(0,D.jsx)(T.pY,{label:"Vehicle",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Shift",value:"#".concat(null!==(t=o.shiftid)&&void 0!==t?t:"\u2014")}),(0,D.jsx)(T.pY,{label:"Time",children:(0,D.jsxs)(h.A,{spacing:.5,children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Fare",value:null!==(n=o.basefare)&&void 0!==n?n:"\u2014"}),(0,D.jsx)(T.pY,{label:"Fuel",value:null!==(l=o.fuelcharge)&&void 0!==l?l:"\u2014"})]}),d&&0!==Ae&&(0,D.jsxs)(u.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})]},null!==(r=o.userid)&&void 0!==r?r:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})]}):(0,D.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,D.jsx)(j.A,{children:(0,D.jsxs)(b.A,{sx:{"& th":{backgroundColor:_,color:G,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(O),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,D.jsx)(m.A,{children:"#"}),(0,D.jsx)(m.A,{children:"ID"}),(0,D.jsx)(m.A,{children:"Rider"}),(0,D.jsx)(m.A,{children:"Address"}),(0,D.jsx)(m.A,{children:"Vehicle"}),(0,D.jsx)(m.A,{children:"Shift"}),(0,D.jsx)(m.A,{align:"center",children:"Time"}),(0,D.jsx)(m.A,{children:"Fare"}),(0,D.jsx)(m.A,{children:"Fuel"}),(0,D.jsx)(m.A,{align:"center",children:"Status"}),1==je&&(0,D.jsx)(m.A,{align:"right",children:"Action"})]})}),(0,D.jsxs)(y.A,{children:[Te&&(0,D.jsx)(H.r,{col:6}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{py:6},children:(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]})})}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var n,l,s,a;const d=Be(o),p=d.icon,g=be===o.userid;return(0,D.jsxs)(t.Fragment,{children:[(0,D.jsxs)(b.A,{sx:(0,r.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Q),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:_}},g&&{backgroundColor:ee(re)}),children:[(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===o||void 0===o?void 0:o.userid]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re))},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:q,whiteSpace:"nowrap"},children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:o.contactno||"\u2014"})]})]})}),(0,D.jsx)(m.A,{sx:{maxWidth:220},children:(0,D.jsx)(S.A,{title:o.address||"",placement:"top",children:(0,D.jsxs)(h.A,{children:[(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]})})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},children:["#",null!==(l=o.shiftid)&&void 0!==l?l:"\u2014"]})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(s=o.basefare)&&void 0!==s?s:"\u2014"})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(a=o.fuelcharge)&&void 0!==a?a:"\u2014"})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(d.color),border:"1px solid ".concat(ie(d.color)),color:d.color},children:[(0,D.jsx)(ne,{color:d.color,size:20,children:(0,D.jsx)(p,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==je&&(0,D.jsx)(m.A,{align:"right",children:(0,D.jsxs)(h.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,D.jsx)(S.A,{title:"Edit rider",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})})}),0!=Ae&&(0,D.jsx)(S.A,{title:g?"Hide logs":"View live logs",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:g?"#0ea5e9":oe("#0ea5e9"),color:g?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:g?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})})]})})]}),g&&0!==Ae&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{p:0,borderBottom:"1px solid ".concat(Q)},children:(0,D.jsx)(w.A,{in:g,timeout:"auto",unmountOnExit:!0,children:(0,D.jsxs)(u.A,{sx:{p:{xs:1.5,md:2},bgcolor:"#ffffff",borderTop:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})})})})]},null!==(n=o.userid)&&void 0!==n?n:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{borderBottom:"none"},children:(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})})})]})]})})})]});var He}},94826:(e,o,i)=>{i.d(o,{A:()=>a});var r=i(59254),t=i(46639),n=i(62217),l=i(44414);const s=(0,r.Ay)("div")((()=>({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"}))),c=(0,r.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(s,{children:[(0,l.jsx)(t.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,o,i)=>{i.d(o,{r:()=>c});var r=i(9213),t=i(21671),n=i(82917),l=i(93230),s=i(44414);const c=e=>{let{rowsPerPage:o=5,col:i=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,o)=>(0,s.jsx)(t.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(t.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]);