PageSourceSearch

https://tripmeter.gigacore.workers.dev/assets/MapModal-D6WLJ4wJ.js

js tripmeter.gigacore.workers.dev collected 2026-10-03 05:53:32 UTC 5,209 bytes, 1 lines download raw bytes

1import{c as g,j as r,a as u}from"./index-Du0zE-qu.js";import{D as R,b as _,d as T,e as w}from"./dialog-Bgz6psFc.js";import{M as C,U as D}from"./Map-DqRoLjBr.js";import{b}from"./recharts-DYgGifj-.js";import"./leaflet-DlI_JMX9.js";const M=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],A=g("circle-check",M);const S=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],z=g("circle-question-mark",S);const K=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],$=g("shield-x",K),B=({status:t})=>{const o={size:18,className:"flex-shrink-0"};switch(t){case"completed":return r.jsx(A,{...o,className:"text-green-500"});case"rider_canceled":return r.jsx(D,{...o,className:"text-orange-500"});case"driver_canceled":return r.jsx($,{...o,className:"text-red-500"});default:return r.jsx(z,{...o,className:"text-slate-500"})}},F=({rows:t,distanceUnit:p,convertDistance:o,isOpen:c,onClose:y,title:k})=>{const n=e=>{const s=["Request timestamp","Request Time","request_time_utc"];for(const a of s)if(e[a]){const d=new Date(e[a]);if(!isNaN(d.getTime()))return d}return null},j=b.useMemo(()=>!c||t.length===0?null:[...t].sort((e,s)=>{const a=n(e);return(n(s)?.getTime()||0)-(a?.getTime()||0)})[0],[t,c]),[l,x]=b.useState(j);if(!c)return null;const N=e=>{l&&l["Request id"]===e["Request id"]?x(null):x(e)},v=(e,s)=>{const h=(s==="from"?["From address","Begin Trip Address","Pickup address","begintrip_address"]:["To address","Dropoff Address","Dropoff address","dropoff_address"]).find(q=>e[q]);return h?String(e[h]):"N/A"},m=e=>typeof e=="string"&&e.trim()!==""?e.trim().toLowerCase():"unfulfilled",i=(e,s)=>{const a=v(e,s);if(a==="N/A"){const d=m(e.status);if(d==="rider_canceled"||d==="driver_canceled")return d.replace(/_/g," ").replace(/\b\w/g,f=>f.toUpperCase())}return a};return r.jsx(R,{open:c,onOpenChange:y,children:r.jsxs(_,{className:"max-w-6xl md:h-[90vh] h-screen w-screen md:w-auto max-w-full md:max-w-6xl flex flex-col bg-white/90 dark:bg-black/90 backdrop-blur-xl border-gray-200 dark:border-gray-800 shadow-2xl",children:[r.jsx(T,{children:r.jsx(w,{className:"text-2xl font-bold",children:k})}),r.jsxs("div",{className:"flex flex-col md:flex-row flex-grow gap-6 min-h-0 pt-4",children:[r.jsx("div",{className:"w-full md:w-[380px] flex-shrink-0 flex flex-col md:border-r border-gray-200/50 dark:border-gray-800/50 md:pr-6 order-2 md:order-1",children:r.jsxs("div",{className:"overflow-y-auto flex-grow space-y-2 pr-2 custom-scrollbar",children:[r.jsxs("div",{className:"text-sm font-medium text-muted-foreground px-2 pb-2 sticky top-0 bg-white/90 dark:bg-black/90 backdrop-blur-sm z-10",children:["All Requests (",t.length,")"]}),r.jsx("ul",{className:"space-y-2",children:t.map((e,s)=>r.jsxs("li",{onClick:()=>N(e),className:u("group flex gap-3 p-3 cursor-pointer rounded-xl text-sm transition-all duration-200 border border-transparent",l?.["Request id"]===e["Request id"]?"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800 shadow-sm":"hover:bg-gray-50 dark:hover:bg-gray-800/50 hover:border-gray-200 dark:hover:border-gray-800"),children:[r.jsxs("div",{className:"flex flex-col items-center h-full mt-1",children:[r.jsx("div",{className:u("w-2.5 h-2.5 rounded-full transition-colors",l?.["Request id"]===e["Request id"]?"bg-purple-600 dark:bg-purple-400":"bg-gray-300 dark:bg-gray-600 group-hover:bg-purple-400 dark:group-hover:bg-purple-500")}),r.jsx("div",{className:"flex-grow w-px bg-gray-200 dark:bg-gray-800 my-1"}),r.jsx("div",{className:u("w-2.5 h-2.5 rounded-full transition-colors",l?.["Request id"]===e["Request id"]?"bg-black dark:bg-white":"bg-gray-300 dark:bg-gray-600 group-hover:bg-gray-500 dark:group-hover:bg-gray-400")})]}),r.jsxs("div",{className:"flex-grow overflow-hidden",children:[r.jsxs("div",{className:"flex justify-between items-start gap-2",children:[r.jsx("p",{className:u("font-medium truncate leading-tight transition-colors",l?.["Request id"]===e["Request id"]?"text-purple-900 dark:text-purple-100":"text-foreground"),title:i(e,"from"),children:i(e,"from")}),r.jsx("div",{title:m(e.status).replace(/_/g," "),children:r.jsx(B,{status:m(e.status)})})]}),r.jsx("p",{className:"text-muted-foreground truncate mt-1",title:i(e,"to"),children:i(e,"to")}
1),n(e)&&r.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-2 flex items-center gap-1",children:[r.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-gray-300 dark:bg-gray-600"}),n(e)?.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})]})]})]},`${e["Request id"]||"row"}-${s}`))})]})}),r.jsx("div",{className:"flex-grow rounded-2xl overflow-hidden border border-gray-200 dark:border-gray-800 shadow-inner order-1 md:order-2 h-[50vh] md:h-auto",children:r.jsx(C,{rows:t,focusedTrip:l,distanceUnit:p,convertDistance:o,locations:[]})})]})]})})};export{F as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.