corequery 0.20.0 → 0.20.1

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 (38) hide show
  1. package/package.json +16 -16
  2. package/web/dist/assets/{About-BVLvPMvX.js → About-B4UmqgrV.js} +1 -1
  3. package/web/dist/assets/AdminControls-DX3KW-zW.js +1 -0
  4. package/web/dist/assets/{Alert-COfF0dqk.js → Alert-DQo_9hou.js} +1 -1
  5. package/web/dist/assets/{Debug-_oa8VCYK.js → Debug-9Moa_MGi.js} +1 -1
  6. package/web/dist/assets/{Divider-gld0_leQ.js → Divider-CzgO05rh.js} +1 -1
  7. package/web/dist/assets/Home-BIjMy7zS.js +1 -0
  8. package/web/dist/assets/{Line-DDn61jmK.js → Line-BzwFM8jS.js} +1 -1
  9. package/web/dist/assets/{LinkText-DEVIS-r6.js → LinkText-CvJA45KQ.js} +1 -1
  10. package/web/dist/assets/{Markdown-BNlKVHJ4.js → Markdown-DBz64KxS.js} +1 -1
  11. package/web/dist/assets/Nearby-BOov6R33.js +1 -0
  12. package/web/dist/assets/NotFound-Cz3sIE5T.js +1 -0
  13. package/web/dist/assets/{NotFoundPage-fCz3glss.js → NotFoundPage-DJ5EsFv_.js} +1 -1
  14. package/web/dist/assets/{Page-CU2ljT5t.js → Page-DzdIp_Wd.js} +1 -1
  15. package/web/dist/assets/{Picker-CWKqRwiO.js → Picker-BQbgll08.js} +1 -1
  16. package/web/dist/assets/{Placeholder-DoJPWttg.js → Placeholder-CJqOjjss.js} +1 -1
  17. package/web/dist/assets/{Settings-DxbhdpKP.js → Settings-NY7e-M0I.js} +1 -1
  18. package/web/dist/assets/Status-td9b9mub.js +1 -0
  19. package/web/dist/assets/{Stop-DFG4DJkO.js → Stop-CgYDs6wq.js} +1 -1
  20. package/web/dist/assets/{Strong-D7PTULU1.js → Strong-WlMKIeDs.js} +1 -1
  21. package/web/dist/assets/ZenMode-D9raubr-.js +1 -0
  22. package/web/dist/assets/index-D1BLZ3NL.js +66 -0
  23. package/web/dist/assets/index-D_bseRBy.css +1 -0
  24. package/web/dist/assets/{use-simple-headers-C1tKvNnG.js → use-simple-headers-BVRJayjK.js} +1 -1
  25. package/web/dist/assets/workbox-window.prod.es5-BBnX5xw4.js +2 -0
  26. package/web/dist/index.html +2 -2
  27. package/web/dist/sw.js +1 -1
  28. package/web/dist/workbox-2fbc6a65.js +1 -0
  29. package/web/dist/assets/AdminControls-CgsRGeDX.js +0 -1
  30. package/web/dist/assets/Home-B1Mu_eQf.js +0 -1
  31. package/web/dist/assets/Nearby-DYG2r84l.js +0 -1
  32. package/web/dist/assets/NotFound-Cfqv8QM4.js +0 -1
  33. package/web/dist/assets/Status-D2ejp5fp.js +0 -1
  34. package/web/dist/assets/ZenMode-DNUH1QCc.js +0 -1
  35. package/web/dist/assets/index-DAObBCDG.js +0 -41
  36. package/web/dist/assets/index-DuGn0vvC.css +0 -1
  37. package/web/dist/assets/workbox-window.prod.es5-BIl4cyR9.js +0 -2
  38. package/web/dist/workbox-1ef09536.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corequery",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "server/dist",
@@ -30,15 +30,15 @@
30
30
  "express": "^5.2.1",
31
31
  "node-html-parser": "^7.1.0",
32
32
  "sharp": "^0.34.5",
33
- "zod": "^4.3.6"
33
+ "zod": "^4.4.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@eslint/js": "9.39.4",
37
37
  "@preact/preset-vite": "2.10.5",
38
- "@tailwindcss/vite": "4.2.4",
38
+ "@tailwindcss/vite": "4.3.0",
39
39
  "@types/express": "5.0.6",
40
- "@types/node": "24.12.2",
41
- "@vitest/coverage-v8": "4.1.5",
40
+ "@types/node": "24.12.4",
41
+ "@vitest/coverage-v8": "4.1.6",
42
42
  "chalk": "5.6.2",
43
43
  "clsx": "2.1.1",
44
44
  "eslint": "9.39.4",
@@ -46,19 +46,19 @@
46
46
  "eslint-plugin-prettier": "5.5.5",
47
47
  "eslint-plugin-react": "7.37.5",
48
48
  "eslint-plugin-react-hooks": "7.1.1",
49
- "globals": "17.5.0",
50
- "knip": "6.8.0",
51
- "preact": "10.29.1",
52
- "preact-iso": "2.11.1",
49
+ "globals": "17.6.0",
50
+ "knip": "6.14.1",
51
+ "preact": "10.29.2",
52
+ "preact-iso": "2.12.0",
53
53
  "prettier": "3.8.3",
54
- "tailwindcss": "4.2.4",
55
- "tsc-alias": "1.8.16",
56
- "tsx": "4.21.0",
54
+ "tailwindcss": "4.3.0",
55
+ "tsc-alias": "1.8.17",
56
+ "tsx": "4.22.1",
57
57
  "typescript": "6.0.3",
58
- "typescript-eslint": "8.59.1",
59
- "vite": "7.3.2",
60
- "vite-plugin-pwa": "1.2.0",
61
- "vitest": "4.1.5"
58
+ "typescript-eslint": "8.59.3",
59
+ "vite": "7.3.3",
60
+ "vite-plugin-pwa": "1.3.0",
61
+ "vitest": "4.1.6"
62
62
  },
63
63
  "author": "dan-schel",
64
64
  "description": "A platform for building web apps serving transit information.",
@@ -1 +1 @@
1
- import{u as m,a as p,b as u,c as h,d as s,C as l,T as d}from"./index-DAObBCDG.js";import{T as a}from"./Placeholder-DoJPWttg.js";import{M as f,I as w}from"./Markdown-BNlKVHJ4.js";import{P as r}from"./Page-CU2ljT5t.js";import{u as x}from"./use-simple-headers-C1tKvNnG.js";import{D as v}from"./Divider-gld0_leQ.js";import{A as k}from"./Alert-COfF0dqk.js";import"./LinkText-DEVIS-r6.js";import"./Strong-D7PTULU1.js";function I(){const{appName:c}=m(),{foda:o}=p(),{data:e,loading:i,error:n}=u(h,{}),t=x({title:`About ${c}`});return i?s(r,{...t,children:s(l,{class:"px-4 py-8",children:[s(a,{class:"w-[30%] text-xl"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[60%] text-md"}),s("div",{class:"h-12"}),s(a,{class:"w-[40%] text-lg"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[20%] text-md"}),s("div",{class:"h-12"}),s(a,{class:"w-[50%] text-lg"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[80%] text-md"})]})}):n!=null||e==null?s(r,{...t,children:s(l,{class:"px-4 py-8",children:s(k,{type:"error",children:s(d,{children:"Unable to load the about page."})})})}):s(r,{...t,children:s(l,{class:"px-4 py-8 gap-12",children:[s(f,{markdown:e.primaryMarkdown}),s(l,{class:"gap-8",children:[s(v,{}),s(d,{as:"p",style:"small-weak",children:s(w,{markdown:o.footerPrimaryMarkdown})})]})]})})}export{I as default};
1
+ import{u as m,a as p,b as u,c as h,d as s,C as l,T as d}from"./index-D1BLZ3NL.js";import{T as a}from"./Placeholder-CJqOjjss.js";import{M as f,I as w}from"./Markdown-DBz64KxS.js";import{P as r}from"./Page-DzdIp_Wd.js";import{u as x}from"./use-simple-headers-BVRJayjK.js";import{D as v}from"./Divider-CzgO05rh.js";import{A as k}from"./Alert-DQo_9hou.js";import"./LinkText-CvJA45KQ.js";import"./Strong-WlMKIeDs.js";function I(){const{appName:c}=m(),{foda:o}=p(),{data:e,loading:i,error:n}=u(h,{}),t=x({title:`About ${c}`});return i?s(r,{...t,children:s(l,{class:"px-4 py-8",children:[s(a,{class:"w-[30%] text-xl"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[60%] text-md"}),s("div",{class:"h-12"}),s(a,{class:"w-[40%] text-lg"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[20%] text-md"}),s("div",{class:"h-12"}),s(a,{class:"w-[50%] text-lg"}),s("div",{class:"h-8"}),s(a,{class:"w-full text-md"}),s("div",{class:"h-3"}),s(a,{class:"w-[80%] text-md"})]})}):n!=null||e==null?s(r,{...t,children:s(l,{class:"px-4 py-8",children:s(k,{type:"error",children:s(d,{children:"Unable to load the about page."})})})}):s(r,{...t,children:s(l,{class:"px-4 py-8 gap-12",children:[s(f,{markdown:e.primaryMarkdown}),s(l,{class:"gap-8",children:[s(v,{}),s(d,{as:"p",style:"small-weak",children:s(w,{markdown:o.footerPrimaryMarkdown})})]})]})})}export{I as default};
@@ -0,0 +1 @@
1
+ import{d as e,C as r,T as a}from"./index-D1BLZ3NL.js";import{P as o}from"./Page-DzdIp_Wd.js";import{u as t}from"./use-simple-headers-BVRJayjK.js";function i(){return e(o,{...t({title:"Admin controls"}),children:e(r,{class:"px-4 py-8 gap-8",children:e(a,{children:"Maybe the real admin controls were the friends we made along the way?"})})})}export{i as default};
@@ -1 +1 @@
1
- import{d as e,e as o,r as a,U as s,g as i,G as g}from"./index-DAObBCDG.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:s,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:i("text-md"),children:e(r,{class:"text-fg text-icon-lg"})}),l.children]})}export{x as A,h as M,f as V};
1
+ import{d as e,e as o,r as a,U as s,g as i,G as g}from"./index-D1BLZ3NL.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:s,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:i("text-md"),children:e(r,{class:"text-fg text-icon-lg"})}),l.children]})}export{x as A,h as M,f as V};
@@ -1 +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-DAObBCDG.js";import{P as E}from"./Page-CU2ljT5t.js";import{u as F}from"./use-simple-headers-C1tKvNnG.js";import{D as d}from"./Divider-gld0_leQ.js";import{V as m,A as p}from"./Alert-COfF0dqk.js";import{T as x}from"./Placeholder-DoJPWttg.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
+ 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-D1BLZ3NL.js";import{P as E}from"./Page-DzdIp_Wd.js";import{u as F}from"./use-simple-headers-BVRJayjK.js";import{D as d}from"./Divider-CzgO05rh.js";import{V as m,A as p}from"./Alert-DQo_9hou.js";import{T as x}from"./Placeholder-CJqOjjss.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-DAObBCDG.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-D1BLZ3NL.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-D1BLZ3NL.js";import{P as e}from"./Page-DzdIp_Wd.js";import{u as t}from"./use-simple-headers-BVRJayjK.js";import{M as i}from"./Markdown-DBz64KxS.js";import"./LinkText-CvJA45KQ.js";import"./Strong-WlMKIeDs.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};
@@ -1 +1 @@
1
- import{a as L,u as K,j as _,d as n,T as f,C as d,e as h,A as P,m as I,y as N,n as c,k,q as B,G as g,o as J,l as Q,p as X}from"./index-DAObBCDG.js";import{P as tt}from"./Page-CU2ljT5t.js";import{u as et}from"./use-simple-headers-C1tKvNnG.js";import{N as ot}from"./NotFoundPage-fCz3glss.js";import{L as H}from"./LinkText-DEVIS-r6.js";import{A as rt,M as nt}from"./Alert-COfF0dqk.js";import{P as it}from"./Picker-CWKqRwiO.js";function F(t){throw new Error(`Unexpected value: ${String(t)}`)}function at(t){if(!/^-?[0-9]+$/g.test(t))throw st(t);return parseInt(t,10)}const st=t=>new Error(`"${t}" is not an integer.`);function lt(t){const{foda:o}=L(),{appName:i}=K(),s=_(()=>t.fallbackStopList.map(e=>o.stops.require(e)).sort((e,r)=>e.name.localeCompare(r.name)),[o.stops,t.fallbackStopList]);return n(d,{class:h(t.class,"gap-6"),children:[n(f,{style:"subtitle",children:"Stops"}),n(rt,{type:"info",children:n(d,{class:"gap-6",children:[n(f,{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."," "]}),n(f,{style:"strong",children:n(H,{href:"/debug",children:"Help me update"})})]})}),n("ul",{class:"flex-col flex list-disc list-inside gap-4",children:s.map(e=>n(f,{children:n("li",{children:n(H,{href:`/stop/${e.urlPath}`,children:e.name})})}))})]})}class ct{constructor(o,i){this._canvasContainer=o,this._canvas=i;const s=this._canvas.getContext("2d");if(s==null)throw new Error("Failed to get 2D rendering context.");this.ctx=s,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(o){this._data=o,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 o=this._canvasContainer.getBoundingClientRect();this._width=o.width,this._height=o.height;const i=window.devicePixelRatio??1,s=this.ctx.backingStorePixelRatio??1;this._dpiRatio=i/s,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 E(t){const{data:o,createController:i}=t,s=P(null),e=P(null),[r,a]=I(null),l=t.interceptTouches??!1?{touchAction:"none"}:void 0;return N(()=>{if(s.current==null||e.current==null)return;const m=i(s.current,e.current);return a(m),()=>{m?.destroy()}},[i]),N(()=>{r?.setData(o)},[r,o]),n("div",{ref:s,className:h(t.class,"relative overflow-hidden"),children:n("canvas",{className:"absolute top-0 left-0",ref:e,style:l})})}function ht(){const t=window.getComputedStyle(document.body);return{bg:t.getPropertyValue("--color-bg"),fg:t.getPropertyValue("--color-fg"),"fg-strong":t.getPropertyValue("--color-fg-strong"),"fg-weak":t.getPropertyValue("--color-fg-weak")}}const T=16,dt=6,mt=6,z=1;class O extends ct{_css;_prefersDark;constructor(o,i){super(o,i),this._css=ht(),this._prefersDark=window.matchMedia("(prefers-color-scheme: dark)").matches}onRender(){this.ctx.strokeStyle="#000000",this._onRenderStructure(),this.ctx.globalCompositeOperation="source-in",this.ctx.fillStyle=this._getDiagramColor(),this.ctx.fillRect(0,0,this.width,this.height)}_renderSection({stops:o,x:i,yLevels:s,terminatesAtTop:e,terminatesAtBottom:r,notchSide:a}){if(o.length<1)throw new Error("Expecting at least one stop.");if(o.length!==s.length)throw new Error("Bad length.");const l=c(s[0]),m=c(s[s.length-1]);this._drawLine(p=>{p.moveTo(i,l-z),p.lineTo(i,m+z)}),o.forEach((p,u)=>{const C=c(s[u]),S=u===0&&e||u===o.length-1&&r;(p.drawMark??!0)&&this._drawMark(i,C,S,a)})}_drawLine(o){this.ctx.lineWidth=mt,this.ctx.beginPath(),o(this.ctx),this.ctx.stroke()}_drawMark(o,i,s,e){const r={left:-1,right:1}[e];this.ctx.lineWidth=dt,this.ctx.beginPath(),this.ctx.moveTo(s?o-T/2*r:o,i),this.ctx.lineTo(o+T/2*r,i),this.ctx.stroke()}_extractYLevels(o,i){const s=this._extractChildElements(i);if(o.length!==s.length)throw new Error("Bad length.");return o.map((e,r)=>{const a=c(s[r]);return e.getOverriddenMarkYPosition!=null?e.getOverriddenMarkYPosition(a):this._getDefaultMarkYPosition(a)})}_extractChildElements(o){const i=this._canvasContainer.parentElement?.querySelector(`.${o}`);if(i==null)throw new Error(`Couldn't find "${o}".`);return Array.from(i.childNodes.values()).filter(s=>s instanceof HTMLElement)}_getDefaultMarkYPosition(o){const i=this._canvasContainer.getBoundingClientRect(),s=o.getBoundingClientRect();return s.top-i.top+s.height/2}_getDiagramColor(){const o={dark:"darkThemeColorHexCode",light:"lightThemeColorHexCode",auto:this._prefersDark?"darkThemeColorHexCode":"lightThemeColorHexCode"}[this.data.colorTheme];return this.data[o]??this._css.fg}}class ut extends O{_onRenderStructure(){const o=this.data.structure;this._renderSection({stops:o.stops,x:this.width/2,yLevels:this._extractYLevels(o.stops,$),terminatesAtTop:!0,terminatesAtBottom:!0,notchSide:"right"})}}function D(t){return n(d,{class:h(t.class,"gap-2"),xAlign:"center",children:[n(nt,{class:"text-icon-xl text-fg"}),n(f,{align:"center",children:"An error occurred rendering this diagram."})]})}const $="_diagram-stops";function gt(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((e,r)=>new ut(e,r),[]);return i.structure.stops.length<2?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_1fr] gap-4"),children:[n(E,{class:"w-4",createController:s,data:i}),n(d,{class:h("gap-6",$),children:t.structure.stops.map(e=>n(g,{children:e.content}))})]})}function b(t,o){return o.map(i=>{const s=t.stops.require(i.stopId),e=`/stop/${s.urlPath}`;if(i.type==="regular")return{content:n(f,{style:"strong",children:n(H,{href:e,style:"subtle",children:s.name})})};if(i.type==="always-express")return{content:n(f,{style:"small-weak",children:n(H,{href:e,style:"subtle",children:["Skips ",s.name]})}),drawMark:!1};F(i.type)})}function pt(t){const{foda:o}=L(),i=_(()=>({type:"linear",stops:b(o,t.diagram.stops)}),[o,t.diagram.stops]);return n(gt,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}const x=10,w=15;class _t extends O{_onRenderStructure(){const{commonStops:o,branchAStops:i,branchBStops:s}=this.data.structure,{x:e,y:r}=this._measure();this._renderSection({stops:o,x:e.common,yLevels:r.common.all,terminatesAtTop:!0,terminatesAtBottom:!1,notchSide:"right"}),this._renderSection({stops:i,x:e.branchA,yLevels:r.branchA.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"left"}),this._renderSection({stops:s,x:e.branchB,yLevels:r.branchB.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"right"}),this._drawLine(a=>{a.moveTo(e.common,r.common.bottom),a.lineTo(e.common,r.common.bottom+x),a.bezierCurveTo(e.common,r.common.bottom+w+x,e.branchA,r.branches.top-w,e.branchA,r.branches.top),a.lineTo(e.branchA,r.branchA.top),a.moveTo(e.common,r.common.bottom+x),a.bezierCurveTo(e.common,r.common.bottom+w+x,e.branchB,r.branches.top-w,e.branchB,r.branches.top),a.lineTo(e.branchB,r.branchA.top)})}_measure(){const{commonStops:o,branchAStops:i,branchBStops:s}=this.data.structure,e=this._extractYLevels(o,U),r=c(e[0]),a=c(e[e.length-1]),l=this._extractYLevels(i,V),m=c(l[0]),p=c(l[l.length-1]),u=this._extractYLevels(s,q),C=c(u[0]),S=c(u[u.length-1]);return{x:{common:this.width/2,branchA:T/2,branchB:this.width-T/2},y:{common:{all:e,top:r,bottom:a},branchA:{all:l,top:m,bottom:p},branchB:{all:u,top:C,bottom:S},branches:{top:Math.min(m,C),bottom:Math.max(p,S)}}}}}const U="_diagram-common-stops",V="_diagram-branch-a-stops",q="_diagram-branch-b-stops";function ft(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((e,r)=>new _t(e,r),[]);return i.structure.commonStops.length<1||i.structure.branchAStops.length<1||i.structure.branchBStops.length<1?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-y-8 gap-x-4"),children:[n(E,{class:"w-12 col-2 row-span-full",createController:s,data:i}),n(d,{class:h("gap-6 col-3 row-1 -ml-4",U),xAlign:"left",children:t.structure.commonStops.map(e=>n(g,{children:e.content}))}),n(d,{class:h("gap-6 col-1 row-2",V),xAlign:"right",children:t.structure.branchAStops.map(e=>n(g,{children:e.content}))}),n(d,{class:h("gap-6 col-3 row-2",q),xAlign:"left",children:t.structure.branchBStops.map(e=>n(g,{children:e.content}))})]})}function Ct(t){const{foda:o}=L(),i=_(()=>({type:"branch",commonStops:b(o,t.diagram.commonStops),branchAStops:b(o,t.diagram.branchAStops),branchBStops:b(o,t.diagram.branchBStops)}),[o,t.diagram]);return n(ft,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}const R=10,v=15,A=24,y=1;class St extends O{_onRenderStructure(){const{loopLeftStops:o,loopRightStops:i,mainStops:s}=this.data.structure,{x:e,y:r}=this._measure();if(o.length>0?this._renderSection({stops:o,x:e.loopLeft,yLevels:r.loopLeft.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:"left"}):this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.top-y),a.lineTo(e.loopLeft,r.loopLeft.bottom+y)}),i.length>0?this._renderSection({stops:i,x:e.loopRight,yLevels:r.loopRight.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:"right"}):this._drawLine(a=>{a.moveTo(e.loopRight,r.loopRight.top-y),a.lineTo(e.loopRight,r.loopRight.bottom+y)}),s.length>0){const a=c(r.main.top);this._renderSection({stops:s,x:e.main,yLevels:r.main.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"right"}),this._drawLine(l=>{l.moveTo(e.main,a),l.lineTo(e.main,a-R),l.bezierCurveTo(e.main,a-v-R,e.loopLeft,r.loop.bottom+v,e.loopLeft,r.loop.bottom),l.lineTo(e.loopLeft,r.loopLeft.bottom),l.moveTo(e.main,a-R),l.bezierCurveTo(e.main,a-v-R,e.loopRight,r.loop.bottom+v,e.loopRight,r.loop.bottom),l.lineTo(e.loopRight,r.loopRight.bottom)}),this.ctx.stroke()}else this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.bottom),a.lineTo(e.loopLeft,r.loop.bottom),a.bezierCurveTo(e.loopLeft,r.loop.bottom+A,e.loopRight,r.loop.bottom+A,e.loopRight,r.loop.bottom),a.lineTo(e.loopRight,r.loopRight.bottom)});this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.top),a.lineTo(e.loopLeft,r.loop.top),a.bezierCurveTo(e.loopLeft,r.loop.top-A,e.loopRight,r.loop.top-A,e.loopRight,r.loop.top),a.lineTo(e.loopRight,r.loopRight.top)})}_measure(){const{loopLeftStops:o,loopRightStops:i,mainStops:s}=this.data.structure,e=this._extractYLevels(o,W),r=this._extractYLevels(i,Z),a=this._extractYLevels(s,G),l=e[0],m=r[0],p=e[e.length-1],u=r[r.length-1],C=c(l??m),S=c(m??l),Y=c(p??u),M=c(u??p);return{x:{loopLeft:T/2,loopRight:this.width-T/2,main:this.width/2},y:{loopLeft:{all:e,top:C,bottom:Y},loopRight:{all:r,top:S,bottom:M},main:{all:a,top:a[0]??null,bottom:a[a.length-1]??null},loop:{top:Math.min(C,S),bottom:Math.max(Y,M)}}}}}const G="_diagram-main-stops",W="_diagram-loop-left-stops",Z="_diagram-loop-right-stops";function bt(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((a,l)=>new St(a,l),[]),{loopLeftStops:e,loopRightStops:r}=i.structure;return e.length+r.length<1?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-x-4"),children:[n(E,{class:"w-12 col-2 row-span-full",createController:s,data:i}),n(d,{class:h("gap-6 col-1 row-1 py-4",W),xAlign:"right",yAlign:"center",children:t.structure.loopLeftStops.map(a=>n(g,{children:a.content}))}),n(d,{class:h("gap-6 col-3 row-1 py-4",Z),xAlign:"left",yAlign:"center",children:t.structure.loopRightStops.map(a=>n(g,{children:a.content}))}),n(d,{class:h("gap-6 col-3 row-2 -ml-4",G,{"pt-4":t.structure.mainStops.length>0}),xAlign:"left",children:t.structure.mainStops.map(a=>n(g,{children:a.content}))})]})}function Tt(t){const{foda:o}=L(),i=_(()=>({type:"loop",loopLeftStops:b(o,t.diagram.loopLeftStops),loopRightStops:b(o,t.diagram.loopRightStops),mainStops:b(o,t.diagram.mainStops)}),[o,t.diagram]);return n(bt,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}function j(t){return n(g,{class:h(t.class,"bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border"),children:n(Lt,{diagram:t.diagram})})}function Lt(t){if(t.diagram.type==="linear")return n(pt,{diagram:t.diagram});if(t.diagram.type==="branch")return n(Ct,{diagram:t.diagram});if(t.diagram.type==="loop")return n(Tt,{diagram:t.diagram});F(t.diagram)}function xt(t){const o=t.diagram.entries.filter(i=>J(i.type));return o.length<t.diagram.entries.length?n(lt,{fallbackStopList:t.diagram.fallbackStopList}):n(d,{class:h(t.class,"gap-6"),children:[n(f,{style:"subtitle",children:"Diagram"}),o.length===1?n(j,{diagram:c(o[0])}):n(wt,{entries:o},o.length)]})}function wt(t){const[o,i]=I(0),s=_(()=>t.entries.map((e,r)=>({value:r.toFixed(),label:e.name??`Route ${r+1}`})),[t.entries]);return n(d,{class:"gap-4",children:[n(it,{class:"self-start",value:o.toFixed(),options:s,onChange:e=>{i(at(e))}}),n(j,{diagram:c(t.entries[o])})]})}function Ot(){const{params:{id:t}}=Q(),{foda:o}=L(),i=_(()=>o.lines.getByUrlPath(t??""),[o.lines,t]);return i===null?n(ot,{afterConfirming:"foundational-data-version"}):n(Rt,{line:i})}function Rt(t){const{formatLine:o}=X();return n(tt,{...et({title:o(t.line.name)}),children:n(d,{class:"px-4 py-8 gap-8",children:t.line.diagram.entries.length>0&&n(xt,{diagram:t.line.diagram})})})}export{Ot as default};
1
+ import{a as L,u as K,j as _,d as n,T as f,C as d,e as h,A as P,m as I,y as N,n as c,k,q as B,G as g,o as J,l as Q,p as X}from"./index-D1BLZ3NL.js";import{P as tt}from"./Page-DzdIp_Wd.js";import{u as et}from"./use-simple-headers-BVRJayjK.js";import{N as ot}from"./NotFoundPage-DJ5EsFv_.js";import{L as H}from"./LinkText-CvJA45KQ.js";import{A as rt,M as nt}from"./Alert-DQo_9hou.js";import{P as it}from"./Picker-BQbgll08.js";function F(t){throw new Error(`Unexpected value: ${String(t)}`)}function at(t){if(!/^-?[0-9]+$/g.test(t))throw st(t);return parseInt(t,10)}const st=t=>new Error(`"${t}" is not an integer.`);function lt(t){const{foda:o}=L(),{appName:i}=K(),s=_(()=>t.fallbackStopList.map(e=>o.stops.require(e)).sort((e,r)=>e.name.localeCompare(r.name)),[o.stops,t.fallbackStopList]);return n(d,{class:h(t.class,"gap-6"),children:[n(f,{style:"subtitle",children:"Stops"}),n(rt,{type:"info",children:n(d,{class:"gap-6",children:[n(f,{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."," "]}),n(f,{style:"strong",children:n(H,{href:"/debug",children:"Help me update"})})]})}),n("ul",{class:"flex-col flex list-disc list-inside gap-4",children:s.map(e=>n(f,{children:n("li",{children:n(H,{href:`/stop/${e.urlPath}`,children:e.name})})}))})]})}class ct{constructor(o,i){this._canvasContainer=o,this._canvas=i;const s=this._canvas.getContext("2d");if(s==null)throw new Error("Failed to get 2D rendering context.");this.ctx=s,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(o){this._data=o,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 o=this._canvasContainer.getBoundingClientRect();this._width=o.width,this._height=o.height;const i=window.devicePixelRatio??1,s=this.ctx.backingStorePixelRatio??1;this._dpiRatio=i/s,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 E(t){const{data:o,createController:i}=t,s=P(null),e=P(null),[r,a]=I(null),l=t.interceptTouches??!1?{touchAction:"none"}:void 0;return N(()=>{if(s.current==null||e.current==null)return;const m=i(s.current,e.current);return a(m),()=>{m?.destroy()}},[i]),N(()=>{r?.setData(o)},[r,o]),n("div",{ref:s,className:h(t.class,"relative overflow-hidden"),children:n("canvas",{className:"absolute top-0 left-0",ref:e,style:l})})}function ht(){const t=window.getComputedStyle(document.body);return{bg:t.getPropertyValue("--color-bg"),fg:t.getPropertyValue("--color-fg"),"fg-strong":t.getPropertyValue("--color-fg-strong"),"fg-weak":t.getPropertyValue("--color-fg-weak")}}const T=16,dt=6,mt=6,z=1;class O extends ct{_css;_prefersDark;constructor(o,i){super(o,i),this._css=ht(),this._prefersDark=window.matchMedia("(prefers-color-scheme: dark)").matches}onRender(){this.ctx.strokeStyle="#000000",this._onRenderStructure(),this.ctx.globalCompositeOperation="source-in",this.ctx.fillStyle=this._getDiagramColor(),this.ctx.fillRect(0,0,this.width,this.height)}_renderSection({stops:o,x:i,yLevels:s,terminatesAtTop:e,terminatesAtBottom:r,notchSide:a}){if(o.length<1)throw new Error("Expecting at least one stop.");if(o.length!==s.length)throw new Error("Bad length.");const l=c(s[0]),m=c(s[s.length-1]);this._drawLine(p=>{p.moveTo(i,l-z),p.lineTo(i,m+z)}),o.forEach((p,u)=>{const C=c(s[u]),S=u===0&&e||u===o.length-1&&r;(p.drawMark??!0)&&this._drawMark(i,C,S,a)})}_drawLine(o){this.ctx.lineWidth=mt,this.ctx.beginPath(),o(this.ctx),this.ctx.stroke()}_drawMark(o,i,s,e){const r={left:-1,right:1}[e];this.ctx.lineWidth=dt,this.ctx.beginPath(),this.ctx.moveTo(s?o-T/2*r:o,i),this.ctx.lineTo(o+T/2*r,i),this.ctx.stroke()}_extractYLevels(o,i){const s=this._extractChildElements(i);if(o.length!==s.length)throw new Error("Bad length.");return o.map((e,r)=>{const a=c(s[r]);return e.getOverriddenMarkYPosition!=null?e.getOverriddenMarkYPosition(a):this._getDefaultMarkYPosition(a)})}_extractChildElements(o){const i=this._canvasContainer.parentElement?.querySelector(`.${o}`);if(i==null)throw new Error(`Couldn't find "${o}".`);return Array.from(i.childNodes.values()).filter(s=>s instanceof HTMLElement)}_getDefaultMarkYPosition(o){const i=this._canvasContainer.getBoundingClientRect(),s=o.getBoundingClientRect();return s.top-i.top+s.height/2}_getDiagramColor(){const o={dark:"darkThemeColorHexCode",light:"lightThemeColorHexCode",auto:this._prefersDark?"darkThemeColorHexCode":"lightThemeColorHexCode"}[this.data.colorTheme];return this.data[o]??this._css.fg}}class ut extends O{_onRenderStructure(){const o=this.data.structure;this._renderSection({stops:o.stops,x:this.width/2,yLevels:this._extractYLevels(o.stops,$),terminatesAtTop:!0,terminatesAtBottom:!0,notchSide:"right"})}}function D(t){return n(d,{class:h(t.class,"gap-2"),xAlign:"center",children:[n(nt,{class:"text-icon-xl text-fg"}),n(f,{align:"center",children:"An error occurred rendering this diagram."})]})}const $="_diagram-stops";function gt(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((e,r)=>new ut(e,r),[]);return i.structure.stops.length<2?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_1fr] gap-4"),children:[n(E,{class:"w-4",createController:s,data:i}),n(d,{class:h("gap-6",$),children:t.structure.stops.map(e=>n(g,{children:e.content}))})]})}function b(t,o){return o.map(i=>{const s=t.stops.require(i.stopId),e=`/stop/${s.urlPath}`;if(i.type==="regular")return{content:n(f,{style:"strong",children:n(H,{href:e,style:"subtle",children:s.name})})};if(i.type==="always-express")return{content:n(f,{style:"small-weak",children:n(H,{href:e,style:"subtle",children:["Skips ",s.name]})}),drawMark:!1};F(i.type)})}function pt(t){const{foda:o}=L(),i=_(()=>({type:"linear",stops:b(o,t.diagram.stops)}),[o,t.diagram.stops]);return n(gt,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}const x=10,w=15;class _t extends O{_onRenderStructure(){const{commonStops:o,branchAStops:i,branchBStops:s}=this.data.structure,{x:e,y:r}=this._measure();this._renderSection({stops:o,x:e.common,yLevels:r.common.all,terminatesAtTop:!0,terminatesAtBottom:!1,notchSide:"right"}),this._renderSection({stops:i,x:e.branchA,yLevels:r.branchA.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"left"}),this._renderSection({stops:s,x:e.branchB,yLevels:r.branchB.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"right"}),this._drawLine(a=>{a.moveTo(e.common,r.common.bottom),a.lineTo(e.common,r.common.bottom+x),a.bezierCurveTo(e.common,r.common.bottom+w+x,e.branchA,r.branches.top-w,e.branchA,r.branches.top),a.lineTo(e.branchA,r.branchA.top),a.moveTo(e.common,r.common.bottom+x),a.bezierCurveTo(e.common,r.common.bottom+w+x,e.branchB,r.branches.top-w,e.branchB,r.branches.top),a.lineTo(e.branchB,r.branchA.top)})}_measure(){const{commonStops:o,branchAStops:i,branchBStops:s}=this.data.structure,e=this._extractYLevels(o,U),r=c(e[0]),a=c(e[e.length-1]),l=this._extractYLevels(i,V),m=c(l[0]),p=c(l[l.length-1]),u=this._extractYLevels(s,q),C=c(u[0]),S=c(u[u.length-1]);return{x:{common:this.width/2,branchA:T/2,branchB:this.width-T/2},y:{common:{all:e,top:r,bottom:a},branchA:{all:l,top:m,bottom:p},branchB:{all:u,top:C,bottom:S},branches:{top:Math.min(m,C),bottom:Math.max(p,S)}}}}}const U="_diagram-common-stops",V="_diagram-branch-a-stops",q="_diagram-branch-b-stops";function ft(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((e,r)=>new _t(e,r),[]);return i.structure.commonStops.length<1||i.structure.branchAStops.length<1||i.structure.branchBStops.length<1?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-y-8 gap-x-4"),children:[n(E,{class:"w-12 col-2 row-span-full",createController:s,data:i}),n(d,{class:h("gap-6 col-3 row-1 -ml-4",U),xAlign:"left",children:t.structure.commonStops.map(e=>n(g,{children:e.content}))}),n(d,{class:h("gap-6 col-1 row-2",V),xAlign:"right",children:t.structure.branchAStops.map(e=>n(g,{children:e.content}))}),n(d,{class:h("gap-6 col-3 row-2",q),xAlign:"left",children:t.structure.branchBStops.map(e=>n(g,{children:e.content}))})]})}function Ct(t){const{foda:o}=L(),i=_(()=>({type:"branch",commonStops:b(o,t.diagram.commonStops),branchAStops:b(o,t.diagram.branchAStops),branchBStops:b(o,t.diagram.branchBStops)}),[o,t.diagram]);return n(ft,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}const R=10,v=15,A=24,y=1;class St extends O{_onRenderStructure(){const{loopLeftStops:o,loopRightStops:i,mainStops:s}=this.data.structure,{x:e,y:r}=this._measure();if(o.length>0?this._renderSection({stops:o,x:e.loopLeft,yLevels:r.loopLeft.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:"left"}):this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.top-y),a.lineTo(e.loopLeft,r.loopLeft.bottom+y)}),i.length>0?this._renderSection({stops:i,x:e.loopRight,yLevels:r.loopRight.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:"right"}):this._drawLine(a=>{a.moveTo(e.loopRight,r.loopRight.top-y),a.lineTo(e.loopRight,r.loopRight.bottom+y)}),s.length>0){const a=c(r.main.top);this._renderSection({stops:s,x:e.main,yLevels:r.main.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:"right"}),this._drawLine(l=>{l.moveTo(e.main,a),l.lineTo(e.main,a-R),l.bezierCurveTo(e.main,a-v-R,e.loopLeft,r.loop.bottom+v,e.loopLeft,r.loop.bottom),l.lineTo(e.loopLeft,r.loopLeft.bottom),l.moveTo(e.main,a-R),l.bezierCurveTo(e.main,a-v-R,e.loopRight,r.loop.bottom+v,e.loopRight,r.loop.bottom),l.lineTo(e.loopRight,r.loopRight.bottom)}),this.ctx.stroke()}else this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.bottom),a.lineTo(e.loopLeft,r.loop.bottom),a.bezierCurveTo(e.loopLeft,r.loop.bottom+A,e.loopRight,r.loop.bottom+A,e.loopRight,r.loop.bottom),a.lineTo(e.loopRight,r.loopRight.bottom)});this._drawLine(a=>{a.moveTo(e.loopLeft,r.loopLeft.top),a.lineTo(e.loopLeft,r.loop.top),a.bezierCurveTo(e.loopLeft,r.loop.top-A,e.loopRight,r.loop.top-A,e.loopRight,r.loop.top),a.lineTo(e.loopRight,r.loopRight.top)})}_measure(){const{loopLeftStops:o,loopRightStops:i,mainStops:s}=this.data.structure,e=this._extractYLevels(o,W),r=this._extractYLevels(i,Z),a=this._extractYLevels(s,G),l=e[0],m=r[0],p=e[e.length-1],u=r[r.length-1],C=c(l??m),S=c(m??l),Y=c(p??u),M=c(u??p);return{x:{loopLeft:T/2,loopRight:this.width-T/2,main:this.width/2},y:{loopLeft:{all:e,top:C,bottom:Y},loopRight:{all:r,top:S,bottom:M},main:{all:a,top:a[0]??null,bottom:a[a.length-1]??null},loop:{top:Math.min(C,S),bottom:Math.max(Y,M)}}}}}const G="_diagram-main-stops",W="_diagram-loop-left-stops",Z="_diagram-loop-right-stops";function bt(t){const{settings:o}=k(),i=_(()=>({structure:t.structure,lightThemeColorHexCode:t.lightThemeColorHexCode,darkThemeColorHexCode:t.darkThemeColorHexCode,colorTheme:o.theme}),[t.darkThemeColorHexCode,t.lightThemeColorHexCode,t.structure,o.theme]),s=B((a,l)=>new St(a,l),[]),{loopLeftStops:e,loopRightStops:r}=i.structure;return e.length+r.length<1?n(D,{}):n(g,{class:h(t.class,"grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-x-4"),children:[n(E,{class:"w-12 col-2 row-span-full",createController:s,data:i}),n(d,{class:h("gap-6 col-1 row-1 py-4",W),xAlign:"right",yAlign:"center",children:t.structure.loopLeftStops.map(a=>n(g,{children:a.content}))}),n(d,{class:h("gap-6 col-3 row-1 py-4",Z),xAlign:"left",yAlign:"center",children:t.structure.loopRightStops.map(a=>n(g,{children:a.content}))}),n(d,{class:h("gap-6 col-3 row-2 -ml-4",G,{"pt-4":t.structure.mainStops.length>0}),xAlign:"left",children:t.structure.mainStops.map(a=>n(g,{children:a.content}))})]})}function Tt(t){const{foda:o}=L(),i=_(()=>({type:"loop",loopLeftStops:b(o,t.diagram.loopLeftStops),loopRightStops:b(o,t.diagram.loopRightStops),mainStops:b(o,t.diagram.mainStops)}),[o,t.diagram]);return n(bt,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}function j(t){return n(g,{class:h(t.class,"bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border"),children:n(Lt,{diagram:t.diagram})})}function Lt(t){if(t.diagram.type==="linear")return n(pt,{diagram:t.diagram});if(t.diagram.type==="branch")return n(Ct,{diagram:t.diagram});if(t.diagram.type==="loop")return n(Tt,{diagram:t.diagram});F(t.diagram)}function xt(t){const o=t.diagram.entries.filter(i=>J(i.type));return o.length<t.diagram.entries.length?n(lt,{fallbackStopList:t.diagram.fallbackStopList}):n(d,{class:h(t.class,"gap-6"),children:[n(f,{style:"subtitle",children:"Diagram"}),o.length===1?n(j,{diagram:c(o[0])}):n(wt,{entries:o},o.length)]})}function wt(t){const[o,i]=I(0),s=_(()=>t.entries.map((e,r)=>({value:r.toFixed(),label:e.name??`Route ${r+1}`})),[t.entries]);return n(d,{class:"gap-4",children:[n(it,{class:"self-start",value:o.toFixed(),options:s,onChange:e=>{i(at(e))}}),n(j,{diagram:c(t.entries[o])})]})}function Ot(){const{params:{id:t}}=Q(),{foda:o}=L(),i=_(()=>o.lines.getByUrlPath(t??""),[o.lines,t]);return i===null?n(ot,{afterConfirming:"foundational-data-version"}):n(Rt,{line:i})}function Rt(t){const{formatLine:o}=X();return n(tt,{...et({title:o(t.line.name)}),children:n(d,{class:"px-4 py-8 gap-8",children:t.line.diagram.entries.length>0&&n(xt,{diagram:t.line.diagram})})})}export{Ot as default};
@@ -1 +1 @@
1
- import{e as t,d as n}from"./index-DAObBCDG.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};
1
+ import{e as t,d as n}from"./index-D1BLZ3NL.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};
@@ -1,2 +1,2 @@
1
- import{d as i,S as u,e as d,T as a,j as h,C as k}from"./index-DAObBCDG.js";import{L as p}from"./LinkText-DEVIS-r6.js";import{S as x}from"./Strong-D7PTULU1.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(`
1
+ import{d as i,S as u,e as d,T as a,j as h,C as k}from"./index-D1BLZ3NL.js";import{L as p}from"./LinkText-CvJA45KQ.js";import{S as x}from"./Strong-WlMKIeDs.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
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-D1BLZ3NL.js";import{P as l}from"./Page-DzdIp_Wd.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-D1BLZ3NL.js";import{N as r}from"./NotFoundPage-DJ5EsFv_.js";import"./Page-DzdIp_Wd.js";function f(){return o(r,{afterConfirming:"frontend-version"})}export{f as default};
@@ -1 +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,v as B,F as L,d as n,C as p,L as S,T as m,B as T,w as E,z as I}from"./index-DAObBCDG.js";import{P as y}from"./Page-CU2ljT5t.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};
1
+ import{h as F,u as H,f as A,a as D,b,i as k,m as P,y as g,v as B,F as L,d as n,C as p,L as S,T as m,B as T,w as E,z as I}from"./index-D1BLZ3NL.js";import{P as y}from"./Page-DzdIp_Wd.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};
@@ -1 +1 @@
1
- import{d,e as r,G as n,D as a,P as i}from"./index-DAObBCDG.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};
1
+ import{d,e as r,G as n,D as a,P as i}from"./index-D1BLZ3NL.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};
@@ -1 +1 @@
1
- import{d as c,e as a,R as t,T as o,s as r}from"./index-DAObBCDG.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};
1
+ import{d as c,e as a,R as t,T as o,s as r}from"./index-D1BLZ3NL.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};
@@ -1 +1 @@
1
- import{d as l,e as a}from"./index-DAObBCDG.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};
1
+ import{d as l,e as a}from"./index-D1BLZ3NL.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};
@@ -1 +1 @@
1
- import{k as n,d as e,t as c,C as o,T as t}from"./index-DAObBCDG.js";import{P as m}from"./Picker-CWKqRwiO.js";import{P as u}from"./Page-CU2ljT5t.js";import{u as h}from"./use-simple-headers-C1tKvNnG.js";import{D as d}from"./Divider-gld0_leQ.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};
1
+ import{k as n,d as e,t as c,C as o,T as t}from"./index-D1BLZ3NL.js";import{P as m}from"./Picker-BQbgll08.js";import{P as u}from"./Page-DzdIp_Wd.js";import{u as h}from"./use-simple-headers-BVRJayjK.js";import{D as d}from"./Divider-CzgO05rh.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-D1BLZ3NL.js";import{P as r}from"./Page-DzdIp_Wd.js";import{u as s}from"./use-simple-headers-BVRJayjK.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};
@@ -1 +1 @@
1
- import{l as u,a as r,j as l,d as o,C as c,T as f}from"./index-DAObBCDG.js";import{P as p}from"./Page-CU2ljT5t.js";import{u as d}from"./use-simple-headers-C1tKvNnG.js";import{N as m}from"./NotFoundPage-fCz3glss.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
+ import{l as u,a as r,j as l,d as o,C as c,T as f}from"./index-D1BLZ3NL.js";import{P as p}from"./Page-DzdIp_Wd.js";import{u as d}from"./use-simple-headers-BVRJayjK.js";import{N as m}from"./NotFoundPage-DJ5EsFv_.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-DAObBCDG.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-D1BLZ3NL.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-D1BLZ3NL.js";import{P as a}from"./Page-DzdIp_Wd.js";import{u as i}from"./use-simple-headers-BVRJayjK.js";import{S as r}from"./Strong-WlMKIeDs.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};