@idmwx/idmui-gl3 6.4.6 → 6.4.7
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 +87 -87
- package/dist/index.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { resolveComponent as R, openBlock as u, createElementBlock as g, createE
|
|
|
9
9
|
import * as Q from "@turf/turf";
|
|
10
10
|
import At from "@mapbox/sphericalmercator";
|
|
11
11
|
import Re from "mapbox-gl";
|
|
12
|
-
import { TropicalHelper as ct, LngLatHelper as
|
|
12
|
+
import { TropicalHelper as ct, LngLatHelper as he, LaneHelper as je } from "@idm-plugin/geo";
|
|
13
13
|
import { TidesAssist as $e, Meteo2Assist as Ke } from "@idm-plugin/meteo";
|
|
14
14
|
const Y = (a, e) => {
|
|
15
15
|
const t = a.__vccOpts || a;
|
|
@@ -1008,10 +1008,10 @@ class We {
|
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
class
|
|
1011
|
+
class ce {
|
|
1012
1012
|
}
|
|
1013
1013
|
// 顶点渲染
|
|
1014
|
-
se(
|
|
1014
|
+
se(ce, "vertexSchema", `
|
|
1015
1015
|
//canvas 坐标系上的坐标 (x, y)
|
|
1016
1016
|
attribute vec2 a_position; //像素坐标
|
|
1017
1017
|
attribute vec2 a_texCoord; //纹理坐标
|
|
@@ -1026,7 +1026,7 @@ se(de, "vertexSchema", `
|
|
|
1026
1026
|
gl_Position = vec4(position * vec2(1, -1), 0.0, 1.0);
|
|
1027
1027
|
v_texCoord = a_texCoord;
|
|
1028
1028
|
}`), // 类如风、流等u v双变量片元渲染
|
|
1029
|
-
se(
|
|
1029
|
+
se(ce, "uvFragmentSchema", `
|
|
1030
1030
|
precision mediump float;
|
|
1031
1031
|
uniform sampler2D u_image;
|
|
1032
1032
|
uniform vec2 u_range_u_v;
|
|
@@ -1046,7 +1046,7 @@ se(de, "uvFragmentSchema", `
|
|
|
1046
1046
|
|
|
1047
1047
|
gl_FragColor = color;
|
|
1048
1048
|
}`), // 类如浪、气压等单变量片元渲染
|
|
1049
|
-
se(
|
|
1049
|
+
se(ce, "fragmentSchema", `
|
|
1050
1050
|
precision mediump float;
|
|
1051
1051
|
uniform sampler2D u_image; // 灰度
|
|
1052
1052
|
uniform sampler2D u_color; // 色值映射
|
|
@@ -3210,7 +3210,7 @@ const la = {
|
|
|
3210
3210
|
[1, "rgb(91, 136, 161)"]
|
|
3211
3211
|
];
|
|
3212
3212
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
3213
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
3213
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.uvFragmentSchema);
|
|
3214
3214
|
this.program = e, this.aPositionBuffer = t;
|
|
3215
3215
|
}
|
|
3216
3216
|
this.handleParticleSetup();
|
|
@@ -3538,7 +3538,7 @@ const ga = {
|
|
|
3538
3538
|
[1, "rgb(195,194,194)"]
|
|
3539
3539
|
];
|
|
3540
3540
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
3541
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
3541
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.uvFragmentSchema);
|
|
3542
3542
|
this.program = e, this.aPositionBuffer = t;
|
|
3543
3543
|
}
|
|
3544
3544
|
this.handleParticleSetup();
|
|
@@ -4125,7 +4125,7 @@ const Ea = {
|
|
|
4125
4125
|
// 100%
|
|
4126
4126
|
];
|
|
4127
4127
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4128
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4128
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
4129
4129
|
this.program = e, this.aPositionBuffer = t;
|
|
4130
4130
|
}
|
|
4131
4131
|
},
|
|
@@ -4241,7 +4241,7 @@ const Pa = {
|
|
|
4241
4241
|
// 100%
|
|
4242
4242
|
];
|
|
4243
4243
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4244
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4244
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
4245
4245
|
this.program = e, this.aPositionBuffer = t;
|
|
4246
4246
|
}
|
|
4247
4247
|
},
|
|
@@ -4359,7 +4359,7 @@ const Qa = {
|
|
|
4359
4359
|
// 4m
|
|
4360
4360
|
];
|
|
4361
4361
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4362
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4362
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
4363
4363
|
this.program = e, this.aPositionBuffer = t;
|
|
4364
4364
|
}
|
|
4365
4365
|
},
|
|
@@ -4737,11 +4737,11 @@ class ht {
|
|
|
4737
4737
|
}), i;
|
|
4738
4738
|
}
|
|
4739
4739
|
static pickHourly(e, t) {
|
|
4740
|
-
var r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G,
|
|
4740
|
+
var r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G, de, re, pe, ve, me, be, ue, ge, W, Z, oe, le, Ae, Le, xe, B, Ee, Ce, ke, Be, ze, _e;
|
|
4741
4741
|
const J = typeof t == "string" ? ie(t) : t, q = e == null ? void 0 : e.weather, S = e == null ? void 0 : e.marine, De = ie((i = (r = q == null ? void 0 : q[0]) == null ? void 0 : r.hourly) == null ? void 0 : i.date).utc(), K = De.clone().add((l = (n = (s = q == null ? void 0 : q[0]) == null ? void 0 : s.hourly) == null ? void 0 : n.time) == null ? void 0 : l.at(0), "h"), $ = De.clone().add((h = (d = (c = q == null ? void 0 : q[0]) == null ? void 0 : c.hourly) == null ? void 0 : d.time) == null ? void 0 : h.at(-1), "h"), Se = [];
|
|
4742
4742
|
if (J.isBetween(K, $, "millisecond", "[]")) {
|
|
4743
4743
|
const M = J.utc().diff(K, "h", !1);
|
|
4744
|
-
let
|
|
4744
|
+
let we, Me;
|
|
4745
4745
|
if (q) {
|
|
4746
4746
|
let Te = 0, Qe = 0;
|
|
4747
4747
|
for (const z of q) {
|
|
@@ -4750,7 +4750,7 @@ class ht {
|
|
|
4750
4750
|
Te += (p = O == null ? void 0 : O.precipitation) == null ? void 0 : p.at(Ne);
|
|
4751
4751
|
for (let Ne = M - (M - 1) % 6; Ne <= M; Ne++)
|
|
4752
4752
|
Qe += (L = O == null ? void 0 : O.precipitation) == null ? void 0 : L.at(Ne);
|
|
4753
|
-
|
|
4753
|
+
we = {
|
|
4754
4754
|
temp: (x = O == null ? void 0 : O.temperature_2m) == null ? void 0 : x.at(M),
|
|
4755
4755
|
apparentTemp: (E = O == null ? void 0 : O.apparent_temperature) == null ? void 0 : E.at(M),
|
|
4756
4756
|
rh: (A = O == null ? void 0 : O.relative_humidity_2m) == null ? void 0 : A.at(M),
|
|
@@ -4774,11 +4774,11 @@ class ht {
|
|
|
4774
4774
|
},
|
|
4775
4775
|
isDay: (U = O == null ? void 0 : O.is_day) == null ? void 0 : U.at(M)
|
|
4776
4776
|
};
|
|
4777
|
-
const { name: Ge, url: Ue, bg: ne } = this.parseWeatherCode(
|
|
4778
|
-
|
|
4777
|
+
const { name: Ge, url: Ue, bg: ne } = this.parseWeatherCode(we.code, we.isDay);
|
|
4778
|
+
we.name = Ge, we.url = Ue, we.bg = ne, we.wind.scale = this.beaufort(this.kts2ms(we.wind.kts)), we.wind.direction = this.degree2Direction(we.wind.degree), Se.push({
|
|
4779
4779
|
utc: K.add(M, "h").format(),
|
|
4780
4780
|
model: z.model,
|
|
4781
|
-
weather: { ...
|
|
4781
|
+
weather: { ...we }
|
|
4782
4782
|
});
|
|
4783
4783
|
}
|
|
4784
4784
|
}
|
|
@@ -4790,21 +4790,21 @@ class ht {
|
|
|
4790
4790
|
wave: {
|
|
4791
4791
|
sig: {
|
|
4792
4792
|
height: (G = z == null ? void 0 : z.wave_height) == null ? void 0 : G.at(M),
|
|
4793
|
-
degree: (
|
|
4794
|
-
bearing: ((re = z == null ? void 0 : z.wave_direction) == null ? void 0 : re.at(M)) !== null ? (((
|
|
4795
|
-
period: (
|
|
4793
|
+
degree: (de = z == null ? void 0 : z.wave_direction) == null ? void 0 : de.at(M),
|
|
4794
|
+
bearing: ((re = z == null ? void 0 : z.wave_direction) == null ? void 0 : re.at(M)) !== null ? (((pe = z == null ? void 0 : z.wave_direction) == null ? void 0 : pe.at(M)) + 180) % 360 : null,
|
|
4795
|
+
period: (ve = z == null ? void 0 : z.wave_period) == null ? void 0 : ve.at(M)
|
|
4796
4796
|
},
|
|
4797
4797
|
swell: {
|
|
4798
|
-
height: (
|
|
4798
|
+
height: (me = z == null ? void 0 : z.swell_wave_height) == null ? void 0 : me.at(M),
|
|
4799
4799
|
degree: (be = z == null ? void 0 : z.swell_wave_direction) == null ? void 0 : be.at(M),
|
|
4800
|
-
bearing: ((
|
|
4800
|
+
bearing: ((ue = z == null ? void 0 : z.swell_wave_direction) == null ? void 0 : ue.at(M)) !== null ? (((ge = z == null ? void 0 : z.swell_wave_direction) == null ? void 0 : ge.at(M)) + 180) % 360 : null,
|
|
4801
4801
|
period: (W = z == null ? void 0 : z.swell_wave_period) == null ? void 0 : W.at(M),
|
|
4802
4802
|
peakPeriod: (Z = z == null ? void 0 : z.swell_wave_peak_period) == null ? void 0 : Z.at(M)
|
|
4803
4803
|
},
|
|
4804
4804
|
wd: {
|
|
4805
4805
|
height: (oe = z == null ? void 0 : z.wind_wave_height) == null ? void 0 : oe.at(M),
|
|
4806
|
-
degree: (
|
|
4807
|
-
bearing: ((
|
|
4806
|
+
degree: (le = z == null ? void 0 : z.wind_wave_direction) == null ? void 0 : le.at(M),
|
|
4807
|
+
bearing: ((Ae = z == null ? void 0 : z.wind_wave_direction) == null ? void 0 : Ae.at(M)) !== null ? (((Le = z == null ? void 0 : z.wind_wave_direction) == null ? void 0 : Le.at(M)) + 180) % 360 : null,
|
|
4808
4808
|
period: (xe = z == null ? void 0 : z.wind_wave_period) == null ? void 0 : xe.at(M),
|
|
4809
4809
|
peakPeriod: (B = z == null ? void 0 : z.wind_wave_peak_period) == null ? void 0 : B.at(M)
|
|
4810
4810
|
}
|
|
@@ -4817,7 +4817,7 @@ class ht {
|
|
|
4817
4817
|
},
|
|
4818
4818
|
sst: (ze = z == null ? void 0 : z.sea_surface_temperature) == null ? void 0 : ze.at(M),
|
|
4819
4819
|
height: (_e = z == null ? void 0 : z.sea_level_height_msl) == null ? void 0 : _e.at(M)
|
|
4820
|
-
}, Me.wave = this.parseWave(Me.wave,
|
|
4820
|
+
}, Me.wave = this.parseWave(Me.wave, we == null ? void 0 : we.wind), Me.current.direction = this.degree2Direction(Me.current.degree), Object.assign(Se[Te], Me), Te++;
|
|
4821
4821
|
}
|
|
4822
4822
|
}
|
|
4823
4823
|
}
|
|
@@ -4846,7 +4846,7 @@ class ht {
|
|
|
4846
4846
|
};
|
|
4847
4847
|
}
|
|
4848
4848
|
static pickDaily(e, t) {
|
|
4849
|
-
var r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G,
|
|
4849
|
+
var r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G, de, re, pe, ve, me, be, ue, ge, W, Z, oe, le, Ae, Le, xe, B;
|
|
4850
4850
|
const Ee = typeof t == "string" ? ie(t) : t, Ce = e == null ? void 0 : e.weather, ke = e == null ? void 0 : e.marine, Be = ie((s = (i = (r = Ce == null ? void 0 : Ce[0]) == null ? void 0 : r.daily) == null ? void 0 : i.time) == null ? void 0 : s.at(0)), ze = ie((c = (l = (n = Ce == null ? void 0 : Ce[0]) == null ? void 0 : n.daily) == null ? void 0 : l.time) == null ? void 0 : c.at(-1)), _e = [];
|
|
4851
4851
|
if (Ee.isBetween(Be, ze, "millisecond", "[]")) {
|
|
4852
4852
|
let J, q;
|
|
@@ -4901,22 +4901,22 @@ class ht {
|
|
|
4901
4901
|
wave: {
|
|
4902
4902
|
sig: {
|
|
4903
4903
|
height: (G = $.wave_height_max) == null ? void 0 : G.at(S),
|
|
4904
|
-
degree: (
|
|
4904
|
+
degree: (de = $.wave_direction_dominant) == null ? void 0 : de.at(S),
|
|
4905
4905
|
period: (re = $.wave_period_max) == null ? void 0 : re.at(S),
|
|
4906
|
-
bearing: ((
|
|
4906
|
+
bearing: ((pe = $.wave_direction_dominant) == null ? void 0 : pe.at(S)) !== null ? (((ve = $.wave_direction_dominant) == null ? void 0 : ve.at(S)) + 180) % 360 : null
|
|
4907
4907
|
},
|
|
4908
4908
|
swell: {
|
|
4909
|
-
height: (
|
|
4909
|
+
height: (me = $.swell_wave_height_max) == null ? void 0 : me.at(S),
|
|
4910
4910
|
degree: (be = $.swell_wave_direction_dominant) == null ? void 0 : be.at(S),
|
|
4911
|
-
period: (
|
|
4912
|
-
peakPeriod: (
|
|
4911
|
+
period: (ue = $.swell_wave_period_max) == null ? void 0 : ue.at(S),
|
|
4912
|
+
peakPeriod: (ge = $.swell_wave_peak_period_max) == null ? void 0 : ge.at(S),
|
|
4913
4913
|
// bearing: daily.swell_wave_direction_dominant?.at(day) !== null ? (daily.swell_wave_direction_dominant?.at(day) + 180) % 360 : null,
|
|
4914
4914
|
bearing: ((W = $.swell_wave_direction_dominant) == null ? void 0 : W.at(S)) !== null ? ((Z = $.swell_wave_direction_dominant) == null ? void 0 : Z.at(S)) % 360 : null
|
|
4915
4915
|
},
|
|
4916
4916
|
wd: {
|
|
4917
4917
|
height: (oe = $.wind_wave_height_max) == null ? void 0 : oe.at(S),
|
|
4918
|
-
degree: (
|
|
4919
|
-
period: (
|
|
4918
|
+
degree: (le = $.wind_wave_direction_dominant) == null ? void 0 : le.at(S),
|
|
4919
|
+
period: (Ae = $.wind_wave_period_max) == null ? void 0 : Ae.at(S),
|
|
4920
4920
|
peakPeriod: (Le = $.wind_wave_peak_period_max) == null ? void 0 : Le.at(S),
|
|
4921
4921
|
bearing: ((xe = $.wind_wave_direction_dominant) == null ? void 0 : xe.at(S)) !== null ? (((B = $.wind_wave_direction_dominant) == null ? void 0 : B.at(S)) + 180) % 360 : null
|
|
4922
4922
|
}
|
|
@@ -5620,12 +5620,12 @@ const Oa = {
|
|
|
5620
5620
|
const _ = (h = this.tropicals.data.features) == null ? void 0 : h.filter((b) => b.geometry.type === "Point" && b.properties.type === "forecast");
|
|
5621
5621
|
let y = 0, v = 0, m = (L = (p = this.findClosestToNumber(_, "hour", 12)) == null ? void 0 : p.properties) == null ? void 0 : L.hour;
|
|
5622
5622
|
_.forEach((b, f) => {
|
|
5623
|
-
var D, N, H, j, U, G,
|
|
5623
|
+
var D, N, H, j, U, G, de, re, pe, ve, me, be, ue, ge, W, Z, oe, le, Ae, Le, xe, B, Ee, Ce, ke, Be, ze;
|
|
5624
5624
|
let w;
|
|
5625
5625
|
const P = this.findClosestToNumber(_, "hour", m + y * 24);
|
|
5626
5626
|
if (P && ((D = P == null ? void 0 : P.properties) == null ? void 0 : D.hour) === ((N = b.properties) == null ? void 0 : N.hour) && (w = P), w) {
|
|
5627
5627
|
let _e = 0, J = "tropical-marker-box", q = "tropical-marker-line";
|
|
5628
|
-
J = ((U = (j = (H = w.properties) == null ? void 0 : H.wind) == null ? void 0 : j.en) == null ? void 0 : U.toUpperCase()) === "SUPER TY" ? J + " supper" : J + " normal", q = ((re = (
|
|
5628
|
+
J = ((U = (j = (H = w.properties) == null ? void 0 : H.wind) == null ? void 0 : j.en) == null ? void 0 : U.toUpperCase()) === "SUPER TY" ? J + " supper" : J + " normal", q = ((re = (de = (G = w.properties) == null ? void 0 : G.wind) == null ? void 0 : de.en) == null ? void 0 : re.toUpperCase()) === "SUPER TY" ? q + " supper" : q + " normal", ((ve = (pe = w.properties) == null ? void 0 : pe.movement) == null ? void 0 : ve.deg) >= 0 && ((be = (me = w.properties) == null ? void 0 : me.movement) == null ? void 0 : be.deg) <= 60 || ((ge = (ue = w.properties) == null ? void 0 : ue.movement) == null ? void 0 : ge.deg) >= 120 && ((Z = (W = w.properties) == null ? void 0 : W.movement) == null ? void 0 : Z.deg) <= 240 || ((le = (oe = w.properties) == null ? void 0 : oe.movement) == null ? void 0 : le.deg) >= 300 && ((Le = (Ae = w.properties) == null ? void 0 : Ae.movement) == null ? void 0 : Le.deg) <= 360 ? (_e = y % 2 === 0 ? [84, 0] : [-84, 0], J = y % 2 === 0 ? J + " right" : J + " left", q = y % 2 === 0 ? q + " vertical right" : q + " vertical left") : (_e = v % 2 === 0 ? [60, -40] : [60, 40], J = v % 2 === 0 ? J + " top" : J + " bottom", q = v % 2 === 0 ? q + " align top" : q + " align bottom", v = v + 1);
|
|
5629
5629
|
const S = document.createElement("div");
|
|
5630
5630
|
S.className = J, S.innerHTML = `
|
|
5631
5631
|
<div style="">
|
|
@@ -5743,14 +5743,14 @@ const Oa = {
|
|
|
5743
5743
|
this.map && (this.map.getLayer(this.historyLayer) && this.map.removeLayer(this.historyLayer), this.map.getLayer(this.forecastLayer) && this.map.removeLayer(this.forecastLayer), this.map.getLayer(this.forecastModelLayer) && this.map.removeLayer(this.forecastModelLayer), this.map.getLayer(this.forecastNameLayer) && this.map.removeLayer(this.forecastNameLayer), this.map.getLayer(this.pointCircleLayer) && this.map.removeLayer(this.pointCircleLayer), this.map.getLayer(this.pointCircleLayer + "-border") && this.map.removeLayer(this.pointCircleLayer + "-border"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.historyPointCircleLayer) && this.map.removeLayer(this.historyPointCircleLayer), this.map.getLayer(this.historyPointCircleLayer + "-border") && this.map.removeLayer(this.historyPointCircleLayer + "-border"), this.map.getLayer(this.historyPointCircleLayer + "-inner") && this.map.removeLayer(this.historyPointCircleLayer + "-inner"), this.map.getLayer(this.historyPointLabelLayer) && this.map.removeLayer(this.historyPointLabelLayer), this.map.getLayer(this.interpolateLineLayer) && this.map.removeLayer(this.interpolateLineLayer), (a = this.interpolateMarkers) == null || a.forEach((e) => e == null ? void 0 : e.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource), this.labelMarkers.forEach((e) => e == null ? void 0 : e.remove()), this.labelMarkers = []);
|
|
5744
5744
|
},
|
|
5745
5745
|
handleDateChange() {
|
|
5746
|
-
var a, e, t, r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G,
|
|
5746
|
+
var a, e, t, r, i, s, n, l, c, d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G, de;
|
|
5747
5747
|
if ((a = this.interpolateMarkers) == null || a.forEach((re) => re == null ? void 0 : re.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
5748
|
-
const re = ie(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }),
|
|
5748
|
+
const re = ie(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), pe = ie.utc().add(1, "hour").set({ minute: 0, second: 0, millisecond: 0 }), ve = re.isBefore(pe) && pe.diff(re, "h") < 2 ? pe.format() : re.format(), me = this.interpolateData.filter((W) => W.properties.date === ve && !W.properties.disabled), be = this.handleComputePolygons(me), ue = Q.featureCollection([...me]);
|
|
5749
5749
|
be.forEach((W) => {
|
|
5750
|
-
|
|
5751
|
-
}), (t = this.map) != null && t.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(
|
|
5750
|
+
ue.features.push(W);
|
|
5751
|
+
}), (t = this.map) != null && t.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(ue) : ((i = this.map) == null || i.addSource(this.interpolateSource, {
|
|
5752
5752
|
type: "geojson",
|
|
5753
|
-
data:
|
|
5753
|
+
data: ue
|
|
5754
5754
|
}), (s = this.map) == null || s.addLayer({
|
|
5755
5755
|
id: this.interpolateLineLayer,
|
|
5756
5756
|
type: "line",
|
|
@@ -5762,12 +5762,12 @@ const Oa = {
|
|
|
5762
5762
|
"line-width": 1
|
|
5763
5763
|
}
|
|
5764
5764
|
})), this.interpolateMarkers = [];
|
|
5765
|
-
const
|
|
5766
|
-
for (const W of
|
|
5767
|
-
if (
|
|
5765
|
+
const ge = [];
|
|
5766
|
+
for (const W of me)
|
|
5767
|
+
if (ge.some((Z) => {
|
|
5768
5768
|
var oe;
|
|
5769
5769
|
return Z.properties.name === ((oe = W.properties) == null ? void 0 : oe.name);
|
|
5770
|
-
}) ||
|
|
5770
|
+
}) || ge.push(W), !W.properties.disabled) {
|
|
5771
5771
|
let Z = "#f44336";
|
|
5772
5772
|
((l = (n = W.properties) == null ? void 0 : n.wind) == null ? void 0 : l.kts) < 32 || !((d = (c = W.properties) == null ? void 0 : c.wind) != null && d.kts) ? Z = "#03f869" : ((p = (h = W.properties) == null ? void 0 : h.wind) == null ? void 0 : p.kts) >= 32 && ((x = (L = W.properties) == null ? void 0 : L.wind) == null ? void 0 : x.kts) < 47 ? Z = "#f2f202" : ((A = (E = W.properties) == null ? void 0 : E.wind) == null ? void 0 : A.kts) >= 47 && ((_ = (I = W.properties) == null ? void 0 : I.wind) == null ? void 0 : _.kts) < 63 ? Z = "#ff9100" : ((v = (y = W.properties) == null ? void 0 : y.wind) == null ? void 0 : v.kts) >= 63 && ((b = (m = W.properties) == null ? void 0 : m.wind) == null ? void 0 : b.kts) < 79 ? Z = "#f44336" : ((w = (f = W.properties) == null ? void 0 : f.wind) == null ? void 0 : w.kts) >= 79 && ((D = (P = W.properties) == null ? void 0 : P.wind) == null ? void 0 : D.kts) < 94 ? Z = "#f903d0" : ((H = (N = W.properties) == null ? void 0 : N.wind) == null ? void 0 : H.kts) >= 94 ? Z = "#8702f9" : Z = "#f44336";
|
|
5773
5773
|
const oe = `<svg t="1719918955501"
|
|
@@ -5784,14 +5784,14 @@ const Oa = {
|
|
|
5784
5784
|
<path
|
|
5785
5785
|
d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
|
|
5786
5786
|
fill="#ffffff" p-id="18386"></path>
|
|
5787
|
-
</svg>`,
|
|
5788
|
-
|
|
5789
|
-
const
|
|
5790
|
-
this.interpolateMarkers.push(
|
|
5787
|
+
</svg>`, le = document.createElement("div");
|
|
5788
|
+
le.className = "hurricane-hourly-marker", le.innerHTML = `<div class="${W.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${oe}</div>`;
|
|
5789
|
+
const Ae = new Re.Marker(le).setLngLat(W.geometry.coordinates).addTo(this.map);
|
|
5790
|
+
this.interpolateMarkers.push(Ae), (U = (j = this.map) == null ? void 0 : j.getSource(this.circleSource)) == null || U.setData(this.circleSourceData);
|
|
5791
5791
|
}
|
|
5792
|
-
|
|
5792
|
+
this.$emit("tropicalCenterPoints", ge);
|
|
5793
5793
|
} else
|
|
5794
|
-
(G = this.map) != null && G.getSource(this.interpolateSource) && ((
|
|
5794
|
+
(G = this.map) != null && G.getSource(this.interpolateSource) && ((de = this.map) == null || de.getSource(this.interpolateSource).setData(this.empty));
|
|
5795
5795
|
},
|
|
5796
5796
|
handleClick(a) {
|
|
5797
5797
|
var s, n, l, c, d, h, p, L;
|
|
@@ -5973,7 +5973,7 @@ function si(a, e, t, r, i, s) {
|
|
|
5973
5973
|
D.disabled ? "" : "active",
|
|
5974
5974
|
N > 0 && N < ((j = (H = i.activeTropicals) == null ? void 0 : H.forecasts) == null ? void 0 : j.length) - 1 && ((G = (U = i.activeTropicals) == null ? void 0 : U.forecasts) == null ? void 0 : G.length) > 2 ? "center-child" : ""
|
|
5975
5975
|
]),
|
|
5976
|
-
onClick: (
|
|
5976
|
+
onClick: (de) => s.handleForecastToggle(D)
|
|
5977
5977
|
}, [
|
|
5978
5978
|
o("span", {
|
|
5979
5979
|
class: te(D.model)
|
|
@@ -6091,7 +6091,7 @@ const oi = {
|
|
|
6091
6091
|
[1, "rgba(197,5,58,0.8)"]
|
|
6092
6092
|
];
|
|
6093
6093
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
6094
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
6094
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
6095
6095
|
this.program = e, this.aPositionBuffer = t;
|
|
6096
6096
|
}
|
|
6097
6097
|
},
|
|
@@ -6205,7 +6205,7 @@ const ci = {
|
|
|
6205
6205
|
[1, "rgba(144,144,144,0)"]
|
|
6206
6206
|
];
|
|
6207
6207
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
6208
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
6208
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
6209
6209
|
this.program = e, this.aPositionBuffer = t;
|
|
6210
6210
|
}
|
|
6211
6211
|
},
|
|
@@ -6325,7 +6325,7 @@ const ui = {
|
|
|
6325
6325
|
//
|
|
6326
6326
|
];
|
|
6327
6327
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
6328
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
6328
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
6329
6329
|
this.program = e, this.aPositionBuffer = t;
|
|
6330
6330
|
}
|
|
6331
6331
|
},
|
|
@@ -6448,7 +6448,7 @@ const Ai = {
|
|
|
6448
6448
|
[1, "rgb(138, 43, 10)"]
|
|
6449
6449
|
];
|
|
6450
6450
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
6451
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
6451
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, ce.vertexSchema, ce.fragmentSchema);
|
|
6452
6452
|
this.program = e, this.aPositionBuffer = t;
|
|
6453
6453
|
}
|
|
6454
6454
|
},
|
|
@@ -6643,17 +6643,17 @@ const _i = {
|
|
|
6643
6643
|
},
|
|
6644
6644
|
computeLat() {
|
|
6645
6645
|
return function(a, e = 4) {
|
|
6646
|
-
return
|
|
6646
|
+
return he.lat2pretty(a, e).pretty;
|
|
6647
6647
|
};
|
|
6648
6648
|
},
|
|
6649
6649
|
computeLng() {
|
|
6650
6650
|
return function(a, e = 4) {
|
|
6651
|
-
return
|
|
6651
|
+
return he.lng2pretty(a, e).pretty;
|
|
6652
6652
|
};
|
|
6653
6653
|
},
|
|
6654
6654
|
roundPrecision() {
|
|
6655
6655
|
return function(a, e = 4) {
|
|
6656
|
-
return isNaN(a) ? "-" :
|
|
6656
|
+
return isNaN(a) ? "-" : he.roundPrecision(a, e);
|
|
6657
6657
|
};
|
|
6658
6658
|
}
|
|
6659
6659
|
},
|
|
@@ -6696,7 +6696,7 @@ const _i = {
|
|
|
6696
6696
|
initTableData(a) {
|
|
6697
6697
|
var e, t, r, i, s, n, l, c, d;
|
|
6698
6698
|
this.clearTable(), this.positionGmt = (t = (e = a == null ? void 0 : a.weather) == null ? void 0 : e[0]) == null ? void 0 : t.timezone, this.positionOffset = (i = (r = a == null ? void 0 : a.weather) == null ? void 0 : r[0]) == null ? void 0 : i.offset, this.localDate = (n = (s = Ye(this.ts)) == null ? void 0 : s.tz(this.positionGmt)) == null ? void 0 : n.format("MMM-DD/HHmm[LT]"), this.currentHourData = (l = Ke.pickHourly(a, ie(this.ts))) == null ? void 0 : l[0], ((d = (c = this.currentHourData) == null ? void 0 : c.weather) == null ? void 0 : d.isDay) === 0 ? this.isDay = !1 : this.isDay = !0, this.$nextTick(() => {
|
|
6699
|
-
var p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G,
|
|
6699
|
+
var p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G, de, re, pe, ve, me, be, ue, ge, W, Z, oe, le, Ae;
|
|
6700
6700
|
if (!document.getElementById("meteoMainBox"))
|
|
6701
6701
|
return !1;
|
|
6702
6702
|
if (!this.currentHourData)
|
|
@@ -6705,7 +6705,7 @@ const _i = {
|
|
|
6705
6705
|
const xe = Ye(this.ts).tz(this.positionGmt).add(3 * Le, "h").format();
|
|
6706
6706
|
this.tableData.hours.push(xe);
|
|
6707
6707
|
const B = ((p = Ke.pickHourly(a, xe)) == null ? void 0 : p[0]) || {};
|
|
6708
|
-
this.tableData.temp.push(this.roundPrecision((L = B == null ? void 0 : B.weather) == null ? void 0 : L.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((E = (x = B == null ? void 0 : B.weather) == null ? void 0 : x.precip) == null ? void 0 : E.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((I = (A = B == null ? void 0 : B.weather) == null ? void 0 : A.precip) == null ? void 0 : I.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((_ = B == null ? void 0 : B.weather) == null ? void 0 : _.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((v = (y = B == null ? void 0 : B.weather) == null ? void 0 : y.wind) == null ? void 0 : v.kts, 1) ?? "-"), this.tableData.windDir.push((b = (m = B == null ? void 0 : B.weather) == null ? void 0 : m.wind) == null ? void 0 : b.bearing), this.tableData.windGust.push(this.roundPrecision((w = (f = B == null ? void 0 : B.weather) == null ? void 0 : f.wind) == null ? void 0 : w.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((D = (P = B == null ? void 0 : B.wave) == null ? void 0 : P.sig) == null ? void 0 : D.height, 1) ?? "-"), this.tableData.sigwaveDir.push((H = (N = B == null ? void 0 : B.wave) == null ? void 0 : N.sig) == null ? void 0 : H.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((U = (j = B == null ? void 0 : B.wave) == null ? void 0 : j.wd) == null ? void 0 : U.height, 1) ?? "-"), this.tableData.windwaveDir.push((
|
|
6708
|
+
this.tableData.temp.push(this.roundPrecision((L = B == null ? void 0 : B.weather) == null ? void 0 : L.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((E = (x = B == null ? void 0 : B.weather) == null ? void 0 : x.precip) == null ? void 0 : E.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((I = (A = B == null ? void 0 : B.weather) == null ? void 0 : A.precip) == null ? void 0 : I.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((_ = B == null ? void 0 : B.weather) == null ? void 0 : _.visibility, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((v = (y = B == null ? void 0 : B.weather) == null ? void 0 : y.wind) == null ? void 0 : v.kts, 1) ?? "-"), this.tableData.windDir.push((b = (m = B == null ? void 0 : B.weather) == null ? void 0 : m.wind) == null ? void 0 : b.bearing), this.tableData.windGust.push(this.roundPrecision((w = (f = B == null ? void 0 : B.weather) == null ? void 0 : f.wind) == null ? void 0 : w.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((D = (P = B == null ? void 0 : B.wave) == null ? void 0 : P.sig) == null ? void 0 : D.height, 1) ?? "-"), this.tableData.sigwaveDir.push((H = (N = B == null ? void 0 : B.wave) == null ? void 0 : N.sig) == null ? void 0 : H.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((U = (j = B == null ? void 0 : B.wave) == null ? void 0 : j.wd) == null ? void 0 : U.height, 1) ?? "-"), this.tableData.windwaveDir.push((de = (G = B == null ? void 0 : B.wave) == null ? void 0 : G.wd) == null ? void 0 : de.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((pe = (re = B == null ? void 0 : B.wave) == null ? void 0 : re.wd) == null ? void 0 : pe.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((me = (ve = B == null ? void 0 : B.wave) == null ? void 0 : ve.swell) == null ? void 0 : me.height, 1) ?? "-"), this.tableData.swellDir.push((ue = (be = B == null ? void 0 : B.wave) == null ? void 0 : be.swell) == null ? void 0 : ue.bearing), this.tableData.swellPeriod.push(this.roundPrecision((W = (ge = B == null ? void 0 : B.wave) == null ? void 0 : ge.swell) == null ? void 0 : W.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((Z = B == null ? void 0 : B.current) == null ? void 0 : Z.speed, 1) ?? "-"), this.tableData.currentDir.push((oe = B == null ? void 0 : B.current) == null ? void 0 : oe.bearing), this.tableData.seaLevel.push(this.roundPrecision(B == null ? void 0 : B.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(B == null ? void 0 : B.sst, 0) ?? "-"), this.tableData.weatherUrls.push((le = B == null ? void 0 : B.weather) == null ? void 0 : le.url), this.tableData.weatherNames.push(((Ae = B == null ? void 0 : B.weather) == null ? void 0 : Ae.name) ?? "-");
|
|
6709
6709
|
}
|
|
6710
6710
|
});
|
|
6711
6711
|
},
|
|
@@ -6831,7 +6831,7 @@ const _i = {
|
|
|
6831
6831
|
class: "main-box flex-center"
|
|
6832
6832
|
};
|
|
6833
6833
|
function Qr(a, e, t, r, i, s) {
|
|
6834
|
-
var d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G,
|
|
6834
|
+
var d, h, p, L, x, E, A, I, _, y, v, m, b, f, w, P, D, N, H, j, U, G, de, re, pe, ve, me, be, ue, ge, W, Z, oe, le, Ae, Le, xe, B, Ee, Ce, ke, Be, ze, _e, J, q, S, De, K, $, Se, M, we, Me, Te, Qe, z, O, Ge, Ue, ne, Ne, tt, at, it, rt, st, ot;
|
|
6835
6835
|
const n = R("LocationFilled"), l = R("ElIcon"), c = R("ElTooltip");
|
|
6836
6836
|
return Fe((u(), g("div", Bi, [
|
|
6837
6837
|
o("div", Ii, [
|
|
@@ -7311,11 +7311,11 @@ function Qr(a, e, t, r, i, s) {
|
|
|
7311
7311
|
o("div", vr, [
|
|
7312
7312
|
o("div", br, [
|
|
7313
7313
|
e[33] || (e[33] = o("div", null, "Wind", -1)),
|
|
7314
|
-
o("div", null, k((H = (N = (D = i.currentHourData) == null ? void 0 : D.weather) == null ? void 0 : N.wind) == null ? void 0 : H.direction) + "/" + k(s.roundPrecision((G = (U = (j = i.currentHourData) == null ? void 0 : j.weather) == null ? void 0 : U.wind) == null ? void 0 : G.kts, 1)) + "kts/BF" + k((
|
|
7314
|
+
o("div", null, k((H = (N = (D = i.currentHourData) == null ? void 0 : D.weather) == null ? void 0 : N.wind) == null ? void 0 : H.direction) + "/" + k(s.roundPrecision((G = (U = (j = i.currentHourData) == null ? void 0 : j.weather) == null ? void 0 : U.wind) == null ? void 0 : G.kts, 1)) + "kts/BF" + k((pe = (re = (de = i.currentHourData) == null ? void 0 : de.weather) == null ? void 0 : re.wind) == null ? void 0 : pe.scale) + "/" + k(s.roundPrecision((be = (me = (ve = i.currentHourData) == null ? void 0 : ve.weather) == null ? void 0 : me.wind) == null ? void 0 : be.gusts, 1)) + " kts", 1)
|
|
7315
7315
|
]),
|
|
7316
7316
|
o("div", Lr, [
|
|
7317
7317
|
e[34] || (e[34] = o("div", null, "Sig wave", -1)),
|
|
7318
|
-
o("div", null, k((W = (
|
|
7318
|
+
o("div", null, k((W = (ge = (ue = i.currentHourData) == null ? void 0 : ue.wave) == null ? void 0 : ge.sig) == null ? void 0 : W.direction) + "/" + k(s.roundPrecision((le = (oe = (Z = i.currentHourData) == null ? void 0 : Z.wave) == null ? void 0 : oe.sig) == null ? void 0 : le.height, 1)) + "m/" + k(s.roundPrecision((xe = (Le = (Ae = i.currentHourData) == null ? void 0 : Ae.wave) == null ? void 0 : Le.sig) == null ? void 0 : xe.period, 1)) + "s", 1)
|
|
7319
7319
|
])
|
|
7320
7320
|
]),
|
|
7321
7321
|
o("div", Cr, [
|
|
@@ -7325,7 +7325,7 @@ function Qr(a, e, t, r, i, s) {
|
|
|
7325
7325
|
]),
|
|
7326
7326
|
o("div", _r, [
|
|
7327
7327
|
e[36] || (e[36] = o("div", null, "Swell", -1)),
|
|
7328
|
-
o("div", null, k((K = (De = (S = i.currentHourData) == null ? void 0 : S.wave) == null ? void 0 : De.swell) == null ? void 0 : K.direction) + "/" + k(s.roundPrecision((M = (Se = ($ = i.currentHourData) == null ? void 0 : $.wave) == null ? void 0 : Se.swell) == null ? void 0 : M.height, 1)) + "m/" + k(s.roundPrecision((Te = (Me = (
|
|
7328
|
+
o("div", null, k((K = (De = (S = i.currentHourData) == null ? void 0 : S.wave) == null ? void 0 : De.swell) == null ? void 0 : K.direction) + "/" + k(s.roundPrecision((M = (Se = ($ = i.currentHourData) == null ? void 0 : $.wave) == null ? void 0 : Se.swell) == null ? void 0 : M.height, 1)) + "m/" + k(s.roundPrecision((Te = (Me = (we = i.currentHourData) == null ? void 0 : we.wave) == null ? void 0 : Me.swell) == null ? void 0 : Te.period, 1)) + "s", 1)
|
|
7329
7329
|
])
|
|
7330
7330
|
]),
|
|
7331
7331
|
o("div", Br, [
|
|
@@ -7879,12 +7879,12 @@ const Zr = {
|
|
|
7879
7879
|
computed: {
|
|
7880
7880
|
computeLat() {
|
|
7881
7881
|
return function(a) {
|
|
7882
|
-
return
|
|
7882
|
+
return he.lat2pretty(a, 4).pretty;
|
|
7883
7883
|
};
|
|
7884
7884
|
},
|
|
7885
7885
|
computeLng() {
|
|
7886
7886
|
return function(a) {
|
|
7887
|
-
return
|
|
7887
|
+
return he.lng2pretty(a, 4).pretty;
|
|
7888
7888
|
};
|
|
7889
7889
|
}
|
|
7890
7890
|
},
|
|
@@ -8356,7 +8356,7 @@ const ys = /* @__PURE__ */ Y(us, [["render", gs]]), fs = {
|
|
|
8356
8356
|
methods: {
|
|
8357
8357
|
handleRender() {
|
|
8358
8358
|
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((a) => {
|
|
8359
|
-
a.geometry.type === "Polygon" && a.geometry.coordinates.forEach((e) =>
|
|
8359
|
+
a.geometry.type === "Polygon" && a.geometry.coordinates.forEach((e) => he.convertToMonotonicLng2(e));
|
|
8360
8360
|
}), this.map.addSource(this.source, {
|
|
8361
8361
|
type: "geojson",
|
|
8362
8362
|
data: this.area
|
|
@@ -8536,7 +8536,7 @@ const Cs = {
|
|
|
8536
8536
|
this.show ? ((a = this.map) == null || a.on("zoomend", this.handleZoomEnd), this.handleRender()) : (this.handleClear(), (e = this.map) == null || e.off("zoomend", this.handleZoomEnd));
|
|
8537
8537
|
},
|
|
8538
8538
|
handleMouseMove(a) {
|
|
8539
|
-
const e = a.lngLat, t =
|
|
8539
|
+
const e = a.lngLat, t = he.lng2pretty(e.lng, 2), r = he.lat2pretty(e.lat, 2);
|
|
8540
8540
|
this.lngLat = { lng: t, lat: r };
|
|
8541
8541
|
},
|
|
8542
8542
|
handleComputeLatLngs() {
|
|
@@ -8792,9 +8792,9 @@ const pt = /* @__PURE__ */ Y(Cs, [["render", xs], ["__scopeId", "data-v-747fb3c8
|
|
|
8792
8792
|
const r = [];
|
|
8793
8793
|
for (let i = 1; i < e.length; i++) {
|
|
8794
8794
|
const s = e[i - 1], n = e[i], l = s.properties, c = { lng: s.geometry.coordinates[0], lat: s.geometry.coordinates[1] }, d = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, h = je.calculateDistance(c, d, l.mode === "RL", 4), p = je.calculateBearing(c, d, l.mode === "RL", 2);
|
|
8795
|
-
t =
|
|
8795
|
+
t = he.roundPrecision(t + h, 2);
|
|
8796
8796
|
let L;
|
|
8797
|
-
l.mode === "RL" ? L =
|
|
8797
|
+
l.mode === "RL" ? L = he.convertToMonotonicLng([c, d]) : L = he.convertToMonotonicLng(je.interpolateCoordinates(c, d, 200));
|
|
8798
8798
|
const x = Q.lineString(L.map((E) => [E.lng, E.lat]));
|
|
8799
8799
|
x.properties.dist = h, x.properties.bearing = p, x.properties.total = t, r.push(x);
|
|
8800
8800
|
}
|
|
@@ -8809,7 +8809,7 @@ const pt = /* @__PURE__ */ Y(Cs, [["render", xs], ["__scopeId", "data-v-747fb3c8
|
|
|
8809
8809
|
const c = e.properties, d = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, h = { lng: t.lng, lat: t.lat };
|
|
8810
8810
|
s = je.calculateDistance(d, h, c.mode === "RL", 4), n = je.calculateBearing(d, h, c.mode === "RL", 2);
|
|
8811
8811
|
let p;
|
|
8812
|
-
c.mode === "RL" ? p =
|
|
8812
|
+
c.mode === "RL" ? p = he.convertToMonotonicLng([d, h]) : p = he.convertToMonotonicLng(je.interpolateCoordinates(d, h, 200));
|
|
8813
8813
|
const L = Q.lineString(p.map((x) => [x.lng, x.lat]));
|
|
8814
8814
|
L.properties.dist = s, L.properties.bearing = n, i.features.push(L);
|
|
8815
8815
|
}
|
|
@@ -8817,7 +8817,7 @@ const pt = /* @__PURE__ */ Y(Cs, [["render", xs], ["__scopeId", "data-v-747fb3c8
|
|
|
8817
8817
|
const c = t.properties, d = t, h = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
8818
8818
|
s = je.calculateDistance(d, h, c.mode === "RL", 4), n = je.calculateBearing(d, h, c.mode === "RL", 2);
|
|
8819
8819
|
let p;
|
|
8820
|
-
c.mode === "RL" ? p =
|
|
8820
|
+
c.mode === "RL" ? p = he.convertToMonotonicLng([d, h]) : p = he.convertToMonotonicLng(je.interpolateCoordinates(d, h, 200));
|
|
8821
8821
|
const L = Q.lineString(p.map((x) => [x.lng, x.lat]));
|
|
8822
8822
|
L.properties.dist = s, L.properties.bearing = n, i.features.push(L);
|
|
8823
8823
|
}
|
|
@@ -8859,7 +8859,7 @@ const pt = /* @__PURE__ */ Y(Cs, [["render", xs], ["__scopeId", "data-v-747fb3c8
|
|
|
8859
8859
|
}
|
|
8860
8860
|
});
|
|
8861
8861
|
let l;
|
|
8862
|
-
if (r ? l = '<div class="marker-label">Drag and drop</div>' : l = `<div class="marker-label">Total distance: <b>${
|
|
8862
|
+
if (r ? l = '<div class="marker-label">Drag and drop</div>' : l = `<div class="marker-label">Total distance: <b>${he.roundPrecision((a.total ?? 0) + s, 1)}</b>nm, bearing: <b>${n}</b>°</div><div class="marker-label">${this.navigation === "RL" ? "RL" : "GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`, this.tipMarker)
|
|
8863
8863
|
this.tipMarker._element.innerHTML = l, this.tipMarker.setLngLat([t.lng, t.lat]);
|
|
8864
8864
|
else {
|
|
8865
8865
|
const c = document.createElement("div");
|
|
@@ -9557,7 +9557,7 @@ const js = {
|
|
|
9557
9557
|
var d, h, p, L, x, E;
|
|
9558
9558
|
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
9559
9559
|
let e = 0, t = 0;
|
|
9560
|
-
const r = (d = this.map) == null ? void 0 : d.getBounds(), i = this.map.getZoom(), s =
|
|
9560
|
+
const r = (d = this.map) == null ? void 0 : d.getBounds(), i = this.map.getZoom(), s = he.convertToStdLng(r._sw.lng), n = he.convertToStdLng(r._ne.lng), l = Math.floor(r._sw.lat), c = Math.ceil(r._ne.lat);
|
|
9561
9561
|
for (const A in this.weatherLayers) {
|
|
9562
9562
|
let I = !1;
|
|
9563
9563
|
if (this.weatherLayers[A].active && this.weatherLayers[A].type === "json") {
|
|
@@ -9788,7 +9788,7 @@ const js = {
|
|
|
9788
9788
|
}
|
|
9789
9789
|
for (const m in y.Point)
|
|
9790
9790
|
y.Point[m].lng.forEach((b, f) => {
|
|
9791
|
-
b =
|
|
9791
|
+
b = he.convertToStdLng(b), v.push(
|
|
9792
9792
|
Q.point([b, m], {
|
|
9793
9793
|
val: y.Point[m].val[f],
|
|
9794
9794
|
type: y.Point[m].type[f]
|
|
@@ -9811,7 +9811,7 @@ const js = {
|
|
|
9811
9811
|
this.handleDrawWeather4Json(), !this.activeWeatherLayers.some((l) => l.key === "wind" && l.particle === !0 || l.key === "current" && l.particle === !0 || l.key === "ice-edge" || l.key === "ice-thickness" || l.key === "ice-cover" || l.key === "temp" || l.key === "water-temp") && this.map.getZoom() > 3 && this.enc ? (t = (e = this.map) == null ? void 0 : e.getLayer(this.enc)) == null || t.setLayoutProperty("visibility", "visible") : ((i = (r = this.map) == null ? void 0 : r.getLayer("i4")) == null || i.setLayoutProperty("visibility", "none"), (n = (s = this.map) == null ? void 0 : s.getLayer("hi")) == null || n.setLayoutProperty("visibility", "none"));
|
|
9812
9812
|
},
|
|
9813
9813
|
handleBboxClip(a, e) {
|
|
9814
|
-
const t = [], r =
|
|
9814
|
+
const t = [], r = he.convertToStdLng(e._sw.lng), i = he.convertToStdLng(e._ne.lng);
|
|
9815
9815
|
return a.features.forEach((s) => {
|
|
9816
9816
|
if (s.geometry.type !== "Point")
|
|
9817
9817
|
if (r > i) {
|
|
@@ -9896,8 +9896,8 @@ const js = {
|
|
|
9896
9896
|
class: "map-gl-home"
|
|
9897
9897
|
};
|
|
9898
9898
|
function Gs(a, e, t, r, i, s) {
|
|
9899
|
-
var W, Z, oe,
|
|
9900
|
-
const n = R("IdmGlLayer"), l = R("IdmENC"), c = R("IdmWorld12nm"), d = R("IdmWorldMarine"), h = R("IdmChinaRoute"), p = R("IdmSigWave"), L = R("IdmSwell"), x = R("IdmPrmsl"), E = R("IdmIceEdge"), A = R("IdmIceCover"), I = R("IdmIceThickness"), _ = R("IdmTropicals"), y = R("IdmCurrents"), v = R("IdmCurrentParticle"), m = R("IdmWindBarb"), b = R("IdmWindParticle"), f = R("IdmPrecip3h"), w = R("IdmVisibility"), P = R("IdmWaterTemp"), D = R("IdmTemp"), N = R("IdmWarZone"), H = R("IdmGmdssArea"), j = R("IdmEcaZone"), U = R("IdmAlertZone"), G = R("IdmPort"),
|
|
9899
|
+
var W, Z, oe, le, Ae, Le, xe, B, Ee, Ce, ke, Be, ze, _e, J, q, S, De, K, $, Se, M, we, Me, Te, Qe, z, O, Ge, Ue;
|
|
9900
|
+
const n = R("IdmGlLayer"), l = R("IdmENC"), c = R("IdmWorld12nm"), d = R("IdmWorldMarine"), h = R("IdmChinaRoute"), p = R("IdmSigWave"), L = R("IdmSwell"), x = R("IdmPrmsl"), E = R("IdmIceEdge"), A = R("IdmIceCover"), I = R("IdmIceThickness"), _ = R("IdmTropicals"), y = R("IdmCurrents"), v = R("IdmCurrentParticle"), m = R("IdmWindBarb"), b = R("IdmWindParticle"), f = R("IdmPrecip3h"), w = R("IdmVisibility"), P = R("IdmWaterTemp"), D = R("IdmTemp"), N = R("IdmWarZone"), H = R("IdmGmdssArea"), j = R("IdmEcaZone"), U = R("IdmAlertZone"), G = R("IdmPort"), de = R("IdmLoadLine"), re = R("IdmTimezone"), pe = R("IdmVRA"), ve = R("IdmSpecialArea"), me = R("IdmTerminator"), be = R("IdmLatLng"), ue = R("IdmMeasure"), ge = R("IdmPoint");
|
|
9901
9901
|
return t.map ? (u(), g("div", Ws, [
|
|
9902
9902
|
F(n, X({
|
|
9903
9903
|
ref: "layer",
|
|
@@ -9954,11 +9954,11 @@ function Gs(a, e, t, r, i, s) {
|
|
|
9954
9954
|
map: t.map,
|
|
9955
9955
|
token: t.token,
|
|
9956
9956
|
"weather-layers": i.weatherLayers,
|
|
9957
|
-
enabled: (
|
|
9957
|
+
enabled: (le = i.otherLayers) == null ? void 0 : le.chinaRoute
|
|
9958
9958
|
}, a.$attrs), null, 16, ["map", "token", "weather-layers", "enabled"]),
|
|
9959
9959
|
F(p, X({
|
|
9960
9960
|
map: t.map,
|
|
9961
|
-
"sig-wave": (
|
|
9961
|
+
"sig-wave": (Ae = i.weatherLayers) == null ? void 0 : Ae["sig-wave-height"],
|
|
9962
9962
|
"before-layer": t.beforeLayer,
|
|
9963
9963
|
"active-weather-layers": i.activeWeatherLayers
|
|
9964
9964
|
}, a.$attrs), null, 16, ["map", "sig-wave", "before-layer", "active-weather-layers"]),
|
|
@@ -10077,7 +10077,7 @@ function Gs(a, e, t, r, i, s) {
|
|
|
10077
10077
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
10078
10078
|
F(j, X({
|
|
10079
10079
|
map: t.map,
|
|
10080
|
-
zone: (
|
|
10080
|
+
zone: (we = i.otherLayers) == null ? void 0 : we["eca-zones"],
|
|
10081
10081
|
"before-layer": t.beforeLayer
|
|
10082
10082
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
10083
10083
|
F(U, X({
|
|
@@ -10091,7 +10091,7 @@ function Gs(a, e, t, r, i, s) {
|
|
|
10091
10091
|
"before-layer": t.beforeLayer,
|
|
10092
10092
|
"forecast-model": t.forecastModel
|
|
10093
10093
|
}, a.$attrs), null, 16, ["map", "port", "before-layer", "forecast-model"]),
|
|
10094
|
-
F(
|
|
10094
|
+
F(de, X({
|
|
10095
10095
|
map: t.map,
|
|
10096
10096
|
line: (Qe = i.otherLayers) == null ? void 0 : Qe["load-lines"],
|
|
10097
10097
|
"before-layer": t.beforeLayer
|
|
@@ -10101,17 +10101,17 @@ function Gs(a, e, t, r, i, s) {
|
|
|
10101
10101
|
zone: (z = i.otherLayers) == null ? void 0 : z["time-zones"],
|
|
10102
10102
|
"before-layer": t.beforeLayer
|
|
10103
10103
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
10104
|
-
F(
|
|
10104
|
+
F(pe, X({
|
|
10105
10105
|
map: t.map,
|
|
10106
10106
|
area: (O = i.otherLayers) == null ? void 0 : O["voluntary-reporting-area"],
|
|
10107
10107
|
"before-layer": t.beforeLayer
|
|
10108
10108
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
10109
|
-
F(
|
|
10109
|
+
F(ve, X({
|
|
10110
10110
|
map: t.map,
|
|
10111
10111
|
area: (Ge = i.otherLayers) == null ? void 0 : Ge["special-area"],
|
|
10112
10112
|
"before-layer": t.beforeLayer
|
|
10113
10113
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
10114
|
-
F(
|
|
10114
|
+
F(me, X({
|
|
10115
10115
|
map: t.map,
|
|
10116
10116
|
area: (Ue = i.otherLayers) == null ? void 0 : Ue["day-night"]
|
|
10117
10117
|
}, a.$attrs), null, 16, ["map", "area"]),
|
|
@@ -10120,11 +10120,11 @@ function Gs(a, e, t, r, i, s) {
|
|
|
10120
10120
|
show: i.showCoord,
|
|
10121
10121
|
"toggle-version": t.toggleVersion
|
|
10122
10122
|
}, a.$attrs), null, 16, ["map", "show", "toggle-version"]),
|
|
10123
|
-
F(
|
|
10123
|
+
F(ue, X({
|
|
10124
10124
|
map: t.map,
|
|
10125
10125
|
show: i.showMeasure
|
|
10126
10126
|
}, a.$attrs), null, 16, ["map", "show"]),
|
|
10127
|
-
F(
|
|
10127
|
+
F(ge, X({
|
|
10128
10128
|
ref: "idmPoint",
|
|
10129
10129
|
map: t.map,
|
|
10130
10130
|
show: i.showPoint,
|
|
@@ -10150,5 +10150,5 @@ export {
|
|
|
10150
10150
|
dt as TropicalGL,
|
|
10151
10151
|
et as Viewport,
|
|
10152
10152
|
We as WebGL,
|
|
10153
|
-
|
|
10153
|
+
ce as WebGLSchema
|
|
10154
10154
|
};
|