transit-departures-widget 2.0.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.
package/.eslintrc.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "env": {
3
+ "node": true,
4
+ "es2021": true
5
+ },
6
+ "extends": ["xo", "prettier"],
7
+ "parserOptions": {
8
+ "ecmaVersion": 12,
9
+ "sourceType": "module"
10
+ },
11
+ "rules": {
12
+ "arrow-parens": ["error", "always"],
13
+ "camelcase": [
14
+ "error",
15
+ {
16
+ "properties": "never"
17
+ }
18
+ ],
19
+ "indent": "off",
20
+ "object-curly-spacing": ["error", "always"],
21
+ "no-unused-vars": [
22
+ "error",
23
+ {
24
+ "varsIgnorePattern": "^[A-Z]"
25
+ }
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
package/CHANGELOG.md ADDED
@@ -0,0 +1,141 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] - 2023-09-14
9
+
10
+ ## Changed
11
+
12
+ - Renamed to transit-departures-widget
13
+ - Renamed all styles and functions to use departures instead of arrivals
14
+
15
+ ## Fixed
16
+
17
+ - Handle empty direction_id in GTFS
18
+ - Hide overflow in route circle
19
+ - Better route sorting
20
+ - Fix for hidden arrival times after none available
21
+
22
+ ## Updated
23
+
24
+ - Reword input to "stop" and "Stop code"
25
+ - Add support for GTFS without stop codes
26
+ - Hide departures more than 1 minute in the past
27
+
28
+ ## [1.2.1] - 2023-08-14
29
+
30
+ ## Fixed
31
+
32
+ - Error in logging functions
33
+
34
+ ## Updated
35
+
36
+ - Use lint-staged instead of pretty-quick
37
+ - Dependency updates
38
+
39
+ ## [1.2.0] - 2023-05-22
40
+
41
+ ## Fixed
42
+
43
+ - Deduplicate stops in a row
44
+
45
+ ## Updated
46
+
47
+ - Update to node-gtfs v4
48
+ - Dependency updates
49
+
50
+ ## [1.1.0] - 2022-06-29
51
+
52
+ ## Added
53
+
54
+ - Added a refresh button
55
+ - Updated filter to hide departure times at last stop of each trip
56
+
57
+ ## Updated
58
+
59
+ - Dependency updates
60
+
61
+ ## [1.0.2] - 2022-03-17
62
+
63
+ ## Changed
64
+
65
+ - Move text out of JS into template
66
+ - Add i18n and support for locale translation file
67
+
68
+ ## Fixed
69
+
70
+ - Fix issue with initial arrivals load
71
+ - Fix for routes with no colors defined
72
+ - Fix HTML escape for headsign in dropdown
73
+
74
+ ## Updated
75
+
76
+ - Dependency updates
77
+
78
+ ## [1.0.1] - 2021-10-17
79
+
80
+ ## Updated
81
+
82
+ - node-gtfs library
83
+
84
+ ## Added
85
+
86
+ - Husky and Prettier
87
+
88
+ ## [1.0.0] - 2021-10-15
89
+
90
+ ### Breaking Changes
91
+
92
+ - Converted to ES6 Module
93
+
94
+ ### Added
95
+
96
+ - Support for other languages using languageCode config variable
97
+ - Polish translations
98
+ - Support for 24-hour time using timeFormat config variable
99
+
100
+ ### Updated
101
+
102
+ - Dependency updates
103
+ - Support for release-it
104
+
105
+ ## [0.1.4] - 2021-04-20
106
+
107
+ ### Updated
108
+
109
+ - Dependency updates
110
+ - Readme updates
111
+
112
+ ## [0.1.3] - 2021-01-12
113
+
114
+ ### Fixed
115
+
116
+ - Fallback for cyclic routes when finding stop order
117
+
118
+ ### Updated
119
+
120
+ - Dependency updates
121
+
122
+ ## [0.1.2] - 2020-11-13
123
+
124
+ ### Updated
125
+
126
+ - default to lookup by stop id
127
+ - better direction names
128
+
129
+ ## [0.1.1] - 2020-11-10
130
+
131
+ ### Added
132
+
133
+ - beautify option
134
+ - templatePath option
135
+ - noHead option
136
+
137
+ ## [0.1.0] - 2020-11-10
138
+
139
+ ### Added
140
+
141
+ - Initial Release
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Brendan Nee <brendan@blinktag.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,237 @@
1
+ <p align="center">
2
+ ➡️
3
+ <a href="#command-line-usage">Command Line Usage</a> |
4
+ <a href="#configuration">Configuration</a>
5
+ ⬅️
6
+ <br /><br />
7
+ <img src="docs/images/transit-departures-widget-logo.svg" alt="Transit Departures Widget" />
8
+ <br /><br />
9
+ <a href="https://www.npmjs.com/package/transit-departures-widget" rel="nofollow"><img src="https://img.shields.io/npm/v/transit-departures-widget.svg?style=flat" style="max-width: 100%;"></a>
10
+ <a href="https://www.npmjs.com/package/transit-departures-widget" rel="nofollow"><img src="https://img.shields.io/npm/dm/transit-departures-widget.svg?style=flat" style="max-width: 100%;"></a>
11
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg">
12
+ <br /><br />
13
+ Build a realtime transit departures lookup widget from GTFS and GTFS-Realtime.
14
+ <br /><br />
15
+ <a href="https://nodei.co/npm/transit-departures-widget/" rel="nofollow"><img src="https://nodei.co/npm/transit-departures-widget.png?downloads=true" alt="NPM" style="max-width: 100%;"></a>
16
+ </p>
17
+
18
+ <hr>
19
+
20
+ Transit Departures Widget generates a user-friendly transit realtime departures widget in HTML format directly from [GTFS and GTFS-RT transit data](http://gtfs.org/). Most transit agencies have schedule data in GTFS format and many publish realtime departures using GTFS-Realtime. This project generates HTML, JS and CSS for use on a transit agency website to allow users to see when the next vehicle is departing from a specific stop.
21
+
22
+ <img width="593" alt="transit-departures-widget1" src="https://user-images.githubusercontent.com/96217/115478598-5fbcbd00-a1fb-11eb-833c-4005bfa442d8.png">
23
+ <p>Lookup by route, direction and stop</p>
24
+
25
+ <img width="618" alt="transit-departures-widget2" src="https://user-images.githubusercontent.com/96217/115478607-63504400-a1fb-11eb-9ca6-548d1f27230f.png">
26
+ <p>Lookup by stop name</p>
27
+
28
+ <img width="597" alt="transit-departures-widget3" src="https://user-images.githubusercontent.com/96217/115478620-677c6180-a1fb-11eb-9349-431cc82cfe3f.png">
29
+ <p>Lookup by stop code</p>
30
+
31
+ Users can lookup departures by choosing a route, direction and stop or by entering stop id directly. If a stop code is entered, departures for all routes serving that stop are shown.
32
+
33
+ Features:
34
+
35
+ - Auto-refreshes departures every 20 seconds. (configurable with the `refreshIntervalSeconds` parameter)
36
+
37
+ - Caches departures so looking up additional stops is instantaneous.
38
+
39
+ - Typeahead autocomplete of stop names makes it easy to look up stops by name.
40
+
41
+ - Appends stop_id to URL to support linking to departures for a specific stop or bookmarking the page.
42
+
43
+ - Uses `route_color` and `route_text_color` for a stop circle in results.
44
+
45
+ - Fetches GTFS-RT data directly - no server-side code is needed.
46
+
47
+ - Supports creation of custom HTML templates for complete control over how the widget is rendered.
48
+
49
+ ## Demo
50
+
51
+ An demo of the widget is available at https://transit-departures-widget.blinktag.com/. Note that this demo will only return departures during hours where vehicles for the demo agency is operating, roughly 7 AM to 10 PM Pacific time.
52
+
53
+ ## Current Usage
54
+
55
+ The following transit agencies use `transit-departures-widget` as the departures tool on their websites:
56
+
57
+ - [Marin Transit](https://marintransit.org/)
58
+
59
+ ## Command Line Usage
60
+
61
+ The `transit-departures-widget` command-line utility will download the GTFS file specified in `config.js` and then build the transit departures widget and save the HTML, CSS and JS in `html/:agency_key`.
62
+
63
+ If you would like to use this library as a command-line utility, you can install it globally directly from [npm](https://npmjs.org):
64
+
65
+ npm install transit-departures-widget -g
66
+
67
+ Then you can run `transit-departures-widget`.
68
+
69
+ transit-departures-widget
70
+
71
+ ### Command-line options
72
+
73
+ `configPath`
74
+
75
+ Allows specifying a path to a configuration json file. By default, `transit-departures-widget` will look for a `config.json` file in the directory it is being run from.
76
+
77
+ transit-departures-widget --configPath /path/to/your/custom-config.json
78
+
79
+ `skipImport`
80
+
81
+ Skips importing GTFS into SQLite. Useful if you are rerunning with an unchanged GTFS file. If you use this option and the GTFS file hasn't been imported, you'll get an error.
82
+
83
+ transit-departures-widget --skipImport
84
+
85
+ ## Configuration
86
+
87
+ Copy `config-sample.json` to `config.json` and then add your projects configuration to `config.json`.
88
+
89
+ cp config-sample.json config.json
90
+
91
+ | option | type | description |
92
+ | --------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------- |
93
+ | [`agency`](#agency) | object | Information about the GTFS and GTFS-RT to be used. |
94
+ | [`beautify`](#beautify) | boolean | Whether or not to beautify the HTML output. |
95
+ | [`locale`](#locale) | string | The 2-letter code of the language to use for the interface. |
96
+ | [`noHead`](#nohead) | boolean | Whether or not to skip the header and footer of the HTML document. |
97
+ | [`refreshIntervalSeconds`](#refreshIntervalSeconds) | integer | How often the widget should refresh departure data in seconds. Optional, defaults to 20 seconds. |
98
+ | [`skipImport`](#skipimport) | boolean | Whether or not to skip importing GTFS data into SQLite. |
99
+ | [`sqlitePath`](#sqlitepath) | string | A path to an SQLite database. Optional, defaults to using an in-memory database. |
100
+ | [`templatePath`](#templatepath) | string | Path to custom pug template for rendering widget. |
101
+ | [`timeFormat`](#timeFormat) | string | The format (12hour or 24hour) for the "as of" display. |
102
+
103
+ ### agency
104
+
105
+ {Object} Specify the GTFS file to be imported in an `agency` object. Static GTFS files can be imported via a `url` or a local `path`.
106
+
107
+ `agency_key` is a short name you create that is specific to that GTFS file.
108
+
109
+ `gtfs_static_url` is the URL of an agency's static GTFS. Either `gtfs_static_url` or `gtfs_static_path` is required.
110
+
111
+ `gtfs_static_path` is the local path to an agency's static GTFS on your local machine. Either `gtfs_static_url` or `gtfs_static_path` is required.
112
+
113
+ `gtfs_rt_tripupdates_url` is the URL of an agency's GTFS-RT trip updates. Note that the GTFS-RT URL must support [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) in order for the widget to work.
114
+
115
+ - Specify a download URL for static GTFS:
116
+
117
+ ```
118
+ {
119
+ "agency": {
120
+ "agency_key": "marintransit",
121
+ "gtfs_static_url": "https://marintransit.org/data/google_transit.zip",
122
+ "gtfs_rt_tripupdates_url": "https://marintransit.net/gtfs-rt/tripupdates"
123
+ }
124
+ }
125
+ ```
126
+
127
+ - Specify a path to a zipped GTFS file:
128
+
129
+ ```
130
+ {
131
+ "agency": {
132
+ "agency_key": "marintransit",
133
+ "gtfs_static_path": "/path/to/the/gtfs.zip",
134
+ "gtfs_rt_tripupdates_url": "https://marintransit.net/gtfs-rt/tripupdates"
135
+ }
136
+ }
137
+ ```
138
+
139
+ - Specify a path to an unzipped GTFS file:
140
+
141
+ ```
142
+ {
143
+ "agency": {
144
+ "agency_key": "marintransit",
145
+ "gtfs_static_path": "/path/to/the/unzipped/gtfs",
146
+ "gtfs_rt_tripupdates_url": "https://marintransit.net/gtfs-rt/tripupdates"
147
+ }
148
+ }
149
+ ```
150
+
151
+ ### beautify
152
+
153
+ {Boolean} Whether or not to beautify the HTML output. Defaults to `false`.
154
+
155
+ ```
156
+ "beautify": false
157
+ ```
158
+
159
+ ### locale
160
+
161
+ {String} The 2-letter language code of the language to use for the interface. Current languages supported are Polish (`pl`) and English (`en`). Pull Requests welcome for translations to other languages. Defaults to `en` (English).
162
+
163
+ ```
164
+ "locale": "en'
165
+ ```
166
+
167
+ ### noHead
168
+
169
+ {Boolean} Whether or not to skip the HTML head and footer when generating the HTML for the widget. This is useful for creating embeddable HTML without `<html>`, `<head>` or `<body>` tags. Defaults to `false`.
170
+
171
+ ```
172
+ "noHead": false
173
+ ```
174
+
175
+ ### refreshIntervalSeconds
176
+
177
+ {Integer} How often the widget should refresh departure data in seconds. Optional, defaults to 20 seconds.
178
+
179
+ ```
180
+ "refreshIntervalSeconds": 30
181
+ ```
182
+
183
+ ### skipImport
184
+
185
+ {Boolean} Whether or not to skip importing from GTFS into SQLite. Useful for re-running the script if the GTFS data has not changed. If you use this option and the GTFS file hasn't been imported or you don't have an `sqlitePath` to a non-in-memory database specified, you'll get an error. Defaults to `false`.
186
+
187
+ ```
188
+ "skipImport": false
189
+ ```
190
+
191
+ ### sqlitePath
192
+
193
+ {String} A path to an SQLite database. Optional, defaults to using an in-memory database.
194
+
195
+ ```
196
+ "sqlitePath": "/tmp/gtfs"
197
+ ```
198
+
199
+ ### templatePath
200
+
201
+ {String} Path to a folder containing (pug)[https://pugjs.org/] template for rendering the widget widget. This is optional. Defaults to using the templates provided in `views/widget`. All files within the `/views/custom` folder will be .gitignored, so you can copy the `views/widget` folder to `views/custom/myagency` and make any modifications needed. Any custom views folder should contain pug templates called `widget.pug` and `widget_full.pug`.
202
+
203
+ ```
204
+ "templatePath": "views/custom/my-agency/"
205
+ ```
206
+
207
+ ### timeFormat
208
+
209
+ {String} The format (`12hour` or `24hour`) for the "as of" display. Defaults to `12hour`.
210
+
211
+ ```
212
+ "timeFormat": "12hour"
213
+ ```
214
+
215
+ ## Previewing HTML output
216
+
217
+ It can be useful to run the example Express application included in the `app` folder as a way to quickly preview all routes or see changes you are making to custom template.
218
+
219
+ After an initial run of `transit-departures-widget`, the GTFS data will be downloaded and loaded into SQLite.
220
+
221
+ You can view an individual route HTML on demand by running the included Express app:
222
+
223
+ node app
224
+
225
+ By default, `transit-departures-widget` will look for a `config.json` file in the project root. To specify a different path for the configuration file:
226
+
227
+ node app --configPath /path/to/your/custom-config.json
228
+
229
+ Once running, you can view the HTML in your browser at [localhost:3000](http://localhost:3000)
230
+
231
+ ## Notes
232
+
233
+ `transit-departures-widget` uses the [`node-gtfs`](https://github.com/blinktaginc/node-gtfs) library to handle importing and querying GTFS data.
234
+
235
+ ## Contributing
236
+
237
+ Pull requests are welcome, as is feedback and [reporting issues](https://github.com/blinktaginc/transit-departures-widget/issues).
package/app/index.js ADDED
@@ -0,0 +1,73 @@
1
+ import path from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { readFileSync } from 'node:fs'
4
+ import yargs from 'yargs'
5
+ import { openDb } from 'gtfs'
6
+
7
+ import express from 'express'
8
+ import logger from 'morgan'
9
+
10
+ import {
11
+ setDefaultConfig,
12
+ generateTransitDeparturesWidgetHtml,
13
+ } from '../lib/utils.js'
14
+
15
+ const { argv } = yargs(process.argv).option('c', {
16
+ alias: 'configPath',
17
+ describe: 'Path to config file',
18
+ default: './config.json',
19
+ type: 'string',
20
+ })
21
+
22
+ const app = express()
23
+ const router = new express.Router()
24
+
25
+ const configPath = argv.configPath || new URL('../config.json', import.meta.url)
26
+ const selectedConfig = JSON.parse(readFileSync(configPath))
27
+
28
+ const config = setDefaultConfig(selectedConfig)
29
+ // Override noHead config option so full HTML pages are generated
30
+ config.noHead = false
31
+ config.assetPath = '/'
32
+ config.log = console.log
33
+ config.logWarning = console.warn
34
+ config.logError = console.error
35
+
36
+ try {
37
+ openDb(config)
38
+ } catch (error) {
39
+ if (error instanceof Error && error.code === 'SQLITE_CANTOPEN') {
40
+ config.logError(
41
+ `Unable to open sqlite database "${config.sqlitePath}" defined as \`sqlitePath\` config.json. Ensure the parent directory exists or remove \`sqlitePath\` from config.json.`,
42
+ )
43
+ }
44
+
45
+ throw error
46
+ }
47
+
48
+ /*
49
+ * Show the transit departures widget
50
+ */
51
+ router.get('/', async (request, response, next) => {
52
+ try {
53
+ const html = await generateTransitDeparturesWidgetHtml(config)
54
+ response.send(html)
55
+ } catch (error) {
56
+ next(error)
57
+ }
58
+ })
59
+
60
+ app.set('views', path.join(fileURLToPath(import.meta.url), '../../views'))
61
+ app.set('view engine', 'pug')
62
+
63
+ app.use(logger('dev'))
64
+ app.use(
65
+ express.static(path.join(fileURLToPath(import.meta.url), '../../public')),
66
+ )
67
+
68
+ app.use('/', router)
69
+ app.set('port', process.env.PORT || 3000)
70
+
71
+ const server = app.listen(app.get('port'), () => {
72
+ console.log(`Express server listening on port ${server.address().port}`)
73
+ })
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ import yargs from 'yargs'
4
+ import { hideBin } from 'yargs/helpers'
5
+ import { getConfig } from '../lib/file-utils.js'
6
+ import { formatError } from '../lib/log-utils.js'
7
+ import transitDeparturesWidget from '../index.js'
8
+
9
+ const { argv } = yargs(hideBin(process.argv))
10
+ .usage('Usage: $0 --config ./config.json')
11
+ .help()
12
+ .option('c', {
13
+ alias: 'configPath',
14
+ describe: 'Path to config file',
15
+ default: './config.json',
16
+ type: 'string',
17
+ })
18
+ .option('s', {
19
+ alias: 'skipImport',
20
+ describe: 'Don’t import GTFS file.',
21
+ type: 'boolean',
22
+ })
23
+ .default('skipImport', undefined)
24
+
25
+ const handleError = (error) => {
26
+ const text = error || 'Unknown Error'
27
+ process.stdout.write(`\n${formatError(text)}\n`)
28
+ console.error(error)
29
+ process.exit(1)
30
+ }
31
+
32
+ const setupImport = async () => {
33
+ const config = await getConfig(argv)
34
+ await transitDeparturesWidget(config)
35
+ process.exit()
36
+ }
37
+
38
+ setupImport().catch(handleError)
@@ -0,0 +1,13 @@
1
+ {
2
+ "agency": {
3
+ "agency_key": "youragency",
4
+ "gtfs_static_url": "https://marintransit.org/data/google_transit.zip",
5
+ "gtfs_rt_tripupdates_url": "https://marintransit.net/gtfs-rt/tripupdates"
6
+ },
7
+ "beautify": true,
8
+ "locale": "en",
9
+ "noHead": false,
10
+ "refreshIntervalSeconds": 20,
11
+ "templatePath": "views/widget",
12
+ "timeFormat": "12hour"
13
+ }
@@ -0,0 +1,18 @@
1
+ <svg width="375" height="375" viewBox="0 0 375 375" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M328.142 240.458V119.026C328.142 106.956 321.684 95.822 311.162 89.7868L205.951 29.0187C195.43 22.9836 182.617 22.9836 172.096 29.0187L66.8843 89.6828C56.3632 95.718 49.9046 106.852 49.9046 119.026V240.458C49.9046 252.529 56.3632 263.663 66.8843 269.698L172.096 330.362C182.617 336.397 195.43 336.397 205.951 330.362L311.267 269.594C321.684 263.663 328.142 252.529 328.142 240.458Z" fill="#FF8038"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M189.075 316.21C186.471 316.21 183.867 315.482 181.471 314.233L76.2596 253.465C71.5719 250.76 68.6552 245.765 68.6552 240.354V119.026C68.6552 113.615 71.5719 108.621 76.1554 105.915L181.471 45.1473C183.763 43.7945 186.367 43.1702 189.075 43.1702C191.784 43.1702 194.284 43.8986 196.68 45.1473L301.995 105.915C306.683 108.621 309.6 113.615 309.6 119.026V240.458C309.6 245.869 306.683 250.864 301.995 253.569L196.68 314.337C194.284 315.482 191.68 316.21 189.075 316.21Z" fill="#9CFC61"/>
4
+ <mask id="mask0_4_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="59" y="157" width="259" height="61">
5
+ <path d="M59.6457 157.301H317.646V217.301H59.6457V157.301Z" fill="white"/>
6
+ </mask>
7
+ <g mask="url(#mask0_4_2)">
8
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M59.6457 58.2317H317.646V316.232H59.6457V58.2317Z" fill="#FF8038"/>
9
+ </g>
10
+ <mask id="mask1_4_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="171" y="268" width="36" height="35">
11
+ <path d="M171 268H206.139V302.037H171V268Z" fill="white"/>
12
+ </mask>
13
+ <g mask="url(#mask1_4_2)">
14
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M193.917 279.167L206.139 280.912L197.335 289.657L199.471 301.948L188.523 296.186L177.621 302.037L179.658 289.73L170.785 281.056L182.993 279.212L188.41 268L193.917 279.167Z" fill="white"/>
15
+ </g>
16
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M227.87 89.8803C227.87 88.6713 227.312 87.7413 226.289 87.0903C226.103 86.9973 225.824 86.8113 225.638 86.7183C225.638 83.6494 225.545 80.4875 225.359 77.3256C224.987 70.0718 221.174 66.5378 214.013 66.4448C207.782 66.4448 201.551 66.4448 195.32 66.4448C185.183 66.4448 175.139 66.3518 165.002 66.5378C155.702 66.7238 151.982 70.6297 151.982 79.9295C151.982 82.1614 151.982 84.3934 151.982 86.7183C151.424 86.9043 150.959 87.3693 150.587 87.8343C149.936 88.3923 149.75 89.2293 149.75 90.1592C149.75 94.4371 149.75 98.715 149.75 103.086C149.75 104.388 150.215 105.411 151.331 106.062C151.61 106.248 151.796 106.341 152.075 106.434C152.075 115.641 152.075 124.754 152.075 133.961C152.075 135.263 151.889 136.751 152.54 137.867C153.935 140.099 153.656 142.517 153.749 144.935C153.842 147.911 155.795 149.957 158.771 150.05C160.91 150.143 163.049 150.143 165.188 150.05C168.257 149.957 170.21 148.19 170.303 145.121C170.396 143.819 170.582 143.354 172.07 143.354C183.23 143.447 194.483 143.447 205.643 143.354C207.038 143.354 207.41 143.726 207.41 145.121C207.503 148.376 209.456 150.05 212.711 150.05C214.571 150.05 216.431 150.05 218.291 150.05C222.104 150.05 223.964 148.097 224.057 144.284C224.057 142.796 223.592 141.122 224.429 139.727C225.452 137.867 225.731 136.007 225.731 133.961C225.731 125.312 225.731 116.664 225.731 106.434C226.382 106.341 226.94 105.783 227.312 105.225C227.777 104.667 227.963 103.923 227.963 103.179C227.87 98.808 227.87 94.3441 227.87 89.8803ZM173.279 73.1407C178.859 73.1407 184.439 73.1407 189.926 73.1407C195.32 73.1407 200.714 73.1407 206.201 73.1407C208.619 73.1407 208.898 73.5127 208.991 76.3026C208.991 79.3715 208.712 79.8365 206.387 79.8365C195.32 79.8365 184.253 79.8365 173.279 79.8365C170.861 79.8365 170.396 79.2785 170.396 76.4886C170.303 73.6987 170.768 73.1407 173.279 73.1407ZM166.304 135.077C163.049 135.077 160.352 132.38 160.352 129.125C160.445 125.963 163.142 123.359 166.211 123.359C169.466 123.359 171.884 125.87 171.884 129.218C171.977 132.473 169.466 135.077 166.304 135.077ZM165.467 114.99C161.933 114.99 160.352 113.316 160.352 109.689C160.352 103.179 160.352 96.6691 160.352 90.1592C160.352 86.5323 161.84 85.0444 165.467 85.0444C173.279 85.0444 180.998 85.0444 188.81 85.0444C196.436 85.0444 204.062 85.0444 211.688 85.0444C215.78 85.0444 217.175 86.4393 217.175 90.4382C217.175 96.6691 217.175 102.9 217.175 109.131C217.175 112.851 215.129 114.897 211.409 114.99C196.157 114.99 180.812 114.99 165.467 114.99ZM211.409 135.077C208.247 135.077 205.736 132.566 205.643 129.311C205.643 125.963 208.061 123.452 211.316 123.452C214.571 123.452 217.268 126.149 217.268 129.404C217.175 132.38 214.571 135.077 211.409 135.077Z" fill="white"/>
17
+ <path d="M71.6277 177.8H68.5227V175.1H77.7027V177.8H74.5977V194H71.6277V177.8ZM79.1407 175.1H83.5417C85.0717 175.1 86.1877 175.46 86.8897 176.18C87.5917 176.882 87.9427 177.971 87.9427 179.447V180.608C87.9427 182.57 87.2947 183.812 85.9987 184.334V184.388C86.7187 184.604 87.2227 185.045 87.5107 185.711C87.8167 186.377 87.9697 187.268 87.9697 188.384V191.705C87.9697 192.245 87.9877 192.686 88.0237 193.028C88.0597 193.352 88.1497 193.676 88.2937 194H85.2697C85.1617 193.694 85.0897 193.406 85.0537 193.136C85.0177 192.866 84.9997 192.38 84.9997 191.678V188.222C84.9997 187.358 84.8557 186.755 84.5677 186.413C84.2977 186.071 83.8207 185.9 83.1367 185.9H82.1107V194H79.1407V175.1ZM83.1907 183.2C83.7847 183.2 84.2257 183.047 84.5137 182.741C84.8197 182.435 84.9727 181.922 84.9727 181.202V179.744C84.9727 179.06 84.8467 178.565 84.5947 178.259C84.3607 177.953 83.9827 177.8 83.4607 177.8H82.1107V183.2H83.1907ZM92.3253 175.1H96.3483L99.4263 194H96.4563L95.9163 190.247V190.301H92.5413L92.0013 194H89.2473L92.3253 175.1ZM95.5653 187.736L94.2423 178.394H94.1883L92.8923 187.736H95.5653ZM100.867 175.1H104.593L107.482 186.413H107.536V175.1H110.182V194H107.131L103.567 180.203H103.513V194H100.867V175.1ZM116.251 194.27C114.811 194.27 113.722 193.865 112.984 193.055C112.246 192.227 111.877 191.048 111.877 189.518V188.438H114.685V189.734C114.685 190.958 115.198 191.57 116.224 191.57C116.728 191.57 117.106 191.426 117.358 191.138C117.628 190.832 117.763 190.346 117.763 189.68C117.763 188.888 117.583 188.195 117.223 187.601C116.863 186.989 116.197 186.26 115.225 185.414C114.001 184.334 113.146 183.362 112.66 182.498C112.174 181.616 111.931 180.626 111.931 179.528C111.931 178.034 112.309 176.882 113.065 176.072C113.821 175.244 114.919 174.83 116.359 174.83C117.781 174.83 118.852 175.244 119.572 176.072C120.31 176.882 120.679 178.052 120.679 179.582V180.365H117.871V179.393C117.871 178.745 117.745 178.277 117.493 177.989C117.241 177.683 116.872 177.53 116.386 177.53C115.396 177.53 114.901 178.133 114.901 179.339C114.901 180.023 115.081 180.662 115.441 181.256C115.819 181.85 116.494 182.57 117.466 183.416C118.708 184.496 119.563 185.477 120.031 186.359C120.499 187.241 120.733 188.276 120.733 189.464C120.733 191.012 120.346 192.2 119.572 193.028C118.816 193.856 117.709 194.27 116.251 194.27ZM122.436 175.1H125.406V194H122.436V175.1ZM129.952 177.8H126.847V175.1H136.027V177.8H132.922V194H129.952V177.8ZM141.789 175.1H146.325C147.801 175.1 148.908 175.496 149.646 176.288C150.384 177.08 150.753 178.241 150.753 179.771V189.329C150.753 190.859 150.384 192.02 149.646 192.812C148.908 193.604 147.801 194 146.325 194H141.789V175.1ZM146.271 191.3C146.757 191.3 147.126 191.156 147.378 190.868C147.648 190.58 147.783 190.112 147.783 189.464V179.636C147.783 178.988 147.648 178.52 147.378 178.232C147.126 177.944 146.757 177.8 146.271 177.8H144.759V191.3H146.271ZM152.758 175.1H160.858V177.8H155.728V182.795H159.805V185.495H155.728V191.3H160.858V194H152.758V175.1ZM162.566 175.1H166.94C168.416 175.1 169.523 175.496 170.261 176.288C170.999 177.08 171.368 178.241 171.368 179.771V181.634C171.368 183.164 170.999 184.325 170.261 185.117C169.523 185.909 168.416 186.305 166.94 186.305H165.536V194H162.566V175.1ZM166.94 183.605C167.426 183.605 167.786 183.47 168.02 183.2C168.272 182.93 168.398 182.471 168.398 181.823V179.582C168.398 178.934 168.272 178.475 168.02 178.205C167.786 177.935 167.426 177.8 166.94 177.8H165.536V183.605H166.94ZM174.327 175.1H178.35L181.428 194H178.458L177.918 190.247V190.301H174.543L174.003 194H171.249L174.327 175.1ZM177.567 187.736L176.244 178.394H176.19L174.894 187.736H177.567ZM182.869 175.1H187.27C188.8 175.1 189.916 175.46 190.618 176.18C191.32 176.882 191.671 177.971 191.671 179.447V180.608C191.671 182.57 191.023 183.812 189.727 184.334V184.388C190.447 184.604 190.951 185.045 191.239 185.711C191.545 186.377 191.698 187.268 191.698 188.384V191.705C191.698 192.245 191.716 192.686 191.752 193.028C191.788 193.352 191.878 193.676 192.022 194H188.998C188.89 193.694 188.818 193.406 188.782 193.136C188.746 192.866 188.728 192.38 188.728 191.678V188.222C188.728 187.358 188.584 186.755 188.296 186.413C188.026 186.071 187.549 185.9 186.865 185.9H185.839V194H182.869V175.1ZM186.919 183.2C187.513 183.2 187.954 183.047 188.242 182.741C188.548 182.435 188.701 181.922 188.701 181.202V179.744C188.701 179.06 188.575 178.565 188.323 178.259C188.089 177.953 187.711 177.8 187.189 177.8H185.839V183.2H186.919ZM196.028 177.8H192.923V175.1H202.103V177.8H198.998V194H196.028V177.8ZM207.861 194.27C206.421 194.27 205.323 193.865 204.567 193.055C203.811 192.227 203.433 191.048 203.433 189.518V175.1H206.403V189.734C206.403 190.382 206.529 190.85 206.781 191.138C207.051 191.426 207.429 191.57 207.915 191.57C208.401 191.57 208.77 191.426 209.022 191.138C209.292 190.85 209.427 190.382 209.427 189.734V175.1H212.289V189.518C212.289 191.048 211.911 192.227 211.155 193.055C210.399 193.865 209.301 194.27 207.861 194.27ZM214.404 175.1H218.805C220.335 175.1 221.451 175.46 222.153 176.18C222.855 176.882 223.206 177.971 223.206 179.447V180.608C223.206 182.57 222.558 183.812 221.262 184.334V184.388C221.982 184.604 222.486 185.045 222.774 185.711C223.08 186.377 223.233 187.268 223.233 188.384V191.705C223.233 192.245 223.251 192.686 223.287 193.028C223.323 193.352 223.413 193.676 223.557 194H220.533C220.425 193.694 220.353 193.406 220.317 193.136C220.281 192.866 220.263 192.38 220.263 191.678V188.222C220.263 187.358 220.119 186.755 219.831 186.413C219.561 186.071 219.084 185.9 218.4 185.9H217.374V194H214.404V175.1ZM218.454 183.2C219.048 183.2 219.489 183.047 219.777 182.741C220.083 182.435 220.236 181.922 220.236 181.202V179.744C220.236 179.06 220.11 178.565 219.858 178.259C219.624 177.953 219.246 177.8 218.724 177.8H217.374V183.2H218.454ZM225.294 175.1H233.394V177.8H228.264V182.795H232.341V185.495H228.264V191.3H233.394V194H225.294V175.1ZM239.016 194.27C237.576 194.27 236.487 193.865 235.749 193.055C235.011 192.227 234.642 191.048 234.642 189.518V188.438H237.45V189.734C237.45 190.958 237.963 191.57 238.989 191.57C239.493 191.57 239.871 191.426 240.123 191.138C240.393 190.832 240.528 190.346 240.528 189.68C240.528 188.888 240.348 188.195 239.988 187.601C239.628 186.989 238.962 186.26 237.99 185.414C236.766 184.334 235.911 183.362 235.425 182.498C234.939 181.616 234.696 180.626 234.696 179.528C234.696 178.034 235.074 176.882 235.83 176.072C236.586 175.244 237.684 174.83 239.124 174.83C240.546 174.83 241.617 175.244 242.337 176.072C243.075 176.882 243.444 178.052 243.444 179.582V180.365H240.636V179.393C240.636 178.745 240.51 178.277 240.258 177.989C240.006 177.683 239.637 177.53 239.151 177.53C238.161 177.53 237.666 178.133 237.666 179.339C237.666 180.023 237.846 180.662 238.206 181.256C238.584 181.85 239.259 182.57 240.231 183.416C241.473 184.496 242.328 185.477 242.796 186.359C243.264 187.241 243.498 188.276 243.498 189.464C243.498 191.012 243.111 192.2 242.337 193.028C241.581 193.856 240.474 194.27 239.016 194.27ZM248.823 175.1H251.685L253.008 189.626H253.062L254.466 175.1H257.706L259.11 189.626H259.164L260.487 175.1H263.052L261.135 194H257.436L256.086 181.256H256.032L254.682 194H250.74L248.823 175.1ZM264.555 175.1H267.525V194H264.555V175.1ZM269.749 175.1H274.285C275.761 175.1 276.868 175.496 277.606 176.288C278.344 177.08 278.713 178.241 278.713 179.771V189.329C278.713 190.859 278.344 192.02 277.606 192.812C276.868 193.604 275.761 194 274.285 194H269.749V175.1ZM274.231 191.3C274.717 191.3 275.086 191.156 275.338 190.868C275.608 190.58 275.743 190.112 275.743 189.464V179.636C275.743 178.988 275.608 178.52 275.338 178.232C275.086 177.944 274.717 177.8 274.231 177.8H272.719V191.3H274.231ZM284.93 194.27C283.49 194.27 282.392 193.865 281.636 193.055C280.88 192.227 280.502 191.048 280.502 189.518V179.582C280.502 178.052 280.88 176.882 281.636 176.072C282.392 175.244 283.49 174.83 284.93 174.83C286.37 174.83 287.468 175.244 288.224 176.072C288.98 176.882 289.358 178.052 289.358 179.582V181.202H286.55V179.393C286.55 178.151 286.037 177.53 285.011 177.53C283.985 177.53 283.472 178.151 283.472 179.393V189.734C283.472 190.958 283.985 191.57 285.011 191.57C286.037 191.57 286.55 190.958 286.55 189.734V186.035H285.065V183.335H289.358V189.518C289.358 191.048 288.98 192.227 288.224 193.055C287.468 193.865 286.37 194.27 284.93 194.27ZM291.265 175.1H299.365V177.8H294.235V182.795H298.312V185.495H294.235V191.3H299.365V194H291.265V175.1ZM303.395 177.8H300.29V175.1H309.47V177.8H306.365V194H303.395V177.8Z" fill="white"/>
18
+ </svg>
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default } from './lib/transit-departures-widget.js'