corequery 0.16.2 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/package.json +7 -7
  2. package/server/dist/server/config/types/line-config.d.ts +10 -10
  3. package/server/dist/server/data/index.d.ts +2 -1
  4. package/server/dist/server/data/index.js +2 -1
  5. package/server/dist/server/data/index.js.map +1 -1
  6. package/server/dist/server/data/line-collection.d.ts +1 -2
  7. package/server/dist/server/data/line-collection.js +1 -4
  8. package/server/dist/server/data/line-collection.js.map +1 -1
  9. package/server/dist/server/data/line-diagram-entry.d.ts +21 -0
  10. package/server/dist/server/data/line-diagram-entry.js +42 -0
  11. package/server/dist/server/data/line-diagram-entry.js.map +1 -0
  12. package/server/dist/server/data/line-diagram.d.ts +16 -0
  13. package/server/dist/server/data/line-diagram.js +26 -0
  14. package/server/dist/server/data/line-diagram.js.map +1 -0
  15. package/server/dist/server/data/line.d.ts +3 -0
  16. package/server/dist/server/data/line.js +5 -0
  17. package/server/dist/server/data/line.js.map +1 -1
  18. package/server/dist/server/data/stop-collection.d.ts +1 -2
  19. package/server/dist/server/data/stop-collection.js +1 -4
  20. package/server/dist/server/data/stop-collection.js.map +1 -1
  21. package/server/dist/shared/apis/foundational-data/v1/foundational-data.d.ts +79 -4
  22. package/server/dist/shared/apis/foundational-data/v1/foundational-data.js +42 -13
  23. package/server/dist/shared/apis/foundational-data/v1/foundational-data.js.map +1 -1
  24. package/server/dist/shared/apis/foundational-data/v1/index.d.ts +24 -4
  25. package/server/dist/shared/data/collection.js.map +1 -0
  26. package/web/dist/assets/About-CaTBAYPV.js +1 -0
  27. package/web/dist/assets/AdminControls-z2-hx_Wi.js +1 -0
  28. package/web/dist/assets/Alert-ZeYzkS1G.js +1 -0
  29. package/web/dist/assets/Debug-B4B1XWnL.js +1 -0
  30. package/web/dist/assets/{Divider-Be0m4WgQ.js → Divider-dQCO5rFf.js} +1 -1
  31. package/web/dist/assets/Home-CrgHy4-U.js +1 -0
  32. package/web/dist/assets/Line-aTuN5Qn2.js +1 -0
  33. package/web/dist/assets/LinkText-BZEamFKR.js +1 -0
  34. package/web/dist/assets/Markdown-CsYleoHG.js +2 -0
  35. package/web/dist/assets/Nearby-D9fcPcO8.js +1 -0
  36. package/web/dist/assets/NotFound-s2u-0Rtl.js +1 -0
  37. package/web/dist/assets/NotFoundPage-CmT-cPq4.js +1 -0
  38. package/web/dist/assets/Page-14zdRXyE.js +1 -0
  39. package/web/dist/assets/Picker-B_2kVnst.js +1 -0
  40. package/web/dist/assets/Placeholder-Dg6ymgQL.js +1 -0
  41. package/web/dist/assets/Settings-DetCeQb0.js +1 -0
  42. package/web/dist/assets/Status-BZjxaB6p.js +1 -0
  43. package/web/dist/assets/Stop-B_-mSd4e.js +1 -0
  44. package/web/dist/assets/{Strong-D9f5KEpX.js → Strong-DQEYCa_y.js} +1 -1
  45. package/web/dist/assets/ZenMode-BYFX2HyF.js +1 -0
  46. package/web/dist/assets/{index-BwSq_h7e.js → index-CLEhHuwG.js} +16 -16
  47. package/web/dist/assets/{index-CQqh1NYO.css → index-gUxgtCJY.css} +1 -1
  48. package/web/dist/assets/{use-simple-headers-DWUUdRcU.js → use-simple-headers-CdkDNHF3.js} +1 -1
  49. package/web/dist/index.html +2 -2
  50. package/web/dist/sw.js +1 -1
  51. package/server/dist/server/data/collection.js.map +0 -1
  52. package/web/dist/assets/About-B4-dkQWr.js +0 -1
  53. package/web/dist/assets/AdminControls-CzU02gqN.js +0 -1
  54. package/web/dist/assets/Alert-IVv67CZ1.js +0 -1
  55. package/web/dist/assets/Debug-D3jL5PaF.js +0 -1
  56. package/web/dist/assets/Home-BPoVw8gT.js +0 -1
  57. package/web/dist/assets/Line-E2TOnCOo.js +0 -1
  58. package/web/dist/assets/Markdown-C8fLva6C.js +0 -2
  59. package/web/dist/assets/Nearby-C4nB11U5.js +0 -1
  60. package/web/dist/assets/NotFound-CzT6M9J8.js +0 -1
  61. package/web/dist/assets/NotFoundPage-DBDabcv_.js +0 -1
  62. package/web/dist/assets/Page-CEn9SSvt.js +0 -1
  63. package/web/dist/assets/Settings-pye1MxCr.js +0 -1
  64. package/web/dist/assets/Status-D_1UU9CO.js +0 -1
  65. package/web/dist/assets/Stop-CsAwhg3q.js +0 -1
  66. package/web/dist/assets/ZenMode-CGoCJmvB.js +0 -1
  67. /package/server/dist/{server → shared}/data/collection.d.ts +0 -0
  68. /package/server/dist/{server → shared}/data/collection.js +0 -0
@@ -0,0 +1 @@
1
+ import{d as e,e as o,p as a,U as i,g as s,G as g}from"./index-CLEhHuwG.js";function f(l){return e("div",{class:o(l.class,"flex flex-col justify-center items-stretch"),style:{height:`${l.heightRem}rem`},children:l.children})}function h(l){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...l,children:e("g",{fill:"none",children:[e("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e("path",{fill:"currentColor",d:"m13.299 3.148l8.634 14.954a1.5 1.5 0 0 1-1.299 2.25H3.366a1.5 1.5 0 0 1-1.299-2.25l8.634-14.954c.577-1 2.02-1 2.598 0M12 4.898L4.232 18.352h15.536zM12 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2m0-7a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"})]})})}function d(l){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...l,children:e("g",{fill:"none",fillRule:"evenodd",children:[e("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e("path",{fill:"currentColor",d:"M21.192 5.465a1 1 0 0 1 0 1.414L9.95 18.122a1.1 1.1 0 0 1-1.556 0l-5.586-5.586a1 1 0 1 1 1.415-1.415l4.95 4.95L19.777 5.465a1 1 0 0 1 1.414 0Z"})]})})}function x(l){const t={info:i,error:a,warning:h,success:d}[l.type],r=l.icon!==void 0?l.icon:t,c={info:"bg-soft-accent",error:"bg-soft-error",warning:"bg-soft-warning",success:"bg-soft-success"}[l.type],n={info:["[--color-fg:var(--color-accent-text)]","[--color-fg-strong:var(--color-accent-text)]","[--color-fg-weak:var(--color-accent-text)]"],error:["[--color-fg:var(--color-error-text)]","[--color-fg-strong:var(--color-error-text)]","[--color-fg-weak:var(--color-error-text)]"],warning:["[--color-fg:var(--color-warning-text)]","[--color-fg-strong:var(--color-warning-text)]","[--color-fg-weak:var(--color-warning-text)]"],success:["[--color-fg:var(--color-success-text)]","[--color-fg-strong:var(--color-success-text)]","[--color-fg-weak:var(--color-success-text)]"]}[l.type];return e(g,{class:o(l.class,c,n,"px-4 py-4.5 rounded-sm gap-2 items-start",{"grid-cols-[auto_1fr]":r!=null}),children:[r!=null&&e(f,{heightRem:s("text-md"),children:e(r,{class:"text-fg text-icon-lg"})}),l.children]})}export{x as A,f as V};
@@ -0,0 +1 @@
1
+ import{X as P,x as A,d as e,T as l,e as i,G as f,g as h,R as g,f as R,M as S,B as k,L as D,h as H,C as a,u as v,b as B,i as L,a as T}from"./index-CLEhHuwG.js";import{P as E}from"./Page-14zdRXyE.js";import{u as F}from"./use-simple-headers-CdkDNHF3.js";import{D as d}from"./Divider-dQCO5rFf.js";import{V as m,A as p}from"./Alert-ZeYzkS1G.js";import{T as x}from"./Placeholder-Dg6ymgQL.js";const y=P(null);function c(){const n=A(y);if(n==null)throw new Error("Foundational data unavailable outside provider.");return n}function U(n){const r={info:"bg-soft-accent",error:"bg-soft-error",warning:"bg-soft-warning",success:"bg-soft-success"}[n.type],t={info:"[--color-fg:var(--color-accent-text)]",error:"[--color-fg:var(--color-error-text)]",warning:"[--color-fg:var(--color-warning-text)]",success:"[--color-fg:var(--color-success-text)]"}[n.type];return e(f,{class:i(n.class,r,t,"px-2 py-1.5 rounded-full"),children:e(l,{style:"small",children:n.text})})}function C(n){return e(g,{class:i(n.class,"gap-x-2 gap-y-3"),wrap:!0,children:[e(l,{style:"strong",children:n.header}),n.loading&&e(x,{class:"w-[20%] text-md"}),!n.loading&&n.pillContent!=null&&e(m,{heightRem:h("text-md"),children:e(U,{type:n.pillContent.type,text:n.pillContent.text})})]})}function V(n){return e(C,{class:n.class,header:n.header,pillContent:M(n.currentValue,n.latestValue),loading:n.loading})}function M(n,r){return r==null?null:{text:n===r?"Up to date":"Outdated",type:n===r?"success":"error"}}function u(n){return n.loading?e(f,{class:n.class,children:e(x,{class:"w-[40%] text-md"})}):n.value==null?null:e(l,{class:n.class,children:[n.prefix,": ",n.value]})}function o(n){return n==null?null:n.length<32||!/^[0-9a-f]+$/.test(n)?n:n.slice(0,7)}function O(n){const{isUpdateAvailable:r,update:t}=R();return r?e(k,{theme:"accent",text:"Refresh & update",class:"self-start",icon:S,onClick:()=>{t()}}):e(g,{class:i(n.class,"gap-2"),children:[e(m,{heightRem:h("text-md"),children:e(D,{})}),e(l,{class:"min-w-0 shrink",children:"Waiting for service worker to install update..."})]})}function W(n){const{isHotReloadingEnabled:r}=H();return r?e(Q,{...n}):e(q,{...n})}function Q(n){const{data:r,loading:t}=c();return e(a,{class:i(n.class,"gap-6"),children:[e(C,{header:"App version",pillContent:{text:"Development",type:"info"},loading:!1}),e(l,{children:"All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)"}),e(w,{}),e(u,{prefix:"Latest version",value:r?.frontendVersion.slice(0,8)??null,loading:t})]})}function q(n){const{frontendVersion:r}=v(),{data:t,loading:s}=c(),b=!s&&t!=null&&t?.frontendVersion!==r;return e(a,{class:i(n.class,"gap-8"),children:e(a,{class:"gap-6",children:[e(V,{header:"App version",currentValue:r,latestValue:t?.frontendVersion??null,loading:s}),e(w,{}),e(u,{prefix:"Latest version",value:o(t?.frontendVersion),loading:s}),b&&e(O,{})]})})}function w(){const{frontendVersion:n,versionsOnLastUpdate:r}=v();return e(a,{class:"gap-4",children:[e(l,{children:["Current version: ",o(n)]}),e(a,{class:"gap-3",children:[e(l,{style:"small-weak",children:["Server version: ",o(r.serverVersion)]}),e(l,{style:"small-weak",children:["CoreQuery version: ",r.corequeryPackageVersion]})]})]})}function G(n){const r=B(L,{});return e(y.Provider,{value:r,children:n.children})}function $(n){const{data:r,loading:t}=c(),{foda:s}=T();return e(a,{class:i(n.class,"gap-6"),children:[e(V,{header:"Foundational data",currentValue:s.hash,latestValue:r?.foundationalDataHash??null,loading:t}),e(a,{class:"gap-4",children:[e(l,{children:["Current version: ",o(s.hash)]}),e(l,{style:"small-weak",children:["Server version: ",o(s.serverVersion)]})]}),e(u,{prefix:"Latest version",value:o(r?.foundationalDataHash),loading:t})]})}function I(n){const{data:r,loading:t}=c();return e(a,{class:i(n.class,"gap-8"),children:e(a,{class:"gap-6",children:[e(l,{style:"strong",children:"Server"}),e(X,{}),e(a,{class:"gap-4",children:[e(u,{prefix:"Server version",value:o(r?.serverVersion),loading:t}),e(u,{prefix:"CoreQuery version",value:r?.corequeryPackageVersion??null,loading:t})]})]})})}function X(){const{error:n}=c();return n==null?null:e(p,{type:"error",children:e(l,{children:"Unable to fetch the latest version info from the server."})})}function _(){return e(E,{...F({title:"Developer info"}),children:e(G,{children:e(a,{class:"px-4 py-8 gap-8",children:[e(j,{}),e(W,{}),e(d,{}),e($,{}),e(d,{}),e(I,{}),e(d,{})]})})})}function j(){const{error:n}=c();return n==null?null:e(p,{type:"error",children:e(l,{children:"Unable to fetch the latest version info from the server."})})}export{_ as default};
@@ -1 +1 @@
1
- import{d as s,e as o}from"./index-BwSq_h7e.js";function d(r){return s("div",{class:o(r.class,"border-b border-soft-border")})}export{d as D};
1
+ import{d as s,e as o}from"./index-CLEhHuwG.js";function d(r){return s("div",{class:o(r.class,"border-b border-soft-border")})}export{d as D};
@@ -0,0 +1 @@
1
+ import{a as r,d as a,C as m}from"./index-CLEhHuwG.js";import{P as e}from"./Page-14zdRXyE.js";import{u as t}from"./use-simple-headers-CdkDNHF3.js";import{M as i}from"./Markdown-CsYleoHG.js";import"./LinkText-BZEamFKR.js";import"./Strong-DQEYCa_y.js";function f(){const{foda:o}=r();return a(e,{...t({title:"Home"}),children:a(m,{class:"px-4 py-8 gap-12",children:a(i,{markdown:o.landingPage.primaryMarkdown})})})}export{f as default};
@@ -0,0 +1 @@
1
+ import{a as v,u as C,j as u,d as s,T as h,C as d,e as g,A as p,m as y,y as b,n as c,k as L,q as k,G as _,l as P,o as D}from"./index-CLEhHuwG.js";import{P as S}from"./Page-14zdRXyE.js";import{u as R}from"./use-simple-headers-CdkDNHF3.js";import{N as T}from"./NotFoundPage-CmT-cPq4.js";import{L as f}from"./LinkText-BZEamFKR.js";import{A as z}from"./Alert-ZeYzkS1G.js";import{P as H}from"./Picker-B_2kVnst.js";function E(e){if(!/^-?[0-9]+$/g.test(e))throw I(e);return parseInt(e,10)}const I=e=>new Error(`"${e}" is not an integer.`);function N(e){const{foda:t}=v(),{appName:i}=C(),r=u(()=>e.fallbackStopList.map(a=>t.stops.require(a)).sort((a,n)=>a.name.localeCompare(n.name)),[t.stops,e.fallbackStopList]);return s(d,{class:g(e.class,"gap-6"),children:[s(h,{style:"subtitle",children:"Stops"}),s(z,{type:"info",children:s(d,{class:"gap-6",children:[s(h,{children:["A neat little diagram is also available for this line, but it's of a new type, and so requires a newer version of ",i," to be able to view."," "]}),s(h,{style:"strong",children:s(f,{href:"/debug",children:"Help me update"})})]})}),s("ul",{class:"flex-col flex list-disc list-inside gap-4",children:r.map(a=>s(h,{children:s("li",{children:s(f,{href:`/stop/${a.urlPath}`,children:a.name})})}))})]})}class O{constructor(t,i){this._canvasContainer=t,this.canvas=i;const r=this.canvas.getContext("2d");if(r==null)throw new Error("Failed to get 2D rendering context.");this.ctx=r,this._resizeListener=this._onResize.bind(this),this._resizeObserver=new ResizeObserver(this._resizeListener),this._data=null,this._width=1,this._height=1,this._dpiRatio=1,this._dirty=!0,this._running=!1}_canvasContainer;canvas;ctx;_resizeListener;_resizeObserver;_data;_width;_height;_dpiRatio;_dirty;_running;get data(){if(this._data==null)throw new Error("Data not set.");return this._data}get width(){return this._width}get height(){return this._height}setData(t){this._data=t,this.onDataUpdated(),this._dirty=!0,this._running||this._start()}_start(){this._fitCanvas(),this._running=!0,this._render(),window.addEventListener("resize",this._resizeListener),this._resizeObserver.observe(this._canvasContainer),this.onStart()}destroy(){this._running=!1,window.removeEventListener("resize",this._resizeListener),this._resizeObserver.unobserve(this._canvasContainer),this.onDestroy()}_render(){this._running&&(requestAnimationFrame(()=>{this._render()}),this._dirty&&(this._dirty=!1,this.ctx.save(),this.ctx.clearRect(0,0,this._width*this._dpiRatio,this._height*this._dpiRatio),this.ctx.scale(this._dpiRatio,this._dpiRatio),this.onRender(),this.ctx.restore()))}onStart(){}onDestroy(){}onDataUpdated(){}_onResize(){this._fitCanvas()}_fitCanvas(){const t=this._canvasContainer.getBoundingClientRect();this._width=t.width,this._height=t.height;const i=window.devicePixelRatio??1,r=this.ctx.backingStorePixelRatio??1;this._dpiRatio=i/r,this.canvas.style.width=`${this._width}px`,this.canvas.style.height=`${this._height}px`,this.canvas.width=this._width*this._dpiRatio,this.canvas.height=this._height*this._dpiRatio,this._dirty=!0}markDirty(){this._dirty=!0}}function A(e){const{data:t,createController:i}=e,r=p(null),a=p(null),[n,o]=y(null);return b(()=>{if(r.current==null||a.current==null)return;const l=i(r.current,a.current);return o(l),()=>{l?.destroy()}},[i]),b(()=>{n?.setData(t)},[n,t]),s("div",{ref:r,className:g(e.class,"relative overflow-hidden"),children:s("canvas",{className:"absolute top-0 left-0 select-none",ref:a,style:{touchAction:"none"}})})}function F(){const e=window.getComputedStyle(document.body);return{bg:e.getPropertyValue("--color-bg"),fg:e.getPropertyValue("--color-fg"),"fg-strong":e.getPropertyValue("--color-fg-strong"),"fg-weak":e.getPropertyValue("--color-fg-weak")}}const m=16,$=6,M=6;class Y extends O{_css;_prefersDark;constructor(t,i){super(t,i),this._css=F(),this._prefersDark=window.matchMedia("(prefers-color-scheme: dark)").matches}onRender(){if(this.data.diagram.stops.length===0)return;const t=this._getLabelYLevels();if(t.length!==this.data.diagram.stops.length)return;this.ctx.strokeStyle="#000000";const i=c(t[0]),r=c(t[t.length-1]);this.ctx.lineWidth=M,this.ctx.beginPath(),this.ctx.moveTo(m/2,i),this.ctx.lineTo(m/2,r),this.ctx.stroke(),this.data.diagram.stops.forEach((a,n)=>{const o=c(t[n]),l=n===0||n===this.data.diagram.stops.length-1;a.type!=="always-express"&&(this.ctx.lineWidth=$,this.ctx.beginPath(),this.ctx.moveTo(l?0:m/2,o),this.ctx.lineTo(m,o),this.ctx.stroke())}),this.ctx.globalCompositeOperation="source-in",this.ctx.fillStyle=this._getDiagramColor(),this.ctx.fillRect(0,0,this.width,this.height)}_getDiagramColor(){const t={dark:"darkModeHexCode",light:"lightModeHexCode",auto:this._prefersDark?"darkModeHexCode":"lightModeHexCode"}[this.data.colorTheme];return this.data.diagram.color?.[t]??this._css.fg}_getLabelYLevels(){return Array.from(this.data.labelsParent?.childNodes.values()??[]).filter(t=>t instanceof HTMLElement).map(t=>t.offsetTop+t.offsetHeight/2)}}function q(e){const{settings:t}=L(),i=u(()=>({diagram:e.diagram,labelsParent:e.labelsParent,colorTheme:t.theme}),[e.diagram,e.labelsParent,t.theme]),r=k((a,n)=>new Y(a,n),[]);return s(A,{class:g(e.class),createController:r,data:i})}function w(e){const{foda:t}=v(),i=p(null),[r,a]=y(null);b(()=>{a(i.current)},[]);const n=u(()=>e.diagram.stops.map(({stopId:o,type:l})=>{const x=t.stops.require(o);return{name:x.name,url:`/stop/${x.urlPath}`,type:l}}),[t.stops,e.diagram.stops]);return s(_,{class:g(e.class,"bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border"),children:s(_,{class:"relative",children:[s(_,{class:"absolute top-0 bottom-0 left-0 w-8",children:s(q,{diagram:e.diagram,labelsParent:r})}),s("div",{ref:i,class:"flex flex-col gap-6 ml-8",children:n.map(o=>o.type==="always-express"?s(h,{style:"small-weak",children:s(f,{href:o.url,style:"subtle",children:["Skips ",o.name]})}):s(h,{style:"strong",children:s(f,{href:o.url,style:"subtle",children:o.name})}))})]})})}function V(e){const t=e.diagram.entries.filter(i=>i.type==="linear");return t.length<e.diagram.entries.length?s(N,{fallbackStopList:e.diagram.fallbackStopList}):s(d,{class:g(e.class,"gap-6"),children:[s(h,{style:"subtitle",children:"Diagram"}),t.length===1?s(w,{diagram:c(t[0])}):s(U,{entries:t},t.length)]})}function U(e){const[t,i]=y(0),r=u(()=>e.entries.map((a,n)=>({value:n.toFixed(),label:a.name??`Route ${n+1}`})),[e.entries]);return s(d,{class:"gap-4",children:[s(H,{class:"self-start",value:t.toFixed(),options:r,onChange:a=>{i(E(a))}}),s(w,{diagram:c(e.entries[t])})]})}function Z(){const{params:{id:e}}=P(),{foda:t}=v(),i=u(()=>t.lines.getByUrlPath(e??""),[t.lines,e]);return i===null?s(T,{afterConfirming:"foundational-data-version"}):s(W,{line:i})}function W(e){const{formatLine:t}=D();return s(S,{...R({title:t(e.line.name)}),children:s(d,{class:"px-4 py-8 gap-8",children:e.line.diagram.entries.length>0&&s(V,{diagram:e.line.diagram})})})}export{Z as default};
@@ -0,0 +1 @@
1
+ import{e as t,d as n}from"./index-CLEhHuwG.js";const i={default:"text-accent-text underline",subtle:"hover:underline"};function a(e){const c=i[e.style??"default"],l=t(c,"inline",e.class);return e.onClick!=null?n("span",{class:l,onClick:e.onClick,children:e.children}):e.href!=null?n("a",{class:l,href:e.href,children:e.children}):n("span",{class:l,children:e.children})}export{a as L};
@@ -0,0 +1,2 @@
1
+ import{d as i,S as u,e as d,T as a,j as h,C as k}from"./index-CLEhHuwG.js";import{L as p}from"./LinkText-BZEamFKR.js";import{S as x}from"./Strong-DQEYCa_y.js";const g=/\[([^[\]]+)\]\(([^()]+)\)/,w=/\*\*(.+?)\*\*/,T=/\*([^*]+)\*/,y=/_([^_]+)_/;function m(t,n){const l=[];let e=t;for(;e.length>0;){const r=b(e);if(r==null){l.push(e);break}r.index>0&&l.push(e.slice(0,r.index));const c=m(r.innerContent,n);l.push(r.wrap(i(u,{children:c}),n)),e=e.slice(r.index+r.fullMatch.length)}return l}function b(t){const n=[M(t),I(t),s(t,T),s(t,y)];let l=null;for(const e of n)e!=null&&(l==null||e.index<l.index)&&(l=e);return l}function M(t){const n=t.match(g);if(n==null||n.index==null||n[1]==null||n[2]==null)return null;const l=n[2];return!l.startsWith("https://")&&!l.startsWith("/")?null:{index:n.index,fullMatch:n[0],innerContent:n[1],wrap:(e,r)=>r.link(e,l)}}function I(t){const n=t.match(w);return n==null||n.index==null||n[1]==null?null:{index:n.index,fullMatch:n[0],innerContent:n[1],wrap:(l,e)=>e.bold(l)}}function s(t,n){const l=t.match(n);return l==null||l.index==null||l[1]==null?null:{index:l.index,fullMatch:l[0],innerContent:l[1],wrap:(e,r)=>r.italic(e)}}function C(t){return i("em",{class:d(t.class),children:t.children})}const o={bold:t=>i(x,{children:t}),italic:t=>i(C,{children:t}),link:(t,n)=>i(p,{href:n,children:t})},S={h1:{render:(t,n)=>i(a,{as:"h1",style:"title",children:t},n),marginTop:"mt-12"},h2:{render:(t,n)=>i(a,{as:"h2",style:"subtitle",children:t},n),marginTop:"mt-12"},h3:{render:(t,n)=>i(a,{as:"h3",style:"strong",children:t},n),marginTop:"mt-12"},p:{render:(t,n)=>i(a,{as:"p",children:t},n),marginTop:"mt-8"},bold:o.bold,italic:o.italic,link:o.link};function P(t){const n=t.style??o,l=h(()=>m(t.markdown,n),[t.markdown,n]);return i(u,{children:l})}function B(t){return t.split(`
2
+ `).map(n=>n.replace(/[\r\t]/g,"").trim()).filter(n=>n.length>0).map(n=>{const l=n.match(/^### (.+)$/);if(l!=null&&l[1]!=null)return{kind:"h3",content:l[1]};const e=n.match(/^## (.+)$/);if(e!=null&&e[1]!=null)return{kind:"h2",content:e[1]};const r=n.match(/^# (.+)$/);return r!=null&&r[1]!=null?{kind:"h1",content:r[1]}:{kind:"p",content:n}})}function W(t){const n=t.style??S,l=h(()=>B(t.markdown).map((e,r)=>{const c=n[e.kind],f=r===0?"":c.marginTop;return i("div",{class:f,children:c.render(i(P,{style:n,markdown:e.content}),r)},r)}),[t.markdown,n]);return i(k,{class:d(t.class),children:l})}export{P as I,W as M};
@@ -0,0 +1 @@
1
+ import{d as e,C as r,T as a}from"./index-CLEhHuwG.js";import{P as l}from"./Page-14zdRXyE.js";function n(){return e(l,{mobileHeader:null,desktopHeader:null,children:e(r,{class:"px-4 py-8 gap-8",children:e(a,{children:"Idk"})})})}export{n as default};
@@ -0,0 +1 @@
1
+ import{d as o}from"./index-CLEhHuwG.js";import{N as r}from"./NotFoundPage-CmT-cPq4.js";import"./Page-14zdRXyE.js";function f(){return o(r,{afterConfirming:"frontend-version"})}export{f as default};
@@ -0,0 +1 @@
1
+ import{h as F,u as H,f as A,a as D,b,i as k,m as P,y as g,s as B,F as L,d as n,C as p,L as S,T as m,B as T,v as E,w as I}from"./index-CLEhHuwG.js";import{P as y}from"./Page-14zdRXyE.js";function R({afterConfirming:i}){const{isHotReloadingEnabled:v}=F(),{frontendVersion:w}=H(),{unregister:r}=A(),{foda:e,updateFoda:l}=D(),{callApi:d}=I(),{data:a,loading:t,error:u}=b(k,{}),[x,c]=P(!1),o=i==="frontend-version"&&!v&&!t&&u==null&&a!=null&&a.frontendVersion!==w,f=i==="foundational-data-version"&&!t&&u==null&&a!=null&&a.foundationalDataHash!==e.hash;return g(()=>{if(!o)return;async function s(){await r(),window.location.reload()}s()},[o,r]),g(()=>{if(!f)return;async function s(){c(!0);try{const h=await d(B,{hash:e.hash});h.result==="outdated"&&l(new L(h.foundationalData))}catch{}finally{c(!1)}}s()},[f,d,e.hash,l]),t||o||x?n(y,{mobileHeader:null,desktopHeader:null,children:n(p,{xAlign:"center",yAlign:"center",children:n(S,{})})}):n(y,{mobileHeader:null,desktopHeader:null,children:n(p,{class:"px-4 py-8 gap-8",xAlign:"center",yAlign:"center",children:[n(m,{style:"title",align:"center",children:"Page not found"}),n(m,{align:"center",children:"This page doesn't exist, at least not anymore!"}),n(T,{href:"/",text:"Go home",icon:E})]})})}export{R as N};
@@ -0,0 +1 @@
1
+ import{d,e as r,G as n,z as a,P as i}from"./index-CLEhHuwG.js";function s(e){return d(n,{class:r(e.class,"not-desktop:hidden"),children:e.children})}function c(e){return d(n,{class:r(e.class,"fixed top-0 left-0 right-0 bg-bg-navbar border-b border-soft-border desktop:hidden"),children:e.children})}function h(e){const{showMobileNav:l}=a(),t=e.centered??!0;return d(n,{class:r("bg-bg min-h-svh relative",{"pt-14":e.mobileHeader!=null,"not-desktop:pb-18":l,"desktop:grid-rows-[auto_1fr]":e.desktopHeader!=null},"desktop:pt-12"),children:[e.desktopHeader!=null&&d(s,{children:e.desktopHeader}),e.mobileHeader!=null&&d(c,{class:"h-14 z-1",children:e.mobileHeader}),d(n,{class:"z-0",children:t?d(i,{children:e.children}):e.children})]})}export{h as P};
@@ -0,0 +1 @@
1
+ import{d as c,e as a,R as t,T as o,r}from"./index-CLEhHuwG.js";const s=["bg-transparent","group-hover:bg-soft-hover","group-active:bg-soft-active"],i=["bg-accent","group-hover:bg-accent-hover","group-active:bg-accent-active"],v=["[--color-fg:var(--color-on-accent)]","[--color-fg-strong:var(--color-on-accent)]","[--color-fg-weak:var(--color-on-accent)]"],g=a(s),u=a(i),d=a(v);function k(e){return c(t,{class:a(e.class,"overflow-hidden rounded-sm border border-accent max-w-full"),children:e.options.map((n,l)=>c(b,{class:"shrink",label:n.label,active:n.value===e.value,last:l===e.options.length-1,onClick:()=>e.onChange(n.value)},n.value))})}function b(e){return c(r,{class:a(e.class,"relative group min-h-8",{[d]:e.active,"border-r border-accent":!e.last}),onClick:e.onClick,children:[c("div",{class:a("absolute z-0 top-0 bottom-0 left-0 right-0",{[g]:!e.active,[u]:e.active})}),c(t,{class:"relative z-1 px-6 py-2 min-w-0",xAlign:"center",yAlign:"center",children:c(o,{class:"shrink min-w-min",align:"center",children:e.label})})]})}export{k as P};
@@ -0,0 +1 @@
1
+ import{d as l,e as a}from"./index-CLEhHuwG.js";function s(e){return l("div",{class:a(e.class,"bg-placeholder animate-placeholder-pulse")})}function r(e){return l(s,{...e,class:a(e.class,"h-[1em] -my-[0.13em]")})}export{r as T};
@@ -0,0 +1 @@
1
+ import{k as n,d as e,t as c,C as o,T as t}from"./index-CLEhHuwG.js";import{P as m}from"./Picker-B_2kVnst.js";import{P as u}from"./Page-14zdRXyE.js";import{u as h}from"./use-simple-headers-CdkDNHF3.js";import{D as d}from"./Divider-dQCO5rFf.js";const g={auto:"Auto",light:"Light",dark:"Dark"},p=c.map(s=>({value:s,label:g[s]}));function f(s){const{settings:r,updateSettings:a}=n();return e(m,{class:s.class,value:r.theme,options:p,onChange:i=>{a(l=>l.with({theme:i}))}})}function P(){return e(u,{...h({title:"Settings"}),children:e(o,{class:"px-4 py-8 gap-8",children:[e(o,{class:"gap-6",children:[e(t,{style:"strong",children:"Theme"}),e(t,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),e(f,{class:"self-start"})]}),e(d,{}),e(t,{style:"small-weak",children:"(Settings are saved to your device's/browser's local storage.)"})]})})}export{P as default};
@@ -0,0 +1 @@
1
+ import{d as t,C as a,T as e}from"./index-CLEhHuwG.js";import{P as r}from"./Page-14zdRXyE.js";import{u as s}from"./use-simple-headers-CdkDNHF3.js";function u(){return t(r,{...s({title:"Status"}),children:t(a,{class:"px-4 py-8 gap-8",children:t(e,{children:"LGTM"})})})}export{u as default};
@@ -0,0 +1 @@
1
+ import{l as u,a as r,j as l,d as o,C as c,T as f}from"./index-CLEhHuwG.js";import{P as p}from"./Page-14zdRXyE.js";import{u as d}from"./use-simple-headers-CdkDNHF3.js";import{N as m}from"./NotFoundPage-CmT-cPq4.js";function g(n,e,t,a){if(n.length===0)return"";if(n.length===1)return n[0];if(n.length===2)return`${n[0]}${a}${n[1]}`;const s=n.slice(0,-1).join(e),i=n[n.length-1];return`${s}${t}${i}`}function h(n){return g(n,", ",", and "," and ")}function y(){const{params:{id:n}}=u(),{foda:e}=r(),t=l(()=>e.stops.getByUrlPath(n??""),[e.stops,n]);return t===null?o(m,{afterConfirming:"foundational-data-version"}):o(S,{stop:t})}function S(n){const{foda:e}=r();return o(p,{...d({title:n.stop.name}),children:o(c,{class:"px-4 py-8 gap-8",children:o(f,{children:[h(n.stop.canonicalLinesServingStop.map(t=>e.lines.require(t).name).sort((t,a)=>t.localeCompare(a)))," ",n.stop.canonicalLinesServingStop.length===1?"Line":"lines"]})})})}export{y as default};
@@ -1 +1 @@
1
- import{d as s,e as t}from"./index-BwSq_h7e.js";function c(r){return s("strong",{class:t(r.class,"text-fg-strong"),children:r.children})}export{c as S};
1
+ import{d as s,e as t}from"./index-CLEhHuwG.js";function c(r){return s("strong",{class:t(r.class,"text-fg-strong"),children:r.children})}export{c as S};
@@ -0,0 +1 @@
1
+ import{d as e,C as o,T as n}from"./index-CLEhHuwG.js";import{P as a}from"./Page-14zdRXyE.js";import{u as i}from"./use-simple-headers-CdkDNHF3.js";import{S as r}from"./Strong-DQEYCa_y.js";function d(){return e(a,{...i({title:"Zen mode"}),children:e(o,{class:"px-4 py-8 gap-8",children:e(n,{children:[e(r,{children:"✨"})," Zen! ",e(r,{children:"✨"})]})})})}export{d as default};