@idm-plugin/meteo2 0.8.4 → 0.8.5

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 CHANGED
@@ -1,21 +1,21 @@
1
1
  var N0 = Object.defineProperty;
2
2
  var S0 = (e, M, b) => M in e ? N0(e, M, { enumerable: !0, configurable: !0, writable: !0, value: b }) : e[M] = b;
3
- var K = (e, M, b) => (S0(e, typeof M != "symbol" ? M + "" : M, b), b);
3
+ var g = (e, M, b) => (S0(e, typeof M != "symbol" ? M + "" : M, b), b);
4
4
  import x from "@log4js-node/log4js-api";
5
5
  import L from "moment";
6
- import H from "got";
6
+ import w from "got";
7
7
  import { fetchWeatherApi as v } from "openmeteo";
8
- import { Meteo2Assist as Q } from "@idm-plugin/meteo";
8
+ import { Meteo2Assist as D } from "@idm-plugin/meteo";
9
9
  import U0 from "xml2js";
10
10
  import { LaneHelper as q0 } from "@idm-plugin/geo2";
11
- let t;
11
+ let u;
12
12
  try {
13
- t = x.getLogger("meteo");
13
+ u = x.getLogger("meteo");
14
14
  } catch {
15
15
  } finally {
16
16
  }
17
17
  var B0 = /* @__PURE__ */ ((e) => (e.Arome = "arome", e.IconEU = "iconEu", e.GFS = "gfs", e.GFSWave = "gfsWave", e.NamConus = "namConus", e.NamHawaii = "namHawaii", e.NamAlaska = "namAlaska", e.Geos5 = "geos5", e))(B0 || {});
18
- class Q0 {
18
+ class y0 {
19
19
  /**
20
20
  * 点查海洋气象要素(全量)
21
21
  * @param lng
@@ -37,14 +37,14 @@ class Q0 {
37
37
  },
38
38
  timeout: 3e4
39
39
  }, q = L(), R = q.valueOf();
40
- O.isBefore(q.subtract(1, "month")) && (t == null || t.warn("[%s] get history meteo on %s: %j", W.requestId, O.format(), o));
41
- const n = "https://aod4idm.idmwx.com/api/ocean/point", Y = await H.get(n, o).json(), f = L().valueOf();
42
- if (t == null || t.info("[%s] get meteo(cost: %d ms) from %s with options: %j", W.requestId, f - R, n, o), (Y == null ? void 0 : Y.code) === 0)
40
+ O.isBefore(q.subtract(1, "month")) && (u == null || u.warn("[%s] get history meteo on %s: %j", W.requestId, O.format(), o));
41
+ const n = "https://aod4idm.idmwx.com/api/ocean/point", Y = await w.get(n, o).json(), f = L().valueOf();
42
+ if (u == null || u.info("[%s] get meteo(cost: %d ms) from %s with options: %j", W.requestId, f - R, n, o), (Y == null ? void 0 : Y.code) === 0)
43
43
  return {
44
44
  ...Y.data,
45
45
  source: c
46
46
  };
47
- t == null || t.warn("[%s] get meteo failed: %j", W.requestId, Y);
47
+ u == null || u.warn("[%s] get meteo failed: %j", W.requestId, Y);
48
48
  }
49
49
  /**
50
50
  * 点查海洋气象要素(指定要素组合)
@@ -72,14 +72,14 @@ class Q0 {
72
72
  },
73
73
  timeout: 3e4
74
74
  }, q = L(), R = q.valueOf();
75
- O.isBefore(q.subtract(1, "month")) && (t == null || t.warn("[%s] get history factors on %s: %j", W.requestId, O.format(), o));
76
- const n = "https://aod4idm.idmwx.com/api/ocean/factor", Y = await H.get(n, o).json(), f = L().valueOf();
77
- if (t == null || t.info("[%s] get factors(cost: %d ms) from %s with options: %j", W.requestId, f - R, n, o), (Y == null ? void 0 : Y.code) === 0)
75
+ O.isBefore(q.subtract(1, "month")) && (u == null || u.warn("[%s] get history factors on %s: %j", W.requestId, O.format(), o));
76
+ const n = "https://aod4idm.idmwx.com/api/ocean/factor", Y = await w.get(n, o).json(), f = L().valueOf();
77
+ if (u == null || u.info("[%s] get factors(cost: %d ms) from %s with options: %j", W.requestId, f - R, n, o), (Y == null ? void 0 : Y.code) === 0)
78
78
  return {
79
79
  ...Y.data,
80
80
  source: c
81
81
  };
82
- t == null || t.warn("[%s] get factors failed: %j", W.requestId, Y);
82
+ u == null || u.warn("[%s] get factors failed: %j", W.requestId, Y);
83
83
  }
84
84
  /**
85
85
  * @see https://api.windy.com/point-forecast/docs
@@ -89,7 +89,7 @@ class Q0 {
89
89
  const c = "https://api.windy.com/api/point-forecast/v2", W = [];
90
90
  try {
91
91
  let O = L().valueOf();
92
- const o = await H.post(c, {
92
+ const o = await w.post(c, {
93
93
  headers: {
94
94
  "Content-Type": "application/json"
95
95
  },
@@ -119,8 +119,8 @@ class Q0 {
119
119
  }
120
120
  }).json();
121
121
  let q = L().valueOf();
122
- t == null || t.info("[%s] get gfs-factors(cost: %d ms) from %s", p.requestId, q - O, c), O = q;
123
- const R = await H.post(c, {
122
+ u == null || u.info("[%s] get gfs-factors(cost: %d ms) from %s", p.requestId, q - O, c), O = q;
123
+ const R = await w.post(c, {
124
124
  headers: {
125
125
  "Content-Type": "application/json"
126
126
  },
@@ -133,7 +133,7 @@ class Q0 {
133
133
  levels: ["surface"]
134
134
  }
135
135
  }).json();
136
- q = L().valueOf(), t == null || t.info("[%s] get gfs-wave-factors(cost: %d ms) from %s", p.requestId, q - O, c);
136
+ q = L().valueOf(), u == null || u.info("[%s] get gfs-wave-factors(cost: %d ms) from %s", p.requestId, q - O, c);
137
137
  for (let Y = 0; Y < o.ts.length; Y++) {
138
138
  const f = this.populateUVFactor(o["wind_u-surface"][Y], o["wind_v-surface"][Y], !1, p);
139
139
  f.scale = this.calculateBeaufortWindForceScale(f.speed), W.push({
@@ -160,13 +160,13 @@ class Q0 {
160
160
  }
161
161
  const n = [];
162
162
  for (let Y = 0; Y < R.ts.length; Y++) {
163
- const f = this.calculateDouglasScale(R["waves_height-surface"][Y], R["waves_direction-surface"][Y], R["waves_period-surface"][Y]), T = this.calculateDouglasScale(R["wwaves_height-surface"][Y], R["wwaves_direction-surface"][Y], R["wwaves_period-surface"][Y]), u = this.calculateDouglasScale(R["swell1_height-surface"][Y], R["swell1_direction-surface"][Y], R["swell1_period-surface"][Y]), V = this.calculateDouglasScale(R["swell2_height-surface"][Y], R["swell2_direction-surface"][Y], R["swell2_period-surface"][Y]);
163
+ const f = this.calculateDouglasScale(R["waves_height-surface"][Y], R["waves_direction-surface"][Y], R["waves_period-surface"][Y]), T = this.calculateDouglasScale(R["wwaves_height-surface"][Y], R["wwaves_direction-surface"][Y], R["wwaves_period-surface"][Y]), t = this.calculateDouglasScale(R["swell1_height-surface"][Y], R["swell1_direction-surface"][Y], R["swell1_period-surface"][Y]), V = this.calculateDouglasScale(R["swell2_height-surface"][Y], R["swell2_direction-surface"][Y], R["swell2_period-surface"][Y]);
164
164
  n.push({
165
165
  utc: L(R.ts[Y]).utc().format(),
166
166
  wave: {
167
167
  sig: f,
168
168
  wd: T,
169
- swell: u,
169
+ swell: t,
170
170
  swell2: V
171
171
  }
172
172
  });
@@ -176,7 +176,7 @@ class Q0 {
176
176
  Y.wave = f == null ? void 0 : f.wave;
177
177
  }
178
178
  } catch (O) {
179
- t.warn("[%s] get-gfs-factor failed: %s", p.requestId, O);
179
+ u.warn("[%s] get-gfs-factor failed: %s", p.requestId, O);
180
180
  }
181
181
  return W;
182
182
  }
@@ -259,8 +259,8 @@ class Q0 {
259
259
  };
260
260
  }
261
261
  }
262
- var u0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
263
- function t0(e) {
262
+ var t0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
263
+ function u0(e) {
264
264
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
265
265
  }
266
266
  var Y0 = { exports: {} };
@@ -279,7 +279,7 @@ var Y0 = { exports: {} };
279
279
  e.exports = M;
280
280
  })(Y0);
281
281
  var V0 = Y0.exports;
282
- const s0 = /* @__PURE__ */ t0(V0);
282
+ const s0 = /* @__PURE__ */ u0(V0);
283
283
  var d0 = { exports: {} };
284
284
  (function(e) {
285
285
  //! moment-timezone.js
@@ -289,12 +289,12 @@ var d0 = { exports: {} };
289
289
  //! github.com/moment/moment-timezone
290
290
  (function(M, b) {
291
291
  e.exports ? e.exports = b(L) : b(M.moment);
292
- })(u0, function(M) {
292
+ })(t0, function(M) {
293
293
  M.version === void 0 && M.default && (M = M.default);
294
294
  var b = "0.5.48", z = {}, p = {}, c = {}, W = {}, O = {}, o;
295
- (!M || typeof M.version != "string") && F("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
295
+ (!M || typeof M.version != "string") && y("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
296
296
  var q = M.version.split("."), R = +q[0], n = +q[1];
297
- (R < 2 || R === 2 && n < 6) && F("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
297
+ (R < 2 || R === 2 && n < 6) && y("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
298
298
  function Y(A) {
299
299
  return A > 96 ? A - 87 : A > 64 ? A - 29 : A - 48;
300
300
  }
@@ -310,7 +310,7 @@ var d0 = { exports: {} };
310
310
  for (var d = 0; d < A.length; d++)
311
311
  A[d] = f(A[d]);
312
312
  }
313
- function u(A, d) {
313
+ function t(A, d) {
314
314
  for (var a = 0; a < d; a++)
315
315
  A[a] = Math.round((A[a - 1] || 0) + A[a] * 6e4);
316
316
  A[d - 1] = 1 / 0;
@@ -323,7 +323,7 @@ var d0 = { exports: {} };
323
323
  }
324
324
  function l(A) {
325
325
  var d = A.split("|"), a = d[2].split(" "), X = d[3].split(""), i = d[4].split(" ");
326
- return T(a), T(X), T(i), u(i, X.length), {
326
+ return T(a), T(X), T(i), t(i, X.length), {
327
327
  name: d[0],
328
328
  abbrs: V(d[1].split(" "), X),
329
329
  offsets: V(a, X),
@@ -372,7 +372,7 @@ var d0 = { exports: {} };
372
372
  return this.abbrs[this._index(A)];
373
373
  },
374
374
  offset: function(A) {
375
- return F("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(A)];
375
+ return y("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(A)];
376
376
  },
377
377
  utcOffset: function(A) {
378
378
  return this.offsets[this._index(A)];
@@ -404,10 +404,10 @@ var d0 = { exports: {} };
404
404
  X.push(new m(new Date(A + B, 0, 1))), X.push(new m(new Date(A + B, 6, 1)));
405
405
  return X;
406
406
  }
407
- function w(A, d) {
407
+ function F(A, d) {
408
408
  return A.offsetScore !== d.offsetScore ? A.offsetScore - d.offsetScore : A.abbrScore !== d.abbrScore ? A.abbrScore - d.abbrScore : A.zone.population !== d.zone.population ? d.zone.population - A.zone.population : d.zone.name.localeCompare(A.zone.name);
409
409
  }
410
- function y(A, d) {
410
+ function Q(A, d) {
411
411
  var a, X;
412
412
  for (T(d), a = 0; a < d.length; a++)
413
413
  X = d[a], O[X] = O[X] || {}, O[X][A] = !0;
@@ -432,17 +432,17 @@ var d0 = { exports: {} };
432
432
  var d = W[J(A)];
433
433
  if (d)
434
434
  return d;
435
- F("Moment Timezone found " + A + " from the Intl api, but did not have that data loaded.");
435
+ y("Moment Timezone found " + A + " from the Intl api, but did not have that data loaded.");
436
436
  }
437
437
  } catch {
438
438
  }
439
439
  var a = C(), X = a.length, i = M0(a), S = [], P, B, E;
440
440
  for (B = 0; B < i.length; B++) {
441
- for (P = new G(g(i[B])), E = 0; E < X; E++)
441
+ for (P = new G(_(i[B])), E = 0; E < X; E++)
442
442
  P.scoreOffsetAt(a[E]);
443
443
  S.push(P);
444
444
  }
445
- return S.sort(w), S.length > 0 ? S[0].zone.name : void 0;
445
+ return S.sort(F), S.length > 0 ? S[0].zone.name : void 0;
446
446
  }
447
447
  function X0(A) {
448
448
  return (!o || A) && (o = z0()), o;
@@ -453,12 +453,12 @@ var d0 = { exports: {} };
453
453
  function A0(A) {
454
454
  var d, a, X, i;
455
455
  for (typeof A == "string" && (A = [A]), d = 0; d < A.length; d++)
456
- X = A[d].split("|"), a = X[0], i = J(a), z[i] = A[d], W[i] = a, y(i, X[2].split(" "));
456
+ X = A[d].split("|"), a = X[0], i = J(a), z[i] = A[d], W[i] = a, Q(i, X[2].split(" "));
457
457
  }
458
- function g(A, d) {
458
+ function _(A, d) {
459
459
  A = J(A);
460
460
  var a = z[A], X;
461
- return a instanceof U ? a : typeof a == "string" ? (a = new U(a), z[A] = a, a) : p[A] && d !== g && (X = g(p[A], g)) ? (a = z[A] = new U(), a._set(X), a.name = W[A], a) : null;
461
+ return a instanceof U ? a : typeof a == "string" ? (a = new U(a), z[A] = a, a) : p[A] && d !== _ && (X = _(p[A], _)) ? (a = z[A] = new U(), a._set(X), a.name = W[A], a) : null;
462
462
  }
463
463
  function n0() {
464
464
  var A, d = [];
@@ -491,7 +491,7 @@ var d0 = { exports: {} };
491
491
  return null;
492
492
  var a = A.zones.sort();
493
493
  return d ? a.map(function(X) {
494
- var i = g(X);
494
+ var i = _(X);
495
495
  return {
496
496
  name: X,
497
497
  offset: i.utcOffset(/* @__PURE__ */ new Date())
@@ -502,21 +502,21 @@ var d0 = { exports: {} };
502
502
  A0(A.zones), c0(A.links), e0(A.countries), s.dataVersion = A.version;
503
503
  }
504
504
  function b0(A) {
505
- return b0.didShowError || (b0.didShowError = !0, F("moment.tz.zoneExists('" + A + "') has been deprecated in favor of !moment.tz.zone('" + A + "')")), !!g(A);
505
+ return b0.didShowError || (b0.didShowError = !0, y("moment.tz.zoneExists('" + A + "') has been deprecated in favor of !moment.tz.zone('" + A + "')")), !!_(A);
506
506
  }
507
507
  function p0(A) {
508
508
  var d = A._f === "X" || A._f === "x";
509
509
  return !!(A._a && A._tzm === void 0 && !d);
510
510
  }
511
- function F(A) {
511
+ function y(A) {
512
512
  typeof console < "u" && typeof console.error == "function" && console.error(A);
513
513
  }
514
514
  function s(A) {
515
515
  var d = Array.prototype.slice.call(arguments, 0, -1), a = arguments[arguments.length - 1], X = M.utc.apply(null, d), i;
516
- return !M.isMoment(A) && p0(X) && (i = g(a)) && X.add(i.parse(X), "minutes"), X.tz(a), X;
516
+ return !M.isMoment(A) && p0(X) && (i = _(a)) && X.add(i.parse(X), "minutes"), X.tz(a), X;
517
517
  }
518
- s.version = b, s.dataVersion = "", s._zones = z, s._links = p, s._names = W, s._countries = c, s.add = A0, s.link = c0, s.load = r0, s.zone = g, s.zoneExists = b0, s.guess = X0, s.names = n0, s.Zone = U, s.unpack = l, s.unpackBase60 = f, s.needsOffset = p0, s.moveInvalidForward = !0, s.moveAmbiguousForward = !1, s.countries = L0, s.zonesForCountry = i0;
519
- var D = M.fn;
518
+ s.version = b, s.dataVersion = "", s._zones = z, s._links = p, s._names = W, s._countries = c, s.add = A0, s.link = c0, s.load = r0, s.zone = _, s.zoneExists = b0, s.guess = X0, s.names = n0, s.Zone = U, s.unpack = l, s.unpackBase60 = f, s.needsOffset = p0, s.moveInvalidForward = !0, s.moveAmbiguousForward = !1, s.countries = L0, s.zonesForCountry = i0;
519
+ var K = M.fn;
520
520
  M.tz = s, M.defaultZone = null, M.updateOffset = function(A, d) {
521
521
  var a = M.defaultZone, X;
522
522
  if (A._z === void 0 && (a && p0(A) && !A._isUTC && A.isValid() && (A._d = M.utc(A._a)._d, A.utc().add(a.parse(A), "minutes")), A._z = a), A._z)
@@ -525,11 +525,11 @@ var d0 = { exports: {} };
525
525
  A.utcOffset(-X, d), A._z = i;
526
526
  } else
527
527
  A.zone(X, d);
528
- }, D.tz = function(A, d) {
528
+ }, K.tz = function(A, d) {
529
529
  if (A) {
530
530
  if (typeof A != "string")
531
531
  throw new Error("Time zone name must be a string, got " + A + " [" + typeof A + "]");
532
- return this._z = g(A), this._z ? M.updateOffset(this, d) : F("Moment Timezone has no data for " + A + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
532
+ return this._z = _(A), this._z ? M.updateOffset(this, d) : y("Moment Timezone has no data for " + A + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
533
533
  }
534
534
  if (this._z)
535
535
  return this._z.name;
@@ -549,8 +549,8 @@ var d0 = { exports: {} };
549
549
  return arguments.length > 0 && (this._z = null), A.apply(this, arguments);
550
550
  };
551
551
  }
552
- D.zoneName = W0(D.zoneName), D.zoneAbbr = W0(D.zoneAbbr), D.utc = o0(D.utc), D.local = o0(D.local), D.utcOffset = f0(D.utcOffset), M.tz.setDefault = function(A) {
553
- return (R < 2 || R === 2 && n < 9) && F("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = A ? g(A) : null, M;
552
+ K.zoneName = W0(K.zoneName), K.zoneAbbr = W0(K.zoneAbbr), K.utc = o0(K.utc), K.local = o0(K.local), K.utcOffset = f0(K.utcOffset), M.tz.setDefault = function(A) {
553
+ return (R < 2 || R === 2 && n < 9) && y("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = A ? _(A) : null, M;
554
554
  };
555
555
  var $ = M.momentProperties;
556
556
  return Object.prototype.toString.call($) === "[object Array]" ? ($.push("_z"), $.push("_a")) : $ && ($._z = null), M;
@@ -1418,11 +1418,11 @@ try {
1418
1418
  } catch {
1419
1419
  } finally {
1420
1420
  }
1421
- class y0 {
1421
+ class Q0 {
1422
1422
  constructor(M, b) {
1423
- K(this, "apikey");
1424
- K(this, "debug");
1425
- K(this, "FORECAST", {
1423
+ g(this, "apikey");
1424
+ g(this, "debug");
1425
+ g(this, "FORECAST", {
1426
1426
  OM_URL: "https://customer-api.open-meteo.com/v1/forecast",
1427
1427
  ORM_URL: "https://meteo3.idmwx.com/v1/forecast",
1428
1428
  ORM_HISTORY_URL: "https://meteo1.idmwx.com/v1/forecast",
@@ -1441,40 +1441,40 @@ class y0 {
1441
1441
  HOURLY: "wave_height,wave_direction,wave_period,wind_wave_height,wind_wave_direction,wind_wave_period,wind_wave_peak_period,swell_wave_height,swell_wave_direction,swell_wave_period,swell_wave_peak_period,ocean_current_velocity,ocean_current_direction,sea_level_height_msl,sea_surface_temperature"
1442
1442
  }
1443
1443
  });
1444
- K(this, "HISTORICAL", {
1444
+ g(this, "HISTORICAL", {
1445
1445
  OM_URL: "https://customer-archive-api.open-meteo.com/v1/archive",
1446
1446
  WEATHER_VARIABLES: {
1447
1447
  HOURLY: "temperature_2m,apparent_temperature,precipitation,weather_code,pressure_msl,surface_pressure,wind_speed_10m,wind_direction_10m,wind_gusts_10m",
1448
1448
  DAILY: "weather_code,temperature_2m_max,temperature_2m_min,temperature_2m_mean,precipitation_sum,precipitation_hours,wind_speed_10m_max,wind_gusts_10m_max,wind_direction_10m_dominant"
1449
1449
  }
1450
1450
  });
1451
- K(this, "CLIMATE", {
1451
+ g(this, "CLIMATE", {
1452
1452
  OM_URL: "https://customer-climate-api.open-meteo.com/v1/climate",
1453
1453
  WEATHER_VARIABLES: {
1454
1454
  DAILY: "temperature_2m_mean,temperature_2m_max,temperature_2m_min,wind_speed_10m_mean,wind_speed_10m_max,relative_humidity_2m_mean,relative_humidity_2m_max,relative_humidity_2m_min,precipitation_sum"
1455
1455
  }
1456
1456
  });
1457
- K(this, "SEASONAL", {
1457
+ g(this, "SEASONAL", {
1458
1458
  OM_URL: "https://seasonal-api.open-meteo.com/v1/seasonal",
1459
1459
  WEATHER_VARIABLES: {
1460
1460
  DAILY: "temperature_2m_max,temperature_2m_min,precipitation_sum,precipitation_hours,wind_direction_10m_dominant,wind_speed_10m_max",
1461
1461
  SIX_HOURLY: "pressure_msl,temperature_2m,temperature_2m_max,temperature_2m_min,precipitation,wind_direction_10m,wind_speed_10m,relative_humidity_2m,showers,cloud_cover"
1462
1462
  }
1463
1463
  });
1464
- K(this, "METEO2_UPDATE", {
1464
+ g(this, "METEO2_UPDATE", {
1465
1465
  etime: L().unix(),
1466
1466
  version: 0
1467
1467
  });
1468
1468
  this.apikey = M || "smE3JnDLHy3TizVv", this.debug = b;
1469
1469
  }
1470
1470
  async standardWeatherModels() {
1471
- return Q.standardWeatherModels();
1471
+ return D.standardWeatherModels();
1472
1472
  }
1473
1473
  async standardMarineModels() {
1474
- return Q.standardMarineModels();
1474
+ return D.standardMarineModels();
1475
1475
  }
1476
1476
  async autoPickMeteoModel(M = "best_match") {
1477
- return Q.autoPickMeteoModel(M);
1477
+ return D.autoPickMeteoModel(M);
1478
1478
  }
1479
1479
  range(M, b, z) {
1480
1480
  return Array.from({ length: (b - M) / z }, (p, c) => M + c * z);
@@ -1553,8 +1553,8 @@ class y0 {
1553
1553
  delete M.apikey;
1554
1554
  const f = L();
1555
1555
  this.debug && h.info("[%s] fetch marine api (%j) cost: %d ms", b.requestId, M.url, f.diff(n, "ms"));
1556
- const T = await this.mergeMarineData(Y), u = T.find((r) => r.model === "ncep_gfswave016"), V = T.find((r) => r.model === "ncep_gfswave025"), l = T.find((r) => r.model === "meteofrance_wave"), U = T.find((r) => r.model === "best_match");
1557
- return (p = (z = U == null ? void 0 : U.hourly) == null ? void 0 : z.wave_height) != null && p.every((r) => r !== null) ? [U] : (W = (c = l == null ? void 0 : l.hourly) == null ? void 0 : c.wave_height) != null && W.every((r) => r !== null) ? [l] : (o = (O = u == null ? void 0 : u.hourly) == null ? void 0 : O.wave_height) != null && o.every((r) => r !== null) ? [u] : (R = (q = V == null ? void 0 : V.hourly) == null ? void 0 : q.wave_height) != null && R.every((r) => r !== null) ? [V] : T != null && T.length ? [T[0]] : [];
1556
+ const T = await this.mergeMarineData(Y), t = T.find((r) => r.model === "ncep_gfswave016"), V = T.find((r) => r.model === "ncep_gfswave025"), l = T.find((r) => r.model === "meteofrance_wave"), U = T.find((r) => r.model === "best_match");
1557
+ return (p = (z = U == null ? void 0 : U.hourly) == null ? void 0 : z.wave_height) != null && p.every((r) => r !== null) ? [U] : (W = (c = l == null ? void 0 : l.hourly) == null ? void 0 : c.wave_height) != null && W.every((r) => r !== null) ? [l] : (o = (O = t == null ? void 0 : t.hourly) == null ? void 0 : O.wave_height) != null && o.every((r) => r !== null) ? [t] : (R = (q = V == null ? void 0 : V.hourly) == null ? void 0 : q.wave_height) != null && R.every((r) => r !== null) ? [V] : T != null && T.length ? [T[0]] : [];
1558
1558
  } catch (n) {
1559
1559
  return h.warn("[%s] marine forecast failed: %s, with %j", b.requestId, n, M), [];
1560
1560
  }
@@ -1570,8 +1570,8 @@ class y0 {
1570
1570
  var W, O, o, q, R, n, Y;
1571
1571
  const p = [], c = Math.pow(10, z.precision || 6);
1572
1572
  for (let f = 0; f < M.length; f++) {
1573
- const T = M[f], u = T.utcOffsetSeconds(), V = T.timezone(), l = T.current(), U = T.hourly(), r = T.daily(), Z = {};
1574
- if (Z.timezone = V || void 0, Z.offset = this.prettyTimezoneOffset(u), Z.model = b.models instanceof Array ? (W = b.models) == null ? void 0 : W[f] : b.models || "best_match", l) {
1573
+ const T = M[f], t = T.utcOffsetSeconds(), V = T.timezone(), l = T.current(), U = T.hourly(), r = T.daily(), Z = {};
1574
+ if (Z.timezone = V || void 0, Z.offset = this.prettyTimezoneOffset(t), Z.model = b.models instanceof Array ? (W = b.models) == null ? void 0 : W[f] : b.models || "best_match", l) {
1575
1575
  const m = L();
1576
1576
  Z.current = {
1577
1577
  time: L.unix(Number(l.time())).utc().format()
@@ -1592,8 +1592,8 @@ class y0 {
1592
1592
  )
1593
1593
  };
1594
1594
  for (let C = 0; C < U.variablesLength(); C++) {
1595
- const w = (q = (o = (O = U.variables(C).valuesArray()) == null ? void 0 : O.toString()) == null ? void 0 : o.split(",")) == null ? void 0 : q.map((y) => isNaN(y) ? null : Math.round(Number(y) * c) / c);
1596
- Z.hourly[b.hourly[C]] = w;
1595
+ const F = (q = (o = (O = U.variables(C).valuesArray()) == null ? void 0 : O.toString()) == null ? void 0 : o.split(",")) == null ? void 0 : q.map((Q) => isNaN(Q) ? null : Math.round(Number(Q) * c) / c);
1596
+ Z.hourly[b.hourly[C]] = F;
1597
1597
  }
1598
1598
  const I = L();
1599
1599
  this.debug && h.debug("[%s] fetch hourly variables cost: %d ms", z.requestId, I.diff(m, "ms"));
@@ -1606,7 +1606,7 @@ class y0 {
1606
1606
  )
1607
1607
  };
1608
1608
  for (let I = 0; I < r.variablesLength(); I += z.memberLength ?? 1) {
1609
- const C = (Y = (n = (R = r.variables(I).valuesArray()) == null ? void 0 : R.toString()) == null ? void 0 : n.split(",")) == null ? void 0 : Y.map((w) => isNaN(w) ? null : Math.round(Number(w) * c) / c);
1609
+ const C = (Y = (n = (R = r.variables(I).valuesArray()) == null ? void 0 : R.toString()) == null ? void 0 : n.split(",")) == null ? void 0 : Y.map((F) => isNaN(F) ? null : Math.round(Number(F) * c) / c);
1610
1610
  Z.daily[b.daily[I / (z.memberLength ?? 1)]] = C;
1611
1611
  }
1612
1612
  const G = L();
@@ -1752,7 +1752,7 @@ class y0 {
1752
1752
  selfHosted: !0,
1753
1753
  maxDays: 14
1754
1754
  }) {
1755
- var T, u, V, l, U, r;
1755
+ var T, t, V, l, U, r;
1756
1756
  b = this.toStdLng(b), this.debug && h.info("[%s] spot forecast params: %j", O.requestId, { lat: M, lng: b, datetime: z, simplify: p, withDaily: c, withHourly: W, options: O });
1757
1757
  const o = {
1758
1758
  apikey: this.apikey,
@@ -1765,7 +1765,7 @@ class y0 {
1765
1765
  };
1766
1766
  let q;
1767
1767
  const R = this.timezoneOffset(M, b);
1768
- z && (q = L.utc(z).utcOffset(R), q.subtract(R > 0 ? R : -R, "h"), O.selfHistory = !(q != null && q.isBefore(L.utc().subtract(120, "days")))), c && (o.daily = ((u = this.FORECAST.WEATHER_VARIABLES.NORMAL.DAILY) == null ? void 0 : u.split(",")) || []), q || (O.forecastDays = O.forecastDays || 1, O.pastDays = 0, W = !0), W && (o.hourly = ((V = this.FORECAST.WEATHER_VARIABLES.NORMAL.HOURLY) == null ? void 0 : V.split(",")) || []), O.maxDays = O.maxDays || 14, O.pastDays = O.pastDays || 0, O.pastDays = O.pastDays > 7 ? 7 : O.pastDays < 0 ? 0 : O.pastDays, O.forecastDays = O.forecastDays ?? 1, O.forecastDays = O.forecastDays > O.maxDays ? O.maxDays : O.forecastDays < 0 ? 1 : O.forecastDays, await this.prepare(q == null ? void 0 : q.utc().format(), !1, o, O);
1768
+ z && (q = L.utc(z).utcOffset(R), q.subtract(R > 0 ? R : -R, "h"), O.selfHistory = !(q != null && q.isBefore(L.utc().subtract(120, "days")))), c && (o.daily = ((t = this.FORECAST.WEATHER_VARIABLES.NORMAL.DAILY) == null ? void 0 : t.split(",")) || []), q || (O.forecastDays = O.forecastDays || 1, O.pastDays = 0, W = !0), W && (o.hourly = ((V = this.FORECAST.WEATHER_VARIABLES.NORMAL.HOURLY) == null ? void 0 : V.split(",")) || []), O.maxDays = O.maxDays || 14, O.pastDays = O.pastDays || 0, O.pastDays = O.pastDays > 7 ? 7 : O.pastDays < 0 ? 0 : O.pastDays, O.forecastDays = O.forecastDays ?? 1, O.forecastDays = O.forecastDays > O.maxDays ? O.maxDays : O.forecastDays < 0 ? 1 : O.forecastDays, await this.prepare(q == null ? void 0 : q.utc().format(), !1, o, O);
1769
1769
  const n = await this.weatherForecast(o, O), Y = {
1770
1770
  apikey: this.apikey,
1771
1771
  latitude: M,
@@ -1803,7 +1803,7 @@ class y0 {
1803
1803
  async spotHistorical(M, b, z, p, c = !0, W = !0, O = !1, o = {
1804
1804
  precision: 6
1805
1805
  }) {
1806
- var u, V;
1806
+ var t, V;
1807
1807
  b = this.toStdLng(b), this.debug && h.info("[%s] spot historical params: %j", o.requestId, { lat: M, lng: b, startDate: z, endDate: p, withMarine: O, options: o });
1808
1808
  const q = this.timezoneOffset(M, b), R = L.utc(z).utcOffset(q), n = L.utc(p).utcOffset(q);
1809
1809
  R.subtract(q > 0 ? q : -q, "h"), n.subtract(q > 0 ? q : -q, "h");
@@ -1813,7 +1813,7 @@ class y0 {
1813
1813
  longitude: b,
1814
1814
  cell_selection: "sea",
1815
1815
  wind_speed_unit: "kn",
1816
- models: ((u = o.weatherModels) == null ? void 0 : u.split(",")) || ["best_match"],
1816
+ models: ((t = o.weatherModels) == null ? void 0 : t.split(",")) || ["best_match"],
1817
1817
  timezone: "auto",
1818
1818
  url: this.HISTORICAL.OM_URL,
1819
1819
  start_date: R.format("YYYY-MM-DD"),
@@ -1926,15 +1926,15 @@ class y0 {
1926
1926
  try {
1927
1927
  const O = await W.json();
1928
1928
  if (O.code === 0) {
1929
- const o = O.data, q = Q.standardWeatherModels();
1929
+ const o = O.data, q = D.standardWeatherModels();
1930
1930
  for (const R of q) {
1931
- const n = Q.autoPickSubCategories(R.alias), f = o.filter((T) => n.includes(T.category)).map((T) => {
1931
+ const n = D.autoPickSubCategories(R.alias), f = o.filter((T) => n.includes(T.category)).map((T) => {
1932
1932
  var U, r, Z, m, G, I;
1933
- const u = L.unix((U = T.meta) == null ? void 0 : U.data_end_time).utc(), V = L.unix((r = T.meta) == null ? void 0 : r.last_run_availability_time).utc(), l = u.diff(V, "days");
1933
+ const t = L.unix((U = T.meta) == null ? void 0 : U.data_end_time).utc(), V = L.unix((r = T.meta) == null ? void 0 : r.last_run_availability_time).utc(), l = t.diff(V, "days");
1934
1934
  return {
1935
1935
  category: T.category,
1936
1936
  meta: {
1937
- endTime: u.format(),
1937
+ endTime: t.format(),
1938
1938
  availabilityTime: V.format(),
1939
1939
  days: l,
1940
1940
  initialisationTime: L.unix((Z = T.meta) == null ? void 0 : Z.last_run_initialisation_time).utc().format(),
@@ -1973,8 +1973,8 @@ try {
1973
1973
  }
1974
1974
  class k0 {
1975
1975
  constructor(M, b) {
1976
- K(this, "apikey");
1977
- K(this, "debug");
1976
+ g(this, "apikey");
1977
+ g(this, "debug");
1978
1978
  this.apikey = M || "aaf294e6-be27-40b8-82cb-0d7844d2dd74", this.debug = b;
1979
1979
  }
1980
1980
  toStdLng(M, b = 6) {
@@ -2049,7 +2049,8 @@ class k {
2049
2049
  lng: isNaN(c) ? null : c,
2050
2050
  pressure: isNaN(z) ? null : Math.round(z) || null,
2051
2051
  kts: isNaN(W) ? null : Math.round(W) || null,
2052
- type: N.parseTropicalType(W),
2052
+ bf: D.beaufort(D.kts2ms(W ?? 0)),
2053
+ ...N.parseTropicalType(W),
2053
2054
  wind: {
2054
2055
  r7: null,
2055
2056
  r7ne: null,
@@ -2084,7 +2085,8 @@ class k {
2084
2085
  wind: {
2085
2086
  datetime: O.format(),
2086
2087
  kts: isNaN(Y) ? null : Math.round(Y) || null,
2087
- type: N.parseTropicalType(Y),
2088
+ bf: D.beaufort(D.kts2ms(Y ?? 0)),
2089
+ ...N.parseTropicalType(Y),
2088
2090
  r7: null,
2089
2091
  r7ne: null,
2090
2092
  r7nw: null,
@@ -2125,32 +2127,33 @@ class k {
2125
2127
  return await N.tropicalMovement(c), c;
2126
2128
  }
2127
2129
  static async realtimeForecast() {
2128
- const M = "https://node.windy.com/tc/v2/storms", b = await H.get(M).json(), z = [];
2130
+ const M = "https://node.windy.com/tc/v2/storms", b = await w.get(M).json(), z = [];
2129
2131
  for (const p of b.storms) {
2130
- const c = `https://node.windy.com/tc/v2/storms/${p.id}`, W = await H.get(c).json(), O = await k.parseTropical(W);
2132
+ const c = `https://node.windy.com/tc/v2/storms/${p.id}`, W = await w.get(c).json(), O = await k.parseTropical(W);
2131
2133
  z.push(O);
2132
2134
  }
2133
2135
  return z;
2134
2136
  }
2135
2137
  }
2136
- const _ = class _ {
2138
+ const H = class H {
2137
2139
  static async parseHistory(M) {
2138
- const b = `https://hifleet.com/hifleetapi/gettyphooninfo2.do?xuhao=${M}`, z = await H.post(b).text(), p = await _.parser.parseStringPromise(z), c = p.typhoon.position instanceof Array ? p.typhoon.position : [p.typhoon.position], W = [];
2140
+ const b = `https://hifleet.com/hifleetapi/gettyphooninfo2.do?xuhao=${M}`, z = await w.post(b).text(), p = await H.parser.parseStringPromise(z), c = p.typhoon.position instanceof Array ? p.typhoon.position : [p.typhoon.position], W = [];
2139
2141
  for (const O of c) {
2140
- const o = L(O.updatetime).utcOffset(8).utc().format(), q = Number(O.lat), R = Number(O.lon), n = Number(O.pressure), Y = Number(O.windspeed * 3600 / 1852), f = N.parseWindCircle(O.c7quad1 / 1.852), T = N.parseWindCircle(O.c7quad2 / 1.852), u = N.parseWindCircle(O.c7quad3 / 1.852), V = N.parseWindCircle(O.c7quad4 / 1.852), l = N.parseWindCircle(O.c10quad1 / 1.852), U = N.parseWindCircle(O.c10quad2 / 1.852), r = N.parseWindCircle(O.c10quad3 / 1.852), Z = N.parseWindCircle(O.c10quad4 / 1.852), m = N.parseWindCircle(O.c12quad1 / 1.852), G = N.parseWindCircle(O.c12quad2 / 1.852), I = N.parseWindCircle(O.c12quad3 / 1.852), C = N.parseWindCircle(O.c12quad4 / 1.852), { r7: w, r10: y, r12: M0 } = N.estimateWindRadii(Y, q), z0 = {
2142
+ const o = L(O.updatetime).utcOffset(8).utc().format(), q = Number(O.lat), R = Number(O.lon), n = Number(O.pressure), Y = Number(O.windspeed * 3600 / 1852), f = N.parseWindCircle(O.c7quad1 / 1.852), T = N.parseWindCircle(O.c7quad2 / 1.852), t = N.parseWindCircle(O.c7quad3 / 1.852), V = N.parseWindCircle(O.c7quad4 / 1.852), l = N.parseWindCircle(O.c10quad1 / 1.852), U = N.parseWindCircle(O.c10quad2 / 1.852), r = N.parseWindCircle(O.c10quad3 / 1.852), Z = N.parseWindCircle(O.c10quad4 / 1.852), m = N.parseWindCircle(O.c12quad1 / 1.852), G = N.parseWindCircle(O.c12quad2 / 1.852), I = N.parseWindCircle(O.c12quad3 / 1.852), C = N.parseWindCircle(O.c12quad4 / 1.852), { r7: F, r10: Q, r12: M0 } = N.estimateWindRadii(Y, q), z0 = {
2141
2143
  updated: o,
2142
2144
  lat: isNaN(q) ? null : q,
2143
2145
  lng: isNaN(R) ? null : R,
2144
2146
  pressure: isNaN(n) ? null : Math.round(n),
2145
2147
  kts: isNaN(Y) ? null : Math.round(Y) || null,
2146
- type: N.parseTropicalType(Y),
2148
+ bf: D.beaufort(D.kts2ms(Y ?? 0)),
2149
+ ...N.parseTropicalType(Y),
2147
2150
  wind: {
2148
- r7: w,
2151
+ r7: F,
2149
2152
  r7ne: f,
2150
2153
  r7nw: T,
2151
- r7sw: u,
2154
+ r7sw: t,
2152
2155
  r7se: V,
2153
- r10: y,
2156
+ r10: Q,
2154
2157
  r10ne: l,
2155
2158
  r10nw: U,
2156
2159
  r10sw: r,
@@ -2167,7 +2170,7 @@ const _ = class _ {
2167
2170
  return W.sort((O, o) => L(o.updated).unix() - L(O.updated).unix()), W;
2168
2171
  }
2169
2172
  static async parseForecast(M, b) {
2170
- const z = `https://hifleet.com/hifleetapi/gettyphooforecast.do?xuhao=${M}`, p = await H.post(z).text(), c = await _.parser.parseStringPromise(p), W = c.list.forecast instanceof Array ? c.list.forecast : [c.list.forecast], O = [];
2173
+ const z = `https://hifleet.com/hifleetapi/gettyphooforecast.do?xuhao=${M}`, p = await w.post(z).text(), c = await H.parser.parseStringPromise(p), W = c.list.forecast instanceof Array ? c.list.forecast : [c.list.forecast], O = [];
2171
2174
  for (const o of W)
2172
2175
  if (o.xuhao === M) {
2173
2176
  const q = o.positions.forecastposition instanceof Array ? o.positions.forecastposition : [o.positions.forecastposition];
@@ -2177,16 +2180,17 @@ const _ = class _ {
2177
2180
  for (const Y of q) {
2178
2181
  const f = L(Y.forecasttime).utcOffset(8).utc(), T = f.diff(b, "hours");
2179
2182
  if (T) {
2180
- const u = Number(Y.forelat), V = Number(Y.forelon), l = Number(Y.forepressure), U = Number(Y.forespeed * 3600 / 1852);
2183
+ const t = Number(Y.forelat), V = Number(Y.forelon), l = Number(Y.forepressure), U = Number(Y.forespeed * 3600 / 1852);
2181
2184
  R[T] = {
2182
- lat: isNaN(u) ? null : u,
2185
+ lat: isNaN(t) ? null : t,
2183
2186
  lng: isNaN(V) ? null : V,
2184
2187
  pressure: l ? Math.round(l) : null,
2185
2188
  utc: f.format(),
2186
2189
  wind: {
2187
2190
  datetime: f.format(),
2188
2191
  kts: isNaN(U) ? null : Math.round(U),
2189
- type: N.parseTropicalType(U),
2192
+ bf: D.beaufort(D.kts2ms(U ?? 0)),
2193
+ ...N.parseTropicalType(U),
2190
2194
  r7: null,
2191
2195
  r7ne: null,
2192
2196
  r7nw: null,
@@ -2221,7 +2225,7 @@ const _ = class _ {
2221
2225
  }
2222
2226
  static async parseTropical(M) {
2223
2227
  var W, O, o;
2224
- const b = await _.parseHistory(M.xuhao), z = (W = b.at(0)) == null ? void 0 : W.updated, p = await _.parseForecast(M.xuhao, z ? L(z) : void 0), c = {
2228
+ const b = await H.parseHistory(M.xuhao), z = (W = b.at(0)) == null ? void 0 : W.updated, p = await H.parseForecast(M.xuhao, z ? L(z) : void 0), c = {
2225
2229
  id: (O = M.enname) == null ? void 0 : O.toLowerCase(),
2226
2230
  name: (o = M.enname) == null ? void 0 : o.toLowerCase(),
2227
2231
  cnName: M.name,
@@ -2231,17 +2235,17 @@ const _ = class _ {
2231
2235
  return await N.tropicalMovement(c), c;
2232
2236
  }
2233
2237
  static async realtimeForecast() {
2234
- const M = "https://hifleet.com/hifleetapi/getCurrentTyphoon2.do", b = await H.post(M).text(), z = await _.parser.parseStringPromise(b), p = [], c = z.typhoon.position instanceof Array ? z.typhoon.position : [z.typhoon.position];
2238
+ const M = "https://hifleet.com/hifleetapi/getCurrentTyphoon2.do", b = await w.post(M).text(), z = await H.parser.parseStringPromise(b), p = [], c = z.typhoon.position instanceof Array ? z.typhoon.position : [z.typhoon.position];
2235
2239
  for (const W of c)
2236
2240
  if (W) {
2237
- const O = await _.parseTropical(W);
2241
+ const O = await H.parseTropical(W);
2238
2242
  p.push(O);
2239
2243
  }
2240
2244
  return p;
2241
2245
  }
2242
2246
  };
2243
- K(_, "parser", U0.Parser({ explicitArray: !1, mergeAttrs: !0, trim: !0 }));
2244
- let j = _;
2247
+ g(H, "parser", U0.Parser({ explicitArray: !1, mergeAttrs: !0, trim: !0 }));
2248
+ let j = H;
2245
2249
  var O0 = /* @__PURE__ */ ((e) => (e.CMA = "CMA", e.CNTW = "CNTW", e.CNHK = "CNHK", e.JMA = "JMA", e.KMA = "KMA", e.ECMWF = "ECMWF", e.NOAA_AT = "NOAA-AT", e.NOAA_CP = "NOAA-CP", e.NOAA_EP = "NOAA-EP", e.UKM = "UKM", e.IMD = "IMD", e.GFS = "GFS", e.BOM_ACCESS = "BOM-ACCESS", e.BOM_BULLETIN_EAST = "BOM-BULLETIN-EAST", e.BOM_BULLETIN_NORTH = "BOM-BULLETIN-NORTH", e.BOM_BULLETIN_WEST = "BOM-BULLETIN-WEST", e.OTHER = "OTHER", e))(O0 || {});
2246
2250
  class N {
2247
2251
  /**
@@ -2280,8 +2284,8 @@ class N {
2280
2284
  R.date = q.updated;
2281
2285
  const n = L(q.updated), Y = {};
2282
2286
  for (const f in R.hours) {
2283
- const T = R.hours[f], u = L(T.utc).diff(n, "h");
2284
- u > 0 && (Y[u] = T);
2287
+ const T = R.hours[f], t = L(T.utc).diff(n, "h");
2288
+ t > 0 && (Y[t] = T);
2285
2289
  }
2286
2290
  R.hours = Y;
2287
2291
  }), await N.tropicalMovement(O);
@@ -2365,7 +2369,7 @@ class N {
2365
2369
  const O = (c + W) / 2, o = z / O, q = Math.pow(o, p) * Math.exp(1 - Math.pow(o, p));
2366
2370
  b * Math.sqrt(q) > M ? c = O : W = O;
2367
2371
  }
2368
- return Q.kmh2kts(c + W);
2372
+ return D.kmh2kts(c + W);
2369
2373
  }
2370
2374
  /**
2371
2375
  * 基于台风强度推算风圈基础半径的经验公式
@@ -2374,7 +2378,7 @@ class N {
2374
2378
  * @returns 风圈半径对象
2375
2379
  */
2376
2380
  static estimateWindRadii(M, b) {
2377
- const z = Q.kts2ms(M), p = N.estimateRMW(z, b), c = N.estimateHollandB(z, p, b), W = N.findWindRadius(17.2, z, p, c), O = N.findWindRadius(28.5, z, p, c), o = N.findWindRadius(37, z, p, c);
2381
+ const z = D.kts2ms(M), p = N.estimateRMW(z, b), c = N.estimateHollandB(z, p, b), W = N.findWindRadius(17.2, z, p, c), O = N.findWindRadius(28.5, z, p, c), o = N.findWindRadius(37, z, p, c);
2378
2382
  return {
2379
2383
  r7: W ? Math.round(W) : null,
2380
2384
  r10: O ? Math.round(O) : null,
@@ -2459,7 +2463,7 @@ class N {
2459
2463
  * 2 强热带风暴 Severe Tropical Storm
2460
2464
  */
2461
2465
  static parseTropicalType(M) {
2462
- return !M || M < 32 ? "Tropical Depression" : M < 47 ? "Tropical Storm" : M < 63 ? "Severe Tropical Storm" : M < 80 ? "Typhoon" : M < 94 ? "Strong Typhoon" : "Super Typhoon";
2466
+ return !M || M < 32 ? { type: "Tropical Depression", en: "TD", cn: "热带低压", i18n: "tropical.td" } : M < 47 ? { type: "Tropical Storm", en: "TS", cn: "热带风暴", i18n: "tropical.ts" } : M < 63 ? { type: "Severe Tropical Storm", en: "STS", cn: "强热带风暴", i18n: "tropical.sts" } : M < 80 ? { type: "Typhoon", en: "TY", cn: "台风", i18n: "tropical.ty" } : M < 94 ? { type: "Strong Typhoon", en: "STY", cn: "强台风", i18n: "tropical.sty" } : { type: "Super Typhoon", en: "Super TY", cn: "超强台风", i18n: "tropical.superTy" };
2463
2467
  }
2464
2468
  /**
2465
2469
  * @param name
@@ -2472,8 +2476,8 @@ class N {
2472
2476
  }
2473
2477
  }
2474
2478
  export {
2475
- Q0 as MeteoHelper,
2476
- y0 as MeteoHelper2,
2479
+ y0 as MeteoHelper,
2480
+ Q0 as MeteoHelper2,
2477
2481
  k0 as TidesHelper,
2478
2482
  N as TropicalHelper,
2479
2483
  O0 as TropicalModel,