\n
\n
').concat(c).concat(l?" #".concat(l,""):"","
\n
")})},ps.current.set(e.id,u));var m=u.icon,h={click:function(s){var n=String(e.id);ms.current.has(n)?(ms.current.delete(n),s.target.closePopup()):(ms.current.add(n),s.target.openPopup());var r=at.find((function(e){return String(e.id)===n}));r&&ft(r)},popupclose:function(){ms.current.delete(String(e.id))}},v=ut?we:p.J,f=ut?{target:[e.lat,e.lon],duration:1200}:{position:[e.lat,e.lon]};return(0,P.jsx)(v,(0,o.Z)((0,o.Z)({},f),{},{icon:m,zIndexOffset:2500,eventHandlers:h,children:(0,P.jsxs)(j.G,{maxWidth:260,autoPan:!0,autoPanPadding:[20,20],className:"dispatch-popup live-rider-popup",children:[(0,P.jsx)("div",{className:"pu-hdr-live",children:(0,P.jsxs)("div",{className:"pu-hdr-left",children:[(0,P.jsx)("span",{className:"pu-live-indicator",style:{"--pulse-color":r},children:(0,P.jsx)("span",{className:"pu-live-dot"})}),(0,P.jsx)("span",{className:"pu-hdr-title",children:"LIVE GPS"})]})}),(0,P.jsxs)("div",{className:"pu-rider-profile",children:[(0,P.jsx)("div",{className:"pu-avatar",style:{backgroundColor:"".concat(r,"12"),color:r},children:(0,P.jsx)(E.MCF,{})}),(0,P.jsxs)("div",{className:"pu-rider-info-text",children:[(0,P.jsxs)("div",{className:"pu-rider-name-row",children:[(0,P.jsx)("span",{className:"pu-rider-name",children:e.username||"Rider #".concat(e.id)}),e.status&&(0,P.jsx)("span",{className:"pu-status-badge ".concat("active"===e.status.toLowerCase()?"active":"idle"),children:e.status})]}),(0,P.jsxs)("div",{className:"pu-rider-meta",children:["Rider ID: #",e.id]})]})]}),(0,P.jsxs)("div",{className:"pu-body-content",children:[e.orderid&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Active Order"}),(0,P.jsxs)("span",{className:"pu-info-value pu-order-badge",children:["#",e.orderid]})]}),i&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Next Stop"}),(0,P.jsxs)("span",{className:"pu-info-value",style:{color:"#4f46e5"},children:["#",i.step||"?"," \xb7 ",i.deliverycustomer||"\u2014"]})]}),a&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Next Location"}),(0,P.jsx)("span",{className:"pu-info-value",title:i.deliveryaddress||a,children:a})]}),(null===i||void 0===i?void 0:i.pickupcustomer)&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Pickup"}),(0,P.jsx)("span",{className:"pu-info-value",title:i.pickupcustomer,children:i.pickupcustomer})]}),e.contactno&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Phone"}),(0,P.jsx)("a",{href:"tel:".concat(e.contactno),className:"pu-info-value pu-phone-link",children:e.contactno})]}),e.logdate&&(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Last Seen"}),(0,P.jsxs)("span",{className:"pu-info-value pu-time-stamp",children:[(0,P.jsx)(E.dKE,{className:"inline-icon"})," ",S()(e.logdate).isValid()?S()(e.logdate).format("hh:mm:ss A"):e.logdate]})]}),(0,P.jsxs)("div",{className:"pu-info-row",children:[(0,P.jsx)("span",{className:"pu-info-label",children:"Position"}),(0,P.jsxs)("span",{className:"pu-info-value pu-coordinates",children:[e.lat.toFixed(5),", ",e.lon.toFixed(5)]})]})]})]})}),"live-".concat(e.id))})),er&&ot&&"planned"!==tr&&St.map((function(e,s){var n,r;if(0===e.coords.length)return null;var t=(0,z.di)(s),i="combined"===tr?Q:t,a=[e.coords[0].lat,e.coords[0].lng],c=[e.coords[e.coords.length-1].lat,e.coords[e.coords.length-1].lng],l=kn[e.deliveryid],d=Array.isArray(l)&&l.length>=2?l:e.coords.map((function(e){return[e.lat,e.lng]})),o=d,m=!0;if(An){var v=Dn[e.sequenceStep]||0;v<2?m=!1:o=d.slice(0,Math.min(v,d.length))}var f=Mr===e.sequenceStep,j=String(e.orderstatus||"").toLowerCase(),g=z.Q6.has(j),N=z.us.has(j),y=_t.find((function(s){return s.sequenceStep===e.sequenceStep})),k=!(null===y||void 0===y||!y.anomaly),_=null===ot||void 0===ot||null===(n=ot.orders)||void 0===n?void 0:n.find((function(s){return null!=s.deliveryid&&String(s.deliveryid)===String(e.deliveryid)})),w=(0,z.Cl)(e.orderstatus),F=(e.orderstatus&&'