PageSourceSearch

https://searchcarriers.com/build/assets/company-history-CtAxoWS9.js

js searchcarriers.com collected 2026-09-24 12:46:36 UTC 2,851 bytes, 1 lines download raw bytes

1import{j as e}from"./motion-vendor-Cz_00NEr.js";import{B as p}from"./badge-BSwbgx3u.js";import{C as b}from"./card-D5T867nV.js";import{S as i}from"./skeleton-Do8alTNQ.js";import{u as k,L as w}from"./app-DpHdCj-h.js";import{r as a}from"./chart-vendor-B-VQbykd.js";import{ak as _}from"./lucide-vendor-5mnVi9Yb.js";import"./radix-vendor-D97sSLDA.js";import"./map-vendor-BpJlxU9q.js";import"./index-DOxD5jeF.js";import"./utils-xkQX3TMC.js";/* empty css            */function T({equipmentId:t,className:j}){const{shared_domain_id:c,csrf_token:N}=k().props,[n,d]=a.useState(!1),[l,m]=a.useState(null),[u,f]=a.useState([]),x=a.useMemo(()=>route("equipment.companies",{equipment:t}),[t]),g=s=>{if(!s)return"Unknown";try{return new Date(s).toLocaleDateString()}catch{return s}};return a.useEffect(()=>{let s=!1;async function r(){d(!0),m(null),f([]);try{const o=await fetch(x,{headers:{Accept:"application/json","X-CSRF-TOKEN":N,"X-Shared-Domain-Id":c?.toString()??""}});if(!o.ok)throw new Error("Failed to load companies");const h=await o.json(),v=h?.data??h??[];s||f(v)}catch(o){s||m(o?.message??"Failed to load companies")}finally{s||d(!1)}}return t!=null&&String(t).length>0&&r(),()=>{s=!0}},[x,c,t]),e.jsxs(b,{className:`space-y-4 p-4 sm:p-6 ${j??""}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{className:"text-muted-foreground h-5 w-5"}),e.jsx("h2",{className:"text-foreground/80 text-sm font-semibold",children:"Company History"})]}),n&&e.jsx(p,{variant:"secondary",className:"shrink-0",children:"Loading"}),l&&!n&&e.jsx(p,{variant:"destructive",className:"shrink-0",children:"Error"})]}),n?e.jsxs("div",{className:"space-y-3",children:[e.jsx(i,{className:"h-14 w-full"}),e.jsx(i,{className:"h-14 w-full"}),e.jsx(i,{className:"h-14 w-full"})]}):l?e.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:l}):u.length===0?e.jsx("div",{className:"text-muted-foreground text-sm",children:"No companies matched to this equipment."}):e.jsx("div",{className:"max-h-[28rem] space-y-2 overflow-y-auto pr-1",children:u.map((s,r)=>e.jsx(w,{href:route("company.result",{dotNumber:s.dot_number}),target:"_blank",rel:"noreferrer",className:"block rounded-lg border border-slate-200 p-3 transition hover:bg-slate-50 dark:border-slate-700 dark:hover:bg-slate-800/50",children:e.jsx("div",{className:"flex items-center justify-between gap-3",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-medium text-slate-700 dark:text-slate-300",children:s.legal_name||s.dba_name||"—"}),e.jsxs("div",{className:"truncate text-xs text-slate-500 dark:text-slate-400",children:[`DOT ${s.dot_number}`," ",s.last_seen?`• Last seen ${g(s.last_seen)}`:""]})]})})},`${s.dot_number}-${r}`))})]})}export{T 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.