@idmwx/idmui-gl3 3.6.4 → 3.6.6
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 +187 -184
- package/dist/index.umd.cjs +4 -4
- package/dist/mapbox/src/index.vue.d.ts +5 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -530,8 +530,8 @@ class Ge {
|
|
|
530
530
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
531
531
|
*/
|
|
532
532
|
getBoundPixel() {
|
|
533
|
-
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, n] = this.convertNLng(r[0]), [s, c] = this.convertNLng(i[0]), [h, d] = this.mercator.px([o, r[1]], a), [p,
|
|
534
|
-
return [p,
|
|
533
|
+
const e = this.map.getBounds(), a = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, n] = this.convertNLng(r[0]), [s, c] = this.convertNLng(i[0]), [h, d] = this.mercator.px([o, r[1]], a), [p, f] = this.mercator.px([s, i[1]], a), m = Math.round(this.mercator.size * Math.pow(2, a) * (n + c));
|
|
534
|
+
return [p, f, h + m, d];
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
537
|
* [视窗边界像素宽度]
|
|
@@ -702,14 +702,14 @@ class ve {
|
|
|
702
702
|
if (a && r) {
|
|
703
703
|
e.resize(), a == null || a.viewport(0, 0, (c = a == null ? void 0 : a.canvas) == null ? void 0 : c.width, (h = a == null ? void 0 : a.canvas) == null ? void 0 : h.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT);
|
|
704
704
|
try {
|
|
705
|
-
const d = a.getUniformLocation(r, "u_resolution"), p = a.getUniformLocation(r, "u_image"),
|
|
706
|
-
if (a.useProgram(r), a.uniform2f(d, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), a.uniform1i(p, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), a.uniform1i(
|
|
705
|
+
const d = a.getUniformLocation(r, "u_resolution"), p = a.getUniformLocation(r, "u_image"), f = a.getUniformLocation(r, "u_color");
|
|
706
|
+
if (a.useProgram(r), a.uniform2f(d, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), a.uniform1i(p, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), a.uniform1i(f, 1), s != null && s.uvRange && (s != null && s.sRange)) {
|
|
707
707
|
const u = a.getUniformLocation(r, "u_range_u_v"), v = a.getUniformLocation(r, "u_range_s");
|
|
708
708
|
a.uniform2f(u, s.uvRange[0], s.uvRange[1]), a.uniform2f(v, s.sRange[0], s.sRange[1]);
|
|
709
709
|
}
|
|
710
|
-
const m = e.getBoundPixel(),
|
|
711
|
-
for (const u of
|
|
712
|
-
const v = (u[0] - m[0]) * e.ratio,
|
|
710
|
+
const m = e.getBoundPixel(), b = e.map.getZoom() + 1, y = e.getWorldCopy(m, b);
|
|
711
|
+
for (const u of y) {
|
|
712
|
+
const v = (u[0] - m[0]) * e.ratio, g = (u[1] - m[3]) * e.ratio, w = u[2] * e.ratio, [k, _, I, D] = [v, w + v, g, w + g], $ = new Float32Array([k, I, _, I, k, D, k, D, _, I, _, D]);
|
|
713
713
|
a.bindBuffer(a.ARRAY_BUFFER, n), a.bufferData(a.ARRAY_BUFFER, $, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
714
714
|
}
|
|
715
715
|
} catch (d) {
|
|
@@ -3181,15 +3181,15 @@ const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-a182db4f
|
|
|
3181
3181
|
},
|
|
3182
3182
|
paint: {
|
|
3183
3183
|
"fill-outline-color": "#888",
|
|
3184
|
-
"fill-opacity": 0.
|
|
3184
|
+
"fill-opacity": 0.5,
|
|
3185
3185
|
"fill-color": [
|
|
3186
3186
|
"step",
|
|
3187
3187
|
["get", "val"],
|
|
3188
|
-
"#
|
|
3188
|
+
"#9af8bf",
|
|
3189
3189
|
3,
|
|
3190
|
-
"#
|
|
3190
|
+
"#84f9ad",
|
|
3191
3191
|
4,
|
|
3192
|
-
"#
|
|
3192
|
+
"#83f981",
|
|
3193
3193
|
5,
|
|
3194
3194
|
"#c2fb63",
|
|
3195
3195
|
6,
|
|
@@ -3651,19 +3651,19 @@ const Ua = {
|
|
|
3651
3651
|
var h;
|
|
3652
3652
|
let n = 0, s;
|
|
3653
3653
|
const c = t.filter((d) => {
|
|
3654
|
-
var p,
|
|
3655
|
-
return ((
|
|
3654
|
+
var p, f;
|
|
3655
|
+
return ((f = (p = d.properties) == null ? void 0 : p.category) == null ? void 0 : f.split("-")[0]) === o;
|
|
3656
3656
|
});
|
|
3657
3657
|
(h = c.filter((d) => {
|
|
3658
|
-
var p,
|
|
3659
|
-
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((
|
|
3658
|
+
var p, f;
|
|
3659
|
+
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((f = d.properties) == null ? void 0 : f.type) === "forecast";
|
|
3660
3660
|
})[0]) == null || h.properties.model, c.forEach((d, p) => {
|
|
3661
|
-
var
|
|
3662
|
-
((
|
|
3661
|
+
var f, m, b, y, u, v;
|
|
3662
|
+
((f = d.geometry) == null ? void 0 : f.type) === "Point" && ((m = d.properties) == null ? void 0 : m.type) === "history" && (n = p, s = s === void 0 ? p : s), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && s === void 0 && (s = p), ((u = d.geometry) == null ? void 0 : u.type) === "LineString" && ((v = d.properties) == null || v.type);
|
|
3663
3663
|
}), c.map((d, p) => {
|
|
3664
|
-
var
|
|
3665
|
-
if (((
|
|
3666
|
-
const k = ((w = (
|
|
3664
|
+
var f, m, b, y, u, v, g, w;
|
|
3665
|
+
if (((f = d.geometry) == null ? void 0 : f.type) === "LineString" && ((m = d.properties) == null || m.type), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && (d.properties.name = o), ((u = d.geometry) == null ? void 0 : u.type) === "Point" && ((v = d.properties) == null ? void 0 : v.type) === "history") {
|
|
3666
|
+
const k = ((w = (g = d.properties) == null ? void 0 : g.format) == null ? void 0 : w.slice(7, 12)) === ee().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm") + "Z";
|
|
3667
3667
|
d.properties.showHistoryLabel = k || p === n, d.properties.showNameLabel = p === n, d.properties.name = o;
|
|
3668
3668
|
}
|
|
3669
3669
|
return d;
|
|
@@ -3712,8 +3712,8 @@ const Ua = {
|
|
|
3712
3712
|
else {
|
|
3713
3713
|
if (this.tropicals) {
|
|
3714
3714
|
const p = (/* @__PURE__ */ new Date()).valueOf();
|
|
3715
|
-
let
|
|
3716
|
-
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), m = (/* @__PURE__ */ new Date()).valueOf() - (p +
|
|
3715
|
+
let f = 0, m = 0;
|
|
3716
|
+
(t = this.map) != null && t.getSource(this.source) ? ((a = this.map) == null || a.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), m = (/* @__PURE__ */ new Date()).valueOf() - (p + f), console.log("[tropicals] update elapsed: ", m, ", total: ", f += m)) : (this.map.addSource(this.source, {
|
|
3717
3717
|
type: "geojson",
|
|
3718
3718
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
3719
3719
|
}), this.map.addLayer({
|
|
@@ -3810,7 +3810,7 @@ const Ua = {
|
|
|
3810
3810
|
],
|
|
3811
3811
|
"text-halo-width": 4
|
|
3812
3812
|
}
|
|
3813
|
-
}), m = (/* @__PURE__ */ new Date()).valueOf() - (p +
|
|
3813
|
+
}), m = (/* @__PURE__ */ new Date()).valueOf() - (p + f), console.log("[tropical] add elapsed: ", m, ", total: ", f += m)), (o = this.map) != null && o.getSource(this.clusterSource) ? ((s = this.map) == null || s.getSource(this.clusterSource).setData((n = this.tropicals) != null && n.active ? this.tropicals.data : this.empty), m = (/* @__PURE__ */ new Date()).valueOf() - (p + f), console.log("[tropical] update elapsed: ", m, ", total: ", f += m)) : (this.map.addSource(this.clusterSource, {
|
|
3814
3814
|
type: "geojson",
|
|
3815
3815
|
data: (c = this.tropicals) != null && c.active ? (h = this.tropicals) == null ? void 0 : h.data : this.empty
|
|
3816
3816
|
// cluster: true,
|
|
@@ -3925,24 +3925,24 @@ const Ua = {
|
|
|
3925
3925
|
"text-halo-color": "#146bf5",
|
|
3926
3926
|
"text-halo-width": 4
|
|
3927
3927
|
}
|
|
3928
|
-
}), m = (/* @__PURE__ */ new Date()).valueOf() - (p +
|
|
3928
|
+
}), m = (/* @__PURE__ */ new Date()).valueOf() - (p + f), console.log("[tropical] add elapsed: ", m, ", total: ", f += m));
|
|
3929
3929
|
}
|
|
3930
3930
|
if (this.handleDrawCircle(), !((d = this.tropicals) != null && d.cached)) {
|
|
3931
|
-
const p = et.interpolate(this.tropicals, 1),
|
|
3932
|
-
|
|
3933
|
-
var
|
|
3934
|
-
(
|
|
3935
|
-
}), m.forEach((
|
|
3931
|
+
const p = et.interpolate(this.tropicals, 1), f = JSON.parse(JSON.stringify(p)), m = [];
|
|
3932
|
+
f.forEach((b) => {
|
|
3933
|
+
var y, u, v;
|
|
3934
|
+
(y = b.properties) != null && y.name && !m.includes((u = b.properties) == null ? void 0 : u.name) && m.push((v = b.properties) == null ? void 0 : v.name);
|
|
3935
|
+
}), m.forEach((b) => {
|
|
3936
3936
|
var v;
|
|
3937
|
-
const u = (v =
|
|
3937
|
+
const u = (v = f.filter((g) => {
|
|
3938
3938
|
var w;
|
|
3939
|
-
return ((w =
|
|
3939
|
+
return ((w = g.properties) == null ? void 0 : w.name) === b;
|
|
3940
3940
|
})[0]) == null ? void 0 : v.properties.model;
|
|
3941
|
-
|
|
3941
|
+
f.map((g, w) => {
|
|
3942
3942
|
var k, _;
|
|
3943
|
-
return ((k =
|
|
3943
|
+
return ((k = g.properties) == null ? void 0 : k.name) === b && (g.properties.disabled = ((_ = g.properties) == null ? void 0 : _.model) !== u), g;
|
|
3944
3944
|
});
|
|
3945
|
-
}), this.interpolateData = JSON.parse(JSON.stringify(
|
|
3945
|
+
}), this.interpolateData = JSON.parse(JSON.stringify(f));
|
|
3946
3946
|
}
|
|
3947
3947
|
this.handleDateChange();
|
|
3948
3948
|
}
|
|
@@ -3952,7 +3952,7 @@ const Ua = {
|
|
|
3952
3952
|
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), (t = this.interpolateMarkers) == null || t.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));
|
|
3953
3953
|
},
|
|
3954
3954
|
handleDateChange() {
|
|
3955
|
-
var t, e, a, r, i, o, n, s, c, h, d, p,
|
|
3955
|
+
var t, e, a, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _, I, D, $, W, O, U, ae, de, pe, me, ue, ye;
|
|
3956
3956
|
if ((t = this.interpolateMarkers) == null || t.forEach((X) => X == null ? void 0 : X.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
3957
3957
|
const X = ee(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), q = this.interpolateData.filter((R) => R.properties.date === X.format() && !R.properties.disabled), fe = this.handleComputePolygons(q), Y = C.featureCollection([...q]);
|
|
3958
3958
|
fe.forEach((R) => {
|
|
@@ -3974,7 +3974,7 @@ const Ua = {
|
|
|
3974
3974
|
for (const R of q)
|
|
3975
3975
|
if (!R.properties.disabled) {
|
|
3976
3976
|
let F = "#f44336";
|
|
3977
|
-
((s = (n = R.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 ? F = "#03f869" : ((h = (c = R.properties) == null ? void 0 : c.wind) == null ? void 0 : h.spd) >= 17.2 && ((p = (d = R.properties) == null ? void 0 : d.wind) == null ? void 0 : p.spd) < 24.5 ? F = "#f2f202" : ((m = (
|
|
3977
|
+
((s = (n = R.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 ? F = "#03f869" : ((h = (c = R.properties) == null ? void 0 : c.wind) == null ? void 0 : h.spd) >= 17.2 && ((p = (d = R.properties) == null ? void 0 : d.wind) == null ? void 0 : p.spd) < 24.5 ? F = "#f2f202" : ((m = (f = R.properties) == null ? void 0 : f.wind) == null ? void 0 : m.spd) >= 24.5 && ((y = (b = R.properties) == null ? void 0 : b.wind) == null ? void 0 : y.spd) < 32.7 ? F = "#ff9100" : ((v = (u = R.properties) == null ? void 0 : u.wind) == null ? void 0 : v.spd) >= 32.7 && ((w = (g = R.properties) == null ? void 0 : g.wind) == null ? void 0 : w.spd) < 41.5 ? F = "#f44336" : ((_ = (k = R.properties) == null ? void 0 : k.wind) == null ? void 0 : _.spd) >= 41.5 && ((D = (I = R.properties) == null ? void 0 : I.wind) == null ? void 0 : D.spd) < 51 ? F = "#c604a4" : ((W = ($ = R.properties) == null ? void 0 : $.wind) == null ? void 0 : W.spd) >= 51 ? F = "#6b05bb" : F = "#f44336";
|
|
3978
3978
|
const ge = `<svg t="1719918955501"
|
|
3979
3979
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
3980
3980
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -4008,28 +4008,28 @@ const Ua = {
|
|
|
4008
4008
|
(ue = this.map) != null && ue.getSource(this.interpolateSource) && ((ye = this.map) == null || ye.getSource(this.interpolateSource).setData(this.empty));
|
|
4009
4009
|
},
|
|
4010
4010
|
handleClick(t) {
|
|
4011
|
-
var o, n, s, c, h, d, p,
|
|
4011
|
+
var o, n, s, c, h, d, p, f;
|
|
4012
4012
|
const e = t.features[0], a = (n = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : n.features.filter(
|
|
4013
4013
|
(m) => {
|
|
4014
|
-
var
|
|
4015
|
-
return m.geometry.type === "LineString" && m.properties.type === "forecast" && m.properties.name === ((
|
|
4014
|
+
var b;
|
|
4015
|
+
return m.geometry.type === "LineString" && m.properties.type === "forecast" && m.properties.name === ((b = e == null ? void 0 : e.properties) == null ? void 0 : b.name);
|
|
4016
4016
|
}
|
|
4017
4017
|
);
|
|
4018
|
-
a.sort((m,
|
|
4019
|
-
var
|
|
4020
|
-
return ((
|
|
4018
|
+
a.sort((m, b) => {
|
|
4019
|
+
var y, u, v, g;
|
|
4020
|
+
return ((y = m.properties) == null ? void 0 : y.model) === "cma" ? -1 : ((u = m.properties) == null ? void 0 : u.model) === "jma" ? ((v = b.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : m.properties.model === "ecmwf" ? ["jma", "cma"].includes((g = b.properties) == null ? void 0 : g.model) ? 1 : -1 : 0;
|
|
4021
4021
|
});
|
|
4022
4022
|
const r = (c = (s = this.tropicals) == null ? void 0 : s.data) == null ? void 0 : c.features.filter(
|
|
4023
4023
|
(m) => {
|
|
4024
|
-
var
|
|
4025
|
-
return m.geometry.type === "LineString" && m.properties.type === "history" && m.properties.name === ((
|
|
4024
|
+
var b;
|
|
4025
|
+
return m.geometry.type === "LineString" && m.properties.type === "history" && m.properties.name === ((b = e == null ? void 0 : e.properties) == null ? void 0 : b.name);
|
|
4026
4026
|
}
|
|
4027
4027
|
);
|
|
4028
4028
|
this.activeTropicals = {
|
|
4029
4029
|
name: (h = e == null ? void 0 : e.properties) == null ? void 0 : h.name,
|
|
4030
4030
|
forecasts: a.map((m) => m.properties),
|
|
4031
4031
|
history: (d = r[0]) == null ? void 0 : d.properties,
|
|
4032
|
-
showCircle: (
|
|
4032
|
+
showCircle: (f = (p = a[0]) == null ? void 0 : p.properties) == null ? void 0 : f.showCircle
|
|
4033
4033
|
}, this.showTropicals = !0;
|
|
4034
4034
|
const i = document.getElementById("active-tropical");
|
|
4035
4035
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([t.lngLat.lng, t.lngLat.lat]) : this.activeTropicalsMarker = new ne.Marker(i).setLngLat([t.lngLat.lng, t.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
@@ -4117,7 +4117,7 @@ const Ua = {
|
|
|
4117
4117
|
return C.lineToPolygon(i, { properties: a });
|
|
4118
4118
|
}
|
|
4119
4119
|
}
|
|
4120
|
-
}, Ne = (t) => (G("data-v-
|
|
4120
|
+
}, Ne = (t) => (G("data-v-6751acd3"), t = t(), H(), t), Ga = {
|
|
4121
4121
|
id: "active-tropical",
|
|
4122
4122
|
class: "active-tropical"
|
|
4123
4123
|
}, Ha = { class: "header-box" }, Za = { class: "main" }, Xa = { key: 0 }, Ja = { class: "sub" }, qa = {
|
|
@@ -4135,9 +4135,9 @@ const Ua = {
|
|
|
4135
4135
|
}, oi = /* @__PURE__ */ Ne(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), si = { class: "forecast-models" }, ni = ["onClick"], li = { class: "row" }, ci = {
|
|
4136
4136
|
class: "col col-24",
|
|
4137
4137
|
style: { "justify-content": "flex-start" }
|
|
4138
|
-
}, hi = /* @__PURE__ */ Ne(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "showCircles : ", -1)), di = /* @__PURE__ */ lt('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-
|
|
4138
|
+
}, hi = /* @__PURE__ */ Ne(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "showCircles : ", -1)), di = /* @__PURE__ */ lt('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-6751acd3></div><div class="row" style="padding:2px 10px;" data-v-6751acd3><div class="legend" data-v-6751acd3><div class="icon td" data-v-6751acd3></div><div class="label" data-v-6751acd3>TD</div></div><div class="legend" data-v-6751acd3><div class="icon ts" data-v-6751acd3></div><div class="label" data-v-6751acd3>TS</div></div><div class="legend" data-v-6751acd3><div class="icon sts" data-v-6751acd3></div><div class="label" data-v-6751acd3>STS</div></div><div class="legend" data-v-6751acd3><div class="icon ty" data-v-6751acd3></div><div class="label" data-v-6751acd3>TY</div></div><div class="legend" data-v-6751acd3><div class="icon sty" data-v-6751acd3></div><div class="label" data-v-6751acd3>STY</div></div><div class="legend" data-v-6751acd3><div class="icon supper-ty" data-v-6751acd3></div><div class="label" data-v-6751acd3>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-6751acd3><div class="legend" data-v-6751acd3><div class="icon history" data-v-6751acd3></div><div class="label" data-v-6751acd3>History</div></div><div class="legend" data-v-6751acd3><div class="icon r7" data-v-6751acd3></div><div class="label" data-v-6751acd3>35kts Radii</div></div><div class="legend" data-v-6751acd3><div class="icon r10" data-v-6751acd3></div><div class="label" data-v-6751acd3>50kts Radii</div></div></div>', 3), pi = { class: "more" };
|
|
4139
4139
|
function mi(t, e, a, r, i, o) {
|
|
4140
|
-
var n, s, c, h, d, p,
|
|
4140
|
+
var n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _;
|
|
4141
4141
|
return $e((L(), x("div", Ga, [
|
|
4142
4142
|
l("div", Ha, [
|
|
4143
4143
|
l("div", {
|
|
@@ -4148,7 +4148,7 @@ function mi(t, e, a, r, i, o) {
|
|
|
4148
4148
|
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (L(), x("span", Xa, S((h = (c = i.activeTropicals) == null ? void 0 : c.history) == null ? void 0 : h.level) + " , ", 1)) : N("", !0),
|
|
4149
4149
|
Ke(S((d = i.activeTropicals) == null ? void 0 : d.name), 1)
|
|
4150
4150
|
]),
|
|
4151
|
-
l("div", Ja, " Last update: " + S(o.computeTime(((
|
|
4151
|
+
l("div", Ja, " Last update: " + S(o.computeTime(((f = (p = i.activeTropicals) == null ? void 0 : p.history) == null ? void 0 : f.updated) || ((y = (b = (m = i.activeTropicals) == null ? void 0 : m.forecasts) == null ? void 0 : b.filter((I) => !I.disabled)[0]) == null ? void 0 : y.date))), 1)
|
|
4152
4152
|
]),
|
|
4153
4153
|
l("div", qa, [
|
|
4154
4154
|
l("div", Ya, [
|
|
@@ -4159,7 +4159,7 @@ function mi(t, e, a, r, i, o) {
|
|
|
4159
4159
|
]),
|
|
4160
4160
|
l("div", ti, [
|
|
4161
4161
|
ai,
|
|
4162
|
-
l("span", null, S(((w = (
|
|
4162
|
+
l("span", null, S(((w = (g = i.activeTropicals) == null ? void 0 : g.history) == null ? void 0 : w.pressure) || "-") + "[hPa]", 1)
|
|
4163
4163
|
])
|
|
4164
4164
|
]),
|
|
4165
4165
|
l("div", ii, [
|
|
@@ -4212,7 +4212,7 @@ function mi(t, e, a, r, i, o) {
|
|
|
4212
4212
|
[Be, i.showTropicals && !t.$attrs.hideTropicalsLegend]
|
|
4213
4213
|
]);
|
|
4214
4214
|
}
|
|
4215
|
-
const tt = /* @__PURE__ */ T(Ua, [["render", mi], ["__scopeId", "data-v-
|
|
4215
|
+
const tt = /* @__PURE__ */ T(Ua, [["render", mi], ["__scopeId", "data-v-6751acd3"]]);
|
|
4216
4216
|
const ui = {
|
|
4217
4217
|
name: "IdmPrecip3h",
|
|
4218
4218
|
props: {
|
|
@@ -4895,7 +4895,7 @@ const vr = {
|
|
|
4895
4895
|
Gr
|
|
4896
4896
|
];
|
|
4897
4897
|
function Zr(t, e, a, r, i, o) {
|
|
4898
|
-
var n, s, c, h, d, p,
|
|
4898
|
+
var n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _, I, D, $, W, O, U, ae, de, pe, me, ue, ye, X, q, fe, Y, R, F, ge, Q, be, ie, re, oe, Se, ke, ze, Pe, Te, Ie, Ee;
|
|
4899
4899
|
return $e((L(), x("div", _r, [
|
|
4900
4900
|
l("div", wr, [
|
|
4901
4901
|
l("div", Lr, [
|
|
@@ -4909,11 +4909,11 @@ function Zr(t, e, a, r, i, o) {
|
|
|
4909
4909
|
l("div", Sr, [
|
|
4910
4910
|
l("div", kr, [
|
|
4911
4911
|
zr,
|
|
4912
|
-
l("span", null, S(((d = (h = a.meteo) == null ? void 0 : h.wind) == null ? void 0 : d.direction) || "-") + "/" + S(o.roundPrecision((
|
|
4912
|
+
l("span", null, S(((d = (h = a.meteo) == null ? void 0 : h.wind) == null ? void 0 : d.direction) || "-") + "/" + S(o.roundPrecision((f = (p = a.meteo) == null ? void 0 : p.wind) == null ? void 0 : f.kts, 1)) + "[kts]/" + S((b = (m = a.meteo) == null ? void 0 : m.wind) == null ? void 0 : b.scale) + "[BF]/" + S(o.roundPrecision((u = (y = a.meteo) == null ? void 0 : y.gusts) == null ? void 0 : u.kts, 1)) + "[kts]", 1)
|
|
4913
4913
|
]),
|
|
4914
4914
|
l("div", Pr, [
|
|
4915
4915
|
Tr,
|
|
4916
|
-
l("span", null, S(((w = (
|
|
4916
|
+
l("span", null, S(((w = (g = (v = a.meteo) == null ? void 0 : v.wave) == null ? void 0 : g.wd) == null ? void 0 : w.direction) || "-") + "/" + S(o.roundPrecision((I = (_ = (k = a.meteo) == null ? void 0 : k.wave) == null ? void 0 : _.wd) == null ? void 0 : I.height, 1)) + "[m]/" + S(o.roundPrecision((W = ($ = (D = a.meteo) == null ? void 0 : D.wave) == null ? void 0 : $.wd) == null ? void 0 : W.period, 1)) + "[s]", 1)
|
|
4917
4917
|
]),
|
|
4918
4918
|
l("div", Ir, [
|
|
4919
4919
|
Er,
|
|
@@ -6234,24 +6234,24 @@ const at = /* @__PURE__ */ T(No, [["render", jo], ["__scopeId", "data-v-51cc4052
|
|
|
6234
6234
|
var a, r, i, o, n, s, c, h, d, p;
|
|
6235
6235
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
6236
6236
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6237
|
-
const
|
|
6238
|
-
this.pointMarkers[
|
|
6237
|
+
const f = this.geojson.filter((u) => u.id === e.split("-")[0])[0];
|
|
6238
|
+
this.pointMarkers[f.id].filter((u) => {
|
|
6239
6239
|
var v;
|
|
6240
6240
|
return ((v = u._element) == null ? void 0 : v.id) === e;
|
|
6241
6241
|
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6242
|
-
let
|
|
6243
|
-
|
|
6242
|
+
let b;
|
|
6243
|
+
f.features.forEach((u, v) => {
|
|
6244
6244
|
if (u.geometry.type === "Point" && u.properties.id == e.split("-")[1]) {
|
|
6245
|
-
|
|
6245
|
+
b = v;
|
|
6246
6246
|
return;
|
|
6247
6247
|
}
|
|
6248
6248
|
});
|
|
6249
|
-
const
|
|
6249
|
+
const y = f.features.filter((u) => u.geometry.type === "Point");
|
|
6250
6250
|
this.handleTmpPointUpdate(
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
{ lng: (h = (c = t.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (p = (d = t.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat, properties:
|
|
6254
|
-
|
|
6251
|
+
f,
|
|
6252
|
+
y[b - 1],
|
|
6253
|
+
{ lng: (h = (c = t.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (p = (d = t.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat, properties: y[b].properties },
|
|
6254
|
+
b === y.length - 1 ? void 0 : y[b + 1]
|
|
6255
6255
|
);
|
|
6256
6256
|
}
|
|
6257
6257
|
},
|
|
@@ -6259,13 +6259,13 @@ const at = /* @__PURE__ */ T(No, [["render", jo], ["__scopeId", "data-v-51cc4052
|
|
|
6259
6259
|
var a, r, i, o, n, s, c, h, d, p;
|
|
6260
6260
|
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
6261
6261
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6262
|
-
const
|
|
6263
|
-
this.pointMarkers[
|
|
6262
|
+
const f = this.geojson.filter((y) => y.id === e.split("-")[0])[0];
|
|
6263
|
+
this.pointMarkers[f.id].filter((y) => {
|
|
6264
6264
|
var u;
|
|
6265
|
-
return ((u =
|
|
6265
|
+
return ((u = y._element) == null ? void 0 : u.id) === e;
|
|
6266
6266
|
})[0].setLngLat([(o = (i = t.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = t.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6267
|
-
const
|
|
6268
|
-
|
|
6267
|
+
const b = f.features.filter((y) => y.geometry.type === "Point" && y.properties.id == e.split("-")[1])[0];
|
|
6268
|
+
b.geometry.coordinates = [(h = (c = t.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (p = (d = t.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat], f.features = f.features.filter((y) => y.geometry.type === "Point"), this.handlePointUpdate(f);
|
|
6269
6269
|
}
|
|
6270
6270
|
},
|
|
6271
6271
|
handleContextmenu(t) {
|
|
@@ -6314,9 +6314,9 @@ const at = /* @__PURE__ */ T(No, [["render", jo], ["__scopeId", "data-v-51cc4052
|
|
|
6314
6314
|
for (let i = 1; i < e.length; i++) {
|
|
6315
6315
|
const o = e[i - 1], n = e[i], s = o.properties, c = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, h = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, d = je(c, h, s.mode === "RL", 2), p = Fe(c, h, s.mode === "RL", 2);
|
|
6316
6316
|
a = te.roundPrecision(a + d, 2);
|
|
6317
|
-
let
|
|
6318
|
-
s.mode === "RL" ?
|
|
6319
|
-
const m = C.lineString(
|
|
6317
|
+
let f;
|
|
6318
|
+
s.mode === "RL" ? f = we([c, h]) : f = we(Ve(c, h, 200));
|
|
6319
|
+
const m = C.lineString(f.map((b) => [b.lng, b.lat]));
|
|
6320
6320
|
m.properties.dist = d, m.properties.bearing = p, m.properties.total = a, r.push(m);
|
|
6321
6321
|
}
|
|
6322
6322
|
e.push(...r), t.total = a;
|
|
@@ -6331,16 +6331,16 @@ const at = /* @__PURE__ */ T(No, [["render", jo], ["__scopeId", "data-v-51cc4052
|
|
|
6331
6331
|
o = je(h, d, c.mode === "RL", 2), n = Fe(h, d, c.mode === "RL", 2);
|
|
6332
6332
|
let p;
|
|
6333
6333
|
c.mode === "RL" ? p = we([h, d]) : p = we(Ve(h, d, 200));
|
|
6334
|
-
const
|
|
6335
|
-
|
|
6334
|
+
const f = C.lineString(p.map((m) => [m.lng, m.lat]));
|
|
6335
|
+
f.properties.dist = o, f.properties.bearing = n, i.features.push(f);
|
|
6336
6336
|
}
|
|
6337
6337
|
if (r) {
|
|
6338
6338
|
const c = a.properties, h = a, d = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
6339
6339
|
o = je(h, d, c.mode === "RL", 2), n = Fe(h, d, c.mode === "RL", 2);
|
|
6340
6340
|
let p;
|
|
6341
6341
|
c.mode === "RL" ? p = we([h, d]) : p = we(Ve(h, d, 200));
|
|
6342
|
-
const
|
|
6343
|
-
|
|
6342
|
+
const f = C.lineString(p.map((m) => [m.lng, m.lat]));
|
|
6343
|
+
f.properties.dist = o, f.properties.bearing = n, i.features.push(f);
|
|
6344
6344
|
}
|
|
6345
6345
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
6346
6346
|
type: "geojson",
|
|
@@ -6452,11 +6452,11 @@ const at = /* @__PURE__ */ T(No, [["render", jo], ["__scopeId", "data-v-51cc4052
|
|
|
6452
6452
|
}
|
|
6453
6453
|
},
|
|
6454
6454
|
handleClear(t, e = !0) {
|
|
6455
|
-
var o, n, s, c, h, d, p,
|
|
6455
|
+
var o, n, s, c, h, d, p, f, m;
|
|
6456
6456
|
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
6457
|
-
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (n = this.map) != null && n.getLayer(i) && this.map.removeLayer(i), (s = this.map) != null && s.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (c = this.map) != null && c.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (h = this.closeMarkers[t.id]) == null || h.remove(), this.closeMarkers[t.id] = void 0, (d = this.pointMarkers[t.id]) == null || d.forEach((
|
|
6458
|
-
|
|
6459
|
-
}), this.pointMarkers[t.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((
|
|
6457
|
+
(o = this.map) != null && o.getLayer(r) && this.map.removeLayer(r), (n = this.map) != null && n.getLayer(i) && this.map.removeLayer(i), (s = this.map) != null && s.getLayer(this.tmpLayer) && this.map.removeLayer(this.tmpLayer), (c = this.map) != null && c.getLayer(this.tmpLabelLayer) && this.map.removeLayer(this.tmpLabelLayer), (h = this.closeMarkers[t.id]) == null || h.remove(), this.closeMarkers[t.id] = void 0, (d = this.pointMarkers[t.id]) == null || d.forEach((b) => {
|
|
6458
|
+
b == null || b.remove();
|
|
6459
|
+
}), this.pointMarkers[t.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((f = this.map) != null && f.getSource(a)) && this.map.removeSource(a), e && ((m = this.map) != null && m.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
6460
6460
|
}
|
|
6461
6461
|
}
|
|
6462
6462
|
};
|
|
@@ -6577,7 +6577,8 @@ const es = {
|
|
|
6577
6577
|
},
|
|
6578
6578
|
props: {
|
|
6579
6579
|
map: {
|
|
6580
|
-
type: Object
|
|
6580
|
+
type: Object,
|
|
6581
|
+
default: void 0
|
|
6581
6582
|
},
|
|
6582
6583
|
token: {
|
|
6583
6584
|
type: String
|
|
@@ -6629,8 +6630,10 @@ const es = {
|
|
|
6629
6630
|
},
|
|
6630
6631
|
map: {
|
|
6631
6632
|
handler() {
|
|
6632
|
-
|
|
6633
|
-
|
|
6633
|
+
this.map && (this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new Ge(this.map), this.handleRampColorInitial(), setTimeout(() => {
|
|
6634
|
+
var t, e, a, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v, g;
|
|
6635
|
+
this.activeWeatherLayers.length > 0 ? (console.log(1111, this.activeWeatherLayers.length, (e = this.map) == null ? void 0 : e.getLayer((t = this.viewport) == null ? void 0 : t.rampColorLayer)), (r = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || r.setLayoutProperty("visibility", "none"), (o = (i = this.map) == null ? void 0 : i.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || o.setLayoutProperty("visibility", "visible"), (n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id) && ((c = this.map) == null || c.moveLayer((s = this.viewport) == null ? void 0 : s.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((f = this.map) == null || f.moveLayer((p = this.viewport) == null ? void 0 : p.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (console.log(2222, this.activeWeatherLayers.length, (b = this.map) == null ? void 0 : b.getLayer((m = this.viewport) == null ? void 0 : m.rampColorLayer)), (u = (y = this.map) == null ? void 0 : y.getLayer(this.enc)) == null || u.setLayoutProperty("visibility", "visible"), (g = (v = this.map) == null ? void 0 : v.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || g.setLayoutProperty("visibility", "none"));
|
|
6636
|
+
}, 500));
|
|
6634
6637
|
},
|
|
6635
6638
|
immediate: !0
|
|
6636
6639
|
},
|
|
@@ -6642,10 +6645,10 @@ const es = {
|
|
|
6642
6645
|
},
|
|
6643
6646
|
activeWeatherLayers: {
|
|
6644
6647
|
handler() {
|
|
6645
|
-
var t, e, a, r, i, o, n, s, c, h, d, p,
|
|
6648
|
+
var t, e, a, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v, g;
|
|
6646
6649
|
if (!this.map)
|
|
6647
6650
|
return !1;
|
|
6648
|
-
this.activeWeatherLayers.length > 0 ? ((e = (t = this.
|
|
6651
|
+
this.activeWeatherLayers.length > 0 ? (console.log(3333, this.activeWeatherLayers.length, (e = this.map) == null ? void 0 : e.getLayer((t = this.viewport) == null ? void 0 : t.rampColorLayer)), (r = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || r.setLayoutProperty("visibility", "none"), (o = (i = this.map) == null ? void 0 : i.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || o.setLayoutProperty("visibility", "visible"), (n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id) && ((c = this.map) == null || c.moveLayer((s = this.viewport) == null ? void 0 : s.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((f = this.map) == null || f.moveLayer((p = this.viewport) == null ? void 0 : p.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : (console.log(444, this.activeWeatherLayers.length, (b = this.map) == null ? void 0 : b.getLayer((m = this.viewport) == null ? void 0 : m.rampColorLayer)), (u = (y = this.map) == null ? void 0 : y.getLayer(this.enc)) == null || u.setLayoutProperty("visibility", "visible"), (g = (v = this.map) == null ? void 0 : v.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || g.setLayoutProperty("visibility", "none"));
|
|
6649
6652
|
},
|
|
6650
6653
|
immediate: !0
|
|
6651
6654
|
}
|
|
@@ -6696,32 +6699,32 @@ const es = {
|
|
|
6696
6699
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
6697
6700
|
let a = 0, r = 0;
|
|
6698
6701
|
if (this.map) {
|
|
6699
|
-
const
|
|
6702
|
+
const f = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, m = (o = this.map) == null ? void 0 : o.getBounds(), b = `${m._sw.lng},${m._sw.lat},${m._ne.lng},${m._ne.lat}`;
|
|
6700
6703
|
if (this.handleRampColorState(), this.particleFactor) {
|
|
6701
|
-
const
|
|
6704
|
+
const y = Ue.WEATHER_LAYERS.find((u) => {
|
|
6702
6705
|
var v;
|
|
6703
6706
|
return ((v = u.peer) == null ? void 0 : v.weight) === this.particleFactor.weight;
|
|
6704
6707
|
});
|
|
6705
|
-
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight &
|
|
6708
|
+
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight & y.weight ? this.weatherWeight : this.weatherWeight + y.weight : this.weatherWeight = this.weatherWeight & y.weight ? this.weatherWeight - y.weight : this.weatherWeight;
|
|
6706
6709
|
}
|
|
6707
6710
|
if (this.weatherWeight > 0) {
|
|
6708
|
-
let
|
|
6709
|
-
if (t.tropicals || this.weatherWeight & 256 && (u = this.weatherLayers.tropicals, u && (
|
|
6710
|
-
const v = await se.get(`${this.gateway}/api/arc/weather/layers/links?l=${
|
|
6711
|
+
let y = this.weatherWeight, u;
|
|
6712
|
+
if (t.tropicals || this.weatherWeight & 256 && (u = this.weatherLayers.tropicals, u && (y -= 256, u.version = Math.random() + 1)), y > 0) {
|
|
6713
|
+
const v = await se.get(`${this.gateway}/api/arc/weather/layers/links?l=${y}&v=${this.source}&z=${f}&bbox=${b}&t=${this.ts}`, {
|
|
6711
6714
|
headers: {
|
|
6712
6715
|
Authorization: this.token || this.defaultMeteoToken
|
|
6713
6716
|
}
|
|
6714
6717
|
});
|
|
6715
6718
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather links elapsed: ", r, ", total: ", a += r), ((n = v == null ? void 0 : v.data) == null ? void 0 : n.code) === 0) {
|
|
6716
|
-
const
|
|
6717
|
-
for (const _ in
|
|
6718
|
-
_ === "ice-edge" && (
|
|
6719
|
-
se.get(
|
|
6719
|
+
const g = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data, w = [];
|
|
6720
|
+
for (const _ in g)
|
|
6721
|
+
_ === "ice-edge" && (g[_] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), _ !== "tropicals" && w.push(
|
|
6722
|
+
se.get(g[_], {
|
|
6720
6723
|
headers: {
|
|
6721
6724
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6722
6725
|
key: _
|
|
6723
6726
|
},
|
|
6724
|
-
responseType: /\.(jpg|png)$/.test(
|
|
6727
|
+
responseType: /\.(jpg|png)$/.test(g[_]) ? "blob" : "json"
|
|
6725
6728
|
}).catch((I) => {
|
|
6726
6729
|
console.log(`[${_}] fetch layer error: ${I}`);
|
|
6727
6730
|
})
|
|
@@ -6735,7 +6738,7 @@ const es = {
|
|
|
6735
6738
|
type: ((U = _ == null ? void 0 : _.config) == null ? void 0 : U.responseType) === "blob" ? "image" : "json",
|
|
6736
6739
|
etime: this.ts
|
|
6737
6740
|
});
|
|
6738
|
-
}),
|
|
6741
|
+
}), g.tropicals && se.get(g.tropicals, {
|
|
6739
6742
|
headers: {
|
|
6740
6743
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6741
6744
|
key: "tropicals"
|
|
@@ -6754,19 +6757,19 @@ const es = {
|
|
|
6754
6757
|
});
|
|
6755
6758
|
}
|
|
6756
6759
|
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + a), console.log("weather layers elapsed: ", r, ", total: ", a += r), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
6757
|
-
const
|
|
6760
|
+
const g = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw, w = (h = this.weatherLayers["swell-height"]) == null ? void 0 : h.raw;
|
|
6758
6761
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
6759
6762
|
type: "json",
|
|
6760
|
-
direction:
|
|
6763
|
+
direction: g,
|
|
6761
6764
|
height: { raw: w },
|
|
6762
6765
|
etime: this.ts
|
|
6763
6766
|
};
|
|
6764
6767
|
}
|
|
6765
6768
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
6766
|
-
const
|
|
6769
|
+
const g = (d = this.weatherLayers["current-direction"]) == null ? void 0 : d.raw, w = (p = this.weatherLayers["current-speed"]) == null ? void 0 : p.raw;
|
|
6767
6770
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
6768
6771
|
type: "json",
|
|
6769
|
-
direction:
|
|
6772
|
+
direction: g,
|
|
6770
6773
|
speed: { raw: w },
|
|
6771
6774
|
etime: this.ts
|
|
6772
6775
|
};
|
|
@@ -6804,9 +6807,9 @@ const es = {
|
|
|
6804
6807
|
);
|
|
6805
6808
|
const d = await Promise.all(h);
|
|
6806
6809
|
this.otherLayers = { enc: n }, d.map((p) => {
|
|
6807
|
-
var
|
|
6808
|
-
const
|
|
6809
|
-
this.otherLayers[m] =
|
|
6810
|
+
var b, y, u;
|
|
6811
|
+
const f = ((b = p == null ? void 0 : p.data) == null ? void 0 : b.data) || (p == null ? void 0 : p.data), m = (u = (y = p == null ? void 0 : p.config) == null ? void 0 : y.headers) == null ? void 0 : u.key;
|
|
6812
|
+
this.otherLayers[m] = f;
|
|
6810
6813
|
});
|
|
6811
6814
|
}
|
|
6812
6815
|
} else if (t.dayNight && o & 1024) {
|
|
@@ -6827,9 +6830,9 @@ const es = {
|
|
|
6827
6830
|
})
|
|
6828
6831
|
);
|
|
6829
6832
|
(await Promise.all(h)).map((p) => {
|
|
6830
|
-
var
|
|
6831
|
-
const
|
|
6832
|
-
this.otherLayers[m] =
|
|
6833
|
+
var b, y, u;
|
|
6834
|
+
const f = ((b = p == null ? void 0 : p.data) == null ? void 0 : b.data) || (p == null ? void 0 : p.data), m = (u = (y = p == null ? void 0 : p.config) == null ? void 0 : y.headers) == null ? void 0 : u.key;
|
|
6835
|
+
this.otherLayers[m] = f;
|
|
6833
6836
|
});
|
|
6834
6837
|
}
|
|
6835
6838
|
}
|
|
@@ -6884,36 +6887,36 @@ const es = {
|
|
|
6884
6887
|
);
|
|
6885
6888
|
},
|
|
6886
6889
|
handleDragEndWithZoom4Json() {
|
|
6887
|
-
var h, d, p,
|
|
6890
|
+
var h, d, p, f;
|
|
6888
6891
|
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
6889
6892
|
let e = 0, a = 0;
|
|
6890
6893
|
const r = (h = this.map) == null ? void 0 : h.getBounds(), i = this.map.getZoom(), o = Re(r._sw.lng), n = Re(r._ne.lng), s = Math.floor(r._sw.lat), c = Math.ceil(r._ne.lat);
|
|
6891
6894
|
for (const m in this.weatherLayers)
|
|
6892
6895
|
if (this.weatherLayers[m].active && this.weatherLayers[m].type === "json") {
|
|
6893
6896
|
this.weatherLayers[m].active = !1, this.weatherLayers[m].version = Math.random() + 1;
|
|
6894
|
-
let
|
|
6897
|
+
let b = [];
|
|
6895
6898
|
if (["swell", "current"].includes(m)) {
|
|
6896
|
-
const
|
|
6897
|
-
for (const u in
|
|
6899
|
+
const y = ((d = this.weatherLayers[m]) == null ? void 0 : d.direction) || {};
|
|
6900
|
+
for (const u in y)
|
|
6898
6901
|
if (u > s && u < c && (!(i <= this.zoom) || u % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6899
|
-
const v =
|
|
6900
|
-
o > n ? v.forEach((
|
|
6902
|
+
const v = y[u].lng;
|
|
6903
|
+
o > n ? v.forEach((g, w) => {
|
|
6901
6904
|
var k;
|
|
6902
|
-
if ((
|
|
6903
|
-
const _ = C.point([
|
|
6904
|
-
val:
|
|
6905
|
-
spd: (k =
|
|
6905
|
+
if ((g >= o && g <= 180 || g >= -180 && g <= n) && (!(i <= this.zoom) || g % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6906
|
+
const _ = C.point([g, u], {
|
|
6907
|
+
val: y[u].val[w],
|
|
6908
|
+
spd: (k = y[u].spd) == null ? void 0 : k[w]
|
|
6906
6909
|
});
|
|
6907
|
-
|
|
6910
|
+
b.push(_);
|
|
6908
6911
|
}
|
|
6909
|
-
}) : v.forEach((
|
|
6912
|
+
}) : v.forEach((g, w) => {
|
|
6910
6913
|
var k;
|
|
6911
|
-
if (
|
|
6912
|
-
const _ = C.point([
|
|
6913
|
-
val:
|
|
6914
|
-
spd: (k =
|
|
6914
|
+
if (g >= o && g <= n && (!(i <= this.zoom) || g % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6915
|
+
const _ = C.point([g, u], {
|
|
6916
|
+
val: y[u].val[w],
|
|
6917
|
+
spd: (k = y[u].spd) == null ? void 0 : k[w]
|
|
6915
6918
|
});
|
|
6916
|
-
|
|
6919
|
+
b.push(_);
|
|
6917
6920
|
}
|
|
6918
6921
|
});
|
|
6919
6922
|
}
|
|
@@ -6922,12 +6925,12 @@ const es = {
|
|
|
6922
6925
|
if (u) {
|
|
6923
6926
|
if (!u.data) {
|
|
6924
6927
|
const v = [];
|
|
6925
|
-
for (const
|
|
6926
|
-
const w = u.raw.LineString[
|
|
6928
|
+
for (const g in (p = u.raw) == null ? void 0 : p.LineString) {
|
|
6929
|
+
const w = u.raw.LineString[g];
|
|
6927
6930
|
for (const k of w)
|
|
6928
6931
|
v.push(
|
|
6929
6932
|
C.lineString(k, {
|
|
6930
|
-
val: Number(
|
|
6933
|
+
val: Number(g)
|
|
6931
6934
|
})
|
|
6932
6935
|
);
|
|
6933
6936
|
u.data = C.featureCollection(v);
|
|
@@ -6935,7 +6938,7 @@ const es = {
|
|
|
6935
6938
|
}
|
|
6936
6939
|
if (u.data) {
|
|
6937
6940
|
const v = this.handleBboxClip(u.data, r);
|
|
6938
|
-
|
|
6941
|
+
b = b.concat(v);
|
|
6939
6942
|
}
|
|
6940
6943
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("height elapsed: ", a, ", total: ", e += a);
|
|
6941
6944
|
}
|
|
@@ -6944,117 +6947,117 @@ const es = {
|
|
|
6944
6947
|
const u = this.weatherLayers[m].speed;
|
|
6945
6948
|
if (u) {
|
|
6946
6949
|
if (!u.data) {
|
|
6947
|
-
const
|
|
6948
|
-
for (const w in (
|
|
6950
|
+
const g = [];
|
|
6951
|
+
for (const w in (f = u.raw) == null ? void 0 : f.Polygon) {
|
|
6949
6952
|
const k = u.raw.Polygon[w];
|
|
6950
6953
|
for (const _ of k)
|
|
6951
|
-
|
|
6954
|
+
g.push(
|
|
6952
6955
|
C.polygon(_, {
|
|
6953
6956
|
val: Number(w)
|
|
6954
6957
|
})
|
|
6955
6958
|
);
|
|
6956
6959
|
}
|
|
6957
|
-
u.data = C.featureCollection(
|
|
6960
|
+
u.data = C.featureCollection(g);
|
|
6958
6961
|
}
|
|
6959
|
-
const v = i < this.zoom ? u.data.features.filter((
|
|
6960
|
-
|
|
6962
|
+
const v = i < this.zoom ? u.data.features.filter((g) => g.properties.val > 0.5) : u.data.features;
|
|
6963
|
+
b = b.concat(v), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("speed elapsed: ", a, ", total: ", e += a);
|
|
6961
6964
|
}
|
|
6962
6965
|
}
|
|
6963
6966
|
} else if (m === "wind") {
|
|
6964
|
-
const
|
|
6965
|
-
for (const u in
|
|
6967
|
+
const y = this.weatherLayers.wind.raw;
|
|
6968
|
+
for (const u in y)
|
|
6966
6969
|
if (u > s && u < c && (!(i <= this.zoom) || u % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6967
|
-
const v =
|
|
6968
|
-
o > n ? v.forEach((
|
|
6969
|
-
if ((
|
|
6970
|
-
const k = C.point([
|
|
6971
|
-
val:
|
|
6972
|
-
spd:
|
|
6970
|
+
const v = y[u].lng;
|
|
6971
|
+
o > n ? v.forEach((g, w) => {
|
|
6972
|
+
if ((g >= o && g <= 180 || g >= -180 && g <= n) && (!(i <= this.zoom) || g % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6973
|
+
const k = C.point([g, u], {
|
|
6974
|
+
val: y[u].val[w],
|
|
6975
|
+
spd: y[u].spd[w]
|
|
6973
6976
|
});
|
|
6974
|
-
|
|
6977
|
+
b.push(k);
|
|
6975
6978
|
}
|
|
6976
|
-
}) : v.forEach((
|
|
6977
|
-
if (
|
|
6978
|
-
const k = C.point([
|
|
6979
|
-
val:
|
|
6980
|
-
spd:
|
|
6979
|
+
}) : v.forEach((g, w) => {
|
|
6980
|
+
if (g >= o && g <= n && (!(i <= this.zoom) || g % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6981
|
+
const k = C.point([g, u], {
|
|
6982
|
+
val: y[u].val[w],
|
|
6983
|
+
spd: y[u].spd[w]
|
|
6981
6984
|
});
|
|
6982
|
-
|
|
6985
|
+
b.push(k);
|
|
6983
6986
|
}
|
|
6984
6987
|
});
|
|
6985
6988
|
}
|
|
6986
6989
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("wind barb elapsed: ", a, ", total: ", e += a);
|
|
6987
6990
|
} else if (m === "sig-wave-height") {
|
|
6988
6991
|
if (this.weatherLayers[m].data)
|
|
6989
|
-
|
|
6992
|
+
b = this.weatherLayers[m].data;
|
|
6990
6993
|
else {
|
|
6991
|
-
const
|
|
6992
|
-
if (
|
|
6994
|
+
const y = this.weatherLayers[m].raw;
|
|
6995
|
+
if (y) {
|
|
6993
6996
|
const u = [];
|
|
6994
|
-
for (const v in
|
|
6995
|
-
const
|
|
6996
|
-
for (const w of
|
|
6997
|
+
for (const v in y.Polygon) {
|
|
6998
|
+
const g = y.Polygon[v];
|
|
6999
|
+
for (const w of g)
|
|
6997
7000
|
u.push(
|
|
6998
7001
|
C.polygon(w, {
|
|
6999
7002
|
val: Number(v)
|
|
7000
7003
|
})
|
|
7001
7004
|
);
|
|
7002
7005
|
}
|
|
7003
|
-
|
|
7006
|
+
b = b.concat(u);
|
|
7004
7007
|
}
|
|
7005
7008
|
}
|
|
7006
7009
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("sigWave elapsed: ", a, ", total: ", e += a);
|
|
7007
7010
|
} else if (m === "prmsl") {
|
|
7008
7011
|
if (this.weatherLayers[m].data)
|
|
7009
|
-
|
|
7012
|
+
b = this.weatherLayers[m].data;
|
|
7010
7013
|
else {
|
|
7011
|
-
const
|
|
7012
|
-
if (
|
|
7014
|
+
const y = this.weatherLayers[m].raw;
|
|
7015
|
+
if (y) {
|
|
7013
7016
|
const u = [];
|
|
7014
|
-
for (const v in
|
|
7015
|
-
const
|
|
7016
|
-
for (const w of
|
|
7017
|
+
for (const v in y.LineString) {
|
|
7018
|
+
const g = y.LineString[v];
|
|
7019
|
+
for (const w of g)
|
|
7017
7020
|
u.push(
|
|
7018
7021
|
C.lineString(w, {
|
|
7019
7022
|
val: Number(v)
|
|
7020
7023
|
})
|
|
7021
7024
|
);
|
|
7022
7025
|
}
|
|
7023
|
-
for (const v in
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
C.point([
|
|
7027
|
-
val:
|
|
7028
|
-
type:
|
|
7026
|
+
for (const v in y.Point)
|
|
7027
|
+
y.Point[v].lng.forEach((g, w) => {
|
|
7028
|
+
g = Re(g), u.push(
|
|
7029
|
+
C.point([g, v], {
|
|
7030
|
+
val: y.Point[v].val[w],
|
|
7031
|
+
type: y.Point[v].type[w]
|
|
7029
7032
|
})
|
|
7030
7033
|
);
|
|
7031
7034
|
});
|
|
7032
|
-
|
|
7035
|
+
b = b.concat(u);
|
|
7033
7036
|
}
|
|
7034
7037
|
}
|
|
7035
7038
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("prmsl elapsed: ", a, ", total: ", e += a);
|
|
7036
7039
|
} else if (m === "arctic" || m === "iceberg") {
|
|
7037
7040
|
if (this.weatherLayers[m].data)
|
|
7038
|
-
|
|
7041
|
+
b = this.weatherLayers[m].data;
|
|
7039
7042
|
else {
|
|
7040
|
-
const
|
|
7041
|
-
if (
|
|
7043
|
+
const y = this.weatherLayers[m].raw;
|
|
7044
|
+
if (y) {
|
|
7042
7045
|
const u = [];
|
|
7043
|
-
for (const v in
|
|
7044
|
-
const
|
|
7045
|
-
for (const w of
|
|
7046
|
+
for (const v in y.LineString) {
|
|
7047
|
+
const g = y.LineString[v];
|
|
7048
|
+
for (const w of g)
|
|
7046
7049
|
u.push(
|
|
7047
7050
|
C.lineString(w, {
|
|
7048
7051
|
val: Number(v)
|
|
7049
7052
|
})
|
|
7050
7053
|
);
|
|
7051
7054
|
}
|
|
7052
|
-
|
|
7055
|
+
b = b.concat(u);
|
|
7053
7056
|
}
|
|
7054
7057
|
}
|
|
7055
7058
|
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e);
|
|
7056
7059
|
}
|
|
7057
|
-
console.log(m, " elapsed: ", a, ", total: ", e += a),
|
|
7060
|
+
console.log(m, " elapsed: ", a, ", total: ", e += a), b.length && (this.weatherLayers[m].data = C.featureCollection(b)), this.weatherLayers[m].active = !0, this.weatherLayers[m].version = Math.random() + 1;
|
|
7058
7061
|
}
|
|
7059
7062
|
},
|
|
7060
7063
|
handleDragEndWithZoom4Image() {
|
|
@@ -7087,8 +7090,8 @@ const es = {
|
|
|
7087
7090
|
this.handleBeforeLayerToggle();
|
|
7088
7091
|
},
|
|
7089
7092
|
handleBeforeLayerToggle() {
|
|
7090
|
-
var t, e, a, r, i, o, n, s, c, h, d, p,
|
|
7091
|
-
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (n = this.otherLayers) != null && n["time-zones"] || (s = this.otherLayers) != null && s.pirates || (c = this.otherLayers) != null && c.ports || (h = this.otherLayers) != null && h.enc || (d = this.otherLayers) != null && d["voluntary-reporting-area"] || (p = this.otherLayers) != null && p["eca-zones"] || (
|
|
7093
|
+
var t, e, a, r, i, o, n, s, c, h, d, p, f;
|
|
7094
|
+
(t = this.map) != null && t.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (a = this.otherLayers) != null && a["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (n = this.otherLayers) != null && n["time-zones"] || (s = this.otherLayers) != null && s.pirates || (c = this.otherLayers) != null && c.ports || (h = this.otherLayers) != null && h.enc || (d = this.otherLayers) != null && d["voluntary-reporting-area"] || (p = this.otherLayers) != null && p["eca-zones"] || (f = this.otherLayers) != null && f["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
7092
7095
|
},
|
|
7093
7096
|
handleDateChange(t = { tropicals: !1 }) {
|
|
7094
7097
|
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -7147,7 +7150,7 @@ const es = {
|
|
|
7147
7150
|
};
|
|
7148
7151
|
function as(t, e, a, r, i, o) {
|
|
7149
7152
|
var q, fe, Y, R, F, ge, Q, be, ie, re, oe, Se, ke, ze, Pe, Te, Ie, Ee, Oe, He, Ze, Xe, Je, qe, Ye, Qe;
|
|
7150
|
-
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"),
|
|
7153
|
+
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"), f = z("IdmTropicals"), m = z("IdmCurrents"), b = z("IdmCurrentParticle"), y = z("IdmWindBarb"), u = z("IdmWindParticle"), v = z("IdmPrecip3h"), g = z("IdmVisibility"), w = z("IdmWaterTemp"), k = z("IdmTemp"), _ = z("IdmArctic"), I = z("IdmWarZone"), D = z("IdmGmdssArea"), $ = z("IdmEcaZone"), W = z("IdmAlertZone"), O = z("IdmPort"), U = z("IdmLoadLine"), ae = z("IdmTimezone"), de = z("IdmVRA"), pe = z("IdmSpecialArea"), me = z("IdmTerminator"), ue = z("IdmLatLng"), ye = z("IdmMeasure"), X = z("IdmPoint");
|
|
7151
7154
|
return a.map ? (L(), x("div", ts, [
|
|
7152
7155
|
P(n, E({
|
|
7153
7156
|
ref: "layer",
|
|
@@ -7191,7 +7194,7 @@ function as(t, e, a, r, i, o) {
|
|
|
7191
7194
|
iceberg: (F = i.weatherLayers) == null ? void 0 : F.iceberg,
|
|
7192
7195
|
"before-layer": a.beforeLayer
|
|
7193
7196
|
}, t.$attrs), null, 16, ["map", "iceberg", "before-layer"]),
|
|
7194
|
-
P(
|
|
7197
|
+
P(f, E({
|
|
7195
7198
|
map: a.map,
|
|
7196
7199
|
date: a.ts,
|
|
7197
7200
|
tropicals: (ge = i.weatherLayers) == null ? void 0 : ge.tropicals,
|
|
@@ -7206,13 +7209,13 @@ function as(t, e, a, r, i, o) {
|
|
|
7206
7209
|
"toggle-version": i.toggleVersion,
|
|
7207
7210
|
"weather-layers": i.weatherLayers
|
|
7208
7211
|
}, t.$attrs, { onParticle: o.handleParticle }), null, 16, ["map", "current", "before-layer", "show-particle", "margin-bottom", "toggle-version", "weather-layers", "onParticle"]),
|
|
7209
|
-
P(
|
|
7212
|
+
P(b, E({
|
|
7210
7213
|
viewport: i.viewport,
|
|
7211
7214
|
factor: (be = i.weatherLayers) == null ? void 0 : be["current-particle"],
|
|
7212
7215
|
"before-layer": a.beforeLayer,
|
|
7213
7216
|
"toggle-version": i.toggleVersion
|
|
7214
7217
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7215
|
-
P(
|
|
7218
|
+
P(y, E({
|
|
7216
7219
|
ref: "windBarb",
|
|
7217
7220
|
map: a.map,
|
|
7218
7221
|
wind: (ie = i.weatherLayers) == null ? void 0 : ie.wind,
|
|
@@ -7237,7 +7240,7 @@ function as(t, e, a, r, i, o) {
|
|
|
7237
7240
|
"before-layer": a.beforeLayer,
|
|
7238
7241
|
"toggle-version": i.toggleVersion
|
|
7239
7242
|
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7240
|
-
P(
|
|
7243
|
+
P(g, E({
|
|
7241
7244
|
viewport: i.viewport,
|
|
7242
7245
|
factor: (ke = i.weatherLayers) == null ? void 0 : ke.visibility,
|
|
7243
7246
|
"before-layer": a.beforeLayer,
|