corequery 0.32.1 → 0.33.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 (42) hide show
  1. package/package.json +5 -5
  2. package/server/dist/server/api/handlers/departures/v0/index.js +5 -4
  3. package/server/dist/server/api/handlers/departures/v0/index.js.map +1 -1
  4. package/server/dist/server/api/handlers/departures/v0/to-api-result.d.ts +1 -1
  5. package/server/dist/server/api/handlers/departures/v0/to-api-result.js +29 -8
  6. package/server/dist/server/api/handlers/departures/v0/to-api-result.js.map +1 -1
  7. package/server/dist/server/config/types/get-canonical-lines-serving-stop-config.d.ts +2 -1
  8. package/server/dist/server/config/types/get-default-departure-feeds-for-stop-config.d.ts +2 -1
  9. package/server/dist/server/config/types/get-filters-for-stop-config.d.ts +2 -1
  10. package/server/dist/server/data/stop/stop-collection.js +1 -1
  11. package/server/dist/server/data/stop/stop-collection.js.map +1 -1
  12. package/server/dist/server/data/stop/stop.d.ts +2 -2
  13. package/server/dist/server/data/stop/stop.js +6 -2
  14. package/server/dist/server/data/stop/stop.js.map +1 -1
  15. package/server/dist/server/data/tags.d.ts +1 -0
  16. package/server/dist/server/data/tags.js +1 -0
  17. package/server/dist/server/data/tags.js.map +1 -1
  18. package/server/dist/server/web-server/index-html-preparer.js +11 -5
  19. package/server/dist/server/web-server/index-html-preparer.js.map +1 -1
  20. package/web/dist/assets/{About-BdSlO-kD.js → About-BUHOPQcu.js} +1 -1
  21. package/web/dist/assets/{AdminControls-DJo59RGN.js → AdminControls-CHryNpn4.js} +1 -1
  22. package/web/dist/assets/{Alert-SQhECZag.js → Alert-B1bEDR3t.js} +1 -1
  23. package/web/dist/assets/{Debug-5P9iSK2l.js → Debug-C82KdgDu.js} +1 -1
  24. package/web/dist/assets/{Home-hrGQ5RvQ.js → Home-BE8Ov5RO.js} +1 -1
  25. package/web/dist/assets/Line-CYTWM3jD.js +1 -0
  26. package/web/dist/assets/NotFound-CEJ64l5x.js +1 -0
  27. package/web/dist/assets/{NotFoundPage-qJ2To3wC.js → NotFoundPage-B17fzPr9.js} +1 -1
  28. package/web/dist/assets/{Picker-di2TPJNV.js → Picker-DVb1h4gb.js} +1 -1
  29. package/web/dist/assets/{Service-CjcKHFQZ.js → Service-BkIhOzWr.js} +1 -1
  30. package/web/dist/assets/{Settings-Clz1x2Cr.js → Settings-Cz0PRdM4.js} +1 -1
  31. package/web/dist/assets/{SimpleMobileHeaderContent-DJTkr_6C.js → SimpleMobileHeaderContent-Cpqzarjr.js} +1 -1
  32. package/web/dist/assets/{Status-Bw3AMuJH.js → Status-B6JsOy21.js} +1 -1
  33. package/web/dist/assets/Stop-Dia974mX.js +1 -0
  34. package/web/dist/assets/{ZenMode-CXXD5IBd.js → ZenMode-DCn99EM0.js} +1 -1
  35. package/web/dist/assets/{index-DOvczcZF.js → index-CyUttHc8.js} +2 -2
  36. package/web/dist/assets/{linear-BiU4teCm.js → linear-BPbFILtP.js} +1 -1
  37. package/web/dist/assets/{use-simple-headers-DM6VutL0.js → use-simple-headers-DJo4M2YI.js} +1 -1
  38. package/web/dist/index.html +1 -1
  39. package/web/dist/sw.js +1 -1
  40. package/web/dist/assets/Line-ClqpaOxi.js +0 -1
  41. package/web/dist/assets/NotFound-D-nyY3X1.js +0 -1
  42. package/web/dist/assets/Stop-hkgAICn9.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corequery",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "server/dist",
@@ -34,7 +34,9 @@
34
34
  "zod": "^4.6.7"
35
35
  },
36
36
  "devDependencies": {
37
- "@eslint/js": "9.39.5",
37
+ "@eslint-react/eslint-plugin": "5.30.2",
38
+ "@eslint/js": "10.0.1",
39
+ "@stylistic/eslint-plugin": "6.0.0",
38
40
  "@preact/preset-vite": "2.10.6",
39
41
  "@tailwindcss/vite": "4.3.3",
40
42
  "@types/express": "5.0.6",
@@ -42,11 +44,9 @@
42
44
  "@vitest/coverage-v8": "5.0.5",
43
45
  "chalk": "6.0.1",
44
46
  "clsx": "2.1.1",
45
- "eslint": "9.39.5",
47
+ "eslint": "10.15.0",
46
48
  "eslint-config-prettier": "10.1.8",
47
49
  "eslint-plugin-prettier": "5.5.7",
48
- "eslint-plugin-react": "7.37.5",
49
- "eslint-plugin-react-hooks": "7.1.1",
50
50
  "globals": "17.13.0",
51
51
  "knip": "6.41.0",
52
52
  "preact": "11.0.1",
@@ -28,14 +28,15 @@ export async function handle(ctx, args) {
28
28
  continue;
29
29
  if (isSkipped(departure, feed.skips))
30
30
  continue;
31
- resultsSubarray.push(departure);
31
+ // TODO: corequery-gtfs is synchronous here, but future service
32
+ // sources might not be. For that reason, while it doesn't matter
33
+ // right now, doing this in series is not ideal.
34
+ resultsSubarray.push(await toApiResult(ctx.app, departure));
32
35
  }
33
36
  }
34
37
  }
35
38
  return {
36
- feeds: results.map((x) => ({
37
- departures: x.map((y) => toApiResult(ctx.app, y)),
38
- })),
39
+ feeds: results.map((x) => ({ departures: x })),
39
40
  // TODO: I won't forget to use these on the frontend, right?
40
41
  invalidFilterTokens: collectInvalidFilterTokens(compiledFilters),
41
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../api/handlers/departures/v0/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAYnF,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,GAAkC,EAClC,IAAwC;IAExC,OAAO,qBAAqB,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;QAC3C,6CAA6C;QAC7C,qBAAqB,CAAC,I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,KAAK,CAAC,IAAI,CACf,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,OAAO,CAAC,QAAQ;QACzC,CAAC,CAAC,aAAa,KAAK,SAAS,CAAC,OAAO,CAAC,aAAa,CACtD,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { DeparturesV0ApiDeparture } from "./index.js";
2
2
  import type { Corequery } from "../../../../corequery.js";
3
3
  import type { Departure } from "../../../../data/index.js";
4
- export declare function toApiResult<CustomContextType>(app: Corequery<CustomContextType>, departure: Departure): DeparturesV0ApiDeparture;
4
+ export declare function toApiResult<CustomContextType>(app: Corequery<CustomContextType>, departure: Departure): Promise<DeparturesV0ApiDeparture>;
@@ -1,15 +1,11 @@
1
- export function toApiResult(app, departure) {
1
+ export async function toApiResult(app, departure) {
2
2
  const { service, movement } = departure;
3
- const terminusName = app.stops.require(service.termination.stopId).name;
3
+ const destinationTexts = await computeDestinationTexts(app, service);
4
4
  return {
5
5
  sourceId: service.sourceId,
6
6
  intrasourceId: service.intrasourceId,
7
- // TODO: Crawl the connections until either the chain ends, or we find a
8
- // servicing movement at a stop which was already serviced. Once we find
9
- // that repeated servicing movement, we use the previous servicing movement
10
- // as the "destination".
11
- primaryDestinationText: terminusName,
12
- secondaryDestinationText: null,
7
+ primaryDestinationText: destinationTexts.primary,
8
+ secondaryDestinationText: destinationTexts.secondary,
13
9
  lineIds: service.lineIds,
14
10
  color: service.getColorHexCodes(),
15
11
  isCancelled: service.isCancelled,
@@ -21,4 +17,29 @@ export function toApiResult(app, departure) {
21
17
  },
22
18
  };
23
19
  }
20
+ async function computeDestinationTexts(app, service) {
21
+ const myTerminus = app.stops.require(service.termination.stopId).name;
22
+ const nextService = await getNextServiceIfApplicable(app, service);
23
+ if (nextService == null) {
24
+ return { primary: myTerminus, secondary: null };
25
+ }
26
+ // TODO: Crawl the connections until either the chain ends, or we find a
27
+ // servicing movement at a stop which was already serviced. Once we find
28
+ // that repeated servicing movement, we use the previous servicing movement
29
+ // as the "destination".
30
+ const nextTerminus = app.stops.require(nextService.termination.stopId).name;
31
+ return {
32
+ primary: nextTerminus,
33
+ secondary: `via ${myTerminus}`,
34
+ };
35
+ }
36
+ async function getNextServiceIfApplicable(app, service) {
37
+ if (service.nextServiceOfEntireVehicle == null)
38
+ return null;
39
+ const connection = service.nextServiceOfEntireVehicle;
40
+ const sourceId = connection.direction;
41
+ const intrasourceId = connection.otherServiceIntrasourceId;
42
+ const other = await app.services.requireService(sourceId, intrasourceId);
43
+ return other.isCancelled ? null : other;
44
+ }
24
45
  //# sourceMappingURL=to-api-result.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-api-result.js","sourceRoot":"","sources":["../../../../../../api/handlers/departures/v0/to-api-result.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CACzB,GAAiC,EACjC,SAAoB;IAEpB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IACxC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IAExE,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,aAAa,EAAE,OAAO,CAAC,aAAa;QAEpC,wEAAwE;QACxE,wEAAwE;QACxE,2EAA2E;QAC3E,wBAAwB;QACxB,sBAAsB,EAAE,YAAY;QACpC,wBAAwB,EAAE,IAAI;QAE9B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,gBAAgB,EAAE;QAEjC,WAAW,EAAE,OAAO,CAAC,WAAW;QAEhC,QAAQ,EAAE;YACR,KAAK,EAAE,SAAS,CAAC,aAAa;YAC9B,UAAU,EAAE,QAAQ,CAAC,iBAAiB;YACtC,IAAI,EAAE,QAAQ,CAAC,iCAAiC,CAAC,QAAQ,EAAE;YAE3D,UAAU,EACR,QAAQ,C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,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAClD,CAAC;IAED,wEAAwE;IACxE,wEAAwE;IACxE,2EAA2E;IAC3E,wBAAwB;IACxB,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE,OAAO,UAAU,EAAE;KAC/B,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,0BAA0B,CACvC,GAAiC,EACjC,OAA6B;IAE7B,IAAI,OAAO,CAAC,0BAA0B,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAE5D,MAAM,UAAU,GAAG,OAAO,CAAC,0BAA0B,CAAC;IACtD,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC;IACtC,MAAM,aAAa,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACzE,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1C,CAAC"}
@@ -1 +1,2 @@
1
- export type GetCanonicalLinesServingStopConfig = (stopId: number) => readonly number[];
1
+ import type { Tags } from "../../data/tags.js";
2
+ export type GetCanonicalLinesServingStopConfig = (stopId: number, stopTags: Tags) => readonly number[];
@@ -1,4 +1,5 @@
1
- export type GetDefaultDepartureFeedsForStopConfig = (stopId: number) => StopDefaultDepartureFeedsConfig;
1
+ import type { Tags } from "../../data/tags.js";
2
+ export type GetDefaultDepartureFeedsForStopConfig = (stopId: number, stopTags: Tags) => StopDefaultDepartureFeedsConfig;
2
3
  export type StopDefaultDepartureFeedsConfig = readonly StopDefaultDepartureFeedConfig[];
3
4
  export type StopDefaultDepartureFeedConfig = {
4
5
  readonly name: string;
@@ -1,4 +1,5 @@
1
- export type GetDepartureFiltersForStopConfig = (stopId: number) => StopDepartureFiltersConfig;
1
+ import type { Tags } from "../../data/tags.js";
2
+ export type GetDepartureFiltersForStopConfig = (stopId: number, stopTags: Tags) => StopDepartureFiltersConfig;
2
3
  export type StopDepartureFiltersConfig = {
3
4
  readonly lines: "off" | "canonical" | readonly number[];
4
5
  readonly positions: "off" | "all" | readonly number[];
@@ -2,7 +2,7 @@ import { Collection } from "../../../shared/data/collection.js";
2
2
  import { Stop } from "./stop.js";
3
3
  export class StopCollection extends Collection {
4
4
  static build(stops, stopTagSuccession, getCanonicalLinesServingStop, getDepartureFiltersForStop, getDefaultDepartureFeedsForStop) {
5
- return new StopCollection(stops.map((s) => Stop.build(s, stopTagSuccession, getCanonicalLinesServingStop(s.id), getDepartureFiltersForStop(s.id), getDefaultDepartureFeedsForStop(s.id))));
5
+ return new StopCollection(stops.map((s) => Stop.build(s, stopTagSuccession, getCanonicalLinesServingStop, getDepartureFiltersForStop, getDefaultDepartureFeedsForStop)));
6
6
  }
7
7
  _getID(item) {
8
8
  return item.id;
@@ -1 +1 @@
1
- {"version":3,"file":"stop-collection.js","sourceRoot":"","sources":["../../../../data/stop/stop-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AASlD,MAAM,OAAO,cAAe,SAAQ,UAAwB;IAC1D,MAAM,CAAC,KAAK,CACV,KAA4B,EAC5B,iBAAsC,EACtC,4BAAgE,EAChE,0BAA4D,EAC5D,+BAAsE;QAEtE,OAAO,IAAI,cAAc,CACvB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,IAAI,CAAC,KAAK,CACR,CAAC,EACD,iBAAiB,EACjB,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC,EAClC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,EAChC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC,CACtC,CACF,CACF,CAAC;IACJ,CAAC;IAES,MAAM,CAAC,IAAU;QACzB,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAES,oBAAoB,CAAC,EAAU;QACvC,OAAO,IAAI,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC;IAES,sBAAsB;QAC9B,OAAO,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACxC,CAAC;CACF"}
1
+ {"version":3,"file":"stop-collection.js","sourceRoot":"","sources":["../../../../data/stop/stop-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AASlD,MAAM,OAAO,cAAe,SAAQ,UAAwB;IAC1D,MAAM,CAAC,KAAK,CACV,KAA4B,EAC5B,iBAAsC,EACtC,4BAAgE,EAChE,0BAA4D,EAC5D,+BAAsE;QAEtE,OAAO,IAAI,cAAc,CACvB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,IAAI,CAAC,KAAK,CACR,CAAC,EACD,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,CAChC,CACF,CACF,CAAC;IACJ,CAAC;IAES,MAAM,CAAC,IAAU;QACzB,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAES,oBAAoB,CAAC,EAAU;QACvC,OAAO,IAAI,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC;IAES,sBAAsB;QAC9B,OAAO,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACxC,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import type { StopDefaultDepartureFeedsConfig, StopDepartureFiltersConfig, StopConfig, TagSuccessionConfig } from "../../config/index.js";
1
+ import type { StopConfig, TagSuccessionConfig, GetCanonicalLinesServingStopConfig, GetDepartureFiltersForStopConfig, GetDefaultDepartureFeedsForStopConfig } from "../../config/index.js";
2
2
  import { Tags } from "../tags.js";
3
3
  import { Location } from "../location.js";
4
4
  import { StopDefaultDepartureFeed } from "./stop-default-departure-feed.js";
@@ -26,7 +26,7 @@ export declare class Stop {
26
26
  readonly departureFilters: StopDepartureFilters;
27
27
  readonly defaultDepartureFeeds: readonly StopDefaultDepartureFeed[];
28
28
  constructor(fields: StopFields);
29
- static build(stopConfig: StopConfig, stopTagSuccession: TagSuccessionConfig, canonicalLinesServingStop: readonly number[], departureFilters: StopDepartureFiltersConfig, defaultDepartureFeeds: StopDefaultDepartureFeedsConfig): Stop;
29
+ static build(stopConfig: StopConfig, stopTagSuccession: TagSuccessionConfig, getCanonicalLinesServingStop: GetCanonicalLinesServingStopConfig, getDepartureFiltersForStop: GetDepartureFiltersForStopConfig, getDefaultDepartureFeedsForStop: GetDefaultDepartureFeedsForStopConfig): Stop;
30
30
  with(newValues: Partial<StopFields>): Stop;
31
31
  /** e.g. `"Sandringham" (#1)` */
32
32
  get debugName(): string;
@@ -24,11 +24,15 @@ export class Stop {
24
24
  this.departureFilters = fields.departureFilters;
25
25
  this.defaultDepartureFeeds = fields.defaultDepartureFeeds;
26
26
  }
27
- static build(stopConfig, stopTagSuccession, canonicalLinesServingStop, departureFilters, defaultDepartureFeeds) {
27
+ static build(stopConfig, stopTagSuccession, getCanonicalLinesServingStop, getDepartureFiltersForStop, getDefaultDepartureFeedsForStop) {
28
+ const positions = StopPosition.buildAll(stopConfig.positions);
29
+ const tags = Tags.build(stopConfig.tags, stopTagSuccession);
30
+ const canonicalLinesServingStop = getCanonicalLinesServingStop(stopConfig.id, tags);
31
+ const departureFilters = getDepartureFiltersForStop(stopConfig.id, tags);
32
+ const defaultDepartureFeeds = getDefaultDepartureFeedsForStop(stopConfig.id, tags);
28
33
  if (defaultDepartureFeeds.length === 0) {
29
34
  throw new Error(`Stop #${stopConfig.id} has no default departure feeds.`);
30
35
  }
31
- const positions = StopPosition.buildAll(stopConfig.positions);
32
36
  return new Stop({
33
37
  id: stopConfig.id,
34
38
  name: stopConfig.name,
@@ -1 +1 @@
1
- {"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../../data/stop/stop.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAenE,MAAM,OAAO,IAAI;IACN,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAO;IACX,OAAO,CAAS;IAChB,QAAQ,CAAkB;IAC1B,SAAS,CAA0B;IAEnC,yBAAyB,CAAoB;IAC7C,gBAAgB,CAAuB;IACvC,qBAAqB,CAAsC;IAEpE,YAAY,MAAkB;QAC5B,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAElC,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;QAClE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAChD,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,KAAK,CACV,UAAsB,EACtB,iBAA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,GAAG,0BAA0B,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAEzE,MAAM,qBAAqB,GAAG,+BAA+B,CAC3D,UAAU,CAAC,EAAE,EACb,IAAI,CACL,CAAC;QACF,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,SAAS,UAAU,CAAC,EAAE,kCAAkC,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,IAAI,IAAI,CAAC;YACd,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,iBAAiB,CAAC;YACpD,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC;YACtD,SAAS,EAAE,SAAS;YAEpB,yBAAyB;YACzB,gBAAgB,EAAE,oBAAoB,CAAC,KAAK,CAC1C,gBAAgB,EAChB,yBAAyB,EACzB,SAAS,CACV;YACD,qBAAqB,EAAE,wBAAwB,CAAC,QAAQ,CACtD,qBAAqB,CACtB;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,SAA8B;QACjC,OAAO,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,gCAAgC;IAChC,IAAI,SAAS;QACX,OAAO,IAAI,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE,GAAG,CAAC;IACxC,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
1
  import type { TagSuccessionConfig } from "../config/index.js";
2
2
  export declare class Tags {
3
3
  private readonly _tags;
4
+ static readonly EMPTY: Tags;
4
5
  constructor(_tags: Set<number>);
5
6
  has(tag: number): boolean;
6
7
  all(): readonly number[];
@@ -1,5 +1,6 @@
1
1
  export class Tags {
2
2
  _tags;
3
+ static EMPTY = new Tags(new Set());
3
4
  constructor(_tags) {
4
5
  this._tags = _tags;
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../data/tags.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,IAAI;IACc;IAA7B,YAA6B,KAAkB;QAAlB,UAAK,GAAL,KAAK,CAAa;IAAG,CAAC;IAEnD,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,GAAG;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CACV,YAA+B,EAC/B,mBAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,YAAY,CAAC,CAAC;QAE3C,IAAI,QAAQ,GAAG,IAAI,CAAC;QACpB,OAAO,QAAQ,EAAE,CAAC;YAChB,QAAQ,GAAG,KAAK,CAAC;YACjB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,aAAa,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBACrD,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;oBACpC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;wBACvB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBAClB,QAAQ,GAAG,IAAI,CAAC;oBAClB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACF"}
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../data/tags.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,IAAI;IAGc;IAF7B,MAAM,CAAU,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAE5C,YAA6B,KAAkB;QAAlB,UAAK,GAAL,KAAK,CAAa;IAAG,CAAC;IAEnD,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,GAAG;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CACV,YAA+B,EAC/B,mBAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,YAAY,CAAC,CAAC;QAE3C,IAAI,QAAQ,GAAG,IAAI,CAAC;QACpB,OAAO,QAAQ,EAAE,CAAC;YAChB,QAAQ,GAAG,KAAK,CAAC;YACjB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,aAAa,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBACrD,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;oBACpC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;wBACvB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBAClB,QAAQ,GAAG,IAAI,CAAC;oBAClB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC"}
@@ -20,11 +20,17 @@ export class IndexHtmlPreparer {
20
20
  tags.title.textContent = this._config.appName;
21
21
  tags.description.setAttribute("content", this._config.description);
22
22
  tags.appName.setAttribute("content", this._config.appName);
23
- if (!partial) {
24
- tags.frontendVersion.setAttribute("content", frontendVersion);
25
- tags.packageVersionOnLastUpdate.setAttribute("content", this._config.corequeryPackageVersion);
26
- tags.serverVersionOnLastUpdate.setAttribute("content", this._config.serverVersion);
27
- }
23
+ // In local development, we often end up rewriting the same `/dist` files
24
+ // multiple times without a rebuild in-between. We don't want the old
25
+ // version values to interfere with the new we calculate, so even though we
26
+ // aren't ready to write these values when `partial = true` (we do that
27
+ // after the hash is calculated), we'll still clear out any old content.
28
+ //
29
+ // In prod we'd be starting from fresh files every time, so this was only an
30
+ // issue in local development.
31
+ tags.frontendVersion.setAttribute("content", partial ? "" : frontendVersion);
32
+ tags.packageVersionOnLastUpdate.setAttribute("content", partial ? "" : this._config.corequeryPackageVersion);
33
+ tags.serverVersionOnLastUpdate.setAttribute("content", partial ? "" : this._config.serverVersion);
28
34
  return tags.indexHtml.toString();
29
35
  }
30
36
  async validate() {
@@ -1 +1 @@
1
- {"version":3,"file":"index-html-preparer.js","sourceRoot":"","sources":["../../../web-server/index-html-preparer.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAUzC,MAAM,OAAO,iBAAiB;IAIT;IACA;IAJnB,MAAM,CAAU,SAAS,GAAG,YAAY,CAAC;IAEzC,YACmB,eAAuB,EACvB,OAAe;QADf,oBAAe,GAAf,eAAe,CAAQ;QACvB,YAAO,GAAP,OAAO,CAAQ;IAC/B,CAAC;IAEJ,KAAK,CAAC,UAAU;QACd,MAAM,GAAG,CAAC,SAAS,CACjB,IAAI,CAAC,aAAa,EAAE,EACpB,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CACxC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,eAAuB;QAC/B,MAAM,GAAG,CAAC,SAAS,CACjB,IAAI,CAAC,aAAa,EAAE,EACpB,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,eAAe,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,OAAgB,EAAE,eAAuB;QAChE,MAAM,IAA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AO;YACL,SAAS;YACT,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;YAC1B,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;YACnD,OAAO,EAAE,UAAU,CAAC,iCAAiC,CAAC;YACtD,eAAe,EAAE,UAAU,CAAC,yCAAyC,CAAC;YACtE,0BAA0B,EAAE,UAAU,CACpC,uDAAuD,CACxD;YACD,yBAAyB,EAAE,UAAU,CACnC,sDAAsD,CACvD;SACF,CAAC;IACJ,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC"}
1
+ {"version":3,"file":"index-html-preparer.js","sourceRoot":"","sources":["../../../web-server/index-html-preparer.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAUzC,MAAM,OAAO,iBAAiB;IAIT;IACA;IAJnB,MAAM,CAAU,SAAS,GAAG,YAAY,CAAC;IAEzC,YACmB,eAAuB,EACvB,OAAe;QADf,oBAAe,GAAf,eAAe,CAAQ;QACvB,YAAO,GAAP,OAAO,CAAQ;IAC/B,CAAC;IAEJ,KAAK,CAAC,UAAU;QACd,MAAM,GAAG,CAAC,SAAS,CACjB,IAAI,CAAC,aAAa,EAAE,EACpB,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CACxC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,eAAuB;QAC/B,MAAM,GAAG,CAAC,SAAS,CACjB,IAAI,CAAC,aAAa,EAAE,EACpB,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,eAAe,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,OAAgB,EAAE,eAAuB;QAChE,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AU,CAAC,QAAgB;YAClC,MAAM,GAAG,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC9C,IAAI,GAAG,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,IAAI,QAAQ,kBAAkB,CAAC,CAAC;YACjE,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO;YACL,SAAS;YACT,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;YAC1B,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;YACnD,OAAO,EAAE,UAAU,CAAC,iCAAiC,CAAC;YACtD,eAAe,EAAE,UAAU,CAAC,yCAAyC,CAAC;YACtE,0BAA0B,EAAE,UAAU,CACpC,uDAAuD,CACxD;YACD,yBAAyB,EAAE,UAAU,CACnC,sDAAsD,CACvD;SACF,CAAC;IACJ,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC"}
@@ -1 +1 @@
1
- import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r}from"./use-api-Ft007Dfs.js";import{n as i}from"./use-foundational-data-BEVQRFj9.js";import{n as a,v as o}from"./index-DOvczcZF.js";import{t as s}from"./Placeholder-BRnxNmKm.js";import{n as c,t as l}from"./Markdown-D5fQv556.js";import{t as u}from"./Page-BMcxP_9m.js";import{t as d}from"./use-simple-headers-DM6VutL0.js";import{t as f}from"./Divider-lz6Cf6K8.js";import{t as p}from"./Alert-SQhECZag.js";function m(){let{appName:m}=o(),{foda:h}=i(),{data:g,loading:_,error:v}=a(r,{}),y=d({title:`About ${m}`});return _?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:[t(s,{class:`w-[30%] text-xl`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[60%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[40%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[20%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[50%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[80%] text-md`})]})}):v!=null||g==null?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:t(p,{type:`error`,children:t(e,{children:`An error occurred while loading the about page.`})})})}):t(u,{...y,children:t(n,{class:`px-4 py-8 gap-12`,children:[t(l,{markdown:g.primaryMarkdown}),t(n,{class:`gap-8`,children:[t(f,{}),t(e,{as:`p`,style:`small-weak`,children:t(c,{markdown:h.footerPrimaryMarkdown})})]})]})})}export{m as default};
1
+ import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r}from"./use-api-Ft007Dfs.js";import{n as i}from"./use-foundational-data-BEVQRFj9.js";import{n as a,v as o}from"./index-CyUttHc8.js";import{t as s}from"./Placeholder-BRnxNmKm.js";import{n as c,t as l}from"./Markdown-D5fQv556.js";import{t as u}from"./Page-BMcxP_9m.js";import{t as d}from"./use-simple-headers-DJo4M2YI.js";import{t as f}from"./Divider-lz6Cf6K8.js";import{t as p}from"./Alert-B1bEDR3t.js";function m(){let{appName:m}=o(),{foda:h}=i(),{data:g,loading:_,error:v}=a(r,{}),y=d({title:`About ${m}`});return _?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:[t(s,{class:`w-[30%] text-xl`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[60%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[40%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[20%] text-md`}),t(`div`,{class:`h-12`}),t(s,{class:`w-[50%] text-lg`}),t(`div`,{class:`h-8`}),t(s,{class:`w-full text-md`}),t(`div`,{class:`h-3`}),t(s,{class:`w-[80%] text-md`})]})}):v!=null||g==null?t(u,{...y,children:t(n,{class:`px-4 py-8`,children:t(p,{type:`error`,children:t(e,{children:`An error occurred while loading the about page.`})})})}):t(u,{...y,children:t(n,{class:`px-4 py-8 gap-12`,children:[t(l,{markdown:g.primaryMarkdown}),t(n,{class:`gap-8`,children:[t(f,{}),t(e,{as:`p`,style:`small-weak`,children:t(c,{markdown:h.footerPrimaryMarkdown})})]})]})})}export{m as default};
@@ -1 +1 @@
1
- import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DM6VutL0.js";function a(){return t(r,{...i({title:`Admin controls`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`Maybe the real admin controls were the friends we made along the way?`})})})}export{a as default};
1
+ import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DJo4M2YI.js";function a(){return t(r,{...i({title:`Admin controls`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`Maybe the real admin controls were the friends we made along the way?`})})})}export{a as default};
@@ -1 +1 @@
1
- import{c as e,l as t,o as n,s as r}from"./use-nav-exemptions-QtGbfEPT.js";import{l as i,r as a,s as o}from"./index-DOvczcZF.js";import{t as s}from"./MingcuteAlertLine-CdthHQmK.js";function c(e){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:t(`g`,{fill:`none`,fillRule:`evenodd`,children:[t(`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`}),t(`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 l(l){let u={info:o,error:i,warning:s,success:c}[l.type],d=l.icon===void 0?u:l.icon,f={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[l.type],p={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 t(r,{class:e(l.class,f,p,`px-4 py-4.5 rounded-sm gap-2 items-start`,{"grid-cols-[auto_1fr]":d!=null}),children:[d!=null&&t(a,{heightRem:n(`text-md`),children:t(d,{class:`text-fg text-icon-lg`})}),l.children]})}export{l as t};
1
+ import{c as e,l as t,o as n,s as r}from"./use-nav-exemptions-QtGbfEPT.js";import{l as i,r as a,s as o}from"./index-CyUttHc8.js";import{t as s}from"./MingcuteAlertLine-CdthHQmK.js";function c(e){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:t(`g`,{fill:`none`,fillRule:`evenodd`,children:[t(`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`}),t(`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 l(l){let u={info:o,error:i,warning:s,success:c}[l.type],d=l.icon===void 0?u:l.icon,f={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[l.type],p={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 t(r,{class:e(l.class,f,p,`px-4 py-4.5 rounded-sm gap-2 items-start`,{"grid-cols-[auto_1fr]":d!=null}),children:[d!=null&&t(a,{heightRem:n(`text-md`),children:t(d,{class:`text-fg text-icon-lg`})}),l.children]})}export{l as t};
@@ -1 +1 @@
1
- import{c as e,h as t,i as n,l as r,o as i,r as a,s as o,v as s}from"./use-nav-exemptions-QtGbfEPT.js";import{i as c}from"./use-api-Ft007Dfs.js";import{n as l}from"./use-foundational-data-BEVQRFj9.js";import{_ as u,f as d,g as f,m as p,n as m,o as h,r as g,t as _,v}from"./index-DOvczcZF.js";import{t as y}from"./Placeholder-BRnxNmKm.js";import{t as b}from"./Page-BMcxP_9m.js";import{t as x}from"./use-simple-headers-DM6VutL0.js";import{t as S}from"./Divider-lz6Cf6K8.js";import{t as C}from"./Alert-SQhECZag.js";function w(t){let i={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[t.type],a={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)]`}[t.type];return r(o,{class:e(t.class,i,a,`px-2 py-1.5 rounded-full`),children:r(n,{style:`small`,children:t.text})})}function T(t){return r(p,{class:e(t.class,`gap-x-2 gap-y-3`),wrap:!0,children:[r(n,{style:`strong`,children:t.header}),t.loading&&r(y,{class:`w-[20%] text-md`}),!t.loading&&t.pillContent!=null&&r(g,{heightRem:i(`text-md`),children:r(w,{type:t.pillContent.type,text:t.pillContent.text})})]})}function E(e){return r(T,{class:e.class,header:e.header,pillContent:D(e.currentValue,e.latestValue),loading:e.loading})}function D(e,t){return t==null?null:{text:e===t?`Up to date`:`Outdated`,type:e===t?`success`:`error`}}function O(e){return e.loading?r(o,{class:e.class,children:r(y,{class:`w-[40%] text-md`})}):e.value==null?null:r(n,{class:e.class,children:[e.prefix,`: `,e.value]})}function k(e){return e==null?null:e.length<32||!/^[0-9a-f]+$/.test(e)?e:e.slice(0,7)}function A(t){let{isUpdateAvailable:a,update:o}=h();return a?r(d,{theme:`accent`,text:`Refresh & update`,class:`self-start`,icon:f,onClick:()=>void o()}):r(p,{class:e(t.class,`gap-2`),children:[r(g,{heightRem:i(`text-md`),children:r(u,{})}),r(n,{class:`min-w-0 shrink`,children:`Waiting for service worker to install update...`})]})}function j(e){let{isHotReloadingEnabled:t}=_();return r(t?M:N,{...e})}function M(t){return r(a,{class:e(t.class,`gap-6`),children:[r(T,{header:`App version`,pillContent:{text:`Development`,type:`info`},loading:!1}),r(n,{children:`All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)`}),r(P,{}),r(O,{prefix:`Latest version`,value:t.latestVersion?.slice(0,8)??null,loading:t.loading})]})}function N(t){let{frontendVersion:n}=v(),i=!t.loading&&t.latestVersion!=null&&t.latestVersion!==n;return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`App version`,currentValue:n,latestValue:t.latestVersion,loading:t.loading}),r(P,{}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading}),i&&r(A,{})]})}function P(){let{frontendVersion:e,versionsOnLastUpdate:t}=v();return r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(e)]}),r(a,{class:`gap-3`,children:[r(n,{style:`small-weak`,children:[`Server version: `,k(t.serverVersion)]}),r(n,{style:`small-weak`,children:[`CoreQuery version: `,t.corequeryPackageVersion]})]})]})}function F(t){let{foda:i}=l();return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`Foundational data`,currentValue:i.hash,latestValue:t.latestVersion,loading:t.loading}),r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(i.hash)]}),r(n,{style:`small-weak`,children:[`Server version: `,k(i.serverVersion)]})]}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading})]})}function I(t){return r(a,{class:e(t.class,`gap-6`),children:[r(n,{style:`strong`,children:`Server`}),t.error!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Server version`,value:k(t.serverVersion),loading:t.loading}),r(O,{prefix:`CoreQuery version`,value:t.corequeryPackageVersion,loading:t.loading})]})]})}function L(e){return e<2e3?`${e.toFixed(0)} bytes`:e<2e6?`${(e/1e3).toFixed(2)} KB`:e<2e9?`${(e/1e6).toFixed(2)} MB`:e<2e12?`${(e/1e9).toFixed(2)} GB`:`${(e/0xe8d4a51000).toFixed(2)} TB`}function R(){let[e,i]=s(null),[o,c]=s(!0),[l,u]=s(!1);t(()=>{async function e(){c(!0),u(!1);try{let e=await navigator.storage.estimate();i(e)}catch(e){console.warn(`An error occurred while retrieving storage metrics.`,e),u(!0)}finally{c(!1)}}e()},[]);let d=e?.usage==null?null:L(e.usage),f=e?.quota==null?null:L(e.quota);return r(a,{class:`gap-6`,children:[r(n,{style:`strong`,children:`On-device storage`}),l&&r(C,{type:`error`,children:r(n,{children:`An error occurred while retrieving storage metrics.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Storage used`,value:d,loading:o}),r(O,{prefix:`Storage quota`,value:f,loading:o})]})]})}function z(){let{data:e,loading:t,error:i}=m(c,{});return r(b,{...x({title:`Developer info`}),children:r(a,{class:`px-4 py-8 gap-8`,children:[i!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(j,{latestVersion:e?.frontendVersion??null,loading:t}),r(S,{}),r(F,{latestVersion:e?.foundationalDataHash??null,loading:t}),r(S,{}),r(I,{serverVersion:e?.serverVersion??null,corequeryPackageVersion:e?.corequeryPackageVersion??null,loading:t,error:i}),r(S,{}),r(R,{}),r(S,{})]})})}export{z as default};
1
+ import{c as e,h as t,i as n,l as r,o as i,r as a,s as o,v as s}from"./use-nav-exemptions-QtGbfEPT.js";import{i as c}from"./use-api-Ft007Dfs.js";import{n as l}from"./use-foundational-data-BEVQRFj9.js";import{_ as u,f as d,g as f,m as p,n as m,o as h,r as g,t as _,v}from"./index-CyUttHc8.js";import{t as y}from"./Placeholder-BRnxNmKm.js";import{t as b}from"./Page-BMcxP_9m.js";import{t as x}from"./use-simple-headers-DJo4M2YI.js";import{t as S}from"./Divider-lz6Cf6K8.js";import{t as C}from"./Alert-B1bEDR3t.js";function w(t){let i={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[t.type],a={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)]`}[t.type];return r(o,{class:e(t.class,i,a,`px-2 py-1.5 rounded-full`),children:r(n,{style:`small`,children:t.text})})}function T(t){return r(p,{class:e(t.class,`gap-x-2 gap-y-3`),wrap:!0,children:[r(n,{style:`strong`,children:t.header}),t.loading&&r(y,{class:`w-[20%] text-md`}),!t.loading&&t.pillContent!=null&&r(g,{heightRem:i(`text-md`),children:r(w,{type:t.pillContent.type,text:t.pillContent.text})})]})}function E(e){return r(T,{class:e.class,header:e.header,pillContent:D(e.currentValue,e.latestValue),loading:e.loading})}function D(e,t){return t==null?null:{text:e===t?`Up to date`:`Outdated`,type:e===t?`success`:`error`}}function O(e){return e.loading?r(o,{class:e.class,children:r(y,{class:`w-[40%] text-md`})}):e.value==null?null:r(n,{class:e.class,children:[e.prefix,`: `,e.value]})}function k(e){return e==null?null:e.length<32||!/^[0-9a-f]+$/.test(e)?e:e.slice(0,7)}function A(t){let{isUpdateAvailable:a,update:o}=h();return a?r(d,{theme:`accent`,text:`Refresh & update`,class:`self-start`,icon:f,onClick:()=>void o()}):r(p,{class:e(t.class,`gap-2`),children:[r(g,{heightRem:i(`text-md`),children:r(u,{})}),r(n,{class:`min-w-0 shrink`,children:`Waiting for service worker to install update...`})]})}function j(e){let{isHotReloadingEnabled:t}=_();return r(t?M:N,{...e})}function M(t){return r(a,{class:e(t.class,`gap-6`),children:[r(T,{header:`App version`,pillContent:{text:`Development`,type:`info`},loading:!1}),r(n,{children:`All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)`}),r(P,{}),r(O,{prefix:`Latest version`,value:t.latestVersion?.slice(0,8)??null,loading:t.loading})]})}function N(t){let{frontendVersion:n}=v(),i=!t.loading&&t.latestVersion!=null&&t.latestVersion!==n;return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`App version`,currentValue:n,latestValue:t.latestVersion,loading:t.loading}),r(P,{}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading}),i&&r(A,{})]})}function P(){let{frontendVersion:e,versionsOnLastUpdate:t}=v();return r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(e)]}),r(a,{class:`gap-3`,children:[r(n,{style:`small-weak`,children:[`Server version: `,k(t.serverVersion)]}),r(n,{style:`small-weak`,children:[`CoreQuery version: `,t.corequeryPackageVersion]})]})]})}function F(t){let{foda:i}=l();return r(a,{class:e(t.class,`gap-6`),children:[r(E,{header:`Foundational data`,currentValue:i.hash,latestValue:t.latestVersion,loading:t.loading}),r(a,{class:`gap-4`,children:[r(n,{children:[`Current version: `,k(i.hash)]}),r(n,{style:`small-weak`,children:[`Server version: `,k(i.serverVersion)]})]}),r(O,{prefix:`Latest version`,value:k(t.latestVersion),loading:t.loading})]})}function I(t){return r(a,{class:e(t.class,`gap-6`),children:[r(n,{style:`strong`,children:`Server`}),t.error!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Server version`,value:k(t.serverVersion),loading:t.loading}),r(O,{prefix:`CoreQuery version`,value:t.corequeryPackageVersion,loading:t.loading})]})]})}function L(e){return e<2e3?`${e.toFixed(0)} bytes`:e<2e6?`${(e/1e3).toFixed(2)} KB`:e<2e9?`${(e/1e6).toFixed(2)} MB`:e<2e12?`${(e/1e9).toFixed(2)} GB`:`${(e/0xe8d4a51000).toFixed(2)} TB`}function R(){let[e,i]=s(null),[o,c]=s(!0),[l,u]=s(!1);t(()=>{async function e(){c(!0),u(!1);try{let e=await navigator.storage.estimate();i(e)}catch(e){console.warn(`An error occurred while retrieving storage metrics.`,e),u(!0)}finally{c(!1)}}e()},[]);let d=e?.usage==null?null:L(e.usage),f=e?.quota==null?null:L(e.quota);return r(a,{class:`gap-6`,children:[r(n,{style:`strong`,children:`On-device storage`}),l&&r(C,{type:`error`,children:r(n,{children:`An error occurred while retrieving storage metrics.`})}),r(a,{class:`gap-4 empty:hidden`,children:[r(O,{prefix:`Storage used`,value:d,loading:o}),r(O,{prefix:`Storage quota`,value:f,loading:o})]})]})}function z(){let{data:e,loading:t,error:i}=m(c,{});return r(b,{...x({title:`Developer info`}),children:r(a,{class:`px-4 py-8 gap-8`,children:[i!=null&&r(C,{type:`error`,children:r(n,{children:`An error occurred while fetching the latest version info from the server.`})}),r(j,{latestVersion:e?.frontendVersion??null,loading:t}),r(S,{}),r(F,{latestVersion:e?.foundationalDataHash??null,loading:t}),r(S,{}),r(I,{serverVersion:e?.serverVersion??null,corequeryPackageVersion:e?.corequeryPackageVersion??null,loading:t,error:i}),r(S,{}),r(R,{}),r(S,{})]})})}export{z as default};
@@ -1 +1 @@
1
- import{l as e,r as t}from"./use-nav-exemptions-QtGbfEPT.js";import{n}from"./use-foundational-data-BEVQRFj9.js";import{t as r}from"./Markdown-D5fQv556.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DM6VutL0.js";function o(){let{foda:o}=n();return e(i,{...a({title:`Home`}),children:e(t,{class:`px-4 py-8 gap-12`,children:e(r,{markdown:o.landingPage.primaryMarkdown})})})}export{o as default};
1
+ import{l as e,r as t}from"./use-nav-exemptions-QtGbfEPT.js";import{n}from"./use-foundational-data-BEVQRFj9.js";import{t as r}from"./Markdown-D5fQv556.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DJo4M2YI.js";function o(){let{foda:o}=n();return e(i,{...a({title:`Home`}),children:e(t,{class:`px-4 py-8 gap-12`,children:e(r,{markdown:o.landingPage.primaryMarkdown})})})}export{o as default};
@@ -0,0 +1 @@
1
+ import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o,v as s,y as c}from"./use-nav-exemptions-QtGbfEPT.js";import{l}from"./use-api-Ft007Dfs.js";import{n as u}from"./use-foundational-data-BEVQRFj9.js";import{t as d}from"./scope-B-e4l8Dr.js";import{i as f,n as p,o as m,r as h,t as g}from"./linear-BPbFILtP.js";import{t as _}from"./LinkText-sdmJpshg.js";import{a as v,d as y,v as b}from"./index-CyUttHc8.js";import{t as x}from"./Page-BMcxP_9m.js";import{t as S}from"./use-simple-headers-DJo4M2YI.js";import{t as C}from"./Alert-B1bEDR3t.js";import{t as w}from"./NotFoundPage-B17fzPr9.js";import{t as T}from"./Picker-DVb1h4gb.js";function E(e){throw Error(`Unexpected value: ${String(e)}`)}function D(i){let{foda:o}=u(),{appName:s}=b(),c=e(()=>i.fallbackStopList.map(e=>o.stops.require(e)).sort((e,t)=>e.name.localeCompare(t.name)),[o.stops,i.fallbackStopList]);return r(a,{class:t(i.class,`gap-6`),children:[r(n,{style:`subtitle`,children:`Stops`}),r(C,{type:`info`,children:r(a,{class:`gap-6`,children:[r(n,{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 `,s,` to be able to view.`,` `]}),r(n,{style:`strong`,children:r(_,{href:`/debug`,children:`Help me update`})})]})}),r(`ul`,{class:`flex-col flex list-disc list-inside gap-4`,children:c.map((e,t)=>r(n,{children:r(`li`,{children:r(_,{href:`/stop/${e.urlPath}`,children:e.name})})},t))})]})}function O(e,t){return t.map(t=>{let i=e.stops.require(t.stopId),a=`/stop/${i.urlPath}`;if(t.type===`regular`)return{content:r(n,{style:`strong`,children:r(_,{href:a,style:`subtle`,children:i.name})})};if(t.type===`always-express`)return{content:r(n,{style:`small-weak`,children:r(_,{href:a,style:`subtle`,children:[`Skips `,i.name]})}),drawMark:!1};E(t.type)})}function k(t){let{foda:n}=u(),i=e(()=>({type:`linear`,stops:O(n,t.diagram.stops)}),[n,t.diagram.stops]);return r(g,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}var A=10,j=15,M=class extends h{_onRenderStructure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,{x:r,y:i}=this._measure();this._renderSection({stops:e,x:r.common,yLevels:i.common.all,terminatesAtTop:!0,terminatesAtBottom:!1,notchSide:`right`}),this._renderSection({stops:t,x:r.branchA,yLevels:i.branchA.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`left`}),this._renderSection({stops:n,x:r.branchB,yLevels:i.branchB.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(e=>{e.moveTo(r.common,i.common.bottom),e.lineTo(r.common,i.common.bottom+A),e.bezierCurveTo(r.common,i.common.bottom+j+A,r.branchA,i.branches.top-j,r.branchA,i.branches.top),e.lineTo(r.branchA,i.branchA.top),e.moveTo(r.common,i.common.bottom+A),e.bezierCurveTo(r.common,i.common.bottom+j+A,r.branchB,i.branches.top-j,r.branchB,i.branches.top),e.lineTo(r.branchB,i.branchA.top)})}_measure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,r=this._extractYLevels(e,N),i=d(r[0]),a=d(r[r.length-1]),o=this._extractYLevels(t,P),s=d(o[0]),c=d(o[o.length-1]),l=this._extractYLevels(n,F),u=d(l[0]),f=d(l[l.length-1]);return{x:{common:this.width/2,branchA:8,branchB:this.width-8},y:{common:{all:r,top:i,bottom:a},branchA:{all:o,top:s,bottom:c},branchB:{all:l,top:u,bottom:f},branches:{top:Math.min(s,u),bottom:Math.max(c,f)}}}}},N=`_diagram-common-stops`,P=`_diagram-branch-a-stops`,F=`_diagram-branch-b-stops`;function I(n){let{settings:i}=y(),s=e(()=>({structure:n.structure,lightThemeColorHexCode:n.lightThemeColorHexCode,darkThemeColorHexCode:n.darkThemeColorHexCode,colorTheme:i.theme}),[n.darkThemeColorHexCode,n.lightThemeColorHexCode,n.structure,i.theme]),l=c((e,t)=>new M(e,t),[]);return s.structure.commonStops.length<1||s.structure.branchAStops.length<1||s.structure.branchBStops.length<1?r(p,{}):r(o,{class:t(n.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-y-8 gap-x-4`),children:[r(f,{class:`w-12 col-2 row-span-full`,createController:l,data:s}),r(a,{class:t(`gap-6 col-3 row-1 -ml-4`,N),xAlign:`left`,children:n.structure.commonStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-1 row-2`,P),xAlign:`right`,children:n.structure.branchAStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-2`,F),xAlign:`left`,children:n.structure.branchBStops.map((e,t)=>r(o,{children:e.content},t))})]})}function L(t){let{foda:n}=u(),i=e(()=>({type:`branch`,commonStops:O(n,t.diagram.commonStops),branchAStops:O(n,t.diagram.branchAStops),branchBStops:O(n,t.diagram.branchBStops)}),[n,t.diagram]);return r(I,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}var R=10,z=15,B=24,V=1,H=class extends h{_onRenderStructure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,{x:r,y:i}=this._measure();if(e.length>0?this._renderSection({stops:e,x:r.loopLeft,yLevels:i.loopLeft.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`left`}):this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top-V),e.lineTo(r.loopLeft,i.loopLeft.bottom+V)}),t.length>0?this._renderSection({stops:t,x:r.loopRight,yLevels:i.loopRight.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`right`}):this._drawLine(e=>{e.moveTo(r.loopRight,i.loopRight.top-V),e.lineTo(r.loopRight,i.loopRight.bottom+V)}),n.length>0){let e=d(i.main.top);this._renderSection({stops:n,x:r.main,yLevels:i.main.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(t=>{t.moveTo(r.main,e),t.lineTo(r.main,e-R),t.bezierCurveTo(r.main,e-z-R,r.loopLeft,i.loop.bottom+z,r.loopLeft,i.loop.bottom),t.lineTo(r.loopLeft,i.loopLeft.bottom),t.moveTo(r.main,e-R),t.bezierCurveTo(r.main,e-z-R,r.loopRight,i.loop.bottom+z,r.loopRight,i.loop.bottom),t.lineTo(r.loopRight,i.loopRight.bottom)}),this.ctx.stroke()}else this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.bottom),e.lineTo(r.loopLeft,i.loop.bottom),e.bezierCurveTo(r.loopLeft,i.loop.bottom+B,r.loopRight,i.loop.bottom+B,r.loopRight,i.loop.bottom),e.lineTo(r.loopRight,i.loopRight.bottom)});this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top),e.lineTo(r.loopLeft,i.loop.top),e.bezierCurveTo(r.loopLeft,i.loop.top-B,r.loopRight,i.loop.top-B,r.loopRight,i.loop.top),e.lineTo(r.loopRight,i.loopRight.top)})}_measure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,r=this._extractYLevels(e,W),i=this._extractYLevels(t,G),a=this._extractYLevels(n,U),o=r[0],s=i[0],c=r[r.length-1],l=i[i.length-1],u=d(o??s),f=d(s??o),p=d(c??l),m=d(l??c);return{x:{loopLeft:8,loopRight:this.width-8,main:this.width/2},y:{loopLeft:{all:r,top:u,bottom:p},loopRight:{all:i,top:f,bottom:m},main:{all:a,top:a[0]??null,bottom:a[a.length-1]??null},loop:{top:Math.min(u,f),bottom:Math.max(p,m)}}}}},U=`_diagram-main-stops`,W=`_diagram-loop-left-stops`,G=`_diagram-loop-right-stops`;function K(n){let{settings:i}=y(),s=e(()=>({structure:n.structure,lightThemeColorHexCode:n.lightThemeColorHexCode,darkThemeColorHexCode:n.darkThemeColorHexCode,colorTheme:i.theme}),[n.darkThemeColorHexCode,n.lightThemeColorHexCode,n.structure,i.theme]),l=c((e,t)=>new H(e,t),[]),{loopLeftStops:u,loopRightStops:d}=s.structure;return u.length+d.length<1?r(p,{}):r(o,{class:t(n.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-x-4`),children:[r(f,{class:`w-12 col-2 row-span-full`,createController:l,data:s}),r(a,{class:t(`gap-6 col-1 row-1 py-4`,W),xAlign:`right`,yAlign:`center`,children:n.structure.loopLeftStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-1 py-4`,G),xAlign:`left`,yAlign:`center`,children:n.structure.loopRightStops.map((e,t)=>r(o,{children:e.content},t))}),r(a,{class:t(`gap-6 col-3 row-2 -ml-4`,U,{"pt-4":n.structure.mainStops.length>0}),xAlign:`left`,children:n.structure.mainStops.map((e,t)=>r(o,{children:e.content},t))})]})}function q(t){let{foda:n}=u(),i=e(()=>({type:`loop`,loopLeftStops:O(n,t.diagram.loopLeftStops),loopRightStops:O(n,t.diagram.loopRightStops),mainStops:O(n,t.diagram.mainStops)}),[n,t.diagram]);return r(K,{class:t.class,structure:i,lightThemeColorHexCode:t.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:t.diagram.color?.darkModeHexCode??null})}function J(e){return r(o,{class:t(e.class,`bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border`),children:r(Y,{diagram:e.diagram})})}function Y(e){if(e.diagram.type===`linear`)return r(k,{diagram:e.diagram});if(e.diagram.type===`branch`)return r(L,{diagram:e.diagram});if(e.diagram.type===`loop`)return r(q,{diagram:e.diagram});E(e.diagram)}function X(e){let i=e.diagram.entries.filter(e=>l(e.type));return i.length<e.diagram.entries.length?r(D,{fallbackStopList:e.diagram.fallbackStopList}):r(a,{class:t(e.class,`gap-6`),children:[r(n,{style:`subtitle`,children:`Diagram`}),i.length===1?r(J,{diagram:d(i[0])}):r(Z,{entries:i},i.length)]})}function Z(t){let[n,i]=s(0),o=e(()=>t.entries.map((e,t)=>({value:t.toFixed(),label:e.name??`Route ${t+1}`})),[t.entries]);return r(a,{class:`gap-4`,children:[r(T,{class:`self-start`,value:n.toFixed(),options:o,onChange:e=>{i(m(e))}}),r(J,{diagram:d(t.entries[n])})]})}function Q(){let{params:{id:t}}=i(),{foda:n}=u(),a=e(()=>n.lines.getByUrlPath(t??``),[n.lines,t]);return a==null?r(w,{afterConfirming:`foundational-data-version`}):r($,{line:a},a.id)}function $(e){let{formatLine:t}=v();return r(x,{...S({title:t(e.line.name),back:{href:`/`,text:`Home`}}),children:r(a,{class:`px-4 py-8 gap-8`,children:e.line.diagram.entries.length>0&&r(X,{diagram:e.line.diagram})})})}export{Q as default};
@@ -0,0 +1 @@
1
+ import{l as e}from"./use-nav-exemptions-QtGbfEPT.js";import{t}from"./NotFoundPage-B17fzPr9.js";function n(){return e(t,{afterConfirming:`frontend-version`})}export{n as default};
@@ -1 +1 @@
1
- import{h as e,i as t,l as n,r,v as i}from"./use-nav-exemptions-QtGbfEPT.js";import{i as a}from"./use-api-Ft007Dfs.js";import{n as o}from"./use-foundational-data-BEVQRFj9.js";import{_ as s,c,f as l,n as u,o as d,t as f,v as p}from"./index-DOvczcZF.js";import{t as m}from"./Page-BMcxP_9m.js";function h(e){let t=u(a,{}),n=g(e===`frontend-version`,t),r=_(e===`foundational-data-version`,t);return t.loading||n||r}function g(t,n){let{isHotReloadingEnabled:r}=f(),{frontendVersion:i}=p(),{unregister:a}=d(),o=t&&!r&&!n.loading&&n.error==null&&n.data!=null&&n.data.frontendVersion!==i;return e(()=>{if(!o)return;async function e(){await a(),window.location.reload()}e()},[o,a]),o}function _(t,n){let{foda:r,forceFodaUpdate:a}=o(),[s,c]=i(!1),[l,u]=i(!1),d=t&&!n.loading&&n.error==null&&n.data!=null&&n.data.foundationalDataHash!==r.hash;return e(()=>{if(!d)return;async function e(){u(!0);try{await a()}catch{console.warn(`Foundational data is outdated, but force update failed.`)}finally{c(!0),u(!1)}}e()},[d,a]),d&&!s||l}function v({afterConfirming:e}){return h(e)?n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{xAlign:`center`,yAlign:`center`,children:n(s,{})})}):n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[n(t,{style:`title`,align:`center`,children:`Page not found`}),n(t,{align:`center`,children:`This page doesn't exist, at least not anymore!`}),n(l,{href:`/`,text:`Go home`,icon:c})]})})}export{v as t};
1
+ import{h as e,i as t,l as n,r,v as i}from"./use-nav-exemptions-QtGbfEPT.js";import{i as a}from"./use-api-Ft007Dfs.js";import{n as o}from"./use-foundational-data-BEVQRFj9.js";import{_ as s,c,f as l,n as u,o as d,t as f,v as p}from"./index-CyUttHc8.js";import{t as m}from"./Page-BMcxP_9m.js";function h(e){let t=u(a,{}),n=g(e===`frontend-version`,t),r=_(e===`foundational-data-version`,t);return t.loading||n||r}function g(t,n){let{isHotReloadingEnabled:r}=f(),{frontendVersion:i}=p(),{unregister:a}=d(),o=t&&!r&&!n.loading&&n.error==null&&n.data!=null&&n.data.frontendVersion!==i;return e(()=>{if(!o)return;async function e(){await a(),window.location.reload()}e()},[o,a]),o}function _(t,n){let{foda:r,forceFodaUpdate:a}=o(),[s,c]=i(!1),[l,u]=i(!1),d=t&&!n.loading&&n.error==null&&n.data!=null&&n.data.foundationalDataHash!==r.hash;return e(()=>{if(!d)return;async function e(){u(!0);try{await a()}catch{console.warn(`Foundational data is outdated, but force update failed.`)}finally{c(!0),u(!1)}}e()},[d,a]),d&&!s||l}function v({afterConfirming:e}){return h(e)?n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{xAlign:`center`,yAlign:`center`,children:n(s,{})})}):n(m,{mobileHeader:null,desktopHeader:null,children:n(r,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[n(t,{style:`title`,align:`center`,children:`Page not found`}),n(t,{align:`center`,children:`This page doesn't exist, at least not anymore!`}),n(l,{href:`/`,text:`Go home`,icon:c})]})})}export{v as t};
@@ -1 +1 @@
1
- import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{h as r,m as i}from"./index-DOvczcZF.js";var a=[`bg-transparent`,`group-hover:bg-soft-hover`,`group-active:bg-soft-active`],o=[`bg-accent`,`group-hover:bg-accent-hover`,`group-active:bg-accent-active`],s=[`[--color-fg:var(--color-on-accent)]`,`[--color-fg-strong:var(--color-on-accent)]`,`[--color-fg-weak:var(--color-on-accent)]`],c=e(a),l=e(o),u=e(s);function d(t){return n(i,{class:e(t.class,`overflow-hidden rounded-sm border border-accent max-w-full`),children:t.options.map((e,r)=>n(f,{class:`shrink`,label:e.label,active:e.value===t.value,last:r===t.options.length-1,onClick:()=>t.onChange(e.value)},e.value))})}function f(a){return n(r,{class:e(a.class,`relative group min-h-8`,{[u]:a.active,"border-r border-accent":!a.last}),onClick:a.onClick,children:[n(`div`,{class:e(`absolute z-0 top-0 bottom-0 left-0 right-0`,{[c]:!a.active,[l]:a.active})}),n(i,{class:`relative z-1 px-6 py-2 min-w-0`,xAlign:`center`,yAlign:`center`,children:n(t,{class:`shrink min-w-min`,align:`center`,children:a.label})})]})}export{d as t};
1
+ import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{h as r,m as i}from"./index-CyUttHc8.js";var a=[`bg-transparent`,`group-hover:bg-soft-hover`,`group-active:bg-soft-active`],o=[`bg-accent`,`group-hover:bg-accent-hover`,`group-active:bg-accent-active`],s=[`[--color-fg:var(--color-on-accent)]`,`[--color-fg-strong:var(--color-on-accent)]`,`[--color-fg-weak:var(--color-on-accent)]`],c=e(a),l=e(o),u=e(s);function d(t){return n(i,{class:e(t.class,`overflow-hidden rounded-sm border border-accent max-w-full`),children:t.options.map((e,r)=>n(f,{class:`shrink`,label:e.label,active:e.value===t.value,last:r===t.options.length-1,onClick:()=>t.onChange(e.value)},e.value))})}function f(a){return n(r,{class:e(a.class,`relative group min-h-8`,{[u]:a.active,"border-r border-accent":!a.last}),onClick:a.onClick,children:[n(`div`,{class:e(`absolute z-0 top-0 bottom-0 left-0 right-0`,{[c]:!a.active,[l]:a.active})}),n(i,{class:`relative z-1 px-6 py-2 min-w-0`,xAlign:`center`,yAlign:`center`,children:n(t,{class:`shrink min-w-min`,align:`center`,children:a.label})})]})}export{d as t};
@@ -1 +1 @@
1
- import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o}from"./use-nav-exemptions-QtGbfEPT.js";import{o as s}from"./use-api-Ft007Dfs.js";import{n as c}from"./use-foundational-data-BEVQRFj9.js";import{a as l,t as u}from"./linear-BiU4teCm.js";import{t as d}from"./LinkText-sdmJpshg.js";import{_ as f,c as p,f as m,m as h}from"./index-DOvczcZF.js";import{t as g}from"./Page-BMcxP_9m.js";import{t as _}from"./use-simple-headers-DM6VutL0.js";import{t as v}from"./use-foda-synced-query-hrC70vJ_.js";function y(n){let{foda:i}=c(),a=e(()=>({type:`linear`,stops:b(i,n.service.movements)}),[i,n.service.movements]);return r(o,{class:t(n.class),children:r(u,{class:n.class,structure:a,lightThemeColorHexCode:n.service.color?.lightModeHexCode??null,darkThemeColorHexCode:n.service.color?.darkModeHexCode??null})})}function b(e,t){return t.map(t=>{let i=e.stops.require(t.stopId),a=`/stop/${i.urlPath}`,o=t.arrivalTime==null?null:new Date(Date.parse(t.arrivalTime)).toLocaleString(),s=t.departureTime==null?null:new Date(Date.parse(t.departureTime)).toLocaleString();if(o==null&&s==null)return{content:r(n,{style:`small-weak`,children:r(d,{href:a,style:`subtle`,children:[`Skips `,i.name]})}),drawMark:!1};let c=s??o;return{content:r(h,{class:`gap-2 min-w-0`,children:[r(n,{style:`strong`,children:r(d,{href:a,style:`subtle`,children:i.name})}),r(n,{children:`•`}),r(n,{class:`shrink min-w-0`,oneLine:!0,children:c})]})}})}function x(){let{params:{sourceId:e,intrasourceId:t},query:{from:n}}=i(),{data:a,loading:o,error:c}=v(s,{sourceId:e??``,intrasourceId:t??``}),u=l(n??``);return o?r(C,{}):c!=null||a==null||u==null||u<0||a.service!=null&&u>a.service.movements.length-1?r(w,{}):a.service==null?r(T,{}):r(S,{service:a.service,movementIndex:u},`${e}/${t}`)}function S(e){return r(g,{..._({title:`${e.service.primaryDestinationText} service`,back:{href:`/`,text:`Home`}}),children:r(a,{class:`px-4 py-8 gap-8`,children:[r(y,{service:e.service}),r(n,{style:`small-narrow`,children:`(Real-time data has not been provided for all stops. Times marked with * are estimates, extrapolated from the available data.)`})]})})}function C(){return r(g,{..._({title:`Loading...`,back:{href:`/`,text:`Home`}}),children:r(f,{})})}function w(){return r(g,{..._({title:`Error`,back:{href:`/`,text:`Home`}}),children:r(n,{children:`Failed to load service.`})})}function T(){return r(g,{mobileHeader:null,desktopHeader:null,children:r(a,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[r(n,{style:`title`,align:`center`,children:`Service not found`}),r(n,{align:`center`,children:`This can happen if the service was cancelled, or the timetable changed since this link was generated. You might be able to find it again by searching for one of the stops it departed from.`}),r(m,{href:`/`,text:`Go home`,icon:p})]})})}export{x as default};
1
+ import{_ as e,c as t,i as n,l as r,m as i,r as a,s as o}from"./use-nav-exemptions-QtGbfEPT.js";import{o as s}from"./use-api-Ft007Dfs.js";import{n as c}from"./use-foundational-data-BEVQRFj9.js";import{a as l,t as u}from"./linear-BPbFILtP.js";import{t as d}from"./LinkText-sdmJpshg.js";import{_ as f,c as p,f as m,m as h}from"./index-CyUttHc8.js";import{t as g}from"./Page-BMcxP_9m.js";import{t as _}from"./use-simple-headers-DJo4M2YI.js";import{t as v}from"./use-foda-synced-query-hrC70vJ_.js";function y(n){let{foda:i}=c(),a=e(()=>({type:`linear`,stops:b(i,n.service.movements)}),[i,n.service.movements]);return r(o,{class:t(n.class),children:r(u,{class:n.class,structure:a,lightThemeColorHexCode:n.service.color?.lightModeHexCode??null,darkThemeColorHexCode:n.service.color?.darkModeHexCode??null})})}function b(e,t){return t.map(t=>{let i=e.stops.require(t.stopId),a=`/stop/${i.urlPath}`,o=t.arrivalTime==null?null:new Date(Date.parse(t.arrivalTime)).toLocaleString(),s=t.departureTime==null?null:new Date(Date.parse(t.departureTime)).toLocaleString();if(o==null&&s==null)return{content:r(n,{style:`small-weak`,children:r(d,{href:a,style:`subtle`,children:[`Skips `,i.name]})}),drawMark:!1};let c=s??o;return{content:r(h,{class:`gap-2 min-w-0`,children:[r(n,{style:`strong`,children:r(d,{href:a,style:`subtle`,children:i.name})}),r(n,{children:`•`}),r(n,{class:`shrink min-w-0`,oneLine:!0,children:c})]})}})}function x(){let{params:{sourceId:e,intrasourceId:t},query:{from:n}}=i(),{data:a,loading:o,error:c}=v(s,{sourceId:e??``,intrasourceId:t??``}),u=l(n??``);return o?r(C,{}):c!=null||a==null||u==null||u<0||a.service!=null&&u>a.service.movements.length-1?r(w,{}):a.service==null?r(T,{}):r(S,{service:a.service,movementIndex:u},`${e}/${t}`)}function S(e){return r(g,{..._({title:`${e.service.primaryDestinationText} service`,back:{href:`/`,text:`Home`}}),children:r(a,{class:`px-4 py-8 gap-8`,children:[r(y,{service:e.service}),r(n,{style:`small-narrow`,children:`(Real-time data has not been provided for all stops. Times marked with * are estimates, extrapolated from the available data.)`})]})})}function C(){return r(g,{..._({title:`Loading...`,back:{href:`/`,text:`Home`}}),children:r(f,{})})}function w(){return r(g,{..._({title:`Error`,back:{href:`/`,text:`Home`}}),children:r(n,{children:`Failed to load service.`})})}function T(){return r(g,{mobileHeader:null,desktopHeader:null,children:r(a,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[r(n,{style:`title`,align:`center`,children:`Service not found`}),r(n,{align:`center`,children:`This can happen if the service was cancelled, or the timetable changed since this link was generated. You might be able to find it again by searching for one of the stops it departed from.`}),r(m,{href:`/`,text:`Go home`,icon:p})]})})}export{x as default};
@@ -1 +1 @@
1
- import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r,u as i}from"./index-DOvczcZF.js";import{t as a}from"./Page-BMcxP_9m.js";import{t as o}from"./use-simple-headers-DM6VutL0.js";import{t as s}from"./Divider-lz6Cf6K8.js";import{t as c}from"./Picker-di2TPJNV.js";var l={auto:`Auto`,light:`Light`,dark:`Dark`},u=i.map(e=>({value:e,label:l[e]}));function d(e){let{settings:n,updateSettings:i}=r();return t(c,{class:e.class,value:n.theme,options:u,onChange:e=>{i(t=>t.with({theme:e}))}})}function f(){return t(a,{...o({title:`Settings`}),children:t(n,{class:`px-4 py-8 gap-8`,children:[t(n,{class:`gap-6`,children:[t(e,{style:`strong`,children:`Theme`}),t(e,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),t(d,{class:`self-start`})]}),t(s,{}),t(e,{style:`small-weak`,children:`(Settings are saved to your device's/browser's local storage.)`})]})})}export{f as default};
1
+ import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{d as r,u as i}from"./index-CyUttHc8.js";import{t as a}from"./Page-BMcxP_9m.js";import{t as o}from"./use-simple-headers-DJo4M2YI.js";import{t as s}from"./Divider-lz6Cf6K8.js";import{t as c}from"./Picker-DVb1h4gb.js";var l={auto:`Auto`,light:`Light`,dark:`Dark`},u=i.map(e=>({value:e,label:l[e]}));function d(e){let{settings:n,updateSettings:i}=r();return t(c,{class:e.class,value:n.theme,options:u,onChange:e=>{i(t=>t.with({theme:e}))}})}function f(){return t(a,{...o({title:`Settings`}),children:t(n,{class:`px-4 py-8 gap-8`,children:[t(n,{class:`gap-6`,children:[t(e,{style:`strong`,children:`Theme`}),t(e,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),t(d,{class:`self-start`})]}),t(s,{}),t(e,{style:`small-weak`,children:`(Settings are saved to your device's/browser's local storage.)`})]})})}export{f as default};
@@ -1 +1 @@
1
- import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{f as r,m as i}from"./index-DOvczcZF.js";function a(e){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:n(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M14.657 17.657L9 12l5.657-5.657`})})}function o(o){return n(i,{class:e(o.class,`gap-2`,{"px-4":o.backHref==null,"pl-2 pr-4":o.backHref!=null}),yAlign:`center`,children:[o.backHref!=null&&n(r,{href:o.backHref,icon:a,theme:`hover`}),n(t,{style:`title`,children:o.title})]})}export{a as n,o as t};
1
+ import{c as e,i as t,l as n}from"./use-nav-exemptions-QtGbfEPT.js";import{f as r,m as i}from"./index-CyUttHc8.js";function a(e){return n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:n(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M14.657 17.657L9 12l5.657-5.657`})})}function o(o){return n(i,{class:e(o.class,`gap-2`,{"px-4":o.backHref==null,"pl-2 pr-4":o.backHref!=null}),yAlign:`center`,children:[o.backHref!=null&&n(r,{href:o.backHref,icon:a,theme:`hover`}),n(t,{style:`title`,children:o.title})]})}export{a as n,o as t};
@@ -1 +1 @@
1
- import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DM6VutL0.js";function a(){return t(r,{...i({title:`Status`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`LGTM`})})})}export{a as default};
1
+ import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Page-BMcxP_9m.js";import{t as i}from"./use-simple-headers-DJo4M2YI.js";function a(){return t(r,{...i({title:`Status`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:`LGTM`})})})}export{a as default};
@@ -0,0 +1 @@
1
+ import{_ as e,c as t,i as n,l as r,m as i,n as a,o,r as s,s as c,v as l}from"./use-nav-exemptions-QtGbfEPT.js";import{u}from"./use-api-Ft007Dfs.js";import{n as d}from"./use-foundational-data-BEVQRFj9.js";import{_ as f,a as p,f as m,i as h,m as g,p as _,r as v}from"./index-CyUttHc8.js";import{t as y}from"./Page-BMcxP_9m.js";import{n as b,t as x}from"./SimpleMobileHeaderContent-Cpqzarjr.js";import{t as S}from"./NotFoundPage-B17fzPr9.js";import{t as C}from"./ErrorMessage-CCAB4vXB.js";import{t as w}from"./use-foda-synced-query-hrC70vJ_.js";function T(e){return{hideMobileHeaderWhenScrolledToTop:!0,mobileHeader:r(x,{title:e.title,backHref:e.back?.href??null}),agnosticHeader:r(c,{class:`not-desktop:bg-bg-navbar not-desktop:border-b not-desktop:border-soft-border`,children:r(a,{children:r(c,{class:`not-desktop:px-4 desktop:mx-4 desktop:border-b desktop:border-soft-border`,children:r(s,{class:t(`gap-8`,{"pt-4 pb-6 desktop:pt-6":e.back!=null,"py-6 desktop:pt-8":e.back==null,"desktop:pb-4":e.additionalContent==null}),children:[e.back!=null&&r(m,{text:e.back.text,href:e.back.href,icon:b,class:`self-start`,layout:`narrow-icon`}),r(s,{class:`gap-4`,children:[r(n,{style:`megatitle`,children:e.title}),e.additionalContent]})]})})})})}}function E(e){return r(g,{class:t(e.class),children:r(n,{style:`strong`,dynamicColor:e.serviceColor,children:e.time})})}var D=3.5;function O(e){return r(s,{class:t(e.class,`h-14 min-w-0`),yAlign:`space-between`,children:[r(g,{xAlign:`space-between`,class:`gap-2 `,children:[r(g,{yAlign:`bottom`,class:`gap-1 shrink min-w-0`,children:[r(n,{style:`strong`,dynamicColor:e.departure.color,children:e.departure.primaryDestinationText}),e.departure.secondaryDestinationText!=null&&r(n,{style:`small-narrow`,class:`shrink min-w-0`,dynamicColor:e.departure.color,oneLine:!0,children:e.departure.secondaryDestinationText})]}),r(E,{time:e.departure.movement.time,formerTime:e.departure.movement.formerTime,serviceColor:e.departure.color})]}),r(g,{xAlign:`space-between`,yAlign:`bottom`,children:[r(s,{class:`gap-3 min-w-0 shrink`,children:[r(n,{style:`small-narrow`,oneLine:!0,children:`The stopping pattern goes here`}),r(g,{class:`gap-1`,children:[r(n,{style:`small-narrow-strong-success`,children:`Solid`}),r(n,{style:`small-narrow`,children:`•`}),r(n,{style:`small-narrow`,class:`shrink min-w-0`,oneLine:!0,children:`And then this row shows all sorts of stuff`})]})]}),r(s,{yAlign:`space-between`,class:`border-2 px-1.5 py-1 border-soft-border rounded-sm -mb-0.5 h-8.5`,children:[r(n,{style:`tiny-narrow`,align:`center`,children:`Platform`}),r(n,{style:`strong`,align:`center`,children:`X`})]})]})]})}function k(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9.343 6.343L15 12l-5.657 5.657`})})}var A=D+2;function j(e){return r(_,{class:t(e.class),href:M(e.departure),children:r(c,{class:`grid-cols-[1fr_auto] p-4 items-center pr-2 gap-2`,children:[r(O,{departure:e.departure}),r(k,{class:`text-icon-lg text-fg`})]})})}function M(e){return`/service/${encodeURIComponent(e.sourceId)}/${encodeURIComponent(e.intrasourceId)}?from=${encodeURIComponent(e.movement.index.toString())}`}function N(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M11 20H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4H4m12-7v2M8 4v2m12.121 9.879L18 18m0 0l-2.121 2.121M18 18l-2.121-2.121M18 18l2.121 2.121`})})}function P(e){let{pluralServicesTerm:n}=p();return e.loading?r(F,{class:e.class,queryCount:e.queryCount,centerContent:!0,children:r(f,{})}):e.hadError?r(F,{class:t(e.class,`gap-2`),queryCount:e.queryCount,centerContent:!0,children:r(C,{text:`An error occurred while retrieving departures`})}):e.departures.length===0?r(F,{class:e.class,queryCount:e.queryCount,centerContent:!0,children:r(C,{text:`No ${n} scheduled`,icon:N})}):r(F,{class:e.class,queryCount:e.queryCount,children:e.departures.map((t,n)=>r(c,{class:`relative`,children:[r(j,{departure:t}),n<e.queryCount-1&&r(`hr`,{class:`border-soft-border absolute bottom-0 left-0 right-0 mx-4`})]},I(t)))})}function F(e){let t=e.centerContent??!1;return r(s,{class:e.class,xAlign:t?`center`:`stretch`,yAlign:t?`center`:`top`,dynamicMinHeightRem:A*e.queryCount,children:e.children})}function I(e){return`${e.sourceId}/${e.intrasourceId}/${e.movement.index}`}function L(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m4 20l5-5m0 0l3.956 3.956a1 1 0 0 0 1.626-.314l2.255-5.261a1 1 0 0 1 .548-.535l3.207-1.283a1 1 0 0 0 .336-1.635l-6.856-6.856a1 1 0 0 0-1.635.336l-1.283 3.207a1 1 0 0 1-.535.548L5.358 9.418a1 1 0 0 0-.314 1.626z`})})}function R(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 20H4v-5m0 5l6.5-6.5M15 4h5v5m0-5l-6.5 6.5`})})}function z(e){return r(s,{class:t(e.class,`min-w-0`),children:[r(g,{xAlign:`space-between`,yAlign:`center`,class:`gap-2 not-desktop:pl-4 not-desktop:pr-2 not-desktop:pt-6 pb-2`,children:[r(n,{style:`subtitle`,class:`shrink min-w-0`,oneLine:!0,children:e.feed.query.title}),r(g,{class:`gap-2`,children:[r(m,{theme:`hover`,icon:L}),r(m,{theme:`hover`,icon:R})]})]}),r(P,{class:`bg-bg-raised desktop:border not-desktop:border-y border-soft-border desktop:rounded-lg overflow-hidden box-content`,departures:e.feed.departures,queryCount:e.feed.query.desiredCount,loading:e.feed.loading,hadError:e.feed.hadError})]})}function B(e){return r(c,{class:t(e.class,`desktop:grid-cols-[1fr_1fr] desktop:gap-6 desktop:px-4 desktop:py-8`),children:e.feeds.map((e,t)=>r(z,{feed:e,class:`not-desktop:last:-mb-px`},t))})}function V(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M17.657 9.343L12 15L6.343 9.343`})})}function H(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 7v5l3 3m6-3a9 9 0 1 1-18 0a9 9 0 0 1 18 0`})})}function U(e){return r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,...e,children:r(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19.5 4h-15a.5.5 0 0 0-.5.5v2.086a1 1 0 0 0 .293.707L10 13v5.691a.5.5 0 0 0 .276.447L14 21v-8l5.707-5.707A1 1 0 0 0 20 6.586V4.5a.5.5 0 0 0-.5-.5Z`})})}function W(e){return r(c,{class:`desktop:pt-6 desktop:px-4`,children:r(c,{class:t(e.class,`grid-cols-[1fr_1fr] desktop:max-w-150 bg-bg-raised divide-x divide-soft-border desktop:border not-desktop:border-b border-soft-border desktop:rounded-lg overflow-hidden`),children:[r(_,{children:r(g,{xAlign:`space-between`,yAlign:`center`,class:`p-4`,children:[r(g,{yAlign:`center`,class:`gap-2`,children:[r(v,{heightRem:o(`text-md`),children:r(H,{class:`text-icon-lg text-fg`})}),r(n,{children:`Now`})]}),r(v,{heightRem:o(`text-md`),children:r(V,{class:`text-icon-lg text-fg`})})]})}),r(_,{children:r(g,{xAlign:`space-between`,yAlign:`center`,class:`p-4`,children:[r(g,{yAlign:`center`,class:`gap-2`,children:[r(v,{heightRem:o(`text-md`),children:r(U,{class:`text-icon-lg text-fg`})}),r(n,{children:`All trains`})]}),r(v,{heightRem:o(`text-md`),children:r(V,{class:`text-icon-lg text-fg`})})]})})]})})}function G(){let{params:{id:t}}=i(),{foda:n}=d(),a=e(()=>n.stops.getByUrlPath(t??``),[n.stops,t]);return a==null?r(S,{afterConfirming:`foundational-data-version`}):r(K,{stop:a},a.id)}function K(t){let[n]=l(()=>Temporal.Now.zonedDateTimeISO(`UTC`).round({smallestUnit:`minute`,roundingMode:`floor`}).toInstant()),{data:i,loading:a,error:o}=w(u,{instant:n.toString(),direction:`forwards`,feeds:t.stop.defaultDepartureFeeds.map(e=>({stopId:t.stop.id,desiredCount:e.desiredCount,filterExpression:`${e.filterExpression} !arr !sdo`.trim(),skips:[]}))}),c=e(()=>t.stop.defaultDepartureFeeds.map((e,t)=>({query:{title:e.name,desiredCount:e.desiredCount},departures:i?.feeds[t]?.departures??[],loading:a,hadError:o!=null})),[t.stop.defaultDepartureFeeds,i,a,o]);return r(y,{...T({title:t.stop.name,back:{href:`/`,text:`Home`},additionalContent:r(h,{lineIds:t.stop.canonicalLinesServingStop,withLinks:!0})}),children:r(s,{children:[r(W,{}),r(B,{feeds:c})]})})}export{G as default};
@@ -1 +1 @@
1
- import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Strong-C0VDYprE.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DM6VutL0.js";function o(){return t(i,{...a({title:`Zen mode`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:[t(r,{children:`✨`}),` Zen! `,t(r,{children:`✨`})]})})})}export{o as default};
1
+ import{i as e,l as t,r as n}from"./use-nav-exemptions-QtGbfEPT.js";import{t as r}from"./Strong-C0VDYprE.js";import{t as i}from"./Page-BMcxP_9m.js";import{t as a}from"./use-simple-headers-DJo4M2YI.js";function o(){return t(i,{...a({title:`Zen mode`}),children:t(n,{class:`px-4 py-8 gap-8`,children:t(e,{children:[t(r,{children:`✨`}),` Zen! `,t(r,{children:`✨`})]})})})}export{o as default};