@idm-plugin/geo 1.7.6 → 1.7.8
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/dist/index.js +129 -127
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "@turf/turf";
|
|
2
|
-
import
|
|
2
|
+
import m from "moment";
|
|
3
3
|
import _ from "@log4js-node/log4js-api";
|
|
4
4
|
var a0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
5
|
function X0(E) {
|
|
@@ -8,18 +8,18 @@ function X0(E) {
|
|
|
8
8
|
var j = { exports: {} };
|
|
9
9
|
(function(E) {
|
|
10
10
|
//! moment-timezone.js
|
|
11
|
-
//! version : 0.5.
|
|
11
|
+
//! version : 0.5.48
|
|
12
12
|
//! Copyright (c) JS Foundation and other contributors
|
|
13
13
|
//! license : MIT
|
|
14
14
|
//! github.com/moment/moment-timezone
|
|
15
15
|
(function(M, z) {
|
|
16
|
-
E.exports ? E.exports = z(
|
|
16
|
+
E.exports ? E.exports = z(m) : z(M.moment);
|
|
17
17
|
})(a0, function(M) {
|
|
18
18
|
M.version === void 0 && M.default && (M = M.default);
|
|
19
|
-
var z = "0.5.
|
|
19
|
+
var z = "0.5.48", p = {}, O = {}, A = {}, b = {}, c = {}, o;
|
|
20
20
|
(!M || typeof M.version != "string") && D("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
|
|
21
|
-
var q = M.version.split("."),
|
|
22
|
-
(
|
|
21
|
+
var q = M.version.split("."), Y = +q[0], d = +q[1];
|
|
22
|
+
(Y < 2 || Y === 2 && d < 6) && D("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
|
|
23
23
|
function L(W) {
|
|
24
24
|
return W > 96 ? W - 87 : W > 64 ? W - 29 : W - 48;
|
|
25
25
|
}
|
|
@@ -241,7 +241,7 @@ var j = { exports: {} };
|
|
|
241
241
|
return !M.isMoment(W) && J(R) && (i = g(n)) && R.add(i.parse(R), "minutes"), R.tz(n), R;
|
|
242
242
|
}
|
|
243
243
|
u.version = z, u.dataVersion = "", u._zones = p, u._links = O, u._names = b, u._countries = A, u.add = k, u.link = v, u.load = Y0, u.zone = g, u.zoneExists = $, u.guess = O0, u.names = A0, u.Zone = I, u.unpack = P, u.unpackBase60 = T, u.needsOffset = J, u.moveInvalidForward = !0, u.moveAmbiguousForward = !1, u.countries = c0, u.zonesForCountry = q0;
|
|
244
|
-
var
|
|
244
|
+
var C = M.fn;
|
|
245
245
|
M.tz = u, M.defaultZone = null, M.updateOffset = function(W, a) {
|
|
246
246
|
var n = M.defaultZone, R;
|
|
247
247
|
if (W._z === void 0 && (n && J(W) && !W._isUTC && W.isValid() && (W._d = M.utc(W._a)._d, W.utc().add(n.parse(W), "minutes")), W._z = n), W._z)
|
|
@@ -250,7 +250,7 @@ var j = { exports: {} };
|
|
|
250
250
|
W.utcOffset(-R, a), W._z = i;
|
|
251
251
|
} else
|
|
252
252
|
W.zone(R, a);
|
|
253
|
-
},
|
|
253
|
+
}, C.tz = function(W, a) {
|
|
254
254
|
if (W) {
|
|
255
255
|
if (typeof W != "string")
|
|
256
256
|
throw new Error("Time zone name must be a string, got " + W + " [" + typeof W + "]");
|
|
@@ -274,15 +274,15 @@ var j = { exports: {} };
|
|
|
274
274
|
return arguments.length > 0 && (this._z = null), W.apply(this, arguments);
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
return (
|
|
277
|
+
C.zoneName = y(C.zoneName), C.zoneAbbr = y(C.zoneAbbr), C.utc = w(C.utc), C.local = w(C.local), C.utcOffset = d0(C.utcOffset), M.tz.setDefault = function(W) {
|
|
278
|
+
return (Y < 2 || Y === 2 && d < 9) && D("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = W ? g(W) : null, M;
|
|
279
279
|
};
|
|
280
280
|
var h = M.momentProperties;
|
|
281
281
|
return Object.prototype.toString.call(h) === "[object Array]" ? (h.push("_z"), h.push("_a")) : h && (h._z = null), M;
|
|
282
282
|
});
|
|
283
283
|
})(j);
|
|
284
284
|
var n0 = j.exports;
|
|
285
|
-
const R0 = "
|
|
285
|
+
const R0 = "2025b", L0 = [
|
|
286
286
|
"Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5",
|
|
287
287
|
"Africa/Nairobi|LMT +0230 EAT +0245|-2r.g -2u -30 -2J|012132|-2ua2r.g N6nV.g 3Fbu h1cu dzbJ|47e5",
|
|
288
288
|
"Africa/Algiers|LMT PMT WET WEST CET CEST|-c.c -9.l 0 -10 -10 -20|01232323232323232454542423234542324|-3bQ0c.c MDA2.P cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5",
|
|
@@ -337,6 +337,7 @@ const R0 = "2025a", L0 = [
|
|
|
337
337
|
"America/Chihuahua|LMT MST CST MDT CDT|74.k 70 60 60 50|0121312424231313131313131313131313131313131313131313131313132|-1UQF0 deo0 8lz0 16p0 11z0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4",
|
|
338
338
|
"America/Ciudad_Juarez|LMT MST CST MDT CDT|75.U 70 60 60 50|01213124242313131313131313131313131313131313131313131313131321313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQF0 deo0 8lz0 16p0 11z0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 R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|
340
|
+
"America/Coyhaique|LMT SMT -05 -04 -03|4M.g 4G.J 50 40 30|012131323232323232323434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-3eLvb.I MJbS.t fJAh.f 5knG.J 1Vzh.f jRAG.J 1pbh.f 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0|",
|
|
340
341
|
"America/Phoenix|LMT MST MDT MWT|7s.i 70 60 60|012121313121|-3tFF0 1nEe0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5",
|
|
341
342
|
"America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4",
|
|
342
343
|
"America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8",
|
|
@@ -499,7 +500,7 @@ const R0 = "2025a", L0 = [
|
|
|
499
500
|
"Asia/Taipei|LMT CST JST CDT|-86 -80 -90 -90|012131313131313131313131313131313131313131|-30bk6 1FDc6 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5",
|
|
500
501
|
"Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5",
|
|
501
502
|
"Asia/Tbilisi|LMT TBMT +03 +04 +05|-2X.b -2X.b -30 -40 -50|01234343434343434343434323232343434343434343434323|-3D8OX.b 1LUM0 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5",
|
|
502
|
-
"Asia/Tehran|LMT TMT +0330 +0430 +04 +05|-3p.I -3p.I -3u -4u -40 -50|012345423232323232323232323232323232323232323232323232323232323232323232|-2btDp.I Llc0 1FHaT.I 1pc0 120u Rc0
|
|
503
|
+
"Asia/Tehran|LMT TMT +0330 +0430 +04 +05|-3p.I -3p.I -3u -4u -40 -50|012345423232323232323232323232323232323232323232323232323232323232323232|-2btDp.I Llc0 1FHaT.I 1pc0 120u Rc0 Dc0 1iMu JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6",
|
|
503
504
|
"Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3",
|
|
504
505
|
"Asia/Tokyo|LMT JST JDT|-9i.X -90 -a0|0121212121|-3jE90 2qSo0 Rc0 1lc0 14o0 1zc0 Oo0 1zc0 Oo0|38e6",
|
|
505
506
|
"Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5",
|
|
@@ -925,7 +926,7 @@ const R0 = "2025a", L0 = [
|
|
|
925
926
|
"CH|Europe/Zurich",
|
|
926
927
|
"CI|Africa/Abidjan",
|
|
927
928
|
"CK|Pacific/Rarotonga",
|
|
928
|
-
"CL|America/Santiago America/Punta_Arenas Pacific/Easter",
|
|
929
|
+
"CL|America/Santiago America/Coyhaique America/Punta_Arenas Pacific/Easter",
|
|
929
930
|
"CM|Africa/Lagos Africa/Douala",
|
|
930
931
|
"CN|Asia/Shanghai Asia/Urumqi",
|
|
931
932
|
"CO|America/Bogota",
|
|
@@ -1144,10 +1145,10 @@ var x = { exports: {} };
|
|
|
1144
1145
|
throw new RangeError("invalid coordinates");
|
|
1145
1146
|
if (90 <= z)
|
|
1146
1147
|
return "Etc/GMT";
|
|
1147
|
-
var b = -1, c = 48 * (180 + p) / 360.00000000000006, o = 24 * (90 - z) / 180.00000000000003, q = 0 | c,
|
|
1148
|
-
for (
|
|
1149
|
-
|
|
1150
|
-
return A[
|
|
1148
|
+
var b = -1, c = 48 * (180 + p) / 360.00000000000006, o = 24 * (90 - z) / 180.00000000000003, q = 0 | c, Y = 0 | o, d = 96 * Y + 2 * q;
|
|
1149
|
+
for (d = 56 * O.charCodeAt(d) + O.charCodeAt(d + 1) - 1995; d + A.length < 3136; )
|
|
1150
|
+
d = 56 * O.charCodeAt(d = 8 * (b = b + d + 1) + 4 * (Y = 0 | (o = 2 * (o - Y) % 2)) + 2 * (q = 0 | (c = 2 * (c - q) % 2)) + 2304) + O.charCodeAt(d + 1) - 1995;
|
|
1151
|
+
return A[d + A.length - 3136];
|
|
1151
1152
|
}
|
|
1152
1153
|
E.exports = M;
|
|
1153
1154
|
})(x);
|
|
@@ -1160,7 +1161,7 @@ class X {
|
|
|
1160
1161
|
* @param lat
|
|
1161
1162
|
*/
|
|
1162
1163
|
static guessTimeZoneOffset(M, z) {
|
|
1163
|
-
const p = f0(z, M), O =
|
|
1164
|
+
const p = f0(z, M), O = m().tz(p).utcOffset();
|
|
1164
1165
|
return this.roundPrecision(O / 60, 1);
|
|
1165
1166
|
}
|
|
1166
1167
|
/**
|
|
@@ -1176,12 +1177,12 @@ class X {
|
|
|
1176
1177
|
z = z < 6 ? 6 : z, M = X.convertToStdLng(M, z);
|
|
1177
1178
|
let O = "E";
|
|
1178
1179
|
M < 0 && (O = "W"), M = Math.abs(M), p = p.toUpperCase();
|
|
1179
|
-
let A = M * 3600, b, c, o, q,
|
|
1180
|
-
b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60),
|
|
1181
|
-
const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi,
|
|
1180
|
+
let A = M * 3600, b, c, o, q, Y, d;
|
|
1181
|
+
b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(3, "0") : d = X.padNumber(Y, 3, 2), Number(c) >= 60 && (q = Number(q) + 1, c = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
|
|
1182
|
+
const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
|
|
1182
1183
|
return {
|
|
1183
1184
|
direction: O,
|
|
1184
|
-
degree: X.roundPrecision(
|
|
1185
|
+
degree: X.roundPrecision(Y, z),
|
|
1185
1186
|
minute: X.roundPrecision(o, z),
|
|
1186
1187
|
second: X.roundPrecision(b, z),
|
|
1187
1188
|
pretty: L
|
|
@@ -1197,12 +1198,12 @@ class X {
|
|
|
1197
1198
|
z = z < 6 ? 6 : z, M = M % 180;
|
|
1198
1199
|
let O = "N";
|
|
1199
1200
|
M < 0 && (O = "S"), M = Math.abs(M), p = p.toUpperCase();
|
|
1200
|
-
let A = M * 3600, b, c, o, q,
|
|
1201
|
-
b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60),
|
|
1202
|
-
const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi,
|
|
1201
|
+
let A = M * 3600, b, c, o, q, Y, d;
|
|
1202
|
+
b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(2, "0") : d = X.padNumber(Y, 2, 2), Number(c) >= 60 && (q = Number(q) + 1, c = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
|
|
1203
|
+
const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
|
|
1203
1204
|
return {
|
|
1204
1205
|
direction: O,
|
|
1205
|
-
degree: X.roundPrecision(
|
|
1206
|
+
degree: X.roundPrecision(Y, z),
|
|
1206
1207
|
minute: X.roundPrecision(o, z),
|
|
1207
1208
|
second: X.roundPrecision(b, z),
|
|
1208
1209
|
pretty: L
|
|
@@ -1389,9 +1390,9 @@ class N {
|
|
|
1389
1390
|
static interpolateCoordinates(M, z, p, O = !0, A = !0, b = "nauticalmiles") {
|
|
1390
1391
|
const c = [], o = this.calculateBearing(M, z, !1), q = this.calculateDistance(M, z, !1, 8, b);
|
|
1391
1392
|
O && c.push({ lng: M.lng, lat: M.lat });
|
|
1392
|
-
let
|
|
1393
|
-
for (;
|
|
1394
|
-
|
|
1393
|
+
let Y = 0;
|
|
1394
|
+
for (; Y < q; )
|
|
1395
|
+
Y += p, Y < q && c.push(this.calculateCoordinate(M, o, Y, b, !1));
|
|
1395
1396
|
return A && c.push({ lng: z.lng, lat: z.lat }), c;
|
|
1396
1397
|
}
|
|
1397
1398
|
/**
|
|
@@ -1420,12 +1421,12 @@ class N {
|
|
|
1420
1421
|
[A, M[c].lat],
|
|
1421
1422
|
[b, M[c + 1].lat]
|
|
1422
1423
|
]);
|
|
1423
|
-
let
|
|
1424
|
-
z ? (
|
|
1424
|
+
let Y, d;
|
|
1425
|
+
z ? (Y = e.lineString(q), d = e.lineString([
|
|
1425
1426
|
[o > 0 ? 180 : -180, 89],
|
|
1426
1427
|
[o > 0 ? 180 : -180, -89]
|
|
1427
|
-
])) : (
|
|
1428
|
-
const L = e.lineIntersect(
|
|
1428
|
+
])) : (Y = e.greatCircle(q[0], q[1]), d = e.greatCircle([o > 0 ? 180 : -180, 89], [o > 0 ? 180 : -180, -89]));
|
|
1429
|
+
const L = e.lineIntersect(Y, d);
|
|
1429
1430
|
let T;
|
|
1430
1431
|
if (L.features.length) {
|
|
1431
1432
|
const U = e.getCoord(L.features[0]);
|
|
@@ -1495,9 +1496,9 @@ class N {
|
|
|
1495
1496
|
M.lng = X.convertToStdLng(M.lng, 8);
|
|
1496
1497
|
let p = Number.MAX_VALUE, O = 0, A = 0, b, c;
|
|
1497
1498
|
return z.forEach((o, q) => {
|
|
1498
|
-
for (let
|
|
1499
|
-
const
|
|
1500
|
-
p > T && (p = T, A =
|
|
1499
|
+
for (let Y = 0; Y < o.length - 1; Y++) {
|
|
1500
|
+
const d = { lng: o[Y][0], lat: o[Y][1] }, L = { lng: o[Y + 1][0], lat: o[Y + 1][1] }, T = this.calculatePointToLineDistance(M, d, L);
|
|
1501
|
+
p > T && (p = T, A = Y, O = q, b = this.calculateDistance(d, M), c = this.calculateDistance(L, M));
|
|
1501
1502
|
}
|
|
1502
1503
|
}), b !== 0 && c !== 0 ? z[O].splice(A + 1, 0, [M.lng, M.lat]) : b === 0 ? z[O].splice(A, 1, [M.lng, M.lat]) : c === 0 && z[O].splice(A + 1, 1, [M.lng, M.lat]), z;
|
|
1503
1504
|
}
|
|
@@ -1565,11 +1566,11 @@ class N {
|
|
|
1565
1566
|
*/
|
|
1566
1567
|
static calculateRangeWaypoints(M, z, p, O = []) {
|
|
1567
1568
|
const A = this.convertRouteToCoordinates(p, 0), b = this.mergeCoordinatesToWaypoints([M, z], A.length ? A : O), c = b.findIndex(
|
|
1568
|
-
(
|
|
1569
|
+
(Y) => X.roundPrecision(M.lng, 8) === X.roundPrecision(Y.lng, 8) && X.roundPrecision(M.lat, 8) === X.roundPrecision(Y.lat, 8)
|
|
1569
1570
|
), o = b.findIndex(
|
|
1570
|
-
(
|
|
1571
|
+
(Y) => X.roundPrecision(z.lng, 8) === X.roundPrecision(Y.lng, 8) && X.roundPrecision(z.lat, 8) === X.roundPrecision(Y.lat, 8)
|
|
1571
1572
|
);
|
|
1572
|
-
return b.filter((
|
|
1573
|
+
return b.filter((Y, d) => d >= c && d <= o);
|
|
1573
1574
|
}
|
|
1574
1575
|
/**
|
|
1575
1576
|
* 计算坐标到航路上的最短距离
|
|
@@ -1580,8 +1581,8 @@ class N {
|
|
|
1580
1581
|
let p = Number.MAX_VALUE, O = 0, A = 0;
|
|
1581
1582
|
return z.forEach((b, c) => {
|
|
1582
1583
|
for (let o = 0; o < b.length - 1; o++) {
|
|
1583
|
-
const q = { lng: b[o][0], lat: b[o][1] },
|
|
1584
|
-
p >
|
|
1584
|
+
const q = { lng: b[o][0], lat: b[o][1] }, Y = { lng: b[o + 1][0], lat: b[o + 1][1] }, d = this.calculatePointToLineDistance(M, q, Y);
|
|
1585
|
+
p > d && (p = d, O = o, A = c);
|
|
1585
1586
|
}
|
|
1586
1587
|
}), { minDist: p, segIndex: A, minIndex: O };
|
|
1587
1588
|
}
|
|
@@ -1602,8 +1603,8 @@ class N {
|
|
|
1602
1603
|
if (c) {
|
|
1603
1604
|
const q = [];
|
|
1604
1605
|
q.push([M.lng, M.lat]);
|
|
1605
|
-
for (let
|
|
1606
|
-
M.lng === z[o][
|
|
1606
|
+
for (let Y = A + 1; Y < z[o].length; Y++)
|
|
1607
|
+
M.lng === z[o][Y][0] && M.lat === z[o][Y][1] || q.push(z[o][Y]);
|
|
1607
1608
|
b.push(q), c = !1;
|
|
1608
1609
|
} else
|
|
1609
1610
|
b.push([...z[o]]);
|
|
@@ -1622,7 +1623,7 @@ class N {
|
|
|
1622
1623
|
if (this.calculateDistance(M, c) === 0)
|
|
1623
1624
|
return z;
|
|
1624
1625
|
if (this.calculateDistance(M, o) === 0)
|
|
1625
|
-
return z.filter((
|
|
1626
|
+
return z.filter((Y, d) => d > 0);
|
|
1626
1627
|
const q = this.calculatePointToLineDistance(M, c, o);
|
|
1627
1628
|
p > q && (p = q, O = b);
|
|
1628
1629
|
}
|
|
@@ -1691,17 +1692,17 @@ class N {
|
|
|
1691
1692
|
z.push(M);
|
|
1692
1693
|
else {
|
|
1693
1694
|
for (let o = 0; o < z.length - 1; o++) {
|
|
1694
|
-
const q = { lng: z[o].lng, lat: z[o].lat },
|
|
1695
|
-
O >=
|
|
1695
|
+
const q = { lng: z[o].lng, lat: z[o].lat }, Y = { lng: z[o + 1].lng, lat: z[o + 1].lat }, d = this.calculatePointToLineDistance(M, q, Y);
|
|
1696
|
+
O >= d && (O = d, A = o, b = this.calculateDistance(q, M, !1, 6), c = this.calculateDistance(Y, M, !1, 6));
|
|
1696
1697
|
}
|
|
1697
1698
|
b !== 0 && c !== 0 ? b < O || b === O && A === 0 ? z.unshift(M) : c < O || c === O && A === z.length - 2 ? z.push(M) : z.splice(A + 1, 0, M) : b === 0 ? p ? z.splice(A, 1, M) : z.splice(A + 1, 0, M) : c === 0 && (p ? z.splice(A + 1, 1, M) : z.splice(A + 1, 0, M));
|
|
1698
1699
|
}
|
|
1699
1700
|
return z.map((o, q) => {
|
|
1700
1701
|
o.lng = X.convertToStdLng(o.lng);
|
|
1701
|
-
const
|
|
1702
|
-
if (
|
|
1703
|
-
const
|
|
1704
|
-
o.sog = X.roundPrecision(
|
|
1702
|
+
const Y = z[q + 1];
|
|
1703
|
+
if (Y && (o.bearing || ((o.positionTime || 0) > (Y.positionTime || 0) ? o.bearing = this.calculateBearing(Y, o, !0) : o.bearing = this.calculateBearing(o, Y, !0)), o.cog = o.cog || o.bearing, !o.sog && o.positionTime && Y.positionTime)) {
|
|
1704
|
+
const d = this.calculateDistance(o, Y, !0), L = Math.abs(Y.positionTime - o.positionTime) / 3600;
|
|
1705
|
+
o.sog = X.roundPrecision(d / L, 2);
|
|
1705
1706
|
}
|
|
1706
1707
|
return o;
|
|
1707
1708
|
});
|
|
@@ -1764,7 +1765,7 @@ class N {
|
|
|
1764
1765
|
static calculateNextCoordinateAlongRoute(M, z, p, O = "nauticalmiles") {
|
|
1765
1766
|
var L;
|
|
1766
1767
|
const A = M.speed || 12, b = [];
|
|
1767
|
-
let c = [], o = !1, q = 0,
|
|
1768
|
+
let c = [], o = !1, q = 0, Y = 0, d;
|
|
1768
1769
|
if (z && p.length ? (b.push(M), p.forEach((T, U) => {
|
|
1769
1770
|
if (o)
|
|
1770
1771
|
c.push(T);
|
|
@@ -1772,32 +1773,32 @@ class N {
|
|
|
1772
1773
|
const r = [];
|
|
1773
1774
|
let s;
|
|
1774
1775
|
for (let P = 0; P < T.length; P++)
|
|
1775
|
-
if (
|
|
1776
|
+
if (d)
|
|
1776
1777
|
r.push(T[P]);
|
|
1777
1778
|
else {
|
|
1778
1779
|
s = { lng: T[P][0], lat: T[P][1] };
|
|
1779
1780
|
const I = this.calculateDistance(M, s, !0, 8, O);
|
|
1780
1781
|
if (q += I, q < z)
|
|
1781
|
-
|
|
1782
|
+
Y += I, I && b.push(s), M = s;
|
|
1782
1783
|
else {
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1784
|
+
if (Y = z, q === z)
|
|
1785
|
+
d = s, r.push([d.lng, d.lat]);
|
|
1785
1786
|
else {
|
|
1786
1787
|
const l = q - z, f = this.calculateBearing(s, M);
|
|
1787
|
-
|
|
1788
|
+
d = this.calculateCoordinate(s, f, l, O), r.push([d.lng, d.lat]), r.push([s.lng, s.lat]);
|
|
1788
1789
|
}
|
|
1789
1790
|
o = !0;
|
|
1790
1791
|
}
|
|
1791
1792
|
}
|
|
1792
|
-
r.length && c.push(r), U === p.length - 1 && !
|
|
1793
|
+
r.length && c.push(r), U === p.length - 1 && !d && (d = s);
|
|
1793
1794
|
}
|
|
1794
|
-
})) : (c = p,
|
|
1795
|
-
if (b.push(
|
|
1795
|
+
})) : (c = p, d = { ...M }), d)
|
|
1796
|
+
if (b.push(d), d.distanceFromPrevious = Y, d.hourFromPrevious = Math.round(Y / A * 1e4) / 1e4, ((L = c[0]) == null ? void 0 : L.length) > 1) {
|
|
1796
1797
|
const T = { lng: c[0][1][0], lat: c[0][1][1] };
|
|
1797
|
-
|
|
1798
|
+
d.bearing = this.calculateBearing(d, T);
|
|
1798
1799
|
} else
|
|
1799
|
-
|
|
1800
|
-
return { coordinate:
|
|
1800
|
+
d.bearing = 0;
|
|
1801
|
+
return { coordinate: d, nextRoute: c, prevRoute: b };
|
|
1801
1802
|
}
|
|
1802
1803
|
/**
|
|
1803
1804
|
* 返回最近点及其是否为垂足(最近点不是起点或终点)
|
|
@@ -1809,8 +1810,8 @@ class N {
|
|
|
1809
1810
|
const O = X.convertToStdLng(M.lng, 6), A = e.point([O, M.lat]), b = X.convertToStdLng(z.lng, 6), c = X.convertToStdLng(p.lng, 6), o = e.lineString([
|
|
1810
1811
|
[b, z.lat],
|
|
1811
1812
|
[c, p.lat]
|
|
1812
|
-
]), q = e.nearestPointOnLine(o, A),
|
|
1813
|
-
return { lng:
|
|
1813
|
+
]), q = e.nearestPointOnLine(o, A), Y = e.getCoord(q), d = X.roundPrecision(Y[0], 6), L = X.roundPrecision(Y[1], 6);
|
|
1814
|
+
return { lng: d, lat: L, inline: !(d === b && L === z.lat) && !(d === c && L === p.lat) };
|
|
1814
1815
|
}
|
|
1815
1816
|
/**
|
|
1816
1817
|
* 将route转coordinate
|
|
@@ -1922,14 +1923,14 @@ class N {
|
|
|
1922
1923
|
const O = [];
|
|
1923
1924
|
for (let A = 1; A < M.length; A++) {
|
|
1924
1925
|
const b = M[A - 1], c = M[A], o = M[A + 1];
|
|
1925
|
-
let q = !1,
|
|
1926
|
-
if ((b.velocity || b.suspend || b.important || b.pilot || A === 1) && (q = !0, O.push(b)), c.gcToPrevious && (q || (q = !0, O.push(b)),
|
|
1927
|
-
const
|
|
1928
|
-
Math.round(Math.acos(U) * 180 / Math.PI) < p && T > z && !
|
|
1926
|
+
let q = !1, Y = !1;
|
|
1927
|
+
if ((b.velocity || b.suspend || b.important || b.pilot || A === 1) && (q = !0, O.push(b)), c.gcToPrevious && (q || (q = !0, O.push(b)), Y = !0, O.push(c), A++), o) {
|
|
1928
|
+
const d = N.calculateDistance(b, c, !0), L = N.calculateDistance(c, o, !0), T = N.calculateDistance(b, o, !0), U = (Math.pow(d, 2) + Math.pow(L, 2) - Math.pow(T, 2)) / (2 * d * L);
|
|
1929
|
+
Math.round(Math.acos(U) * 180 / Math.PI) < p && T > z && !Y && (O.push(c), A++);
|
|
1929
1930
|
}
|
|
1930
1931
|
if (A >= M.length - 1) {
|
|
1931
|
-
const
|
|
1932
|
-
|
|
1932
|
+
const d = M.at(-1);
|
|
1933
|
+
d && O.push(d);
|
|
1933
1934
|
}
|
|
1934
1935
|
}
|
|
1935
1936
|
return O;
|
|
@@ -1941,7 +1942,7 @@ class N {
|
|
|
1941
1942
|
* @param waypoints 带时间的轨迹, 单位秒
|
|
1942
1943
|
*/
|
|
1943
1944
|
static nearestTSPointInWaypoints(M, z, p) {
|
|
1944
|
-
const O =
|
|
1945
|
+
const O = m.unix(M), A = p.filter(
|
|
1945
1946
|
(b) => O.clone().subtract(z, "hour").unix() <= (b.positionTime || 0) && O.clone().add(z, "h").unix() >= (b.positionTime || 0)
|
|
1946
1947
|
);
|
|
1947
1948
|
return A.sort((b, c) => (b.positionTime || 0) - (c.positionTime || 0)), A.at(-1);
|
|
@@ -1954,15 +1955,15 @@ class N {
|
|
|
1954
1955
|
static deadReckoning(M, z) {
|
|
1955
1956
|
var A, b, c, o;
|
|
1956
1957
|
M > 1e12 && (M = Math.round(M / 1e3));
|
|
1957
|
-
const p =
|
|
1958
|
+
const p = m.unix(M);
|
|
1958
1959
|
let O = z.find((q) => q.positionTime === p.unix());
|
|
1959
1960
|
if (!O) {
|
|
1960
|
-
const q = (b = (A = z.filter((
|
|
1961
|
-
if (q &&
|
|
1962
|
-
const
|
|
1963
|
-
O = N.calculateCoordinate(q,
|
|
1961
|
+
const q = (b = (A = z.filter((d) => (d == null ? void 0 : d.positionTime) < p.unix())) == null ? void 0 : A.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : b.at(-1), Y = (o = (c = z.filter((d) => (d == null ? void 0 : d.positionTime) > p.unix())) == null ? void 0 : c.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : o.at(0);
|
|
1962
|
+
if (q && Y) {
|
|
1963
|
+
const d = N.calculateBearing(q, Y, !0), L = N.calculateDistance(q, Y), T = (p.unix() - q.positionTime) / (Y.positionTime - q.positionTime);
|
|
1964
|
+
O = N.calculateCoordinate(q, d, L * T), O.positionTime = p.unix(), O.utc = p.utc().format(), O.cog = d, O.sog = Math.round(L / ((Y.positionTime - q.positionTime) / 3600) * 100) / 100;
|
|
1964
1965
|
} else
|
|
1965
|
-
O = q ||
|
|
1966
|
+
O = q || Y, O && (O.utc = m.unix(O == null ? void 0 : O.positionTime).utc().format());
|
|
1966
1967
|
}
|
|
1967
1968
|
return O;
|
|
1968
1969
|
}
|
|
@@ -1972,10 +1973,10 @@ class N {
|
|
|
1972
1973
|
* @param positions
|
|
1973
1974
|
*/
|
|
1974
1975
|
static deadReckoningTime(M, z) {
|
|
1975
|
-
z = JSON.parse(JSON.stringify(z)), z.sort((q,
|
|
1976
|
+
z = JSON.parse(JSON.stringify(z)), z.sort((q, Y) => q.positionTime - Y.positionTime);
|
|
1976
1977
|
let p = Number.MAX_SAFE_INTEGER, O = Number.MAX_SAFE_INTEGER;
|
|
1977
1978
|
for (let q = 0; q < z.length - 1; q++) {
|
|
1978
|
-
const
|
|
1979
|
+
const Y = z[q], d = z[q + 1], L = N.calculatePointToLineDistance(M, Y, d);
|
|
1979
1980
|
L < p && (p = L, O = q);
|
|
1980
1981
|
}
|
|
1981
1982
|
const A = z[O], b = z[O + 1], c = N.calculateDistance(A, M), o = N.calculateDistance(b, M);
|
|
@@ -1984,10 +1985,10 @@ class N {
|
|
|
1984
1985
|
else if (o === 0)
|
|
1985
1986
|
M = b;
|
|
1986
1987
|
else {
|
|
1987
|
-
const q = N.nearestCoordinateInLine(M, A, b),
|
|
1988
|
+
const q = N.nearestCoordinateInLine(M, A, b), Y = A.positionTime, d = b.positionTime, L = N.calculateDistance(A, q), T = N.calculateDistance(A, b), U = Math.round(Y + (d - Y) * (L / T));
|
|
1988
1989
|
M.positionTime = U;
|
|
1989
1990
|
}
|
|
1990
|
-
return M.utc = M.positionTime ?
|
|
1991
|
+
return M.utc = M.positionTime ? m.unix(M.positionTime).utc().format() : void 0, M.positionTime ? M : void 0;
|
|
1991
1992
|
}
|
|
1992
1993
|
/**
|
|
1993
1994
|
* 翻转轨迹
|
|
@@ -2022,41 +2023,42 @@ class t0 {
|
|
|
2022
2023
|
const A = (p = O.history) == null ? void 0 : p[0];
|
|
2023
2024
|
A && A.wind && (A.wind.spd = A.spd, A.wind.kts = A.kts);
|
|
2024
2025
|
for (const b of O.forecasts) {
|
|
2025
|
-
const c = [], o =
|
|
2026
|
+
const c = [], o = m(b.date).utc(), q = `${O.name}-${b.model}`;
|
|
2026
2027
|
if (A) {
|
|
2027
|
-
const
|
|
2028
|
+
const Y = m(A.updated).utc(), d = e.point([A.lng, A.lat], {
|
|
2028
2029
|
model: b.model,
|
|
2029
2030
|
name: O.name,
|
|
2030
|
-
date:
|
|
2031
|
+
date: Y.format(),
|
|
2031
2032
|
hour: 0,
|
|
2032
|
-
format:
|
|
2033
|
-
pressure: A.pressure > 1e4 ? X.roundPrecision(A.pressure / 100, 0) : X.roundPrecision(A.pressure, 0),
|
|
2034
|
-
wind: A
|
|
2033
|
+
format: Y.format("MMM-DD/HHmm[Z]"),
|
|
2034
|
+
pressure: A.pressure > 1e4 ? X.roundPrecision((A == null ? void 0 : A.pressure) / 100, 0) : X.roundPrecision(A.pressure, 0),
|
|
2035
|
+
wind: A.wind,
|
|
2036
|
+
movement: A.movement,
|
|
2035
2037
|
category: q,
|
|
2036
2038
|
type: "forecast"
|
|
2037
2039
|
});
|
|
2038
|
-
z.features.push(
|
|
2040
|
+
z.features.push(d), c.push(d.geometry.coordinates);
|
|
2039
2041
|
}
|
|
2040
|
-
for (const
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
const L = o.clone().add(Number(
|
|
2042
|
+
for (const Y in b == null ? void 0 : b.hours) {
|
|
2043
|
+
const d = b.hours[Y];
|
|
2044
|
+
d.wind.spd = d.wind.spd || d.wind.speed;
|
|
2045
|
+
const L = o.clone().add(Number(Y), "hour"), T = e.point([d.lng, d.lat], {
|
|
2044
2046
|
model: b.model,
|
|
2045
2047
|
name: O.name,
|
|
2046
2048
|
date: L.format(),
|
|
2047
|
-
hour: Number(
|
|
2049
|
+
hour: Number(Y),
|
|
2048
2050
|
format: L.format("MMM-DD/HHmm[Z]"),
|
|
2049
|
-
pressure:
|
|
2050
|
-
gusts:
|
|
2051
|
-
wind:
|
|
2052
|
-
movement:
|
|
2051
|
+
pressure: d.pressure > 1e4 ? X.roundPrecision(d.pressure / 100, 0) : X.roundPrecision(d.pressure, 0),
|
|
2052
|
+
gusts: d.gusts,
|
|
2053
|
+
wind: d.wind || {},
|
|
2054
|
+
movement: d.movement,
|
|
2053
2055
|
category: q,
|
|
2054
2056
|
type: "forecast"
|
|
2055
2057
|
});
|
|
2056
2058
|
z.features.push(T), c.push(T.geometry.coordinates);
|
|
2057
2059
|
}
|
|
2058
2060
|
if ((c == null ? void 0 : c.length) > 1) {
|
|
2059
|
-
const
|
|
2061
|
+
const Y = e.lineString(X.convertToMonotonicLng2(c), {
|
|
2060
2062
|
date: b.date,
|
|
2061
2063
|
id: O.id || O.name,
|
|
2062
2064
|
model: b.model,
|
|
@@ -2064,14 +2066,14 @@ class t0 {
|
|
|
2064
2066
|
category: q,
|
|
2065
2067
|
type: "forecast"
|
|
2066
2068
|
});
|
|
2067
|
-
z.features.push(
|
|
2069
|
+
z.features.push(Y);
|
|
2068
2070
|
}
|
|
2069
2071
|
}
|
|
2070
2072
|
}
|
|
2071
2073
|
if (O.history) {
|
|
2072
2074
|
const A = [];
|
|
2073
2075
|
for (const c of O.history) {
|
|
2074
|
-
const o =
|
|
2076
|
+
const o = m(c.updated).utc(), q = e.point([c.lng, c.lat], {
|
|
2075
2077
|
name: O.name,
|
|
2076
2078
|
date: o.format(),
|
|
2077
2079
|
format: o.format("MMM-DD/HHmm[Z]"),
|
|
@@ -2113,17 +2115,17 @@ class t0 {
|
|
|
2113
2115
|
var A, b, c, o;
|
|
2114
2116
|
const p = (A = M == null ? void 0 : M.data) == null ? void 0 : A.features.filter((q) => q.geometry.type === "LineString" && q.properties.type === "forecast"), O = [];
|
|
2115
2117
|
for (const q of p) {
|
|
2116
|
-
const
|
|
2118
|
+
const Y = q.properties.name, d = q.properties.model, L = q.properties.showCircle, T = q.properties.disabled, U = m(q.properties.date).utc();
|
|
2117
2119
|
let r = z * 60 - (U.get("hour") * 60 + U.get("minute")) % (z * 60);
|
|
2118
2120
|
const s = (b = M == null ? void 0 : M.data) == null ? void 0 : b.features.filter(
|
|
2119
|
-
(l) => l.geometry.type === "Point" && l.properties.type === "forecast" && l.properties.category === `${
|
|
2121
|
+
(l) => l.geometry.type === "Point" && l.properties.type === "forecast" && l.properties.category === `${Y}-${d}`
|
|
2120
2122
|
);
|
|
2121
2123
|
let P, I = U.clone().add(r, "minute").set({ minute: 0, second: 0, millisecond: 0 });
|
|
2122
2124
|
for (; P = this.pickIndex(s, I), P <= s.length - 1; ) {
|
|
2123
2125
|
if (P > 0) {
|
|
2124
2126
|
const l = s[P], f = P === 0 ? void 0 : s[P - 1], G = (r / 60 - ((c = f == null ? void 0 : f.properties) == null ? void 0 : c.hour)) / (l.properties.hour - ((o = f == null ? void 0 : f.properties) == null ? void 0 : o.hour)), H = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[0], l.geometry.coordinates[0], G), Q = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[1], l.geometry.coordinates[1], G), F = e.point([H, Q], {
|
|
2125
|
-
name:
|
|
2126
|
-
model:
|
|
2127
|
+
name: Y,
|
|
2128
|
+
model: d,
|
|
2127
2129
|
category: l == null ? void 0 : l.properties.category,
|
|
2128
2130
|
date: I.format(),
|
|
2129
2131
|
format: I.format("MMM-DD/HHmm[Z]"),
|
|
@@ -2177,9 +2179,9 @@ class t0 {
|
|
|
2177
2179
|
hr: c
|
|
2178
2180
|
}), {};
|
|
2179
2181
|
}
|
|
2180
|
-
const q = N.calculateBearing(M, A),
|
|
2182
|
+
const q = N.calculateBearing(M, A), Y = N.calculateBearing(A, b), d = Math.abs(q - Y);
|
|
2181
2183
|
let L = 0;
|
|
2182
|
-
|
|
2184
|
+
d < 180 ? L = d + 90 : d >= 180 && (L = d - 90);
|
|
2183
2185
|
const T = N.calculateCoordinate(A, L, p);
|
|
2184
2186
|
return Z == null || Z.info("[%s] the right tangent position: %j", O.requestId, {
|
|
2185
2187
|
from: M,
|
|
@@ -2187,7 +2189,7 @@ class t0 {
|
|
|
2187
2189
|
t2: b,
|
|
2188
2190
|
radius: p,
|
|
2189
2191
|
bearing1: q,
|
|
2190
|
-
bearing2:
|
|
2192
|
+
bearing2: Y,
|
|
2191
2193
|
right: T
|
|
2192
2194
|
}), { at: T, t1: A, t2: b, hr: Number(c), hours: o };
|
|
2193
2195
|
}
|
|
@@ -2216,8 +2218,8 @@ class t0 {
|
|
|
2216
2218
|
hr: c
|
|
2217
2219
|
}), {};
|
|
2218
2220
|
}
|
|
2219
|
-
const q = N.calculateBearing(M, A),
|
|
2220
|
-
return { at: N.calculateCoordinate(A, q -
|
|
2221
|
+
const q = N.calculateBearing(M, A), Y = N.calculateBearing(A, b), d = N.calculateDistance(M, A);
|
|
2222
|
+
return { at: N.calculateCoordinate(A, q - Y + 180, p < d ? p : d), t1: A, t2: b, hr: Number(c), hours: o };
|
|
2221
2223
|
} else
|
|
2222
2224
|
return Z == null || Z.info("[%s] no need drift: %j", O.requestId, { from: M, t1: A, t2: b, hr: c }), {};
|
|
2223
2225
|
}
|
|
@@ -2230,12 +2232,12 @@ class t0 {
|
|
|
2230
2232
|
* @private
|
|
2231
2233
|
*/
|
|
2232
2234
|
static tropicalCenterTwin(M, z = 24, p = {}) {
|
|
2233
|
-
var
|
|
2235
|
+
var Y, d, L, T, U;
|
|
2234
2236
|
let O = {};
|
|
2235
|
-
(
|
|
2237
|
+
(Y = M.forecasts) == null || Y.forEach((r) => {
|
|
2236
2238
|
O = { ...r.hours, ...O };
|
|
2237
2239
|
});
|
|
2238
|
-
const A = ((
|
|
2240
|
+
const A = ((d = M == null ? void 0 : M.history) == null ? void 0 : d[0]) || (O == null ? void 0 : O[(L = Object.keys(O)) == null ? void 0 : L[0]]);
|
|
2239
2241
|
Z == null || Z.info("[%s] the first tropical center: %j", p.requestId, A);
|
|
2240
2242
|
let b = (T = Object.keys(O || {}).filter((r) => Number(r) <= (z < 0 ? 24 : z))) == null ? void 0 : T.at(-1);
|
|
2241
2243
|
b || (b = (U = Object.keys(O || {}).filter((r) => Number(r) <= (z < 0 ? 24 : 2 * z))) == null ? void 0 : U.at(-1));
|
|
@@ -2249,7 +2251,7 @@ class t0 {
|
|
|
2249
2251
|
static pickIndex(M, z) {
|
|
2250
2252
|
let p = 0;
|
|
2251
2253
|
for (const O of M) {
|
|
2252
|
-
if (
|
|
2254
|
+
if (m(O.properties.date).isAfter(z))
|
|
2253
2255
|
return p === 0 ? -1 : p;
|
|
2254
2256
|
p++;
|
|
2255
2257
|
}
|
|
@@ -2277,7 +2279,7 @@ class V0 {
|
|
|
2277
2279
|
return `${M.lat}|${M.lng}|${M.positionTime}|${M.sog}|${M.cog}|${M.hdg}|${M.draught}|${z}|${JSON.stringify(M.meteo || {})}|${M.vendor}|${M.deleted}`;
|
|
2278
2280
|
}
|
|
2279
2281
|
static str2Json(M) {
|
|
2280
|
-
const [z, p, O, A, b, c, o, q,
|
|
2282
|
+
const [z, p, O, A, b, c, o, q, Y, d, L] = M.split("|");
|
|
2281
2283
|
return {
|
|
2282
2284
|
lat: Number(z),
|
|
2283
2285
|
lng: Number(p),
|
|
@@ -2289,8 +2291,8 @@ class V0 {
|
|
|
2289
2291
|
draught: isNaN(o) ? null : Number(o),
|
|
2290
2292
|
type: q,
|
|
2291
2293
|
important: q !== "A",
|
|
2292
|
-
meteo:
|
|
2293
|
-
vendor:
|
|
2294
|
+
meteo: Y ? JSON.parse(Y) : void 0,
|
|
2295
|
+
vendor: d,
|
|
2294
2296
|
deleted: L === "true"
|
|
2295
2297
|
};
|
|
2296
2298
|
}
|
|
@@ -2302,37 +2304,37 @@ class V0 {
|
|
|
2302
2304
|
for (let o = 0; o < M.length - 1; o++) {
|
|
2303
2305
|
const q = M[o];
|
|
2304
2306
|
if (!(p && ["N", "B", "E", "NOON", "BOSP", "EOSP"].includes(q.type))) {
|
|
2305
|
-
for (let
|
|
2306
|
-
const
|
|
2307
|
+
for (let Y = o + 1; Y < M.length; Y++) {
|
|
2308
|
+
const d = M[Y - 1], L = M[Y];
|
|
2307
2309
|
if (p && ["N", "B", "E", "NOON", "BOSP", "EOSP"].includes(q.type))
|
|
2308
2310
|
continue;
|
|
2309
|
-
const T = L.positionTime -
|
|
2310
|
-
if (N.calculateDistance(L,
|
|
2311
|
-
b || (b = q),
|
|
2311
|
+
const T = L.positionTime - d.positionTime;
|
|
2312
|
+
if (N.calculateDistance(L, d, !0, 4) / (T / 3600) < z)
|
|
2313
|
+
b || (b = q), Y === M.length - 1 && (c = L, o = Y);
|
|
2312
2314
|
else {
|
|
2313
|
-
b && (c = M[
|
|
2315
|
+
b && (c = M[Y - 1], o = Y);
|
|
2314
2316
|
break;
|
|
2315
2317
|
}
|
|
2316
2318
|
}
|
|
2317
2319
|
if ((c == null ? void 0 : c.positionTime) > (b == null ? void 0 : b.positionTime) && b) {
|
|
2318
|
-
const
|
|
2320
|
+
const Y = {
|
|
2319
2321
|
start: {
|
|
2320
2322
|
lat: b.lat,
|
|
2321
2323
|
lng: b.lng,
|
|
2322
2324
|
sog: b.sog,
|
|
2323
2325
|
positionTime: b.positionTime,
|
|
2324
|
-
utc:
|
|
2326
|
+
utc: m.unix(b.positionTime).utc().format()
|
|
2325
2327
|
},
|
|
2326
2328
|
end: {
|
|
2327
2329
|
lat: c.lat,
|
|
2328
2330
|
lng: c.lng,
|
|
2329
2331
|
sog: c.sog,
|
|
2330
2332
|
positionTime: c.positionTime,
|
|
2331
|
-
utc:
|
|
2333
|
+
utc: m.unix(c.positionTime).utc().format()
|
|
2332
2334
|
},
|
|
2333
2335
|
duration: c.positionTime - b.positionTime
|
|
2334
|
-
},
|
|
2335
|
-
|
|
2336
|
+
}, d = M.filter((T) => T.positionTime >= Y.start.positionTime && T.positionTime <= Y.end.positionTime), L = N.divideAccordingToLng(d);
|
|
2337
|
+
Y.distance = N.calculateRouteDistance(L), Y.hours = Math.round(Y.duration / 3600 * 10) / 10, Y.avgSog = Math.round(Y.distance / Y.hours * 10) / 10, A.push(Y);
|
|
2336
2338
|
}
|
|
2337
2339
|
b = void 0, c = void 0;
|
|
2338
2340
|
}
|