@signalk/freeboard-sk 2.6.0 → 2.7.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/CHANGELOG.md +19 -0
- package/package.json +21 -21
- package/plugin/alarms/alarms.js +6 -11
- package/plugin/index.js +14 -0
- package/plugin/weather/openweather.js +3 -1
- package/plugin/weather/weather-service.js +20 -1
- package/public/327.7a922d3e3f05f7c0.js +1 -0
- package/public/3rdpartylicenses.txt +4 -4
- package/public/assets/help/img/settings_vessels_1.png +0 -0
- package/public/assets/help/img/settings_vessels_2.png +0 -0
- package/public/assets/help/index.html +24 -4
- package/public/index.html +2 -2
- package/public/main.e7d0c5c6304e80c5.js +1 -0
- package/public/polyfills.a2573337c4e88a2c.js +1 -0
- package/public/{runtime.c7f9b6cf7269498e.js → runtime.3895660a09267773.js} +1 -1
- package/public/styles.70744bcef6dc2db0.css +1 -0
- package/public/760.88e828fd37733cbd.js +0 -1
- package/public/assets/help/img/settings_vessels.png +0 -0
- package/public/main.8e02670b90762557.js +0 -1
- package/public/polyfills.61cfd308b28d8fe0.js +0 -1
- package/public/styles.40dbd8d248f3020d.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# CHANGELOG: Freeboard
|
|
2
2
|
|
|
3
|
+
### v2.7.0
|
|
4
|
+
|
|
5
|
+
- **Added**: OpenWeather OneCall v3.0 support. _(v2.5 is deprecated April 2024)_
|
|
6
|
+
- **Added**: OpenWeather service polling watchdog to protect against excessive API calls.
|
|
7
|
+
- **Added**: Kiosk mode to support view-only operation.
|
|
8
|
+
- **Update**: Hide login / change user menu item when token supplied in url parameter.
|
|
9
|
+
- **Update**: Measurement not shows angle as well as distance. (#145)
|
|
10
|
+
- **Fixed**: Settings menu overflow on smaller screens. (#144)
|
|
11
|
+
- **Fixed**: Weather station name display in popover when not closed. (#147)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### v2.6.1
|
|
15
|
+
|
|
16
|
+
- **Added**: Options to display and configure Heading and COG lines on map. (#138)
|
|
17
|
+
- **Added**: Additional position display format option (e.g. 020° 44.56' E).
|
|
18
|
+
- **Updated**: Use HTTP credentials when user is already logged in via Admin UI. _(signalk-client-angular@2.0.3)_
|
|
19
|
+
- **Updated**: Angular framework version (v17.3)
|
|
20
|
+
- **Updated**: OpenLayers (v9.0)
|
|
21
|
+
|
|
3
22
|
### v2.6.0
|
|
4
23
|
|
|
5
24
|
- **Added**: Ability to show / hide toolbar buttons on both sides of the screen.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalk/freeboard-sk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Openlayers chart plotter implementation for Signal K",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"signalk-webapp",
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"tslib": "^2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@angular-devkit/build-angular": "^
|
|
47
|
-
"@angular/animations": "^
|
|
48
|
-
"@angular/cdk": "^
|
|
49
|
-
"@angular/cli": "^
|
|
50
|
-
"@angular/common": "^
|
|
51
|
-
"@angular/compiler": "^
|
|
52
|
-
"@angular/compiler-cli": "^
|
|
53
|
-
"@angular/core": "^
|
|
54
|
-
"@angular/forms": "^
|
|
55
|
-
"@angular/language-service": "^
|
|
56
|
-
"@angular/material": "^
|
|
57
|
-
"@angular/platform-browser": "^
|
|
58
|
-
"@angular/platform-browser-dynamic": "^
|
|
46
|
+
"@angular-devkit/build-angular": "^17.3.0",
|
|
47
|
+
"@angular/animations": "^17.3.0",
|
|
48
|
+
"@angular/cdk": "^17.3.0",
|
|
49
|
+
"@angular/cli": "^17.3.0",
|
|
50
|
+
"@angular/common": "^17.3.0",
|
|
51
|
+
"@angular/compiler": "^17.3.0",
|
|
52
|
+
"@angular/compiler-cli": "^17.3.0",
|
|
53
|
+
"@angular/core": "^17.3.0",
|
|
54
|
+
"@angular/forms": "^17.3.0",
|
|
55
|
+
"@angular/language-service": "^17.3.0",
|
|
56
|
+
"@angular/material": "^17.3.0",
|
|
57
|
+
"@angular/platform-browser": "^17.3.0",
|
|
58
|
+
"@angular/platform-browser-dynamic": "^17.3.0",
|
|
59
59
|
"@kolkov/angular-editor": "^2.1.0",
|
|
60
60
|
"@types/arcgis-rest-api": "^10.4.5",
|
|
61
61
|
"@types/express": "^4.17.17",
|
|
@@ -77,24 +77,24 @@
|
|
|
77
77
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
|
78
78
|
"karma-jasmine": "~4.0.0",
|
|
79
79
|
"karma-jasmine-html-reporter": "^1.5.0",
|
|
80
|
-
"ng-packagr": "^
|
|
80
|
+
"ng-packagr": "^17.3.0",
|
|
81
81
|
"ngeohash": "^0.6.3",
|
|
82
|
-
"ol": "^
|
|
83
|
-
"ol-mapbox-style": "^12.
|
|
82
|
+
"ol": "^9.0.0",
|
|
83
|
+
"ol-mapbox-style": "^12.2.1",
|
|
84
84
|
"pmtiles": "^2.7.0",
|
|
85
85
|
"prettier": "^2.5.1",
|
|
86
86
|
"prettier-plugin-organize-attributes": "^0.0.5",
|
|
87
87
|
"proj4": "2.6.2",
|
|
88
88
|
"protractor": "~7.0.0",
|
|
89
89
|
"rxjs": "~6.6.3",
|
|
90
|
-
"signalk-client-angular": "^2.0.
|
|
90
|
+
"signalk-client-angular": "^2.0.3",
|
|
91
91
|
"signalk-worker-angular": "^1.1.4",
|
|
92
92
|
"simplify-ts": "^1.0.2",
|
|
93
93
|
"stream": "^0.0.2",
|
|
94
94
|
"timers": "^0.1.1",
|
|
95
95
|
"ts-node": "~7.0.0",
|
|
96
|
-
"typescript": "~4.
|
|
96
|
+
"typescript": "~5.4.2",
|
|
97
97
|
"xml2js": "^0.6.2",
|
|
98
|
-
"zone.js": "~0.
|
|
98
|
+
"zone.js": "~0.14.4"
|
|
99
99
|
}
|
|
100
|
-
}
|
|
100
|
+
}
|
package/plugin/alarms/alarms.js
CHANGED
|
@@ -94,7 +94,7 @@ const handlePutAlarmState = (context, path, value) => {
|
|
|
94
94
|
server.debug(JSON.stringify(alarmType));
|
|
95
95
|
let noti;
|
|
96
96
|
if (value) {
|
|
97
|
-
const alm = buildAlarmMessage(value.message
|
|
97
|
+
const alm = buildAlarmMessage(value.message);
|
|
98
98
|
noti = {
|
|
99
99
|
path: `notifications.${alarmType}`,
|
|
100
100
|
value: {
|
|
@@ -129,18 +129,13 @@ const handlePutAlarmState = (context, path, value) => {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
const buildAlarmMessage = (message
|
|
133
|
-
|
|
134
|
-
if (['mob', 'sinking'].includes(alarmType)) {
|
|
135
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
-
const pos = server.getSelfPath('navigation.position');
|
|
137
|
-
data = {
|
|
138
|
-
position: pos ? pos.value : null
|
|
139
|
-
};
|
|
140
|
-
}
|
|
132
|
+
const buildAlarmMessage = (message) => {
|
|
133
|
+
const pos = server.getSelfPath('navigation.position');
|
|
141
134
|
return {
|
|
142
135
|
message: message,
|
|
143
|
-
data:
|
|
136
|
+
data: {
|
|
137
|
+
position: pos ? pos.value : null
|
|
138
|
+
}
|
|
144
139
|
};
|
|
145
140
|
};
|
|
146
141
|
// ** send notification delta message **
|
package/plugin/index.js
CHANGED
|
@@ -31,6 +31,13 @@ const CONFIG_SCHEMA = {
|
|
|
31
31
|
title: 'Enable Weather',
|
|
32
32
|
description: ' '
|
|
33
33
|
},
|
|
34
|
+
apiVersion: {
|
|
35
|
+
type: 'number',
|
|
36
|
+
title: 'API Version',
|
|
37
|
+
default: 2,
|
|
38
|
+
enum: [2, 3],
|
|
39
|
+
description: 'Note: v2 API not supported after April 2024!'
|
|
40
|
+
},
|
|
34
41
|
apiKey: {
|
|
35
42
|
type: 'string',
|
|
36
43
|
title: 'API Key',
|
|
@@ -78,6 +85,10 @@ const CONFIG_UISCHEMA = {
|
|
|
78
85
|
'ui:title': ' ',
|
|
79
86
|
'ui:help': ' '
|
|
80
87
|
},
|
|
88
|
+
apiVersion: {
|
|
89
|
+
'ui:widget': 'select',
|
|
90
|
+
'ui-help': ' '
|
|
91
|
+
},
|
|
81
92
|
apiKey: {
|
|
82
93
|
'ui:disabled': false,
|
|
83
94
|
'ui-help': ''
|
|
@@ -97,6 +108,7 @@ module.exports = (server) => {
|
|
|
97
108
|
},
|
|
98
109
|
weather: {
|
|
99
110
|
enable: false,
|
|
111
|
+
apiVersion: 2,
|
|
100
112
|
apiKey: '',
|
|
101
113
|
pollInterval: defaultPollInterval
|
|
102
114
|
},
|
|
@@ -133,10 +145,12 @@ module.exports = (server) => {
|
|
|
133
145
|
}
|
|
134
146
|
settings.weather = options.weather ?? {
|
|
135
147
|
enable: false,
|
|
148
|
+
apiVersion: 2,
|
|
136
149
|
apiKey: '',
|
|
137
150
|
pollInterval: defaultPollInterval
|
|
138
151
|
};
|
|
139
152
|
settings.weather.enable = options.weather.enable ?? false;
|
|
153
|
+
settings.weather.apiVersion = options.weather.apiVersion ?? 2;
|
|
140
154
|
settings.weather.apiKey = options.weather.apiKey ?? '';
|
|
141
155
|
settings.weather.pollInterval =
|
|
142
156
|
options.weather.pollInterval ?? defaultPollInterval;
|
|
@@ -10,7 +10,9 @@ class OpenWeather {
|
|
|
10
10
|
this.settings = config;
|
|
11
11
|
}
|
|
12
12
|
getUrl(position) {
|
|
13
|
-
const
|
|
13
|
+
const v2 = 'https://api.openweathermap.org/data/2.5/onecall';
|
|
14
|
+
const v3 = 'https://api.openweathermap.org/data/3.0/onecall';
|
|
15
|
+
const api = this.settings.apiVersion === 3 ? v3 : v2;
|
|
14
16
|
if (!this.settings.apiKey || !position) {
|
|
15
17
|
return '';
|
|
16
18
|
}
|
|
@@ -9,6 +9,7 @@ exports.defaultStationId = `freeboard-sk`;
|
|
|
9
9
|
let server;
|
|
10
10
|
let pluginId;
|
|
11
11
|
const wakeInterval = 60000;
|
|
12
|
+
let lastWake; // last wake time
|
|
12
13
|
let lastFetch; // last successful fetch
|
|
13
14
|
let fetchInterval = 3600000; // 1hr
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -27,8 +28,12 @@ exports.WEATHER_POLL_INTERVAL = [60, 30, 15];
|
|
|
27
28
|
const initWeather = (app, id, config) => {
|
|
28
29
|
server = app;
|
|
29
30
|
pluginId = id;
|
|
30
|
-
fetchInterval = config.pollInterval * 60000;
|
|
31
|
+
fetchInterval = (config.pollInterval ?? 60) * 60000;
|
|
32
|
+
if (isNaN(fetchInterval)) {
|
|
33
|
+
fetchInterval = 60 * 60000;
|
|
34
|
+
}
|
|
31
35
|
server.debug(`*** Weather: settings: ${JSON.stringify(config)}`);
|
|
36
|
+
server.debug(`*** fetchInterval: ${fetchInterval}`);
|
|
32
37
|
weatherService = new openweather_1.OpenWeather(config);
|
|
33
38
|
weatherServiceName = 'openweather';
|
|
34
39
|
initMeteoEndpoints();
|
|
@@ -201,9 +206,23 @@ const fetchWeatherData = () => {
|
|
|
201
206
|
//server.debug(JSON.stringify(data));
|
|
202
207
|
retryCount = 0;
|
|
203
208
|
lastFetch = Date.now();
|
|
209
|
+
lastWake = Date.now();
|
|
204
210
|
weatherData = data;
|
|
205
211
|
timer = setInterval(() => {
|
|
206
212
|
server.debug(`*** Weather: wake from sleep....poll provider.`);
|
|
213
|
+
const dt = Date.now() - lastWake;
|
|
214
|
+
// check for runaway timer
|
|
215
|
+
if (dt >= 50000) {
|
|
216
|
+
server.debug('Wake timer watchdog -> OK');
|
|
217
|
+
server.debug(`*** Weather: Polling provider.`);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
server.debug('Wake timer watchdog -> NOT OK... Stopping wake timer!');
|
|
221
|
+
server.debug(`Watch interval < 50 secs. (${dt / 1000} secs)`);
|
|
222
|
+
clearInterval(timer);
|
|
223
|
+
server.setPluginError('Weather watch timer error!');
|
|
224
|
+
}
|
|
225
|
+
lastWake = Date.now();
|
|
207
226
|
fetchWeatherData();
|
|
208
227
|
}, wakeInterval);
|
|
209
228
|
emitMeteoDeltas();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var Wy={2222:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=T(y(7029)),P=T(y(3100)),_=T(y(5705)),O=T(y(942)),M=y(7636);function T(h){return h&&h.__esModule?h:{default:h}}f.default=function(I,D,w){var S=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,R=(0,N.default)(I),F=(0,P.default)(I),ee=D/S,ce=(0,_.default)(w),we=(0,_.default)(R),He=(0,_.default)(F),We=Math.asin(Math.sin(we)*Math.cos(ee)+Math.cos(we)*Math.sin(ee)*Math.cos(ce)),Ve=He+Math.atan2(Math.sin(ce)*Math.sin(ee)*Math.cos(we),Math.cos(ee)-Math.sin(we)*Math.sin(We)),ye=(0,O.default)(Ve);return(ye<M.MINLON||ye>M.MAXLON)&&(Ve=(Ve+3*Math.PI)%(2*Math.PI)-Math.PI,ye=(0,O.default)(Ve)),{latitude:(0,O.default)(We),longitude:ye}}},7636:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.areaConversion=f.timeConversion=f.distanceConversion=f.altitudeKeys=f.latitudeKeys=f.longitudeKeys=f.MAXLON=f.MINLON=f.MAXLAT=f.MINLAT=f.earthRadius=f.sexagesimalPattern=void 0,f.sexagesimalPattern=/^([0-9]{1,3})\xb0\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['\u2032]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["\u2033]\s*)?([NEOSW]?)$/,f.earthRadius=6378137,f.MINLAT=-90,f.MAXLAT=90,f.MINLON=-180,f.MAXLON=180,f.longitudeKeys=["lng","lon","longitude",0],f.latitudeKeys=["lat","latitude",1],f.altitudeKeys=["alt","altitude","elevation","elev",2],f.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144},f.timeConversion={m:60,h:3600,d:86400};var D={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};f.areaConversion=D,D.sqm=D.m2,D.sqkm=D.km2,D.sqft=D.ft2,D.sqyd=D.yd2,D.sqin=D.in2},179:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636);f.default=function(M){var g=N.areaConversion[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m"];if(g)return M*g;throw new Error("Invalid unit used for area conversion.")}},917:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636);f.default=function(M){var g=N.distanceConversion[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m"];if(g)return M*g;throw new Error("Invalid unit used for distance conversion.")}},1167:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636);f.default=function(M){switch(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh"){case"kmh":return M*N.timeConversion.h*N.distanceConversion.km;case"mph":return M*N.timeConversion.h*N.distanceConversion.mi;default:return M}}},8948:($,f)=>{function y(h,I){return function M(h){if(Array.isArray(h))return h}(h)||function O(h,I){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(h)){var D=[],w=!0,S=!1,R=void 0;try{for(var ee,F=h[Symbol.iterator]();!(w=(ee=F.next()).done)&&(D.push(ee.value),!I||D.length!==I);w=!0);}catch(ce){S=!0,R=ce}finally{try{!w&&null!=F.return&&F.return()}finally{if(S)throw R}}return D}}(h,I)||function P(h,I){if(h){if("string"==typeof h)return _(h,I);var D=Object.prototype.toString.call(h).slice(8,-1);if("Object"===D&&h.constructor&&(D=h.constructor.name),"Map"===D||"Set"===D)return Array.from(h);if("Arguments"===D||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return _(h,I)}}(h,I)||function N(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(h,I){(null==I||I>h.length)&&(I=h.length);for(var D=0,w=new Array(I);D<I;D++)w[D]=h[D];return w}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(I){var w=y(I.toString().split("."),2),R=w[1],F=Math.abs(Number(w[0])),ee=60*+("0."+(R||0)),ce=ee.toString().split("."),we=Math.floor(ee),He=function(I){var w=Math.pow(10,arguments.length>1&&void 0!==arguments[1]?arguments[1]:4);return Math.round(I*w)/w}(60*+("0."+(ce[1]||0))).toString(),Ve=y(He.split("."),2),ye=Ve[0],ve=Ve[1],xe=void 0===ve?"0":ve;return F+"\xb0 "+we.toString().padStart(2,"0")+"' "+ye.padStart(2,"0")+"."+xe.padEnd(1,"0")+'"'}},1118:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(2447));f.default=function(T,g){return(0,N.default)(T,g)[0]}},1691:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(5705)),P=M(y(7029)),_=M(y(3100)),O=y(7636);function M(m){return m&&m.__esModule?m:{default:m}}f.default=function(h){var I=0;if(h.length>2){for(var D,w,S,R=0;R<h.length;R++){R===h.length-2?(D=h.length-2,w=h.length-1,S=0):R===h.length-1?(D=h.length-1,w=0,S=1):(D=R,w=R+1,S=R+2);var F=(0,_.default)(h[D]),ee=(0,P.default)(h[w]),ce=(0,_.default)(h[S]);I+=((0,N.default)(ce)-(0,N.default)(F))*Math.sin((0,N.default)(ee))}I=I*O.earthRadius*O.earthRadius/2}return Math.abs(I)}},9144:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=_(y(7029)),P=_(y(3100));function _(T){return T&&T.__esModule?T:{default:T}}f.default=function(g){if(!1===Array.isArray(g)||0===g.length)throw new Error("No points were given.");return g.reduce(function(m,h){var I=(0,N.default)(h),D=(0,P.default)(h);return{maxLat:Math.max(I,m.maxLat),minLat:Math.min(I,m.minLat),maxLng:Math.max(D,m.maxLng),minLng:Math.min(D,m.minLng)}},{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}},190:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=T(y(7029)),P=T(y(3100)),_=T(y(5705)),O=T(y(942)),M=y(7636);function T(h){return h&&h.__esModule?h:{default:h}}f.default=function(I,D){var ve,xe,w=(0,N.default)(I),S=(0,P.default)(I),R=(0,_.default)(w),F=(0,_.default)(S),ee=D/M.earthRadius,ce=R-ee,we=R+ee,He=(0,_.default)(M.MAXLAT),We=(0,_.default)(M.MINLAT),Ve=(0,_.default)(M.MAXLON),ye=(0,_.default)(M.MINLON);if(ce>We&&we<He){var Me=Math.asin(Math.sin(ee)/Math.cos(R));(ve=F-Me)<ye&&(ve+=2*Math.PI),(xe=F+Me)>Ve&&(xe-=2*Math.PI)}else ce=Math.max(ce,We),we=Math.min(we,He),ve=ye,xe=Ve;return[{latitude:(0,O.default)(ce),longitude:(0,O.default)(ve)},{latitude:(0,O.default)(we),longitude:(0,O.default)(xe)}]}},5524:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(7029)),P=M(y(3100)),_=M(y(5705)),O=M(y(942));function M(m){return m&&m.__esModule?m:{default:m}}f.default=function(h){if(!1===Array.isArray(h)||0===h.length)return!1;var I=h.length,D=h.reduce(function(F,ee){var ce=(0,_.default)((0,N.default)(ee)),we=(0,_.default)((0,P.default)(ee));return{X:F.X+Math.cos(ce)*Math.cos(we),Y:F.Y+Math.cos(ce)*Math.sin(we),Z:F.Z+Math.sin(ce)}},{X:0,Y:0,Z:0}),w=D.X/I,S=D.Y/I,R=D.Z/I;return{longitude:(0,O.default)(Math.atan2(S,w)),latitude:(0,O.default)(Math.atan2(R,Math.sqrt(w*w+S*S)))}}},7088:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(9144));f.default=function(T){var g=(0,N.default)(T),h=g.minLng+(g.maxLng-g.minLng)/2;return{latitude:parseFloat((g.minLat+(g.maxLat-g.minLat)/2).toFixed(6)),longitude:parseFloat(h.toFixed(6))}}},9952:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(939));f.default=function(T,g){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N.default,h="function"==typeof m?m(T,g):(0,N.default)(T,g);if(isNaN(h))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(h/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}},8744:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_,O){return O.reduce(function(M,T){if(typeof _>"u"||null===_)throw new Error("'".concat(_,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(_,T)&&typeof T<"u"&&typeof M>"u"?(M=T,T):M},void 0)}},4695:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636),P=function _(h){return h&&h.__esModule?h:{default:h}}(y(8744));function O(h,I){var D=Object.keys(h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(h);I&&(w=w.filter(function(S){return Object.getOwnPropertyDescriptor(h,S).enumerable})),D.push.apply(D,w)}return D}function T(h,I,D){return I in h?Object.defineProperty(h,I,{value:D,enumerable:!0,configurable:!0,writable:!0}):h[I]=D,h}f.default=function(I){var D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:N.longitudeKeys,latitude:N.latitudeKeys,altitude:N.altitudeKeys},w=(0,P.default)(I,D.longitude),S=(0,P.default)(I,D.latitude),R=(0,P.default)(I,D.altitude);return function M(h){for(var I=1;I<arguments.length;I++){var D=null!=arguments[I]?arguments[I]:{};I%2?O(Object(D),!0).forEach(function(w){T(h,w,D[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(D)):O(Object(D)).forEach(function(w){Object.defineProperty(h,w,Object.getOwnPropertyDescriptor(D,w))})}return h}({latitude:S,longitude:w},R?{altitude:R}:{})}},8674:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=T(y(7029)),P=T(y(3100)),_=T(y(5705)),O=T(y(6522)),M=y(7636);function T(h){return h&&h.__esModule?h:{default:h}}f.default=function(I,D){var w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;w=typeof w<"u"&&!isNaN(w)?w:1;var S=(0,N.default)(I),R=(0,P.default)(I),F=(0,N.default)(D),ee=(0,P.default)(D),ce=Math.acos((0,O.default)(Math.sin((0,_.default)(F))*Math.sin((0,_.default)(S))+Math.cos((0,_.default)(F))*Math.cos((0,_.default)(S))*Math.cos((0,_.default)(R)-(0,_.default)(ee))))*M.earthRadius;return Math.round(ce/w)*w}},7504:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=_(y(8674)),P=_(y(6522));function _(T){return T&&T.__esModule?T:{default:T}}f.default=function(g,m,h){var I=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,D=(0,N.default)(m,g,I),w=(0,N.default)(g,h,I),S=(0,N.default)(m,h,I),R=Math.acos((0,P.default)((D*D+S*S-w*w)/(2*D*S))),F=Math.acos((0,P.default)((w*w+S*S-D*D)/(2*w*S)));return R>Math.PI/2?D:F>Math.PI/2?w:Math.sin(R)*D}},884:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(7029)),P=M(y(3100)),_=M(y(5705)),O=M(y(942));function M(m){return m&&m.__esModule?m:{default:m}}f.default=function(h,I){var D=(0,N.default)(I),w=(0,P.default)(I),S=(0,N.default)(h),R=(0,P.default)(h);return((0,O.default)(Math.atan2(Math.sin((0,_.default)(w)-(0,_.default)(R))*Math.cos((0,_.default)(D)),Math.cos((0,_.default)(S))*Math.sin((0,_.default)(D))-Math.sin((0,_.default)(S))*Math.cos((0,_.default)(D))*Math.cos((0,_.default)(w)-(0,_.default)(R))))+360)%360}},7029:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636),P=O(y(8744)),_=O(y(5101));function O(g){return g&&g.__esModule?g:{default:g}}f.default=function(m,h){var I=(0,P.default)(m,N.latitudeKeys);if(!(typeof I>"u"||null===I)){var D=m[I];return!0===h?D:(0,_.default)(D)}}},3100:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636),P=O(y(8744)),_=O(y(5101));function O(g){return g&&g.__esModule?g:{default:g}}f.default=function(m,h){var I=(0,P.default)(m,N.longitudeKeys);if(!(typeof I>"u"||null===I)){var D=m[I];return!0===h?D:(0,_.default)(D)}}},5378:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(T){return T&&T.__esModule?T:{default:T}}(y(8674));function _(T){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(T)}f.default=function(g){var m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.default;return g.reduce(function(h,I){return"object"===_(h)&&null!==h.last&&(h.distance+=m(I,h.last)),h.last=I,h},{last:null,distance:0}).distance}},2671:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(7029)),P=M(y(3100)),_=M(y(5705)),O=y(7636);function M(m){return m&&m.__esModule?m:{default:m}}f.default=function(h,I){var D=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;D=typeof D<"u"&&!isNaN(D)?D:1;var He,We,Ve,ye,ve,xe,Ht,w=(0,N.default)(h),S=(0,P.default)(h),R=(0,N.default)(I),F=(0,P.default)(I),ee=6356752.314245,ce=1/298.257223563,we=(0,_.default)(F-S),Me=Math.atan((1-ce)*Math.tan((0,_.default)(parseFloat(w)))),fn=Math.atan((1-ce)*Math.tan((0,_.default)(parseFloat(R)))),$t=Math.sin(Me),Xt=Math.cos(Me),pn=Math.sin(fn),de=Math.cos(fn),lt=we,mt=100;do{var K=Math.sin(lt),hn=Math.cos(lt);if(0===(xe=Math.sqrt(de*K*(de*K)+(Xt*pn-$t*de*hn)*(Xt*pn-$t*de*hn))))return 0;He=$t*pn+Xt*de*hn,We=Math.atan2(xe,He),ve=He-2*$t*pn/(ye=1-(Ve=Xt*de*K/xe)*Ve),isNaN(ve)&&(ve=0);var gn=ce/16*ye*(4+ce*(4-3*ye));Ht=lt,lt=we+(1-gn)*ce*Ve*(We+gn*xe*(ve+gn*He*(2*ve*ve-1)))}while(Math.abs(lt-Ht)>1e-12&&--mt>0);if(0===mt)return NaN;var It=ye*(O.earthRadius*O.earthRadius-ee*ee)/(ee*ee),Ut=It/1024*(256+It*(It*(74-47*It)-128));return Math.round(ee*(1+It/16384*(4096+It*(It*(320-175*It)-768)))*(We-Ut*xe*(ve+Ut/4*(He*(2*ve*ve-1)-Ut/6*ve*(4*xe*xe-3)*(4*ve*ve-3))))/D)*D}},939:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(7029)),P=M(y(3100)),_=M(y(5705)),O=M(y(942));function M(m){return m&&m.__esModule?m:{default:m}}f.default=function(h,I){var D=(0,_.default)((0,P.default)(I))-(0,_.default)((0,P.default)(h)),w=Math.log(Math.tan((0,_.default)((0,N.default)(I))/2+Math.PI/4)/Math.tan((0,_.default)((0,N.default)(h))/2+Math.PI/4));return Math.abs(D)>Math.PI&&(D=D>0?-1*(2*Math.PI-D):2*Math.PI+D),((0,O.default)(Math.atan2(D,w))+360)%360}},2845:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_){return/^(NNE|NE|NNW|N)$/.test(_)?"N":/^(ENE|E|ESE|SE)$/.test(_)?"E":/^(SSE|S|SSW|SW)$/.test(_)?"S":/^(WSW|W|WNW|NW)$/.test(_)?"W":void 0}},8950:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(8674));f.default=function(T,g){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:N.default)(T,g)/(Number(g.time)-Number(T.time))*1e3}},2541:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0});var N={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(f,"computeDestinationPoint",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(f,"convertArea",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(f,"convertDistance",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(f,"convertSpeed",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(f,"decimalToSexagesimal",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(f,"findNearest",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(f,"getAreaOfPolygon",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(f,"getBounds",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(f,"getBoundsOfDistance",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(f,"getCenter",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(f,"getCenterOfBounds",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(f,"getCompassDirection",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(f,"getCoordinateKey",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(f,"getCoordinateKeys",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(f,"getDistance",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(f,"getDistanceFromLine",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(f,"getGreatCircleBearing",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(f,"getLatitude",{enumerable:!0,get:function(){return He.default}}),Object.defineProperty(f,"getLongitude",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(f,"getPathLength",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(f,"getPreciseDistance",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(f,"getRhumbLineBearing",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(f,"getRoughCompassDirection",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(f,"getSpeed",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(f,"isDecimal",{enumerable:!0,get:function(){return fn.default}}),Object.defineProperty(f,"isPointInLine",{enumerable:!0,get:function(){return $t.default}}),Object.defineProperty(f,"isPointInPolygon",{enumerable:!0,get:function(){return Xt.default}}),Object.defineProperty(f,"isPointNearLine",{enumerable:!0,get:function(){return pn.default}}),Object.defineProperty(f,"isPointWithinRadius",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(f,"isSexagesimal",{enumerable:!0,get:function(){return lt.default}}),Object.defineProperty(f,"isValidCoordinate",{enumerable:!0,get:function(){return Ht.default}}),Object.defineProperty(f,"isValidLatitude",{enumerable:!0,get:function(){return mt.default}}),Object.defineProperty(f,"isValidLongitude",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(f,"orderByDistance",{enumerable:!0,get:function(){return hn.default}}),Object.defineProperty(f,"sexagesimalToDecimal",{enumerable:!0,get:function(){return gn.default}}),Object.defineProperty(f,"toDecimal",{enumerable:!0,get:function(){return It.default}}),Object.defineProperty(f,"toRad",{enumerable:!0,get:function(){return Br.default}}),Object.defineProperty(f,"toDeg",{enumerable:!0,get:function(){return Ut.default}}),Object.defineProperty(f,"wktToPolygon",{enumerable:!0,get:function(){return Wr.default}});var P=J(y(2222)),_=J(y(179)),O=J(y(917)),M=J(y(1167)),T=J(y(8948)),g=J(y(1118)),m=J(y(1691)),h=J(y(9144)),I=J(y(190)),D=J(y(5524)),w=J(y(7088)),S=J(y(9952)),R=J(y(8744)),F=J(y(4695)),ee=J(y(8674)),ce=J(y(7504)),we=J(y(884)),He=J(y(7029)),We=J(y(3100)),Ve=J(y(5378)),ye=J(y(2671)),ve=J(y(939)),xe=J(y(2845)),Me=J(y(8950)),fn=J(y(3026)),$t=J(y(4194)),Xt=J(y(3536)),pn=J(y(2787)),de=J(y(202)),lt=J(y(4902)),Ht=J(y(7637)),mt=J(y(6563)),K=J(y(266)),hn=J(y(2447)),gn=J(y(1532)),It=J(y(5101)),Br=J(y(5705)),Ut=J(y(942)),Wr=J(y(354)),mn=y(7636);function J(H){return H&&H.__esModule?H:{default:H}}Object.keys(mn).forEach(function(H){"default"===H||"__esModule"===H||Object.prototype.hasOwnProperty.call(N,H)||Object.defineProperty(f,H,{enumerable:!0,get:function(){return mn[H]}})})},3026:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_){var O=_.toString().trim();return!isNaN(parseFloat(O))&&parseFloat(O)===Number(O)}},4194:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(8674));f.default=function(T,g,m){return(0,N.default)(g,T)+(0,N.default)(T,m)===(0,N.default)(g,m)}},3536:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=_(y(7029)),P=_(y(3100));function _(T){return T&&T.__esModule?T:{default:T}}f.default=function(g,m){for(var h=!1,I=m.length,D=-1,w=I-1;++D<I;w=D)((0,P.default)(m[D])<=(0,P.default)(g)&&(0,P.default)(g)<(0,P.default)(m[w])||(0,P.default)(m[w])<=(0,P.default)(g)&&(0,P.default)(g)<(0,P.default)(m[D]))&&(0,N.default)(g)<((0,N.default)(m[w])-(0,N.default)(m[D]))*((0,P.default)(g)-(0,P.default)(m[D]))/((0,P.default)(m[w])-(0,P.default)(m[D]))+(0,N.default)(m[D])&&(h=!h);return h}},2787:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(7504));f.default=function(T,g,m,h){return(0,N.default)(T,g,m)<h}},202:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(8674));f.default=function(T,g,m){return(0,N.default)(T,g,.01)<m}},4902:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636);f.default=function(M){return N.sexagesimalPattern.test(M.toString().trim())}},7637:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=O(y(4695)),P=O(y(6563)),_=O(y(266));function O(g){return g&&g.__esModule?g:{default:g}}f.default=function(m){var h=(0,N.default)(m),I=h.latitude,D=h.longitude;if(Array.isArray(m)&&m.length>=2)return(0,_.default)(m[0])&&(0,P.default)(m[1]);if(typeof I>"u"||typeof D>"u")return!1;var w=m[D],S=m[I];return!(typeof S>"u"||typeof w>"u"||!1===(0,P.default)(S)||!1===(0,_.default)(w))}},6563:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(3026)),P=M(y(4902)),_=M(y(1532)),O=y(7636);function M(m){return m&&m.__esModule?m:{default:m}}f.default=function m(h){return(0,N.default)(h)?!(parseFloat(h)>O.MAXLAT||h<O.MINLAT):!!(0,P.default)(h)&&m((0,_.default)(h))}},266:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=M(y(3026)),P=M(y(4902)),_=M(y(1532)),O=y(7636);function M(m){return m&&m.__esModule?m:{default:m}}f.default=function m(h){return(0,N.default)(h)?!(parseFloat(h)>O.MAXLON||h<O.MINLON):!!(0,P.default)(h)&&m((0,_.default)(h))}},2447:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=function P(M){return M&&M.__esModule?M:{default:M}}(y(8674));f.default=function(T,g){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N.default;return m="function"==typeof m?m:N.default,g.slice().sort(function(h,I){return m(T,h)-m(T,I)})}},6522:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_){return _>1?1:_<-1?-1:_}},1532:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=y(7636);f.default=function(M){var T=new RegExp(N.sexagesimalPattern).exec(M.toString().trim());if(typeof T>"u"||null===T)throw new Error("Given value is not in sexagesimal format");var g=Number(T[2])/60||0,m=Number(T[4])/3600||0,h=parseFloat(T[1])+g+m;return["S","W"].includes(T[7])?-h:h}},5101:($,f,y)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var N=T(y(3026)),P=T(y(4902)),_=T(y(1532)),O=T(y(7637)),M=T(y(4695));function T(w){return w&&w.__esModule?w:{default:w}}function g(w,S){var R=Object.keys(w);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(w);S&&(F=F.filter(function(ee){return Object.getOwnPropertyDescriptor(w,ee).enumerable})),R.push.apply(R,F)}return R}function m(w){for(var S=1;S<arguments.length;S++){var R=null!=arguments[S]?arguments[S]:{};S%2?g(Object(R),!0).forEach(function(F){h(w,F,R[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(R)):g(Object(R)).forEach(function(F){Object.defineProperty(w,F,Object.getOwnPropertyDescriptor(R,F))})}return w}function h(w,S,R){return S in w?Object.defineProperty(w,S,{value:R,enumerable:!0,configurable:!0,writable:!0}):w[S]=R,w}f.default=function w(S){if((0,N.default)(S))return Number(S);if((0,P.default)(S))return(0,_.default)(S);if((0,O.default)(S)){var R=(0,M.default)(S);return Array.isArray(S)?S.map(function(F,ee){return[0,1].includes(ee)?w(F):F}):m(m(m({},S),R.latitude&&h({},R.latitude,w(S[R.latitude]))),R.longitude&&h({},R.longitude,w(S[R.longitude])))}return Array.isArray(S)?S.map(function(F){return(0,O.default)(F)?w(F):F}):S}},942:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_){return 180*_/Math.PI}},5705:($,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(_){return _*Math.PI/180}},354:($,f)=>{function _(m,h){(null==h||h>m.length)&&(h=m.length);for(var I=0,D=new Array(h);I<h;I++)D[I]=m[I];return D}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0,f.default=function(h){if(!h.startsWith("POLYGON"))throw new Error("Invalid wkt.");return h.slice(h.indexOf("(")+2,h.indexOf(")")).split(", ").map(function(w){var R=function y(m,h){return function M(m){if(Array.isArray(m))return m}(m)||function O(m,h){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(m)){var I=[],D=!0,w=!1,S=void 0;try{for(var F,R=m[Symbol.iterator]();!(D=(F=R.next()).done)&&(I.push(F.value),!h||I.length!==h);D=!0);}catch(ee){w=!0,S=ee}finally{try{!D&&null!=R.return&&R.return()}finally{if(w)throw S}}return I}}(m,h)||function P(m,h){if(m){if("string"==typeof m)return _(m,h);var I=Object.prototype.toString.call(m).slice(8,-1);if("Object"===I&&m.constructor&&(I=m.constructor.name),"Map"===I||"Set"===I)return Array.from(m);if("Arguments"===I||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return _(m,h)}}(m,h)||function N(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(w.split(" "),2),ee=R[1];return{longitude:parseFloat(R[0]),latitude:parseFloat(ee)}})}},6729:($,f)=>{function y(g,m){return g*g+m*m}function N(g,m){return y(g[0]-m[0],g[1]-m[1])}function P(g,m,h){var I=m[0],D=m[1],w=h[0]-I,S=h[1]-D;if(0!==w||0!==S){var R=((g[0]-I)*w+(g[1]-D)*S)/y(w,S);R>1?(I=h[0],D=h[1]):R>0&&(I+=w*R,D+=S*R)}return y(g[0]-I,g[1]-D)}function O(g,m,h,I,D){for(var S,w=I,R=m+1;R<h;R++){var F=P(g[R],g[m],g[h]);F>w&&(S=R,w=F)}w>I&&(S-m>1&&O(g,m,S,I,D),D.push(g[S]),h-S>1&&O(g,S,h,I,D))}function M(g,m){var h=g.length-1,I=[g[0]];return O(g,0,h,m,I),I.push(g[h]),I}f.__esModule=!0,f.SimplifyAP=function T(g,m,h){if(void 0===m&&(m=1),void 0===h&&(h=!1),g.length<=2)return g;var I=m*m;return M(g=h?g:function _(g,m){for(var I,h=g[0],D=[h],w=1,S=g.length;w<S;w++)N(I=g[w],h)>m&&(D.push(I),h=I);return h!==I&&D.push(I),D}(g,I),I)}},6380:($,f,y)=>{var P=y(6729);f.p$=P.SimplifyAP,y(5551),y(6413)},5551:($,f)=>{function y(g,m){return g*g+m*m}function N(g,m){return y(g.longitude-m.longitude,g.latitude-m.latitude)}function P(g,m,h){var I=m.longitude,D=m.latitude,w=h.longitude-I,S=h.latitude-D;if(0!==w||0!==S){var R=((g.longitude-I)*w+(g.latitude-D)*S)/y(w,S);R>1?(I=h.longitude,D=h.latitude):R>0&&(I+=w*R,D+=S*R)}return y(g.longitude-I,g.latitude-D)}function O(g,m,h,I,D){for(var S,w=I,R=m+1;R<h;R++){var F=P(g[R],g[m],g[h]);F>w&&(S=R,w=F)}w>I&&(S-m>1&&O(g,m,S,I,D),D.push(g[S]),h-S>1&&O(g,S,h,I,D))}function M(g,m){var h=g.length-1,I=[g[0]];return O(g,0,h,m,I),I.push(g[h]),I}f.__esModule=!0,f.SimplifyLL=function T(g,m,h){if(void 0===m&&(m=1),void 0===h&&(h=!1),g.length<=2)return g;var I=m*m;return M(g=h?g:function _(g,m){for(var I,h=g[0],D=[h],w=1,S=g.length;w<S;w++)N(I=g[w],h)>m&&(D.push(I),h=I);return h!==I&&D.push(I),D}(g,I),I)}},6413:($,f)=>{function y(g,m){return g*g+m*m}function N(g,m){return y(g.x-m.x,g.y-m.y)}function P(g,m,h){var I=m.x,D=m.y,w=h.x-I,S=h.y-D;if(0!==w||0!==S){var R=((g.x-I)*w+(g.y-D)*S)/y(w,S);R>1?(I=h.x,D=h.y):R>0&&(I+=w*R,D+=S*R)}return y(g.x-I,g.y-D)}function O(g,m,h,I,D){for(var S,w=I,R=m+1;R<h;R++){var F=P(g[R],g[m],g[h]);F>w&&(S=R,w=F)}w>I&&(S-m>1&&O(g,m,S,I,D),D.push(g[S]),h-S>1&&O(g,S,h,I,D))}function M(g,m){var h=g.length-1,I=[g[0]];return O(g,0,h,m,I),I.push(g[h]),I}f.__esModule=!0,f.Simplify=function T(g,m,h){if(void 0===m&&(m=1),void 0===h&&(h=!1),g.length<=2)return g;var I=m*m;return M(g=h?g:function _(g,m){for(var I,h=g[0],D=[h],w=1,S=g.length;w<S;w++)N(I=g[w],h)>m&&(D.push(I),h=I);return h!==I&&D.push(I),D}(g,I),I)}}},Ac={};function ta($){var f=Ac[$];if(void 0!==f)return f.exports;var y=Ac[$]={exports:{}};return Wy[$](y,y.exports,ta),y.exports}(()=>{function $(e){return"function"==typeof e}let f=!1;const y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else f&&console.log("RxJS: Back to a better error behavior. Thank you. <3");f=e},get useDeprecatedSynchronousErrorHandling(){return f}};function N(e){setTimeout(()=>{throw e},0)}const P={closed:!0,next(e){},error(e){if(y.useDeprecatedSynchronousErrorHandling)throw e;N(e)},complete(){}},_=Array.isArray||(e=>e&&"number"==typeof e.length),T=(()=>{function e(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return e.prototype=Object.create(Error.prototype),e})();class g{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:o,_subscriptions:i}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof g)n.remove(this);else if(null!==n)for(let s=0;s<n.length;++s)n[s].remove(this);if($(o)){r&&(this._unsubscribe=void 0);try{o.call(this)}catch(s){t=s instanceof T?m(s.errors):[s]}}if(_(i)){let s=-1,a=i.length;for(;++s<a;){const l=i[s];if(null!==(e=l)&&"object"==typeof e)try{l.unsubscribe()}catch(u){t=t||[],u instanceof T?t=t.concat(m(u.errors)):t.push(u)}}}var e;if(t)throw new T(t)}add(t){let n=t;if(!t)return g.EMPTY;switch(typeof t){case"function":n=new g(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof g)){const i=n;n=new g,n._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof g){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n}remove(t){const n=this._subscriptions;if(n){const r=n.indexOf(t);-1!==r&&n.splice(r,1)}}}var e;function m(e){return e.reduce((t,n)=>t.concat(n instanceof T?n.errors:n),[])}g.EMPTY=((e=new g).closed=!0,e);const h="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class D extends g{constructor(t,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=P;break;case 1:if(!t){this.destination=P;break}if("object"==typeof t){t instanceof D?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new w(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new w(this,t,n,r)}}[h](){return this}static create(t,n,r){const o=new D(t,n,r);return o.syncErrorThrowable=!1,o}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class w extends D{constructor(t,n,r,o){super(),this._parentSubscriber=t;let i,s=this;$(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==P&&(s=Object.create(n),$(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=i,this._error=r,this._complete=o}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;y.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=y;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=t,n.syncErrorThrown=!0):N(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;N(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const n=()=>this._complete.call(this._context);y.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,n){try{t.call(this._context,n)}catch(r){if(this.unsubscribe(),y.useDeprecatedSynchronousErrorHandling)throw r;N(r)}}__tryOrSetError(t,n,r){if(!y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(o){return y.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(N(o),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const F="function"==typeof Symbol&&Symbol.observable||"@@observable";function ee(e){return e}let He=(()=>{class e{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){const{operator:i}=this,s=function R(e,t,n){if(e){if(e instanceof D)return e;if(e[h])return e[h]()}return e||t||n?new D(e,t,n):new D(P)}(n,r,o);if(s.add(i?i.call(s,this.source):this.source||y.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),y.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){y.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function S(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof D?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=We(r))((o,i)=>{let s;s=this.subscribe(a=>{try{n(a)}catch(l){i(l),s&&s.unsubscribe()}},i,o)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[F](){return this}pipe(...n){return 0===n.length?this:function we(e){return 0===e.length?ee:1===e.length?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}(n)(this)}toPromise(n){return new(n=We(n))((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=t=>new e(t),e})();function We(e){if(e||(e=y.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const ye=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})();class ve extends g{constructor(t,n){super(),this.subject=t,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,n=t.observers;if(this.subject=null,!n||0===n.length||t.isStopped||t.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class xe extends D{constructor(t){super(t),this.destination=t}}let Me=(()=>{class e extends He{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[h](){return new xe(this)}lift(n){const r=new fn(this,this);return r.operator=n,r}next(n){if(this.closed)throw new ye;if(!this.isStopped){const{observers:r}=this,o=r.length,i=r.slice();for(let s=0;s<o;s++)i[s].next(n)}}error(n){if(this.closed)throw new ye;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:r}=this,o=r.length,i=r.slice();for(let s=0;s<o;s++)i[s].error(n);this.observers.length=0}complete(){if(this.closed)throw new ye;this.isStopped=!0;const{observers:n}=this,r=n.length,o=n.slice();for(let i=0;i<r;i++)o[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new ye;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new ye;return this.hasError?(n.error(this.thrownError),g.EMPTY):this.isStopped?(n.complete(),g.EMPTY):(this.observers.push(n),new ve(this,n))}asObservable(){const n=new He;return n.source=this,n}}return e.create=(t,n)=>new fn(t,n),e})();class fn extends Me{constructor(t,n){super(),this.destination=t,this.source=n}next(t){const{destination:n}=this;n&&n.next&&n.next(t)}error(t){const{destination:n}=this;n&&n.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:n}=this;return n?this.source.subscribe(t):g.EMPTY}}function he(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}Error,globalThis;Symbol;class X0{constructor(){this.limitUI04=this.maxFromBits(4),this.limitUI06=this.maxFromBits(6),this.limitUI08=this.maxFromBits(8),this.limitUI12=this.maxFromBits(12),this.limitUI14=this.maxFromBits(14),this.limitUI16=this.maxFromBits(16),this.limitUI32=this.maxFromBits(32),this.limitUI40=this.maxFromBits(40),this.limitUI48=this.maxFromBits(48),this.create()}toString(){return this.hex}toURN(){return"urn:uuid:"+this.hex}toSignalK(){return`urn:mrn:signalk:uuid:${this.hex}`}toBytes(){let t=this.hex.split("-"),n=[],r=0;for(let o=0;o<t.length;o++)for(let i=0;i<t[o].length;i+=2)n[r++]=parseInt(t[o].substr(i,2),16);return n}maxFromBits(t){return Math.pow(2,t)}getRandomInt(t,n){return Math.floor(Math.random()*(n-t+1))+t}randomUI04(){return this.getRandomInt(0,this.limitUI04-1)}randomUI06(){return this.getRandomInt(0,this.limitUI06-1)}randomUI08(){return this.getRandomInt(0,this.limitUI08-1)}randomUI12(){return this.getRandomInt(0,this.limitUI12-1)}randomUI14(){return this.getRandomInt(0,this.limitUI14-1)}randomUI16(){return this.getRandomInt(0,this.limitUI16-1)}randomUI32(){return this.getRandomInt(0,this.limitUI32-1)}randomUI40(){return(0|Math.random()*(1<<30))+(0|1024*Math.random())*(1<<30)}randomUI48(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)}create(){this.fromParts(this.randomUI32(),this.randomUI16(),16384|this.randomUI12(),128|this.randomUI06(),this.randomUI08(),this.randomUI48())}paddedString(t,n,r=null){r=r||"0";let o=n-(t=String(t)).length;for(;o>0;o>>>=1,r+=r)1&o&&(t=r+t);return t}fromParts(t,n,r,o,i,s){return this.version=r>>12&15,this.hex=this.paddedString(t.toString(16),8)+"-"+this.paddedString(n.toString(16),4)+"-"+this.paddedString(r.toString(16),4)+"-"+this.paddedString(o.toString(16),2)+this.paddedString(i.toString(16),2)+"-"+this.paddedString(s.toString(16),12),this}}class Ys{static updates(){return{context:null,updates:[]}}static subscribe(){return{context:null,subscribe:[]}}static unsubscribe(){return{context:null,unsubscribe:[]}}static request(){return{requestId:(new X0).toString()}}}let tx=(()=>{class e{constructor(){this._filter="",this._wsTimeout=2e4,this._token="",this._playbackMode=!1,this.version=1,this.endpoint="",this.selfId="",this._source=null,this._connect=new Me,this.onConnect=this._connect.asObservable(),this._close=new Me,this.onClose=this._close.asObservable(),this._error=new Me,this.onError=this._error.asObservable(),this._message=new Me,this.onMessage=this._message.asObservable()}set source(n){this._source||(this._source={}),this._source.label=n}set authToken(n){this._token=n}get connectionTimeout(){return this._wsTimeout}set connectionTimeout(n){this._wsTimeout=n<3e3?3e3:n>6e4?6e4:n}get isOpen(){return!(!this.ws||1==this.ws.readyState||3==this.ws.readyState)}get filter(){return this._filter}set filter(n){this._filter=n&&-1!=n.indexOf("self")?this.selfId?this.selfId:"":n}get playbackMode(){return this._playbackMode}close(){this.ws&&(this.ws.close(),this.ws=null)}open(n,r,o){if(!(n=n||this.endpoint))return;let i=-1==n.indexOf("?")?"?":"&";r&&(n+=`${i}subscribe=${r}`),(this._token||o)&&(n+=`${r?"&":"?"}token=${this._token||o}`),this.close(),this.ws=new WebSocket(n),setTimeout(()=>{this.ws&&1!=this.ws.readyState&&3!=this.ws.readyState&&(console.warn(`Connection watchdog expired (${this._wsTimeout/1e3} sec): ${this.ws.readyState}... aborting connection...`),this.close())},this._wsTimeout),this.ws.onopen=s=>{this._connect.next(s)},this.ws.onclose=s=>{this._close.next(s)},this.ws.onerror=s=>{this._error.next(s)},this.ws.onmessage=s=>{this.parseOnMessage(s)}}parseOnMessage(n){let r;if("string"==typeof n.data)try{r=JSON.parse(n.data)}catch{return}this.isHello(r)?(this.selfId=r.self,this._playbackMode=typeof r.startTime<"u",this._message.next(r)):this.isResponse(r)?(typeof r.login<"u"&&typeof r.login.token<"u"&&(this._token=r.login.token),this._message.next(r)):this._filter&&this.isDelta(r)?r.context==this._filter&&this._message.next(r):this._message.next(r)}sendRequest(n){if("object"!=typeof n)return"";let r=Ys.request();return typeof n.login>"u"&&this._token&&(r.token=this._token),Object.keys(n).forEach(i=>{r[i]=n[i]}),this.send(r),r.requestId}put(n,r,o){return this.sendRequest({context:"self"==n?"vessels.self":n,put:{path:r,value:o}})}login(n,r){return this.sendRequest({login:{username:n,password:r}})}send(n){this.ws&&("object"==typeof n&&(n=JSON.stringify(n)),this.ws.send(n))}sendUpdate(n="self",r,o){let i=Ys.updates();this._token&&(i.token=this._token),i.context="self"==n?"vessels.self":n,this._token&&(i.token=this._token);let s=[];"string"==typeof r&&s.push({path:r,value:o}),"object"==typeof r&&Array.isArray(r)&&(s=r);let a={timestamp:(new Date).toISOString(),values:s};this._source&&(a.source=this._source),i.updates.push(a),this.send(i)}subscribe(n="*",r="*",o){let i=Ys.subscribe();if(this._token&&(i.token=this._token),i.context="self"==n?"vessels.self":n,this._token&&(i.token=this._token),"object"==typeof r&&Array.isArray(r)&&(i.subscribe=r),"string"==typeof r){let s={};s.path=r,o&&"object"==typeof o&&(o.period&&(s.period=o.period),o.minPeriod&&(s.minPeriod=o.period),o.format&&("delta"==o.format||"full"==o.format)&&(s.format=o.format),o.policy&&("instant"==o.policy||"ideal"==o.policy||"fixed"==o.policy)&&(s.policy=o.policy)),i.subscribe.push(s)}this.send(i)}unsubscribe(n="*",r="*"){let o=Ys.unsubscribe();this._token&&(o.token=this._token),o.context="self"==n?"vessels.self":n,this._token&&(o.token=this._token),"object"==typeof r&&Array.isArray(r)&&(o.unsubscribe=r),"string"==typeof r&&o.unsubscribe.push({path:r}),this.send(o)}raiseAlarm(n="*",r,o){let i;i="string"==typeof r&&-1==r.indexOf("notifications.")?`notifications.${r}`:r,this.put(n,i,o.value)}clearAlarm(n="*",r){let o=-1==r.indexOf("notifications.")?`notifications.${r}`:r;this.put(n,o,null)}isSelf(n){return n.context==this.selfId}isDelta(n){return typeof n.context<"u"}isHello(n){return typeof n.version<"u"&&typeof n.self<"u"}isResponse(n){return typeof n.requestId<"u"}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();class rx{constructor(t,n,r,o){this._method=[],this._message="",this._message=typeof t<"u"?t:"",this._state=typeof n<"u"?n:Cy.alarm,r&&this._method.push(Tc.visual),o&&this._method.push(Tc.sound)}get value(){return{message:this._message,state:this._state,method:this._method}}}var Cy=function(e){return e.normal="normal",e.alert="alert",e.warn="warn",e.alarm="alarm",e.emergency="emergency",e}(Cy||{}),Tc=function(e){return e.visual="visual",e.sound="sound",e}(Tc||{});class ix{constructor(){this.obsList=[],this.stream=new tx,this._connect=new Me,this.onConnect=this._connect.asObservable(),this._close=new Me,this.onClose=this._close.asObservable(),this._error=new Me,this.onError=this._error.asObservable(),this._message=new Me,this.onMessage=this._message.asObservable()}get endpoint(){return this.stream.endpoint}set endpoint(t){this.stream.endpoint=t}get selfId(){return this.stream.selfId}set selfId(t){this.stream.selfId=t}get _source(){return this.stream._source}set _source(t){this.stream._source=t}set source(t){this.stream.source=t}set authToken(t){this.stream.authToken=t}get connectionTimeout(){return this.stream.connectionTimeout}set connectionTimeout(t){this.stream.connectionTimeout=t}get isOpen(){return this.stream.isOpen}get filter(){return this.stream.filter}set filter(t){this.stream.filter=t}get playbackMode(){return this.stream.playbackMode}open(t,n="none",r){this.obsList.push(this.stream.onConnect.subscribe(o=>this._connect.next(o))),this.obsList.push(this.stream.onClose.subscribe(o=>this._close.next(o))),this.obsList.push(this.stream.onError.subscribe(o=>this._error.next(o))),this.obsList.push(this.stream.onMessage.subscribe(o=>this._message.next(o))),this.stream.open(t,n,r)}close(){this.stream.close(),this.obsList.forEach(t=>t.unsubscribe()),this.obsList=[]}sendRequest(t){return this.stream.sendRequest(t)}put(t,n,r){return this.stream.put(t,n,r)}login(t,n){return this.stream.login(t,n)}send(t){this.stream.send(t)}sendUpdate(t="self",n,r){this.stream.sendUpdate(t,n,r)}subscribe(t="*",n="*",r){this.stream.subscribe(t,n,r)}unsubscribe(t="*",n="*"){this.stream.unsubscribe(t,n)}raiseAlarm(t="*",n,r){this.stream.raiseAlarm(t,n,r)}clearAlarm(t="*",n){this.stream.clearAlarm(t,n)}isSelf(t){return this.stream.isSelf(t)}isDelta(t){return this.stream.isDelta(t)}isHello(t){return this.stream.isHello(t)}isResponse(t){return this.stream.isResponse(t)}}class Ty{id;position=[0,0];heading;headingTrue=null;headingMagnetic=null;cog;cogTrue=null;cogMagnetic=null;sog;name;mmsi;callsign;state;wind={direction:null,mwd:null,twd:null,tws:null,speedTrue:null,sog:null,awa:null,aws:null};lastUpdated=new Date;orientation=0;buddy=!1;closestApproach=null;mode="day";anchor={maxRadius:null,radius:null,position:null};resourceUpdates=[];autopilot={};track=[];courseApi={arrivalCircle:0,activeRoute:{},nextPoint:{},previousPoint:{}};properties={}}class Ny{id;lastUpdated=new Date;name;mmsi;position=[0,0];properties={};state}class Nc extends Ny{type={id:-1,name:""};constructor(){super()}}class sx extends Nc{callsign;constructor(){super()}}class ax extends Ny{orientation=0;sog=0;callsign;track=[];constructor(){super()}}class lx extends Nc{callsign;constructor(){super()}}class Sc{static celciusToKelvin(t=0){return t+273.15}static kelvinToCelcius(t=0){return t-273.15}static kelvinToFarenheit(t=0){return 1.8*t-459.67}static degreesToRadians(t=0){return t*Math.PI/180}static radiansToDegrees(t=0){return 180*t/Math.PI}static angleToDirection(t,n){const r=2*Math.PI;if(n||(n=0),t||(t=0),isNaN(n)||isNaN(t))return null;const o=n+t;return o>r?o-r:o<0?r+o:o}static directionToAngle(t,n){const r=2*Math.PI;if(n||(n=0),t||(t=0),isNaN(n)||isNaN(t))return null;const o=n-t;let i;if(o>0)i=o>Math.PI?r-o:0-o;else if(o<0){const s=Math.abs(o);i=s>Math.PI?s-r:s}else i=o;return i}static knotsToKm(t){return 1.852*t}static nauticalMilesToKm(t){return 1.852*t}static knotsToMSec(t){return.51444325460445*t}static kmToKnots(t){return.539957*t}static kmToNauticalMiles(t){return.539957*t}static kmToMiles(t){return.621371*t}static metersToFeet(t){return 3.28084*t}static msecToKnots(t){return 1.94384*t}static msecToKmh(t){return 3.6*t}static msecToMph(t){return 2.23694*t}static nauticalMilesToMiles(t){return 1.15078*t}static milesToKm(t){return 1.60934*t}static milesToNauticalMiles(t){return.868976*t}static rpmToHertz(t){return t/60}}var ii=ta(2541);class Hr{static destCoordinate(t,n,r){const o=(0,ii.computeDestinationPoint)(t,r,Sc.radiansToDegrees(n));return[o.longitude,o.latitude]}static distanceTo(t,n){return(0,ii.getDistance)(t,n)}static routeLength(t){return(0,ii.getPathLength)(t)}static centreOfPolygon(t){const n=(0,ii.getCenter)(t);return[n.longitude,n.latitude]}static inDLCrossingZone(t,n=170){return Math.abs(t[0])>=n}static inBounds(t,n){return(0,ii.isPointInPolygon)(t,[[n[0],n[1]],[n[0],n[3]],[n[2],n[3]],[n[2],n[1]],[n[0],n[1]]])}static calcMapifiedExtent(t,n){const o=111111*Math.cos(Sc.degreesToRadians(t[1])),i=[0,0,0,0];return i[1]=t[1]+(0-Math.abs(n))/111111,i[3]=t[1]+Math.abs(n)/111111,i[0]=t[0]+(0-Math.abs(n))/o,i[2]=t[0]+Math.abs(n)/o,i}static normaliseCoords(t){if(!Array.isArray(t))return[0,0];if("number"==typeof t[0]){if(t[0]>180)for(;t[0]>180;)t[0]=t[0]-360;else if(t[0]<-180)for(;t[0]<-180;)t[0]=360+t[0];return t}return Array.isArray(t[0])?(t.forEach(n=>this.normaliseCoords(n)),t):void 0}}class ux{action;playback=!1;result=null;type;self=null;timestamp;constructor(t){this.action="notification",this.type=t}}class Sy{action;playback=!1;result=null;timestamp;self=null;constructor(){this.action="update"}}class cx extends Sy{constructor(){super(),this.action="trail"}}var dx=ta(6380);const fx=["environment.wind.speedTrue","environment.wind.speedOverGround","environment.wind.angleTrueGround","environment.wind.angleTrueWater","environment.wind.directionTrue","environment.wind.directionMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"];let X,je,xy;const si=[];let Pc,Js=[],xc=!1,Xs=!1;const Se={signalk:{},aisState:[]};let tt,Ay,Py=[0,0,0,0],Oy=60,ai=0,Ln={},jn=500,Yt=!1;const Jt={maxAge:54e4,staleAge:36e4,lastTick:(new Date).valueOf(),maxTrack:20},li={trailDuration:24,trailResolution:{lastHour:"5s",next23:"10s",beyond24:"1m"}};let ui,ci="freeboard-sk";function Ry(){tt={updated:{},stale:{},expired:{}}}function ea({action:e,msg:t}){switch(e){case"onConnect":postMessage({action:"open",playback:Yt,result:t.target.readyState});break;case"onClose":console.warn("streamEvent: ",t),Ly(!1);break;case"onError":console.warn("streamEvent: ",t),postMessage({action:"error",playback:Yt,result:"Connection error!"});break;case"onMessage":!function yx(e){je.isHello(e)?(postMessage({action:"hello",result:e,self:e.self,playback:Yt}),jn&&Vy()):je.isDelta(e)?(xc=!0,e.updates.forEach(t=>{t.values&&(ui=t.$source,t.values.forEach(n=>{if(Ay=t.timestamp,e.context)switch(e.context.split(".")[0]){case"shore":case"atons":Se?.signalk.atons&&function bx(e,t){let n=!1;if(-1!==e.indexOf("shore.basestations")&&(n=!0),!X.atons.has(e)){const o=new Nc;o.id=e,o.position=null,n&&(o.type.id=-1,o.type.name="Basestation"),X.atons.set(e,o)}const r=X.atons.get(e);""===t.path?(typeof t.value.name<"u"&&(r.name=t.value.name),typeof t.value.mmsi<"u"&&(r.mmsi=t.value.mmsi),typeof t.value.atonType<"u"&&(r.type=t.value.atonType)):"atonType"===t.path?r.type=t.value:"navigation.position"===t.path?(r.position=[t.value.longitude,t.value.latitude],r.positionReceived=!0):r.properties[t.path]=t.value}(e.context,n),fi(e.context,X.atons,Se?.signalk.atons);break;case"sar":Se?.signalk.sar&&function wx(e,t){if(!X.sar.has(e)){const r=new sx;r.id=e,r.position=null,r.type.id=-1,r.type.name="SaR Beacon",X.sar.set(e,r)}const n=X.sar.get(e);""===t.path?(typeof t.value.name<"u"&&(n.name=t.value.name),typeof t.value.mmsi<"u"&&(n.mmsi=t.value.mmsi)):"communication.callsignVhf"===t.path?n.callsign=t.value:"navigation.position"===t.path&&t.value&&(n.position=Hr.normaliseCoords([t.value.longitude,t.value.latitude]),n.positionReceived=!0)}(e.context,n),fi(e.context,X.sar,Se?.signalk.sar);break;case"aircraft":Se?.signalk.aircraft&&function _x(e,t){if(!X.aircraft.has(e)){const r=new ax;r.id=e,r.position=null,X.aircraft.set(e,r)}const n=X.aircraft.get(e);""===t.path?(typeof t.value.name<"u"&&(n.name=t.value.name),typeof t.value.mmsi<"u"&&(n.mmsi=t.value.mmsi)):"communication.callsignVhf"===t.path?n.callsign=t.value:"navigation.position"===t.path&&t.value?(n.position=Hr.normaliseCoords([t.value.longitude,t.value.latitude]),n.positionReceived=!0,Oc(n)):"navigation.courseOverGroundTrue"===t.path?n.orientation=t.value:"navigation.speedOverGround"===t.path&&(n.sog=t.value)}(e.context,n),fi(e.context,X.aircraft,Se?.signalk.aircraft);break;case"meteo":Se?.signalk.meteo&&(function Mx(e,t){if(!X.meteo.has(e)){const r=new lx;r.id=e,r.position=null,r.type.id=-1,r.type.name="Weather Station",X.meteo.set(e,r)}const n=X.meteo.get(e);if(""===t.path){if(typeof t.value.name<"u"&&(n.name=t.value.name),typeof t.value.mmsi<"u"){const r=e.split(":").slice(-2);n.mmsi=2===r.length?`${r[0]}:${r[1]}`:t.value.mmsi}}else"communication.callsignVhf"===t.path?n.callsign=t.value:"navigation.position"===t.path&&t.value&&(n.position=Hr.normaliseCoords([t.value.longitude,t.value.latitude]),n.positionReceived=!0)}(e.context,n),Uy(n)),fi(e.context,X.meteo,Se?.signalk.meteo);break;case"vessels":if(je.isSelf(e))Hy(X.self,n,!0),Uy(n);else{if(Se?.signalk.vessels){const r=function Ix(e){if(!X.aisTargets.has(e)){const t=new Ty;t.position=null,X.aisTargets.set(e,t)}return X.aisTargets.get(e)}(e.context);Hy(r,n)}fi(e.context,X.aisTargets,Se?.signalk.vessels,Se?.aisState)}}}))}),Fy()):je.isResponse(e)&&postMessage({action:"response",result:e})}(t)}}function ky(e={}){e.interval&&"number"==typeof e.interval&&(jn=e.interval,$y(),Vy(),Oy=1/(jn/1e3)*60),Yt=!!e.playback,e.selections&&(typeof e.selections.preferredPaths<"u"&&(Ln=e.selections.preferredPaths),e.selections.aisMaxAge&&"number"==typeof e.selections.aisMaxAge&&(Jt.maxAge=e.selections.aisMaxAge),e.selections.aisStaleAge&&"number"==typeof e.selections.aisStaleAge&&(Jt.staleAge=e.selections.aisStaleAge),"number"==typeof e.selections.signalk.maxRadius&&(Se.signalk=e.selections.signalk),typeof e.selections.aisState<"u"&&Array.isArray(e.selections.aisState)&&(Se.aisState=e.selections.aisState),console.log("Worker: AIS Filter...",Se))}function Ly(e=!1){$y(),si.forEach(t=>t.unsubscribe()),je&&e&&je.close(),je=null,postMessage({action:"close",result:e,playback:Yt})}function di(e){return new Promise((t,n)=>{fetch(`${e}`).then(r=>{r.json().then(o=>t(o)).catch(o=>n(o))}).catch(r=>{n(r)})})}function jy(){di(Pc+"/tracks"+(Se&&Se.signalk&&Se.signalk.maxRadius?`?radius=${Se.signalk.maxRadius}`:"?radius=10000")).then(t=>{Xs=!0,Object.entries(t).forEach(n=>{if(X.aisTargets.has(n[0])){const r=X.aisTargets.get(n[0]);r.track=n[1].coordinates,Oc(r)}})}).catch(()=>{Xs=!1,console.warn("Unable to fetch AIS tracks!")})}function fi(e,t,n=!0,r=[]){if(n){let o=t.get(e);o&&r.includes(o?.state)&&(console.log(`state match => ${r}, ${e}`),tt.expired[e]=!0,o=null),o&&Se.signalk.maxRadius?o.positionReceived&&Hr.inBounds(o.position,Py)?tt.updated[e]=!0:(t.delete(e),tt.expired[e]=!0):tt.updated[e]=!0}else 0!==t.size&&(t.forEach((o,i)=>{tt.expired[i]=!0}),t.clear())}function Fy(e=!1){if(!jn||e){const t=new Sy;t.playback=Yt,X.aisStatus.updated=Object.keys(tt.updated),X.aisStatus.stale=Object.keys(tt.stale),X.aisStatus.expired=Object.keys(tt.expired),t.result=X,t.timestamp=Yt?Ay:X.self.lastUpdated.toISOString(),postMessage(t),Ry(),X.self.resourceUpdates=[],0===ai&&(function Dx(){const e=(new Date).valueOf();X.aisTargets.forEach((t,n)=>{t.lastUpdated.valueOf()<e-Jt.maxAge?(tt.expired[n]=!0,X.aisTargets.delete(n)):t.lastUpdated.valueOf()<e-Jt.staleAge&&(tt.stale[n]=!0)}),X.aircraft.forEach((t,n)=>{t.lastUpdated.valueOf()<e-Jt.maxAge?(tt.expired[n]=!0,X.aircraft.delete(n)):t.lastUpdated.valueOf()<e-Jt.staleAge&&(tt.stale[n]=!0)}),X.sar.forEach((t,n)=>{t.lastUpdated.valueOf()<e-Jt.maxAge?(tt.expired[n]=!0,X.sar.delete(n)):t.lastUpdated.valueOf()<e-Jt.staleAge&&(tt.stale[n]=!0)})}(),X.self.positionReceived&&Se?.signalk.maxRadius&&(Py=Hr.calcMapifiedExtent(X.self.position,Se.signalk.maxRadius),ai++)),ai=ai>=Oy?0:ai+1}}function Vy(){jn&&"number"==typeof jn&&Js.push(setInterval(()=>{xc&&(Fy(!0),xc=!1)},jn)),Js.push(setInterval(()=>{console.warn("hasTrackPlugin",Xs),Xs&&jy()},6e4))}function $y(){Js.forEach(e=>clearInterval(e)),Js=[]}function Hy(e,t,n=!1){if(e.lastUpdated=new Date,n){const r=-1!==t.path.indexOf("course")?t.path.split(".").slice(0,2).join("."):t.path;-1!==fx.indexOf(r)&&(X.paths[r]=null)}if(""===t.path)typeof t.value.name<"u"&&(e.name=t.value.name),typeof t.value.mmsi<"u"&&(e.mmsi=t.value.mmsi),typeof t.value.buddy<"u"&&(e.buddy=t.value.buddy);else if("communication.callsignVhf"===t.path)e.callsign=t.value;else if("navigation.position"===t.path&&t.value){if(typeof t.value.latitude>"u"||typeof t.value.longitude>"u")return;e.position=Hr.normaliseCoords([t.value.longitude,t.value.latitude]),e.positionReceived=!0,n||Oc(e)}else"navigation.state"===t.path?e.state=t.value:"navigation.speedOverGround"===t.path?e.sog=t.value:"navigation.courseOverGroundTrue"===t.path?e.cogTrue=t.value:"navigation.courseOverGroundMagnetic"===t.path?e.cogMagnetic=t.value:"navigation.headingTrue"===t.path?e.headingTrue=t.value:"navigation.headingMagnetic"===t.path?e.headingMagnetic=t.value:"environment.wind.angleApparent"===t.path?e.wind.awa=t.value:"environment.wind.speedApparent"===t.path?e.wind.aws=t.value:"environment.wind.speedTrue"===t.path?e.wind.speedTrue=t.value:"environment.wind.speedOverGround"===t.path?e.wind.sog=t.value:"environment.wind.directionTrue"===t.path?e.wind.twd=t.value:"environment.wind.directionMagnetic"===t.path?e.wind.mwd=t.value:"environment.mode"===t.path?e.mode=t.value:-1!==t.path.indexOf("navigation.course.")?-1!==t.path.indexOf("navigation.course.calcValues")?-1===t.path.indexOf("navigation.course.calcValues.previousPoint")&&(e[`course.${t.path.split(".").slice(-1)[0]}`]=t.value):-1!==t.path.indexOf("navigation.course.activeRoute")?e.courseApi.activeRoute=t.value:-1!==t.path.indexOf("navigation.course.nextPoint")?e.courseApi.nextPoint=t.value:-1!==t.path.indexOf("navigation.course.previousPoint")?e.courseApi.previousPoint=t.value:"navigation.course.arrivalCircle"===t.path&&(e.courseApi.arrivalCircle=t.value):-1!==t.path.indexOf("navigation.closestApproach")?e.closestApproach=t.value:"navigation.anchor.position"===t.path?e.anchor.position=t.value:"navigation.anchor.maxRadius"===t.path?e.anchor.maxRadius=t.value:"navigation.anchor.currentRadius"===t.path?e.anchor.radius=t.value:-1!==t.path.indexOf("resources.")?e.resourceUpdates.push(t):"steering.autopilot.state"===t.path&&ui===ci?e.autopilot.state=t.value:"steering.autopilot.mode"===t.path&&ui===ci?e.autopilot.mode=t.value:"steering.autopilot.target"===t.path&&ui===ci?e.autopilot.target=t.value:"steering.autopilot.engaged"===t.path&&ui===ci?e.autopilot.enabled=t.value:"steering.autopilot.defaultPilot"===t.path&&(ci=t.value);e.heading=null===e.heading&&null!==e.cog?e.cog:e.heading,typeof Ln.heading<"u"&&t.path===Ln.heading&&(e.orientation=t.value),typeof Ln.tws<"u"&&t.path===Ln.tws&&(e.wind.tws=t.value),typeof Ln.twd<"u"&&t.path===Ln.twd&&(e.wind.direction="environment.wind.angleTrueGround"===t.path||"environment.wind.angleTrueWater"===t.path?Sc.angleToDirection(t.value,e.heading):t.value)}function Uy(e,t){const n={path:e.path,value:e.value,context:t||null};let r;const o=e.path.split(".");if(("notifications.environment.depth.belowTransducer"===e.path||"notifications.environment.depth.belowSurface"===e.path||"notifications.environment.depth.belowKeel"===e.path)&&(r=o[2]),"notifications.navigation.anchor"===e.path&&(r=o[2]),-1!==["mob","sinking","fire","piracy","flooding","collision","grounding","listing","adrift","abandon"].indexOf(o[o.length-1])&&(r=o[o.length-1]),-1!==e.path.indexOf("notifications.navigation.closestApproach")&&(r=o[2],n.context=o[3]),-1!==e.path.indexOf("notifications.buddy")&&(r=o[1],n.context=o[2]),-1!==e.path.indexOf("notifications.navigation.course.arrivalCircleEntered")&&(r=o[3]),-1!==e.path.indexOf("notifications.navigation.course.perpendicularPassed")&&(r=o[3]),-1!==e.path.indexOf("notifications.meteo.warning")&&(r=o[1]),r){const i=new ux(r);i.playback=Yt,i.result=n,postMessage(i)}}function Oc(e){if(e.track&&0===e.track.length)e.track.push([e.position]);else{const n=e.track[e.track.length-1][e.track[e.track.length-1].length-1];n[0]!==e.position[0]&&n[1]!==e.position[1]&&e.track[e.track.length-1].push(e.position)}e.track[e.track.length-1]=e.track[e.track.length-1].slice(0-Jt.maxTrack)}addEventListener("message",({data:e})=>{!function hx(e){if(e.cmd)switch(e.cmd){case"open":console.log("Worker control: opening stream..."),ky(e.options),function mx(e){if(je)return;if(!e.url)return void postMessage({action:"error",result:"Valid options not provided!"});const t=e.url.split("/");if(t.pop(),t.push("api"),t[0]="wss:"===t[0]?"https:":"http:",Pc=t.join("/"),function px(){X={self:new Ty,aisTargets:new Map,aisStatus:{updated:[],stale:[],expired:[]},paths:{},atons:new Map,aircraft:new Map,sar:new Map,meteo:new Map},X.self.positionReceived=!1,Ry()}(),je=new ix,si.push(je.onConnect.subscribe(n=>ea({action:"onConnect",msg:n}))),si.push(je.onClose.subscribe(n=>ea({action:"onClose",msg:n}))),si.push(je.onError.subscribe(n=>ea({action:"onError",msg:n}))),si.push(je.onMessage.subscribe(n=>ea({action:"onMessage",msg:n}))),je.authToken=xy,e.playback){const n=e.playbackOptions.startTime?`?startTime=${e.playbackOptions.startTime}`:null;let r=e.playbackOptions.playbackRate?`playbackRate=${e.playbackOptions.playbackRate}`:null;r=r?n?"&"+r:"?"+r:null,je.open(`${e.url}${n||""}${r||""}`,e.playbackOptions.subscribe,e.token)}else je.open(e.url,e.subscribe,e.token),jy()}(e.options);break;case"close":console.log("Worker control: closing stream..."),Ly(!0);break;case"subscribe":console.log("Worker control: subscribing to paths..."),je.subscribe(e.options.context,e.options.path);break;case"settings":console.log("Worker control: settings..."),ky(e.options);break;case"alarm":console.log("Worker control: alarm action..."),function vx(e){const t=-1===e.type.indexOf("notifications.")?`notifications.${e.type}`:e.type;e.raise?je.raiseAlarm("self",t,new rx(e.message,e.state,!0,!0)):je.clearAlarm("self",t)}(e.options);break;case"vessel":if(console.log("Worker control: vessel setting..."),e.options){let t;t="self"===e.options.context?X.self:X.aisTargets.get(e.options.context),t&&e.options.name&&(t.name=e.options.name)}break;case"auth":console.log("Worker control: auth token..."),e.options&&typeof e.options.token<"u"&&(xy=e.options.token);break;case"trail":console.log("Worker control: Fetch vessel trail from server..."),e.options&&(li.trailDuration=e.options.trailDuration??24,e.options.trailResolution&&(li.trailResolution.lastHour=e.options.trailResolution.lastHour??"5s",li.trailResolution.next23=e.options.trailResolution.next23??"1m",li.trailResolution.beyond24=e.options.trailResolution.beyond24??"5m")),function gx(e){console.info("Worker: Fetching vessel trail from server",e);const t=Pc+"/self/track?",n=[];e.trailDuration>24&&(n.push(di(`${t}timespan=${e.trailDuration-24}h&resolution=${e.trailResolution.beyond24}×panOffset=24`)),n.push(di(`${t}timespan=23h&resolution=${e.trailResolution.next23}×panOffset=1`))),e.trailDuration>1&&e.trailDuration<25&&n.push(di(`${t}timespan=${e.trailDuration-1}h&resolution=${e.trailResolution.next23}×panOffset=1`)),n.push(di(`${t}timespan=1h&resolution=${e.trailResolution.lastHour}`));let i=[];const s=new cx;s.playback=Yt,Promise.all(n).then(a=>{let l=0;const u=n.length-1;a.forEach(d=>{if(d.type&&"MultiLineString"===d.type&&d.coordinates&&Array.isArray(d.coordinates))if(l!==u){let p=[];for(d.coordinates.forEach(v=>{p=p.concat(v)}),p=(0,dx.p$)(p,5e-4,true);p.length>60;){const v=p.slice(0,60);i.push(v),p=p.slice(59),p[0]=[p[0][0]+5e-9,p[0][1]+5e-9]}0!==p.length&&i.push(p)}else i=i.concat(d.coordinates);l++}),s.result=i,postMessage(s)}).catch(()=>{s.result=null,postMessage(s)})}(li)}}(e)})})()})();
|
|
@@ -5,7 +5,7 @@ MIT
|
|
|
5
5
|
MIT
|
|
6
6
|
The MIT License
|
|
7
7
|
|
|
8
|
-
Copyright (c)
|
|
8
|
+
Copyright (c) 2024 Google LLC.
|
|
9
9
|
|
|
10
10
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
11
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -39,7 +39,7 @@ MIT
|
|
|
39
39
|
MIT
|
|
40
40
|
The MIT License
|
|
41
41
|
|
|
42
|
-
Copyright (c)
|
|
42
|
+
Copyright (c) 2024 Google LLC.
|
|
43
43
|
|
|
44
44
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
45
45
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -698,7 +698,7 @@ sax
|
|
|
698
698
|
ISC
|
|
699
699
|
The ISC License
|
|
700
700
|
|
|
701
|
-
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
701
|
+
Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
|
|
702
702
|
|
|
703
703
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
704
704
|
purpose with or without fee is hereby granted, provided that the above
|
|
@@ -717,7 +717,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
717
717
|
`String.fromCodePoint` by Mathias Bynens used according to terms of MIT
|
|
718
718
|
License, as follows:
|
|
719
719
|
|
|
720
|
-
|
|
720
|
+
Copyright (c) 2010-2022 Mathias Bynens <https://mathiasbynens.be/>
|
|
721
721
|
|
|
722
722
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
723
723
|
a copy of this software and associated documentation files (the
|
|
Binary file
|
|
Binary file
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
function toggleMenu() {
|
|
15
15
|
contentLeft.style.display =
|
|
16
|
-
!contentLeft.style.display || contentLeft.style.display
|
|
16
|
+
!contentLeft.style.display || contentLeft.style.display === 'none'
|
|
17
17
|
? 'block'
|
|
18
18
|
: 'none';
|
|
19
19
|
}
|
|
@@ -1869,10 +1869,15 @@
|
|
|
1869
1869
|
<b>VESSEL:</b><br />
|
|
1870
1870
|
This section provides choices when displaying data for the vessel.<br />
|
|
1871
1871
|
<img
|
|
1872
|
-
src="./img/
|
|
1872
|
+
src="./img/settings_vessels_1.png"
|
|
1873
1873
|
style="height: 350px"
|
|
1874
1874
|
alt=""
|
|
1875
1875
|
/><br />
|
|
1876
|
+
<img
|
|
1877
|
+
src="./img/settings_vessels_2.png"
|
|
1878
|
+
style="height: 220px"
|
|
1879
|
+
alt=""
|
|
1880
|
+
/><br />
|
|
1876
1881
|
|
|
1877
1882
|
<ul>
|
|
1878
1883
|
<li>
|
|
@@ -1887,6 +1892,21 @@
|
|
|
1887
1892
|
<b>Display Wind Vectors</b>: Select to display wind vectors for
|
|
1888
1893
|
the vessel on the map.
|
|
1889
1894
|
</li>
|
|
1895
|
+
<li>
|
|
1896
|
+
<b>Heading Line Length</b>: Select length of heading line
|
|
1897
|
+
displayed on the map.
|
|
1898
|
+
<ul>
|
|
1899
|
+
<li>
|
|
1900
|
+
<b>Default</b>: Calculates the length of the line displayed
|
|
1901
|
+
based on the vessel SOG and the map scale.
|
|
1902
|
+
</li>
|
|
1903
|
+
<li><b>(x) NM</b> Length of the line to display.</li>
|
|
1904
|
+
</ul>
|
|
1905
|
+
</li>
|
|
1906
|
+
<li>
|
|
1907
|
+
<b>COG Line</b>: Display a line to the predicted location based on
|
|
1908
|
+
the selected time and the vessel's current SOG.
|
|
1909
|
+
</li>
|
|
1890
1910
|
<li>
|
|
1891
1911
|
<b>Display Vessel Trail</b>: Check this box if you want to display
|
|
1892
1912
|
the vessel trail.<br />
|
|
@@ -1912,8 +1932,8 @@
|
|
|
1912
1932
|
</ul>
|
|
1913
1933
|
<span style="color: red"
|
|
1914
1934
|
><b>Note:</b> Selections will determine the volume of data
|
|
1915
|
-
transferred from the server which may impact performance.
|
|
1916
|
-
|
|
1935
|
+
transferred from the server which may impact performance. </span
|
|
1936
|
+
><br />
|
|
1917
1937
|
Trail data received from the server undergoes temporal
|
|
1918
1938
|
simplification to minimise the data used to display the trail
|
|
1919
1939
|
whilst maintianing integrity.
|