PageSourceSearch

https://nextthere.com/assets/ZoneDashboardTrackView-hSqUOV8M.js

js nextthere.com collected 2026-09-24 19:04:59 UTC 6,345 bytes, 1 lines download raw bytes

1import{a as q,_ as L}from"./ZoneDashboardHeader.vue_vue_type_script_setup_true_lang-DSfas_c2.js";import{T as R,_ as U}from"./TlsTrackMap.vue_vue_type_style_index_0_lang--yz2xBjD.js";import{d as N,r as h,p as I,c as B,k as $,w as x,e as u,g as r,h as i,a as m,b as V,V as M,F as T,l as Z,n as k,t as C,o as n,i as A,I as F,m as P}from"./index-DbpIxVVg.js";import{_ as j}from"./TripInstanceGlyph.vue_vue_type_script_setup_true_lang-Dx_XCuE1.js";import{a as E}from"./SearchPaletteItem.vue_vue_type_script_setup_true_lang-4nHU3J_8.js";import{r as O}from"./XCircleIcon-B68Axq-f.js";import{r as W}from"./CheckIcon-Dnwzojqc.js";import{n as G,i as H,u as J,r as K,l as Q}from"./combobox-Bf1jGWS7.js";import{Z as X}from"./ZoneResult-BCcwIQtm.js";import{r as Y}from"./ExclamationCircleIcon-JnUMOvFl.js";import"./Stop-8NKSpgr4.js";import"./Zone-B11tA2dI.js";import"./SearchPalette.vue_vue_type_script_setup_true_lang-siwWBU2S.js";import"./SearchService-CvvzWgdB.js";import"./PointOfInterest-Buj-zZdX.js";import"./RouteGroup-C9eTeiZ3.js";import"./ActivityIndicatorIcon-DNADDTWG.js";import"./entity-Dyy2H1qK.js";import"./keyboard-C910qfwt.js";import"./calculate-active-index-Bo9BYas1.js";import"./form-BG81DLzL.js";import"./XMarkIcon-CeSt-Lep.js";import"./RouteGlyph.vue_vue_type_script_setup_true_lang-CZS1VAaM.js";import"./RoundedBadge-zDfp8xRL.js";import"./use-tree-walker-DlTPShXD.js";import"./WFCheckIn-C1ZIiw9D.js";const ee={class:"relative dark:text-gray-300 w-96"},te={class:"absolute inset-y-0 left-1 flex items-center rounded-r-md px-2 focus:outline-none"},ae={class:"font-semibold"},re={key:0,class:"flex flex-1 space-x-1 items-start"},le={key:1,class:"opacity-50"},oe=N({__name:"ZoneDashboardTrackSearch",props:{modelValue:{type:R,required:!1},placeholder:{type:String},vehicles:{type:Array,required:!1},labels:{type:Array,required:!1}},emits:["update:modelValue","change"],setup(d,{emit:_}){const a=d,p=_,s=h(a.modelValue);I(()=>a.modelValue,()=>s.value=a.modelValue),I(()=>s.value,()=>{p("update:modelValue",s.value),p("change",s.value)});const g=h(""),y=B(()=>{var t,e,v;const f=(t=g.value)==null?void 0:t.toLowerCase();return f?(v=a.vehicles)==null?void 0:v.filter(l=>{var c;return(c=l.vehicle.runNumber)==null?void 0:c.toLowerCase().startsWith(f)}).sort((l,c)=>l.vehicle.runNumber.localeCompare(c.vehicle.runNumber)):(e=a.vehicles)==null?void 0:e.slice().sort((l,c)=>l.vehicle.runNumber.localeCompare(c.vehicle.runNumber))});function b(){s.value=null,g.value="",p("update:modelValue",null),p("change",null)}return(f,t)=>(n(),$(i(Q),{modelValue:s.value,"onUpdate:modelValue":t[2]||(t[2]=e=>s.value=e),as:"div"},{default:x(()=>[u("div",ee,[r(i(G),{class:"w-full"},{default:x(()=>[r(i(H),{ref:"combobox",class:"rounded-md text-black border border-orange-500 dark:border-orange-700 bg-white dark:bg-black pr-4 shadow-sm focus:border-orange-500 focus:outline-none focus:ring-1 focus:ring-orange-200 sm:text-sm pl-10 py-2 w-full",placeholder:d.placeholder,"display-value":e=>e?e==null?void 0:e.toString():"",onChange:t[0]||(t[0]=e=>g.value=e.target.value)},null,8,["placeholder","display-value"]),u("div",te,[r(i(E),{class:"h-5 w-5 text-gray-400","aria-hidden":"true"})]),d.modelValue?(n(),m("div",{key:0,class:"absolute inset-y-0 right-1 flex items-center rounded-r-md px-2 focus:outline-none",onClick:t[1]||(t[1]=M(e=>b(),["prevent"]))},[r(i(O),{class:"h-5 w-5 text-gray-400","aria-hidden":"true"})])):V("",!0)]),_:1}),r(i(J),{class:"absolute z-[1000] mt-1 max-h-60 w-full overflow-auto rounded-md bg-white-d py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"},{default:x(()=>[(n(!0),m(T,null,Z(y.value,e=>(n(),$(i(K),{key:e.vehicle.id,value:e,as:"template"},{default:x(({active:v,selected:l})=>[u("li",{class:k(["relative cursor-default select-none py-2 pl-3 pr-9",v?"bg-orange-600 text-white":"text-gray-900-d"])},[u("div",{class:k(["flex items-top space-x-3",l&&"font-semibold"])},[u("div",ae,C(e.vehicle.runNumber||e.vehicle.id),1),e.tripInstance.key?(n(),m("div",re,[r(j,{"trip-instance":e.tripInstance,class:"text-white -mt-0"},null,8,["trip-instance"]),t[3]||(t[3]=u("div",{class:"opacity-50"},"to",-1)),u("div",null,C(e.tripInstance.headsign),1)])):(n(),m("div",le,"Non-timetabled trip")),e.tripInstance.currentDelay!==void 0?(n(),m("div",{key:2,class:k([e.tripInstance.realtimeStatusCss,"text-sm text-right"])},C(e.tripInstance.realtimeStatusText),3)):V("",!0)],2),l?(n(),m("div",{key:0,class:k(["absolute inset-y-0 right-0 flex items-center pr-4",v?"text-white":"text-orange-600"])},[r(i(W),{class:"h-5 w-5","aria-hidden":"true"})],2)):V("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})])]),_:1},8,["modelValue"]))}}),se={key:0,class:"p-6 flex bg-orange-200 dark:bg-slate-100-d space-x-3 text-orange-800 dark:text-orange-500 items-center justify-center",role:"alert"},ne={class:"flex-1 bg-[#000033] overflow-y-clip"},Le=N({__name:"ZoneDashboardTrackView",props:{zoneResult:{type:X,required:!0},platforms:{type:Array,required:!0}},setup(d){const _=d,a=h(null),p=h(null),s=h(!1),g=P(),y=h(null);let b,f;A(()=>{y.value=_.zoneResult.stopZone.point,t()}),F(()=>e()),I(()=>a.value,()=>{var o;y.value=(o=a.value)==null?void 0:o.vehicle.position});
1function t(){b=window.setInterval(()=>l(),1e3)}function e(){window.clearInterval(b)}function v(o){f=o.timestamp||Date.now()/1e3,p.value=o,l()}function l(){s.value=!f||f<Date.now()/1e3-60*1e3}async function c(o){o.vehicle.tripInstanceId&&await g.push({name:"TripInstanceView",params:{regionCode:o.vehicle.region.regionCode,countryCode:o.vehicle.region.countryCode,id:o.vehicle.tripInstanceId}})}function D(){a.value=null}return(o,w)=>(n(),m(T,null,[r(q,{zone:d.zoneResult.zone,platforms:d.platforms},{center:x(()=>{var z;return[r(oe,{modelValue:a.value,"onUpdate:modelValue":w[0]||(w[0]=S=>a.value=S),placeholder:"Search map",vehicles:(z=p.value)==null?void 0:z.vehicles},null,8,["modelValue","vehicles"])]}),_:1},8,["zone","platforms"]),s.value?(n(),m("div",se,[r(i(Y),{class:"w-5 h-5"}),w[1]||(w[1]=u("div",null,"Information may be outdated",-1))])):V("",!0),u("div",ne,[r(U,{"initial-location":y.value,"highlight-vehicle":a.value,onVehicleClicked:c,onVehicleLayerUpdated:v,onUserDidPanMap:D},null,8,["initial-location","highlight-vehicle"])]),r(L,{"zone-result":d.zoneResult,"selected-item":"tls"},null,8,["zone-result"])],64))}});export{Le 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.