@idmwx/idmui-gl3 3.5.6 → 3.5.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 +940 -937
- package/dist/index.umd.cjs +11 -11
- package/dist/mapbox/src/components/weather/prmsl.vue.d.ts +1 -0
- package/dist/mapbox/src/index.vue.d.ts +21 -20
- package/dist/style.css +1 -1
- package/package.json +70 -70
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var rt = Object.defineProperty;
|
|
2
|
-
var ot = (
|
|
3
|
-
var
|
|
4
|
-
import { LayerHelper as Fe, CompanyHelper as Ve, LngLatHelper as K, convertToMonotonicLng2 as st, calculateDistance as
|
|
5
|
-
import { resolveComponent as z, openBlock as L, createElementBlock as x, createElementVNode as l, normalizeStyle as j, normalizeClass as M, Fragment as Ae, renderList as De, toDisplayString as S, createVNode as P, withCtx as nt, createTextVNode as Ke, createCommentVNode as N, pushScopeId as U, popScopeId as G, withDirectives as
|
|
2
|
+
var ot = (t, e, a) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
+
var E = (t, e, a) => (ot(t, typeof e != "symbol" ? e + "" : e, a), a);
|
|
4
|
+
import { LayerHelper as Fe, CompanyHelper as Ve, LngLatHelper as K, convertToMonotonicLng2 as st, calculateDistance as Oe, calculateBearing as We, convertToMonotonicLng as pe, interpolateCoordinates as je, convertToStandardLng as Re } from "@idmwx/idmwx-base";
|
|
5
|
+
import { resolveComponent as z, openBlock as L, createElementBlock as x, createElementVNode as l, normalizeStyle as j, normalizeClass as M, Fragment as Ae, renderList as De, toDisplayString as S, createVNode as P, withCtx as nt, createTextVNode as Ke, createCommentVNode as N, pushScopeId as U, popScopeId as G, withDirectives as Me, vShow as $e, createStaticVNode as lt, mergeProps as I } from "vue";
|
|
6
6
|
import * as C from "@turf/turf";
|
|
7
7
|
import ct from "@mapbox/sphericalmercator";
|
|
8
8
|
import Q from "moment";
|
|
9
9
|
import ie from "mapbox-gl";
|
|
10
10
|
import { TropicalHelper as et } from "@idm-plugin/geo";
|
|
11
11
|
import ae from "axios";
|
|
12
|
-
const T = (
|
|
13
|
-
const
|
|
12
|
+
const T = (t, e) => {
|
|
13
|
+
const a = t.__vccOpts || t;
|
|
14
14
|
for (const [r, i] of e)
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
a[r] = i;
|
|
16
|
+
return a;
|
|
17
17
|
}, ht = {
|
|
18
18
|
name: "IdmGlLayer",
|
|
19
19
|
props: {
|
|
@@ -66,8 +66,8 @@ const T = (a, e) => {
|
|
|
66
66
|
},
|
|
67
67
|
computed: {
|
|
68
68
|
computeLayerClass() {
|
|
69
|
-
return function(
|
|
70
|
-
return
|
|
69
|
+
return function(t, e) {
|
|
70
|
+
return t.enabled ? e.some((a) => a.key === t.key) ? "layer active" : "layer" : "layer disabled";
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
},
|
|
@@ -75,51 +75,52 @@ const T = (a, e) => {
|
|
|
75
75
|
showLayers: {
|
|
76
76
|
handler() {
|
|
77
77
|
this.$nextTick(() => {
|
|
78
|
-
var
|
|
79
|
-
this.$emit("menu", this.showLayers ? !1 : this.toggleMenu), this.$emit("toggleVersion", Math.random()), this.right = (((
|
|
78
|
+
var t, e;
|
|
79
|
+
this.$emit("menu", this.showLayers ? !1 : this.toggleMenu), this.$emit("toggleVersion", Math.random()), this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
toggleMenu: {
|
|
84
84
|
handler() {
|
|
85
85
|
this.$nextTick(() => {
|
|
86
|
-
var
|
|
87
|
-
this.showLayers = this.toggleMenu ? !1 : this.showLayers, this.$emit("toggleVersion", Math.random()), this.right = (((
|
|
86
|
+
var t, e;
|
|
87
|
+
this.showLayers = this.toggleMenu ? !1 : this.showLayers, this.$emit("toggleVersion", Math.random()), this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
mounted() {
|
|
93
|
-
const
|
|
94
|
-
this.version.v !==
|
|
93
|
+
const t = localStorage.getItem(this.version.k);
|
|
94
|
+
this.version.v !== t && (localStorage.removeItem(this.weatherLayersCache), localStorage.setItem(this.version.k, this.version.v));
|
|
95
95
|
let e = localStorage.getItem(this.autoActiveCache);
|
|
96
96
|
this.autoActive = e !== "false", e = localStorage.getItem(this.weatherLayersCache);
|
|
97
|
-
let
|
|
97
|
+
let a = JSON.parse(
|
|
98
98
|
e || '[{"weight":1,"name":"Wind","key":"wind","enabled":true,"type":"json","particle":true},{"weight":4096,"name":"Pressure","key":"prmsl","enabled":true,"type":"json"},{"weight":256,"name":"Tropicals","key":"tropicals","enabled":true,"type":"json"}]'
|
|
99
99
|
);
|
|
100
|
-
this.weatherLayers =
|
|
101
|
-
e || '[{"weight":2048,"name":"ENC","key":"enc","enabled":true,"type":"json"},{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'
|
|
102
|
-
|
|
100
|
+
this.weatherLayers = a, this.autoActive && (this.activeWeatherLayers = [...a]), e = localStorage.getItem(this.otherLayersCache), a = JSON.parse(
|
|
101
|
+
e || // '[{"weight":2048,"name":"ENC","key":"enc","enabled":true,"type":"json"},{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]',
|
|
102
|
+
'[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'
|
|
103
|
+
), this.otherLayers = a, e = localStorage.getItem(this.sourceCache), this.source = e || "GFS", this.handleConfirm();
|
|
103
104
|
},
|
|
104
105
|
methods: {
|
|
105
106
|
handleConfirm() {
|
|
106
107
|
this.$emit("weather", this.weatherLayers, this.activeWeatherLayers, this.source), this.$emit("other", this.otherLayers), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
107
108
|
},
|
|
108
|
-
handleWeatherLayerPick(
|
|
109
|
-
this.weatherLayers.some((e) => e.key ===
|
|
109
|
+
handleWeatherLayerPick(t) {
|
|
110
|
+
this.weatherLayers.some((e) => e.key === t.key) ? (this.weatherLayers = this.weatherLayers.filter((e) => e.key !== t.key), this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !== t.key)) : this.weatherLayers.length < 12 && t.enabled && (["png", "jpg"].includes(t.type) && (this.weatherLayers = this.weatherLayers.filter((e) => e.type === "json"), this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.type === "json")), this.weatherLayers.push(t), this.activeWeatherLayers.push(t)), localStorage.setItem(this.weatherLayersCache, JSON.stringify(this.weatherLayers)), this.$emit("weather", this.weatherLayers, this.activeWeatherLayers, this.source), localStorage.setItem(this.autoActiveCache, this.autoActive), localStorage.setItem(this.sourceCache, this.source);
|
|
110
111
|
},
|
|
111
|
-
handleActiveWeatherLayerPick(
|
|
112
|
-
if (this.activeWeatherLayers.some((e) => e.key ===
|
|
113
|
-
this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !==
|
|
114
|
-
else if (
|
|
115
|
-
this.activeWeatherLayers.push(
|
|
112
|
+
handleActiveWeatherLayerPick(t) {
|
|
113
|
+
if (this.activeWeatherLayers.some((e) => e.key === t.key))
|
|
114
|
+
this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !== t.key);
|
|
115
|
+
else if (t.enabled) {
|
|
116
|
+
this.activeWeatherLayers.push(t);
|
|
116
117
|
for (const e of this.weatherLayers)
|
|
117
|
-
|
|
118
|
+
t.weight > e.weight && t.weight & e.weight && this.activeWeatherLayers.push(e);
|
|
118
119
|
}
|
|
119
120
|
this.$emit("weather", this.weatherLayers, this.activeWeatherLayers, this.source);
|
|
120
121
|
},
|
|
121
|
-
handleOtherLayerPick(
|
|
122
|
-
this.otherLayers.some((e) => e.key ===
|
|
122
|
+
handleOtherLayerPick(t) {
|
|
123
|
+
this.otherLayers.some((e) => e.key === t.key) ? this.otherLayers = this.otherLayers.filter((e) => e.key !== t.key) : t.enabled && this.otherLayers.push(t), localStorage.setItem(this.otherLayersCache, JSON.stringify(this.otherLayers)), this.$emit("other", this.otherLayers);
|
|
123
124
|
},
|
|
124
125
|
handleMenuToggle() {
|
|
125
126
|
this.showLayers = !this.showLayers;
|
|
@@ -136,11 +137,11 @@ const T = (a, e) => {
|
|
|
136
137
|
handle3DToggle() {
|
|
137
138
|
this.show3d = !this.show3d, this.$emit("3d", this.show3d);
|
|
138
139
|
},
|
|
139
|
-
handleSourceToggle(
|
|
140
|
-
this.source =
|
|
140
|
+
handleSourceToggle(t) {
|
|
141
|
+
this.source = t, this.handleConfirm();
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
}, Z = (
|
|
144
|
+
}, Z = (t) => (U("data-v-bcc04bb5"), t = t(), G(), t), dt = { class: "idm-gl-layer" }, pt = { class: "bar-item layer-bars" }, mt = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "", -1)), ut = [
|
|
144
145
|
mt
|
|
145
146
|
], yt = { class: "bar-item tool-bars" }, ft = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "", -1)), gt = [
|
|
146
147
|
ft
|
|
@@ -155,13 +156,13 @@ const T = (a, e) => {
|
|
|
155
156
|
], Pt = { class: "weather-layers" }, Tt = {
|
|
156
157
|
class: "layers-title",
|
|
157
158
|
style: { display: "flex", "align-items": "center", "justify-content": "space-between" }
|
|
158
|
-
}, It = { style: { "font-size": "12px" } }, Et = { class: "layers-body" }, Rt = ["onClick"], At = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("div", { class: "checkbox" }, null, -1)), Dt = { class: "other-layers" },
|
|
159
|
-
function Ft(
|
|
159
|
+
}, It = { style: { "font-size": "12px" } }, Et = { class: "layers-body" }, Rt = ["onClick"], At = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("div", { class: "checkbox" }, null, -1)), Dt = { class: "other-layers" }, Mt = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("div", { class: "layers-title" }, "Other Layers", -1)), $t = { class: "layers-body" }, Bt = ["onClick"], Nt = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("div", { class: "checkbox" }, null, -1)), Ot = { class: "source-layers" }, Wt = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("span", { class: "layers-title" }, "Forecast Model", -1)), jt = { class: "layers-body model-box" };
|
|
160
|
+
function Ft(t, e, a, r, i, o) {
|
|
160
161
|
const n = z("ElScrollbar");
|
|
161
162
|
return L(), x("div", dt, [
|
|
162
163
|
l("div", {
|
|
163
164
|
class: "menu-bar-box",
|
|
164
|
-
style: j({ top:
|
|
165
|
+
style: j({ top: a.top + 10 + "px", right: i.right + "px" })
|
|
165
166
|
}, [
|
|
166
167
|
l("div", pt, [
|
|
167
168
|
l("div", {
|
|
@@ -172,7 +173,7 @@ function Ft(a, e, t, r, i, o) {
|
|
|
172
173
|
], 4),
|
|
173
174
|
l("div", {
|
|
174
175
|
class: "menu-bar-box",
|
|
175
|
-
style: j({ top:
|
|
176
|
+
style: j({ top: a.top + 160 + "px", right: i.right + "px" })
|
|
176
177
|
}, [
|
|
177
178
|
l("div", yt, [
|
|
178
179
|
l("div", {
|
|
@@ -208,7 +209,7 @@ function Ft(a, e, t, r, i, o) {
|
|
|
208
209
|
], 4),
|
|
209
210
|
l("div", {
|
|
210
211
|
class: "available-layers flex-center",
|
|
211
|
-
style: j({ top:
|
|
212
|
+
style: j({ top: a.top + "px", right: i.showLayers ? "0px" : "-240px" })
|
|
212
213
|
}, [
|
|
213
214
|
l("div", {
|
|
214
215
|
class: "side-bar",
|
|
@@ -243,8 +244,8 @@ function Ft(a, e, t, r, i, o) {
|
|
|
243
244
|
])
|
|
244
245
|
]),
|
|
245
246
|
l("div", Dt, [
|
|
246
|
-
|
|
247
|
-
l("div",
|
|
247
|
+
Mt,
|
|
248
|
+
l("div", $t, [
|
|
248
249
|
(L(!0), x(Ae, null, De(i.layers.other, (s) => (L(), x("div", {
|
|
249
250
|
key: s.key,
|
|
250
251
|
class: M(o.computeLayerClass(s, i.otherLayers)),
|
|
@@ -255,8 +256,8 @@ function Ft(a, e, t, r, i, o) {
|
|
|
255
256
|
], 10, Bt))), 128))
|
|
256
257
|
])
|
|
257
258
|
]),
|
|
258
|
-
l("div",
|
|
259
|
-
|
|
259
|
+
l("div", Ot, [
|
|
260
|
+
Wt,
|
|
260
261
|
l("div", jt, [
|
|
261
262
|
l("span", {
|
|
262
263
|
class: M(i.source === "GFS" ? "text active" : "text"),
|
|
@@ -275,7 +276,7 @@ function Ft(a, e, t, r, i, o) {
|
|
|
275
276
|
], 4)
|
|
276
277
|
]);
|
|
277
278
|
}
|
|
278
|
-
const Vt = /* @__PURE__ */ T(ht, [["render", Ft], ["__scopeId", "data-v-
|
|
279
|
+
const Vt = /* @__PURE__ */ T(ht, [["render", Ft], ["__scopeId", "data-v-bcc04bb5"]]);
|
|
279
280
|
const Ut = {
|
|
280
281
|
name: "IdmWindBarb",
|
|
281
282
|
props: {
|
|
@@ -325,8 +326,8 @@ const Ut = {
|
|
|
325
326
|
watch: {
|
|
326
327
|
"wind.version": {
|
|
327
328
|
handler() {
|
|
328
|
-
var
|
|
329
|
-
(
|
|
329
|
+
var t;
|
|
330
|
+
(t = this.wind) != null && t.active && this.showFeather ? this.handleRender() : this.handleClear();
|
|
330
331
|
},
|
|
331
332
|
deep: !0
|
|
332
333
|
},
|
|
@@ -344,22 +345,22 @@ const Ut = {
|
|
|
344
345
|
},
|
|
345
346
|
toggleVersion: {
|
|
346
347
|
handler() {
|
|
347
|
-
var
|
|
348
|
-
this.right = (((
|
|
348
|
+
var t, e;
|
|
349
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
349
350
|
},
|
|
350
351
|
immediate: !0
|
|
351
352
|
},
|
|
352
353
|
"current.version": {
|
|
353
354
|
handler() {
|
|
354
|
-
var
|
|
355
|
-
this.bottom = (
|
|
355
|
+
var t, e, a;
|
|
356
|
+
this.bottom = (t = this.current) != null && t.active ? (((e = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : e.clientHeight) || 0) + 135 : (((a = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : a.clientHeight) || 0) + 105;
|
|
356
357
|
},
|
|
357
358
|
immediate: !0
|
|
358
359
|
},
|
|
359
360
|
weatherLayers: {
|
|
360
361
|
handler() {
|
|
361
|
-
var
|
|
362
|
-
this.bottom = (
|
|
362
|
+
var t, e, a;
|
|
363
|
+
this.bottom = (t = this.current) != null && t.active ? (((e = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : e.clientHeight) || 0) + 135 : (((a = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : a.clientHeight) || 0) + 105;
|
|
363
364
|
},
|
|
364
365
|
immediate: !0
|
|
365
366
|
}
|
|
@@ -369,7 +370,7 @@ const Ut = {
|
|
|
369
370
|
this.$emit("particle", { particle: !this.showParticle, key: "wind", weight: 1 });
|
|
370
371
|
},
|
|
371
372
|
handleRender() {
|
|
372
|
-
var
|
|
373
|
+
var t, e, a, r;
|
|
373
374
|
if (!this.map)
|
|
374
375
|
setTimeout(() => {
|
|
375
376
|
this.handleRender();
|
|
@@ -377,12 +378,12 @@ const Ut = {
|
|
|
377
378
|
else if (this.wind) {
|
|
378
379
|
const i = (/* @__PURE__ */ new Date()).valueOf();
|
|
379
380
|
let o = 0, n = 0, s = this.empty;
|
|
380
|
-
if ((
|
|
381
|
+
if ((t = this.wind) != null && t.active && (s = (e = this.wind) == null ? void 0 : e.data), (a = this.map) != null && a.getSource(this.source))
|
|
381
382
|
(r = this.map) == null || r.getSource(this.source).setData(s), n = (/* @__PURE__ */ new Date()).valueOf() - (i + o), console.log("[wind] update elapsed: ", n, ", total: ", o += n);
|
|
382
383
|
else {
|
|
383
384
|
this.map.addSource(this.source, { type: "geojson", data: s });
|
|
384
385
|
for (let c = 0; c < (this.barbs ?? []).length - 1; c++) {
|
|
385
|
-
const h = (this.barbs ?? [])[c] || 0,
|
|
386
|
+
const h = (this.barbs ?? [])[c] || 0, p = (this.barbs ?? [])[c + 1] || 0, d = h < 10 ? `00${h}kts` : h < 100 ? `0${h}kts` : `${h}kts`;
|
|
386
387
|
this.map.addLayer(
|
|
387
388
|
{
|
|
388
389
|
id: d,
|
|
@@ -392,7 +393,7 @@ const Ut = {
|
|
|
392
393
|
// @ts-ignore
|
|
393
394
|
[">=", "spd", h],
|
|
394
395
|
// @ts-ignore
|
|
395
|
-
["<", "spd",
|
|
396
|
+
["<", "spd", p]
|
|
396
397
|
],
|
|
397
398
|
source: this.source,
|
|
398
399
|
layout: {
|
|
@@ -427,14 +428,14 @@ const Ut = {
|
|
|
427
428
|
if (!this.windBarbLoaded)
|
|
428
429
|
this.handleRender();
|
|
429
430
|
else
|
|
430
|
-
for (const
|
|
431
|
-
const e =
|
|
431
|
+
for (const t of this.barbs ?? []) {
|
|
432
|
+
const e = t < 10 ? `00${t}kts` : t < 100 ? `0${t}kts` : `${t}kts`;
|
|
432
433
|
this.map.getLayer(e) && this.map.setLayoutProperty(e, "visibility", this.showFeather ? "visible" : "none");
|
|
433
434
|
}
|
|
434
435
|
},
|
|
435
436
|
handleClear() {
|
|
436
|
-
for (const
|
|
437
|
-
const e =
|
|
437
|
+
for (const t of this.barbs ?? []) {
|
|
438
|
+
const e = t < 10 ? `00${t}kts` : t < 100 ? `0${t}kts` : `${t}kts`;
|
|
438
439
|
this.map.getLayer(e) && this.map.removeLayer(e);
|
|
439
440
|
}
|
|
440
441
|
this.map.getSource(this.source) && this.map.removeSource(this.source), this.windBarbLoaded = !1;
|
|
@@ -453,9 +454,9 @@ const Ut = {
|
|
|
453
454
|
key: 1,
|
|
454
455
|
class: "iconfont"
|
|
455
456
|
};
|
|
456
|
-
function qt(
|
|
457
|
+
function qt(t, e, a, r, i, o) {
|
|
457
458
|
var n;
|
|
458
|
-
return (n =
|
|
459
|
+
return (n = a.wind) != null && n.active ? (L(), x("div", Gt, [
|
|
459
460
|
l("div", {
|
|
460
461
|
class: "flex-center tool-bars",
|
|
461
462
|
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
@@ -464,12 +465,12 @@ function qt(a, e, t, r, i, o) {
|
|
|
464
465
|
class: "flex-start",
|
|
465
466
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
466
467
|
}, [
|
|
467
|
-
|
|
468
|
+
a.showParticle ? (L(), x("i", Ht, "")) : (L(), x("i", Zt, "")),
|
|
468
469
|
l("span", {
|
|
469
|
-
class: M(
|
|
470
|
+
class: M(a.showParticle ? "active" : "")
|
|
470
471
|
}, "Wind Particles", 2)
|
|
471
472
|
]),
|
|
472
|
-
|
|
473
|
+
a.showParticle ? (L(), x("div", {
|
|
473
474
|
key: 0,
|
|
474
475
|
class: "flex-start",
|
|
475
476
|
style: { "margin-left": "16px" },
|
|
@@ -486,15 +487,15 @@ function qt(a, e, t, r, i, o) {
|
|
|
486
487
|
const Yt = /* @__PURE__ */ T(Ut, [["render", qt], ["__scopeId", "data-v-f285f28f"]]);
|
|
487
488
|
class Ue {
|
|
488
489
|
constructor(e) {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
490
|
+
E(this, "map");
|
|
491
|
+
E(this, "mercator");
|
|
492
|
+
E(this, "rampColorLayer");
|
|
493
|
+
E(this, "rampColorSource");
|
|
494
|
+
E(this, "particleLayer");
|
|
495
|
+
E(this, "particleSource");
|
|
496
|
+
E(this, "rampColorCanvas");
|
|
497
|
+
E(this, "particleCanvas");
|
|
498
|
+
E(this, "ratio");
|
|
498
499
|
this.map = e, this.mercator = new ct(), this.rampColorLayer = "ramp-color-layer", this.rampColorSource = "ramp-color-source", this.particleLayer = "particle-layer", this.particleSource = "particle-source", this.rampColorCanvas = document.createElement("canvas"), this.particleCanvas = document.createElement("canvas"), this.ratio = window.devicePixelRatio;
|
|
499
500
|
}
|
|
500
501
|
/**
|
|
@@ -502,8 +503,8 @@ class Ue {
|
|
|
502
503
|
* @param lng
|
|
503
504
|
* @param n
|
|
504
505
|
*/
|
|
505
|
-
convertNLng(e,
|
|
506
|
-
return e > 180 ? this.convertNLng(e - 360,
|
|
506
|
+
convertNLng(e, a = 0) {
|
|
507
|
+
return e > 180 ? this.convertNLng(e - 360, a + 1) : e < -180 ? this.convertNLng(e + 360, a + 1) : [e, a];
|
|
507
508
|
}
|
|
508
509
|
/**
|
|
509
510
|
* [4326坐标]
|
|
@@ -529,29 +530,29 @@ class Ue {
|
|
|
529
530
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
530
531
|
*/
|
|
531
532
|
getBoundPixel() {
|
|
532
|
-
const e = this.map.getBounds(),
|
|
533
|
-
return [d,
|
|
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, p] = this.mercator.px([o, r[1]], a), [d, y] = this.mercator.px([s, i[1]], a), u = Math.round(this.mercator.size * Math.pow(2, a) * (n + c));
|
|
534
|
+
return [d, y, h + u, p];
|
|
534
535
|
}
|
|
535
536
|
/**
|
|
536
537
|
* [视窗边界像素宽度]
|
|
537
538
|
*/
|
|
538
539
|
getBoundRange() {
|
|
539
|
-
const e = this.map.getZoom() + 1,
|
|
540
|
-
return [r[0] /
|
|
540
|
+
const e = this.map.getZoom() + 1, a = this.mercator.size * Math.pow(2, e), r = this.getBoundPixel();
|
|
541
|
+
return [r[0] / a, r[2] / a, r[3] / a, r[1] / a];
|
|
541
542
|
}
|
|
542
543
|
/**
|
|
543
544
|
* 获取视窗世界(多世界复本)
|
|
544
545
|
* @param pixels
|
|
545
546
|
* @param zoom
|
|
546
547
|
*/
|
|
547
|
-
getWorldCopy(e,
|
|
548
|
-
const r = 2 **
|
|
549
|
-
for (let
|
|
548
|
+
getWorldCopy(e, a) {
|
|
549
|
+
const r = 2 ** a, [i, o, n, s] = e.map((p) => ~~(p / (r * 256))), c = [];
|
|
550
|
+
for (let p = s; p <= o; p++)
|
|
550
551
|
for (let d = i; d <= n; d++)
|
|
551
|
-
c.push([d,
|
|
552
|
-
return c.map((
|
|
553
|
-
const d = 2 **
|
|
554
|
-
return [
|
|
552
|
+
c.push([d, p]);
|
|
553
|
+
return c.map((p) => {
|
|
554
|
+
const d = 2 ** a * 256;
|
|
555
|
+
return [p[0] * d, p[1] * d, d];
|
|
555
556
|
});
|
|
556
557
|
}
|
|
557
558
|
resize() {
|
|
@@ -559,12 +560,12 @@ class Ue {
|
|
|
559
560
|
e.setCoordinates(this.getBoundLngLat()), e = this.map.getSource(this.particleSource), e.setCoordinates(this.getBoundLngLat()), this.rampColorCanvas.width = this.map._canvas.clientWidth, this.rampColorCanvas.height = this.map._canvas.clientHeight, this.particleCanvas.width = this.map._canvas.clientWidth, this.particleCanvas.height = this.map._canvas.clientHeight;
|
|
560
561
|
}
|
|
561
562
|
toggle(e) {
|
|
562
|
-
const
|
|
563
|
-
|
|
563
|
+
const a = this.map.getLayoutProperty(this.rampColorLayer, "visibility"), r = e ? "visible" : "none";
|
|
564
|
+
a !== r && this.map.setLayoutProperty(this.rampColorLayer, "visibility", r);
|
|
564
565
|
}
|
|
565
566
|
toggleParticle(e) {
|
|
566
|
-
const
|
|
567
|
-
|
|
567
|
+
const a = this.map.getLayoutProperty(this.particleLayer, "visibility"), r = e ? "visible" : "none";
|
|
568
|
+
a !== r && this.map.setLayoutProperty(this.particleLayer, "visibility", r);
|
|
568
569
|
}
|
|
569
570
|
}
|
|
570
571
|
class le {
|
|
@@ -575,8 +576,8 @@ class le {
|
|
|
575
576
|
* @param type [VERTEX_SHADER, FRAGMENT_SHADER]
|
|
576
577
|
* @param schema 着色器渲染代码[GLSL]
|
|
577
578
|
*/
|
|
578
|
-
createShader(e,
|
|
579
|
-
const i = e.createShader(
|
|
579
|
+
createShader(e, a, r) {
|
|
580
|
+
const i = e.createShader(a);
|
|
580
581
|
if (i && (e.shaderSource(i, r), e.compileShader(i), !e.getShaderParameter(i, e.COMPILE_STATUS)))
|
|
581
582
|
throw new Error(e.getShaderInfoLog(i) || "error happened while create shader...");
|
|
582
583
|
return i;
|
|
@@ -592,9 +593,9 @@ class le {
|
|
|
592
593
|
* @param width??
|
|
593
594
|
* @param height??
|
|
594
595
|
*/
|
|
595
|
-
createTexture(e,
|
|
596
|
+
createTexture(e, a, r, i, o, n, s) {
|
|
596
597
|
const c = e.createTexture();
|
|
597
|
-
return e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER,
|
|
598
|
+
return e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, a), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, i), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, i), o instanceof Uint8Array ? e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, n, s, 0, e.RGBA, e.UNSIGNED_BYTE, o) : e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, o), e.bindTexture(e.TEXTURE_2D, null), c;
|
|
598
599
|
}
|
|
599
600
|
/**
|
|
600
601
|
* 创建数据资源
|
|
@@ -603,10 +604,10 @@ class le {
|
|
|
603
604
|
* element: ELEMENT_ARRAY_BUFFER
|
|
604
605
|
* @param resource 顶点数据
|
|
605
606
|
*/
|
|
606
|
-
createDataBuffer(e,
|
|
607
|
+
createDataBuffer(e, a, r) {
|
|
607
608
|
if (e) {
|
|
608
609
|
const i = e.createBuffer();
|
|
609
|
-
return
|
|
610
|
+
return a === "array" ? (e.bindBuffer(e.ARRAY_BUFFER, i), r && e.bufferData(e.ARRAY_BUFFER, r, e.STATIC_DRAW)) : a === "element" && (e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, i), r && e.bufferData(e.ELEMENT_ARRAY_BUFFER, r, e.STATIC_DRAW)), i;
|
|
610
611
|
}
|
|
611
612
|
return null;
|
|
612
613
|
}
|
|
@@ -616,8 +617,8 @@ class le {
|
|
|
616
617
|
* @param vertexSchema
|
|
617
618
|
* @param fragmentSchema
|
|
618
619
|
*/
|
|
619
|
-
createProgram(e,
|
|
620
|
-
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER,
|
|
620
|
+
createProgram(e, a, r) {
|
|
621
|
+
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, a), n = this.createShader(e, e.FRAGMENT_SHADER, r);
|
|
621
622
|
if (i && o && n && (e.attachShader(i, o), e.attachShader(i, n), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)))
|
|
622
623
|
throw new Error(e.getProgramInfoLog(i) || "error happened while creating ramp color program");
|
|
623
624
|
return i;
|
|
@@ -628,8 +629,8 @@ class le {
|
|
|
628
629
|
* @param vertexSchema
|
|
629
630
|
* @param fragmentSchema
|
|
630
631
|
*/
|
|
631
|
-
createProgramWrapper(e,
|
|
632
|
-
const i = this.createProgram(e,
|
|
632
|
+
createProgramWrapper(e, a, r) {
|
|
633
|
+
const i = this.createProgram(e, a, r);
|
|
633
634
|
if (i) {
|
|
634
635
|
const o = { program: i }, n = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
635
636
|
for (let c = 0; c < n; c++) {
|
|
@@ -648,14 +649,14 @@ class le {
|
|
|
648
649
|
* 初始化渐变色纹理
|
|
649
650
|
* @param colors
|
|
650
651
|
*/
|
|
651
|
-
setup(e,
|
|
652
|
+
setup(e, a, r = !1, i, o) {
|
|
652
653
|
const n = document.createElement("canvas");
|
|
653
654
|
n.width = 256, n.height = 1;
|
|
654
655
|
const s = n.getContext("2d");
|
|
655
656
|
if (s && e) {
|
|
656
657
|
const c = s == null ? void 0 : s.createLinearGradient(0, 0, 256, 0);
|
|
657
|
-
return
|
|
658
|
-
c.addColorStop(h,
|
|
658
|
+
return a.forEach(([h, p]) => {
|
|
659
|
+
c.addColorStop(h, p);
|
|
659
660
|
}), s.fillStyle = c, s.fillRect(0, 0, 256, 1), {
|
|
660
661
|
canvas: n,
|
|
661
662
|
texture: this.createTexture(
|
|
@@ -670,18 +671,18 @@ class le {
|
|
|
670
671
|
};
|
|
671
672
|
}
|
|
672
673
|
}
|
|
673
|
-
setupParticle(e,
|
|
674
|
-
const r = Math.ceil(Math.sqrt(
|
|
675
|
-
for (let
|
|
676
|
-
o[
|
|
674
|
+
setupParticle(e, a = 1e3) {
|
|
675
|
+
const r = Math.ceil(Math.sqrt(a)), i = r * r, o = new Uint8Array(i * 4);
|
|
676
|
+
for (let p = 0; p < o.length; p++)
|
|
677
|
+
o[p] = Math.floor(Math.random() * 256);
|
|
677
678
|
const n = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), s = this.createTexture(e, e.NEAREST, e.NEAREST, e.CLAMP_TO_EDGE, o, r, r), c = new Float32Array(i);
|
|
678
|
-
for (let
|
|
679
|
-
c[
|
|
679
|
+
for (let p = 0; p < i; p++)
|
|
680
|
+
c[p] = p;
|
|
680
681
|
const h = this.createDataBuffer(e, "array", c);
|
|
681
682
|
return { resolution: r, total: i, texture0: n, texture1: s, indexBuffer: h };
|
|
682
683
|
}
|
|
683
|
-
bind(e,
|
|
684
|
-
const i = this.createProgram(e,
|
|
684
|
+
bind(e, a, r) {
|
|
685
|
+
const i = this.createProgram(e, a, r);
|
|
685
686
|
if (i) {
|
|
686
687
|
const o = this.createDataBuffer(e, "array", void 0), n = e.getAttribLocation(i, "a_position");
|
|
687
688
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 2, e.FLOAT, !1, 0, 0);
|
|
@@ -692,75 +693,75 @@ class le {
|
|
|
692
693
|
}
|
|
693
694
|
return {};
|
|
694
695
|
}
|
|
695
|
-
bindParticle(e,
|
|
696
|
-
const s = this.createProgramWrapper(e,
|
|
697
|
-
return { particle: s, screen: c, update: h, quadBuffer:
|
|
696
|
+
bindParticle(e, a, r, i, o, n) {
|
|
697
|
+
const s = this.createProgramWrapper(e, a, r), c = this.createProgramWrapper(e, i, o), h = this.createProgramWrapper(e, i, n), p = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), d = e.createFramebuffer();
|
|
698
|
+
return { particle: s, screen: c, update: h, quadBuffer: p, frameBuffer: d };
|
|
698
699
|
}
|
|
699
|
-
draw(e,
|
|
700
|
+
draw(e, a, r, i, o, n, s) {
|
|
700
701
|
var c, h;
|
|
701
|
-
if (
|
|
702
|
-
e.resize(),
|
|
702
|
+
if (a && r) {
|
|
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);
|
|
703
704
|
try {
|
|
704
|
-
const
|
|
705
|
-
if (
|
|
706
|
-
const
|
|
707
|
-
|
|
705
|
+
const p = a.getUniformLocation(r, "u_resolution"), d = a.getUniformLocation(r, "u_image"), y = a.getUniformLocation(r, "u_color");
|
|
706
|
+
if (a.useProgram(r), a.uniform2f(p, a.canvas.width * e.ratio, a.canvas.height * e.ratio), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, i), a.uniform1i(d, 0), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, o), a.uniform1i(y, 1), s != null && s.uvRange && (s != null && s.sRange)) {
|
|
707
|
+
const m = a.getUniformLocation(r, "u_range_u_v"), v = a.getUniformLocation(r, "u_range_s");
|
|
708
|
+
a.uniform2f(m, s.uvRange[0], s.uvRange[1]), a.uniform2f(v, s.sRange[0], s.sRange[1]);
|
|
708
709
|
}
|
|
709
710
|
const u = e.getBoundPixel(), g = e.map.getZoom() + 1, f = e.getWorldCopy(u, g);
|
|
710
|
-
for (const
|
|
711
|
-
const v = (
|
|
712
|
-
|
|
711
|
+
for (const m of f) {
|
|
712
|
+
const v = (m[0] - u[0]) * e.ratio, b = (m[1] - u[3]) * e.ratio, w = m[2] * e.ratio, [k, _, A, D] = [v, w + v, b, w + b], $ = new Float32Array([k, A, _, A, k, D, k, D, _, A, _, D]);
|
|
713
|
+
a.bindBuffer(a.ARRAY_BUFFER, n), a.bufferData(a.ARRAY_BUFFER, $, a.STATIC_DRAW), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
713
714
|
}
|
|
714
|
-
} catch (
|
|
715
|
-
console.log(`render failed...${
|
|
715
|
+
} catch (p) {
|
|
716
|
+
console.log(`render failed...${p}`);
|
|
716
717
|
}
|
|
717
718
|
}
|
|
718
719
|
}
|
|
719
|
-
drawParticle(e,
|
|
720
|
+
drawParticle(e, a, r, i, o) {
|
|
720
721
|
var n, s;
|
|
721
|
-
|
|
722
|
+
a && (a == null || a.viewport(0, 0, (n = a == null ? void 0 : a.canvas) == null ? void 0 : n.width, (s = a == null ? void 0 : a.canvas) == null ? void 0 : s.height), a.disable(a.DEPTH_TEST), a.disable(a.STENCIL_TEST), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, r), a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, i.texture0), this.renderScreen(e, a, i, o), this.updateParticles(e, a, i, o));
|
|
722
723
|
}
|
|
723
|
-
renderScreen(e,
|
|
724
|
-
|
|
724
|
+
renderScreen(e, a, r, i) {
|
|
725
|
+
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.screenTexture, 0), a.viewport(0, 0, a.canvas.width, a.canvas.height), this.renderScreenTexture(a, r.backgroundTexture, r.screen, r.quadBuffer, 0.95), this.renderParticles(e, a, r, i), a.bindFramebuffer(a.FRAMEBUFFER, null), this.renderScreenTexture(a, r.screenTexture, r.screen, r.quadBuffer, 1);
|
|
725
726
|
const o = r.backgroundTexture;
|
|
726
727
|
r.backgroundTexture = r.screenTexture, r.screenTexture = o;
|
|
727
728
|
}
|
|
728
|
-
renderScreenTexture(e,
|
|
729
|
-
e && (e.useProgram(r.program), e.bindBuffer(e.ARRAY_BUFFER, i), e.enableVertexAttribArray(r.a_pos), e.vertexAttribPointer(r.a_pos, 2, e.FLOAT, !1, 0, 0), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D,
|
|
729
|
+
renderScreenTexture(e, a, r, i, o) {
|
|
730
|
+
e && (e.useProgram(r.program), e.bindBuffer(e.ARRAY_BUFFER, i), e.enableVertexAttribArray(r.a_pos), e.vertexAttribPointer(r.a_pos, 2, e.FLOAT, !1, 0, 0), e.activeTexture(e.TEXTURE2), e.bindTexture(e.TEXTURE_2D, a), e.uniform1i(r.u_screen, 2), e.uniform1f(r.u_opacity, o), e.drawArrays(e.TRIANGLES, 0, 6));
|
|
730
731
|
}
|
|
731
|
-
renderParticles(e,
|
|
732
|
-
if (
|
|
733
|
-
|
|
732
|
+
renderParticles(e, a, r, i) {
|
|
733
|
+
if (a) {
|
|
734
|
+
a.useProgram(r.particle.program), a.bindBuffer(a.ARRAY_BUFFER, r.indexBuffer), a.enableVertexAttribArray(r.particle.a_index), a.vertexAttribPointer(r.particle.a_index, 1, a.FLOAT, !1, 0, 0), a.activeTexture(a.TEXTURE2), a.bindTexture(a.TEXTURE_2D, r.color.texture), a.uniform1i(r.particle.u_factor, 0), a.uniform1i(r.particle.u_particles, 1), a.uniform1i(r.particle.u_color_ramp, 2), a.uniform1f(r.particle.u_particles_resolution, r.resolution * e.ratio), a.uniform1f(r.particle.u_point, e.ratio);
|
|
734
735
|
const o = e.getBoundRange();
|
|
735
|
-
|
|
736
|
+
a.uniform4f(r.particle.u_viewport, o[0], o[1], o[2], o[3]), a.uniform2f(r.particle.u_factor_min, i.uvRange[0], i.uvRange[0]), a.uniform2f(r.particle.u_factor_max, i.uvRange[1], i.uvRange[1]), a.drawArrays(a.POINTS, 0, r.total);
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
|
-
updateParticles(e,
|
|
739
|
+
updateParticles(e, a, r, i) {
|
|
739
740
|
var n, s;
|
|
740
|
-
if (
|
|
741
|
-
|
|
741
|
+
if (a) {
|
|
742
|
+
a.bindFramebuffer(a.FRAMEBUFFER, r.frameBuffer), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r.texture1, 0), a.viewport(0, 0, r.resolution, r.resolution), a.useProgram(r.update.program), a.bindBuffer(a.ARRAY_BUFFER, r.quadBuffer), a.enableVertexAttribArray(r.update.a_pos), a.vertexAttribPointer(r.update.a_pos, 2, a.FLOAT, !1, 0, 0), a.uniform1i(r.update.u_factor, 0), a.uniform1i(r.update.u_particles, 1);
|
|
742
743
|
const c = e.getBoundRange();
|
|
743
|
-
|
|
744
|
+
a.uniform4f(r.update.u_viewport, c[0], c[1], c[2], c[3]), a.uniform1f(r.update.u_rand_seed, Math.random()), a.uniform2f(r.update.u_factor_res, (n = r == null ? void 0 : r.image) == null ? void 0 : n.width, (s = r == null ? void 0 : r.image) == null ? void 0 : s.height), a.uniform2f(r.update.u_factor_min, i.uvRange[0], i.uvRange[0]), a.uniform2f(r.update.u_factor_max, i.uvRange[1], i.uvRange[1]), a.uniform1f(r.update.u_speed_factor, i.speedFactor * e.ratio), a.uniform1f(r.update.u_drop_rate, i.dropRate), a.uniform1f(r.update.u_drop_rate_bump, i.dropRateBump), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
744
745
|
}
|
|
745
746
|
const o = r.texture0;
|
|
746
747
|
r.texture0 = r.texture1, r.texture1 = o;
|
|
747
748
|
}
|
|
748
|
-
resize(e,
|
|
749
|
+
resize(e, a) {
|
|
749
750
|
e.resize();
|
|
750
|
-
const r = new Uint8Array(
|
|
751
|
+
const r = new Uint8Array(a.canvas.width * a.canvas.height * 4).fill(0, 0, a.canvas.width * a.canvas.height * 4), i = this.createTexture(a, a.NEAREST, a.NEAREST, a.CLAMP_TO_EDGE, r, a.canvas.width, a.canvas.height), o = this.createTexture(a, a.NEAREST, a.NEAREST, a.CLAMP_TO_EDGE, r, a.canvas.width, a.canvas.height);
|
|
751
752
|
return { screenTexture: i, backgroundTexture: o };
|
|
752
753
|
}
|
|
753
754
|
async loadImg(e) {
|
|
754
|
-
return new Promise((
|
|
755
|
+
return new Promise((a) => {
|
|
755
756
|
const r = new Blob([e], { type: e.type }), i = URL.createObjectURL(r), o = new Image();
|
|
756
|
-
o.crossOrigin = "anonymous", o.src = i, o.onload = () =>
|
|
757
|
+
o.crossOrigin = "anonymous", o.src = i, o.onload = () => a(o);
|
|
757
758
|
});
|
|
758
759
|
}
|
|
759
760
|
}
|
|
760
761
|
class B {
|
|
761
762
|
}
|
|
762
763
|
// 顶点渲染
|
|
763
|
-
|
|
764
|
+
E(B, "vertexSchema", `
|
|
764
765
|
//canvas 坐标系上的坐标 (x, y)
|
|
765
766
|
attribute vec2 a_position; //像素坐标
|
|
766
767
|
attribute vec2 a_texCoord; //纹理坐标
|
|
@@ -775,7 +776,7 @@ R(B, "vertexSchema", `
|
|
|
775
776
|
gl_Position = vec4(position * vec2(1, -1), 0.0, 1.0);
|
|
776
777
|
v_texCoord = a_texCoord;
|
|
777
778
|
}`), // 类如风、流等u v双变量片元渲染
|
|
778
|
-
|
|
779
|
+
E(B, "uvFragmentSchema", `
|
|
779
780
|
precision mediump float;
|
|
780
781
|
uniform sampler2D u_image;
|
|
781
782
|
uniform vec2 u_range_u_v;
|
|
@@ -794,7 +795,7 @@ R(B, "uvFragmentSchema", `
|
|
|
794
795
|
|
|
795
796
|
gl_FragColor = color;
|
|
796
797
|
}`), // 类如浪、气压等单变量片元渲染
|
|
797
|
-
|
|
798
|
+
E(B, "fragmentSchema", `
|
|
798
799
|
precision mediump float;
|
|
799
800
|
uniform sampler2D u_image; // 灰度
|
|
800
801
|
uniform sampler2D u_color; // 色值映射
|
|
@@ -807,7 +808,7 @@ R(B, "fragmentSchema", `
|
|
|
807
808
|
}`);
|
|
808
809
|
class F {
|
|
809
810
|
}
|
|
810
|
-
|
|
811
|
+
E(F, "vertexSchema", `
|
|
811
812
|
precision mediump float;
|
|
812
813
|
|
|
813
814
|
attribute float a_index; // 索引
|
|
@@ -831,7 +832,7 @@ R(F, "vertexSchema", `
|
|
|
831
832
|
gl_PointSize = 1.0;
|
|
832
833
|
// gl_PointSize = u_point;
|
|
833
834
|
gl_Position = vec4(2.0 * v_particle_pos.x - 1.0, 1.0 - 2.0 * v_particle_pos.y, 0, 1);
|
|
834
|
-
}`),
|
|
835
|
+
}`), E(F, "fragmentSchema", `
|
|
835
836
|
precision mediump float;
|
|
836
837
|
|
|
837
838
|
uniform sampler2D u_factor;
|
|
@@ -853,7 +854,7 @@ R(F, "vertexSchema", `
|
|
|
853
854
|
|
|
854
855
|
float f = 1.0 - uv.b;
|
|
855
856
|
gl_FragColor = texture2D(u_color_ramp, ramp_pos) * f;
|
|
856
|
-
}`),
|
|
857
|
+
}`), E(F, "quadVertSchema", `
|
|
857
858
|
precision mediump float;
|
|
858
859
|
|
|
859
860
|
attribute vec2 a_pos;
|
|
@@ -863,7 +864,7 @@ R(F, "vertexSchema", `
|
|
|
863
864
|
void main() {
|
|
864
865
|
v_tex_pos = a_pos;
|
|
865
866
|
gl_Position = vec4(1.0 - 2.0 * a_pos, 0, 1);
|
|
866
|
-
}`),
|
|
867
|
+
}`), E(F, "screenFragmentSchema", `
|
|
867
868
|
precision mediump float;
|
|
868
869
|
|
|
869
870
|
uniform sampler2D u_screen;
|
|
@@ -875,7 +876,7 @@ R(F, "vertexSchema", `
|
|
|
875
876
|
vec4 color = texture2D(u_screen, 1.0 - v_tex_pos);
|
|
876
877
|
// a hack to guarantee opacity fade out even with a value close to 1.0
|
|
877
878
|
gl_FragColor = vec4(floor(255.0 * color * u_opacity) / 255.0);
|
|
878
|
-
}`),
|
|
879
|
+
}`), E(F, "updateFragmentSchema", `
|
|
879
880
|
precision mediump float;
|
|
880
881
|
|
|
881
882
|
uniform sampler2D u_particles;
|
|
@@ -956,12 +957,12 @@ R(F, "vertexSchema", `
|
|
|
956
957
|
}`);
|
|
957
958
|
class Qt {
|
|
958
959
|
constructor(e = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg") {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
960
|
+
E(this, "token");
|
|
961
|
+
E(this, "mapboxCustomer");
|
|
962
|
+
E(this, "i4");
|
|
963
|
+
E(this, "hi");
|
|
964
|
+
E(this, "td");
|
|
965
|
+
E(this, "windy");
|
|
965
966
|
this.token = e, this.mapboxCustomer = {
|
|
966
967
|
source: this.initialOnlineStyle().sources.composite,
|
|
967
968
|
layers: {
|
|
@@ -2610,15 +2611,15 @@ const Kt = {
|
|
|
2610
2611
|
watch: {
|
|
2611
2612
|
"factor.version": {
|
|
2612
2613
|
handler() {
|
|
2613
|
-
var
|
|
2614
|
-
(
|
|
2614
|
+
var t;
|
|
2615
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
2615
2616
|
},
|
|
2616
2617
|
deep: !0
|
|
2617
2618
|
},
|
|
2618
2619
|
toggleVersion: {
|
|
2619
2620
|
handler() {
|
|
2620
|
-
var
|
|
2621
|
-
this.right = (((
|
|
2621
|
+
var t, e;
|
|
2622
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
2622
2623
|
},
|
|
2623
2624
|
immediate: !0
|
|
2624
2625
|
}
|
|
@@ -2630,19 +2631,19 @@ const Kt = {
|
|
|
2630
2631
|
this.handleRender();
|
|
2631
2632
|
}, 500);
|
|
2632
2633
|
else if (this.factor) {
|
|
2633
|
-
const
|
|
2634
|
-
let e = 0,
|
|
2635
|
-
this.handleDraw(),
|
|
2634
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
2635
|
+
let e = 0, a = 0;
|
|
2636
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[wind-particle] add elapsed: ", a, ", total: ", e += a);
|
|
2636
2637
|
}
|
|
2637
2638
|
},
|
|
2638
2639
|
handleClear() {
|
|
2639
|
-
var
|
|
2640
|
-
(
|
|
2640
|
+
var t, e, a, r, i, o, n, s;
|
|
2641
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (s = (n = this.viewport) == null ? void 0 : n.map) == null || s.off("moveend", this.handlePlay), this.handlePause();
|
|
2641
2642
|
},
|
|
2642
2643
|
handleSetup() {
|
|
2643
2644
|
if (!this.context) {
|
|
2644
2645
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
2645
|
-
const
|
|
2646
|
+
const t = [
|
|
2646
2647
|
[0, "rgb(98, 113, 184, 0.8)"],
|
|
2647
2648
|
// 0
|
|
2648
2649
|
[12 / 255, "rgb(98, 113, 184)"],
|
|
@@ -2671,16 +2672,16 @@ const Kt = {
|
|
|
2671
2672
|
// 30m/s
|
|
2672
2673
|
[1, "rgb(91, 136, 161)"]
|
|
2673
2674
|
];
|
|
2674
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
2675
|
-
const { program: e, aPositionBuffer:
|
|
2676
|
-
this.program = e, this.aPositionBuffer =
|
|
2675
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
2676
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.uvFragmentSchema);
|
|
2677
|
+
this.program = e, this.aPositionBuffer = a;
|
|
2677
2678
|
}
|
|
2678
2679
|
this.handleParticleSetup();
|
|
2679
2680
|
},
|
|
2680
2681
|
handleParticleSetup() {
|
|
2681
2682
|
if (!this.particleContext) {
|
|
2682
2683
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
2683
|
-
const
|
|
2684
|
+
const t = [
|
|
2684
2685
|
[0, "rgb(183,224,224)"],
|
|
2685
2686
|
[1, "rgb(217,220,220)"]
|
|
2686
2687
|
];
|
|
@@ -2691,20 +2692,20 @@ const Kt = {
|
|
|
2691
2692
|
F.quadVertSchema,
|
|
2692
2693
|
F.screenFragmentSchema,
|
|
2693
2694
|
F.updateFragmentSchema
|
|
2694
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
2695
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, t, !0, 16, 16), this.wrapper = { ...this.wrapper, ...this.webgl.setupParticle(this.particleContext, 9e3), ...this.webgl.resize(this.viewport, this.particleContext) }, this.viewport.map.on("resize", this.handleResize), this.viewport.map.on("movestart", this.handlePause), this.viewport.map.on("moveend", this.handlePlay);
|
|
2695
2696
|
}
|
|
2696
2697
|
},
|
|
2697
2698
|
async handleDraw() {
|
|
2698
2699
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
2699
2700
|
this.etime = this.factor.etime;
|
|
2700
|
-
const
|
|
2701
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
2701
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
2702
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t), this.particleTexture = this.webgl.createTexture(
|
|
2702
2703
|
this.particleContext,
|
|
2703
2704
|
this.particleContext.NEAREST,
|
|
2704
2705
|
this.particleContext.LINEAR,
|
|
2705
2706
|
this.particleContext.CLAMP_TO_EDGE,
|
|
2706
|
-
|
|
2707
|
-
), this.wrapper.image =
|
|
2707
|
+
t
|
|
2708
|
+
), this.wrapper.image = t;
|
|
2708
2709
|
}
|
|
2709
2710
|
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
2710
2711
|
},
|
|
@@ -2720,7 +2721,7 @@ const Kt = {
|
|
|
2720
2721
|
});
|
|
2721
2722
|
}
|
|
2722
2723
|
}
|
|
2723
|
-
}, re = (
|
|
2724
|
+
}, re = (t) => (U("data-v-41a686d0"), t = t(), G(), t), ea = { key: 0 }, ta = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "kts", -1)), aa = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "0", -1)), ia = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "5", -1)), ra = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "10", -1)), oa = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "20", -1)), sa = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "30", -1)), na = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "40", -1)), la = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "60", -1)), ca = [
|
|
2724
2725
|
ta,
|
|
2725
2726
|
aa,
|
|
2726
2727
|
ia,
|
|
@@ -2730,16 +2731,16 @@ const Kt = {
|
|
|
2730
2731
|
na,
|
|
2731
2732
|
la
|
|
2732
2733
|
];
|
|
2733
|
-
function ha(
|
|
2734
|
+
function ha(t, e, a, r, i, o) {
|
|
2734
2735
|
var n;
|
|
2735
|
-
return (n =
|
|
2736
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", ea, [
|
|
2736
2737
|
l("div", {
|
|
2737
2738
|
class: "legend-bars flex-center",
|
|
2738
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
2739
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
2739
2740
|
}, ca, 4)
|
|
2740
2741
|
])) : N("", !0);
|
|
2741
2742
|
}
|
|
2742
|
-
const da = /* @__PURE__ */ T(Kt, [["render", ha], ["__scopeId", "data-v-
|
|
2743
|
+
const da = /* @__PURE__ */ T(Kt, [["render", ha], ["__scopeId", "data-v-41a686d0"]]);
|
|
2743
2744
|
const pa = {
|
|
2744
2745
|
name: "IdmCurrent",
|
|
2745
2746
|
props: {
|
|
@@ -2791,8 +2792,8 @@ const pa = {
|
|
|
2791
2792
|
watch: {
|
|
2792
2793
|
"current.version": {
|
|
2793
2794
|
handler() {
|
|
2794
|
-
var
|
|
2795
|
-
(
|
|
2795
|
+
var t;
|
|
2796
|
+
(t = this.current) != null && t.active ? this.handleRender() : this.handleClear();
|
|
2796
2797
|
},
|
|
2797
2798
|
deep: !0
|
|
2798
2799
|
},
|
|
@@ -2810,15 +2811,15 @@ const pa = {
|
|
|
2810
2811
|
},
|
|
2811
2812
|
toggleVersion: {
|
|
2812
2813
|
handler() {
|
|
2813
|
-
var
|
|
2814
|
-
this.right = (((
|
|
2814
|
+
var t, e;
|
|
2815
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
2815
2816
|
},
|
|
2816
2817
|
immediate: !0
|
|
2817
2818
|
},
|
|
2818
2819
|
weatherLayers: {
|
|
2819
2820
|
handler() {
|
|
2820
|
-
var
|
|
2821
|
-
this.bottom = (((
|
|
2821
|
+
var t;
|
|
2822
|
+
this.bottom = (((t = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : t.clientHeight) || 0) + 105;
|
|
2822
2823
|
},
|
|
2823
2824
|
immediate: !0
|
|
2824
2825
|
}
|
|
@@ -2828,15 +2829,15 @@ const pa = {
|
|
|
2828
2829
|
this.$emit("particle", { particle: !this.showParticle, key: "current", weight: 96 });
|
|
2829
2830
|
},
|
|
2830
2831
|
handleRender() {
|
|
2831
|
-
var
|
|
2832
|
+
var t, e;
|
|
2832
2833
|
if (!this.map)
|
|
2833
2834
|
setTimeout(() => {
|
|
2834
2835
|
this.handleRender();
|
|
2835
2836
|
}, 500);
|
|
2836
2837
|
else if (this.current) {
|
|
2837
|
-
const
|
|
2838
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
2838
2839
|
let r = 0, i = 0, o = this.empty;
|
|
2839
|
-
this.current.active && (o = this.current.data), (
|
|
2840
|
+
this.current.active && (o = this.current.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[current] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
2840
2841
|
{
|
|
2841
2842
|
id: this.speedLayer,
|
|
2842
2843
|
type: "fill",
|
|
@@ -2895,7 +2896,7 @@ const pa = {
|
|
|
2895
2896
|
}
|
|
2896
2897
|
},
|
|
2897
2898
|
this.beforeLayer
|
|
2898
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
2899
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[current] add elapsed: ", i, ", total: ", r += i)), this.handleToggle();
|
|
2899
2900
|
}
|
|
2900
2901
|
},
|
|
2901
2902
|
handleToggle() {
|
|
@@ -2918,9 +2919,9 @@ const pa = {
|
|
|
2918
2919
|
key: 1,
|
|
2919
2920
|
class: "iconfont"
|
|
2920
2921
|
};
|
|
2921
|
-
function ba(
|
|
2922
|
+
function ba(t, e, a, r, i, o) {
|
|
2922
2923
|
var n;
|
|
2923
|
-
return (n =
|
|
2924
|
+
return (n = a.current) != null && n.active ? (L(), x("div", ma, [
|
|
2924
2925
|
l("div", {
|
|
2925
2926
|
class: "flex-center tool-bars",
|
|
2926
2927
|
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
@@ -2929,12 +2930,12 @@ function ba(a, e, t, r, i, o) {
|
|
|
2929
2930
|
class: "flex-start",
|
|
2930
2931
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
2931
2932
|
}, [
|
|
2932
|
-
|
|
2933
|
+
a.showParticle ? (L(), x("i", ua, "")) : (L(), x("i", ya, "")),
|
|
2933
2934
|
l("span", {
|
|
2934
|
-
class: M(
|
|
2935
|
+
class: M(a.showParticle ? "active" : "")
|
|
2935
2936
|
}, "Current Particles", 2)
|
|
2936
2937
|
]),
|
|
2937
|
-
|
|
2938
|
+
a.showParticle ? (L(), x("div", {
|
|
2938
2939
|
key: 0,
|
|
2939
2940
|
class: "flex-start",
|
|
2940
2941
|
style: { "margin-left": "16px" },
|
|
@@ -3005,15 +3006,15 @@ const _a = {
|
|
|
3005
3006
|
watch: {
|
|
3006
3007
|
"factor.version": {
|
|
3007
3008
|
handler() {
|
|
3008
|
-
var
|
|
3009
|
-
(
|
|
3009
|
+
var t;
|
|
3010
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
3010
3011
|
},
|
|
3011
3012
|
deep: !0
|
|
3012
3013
|
},
|
|
3013
3014
|
toggleVersion: {
|
|
3014
3015
|
handler() {
|
|
3015
|
-
var
|
|
3016
|
-
this.right = (((
|
|
3016
|
+
var t, e;
|
|
3017
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
3017
3018
|
},
|
|
3018
3019
|
immediate: !0
|
|
3019
3020
|
}
|
|
@@ -3025,19 +3026,19 @@ const _a = {
|
|
|
3025
3026
|
this.handleRender();
|
|
3026
3027
|
}, 500);
|
|
3027
3028
|
else if (this.factor) {
|
|
3028
|
-
const
|
|
3029
|
-
let e = 0,
|
|
3030
|
-
this.handleDraw(),
|
|
3029
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
3030
|
+
let e = 0, a = 0;
|
|
3031
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[current-particle] add elapsed: ", a, ", total: ", e += a);
|
|
3031
3032
|
}
|
|
3032
3033
|
},
|
|
3033
3034
|
handleClear() {
|
|
3034
|
-
var
|
|
3035
|
-
(
|
|
3035
|
+
var t, e, a, r, i, o, n, s;
|
|
3036
|
+
(t = this.viewport) == null || t.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (a = this.viewport) == null ? void 0 : a.map) == null || r.off("resize", this.handleResize), (o = (i = this.viewport) == null ? void 0 : i.map) == null || o.off("movestart", this.handlePause), (s = (n = this.viewport) == null ? void 0 : n.map) == null || s.off("moveend", this.handlePlay), this.handlePause();
|
|
3036
3037
|
},
|
|
3037
3038
|
handleSetup() {
|
|
3038
3039
|
if (!this.context) {
|
|
3039
3040
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
3040
|
-
const
|
|
3041
|
+
const t = [
|
|
3041
3042
|
[0 / 255, "rgba(95, 143, 197,1)"],
|
|
3042
3043
|
[5 / 255, "rgba(64,127,115,1)"],
|
|
3043
3044
|
[10 / 255, "rgb(58,164,58)"],
|
|
@@ -3057,16 +3058,16 @@ const _a = {
|
|
|
3057
3058
|
// 2.54
|
|
3058
3059
|
[1, "rgb(195,194,194)"]
|
|
3059
3060
|
];
|
|
3060
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
3061
|
-
const { program: e, aPositionBuffer:
|
|
3062
|
-
this.program = e, this.aPositionBuffer =
|
|
3061
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
3062
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.uvFragmentSchema);
|
|
3063
|
+
this.program = e, this.aPositionBuffer = a;
|
|
3063
3064
|
}
|
|
3064
3065
|
this.handleParticleSetup();
|
|
3065
3066
|
},
|
|
3066
3067
|
handleParticleSetup() {
|
|
3067
3068
|
if (!this.particleContext) {
|
|
3068
3069
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
3069
|
-
const
|
|
3070
|
+
const t = [
|
|
3070
3071
|
[0, "rgb(183,224,224)"],
|
|
3071
3072
|
[1, "rgb(199,202,202)"]
|
|
3072
3073
|
];
|
|
@@ -3077,7 +3078,7 @@ const _a = {
|
|
|
3077
3078
|
F.quadVertSchema,
|
|
3078
3079
|
F.screenFragmentSchema,
|
|
3079
3080
|
F.updateFragmentSchema
|
|
3080
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
3081
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, t, !0, 16, 16), this.wrapper = {
|
|
3081
3082
|
...this.wrapper,
|
|
3082
3083
|
...this.webgl.setupParticle(this.particleContext, 12e3),
|
|
3083
3084
|
...this.webgl.resize(this.viewport, this.particleContext)
|
|
@@ -3087,14 +3088,14 @@ const _a = {
|
|
|
3087
3088
|
async handleDraw() {
|
|
3088
3089
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
3089
3090
|
this.etime = this.factor.etime;
|
|
3090
|
-
const
|
|
3091
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
3091
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
3092
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t), this.particleTexture = this.webgl.createTexture(
|
|
3092
3093
|
this.particleContext,
|
|
3093
3094
|
this.particleContext.NEAREST,
|
|
3094
3095
|
this.particleContext.LINEAR,
|
|
3095
3096
|
this.particleContext.CLAMP_TO_EDGE,
|
|
3096
|
-
|
|
3097
|
-
), this.wrapper.image =
|
|
3097
|
+
t
|
|
3098
|
+
), this.wrapper.image = t;
|
|
3098
3099
|
}
|
|
3099
3100
|
this.initial && (this.initial = !1, this.handlePlay()), this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer, this.particleOptions), this.viewport.toggle(!0);
|
|
3100
3101
|
},
|
|
@@ -3110,7 +3111,7 @@ const _a = {
|
|
|
3110
3111
|
});
|
|
3111
3112
|
}
|
|
3112
3113
|
}
|
|
3113
|
-
}, ce = (
|
|
3114
|
+
}, ce = (t) => (U("data-v-a182db4f"), t = t(), G(), t), wa = { key: 0 }, La = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "kts", -1)), xa = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "0", -1)), Ca = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "0.4", -1)), Sa = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "0.8", -1)), ka = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "1.6", -1)), za = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "2", -1)), Pa = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "3.2", -1)), Ta = [
|
|
3114
3115
|
La,
|
|
3115
3116
|
xa,
|
|
3116
3117
|
Ca,
|
|
@@ -3119,16 +3120,16 @@ const _a = {
|
|
|
3119
3120
|
za,
|
|
3120
3121
|
Pa
|
|
3121
3122
|
];
|
|
3122
|
-
function Ia(
|
|
3123
|
+
function Ia(t, e, a, r, i, o) {
|
|
3123
3124
|
var n;
|
|
3124
|
-
return (n =
|
|
3125
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", wa, [
|
|
3125
3126
|
l("div", {
|
|
3126
3127
|
class: "legend-bars flex-center",
|
|
3127
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
3128
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
3128
3129
|
}, Ta, 4)
|
|
3129
3130
|
])) : N("", !0);
|
|
3130
3131
|
}
|
|
3131
|
-
const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-
|
|
3132
|
+
const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-a182db4f"]]), Ra = {
|
|
3132
3133
|
name: "IdmSigWave",
|
|
3133
3134
|
props: {
|
|
3134
3135
|
map: {
|
|
@@ -3152,23 +3153,23 @@ const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-3bf73a1b
|
|
|
3152
3153
|
watch: {
|
|
3153
3154
|
"sigWave.version": {
|
|
3154
3155
|
handler() {
|
|
3155
|
-
var
|
|
3156
|
-
(
|
|
3156
|
+
var t;
|
|
3157
|
+
(t = this.sigWave) != null && t.active ? this.handleRender() : this.handleClear();
|
|
3157
3158
|
},
|
|
3158
3159
|
deep: !0
|
|
3159
3160
|
}
|
|
3160
3161
|
},
|
|
3161
3162
|
methods: {
|
|
3162
3163
|
handleRender() {
|
|
3163
|
-
var
|
|
3164
|
+
var t, e;
|
|
3164
3165
|
if (!this.map)
|
|
3165
3166
|
setTimeout(() => {
|
|
3166
3167
|
this.handleRender();
|
|
3167
3168
|
}, 500);
|
|
3168
3169
|
else if (this.sigWave) {
|
|
3169
|
-
const
|
|
3170
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
3170
3171
|
let r = 0, i = 0, o = this.empty;
|
|
3171
|
-
this.sigWave.active && (o = this.sigWave.data), (
|
|
3172
|
+
this.sigWave.active && (o = this.sigWave.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[sig.wave] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
3172
3173
|
{
|
|
3173
3174
|
id: this.heightLayer,
|
|
3174
3175
|
type: "fill",
|
|
@@ -3231,7 +3232,7 @@ const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-3bf73a1b
|
|
|
3231
3232
|
}
|
|
3232
3233
|
},
|
|
3233
3234
|
this.beforeLayer
|
|
3234
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3235
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[sig.wave] add elapsed: ", i, ", total: ", r += i));
|
|
3235
3236
|
}
|
|
3236
3237
|
},
|
|
3237
3238
|
handleClear() {
|
|
@@ -3239,10 +3240,10 @@ const Ea = /* @__PURE__ */ T(_a, [["render", Ia], ["__scopeId", "data-v-3bf73a1b
|
|
|
3239
3240
|
}
|
|
3240
3241
|
}
|
|
3241
3242
|
};
|
|
3242
|
-
function Aa(
|
|
3243
|
+
function Aa(t, e, a, r, i, o) {
|
|
3243
3244
|
return L(), x("div");
|
|
3244
3245
|
}
|
|
3245
|
-
const Da = /* @__PURE__ */ T(Ra, [["render", Aa]]),
|
|
3246
|
+
const Da = /* @__PURE__ */ T(Ra, [["render", Aa]]), Ma = {
|
|
3246
3247
|
name: "IdmSwell",
|
|
3247
3248
|
props: {
|
|
3248
3249
|
map: {
|
|
@@ -3267,23 +3268,23 @@ const Da = /* @__PURE__ */ T(Ra, [["render", Aa]]), $a = {
|
|
|
3267
3268
|
watch: {
|
|
3268
3269
|
"swell.version": {
|
|
3269
3270
|
handler() {
|
|
3270
|
-
var
|
|
3271
|
-
(
|
|
3271
|
+
var t;
|
|
3272
|
+
(t = this.swell) != null && t.active ? this.handleRender() : this.handleClear();
|
|
3272
3273
|
},
|
|
3273
3274
|
deep: !0
|
|
3274
3275
|
}
|
|
3275
3276
|
},
|
|
3276
3277
|
methods: {
|
|
3277
3278
|
handleRender() {
|
|
3278
|
-
var
|
|
3279
|
+
var t, e;
|
|
3279
3280
|
if (!this.map)
|
|
3280
3281
|
setTimeout(() => {
|
|
3281
3282
|
this.handleRender();
|
|
3282
3283
|
}, 500);
|
|
3283
3284
|
else if (this.swell) {
|
|
3284
|
-
const
|
|
3285
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
3285
3286
|
let r = 0, i = 0, o = this.empty;
|
|
3286
|
-
this.swell.active && (o = this.swell.data), (
|
|
3287
|
+
this.swell.active && (o = this.swell.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[swell] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
3287
3288
|
{
|
|
3288
3289
|
id: this.heightLayer,
|
|
3289
3290
|
type: "line",
|
|
@@ -3372,7 +3373,7 @@ const Da = /* @__PURE__ */ T(Ra, [["render", Aa]]), $a = {
|
|
|
3372
3373
|
}
|
|
3373
3374
|
},
|
|
3374
3375
|
this.beforeLayer
|
|
3375
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3376
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[swell] add elapsed: ", i, ", total: ", r += i));
|
|
3376
3377
|
}
|
|
3377
3378
|
},
|
|
3378
3379
|
handleClear() {
|
|
@@ -3380,10 +3381,10 @@ const Da = /* @__PURE__ */ T(Ra, [["render", Aa]]), $a = {
|
|
|
3380
3381
|
}
|
|
3381
3382
|
}
|
|
3382
3383
|
};
|
|
3383
|
-
function
|
|
3384
|
+
function $a(t, e, a, r, i, o) {
|
|
3384
3385
|
return L(), x("div");
|
|
3385
3386
|
}
|
|
3386
|
-
const Ba = /* @__PURE__ */ T(
|
|
3387
|
+
const Ba = /* @__PURE__ */ T(Ma, [["render", $a]]), Na = {
|
|
3387
3388
|
name: "IdmPrmsl",
|
|
3388
3389
|
props: {
|
|
3389
3390
|
map: {
|
|
@@ -3408,102 +3409,110 @@ const Ba = /* @__PURE__ */ T($a, [["render", Ma]]), Na = {
|
|
|
3408
3409
|
watch: {
|
|
3409
3410
|
"prmsl.version": {
|
|
3410
3411
|
handler() {
|
|
3411
|
-
var
|
|
3412
|
-
(
|
|
3412
|
+
var t;
|
|
3413
|
+
(t = this.prmsl) != null && t.active ? this.handleRender() : this.handleClear();
|
|
3413
3414
|
},
|
|
3414
3415
|
deep: !0
|
|
3415
3416
|
}
|
|
3416
3417
|
},
|
|
3417
3418
|
methods: {
|
|
3418
3419
|
handleRender() {
|
|
3419
|
-
var
|
|
3420
|
+
var t, e, a;
|
|
3420
3421
|
if (!this.map)
|
|
3421
3422
|
setTimeout(() => {
|
|
3422
3423
|
this.handleRender();
|
|
3423
3424
|
}, 500);
|
|
3424
|
-
else
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
{
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
this.beforeLayer
|
|
3440
|
-
), (t = this.map) == null || t.addLayer(
|
|
3441
|
-
{
|
|
3442
|
-
id: this.labelLayer,
|
|
3443
|
-
type: "symbol",
|
|
3444
|
-
source: this.source,
|
|
3445
|
-
minzoom: 4,
|
|
3446
|
-
filter: ["==", "$type", "LineString"],
|
|
3447
|
-
layout: {
|
|
3448
|
-
"symbol-placement": "line",
|
|
3449
|
-
"text-rotation-alignment": "viewport",
|
|
3450
|
-
"text-field": "{val}",
|
|
3451
|
-
"text-size": 12
|
|
3425
|
+
else {
|
|
3426
|
+
if (this.prmsl) {
|
|
3427
|
+
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
3428
|
+
let i = 0, o = 0, n = this.empty;
|
|
3429
|
+
this.prmsl.active && (n = this.prmsl.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(n), o = (/* @__PURE__ */ new Date()).valueOf() - (r + i), console.log("[prmsl] update elapsed: ", o, ", total: ", i += o)) : (this.map.addSource(this.source, { type: "geojson", data: n }), this.map.addLayer(
|
|
3430
|
+
{
|
|
3431
|
+
id: this.layer,
|
|
3432
|
+
type: "line",
|
|
3433
|
+
source: this.source,
|
|
3434
|
+
filter: ["==", "$type", "LineString"],
|
|
3435
|
+
paint: {
|
|
3436
|
+
"line-color": ["step", ["get", "val"], "rgba(162,13,2,1)", 920, "rgba(244,67,54,1)", 980, "rgba(255,255,0,1)", 1100, "rgba(199,171,250,1)"],
|
|
3437
|
+
"line-width": 1,
|
|
3438
|
+
"line-opacity": 1
|
|
3439
|
+
}
|
|
3452
3440
|
},
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
"text-opacity": 0.9,
|
|
3456
|
-
"text-halo-color": "rgba(255,255,255,1)",
|
|
3457
|
-
"text-halo-width": 1
|
|
3458
|
-
}
|
|
3459
|
-
},
|
|
3460
|
-
this.beforeLayer
|
|
3461
|
-
), setTimeout(() => {
|
|
3462
|
-
this.map.addLayer(
|
|
3441
|
+
this.beforeLayer
|
|
3442
|
+
), (a = this.map) == null || a.addLayer(
|
|
3463
3443
|
{
|
|
3464
|
-
id: this.
|
|
3444
|
+
id: this.labelLayer,
|
|
3465
3445
|
type: "symbol",
|
|
3466
3446
|
source: this.source,
|
|
3467
|
-
|
|
3447
|
+
minzoom: 4,
|
|
3448
|
+
filter: ["==", "$type", "LineString"],
|
|
3468
3449
|
layout: {
|
|
3469
|
-
"symbol-placement": "
|
|
3470
|
-
"text-
|
|
3471
|
-
|
|
3472
|
-
"text-rotation-alignment": "map",
|
|
3473
|
-
"text-line-height": 1.3,
|
|
3450
|
+
"symbol-placement": "line",
|
|
3451
|
+
"text-rotation-alignment": "viewport",
|
|
3452
|
+
"text-field": "{val}",
|
|
3474
3453
|
"text-size": 12
|
|
3475
3454
|
},
|
|
3476
3455
|
paint: {
|
|
3477
|
-
"text-
|
|
3478
|
-
"text-
|
|
3479
|
-
"text-halo-color":
|
|
3480
|
-
|
|
3481
|
-
["get", "val"],
|
|
3482
|
-
"rgba(162,13,2,0.9)",
|
|
3483
|
-
920,
|
|
3484
|
-
"rgba(244,67,54,0.9)",
|
|
3485
|
-
980,
|
|
3486
|
-
"rgba(255,255,0,0.9)",
|
|
3487
|
-
1100,
|
|
3488
|
-
"rgba(199,171,250,0.9)"
|
|
3489
|
-
],
|
|
3490
|
-
"text-halo-width": 4
|
|
3456
|
+
"text-color": "black",
|
|
3457
|
+
"text-opacity": 0.9,
|
|
3458
|
+
"text-halo-color": "rgba(255,255,255,1)",
|
|
3459
|
+
"text-halo-width": 1
|
|
3491
3460
|
}
|
|
3492
3461
|
},
|
|
3493
3462
|
this.beforeLayer
|
|
3494
|
-
)
|
|
3495
|
-
|
|
3463
|
+
), setTimeout(() => {
|
|
3464
|
+
this.map.addLayer(
|
|
3465
|
+
{
|
|
3466
|
+
id: this.pointLabelLayer,
|
|
3467
|
+
type: "symbol",
|
|
3468
|
+
source: this.source,
|
|
3469
|
+
filter: ["==", "$type", "Point"],
|
|
3470
|
+
layout: {
|
|
3471
|
+
"symbol-placement": "point",
|
|
3472
|
+
"text-field": ["format", ["get", "type"], { "font-scale": 1.03 }, `
|
|
3473
|
+
`, ["get", "val"], { "font-scale": 1 }],
|
|
3474
|
+
"text-rotation-alignment": "map",
|
|
3475
|
+
"text-line-height": 1.3,
|
|
3476
|
+
"text-size": 12
|
|
3477
|
+
},
|
|
3478
|
+
paint: {
|
|
3479
|
+
"text-opacity": 1,
|
|
3480
|
+
"text-color": ["step", ["get", "val"], "white", 980, "black", 1100, "black"],
|
|
3481
|
+
"text-halo-color": [
|
|
3482
|
+
"step",
|
|
3483
|
+
["get", "val"],
|
|
3484
|
+
"rgba(162,13,2,0.9)",
|
|
3485
|
+
920,
|
|
3486
|
+
"rgba(244,67,54,0.9)",
|
|
3487
|
+
980,
|
|
3488
|
+
"rgba(255,255,0,0.9)",
|
|
3489
|
+
1100,
|
|
3490
|
+
"rgba(199,171,250,0.9)"
|
|
3491
|
+
],
|
|
3492
|
+
"text-halo-width": 4
|
|
3493
|
+
}
|
|
3494
|
+
},
|
|
3495
|
+
this.beforeLayer
|
|
3496
|
+
), this.handleMove();
|
|
3497
|
+
}, 1e3), o = (/* @__PURE__ */ new Date()).valueOf() - (r + i), console.log("[prmsl] add elapsed: ", o, ", total: ", i += o));
|
|
3498
|
+
}
|
|
3499
|
+
this.handleMove();
|
|
3496
3500
|
}
|
|
3497
3501
|
},
|
|
3502
|
+
handleMove() {
|
|
3503
|
+
var t, e;
|
|
3504
|
+
(e = (t = this.map) == null ? void 0 : t.getLayer("country-boundaries")) == null || e.setLayoutProperty("visibility", "visible"), this.map.getLayer(this.pointLabelLayer) && this.map.moveLayer(this.pointLabelLayer, "country-boundaries"), this.map.getLayer(this.labelLayer) && this.map.moveLayer(this.labelLayer, "country-boundaries"), this.map.getLayer(this.layer) && this.map.moveLayer(this.layer, "country-boundaries");
|
|
3505
|
+
},
|
|
3498
3506
|
handleClear() {
|
|
3499
|
-
|
|
3507
|
+
var t, e;
|
|
3508
|
+
(e = (t = this.map) == null ? void 0 : t.getLayer("country-boundaries")) == null || e.setLayoutProperty("visibility", "none"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.labelLayer) && this.map.removeLayer(this.labelLayer), this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
3500
3509
|
}
|
|
3501
3510
|
}
|
|
3502
3511
|
};
|
|
3503
|
-
function
|
|
3512
|
+
function Oa(t, e, a, r, i, o) {
|
|
3504
3513
|
return L(), x("div");
|
|
3505
3514
|
}
|
|
3506
|
-
const
|
|
3515
|
+
const Wa = /* @__PURE__ */ T(Na, [["render", Oa]]), ja = {
|
|
3507
3516
|
name: "IdmIceberg",
|
|
3508
3517
|
props: {
|
|
3509
3518
|
map: {
|
|
@@ -3526,23 +3535,23 @@ const Oa = /* @__PURE__ */ T(Na, [["render", Wa]]), ja = {
|
|
|
3526
3535
|
watch: {
|
|
3527
3536
|
"iceberg.version": {
|
|
3528
3537
|
handler() {
|
|
3529
|
-
var
|
|
3530
|
-
(
|
|
3538
|
+
var t;
|
|
3539
|
+
(t = this.iceberg) != null && t.active ? this.handleRender() : this.handleClear();
|
|
3531
3540
|
},
|
|
3532
3541
|
deep: !0
|
|
3533
3542
|
}
|
|
3534
3543
|
},
|
|
3535
3544
|
methods: {
|
|
3536
3545
|
handleRender() {
|
|
3537
|
-
var
|
|
3546
|
+
var t, e;
|
|
3538
3547
|
if (!this.map)
|
|
3539
3548
|
setTimeout(() => {
|
|
3540
3549
|
this.handleRender();
|
|
3541
3550
|
}, 500);
|
|
3542
3551
|
else if (this.iceberg) {
|
|
3543
|
-
const
|
|
3552
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
3544
3553
|
let r = 0, i = 0, o = this.empty;
|
|
3545
|
-
this.iceberg.active && (o = this.iceberg.data), (
|
|
3554
|
+
this.iceberg.active && (o = this.iceberg.data), (t = this.map) != null && t.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[iceberg] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer({
|
|
3546
3555
|
id: this.layer,
|
|
3547
3556
|
type: "line",
|
|
3548
3557
|
source: this.source,
|
|
@@ -3552,7 +3561,7 @@ const Oa = /* @__PURE__ */ T(Na, [["render", Wa]]), ja = {
|
|
|
3552
3561
|
"line-width": 2,
|
|
3553
3562
|
"line-opacity": 1
|
|
3554
3563
|
}
|
|
3555
|
-
}), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3564
|
+
}), i = (/* @__PURE__ */ new Date()).valueOf() - (a + r), console.log("[iceberg] add elapsed: ", i, ", total: ", r += i));
|
|
3556
3565
|
}
|
|
3557
3566
|
},
|
|
3558
3567
|
handleClear() {
|
|
@@ -3560,7 +3569,7 @@ const Oa = /* @__PURE__ */ T(Na, [["render", Wa]]), ja = {
|
|
|
3560
3569
|
}
|
|
3561
3570
|
}
|
|
3562
3571
|
};
|
|
3563
|
-
function Fa(
|
|
3572
|
+
function Fa(t, e, a, r, i, o) {
|
|
3564
3573
|
return L(), x("div");
|
|
3565
3574
|
}
|
|
3566
3575
|
const Va = /* @__PURE__ */ T(ja, [["render", Fa]]);
|
|
@@ -3602,9 +3611,9 @@ const Ua = {
|
|
|
3602
3611
|
},
|
|
3603
3612
|
computed: {
|
|
3604
3613
|
computeTime() {
|
|
3605
|
-
return function(
|
|
3606
|
-
if (
|
|
3607
|
-
const e = Q(
|
|
3614
|
+
return function(t) {
|
|
3615
|
+
if (t) {
|
|
3616
|
+
const e = Q(t).utc();
|
|
3608
3617
|
return `${e.format("MMM-DD,HHmm[Z]")} (${e == null ? void 0 : e.fromNow()})`;
|
|
3609
3618
|
}
|
|
3610
3619
|
return "-";
|
|
@@ -3627,30 +3636,30 @@ const Ua = {
|
|
|
3627
3636
|
"tropicals.version": {
|
|
3628
3637
|
handler() {
|
|
3629
3638
|
var r, i;
|
|
3630
|
-
const
|
|
3631
|
-
|
|
3639
|
+
const t = ((i = (r = this.tropicals) == null ? void 0 : r.data) == null ? void 0 : i.features) || [], e = Q().utc().hour(), a = [];
|
|
3640
|
+
t.forEach((o) => {
|
|
3632
3641
|
var n, s, c;
|
|
3633
|
-
(n = o.properties) != null && n.name && !
|
|
3634
|
-
}),
|
|
3635
|
-
var
|
|
3636
|
-
let n = 0, s
|
|
3637
|
-
const
|
|
3638
|
-
var
|
|
3639
|
-
return ((
|
|
3642
|
+
(n = o.properties) != null && n.name && !a.includes((s = o.properties) == null ? void 0 : s.name) && a.push((c = o.properties) == null ? void 0 : c.name);
|
|
3643
|
+
}), a.forEach((o) => {
|
|
3644
|
+
var h;
|
|
3645
|
+
let n = 0, s;
|
|
3646
|
+
const c = t.filter((p) => {
|
|
3647
|
+
var d, y;
|
|
3648
|
+
return ((y = (d = p.properties) == null ? void 0 : d.category) == null ? void 0 : y.split("-")[0]) === o;
|
|
3640
3649
|
});
|
|
3641
|
-
|
|
3642
|
-
var
|
|
3643
|
-
return ((
|
|
3644
|
-
})[0]) == null
|
|
3645
|
-
var
|
|
3646
|
-
((
|
|
3647
|
-
}),
|
|
3648
|
-
var g, f,
|
|
3649
|
-
if (((
|
|
3650
|
-
const
|
|
3651
|
-
|
|
3650
|
+
(h = c.filter((p) => {
|
|
3651
|
+
var d, y;
|
|
3652
|
+
return ((d = p.geometry) == null ? void 0 : d.type) === "LineString" && ((y = p.properties) == null ? void 0 : y.type) === "forecast";
|
|
3653
|
+
})[0]) == null || h.properties.model, c.forEach((p, d) => {
|
|
3654
|
+
var y, u, g, f, m, v;
|
|
3655
|
+
((y = p.geometry) == null ? void 0 : y.type) === "Point" && ((u = p.properties) == null ? void 0 : u.type) === "history" && (n = d, s = s === void 0 ? d : s), ((g = p.geometry) == null ? void 0 : g.type) === "Point" && ((f = p.properties) == null ? void 0 : f.type) === "forecast" && s === void 0 && (s = d), ((m = p.geometry) == null ? void 0 : m.type) === "LineString" && ((v = p.properties) == null || v.type);
|
|
3656
|
+
}), c.map((p, d) => {
|
|
3657
|
+
var y, u, g, f, m, v, b, w;
|
|
3658
|
+
if (((y = p.geometry) == null ? void 0 : y.type) === "LineString" && ((u = p.properties) == null || u.type), ((g = p.geometry) == null ? void 0 : g.type) === "Point" && ((f = p.properties) == null ? void 0 : f.type) === "forecast" && (p.properties.name = o), ((m = p.geometry) == null ? void 0 : m.type) === "Point" && ((v = p.properties) == null ? void 0 : v.type) === "history") {
|
|
3659
|
+
const k = ((w = (b = p.properties) == null ? void 0 : b.format) == null ? void 0 : w.slice(7, 12)) === Q().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm") + "Z";
|
|
3660
|
+
p.properties.showHistoryLabel = k || d === n, p.properties.showNameLabel = d === n, p.properties.name = o;
|
|
3652
3661
|
}
|
|
3653
|
-
return
|
|
3662
|
+
return p;
|
|
3654
3663
|
});
|
|
3655
3664
|
}), this.handleInit();
|
|
3656
3665
|
}
|
|
@@ -3658,8 +3667,8 @@ const Ua = {
|
|
|
3658
3667
|
},
|
|
3659
3668
|
methods: {
|
|
3660
3669
|
handleInit() {
|
|
3661
|
-
var
|
|
3662
|
-
this.tropicals && this.tropicals.active ? (this.handleRender(), (
|
|
3670
|
+
var t, e;
|
|
3671
|
+
this.tropicals && this.tropicals.active ? (this.handleRender(), (t = this.map) == null || t.on(
|
|
3663
3672
|
"click",
|
|
3664
3673
|
[
|
|
3665
3674
|
this.forecastNameLayer,
|
|
@@ -3688,7 +3697,7 @@ const Ua = {
|
|
|
3688
3697
|
));
|
|
3689
3698
|
},
|
|
3690
3699
|
handleRender() {
|
|
3691
|
-
var
|
|
3700
|
+
var t, e, a, r, i, o, n, s, c, h, p;
|
|
3692
3701
|
if (!this.map)
|
|
3693
3702
|
setTimeout(() => {
|
|
3694
3703
|
this.handleRender();
|
|
@@ -3696,8 +3705,8 @@ const Ua = {
|
|
|
3696
3705
|
else {
|
|
3697
3706
|
if (this.tropicals) {
|
|
3698
3707
|
const d = (/* @__PURE__ */ new Date()).valueOf();
|
|
3699
|
-
let
|
|
3700
|
-
(
|
|
3708
|
+
let y = 0, u = 0;
|
|
3709
|
+
(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), u = (/* @__PURE__ */ new Date()).valueOf() - (d + y), console.log("[tropicals] update elapsed: ", u, ", total: ", y += u)) : (this.map.addSource(this.source, {
|
|
3701
3710
|
type: "geojson",
|
|
3702
3711
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
3703
3712
|
}), this.map.addLayer({
|
|
@@ -3794,7 +3803,7 @@ const Ua = {
|
|
|
3794
3803
|
],
|
|
3795
3804
|
"text-halo-width": 4
|
|
3796
3805
|
}
|
|
3797
|
-
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d +
|
|
3806
|
+
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + y), console.log("[tropical] add elapsed: ", u, ", total: ", y += u)), (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), u = (/* @__PURE__ */ new Date()).valueOf() - (d + y), console.log("[tropical] update elapsed: ", u, ", total: ", y += u)) : (this.map.addSource(this.clusterSource, {
|
|
3798
3807
|
type: "geojson",
|
|
3799
3808
|
data: (c = this.tropicals) != null && c.active ? (h = this.tropicals) == null ? void 0 : h.data : this.empty
|
|
3800
3809
|
// cluster: true,
|
|
@@ -3909,39 +3918,39 @@ const Ua = {
|
|
|
3909
3918
|
"text-halo-color": "#146bf5",
|
|
3910
3919
|
"text-halo-width": 4
|
|
3911
3920
|
}
|
|
3912
|
-
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d +
|
|
3921
|
+
}), u = (/* @__PURE__ */ new Date()).valueOf() - (d + y), console.log("[tropical] add elapsed: ", u, ", total: ", y += u));
|
|
3913
3922
|
}
|
|
3914
|
-
if (!((
|
|
3915
|
-
const d = et.interpolate(this.tropicals, 1),
|
|
3916
|
-
|
|
3917
|
-
var f,
|
|
3918
|
-
(f = g.properties) != null && f.name && !u.includes((
|
|
3923
|
+
if (!((p = this.tropicals) != null && p.cached)) {
|
|
3924
|
+
const d = et.interpolate(this.tropicals, 1), y = JSON.parse(JSON.stringify(d)), u = [];
|
|
3925
|
+
y.forEach((g) => {
|
|
3926
|
+
var f, m, v;
|
|
3927
|
+
(f = g.properties) != null && f.name && !u.includes((m = g.properties) == null ? void 0 : m.name) && u.push((v = g.properties) == null ? void 0 : v.name);
|
|
3919
3928
|
}), u.forEach((g) => {
|
|
3920
3929
|
var v;
|
|
3921
|
-
const
|
|
3930
|
+
const m = (v = y.filter((b) => {
|
|
3922
3931
|
var w;
|
|
3923
3932
|
return ((w = b.properties) == null ? void 0 : w.name) === g;
|
|
3924
3933
|
})[0]) == null ? void 0 : v.properties.model;
|
|
3925
|
-
|
|
3934
|
+
y.map((b, w) => {
|
|
3926
3935
|
var k, _;
|
|
3927
|
-
return ((k = b.properties) == null ? void 0 : k.name) === g && (b.properties.disabled = ((_ = b.properties) == null ? void 0 : _.model) !==
|
|
3936
|
+
return ((k = b.properties) == null ? void 0 : k.name) === g && (b.properties.disabled = ((_ = b.properties) == null ? void 0 : _.model) !== m), b;
|
|
3928
3937
|
});
|
|
3929
|
-
}), this.interpolateData = JSON.parse(JSON.stringify(
|
|
3938
|
+
}), this.interpolateData = JSON.parse(JSON.stringify(y));
|
|
3930
3939
|
}
|
|
3931
3940
|
this.handleDateChange();
|
|
3932
3941
|
}
|
|
3933
3942
|
},
|
|
3934
3943
|
handleClear() {
|
|
3935
|
-
var
|
|
3936
|
-
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), (
|
|
3944
|
+
var t;
|
|
3945
|
+
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));
|
|
3937
3946
|
},
|
|
3938
3947
|
handleDateChange() {
|
|
3939
|
-
var
|
|
3940
|
-
if ((
|
|
3941
|
-
const X = Q(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), ee = this.interpolateData.filter((
|
|
3942
|
-
he.forEach((
|
|
3943
|
-
te.features.push(
|
|
3944
|
-
}), (
|
|
3948
|
+
var t, e, a, r, i, o, n, s, c, h, p, d, y, u, g, f, m, v, b, w, k, _, A, D, $, O, W, H;
|
|
3949
|
+
if ((t = this.interpolateMarkers) == null || t.forEach((X) => X == null ? void 0 : X.remove()), (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
3950
|
+
const X = Q(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), ee = this.interpolateData.filter((R) => R.properties.date === X.format() && !R.properties.disabled), he = this.handleComputePolygons(ee), te = C.featureCollection([...ee]);
|
|
3951
|
+
he.forEach((R) => {
|
|
3952
|
+
te.features.push(R);
|
|
3953
|
+
}), (a = this.map) != null && a.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(te) : ((i = this.map) == null || i.addSource(this.interpolateSource, {
|
|
3945
3954
|
type: "geojson",
|
|
3946
3955
|
data: te
|
|
3947
3956
|
}), (o = this.map) == null || o.addLayer({
|
|
@@ -3955,10 +3964,10 @@ const Ua = {
|
|
|
3955
3964
|
"line-width": 2
|
|
3956
3965
|
}
|
|
3957
3966
|
})), this.interpolateMarkers = [];
|
|
3958
|
-
for (const
|
|
3959
|
-
if (!
|
|
3967
|
+
for (const R of ee)
|
|
3968
|
+
if (!R.properties.disabled) {
|
|
3960
3969
|
let V = "#f44336";
|
|
3961
|
-
((s = (n =
|
|
3970
|
+
((s = (n = R.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 ? V = "#03f869" : ((h = (c = R.properties) == null ? void 0 : c.wind) == null ? void 0 : h.spd) >= 17.2 && ((d = (p = R.properties) == null ? void 0 : p.wind) == null ? void 0 : d.spd) < 24.5 ? V = "#f2f202" : ((u = (y = R.properties) == null ? void 0 : y.wind) == null ? void 0 : u.spd) >= 24.5 && ((f = (g = R.properties) == null ? void 0 : g.wind) == null ? void 0 : f.spd) < 32.7 ? V = "#ff9100" : ((v = (m = R.properties) == null ? void 0 : m.wind) == null ? void 0 : v.spd) >= 32.7 && ((w = (b = R.properties) == null ? void 0 : b.wind) == null ? void 0 : w.spd) < 41.5 ? V = "#f44336" : ((_ = (k = R.properties) == null ? void 0 : k.wind) == null ? void 0 : _.spd) >= 41.5 && ((D = (A = R.properties) == null ? void 0 : A.wind) == null ? void 0 : D.spd) < 51 ? V = "#c604a4" : ((O = ($ = R.properties) == null ? void 0 : $.wind) == null ? void 0 : O.spd) >= 51 ? V = "#6b05bb" : V = "#f44336";
|
|
3962
3971
|
const de = `<svg t="1719918955501"
|
|
3963
3972
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
3964
3973
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
@@ -3974,73 +3983,73 @@ const Ua = {
|
|
|
3974
3983
|
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"
|
|
3975
3984
|
fill="#ffffff" p-id="18386"></path>
|
|
3976
3985
|
</svg>`, q = document.createElement("div");
|
|
3977
|
-
q.className = "hurricane-hourly-marker", q.innerHTML = `<div class="${
|
|
3978
|
-
const ne = new ie.Marker(q).setLngLat(
|
|
3986
|
+
q.className = "hurricane-hourly-marker", q.innerHTML = `<div class="${R.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${de}</div>`;
|
|
3987
|
+
const ne = new ie.Marker(q).setLngLat(R.geometry.coordinates).addTo(this.map);
|
|
3979
3988
|
this.interpolateMarkers.push(ne);
|
|
3980
3989
|
}
|
|
3981
3990
|
} else
|
|
3982
|
-
(
|
|
3991
|
+
(W = this.map) != null && W.getSource(this.interpolateSource) && ((H = this.map) == null || H.getSource(this.interpolateSource).setData(this.empty));
|
|
3983
3992
|
},
|
|
3984
|
-
handleClick(
|
|
3985
|
-
var o, n, s, c, h,
|
|
3986
|
-
const e =
|
|
3993
|
+
handleClick(t) {
|
|
3994
|
+
var o, n, s, c, h, p;
|
|
3995
|
+
const e = t.features[0], a = (n = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : n.features.filter(
|
|
3987
3996
|
(d) => {
|
|
3988
|
-
var
|
|
3989
|
-
return d.geometry.type === "LineString" && d.properties.type === "forecast" && d.properties.name === ((
|
|
3997
|
+
var y;
|
|
3998
|
+
return d.geometry.type === "LineString" && d.properties.type === "forecast" && d.properties.name === ((y = e == null ? void 0 : e.properties) == null ? void 0 : y.name);
|
|
3990
3999
|
}
|
|
3991
4000
|
);
|
|
3992
|
-
|
|
3993
|
-
var u, g, f,
|
|
3994
|
-
return ((u = d.properties) == null ? void 0 : u.model) === "cma" ? -1 : ((g = d.properties) == null ? void 0 : g.model) === "jma" ? ((f =
|
|
4001
|
+
a.sort((d, y) => {
|
|
4002
|
+
var u, g, f, m;
|
|
4003
|
+
return ((u = d.properties) == null ? void 0 : u.model) === "cma" ? -1 : ((g = d.properties) == null ? void 0 : g.model) === "jma" ? ((f = y.properties) == null ? void 0 : f.model) === "cma" ? 1 : -1 : d.properties.model === "ecmwf" ? ["jma", "cma"].includes((m = y.properties) == null ? void 0 : m.model) ? 1 : -1 : 0;
|
|
3995
4004
|
});
|
|
3996
4005
|
const r = (c = (s = this.tropicals) == null ? void 0 : s.data) == null ? void 0 : c.features.filter(
|
|
3997
4006
|
(d) => {
|
|
3998
|
-
var
|
|
3999
|
-
return d.geometry.type === "LineString" && d.properties.type === "history" && d.properties.name === ((
|
|
4007
|
+
var y;
|
|
4008
|
+
return d.geometry.type === "LineString" && d.properties.type === "history" && d.properties.name === ((y = e == null ? void 0 : e.properties) == null ? void 0 : y.name);
|
|
4000
4009
|
}
|
|
4001
4010
|
);
|
|
4002
4011
|
this.activeTropicals = {
|
|
4003
4012
|
name: (h = e == null ? void 0 : e.properties) == null ? void 0 : h.name,
|
|
4004
|
-
forecasts:
|
|
4005
|
-
history: (
|
|
4013
|
+
forecasts: a.map((d) => d.properties),
|
|
4014
|
+
history: (p = r[0]) == null ? void 0 : p.properties
|
|
4006
4015
|
}, this.showTropicals = !0;
|
|
4007
4016
|
const i = document.getElementById("active-tropical");
|
|
4008
|
-
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([
|
|
4017
|
+
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([t.lngLat.lng, t.lngLat.lat]) : this.activeTropicalsMarker = new ie.Marker(i).setLngLat([t.lngLat.lng, t.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
4009
4018
|
},
|
|
4010
|
-
handleForecastToggle(
|
|
4019
|
+
handleForecastToggle(t) {
|
|
4011
4020
|
var r, i, o, n, s, c;
|
|
4012
|
-
|
|
4013
|
-
const e = `${
|
|
4014
|
-
|
|
4015
|
-
h.properties.category === e && (h.properties.disabled =
|
|
4021
|
+
t.disabled = !t.disabled;
|
|
4022
|
+
const e = `${t.name}-${t.model}`, a = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4023
|
+
a.forEach((h) => {
|
|
4024
|
+
h.properties.category === e && (h.properties.disabled = t.disabled);
|
|
4016
4025
|
}), this.interpolateData.forEach((h) => {
|
|
4017
|
-
h.properties.category === e && (h.properties.disabled =
|
|
4018
|
-
}), (n = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || n.setData(C.featureCollection(
|
|
4026
|
+
h.properties.category === e && (h.properties.disabled = t.disabled);
|
|
4027
|
+
}), (n = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || n.setData(C.featureCollection(a)), (c = (s = this.map) == null ? void 0 : s.getSource(this.clusterSource)) == null || c.setData(C.featureCollection(a)), this.handleDateChange();
|
|
4019
4028
|
},
|
|
4020
|
-
handleStrikeProbability(
|
|
4021
|
-
this.$emit("tropicalProbability",
|
|
4029
|
+
handleStrikeProbability(t) {
|
|
4030
|
+
this.$emit("tropicalProbability", t);
|
|
4022
4031
|
},
|
|
4023
|
-
handleComputePolygons(
|
|
4032
|
+
handleComputePolygons(t) {
|
|
4024
4033
|
const e = [];
|
|
4025
|
-
for (const
|
|
4026
|
-
const r =
|
|
4034
|
+
for (const a of t) {
|
|
4035
|
+
const r = a.properties.wind, i = {
|
|
4027
4036
|
ne: r.r7ne >= 0 ? r.r7ne : void 0,
|
|
4028
4037
|
se: r.r7se >= 0 ? r.r7se : void 0,
|
|
4029
4038
|
sw: r.r7sw >= 0 ? r.r7sw : void 0,
|
|
4030
4039
|
nw: r.r7nw >= 0 ? r.r7nw : void 0
|
|
4031
|
-
}, o = this.handleComputeArc(
|
|
4040
|
+
}, o = this.handleComputeArc(a.geometry.coordinates, i, { ...a.properties, level: 7 });
|
|
4032
4041
|
e.push(o);
|
|
4033
4042
|
const n = {
|
|
4034
4043
|
ne: r.r10ne >= 0 ? r.r10ne : void 0,
|
|
4035
4044
|
se: r.r10se >= 0 ? r.r10se : void 0,
|
|
4036
4045
|
sw: r.r10sw >= 0 ? r.r10sw : void 0,
|
|
4037
4046
|
nw: r.r10nw >= 0 ? r.r10nw : void 0
|
|
4038
|
-
}, s = this.handleComputeArc(
|
|
4047
|
+
}, s = this.handleComputeArc(a.geometry.coordinates, n, { ...a.properties, level: 10 });
|
|
4039
4048
|
e.push(s);
|
|
4040
4049
|
}
|
|
4041
4050
|
return e;
|
|
4042
4051
|
},
|
|
4043
|
-
handleComputeArc(
|
|
4052
|
+
handleComputeArc(t, e, a) {
|
|
4044
4053
|
var o;
|
|
4045
4054
|
const r = [];
|
|
4046
4055
|
for (const n in e) {
|
|
@@ -4048,25 +4057,25 @@ const Ua = {
|
|
|
4048
4057
|
let c;
|
|
4049
4058
|
switch (n) {
|
|
4050
4059
|
case "ne":
|
|
4051
|
-
c = C.lineArc(
|
|
4060
|
+
c = C.lineArc(t, s * 1.852, 0, 90, { steps: s > 0 ? 64 : 1 });
|
|
4052
4061
|
break;
|
|
4053
4062
|
case "se":
|
|
4054
|
-
c = C.lineArc(
|
|
4063
|
+
c = C.lineArc(t, s * 1.852, 90, 180, { steps: s > 0 ? 64 : 1 });
|
|
4055
4064
|
break;
|
|
4056
4065
|
case "sw":
|
|
4057
|
-
c = C.lineArc(
|
|
4066
|
+
c = C.lineArc(t, s * 1.852, 180, 270, { steps: s > 0 ? 64 : 1 });
|
|
4058
4067
|
break;
|
|
4059
4068
|
case "nw":
|
|
4060
|
-
c = C.lineArc(
|
|
4069
|
+
c = C.lineArc(t, s * 1.852, 270, 360, { steps: s > 0 ? 64 : 1 });
|
|
4061
4070
|
break;
|
|
4062
4071
|
}
|
|
4063
4072
|
r.push(...(o = c == null ? void 0 : c.geometry) == null ? void 0 : o.coordinates);
|
|
4064
4073
|
}
|
|
4065
4074
|
const i = C.lineString(r);
|
|
4066
|
-
return C.lineToPolygon(i, { properties:
|
|
4075
|
+
return C.lineToPolygon(i, { properties: a });
|
|
4067
4076
|
}
|
|
4068
4077
|
}
|
|
4069
|
-
}, Ge = (
|
|
4078
|
+
}, Ge = (t) => (U("data-v-6528818e"), t = t(), G(), t), Ga = {
|
|
4070
4079
|
id: "active-tropical",
|
|
4071
4080
|
class: "active-tropical"
|
|
4072
4081
|
}, Ha = { class: "header-box" }, Za = { class: "main" }, Xa = { key: 0 }, Ja = { class: "sub" }, qa = {
|
|
@@ -4081,10 +4090,10 @@ const Ua = {
|
|
|
4081
4090
|
}, ai = /* @__PURE__ */ Ge(() => /* @__PURE__ */ l("label", null, "Pressure : ", -1)), ii = { class: "row" }, ri = {
|
|
4082
4091
|
class: "col col-24",
|
|
4083
4092
|
style: { "justify-content": "flex-start" }
|
|
4084
|
-
}, oi = /* @__PURE__ */ Ge(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), si = { class: "forecast-models" }, ni = ["onClick"], li = /* @__PURE__ */ lt('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-
|
|
4085
|
-
function hi(
|
|
4086
|
-
var n, s, c, h,
|
|
4087
|
-
return
|
|
4093
|
+
}, oi = /* @__PURE__ */ Ge(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), si = { class: "forecast-models" }, ni = ["onClick"], li = /* @__PURE__ */ lt('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-6528818e></div><div class="row" style="padding:2px 10px;" data-v-6528818e><div class="legend" data-v-6528818e><div class="icon td" data-v-6528818e></div><div class="label" data-v-6528818e>TD</div></div><div class="legend" data-v-6528818e><div class="icon ts" data-v-6528818e></div><div class="label" data-v-6528818e>TS</div></div><div class="legend" data-v-6528818e><div class="icon sts" data-v-6528818e></div><div class="label" data-v-6528818e>STS</div></div><div class="legend" data-v-6528818e><div class="icon ty" data-v-6528818e></div><div class="label" data-v-6528818e>TY</div></div><div class="legend" data-v-6528818e><div class="icon sty" data-v-6528818e></div><div class="label" data-v-6528818e>STY</div></div><div class="legend" data-v-6528818e><div class="icon supper-ty" data-v-6528818e></div><div class="label" data-v-6528818e>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-6528818e><div class="legend" data-v-6528818e><div class="icon history" data-v-6528818e></div><div class="label" data-v-6528818e>History</div></div><div class="legend" data-v-6528818e><div class="icon r7" data-v-6528818e></div><div class="label" data-v-6528818e>35kts Radii</div></div><div class="legend" data-v-6528818e><div class="icon r10" data-v-6528818e></div><div class="label" data-v-6528818e>50kts Radii</div></div></div>', 3), ci = { class: "more" };
|
|
4094
|
+
function hi(t, e, a, r, i, o) {
|
|
4095
|
+
var n, s, c, h, p, d, y, u, g, f, m, v, b, w, k;
|
|
4096
|
+
return Me((L(), x("div", Ga, [
|
|
4088
4097
|
l("div", Ha, [
|
|
4089
4098
|
l("div", {
|
|
4090
4099
|
class: "iconfont close-btn",
|
|
@@ -4092,16 +4101,16 @@ function hi(a, e, t, r, i, o) {
|
|
|
4092
4101
|
}, ""),
|
|
4093
4102
|
l("div", Za, [
|
|
4094
4103
|
(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),
|
|
4095
|
-
Ke(S((
|
|
4104
|
+
Ke(S((p = i.activeTropicals) == null ? void 0 : p.name), 1)
|
|
4096
4105
|
]),
|
|
4097
|
-
l("div", Ja, " Last update: " + S(o.computeTime(((
|
|
4106
|
+
l("div", Ja, " Last update: " + S(o.computeTime(((y = (d = i.activeTropicals) == null ? void 0 : d.history) == null ? void 0 : y.updated) || ((f = (g = (u = i.activeTropicals) == null ? void 0 : u.forecasts) == null ? void 0 : g.filter((_) => !_.disabled)[0]) == null ? void 0 : f.date))), 1)
|
|
4098
4107
|
]),
|
|
4099
4108
|
l("div", qa, [
|
|
4100
4109
|
l("div", Ya, [
|
|
4101
4110
|
l("div", Qa, [
|
|
4102
4111
|
l("div", Ka, [
|
|
4103
4112
|
ei,
|
|
4104
|
-
l("span", null, S(((v = (
|
|
4113
|
+
l("span", null, S(((v = (m = i.activeTropicals) == null ? void 0 : m.history) == null ? void 0 : v.kts) || "-") + "[kts]", 1)
|
|
4105
4114
|
]),
|
|
4106
4115
|
l("div", ti, [
|
|
4107
4116
|
ai,
|
|
@@ -4112,14 +4121,14 @@ function hi(a, e, t, r, i, o) {
|
|
|
4112
4121
|
l("div", ri, [
|
|
4113
4122
|
oi,
|
|
4114
4123
|
l("div", si, [
|
|
4115
|
-
(L(!0), x(Ae, null, De((k = i.activeTropicals) == null ? void 0 : k.forecasts, (_,
|
|
4116
|
-
var D, $,
|
|
4124
|
+
(L(!0), x(Ae, null, De((k = i.activeTropicals) == null ? void 0 : k.forecasts, (_, A) => {
|
|
4125
|
+
var D, $, O, W;
|
|
4117
4126
|
return L(), x("div", {
|
|
4118
|
-
key:
|
|
4127
|
+
key: A,
|
|
4119
4128
|
class: M([
|
|
4120
4129
|
"model",
|
|
4121
4130
|
_.disabled ? "" : "active",
|
|
4122
|
-
|
|
4131
|
+
A > 0 && A < (($ = (D = i.activeTropicals) == null ? void 0 : D.forecasts) == null ? void 0 : $.length) - 1 && ((W = (O = i.activeTropicals) == null ? void 0 : O.forecasts) == null ? void 0 : W.length) > 2 ? "center-child" : ""
|
|
4123
4132
|
]),
|
|
4124
4133
|
onClick: (H) => o.handleForecastToggle(_)
|
|
4125
4134
|
}, [
|
|
@@ -4141,10 +4150,10 @@ function hi(a, e, t, r, i, o) {
|
|
|
4141
4150
|
])
|
|
4142
4151
|
])
|
|
4143
4152
|
], 512)), [
|
|
4144
|
-
[
|
|
4153
|
+
[$e, i.showTropicals]
|
|
4145
4154
|
]);
|
|
4146
4155
|
}
|
|
4147
|
-
const tt = /* @__PURE__ */ T(Ua, [["render", hi], ["__scopeId", "data-v-
|
|
4156
|
+
const tt = /* @__PURE__ */ T(Ua, [["render", hi], ["__scopeId", "data-v-6528818e"]]);
|
|
4148
4157
|
const di = {
|
|
4149
4158
|
name: "IdmPrecip3h",
|
|
4150
4159
|
props: {
|
|
@@ -4181,15 +4190,15 @@ const di = {
|
|
|
4181
4190
|
watch: {
|
|
4182
4191
|
"factor.version": {
|
|
4183
4192
|
handler() {
|
|
4184
|
-
var
|
|
4185
|
-
(
|
|
4193
|
+
var t;
|
|
4194
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
4186
4195
|
},
|
|
4187
4196
|
deep: !0
|
|
4188
4197
|
},
|
|
4189
4198
|
toggleVersion: {
|
|
4190
4199
|
handler() {
|
|
4191
|
-
var
|
|
4192
|
-
this.right = (((
|
|
4200
|
+
var t, e;
|
|
4201
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4193
4202
|
},
|
|
4194
4203
|
immediate: !0
|
|
4195
4204
|
}
|
|
@@ -4201,9 +4210,9 @@ const di = {
|
|
|
4201
4210
|
this.handleRender();
|
|
4202
4211
|
}, 500);
|
|
4203
4212
|
else if (this.factor) {
|
|
4204
|
-
const
|
|
4205
|
-
let e = 0,
|
|
4206
|
-
this.handleDraw(),
|
|
4213
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
4214
|
+
let e = 0, a = 0;
|
|
4215
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[precip3h] add elapsed: ", a, ", total: ", e += a);
|
|
4207
4216
|
}
|
|
4208
4217
|
},
|
|
4209
4218
|
handleClear() {
|
|
@@ -4212,7 +4221,7 @@ const di = {
|
|
|
4212
4221
|
handleSetup() {
|
|
4213
4222
|
if (!this.context) {
|
|
4214
4223
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4215
|
-
const
|
|
4224
|
+
const t = [
|
|
4216
4225
|
[0, "rgba(59, 126, 162, 0)"],
|
|
4217
4226
|
[14 / 255, "rgba(84,170,230, 0)"],
|
|
4218
4227
|
//1.4mm
|
|
@@ -4232,21 +4241,21 @@ const di = {
|
|
|
4232
4241
|
//30mm
|
|
4233
4242
|
[1, "rgba(197,5,58,0.8)"]
|
|
4234
4243
|
];
|
|
4235
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4236
|
-
const { program: e, aPositionBuffer:
|
|
4237
|
-
this.program = e, this.aPositionBuffer =
|
|
4244
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
4245
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.fragmentSchema);
|
|
4246
|
+
this.program = e, this.aPositionBuffer = a;
|
|
4238
4247
|
}
|
|
4239
4248
|
},
|
|
4240
4249
|
async handleDraw() {
|
|
4241
4250
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4242
4251
|
this.etime = this.factor.etime;
|
|
4243
|
-
const
|
|
4244
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4252
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4253
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4245
4254
|
}
|
|
4246
4255
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4247
4256
|
}
|
|
4248
4257
|
}
|
|
4249
|
-
}, oe = (
|
|
4258
|
+
}, oe = (t) => (U("data-v-dec867b8"), t = t(), G(), t), pi = { key: 0 }, mi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "mm", -1)), ui = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "1.5", -1)), yi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "2", -1)), fi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "3", -1)), gi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "7", -1)), bi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "10", -1)), vi = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "20", -1)), _i = /* @__PURE__ */ oe(() => /* @__PURE__ */ l("span", null, "30", -1)), wi = [
|
|
4250
4259
|
mi,
|
|
4251
4260
|
ui,
|
|
4252
4261
|
yi,
|
|
@@ -4256,12 +4265,12 @@ const di = {
|
|
|
4256
4265
|
vi,
|
|
4257
4266
|
_i
|
|
4258
4267
|
];
|
|
4259
|
-
function Li(
|
|
4268
|
+
function Li(t, e, a, r, i, o) {
|
|
4260
4269
|
var n;
|
|
4261
|
-
return (n =
|
|
4270
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", pi, [
|
|
4262
4271
|
l("div", {
|
|
4263
4272
|
class: "legend-bars flex-center",
|
|
4264
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4273
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
4265
4274
|
}, wi, 4)
|
|
4266
4275
|
])) : N("", !0);
|
|
4267
4276
|
}
|
|
@@ -4301,15 +4310,15 @@ const Ci = {
|
|
|
4301
4310
|
watch: {
|
|
4302
4311
|
"factor.version": {
|
|
4303
4312
|
handler() {
|
|
4304
|
-
var
|
|
4305
|
-
(
|
|
4313
|
+
var t;
|
|
4314
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
4306
4315
|
},
|
|
4307
4316
|
deep: !0
|
|
4308
4317
|
},
|
|
4309
4318
|
toggleVersion: {
|
|
4310
4319
|
handler() {
|
|
4311
|
-
var
|
|
4312
|
-
this.right = (((
|
|
4320
|
+
var t, e;
|
|
4321
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4313
4322
|
},
|
|
4314
4323
|
immediate: !0
|
|
4315
4324
|
}
|
|
@@ -4321,9 +4330,9 @@ const Ci = {
|
|
|
4321
4330
|
this.handleRender();
|
|
4322
4331
|
}, 500);
|
|
4323
4332
|
else if (this.factor) {
|
|
4324
|
-
const
|
|
4325
|
-
let e = 0,
|
|
4326
|
-
this.handleDraw(),
|
|
4333
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
4334
|
+
let e = 0, a = 0;
|
|
4335
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[visibility] add elapsed: ", a, ", total: ", e += a);
|
|
4327
4336
|
}
|
|
4328
4337
|
},
|
|
4329
4338
|
handleClear() {
|
|
@@ -4332,7 +4341,7 @@ const Ci = {
|
|
|
4332
4341
|
handleSetup() {
|
|
4333
4342
|
if (!this.context) {
|
|
4334
4343
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4335
|
-
const
|
|
4344
|
+
const t = [
|
|
4336
4345
|
[0, "rgba(189,50,160,0.8)"],
|
|
4337
4346
|
[8 / 255, "rgba(208,56,56,0.8)"],
|
|
4338
4347
|
//0.8km
|
|
@@ -4346,21 +4355,21 @@ const Ci = {
|
|
|
4346
4355
|
//16km
|
|
4347
4356
|
[1, "rgba(144,144,144,0)"]
|
|
4348
4357
|
];
|
|
4349
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4350
|
-
const { program: e, aPositionBuffer:
|
|
4351
|
-
this.program = e, this.aPositionBuffer =
|
|
4358
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
4359
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.fragmentSchema);
|
|
4360
|
+
this.program = e, this.aPositionBuffer = a;
|
|
4352
4361
|
}
|
|
4353
4362
|
},
|
|
4354
4363
|
async handleDraw() {
|
|
4355
4364
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4356
4365
|
this.etime = this.factor.etime;
|
|
4357
|
-
const
|
|
4358
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4366
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4367
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4359
4368
|
}
|
|
4360
4369
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4361
4370
|
}
|
|
4362
4371
|
}
|
|
4363
|
-
}, me = (
|
|
4372
|
+
}, me = (t) => (U("data-v-952dee5c"), t = t(), G(), t), Si = { key: 0 }, ki = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "nm", -1)), zi = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "0", -1)), Pi = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "0.5", -1)), Ti = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "1.5", -1)), Ii = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "3", -1)), Ei = /* @__PURE__ */ me(() => /* @__PURE__ */ l("span", null, "9", -1)), Ri = [
|
|
4364
4373
|
ki,
|
|
4365
4374
|
zi,
|
|
4366
4375
|
Pi,
|
|
@@ -4368,17 +4377,17 @@ const Ci = {
|
|
|
4368
4377
|
Ii,
|
|
4369
4378
|
Ei
|
|
4370
4379
|
];
|
|
4371
|
-
function Ai(
|
|
4380
|
+
function Ai(t, e, a, r, i, o) {
|
|
4372
4381
|
var n;
|
|
4373
|
-
return (n =
|
|
4382
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", Si, [
|
|
4374
4383
|
l("div", {
|
|
4375
4384
|
class: "legend-bars flex-center",
|
|
4376
|
-
style: j([{ position: "absolute" }, { right:
|
|
4385
|
+
style: j([{ position: "absolute" }, { right: t.right + "px", bottom: a.bottom }])
|
|
4377
4386
|
}, Ri, 4)
|
|
4378
4387
|
])) : N("", !0);
|
|
4379
4388
|
}
|
|
4380
4389
|
const Di = /* @__PURE__ */ T(Ci, [["render", Ai], ["__scopeId", "data-v-952dee5c"]]);
|
|
4381
|
-
const
|
|
4390
|
+
const Mi = {
|
|
4382
4391
|
name: "IdmWaterTemp",
|
|
4383
4392
|
props: {
|
|
4384
4393
|
factor: {
|
|
@@ -4414,15 +4423,15 @@ const $i = {
|
|
|
4414
4423
|
watch: {
|
|
4415
4424
|
"factor.version": {
|
|
4416
4425
|
handler() {
|
|
4417
|
-
var
|
|
4418
|
-
(
|
|
4426
|
+
var t;
|
|
4427
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
4419
4428
|
},
|
|
4420
4429
|
deep: !0
|
|
4421
4430
|
},
|
|
4422
4431
|
toggleVersion: {
|
|
4423
4432
|
handler() {
|
|
4424
|
-
var
|
|
4425
|
-
this.right = (((
|
|
4433
|
+
var t, e;
|
|
4434
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4426
4435
|
},
|
|
4427
4436
|
immediate: !0
|
|
4428
4437
|
}
|
|
@@ -4434,9 +4443,9 @@ const $i = {
|
|
|
4434
4443
|
this.handleRender();
|
|
4435
4444
|
}, 500);
|
|
4436
4445
|
else if (this.factor) {
|
|
4437
|
-
const
|
|
4438
|
-
let e = 0,
|
|
4439
|
-
this.handleDraw(),
|
|
4446
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
4447
|
+
let e = 0, a = 0;
|
|
4448
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[water-temp] add elapsed: ", a, ", total: ", e += a);
|
|
4440
4449
|
}
|
|
4441
4450
|
},
|
|
4442
4451
|
handleClear() {
|
|
@@ -4445,7 +4454,7 @@ const $i = {
|
|
|
4445
4454
|
handleSetup() {
|
|
4446
4455
|
if (!this.context) {
|
|
4447
4456
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4448
|
-
const
|
|
4457
|
+
const t = [
|
|
4449
4458
|
[0, "rgba(95, 143, 197)"],
|
|
4450
4459
|
// -10°C
|
|
4451
4460
|
[46 / 255, "rgba(95, 143, 197)"],
|
|
@@ -4466,38 +4475,38 @@ const $i = {
|
|
|
4466
4475
|
[1, "rgb(138, 43, 10)"]
|
|
4467
4476
|
//
|
|
4468
4477
|
];
|
|
4469
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4470
|
-
const { program: e, aPositionBuffer:
|
|
4471
|
-
this.program = e, this.aPositionBuffer =
|
|
4478
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
4479
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.fragmentSchema);
|
|
4480
|
+
this.program = e, this.aPositionBuffer = a;
|
|
4472
4481
|
}
|
|
4473
4482
|
},
|
|
4474
4483
|
async handleDraw() {
|
|
4475
4484
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4476
4485
|
this.etime = this.factor.etime;
|
|
4477
|
-
const
|
|
4478
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4486
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4487
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4479
4488
|
}
|
|
4480
4489
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4481
4490
|
}
|
|
4482
4491
|
}
|
|
4483
|
-
}, ue = (
|
|
4492
|
+
}, ue = (t) => (U("data-v-67e5094b"), t = t(), G(), t), $i = { key: 0 }, Bi = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "°C", -1)), Ni = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "0", -1)), Oi = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "10", -1)), Wi = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "20", -1)), ji = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "30", -1)), Fi = /* @__PURE__ */ ue(() => /* @__PURE__ */ l("span", null, "40", -1)), Vi = [
|
|
4484
4493
|
Bi,
|
|
4485
4494
|
Ni,
|
|
4486
|
-
Wi,
|
|
4487
4495
|
Oi,
|
|
4496
|
+
Wi,
|
|
4488
4497
|
ji,
|
|
4489
4498
|
Fi
|
|
4490
4499
|
];
|
|
4491
|
-
function Ui(
|
|
4500
|
+
function Ui(t, e, a, r, i, o) {
|
|
4492
4501
|
var n;
|
|
4493
|
-
return (n =
|
|
4502
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", $i, [
|
|
4494
4503
|
l("div", {
|
|
4495
4504
|
class: "legend-bars flex-center",
|
|
4496
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4505
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
4497
4506
|
}, Vi, 4)
|
|
4498
4507
|
])) : N("", !0);
|
|
4499
4508
|
}
|
|
4500
|
-
const Gi = /* @__PURE__ */ T(
|
|
4509
|
+
const Gi = /* @__PURE__ */ T(Mi, [["render", Ui], ["__scopeId", "data-v-67e5094b"]]);
|
|
4501
4510
|
const Hi = {
|
|
4502
4511
|
name: "IdmTemp",
|
|
4503
4512
|
props: {
|
|
@@ -4534,15 +4543,15 @@ const Hi = {
|
|
|
4534
4543
|
watch: {
|
|
4535
4544
|
"factor.version": {
|
|
4536
4545
|
handler() {
|
|
4537
|
-
var
|
|
4538
|
-
(
|
|
4546
|
+
var t;
|
|
4547
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
4539
4548
|
},
|
|
4540
4549
|
deep: !0
|
|
4541
4550
|
},
|
|
4542
4551
|
toggleVersion: {
|
|
4543
4552
|
handler() {
|
|
4544
|
-
var
|
|
4545
|
-
this.right = (((
|
|
4553
|
+
var t, e;
|
|
4554
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4546
4555
|
},
|
|
4547
4556
|
immediate: !0
|
|
4548
4557
|
}
|
|
@@ -4554,9 +4563,9 @@ const Hi = {
|
|
|
4554
4563
|
this.handleRender();
|
|
4555
4564
|
}, 500);
|
|
4556
4565
|
else if (this.factor) {
|
|
4557
|
-
const
|
|
4558
|
-
let e = 0,
|
|
4559
|
-
this.handleDraw(),
|
|
4566
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
4567
|
+
let e = 0, a = 0;
|
|
4568
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[water-temp] add elapsed: ", a, ", total: ", e += a);
|
|
4560
4569
|
}
|
|
4561
4570
|
},
|
|
4562
4571
|
handleClear() {
|
|
@@ -4565,7 +4574,7 @@ const Hi = {
|
|
|
4565
4574
|
handleSetup() {
|
|
4566
4575
|
if (!this.context) {
|
|
4567
4576
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4568
|
-
const
|
|
4577
|
+
const t = [
|
|
4569
4578
|
[0, "rgb(149, 137, 211)"],
|
|
4570
4579
|
[100 / 255, "rgb(149, 137, 211)"],
|
|
4571
4580
|
// -20°C
|
|
@@ -4589,21 +4598,21 @@ const Hi = {
|
|
|
4589
4598
|
// 40
|
|
4590
4599
|
[1, "rgb(138, 43, 10)"]
|
|
4591
4600
|
];
|
|
4592
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4593
|
-
const { program: e, aPositionBuffer:
|
|
4594
|
-
this.program = e, this.aPositionBuffer =
|
|
4601
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
4602
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.fragmentSchema);
|
|
4603
|
+
this.program = e, this.aPositionBuffer = a;
|
|
4595
4604
|
}
|
|
4596
4605
|
},
|
|
4597
4606
|
async handleDraw() {
|
|
4598
4607
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4599
4608
|
this.etime = this.factor.etime;
|
|
4600
|
-
const
|
|
4601
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4609
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4610
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4602
4611
|
}
|
|
4603
4612
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4604
4613
|
}
|
|
4605
4614
|
}
|
|
4606
|
-
}, se = (
|
|
4615
|
+
}, se = (t) => (U("data-v-389ea886"), t = t(), G(), t), Zi = { key: 0 }, Xi = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "°C", -1)), Ji = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "-20", -1)), qi = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "-10", -1)), Yi = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "0", -1)), Qi = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "10", -1)), Ki = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "20", -1)), er = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "30", -1)), tr = /* @__PURE__ */ se(() => /* @__PURE__ */ l("span", null, "40", -1)), ar = [
|
|
4607
4616
|
Xi,
|
|
4608
4617
|
Ji,
|
|
4609
4618
|
qi,
|
|
@@ -4613,12 +4622,12 @@ const Hi = {
|
|
|
4613
4622
|
er,
|
|
4614
4623
|
tr
|
|
4615
4624
|
];
|
|
4616
|
-
function ir(
|
|
4625
|
+
function ir(t, e, a, r, i, o) {
|
|
4617
4626
|
var n;
|
|
4618
|
-
return (n =
|
|
4627
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", Zi, [
|
|
4619
4628
|
l("div", {
|
|
4620
4629
|
class: "legend-bars flex-center",
|
|
4621
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4630
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
4622
4631
|
}, ar, 4)
|
|
4623
4632
|
])) : N("", !0);
|
|
4624
4633
|
}
|
|
@@ -4659,15 +4668,15 @@ const or = {
|
|
|
4659
4668
|
watch: {
|
|
4660
4669
|
"factor.version": {
|
|
4661
4670
|
handler() {
|
|
4662
|
-
var
|
|
4663
|
-
(
|
|
4671
|
+
var t;
|
|
4672
|
+
(t = this.factor) != null && t.active ? this.handleRender() : this.handleClear();
|
|
4664
4673
|
},
|
|
4665
4674
|
deep: !0
|
|
4666
4675
|
},
|
|
4667
4676
|
toggleVersion: {
|
|
4668
4677
|
handler() {
|
|
4669
|
-
var
|
|
4670
|
-
this.right = (((
|
|
4678
|
+
var t, e;
|
|
4679
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4671
4680
|
},
|
|
4672
4681
|
immediate: !0
|
|
4673
4682
|
}
|
|
@@ -4679,9 +4688,9 @@ const or = {
|
|
|
4679
4688
|
this.handleRender();
|
|
4680
4689
|
}, 500);
|
|
4681
4690
|
else if (this.factor) {
|
|
4682
|
-
const
|
|
4683
|
-
let e = 0,
|
|
4684
|
-
this.handleDraw(),
|
|
4691
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
4692
|
+
let e = 0, a = 0;
|
|
4693
|
+
this.handleDraw(), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("[water-temp] add elapsed: ", a, ", total: ", e += a);
|
|
4685
4694
|
}
|
|
4686
4695
|
},
|
|
4687
4696
|
handleClear() {
|
|
@@ -4690,7 +4699,7 @@ const or = {
|
|
|
4690
4699
|
handleSetup() {
|
|
4691
4700
|
if (!this.context) {
|
|
4692
4701
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4693
|
-
const
|
|
4702
|
+
const t = [
|
|
4694
4703
|
[0, "rgba(76, 165, 228, 0)"],
|
|
4695
4704
|
[50 / 255, "rgba(76, 165, 228, 0)"],
|
|
4696
4705
|
// 0m
|
|
@@ -4705,21 +4714,21 @@ const or = {
|
|
|
4705
4714
|
[1, "rgb(180, 209, 216)"]
|
|
4706
4715
|
// 2m
|
|
4707
4716
|
];
|
|
4708
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4709
|
-
const { program: e, aPositionBuffer:
|
|
4710
|
-
this.program = e, this.aPositionBuffer =
|
|
4717
|
+
this.rampColor = this.webgl.setup(this.context, t);
|
|
4718
|
+
const { program: e, aPositionBuffer: a } = this.webgl.bind(this.context, B.vertexSchema, B.fragmentSchema);
|
|
4719
|
+
this.program = e, this.aPositionBuffer = a;
|
|
4711
4720
|
}
|
|
4712
4721
|
},
|
|
4713
4722
|
async handleDraw() {
|
|
4714
4723
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4715
4724
|
this.etime = this.factor.etime;
|
|
4716
|
-
const
|
|
4717
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4725
|
+
const t = await this.webgl.loadImg(this.factor.raw);
|
|
4726
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, t);
|
|
4718
4727
|
}
|
|
4719
4728
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4720
4729
|
}
|
|
4721
4730
|
}
|
|
4722
|
-
}, ye = (
|
|
4731
|
+
}, ye = (t) => (U("data-v-db805141"), t = t(), G(), t), sr = { key: 0 }, nr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "m", -1)), lr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "0", -1)), cr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "0.5", -1)), hr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "1", -1)), dr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "1.5", -1)), pr = /* @__PURE__ */ ye(() => /* @__PURE__ */ l("span", null, "2", -1)), mr = [
|
|
4723
4732
|
nr,
|
|
4724
4733
|
lr,
|
|
4725
4734
|
cr,
|
|
@@ -4727,12 +4736,12 @@ const or = {
|
|
|
4727
4736
|
dr,
|
|
4728
4737
|
pr
|
|
4729
4738
|
];
|
|
4730
|
-
function ur(
|
|
4739
|
+
function ur(t, e, a, r, i, o) {
|
|
4731
4740
|
var n;
|
|
4732
|
-
return (n =
|
|
4741
|
+
return (n = a.factor) != null && n.active ? (L(), x("div", sr, [
|
|
4733
4742
|
l("div", {
|
|
4734
4743
|
class: "legend-bars flex-center",
|
|
4735
|
-
style: j([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4744
|
+
style: j([{ position: "absolute" }, { right: i.right + "px", bottom: a.bottom }])
|
|
4736
4745
|
}, mr, 4)
|
|
4737
4746
|
])) : N("", !0);
|
|
4738
4747
|
}
|
|
@@ -4778,108 +4787,108 @@ const fr = {
|
|
|
4778
4787
|
},
|
|
4779
4788
|
computed: {
|
|
4780
4789
|
computeTime() {
|
|
4781
|
-
return function(
|
|
4782
|
-
return
|
|
4790
|
+
return function(t) {
|
|
4791
|
+
return t ? `${Q(t).utc().format("MMM-DD,HHmm[Z]")}` : "-";
|
|
4783
4792
|
};
|
|
4784
4793
|
},
|
|
4785
4794
|
computeLat() {
|
|
4786
|
-
return function(
|
|
4787
|
-
return K.lat2pretty(
|
|
4795
|
+
return function(t, e = 4) {
|
|
4796
|
+
return K.lat2pretty(t, e).pretty;
|
|
4788
4797
|
};
|
|
4789
4798
|
},
|
|
4790
4799
|
computeLng() {
|
|
4791
|
-
return function(
|
|
4792
|
-
return K.lng2pretty(
|
|
4800
|
+
return function(t, e = 4) {
|
|
4801
|
+
return K.lng2pretty(t, e).pretty;
|
|
4793
4802
|
};
|
|
4794
4803
|
},
|
|
4795
4804
|
roundPrecision() {
|
|
4796
|
-
return function(
|
|
4797
|
-
return isNaN(
|
|
4805
|
+
return function(t, e = 4) {
|
|
4806
|
+
return isNaN(t) ? "-" : K.roundPrecision(t, e);
|
|
4798
4807
|
};
|
|
4799
4808
|
}
|
|
4800
4809
|
},
|
|
4801
4810
|
methods: {
|
|
4802
4811
|
handleBind() {
|
|
4803
|
-
var
|
|
4804
|
-
this.show ? (
|
|
4812
|
+
var t, e;
|
|
4813
|
+
this.show ? (t = this.map) == null || t.on("click", this.handleClick) : ((e = this.map) == null || e.off("click", this.handleClick), this.showMeteo = !1);
|
|
4805
4814
|
},
|
|
4806
|
-
handleClick(
|
|
4807
|
-
|
|
4808
|
-
const e =
|
|
4809
|
-
e.indexOf("close") > -1 ? this.showMeteo = !1 : e === "more" ? this.$emit("more", this.meteo) : this.$emit("point",
|
|
4815
|
+
handleClick(t) {
|
|
4816
|
+
t.originalEvent.stopPropagation();
|
|
4817
|
+
const e = t.originalEvent.target.className;
|
|
4818
|
+
e.indexOf("close") > -1 ? this.showMeteo = !1 : e === "more" ? this.$emit("more", this.meteo) : this.$emit("point", t.lngLat);
|
|
4810
4819
|
},
|
|
4811
4820
|
handleRender() {
|
|
4812
|
-
var
|
|
4821
|
+
var t;
|
|
4813
4822
|
if (this.meteo) {
|
|
4814
4823
|
const e = document.getElementById("point-meteo");
|
|
4815
|
-
this.meteoMarker ? (
|
|
4824
|
+
this.meteoMarker ? (t = this.meteoMarker) == null || t.setLngLat([this.meteo.lng, this.meteo.lat]) : this.meteoMarker = new ie.Marker(e).setLngLat([this.meteo.lng, this.meteo.lat]).addTo(this.map);
|
|
4816
4825
|
}
|
|
4817
4826
|
}
|
|
4818
4827
|
}
|
|
4819
|
-
}, J = (
|
|
4828
|
+
}, J = (t) => (U("data-v-fb5b12d6"), t = t(), G(), t), gr = {
|
|
4820
4829
|
id: "point-meteo",
|
|
4821
4830
|
class: "point-meteo"
|
|
4822
|
-
}, br = { class: "meteo-box" }, vr = { class: "header-box" }, _r = { class: "main" }, wr = { class: "sub" }, Lr = { class: "main-box" }, xr = { class: "flex-space" }, Cr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind", -1)), Sr = { class: "flex-space" }, kr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind.Wave", -1)), zr = { class: "flex-space" }, Pr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Swell", -1)), Tr = { class: "flex-space" }, Ir = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Sig.Wave", -1)), Er = { class: "flex-space" }, Rr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Current", -1)), Ar = { class: "flex-space" }, Dr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Precip", -1)),
|
|
4831
|
+
}, br = { class: "meteo-box" }, vr = { class: "header-box" }, _r = { class: "main" }, wr = { class: "sub" }, Lr = { class: "main-box" }, xr = { class: "flex-space" }, Cr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind", -1)), Sr = { class: "flex-space" }, kr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind.Wave", -1)), zr = { class: "flex-space" }, Pr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Swell", -1)), Tr = { class: "flex-space" }, Ir = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Sig.Wave", -1)), Er = { class: "flex-space" }, Rr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Current", -1)), Ar = { class: "flex-space" }, Dr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Precip", -1)), Mr = { class: "flex-space" }, $r = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Visibility", -1)), Br = { class: "flex-space" }, Nr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Temp", -1)), Or = { class: "flex-space" }, Wr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Water Temp", -1)), jr = {
|
|
4823
4832
|
key: 0,
|
|
4824
4833
|
class: "flex-space",
|
|
4825
4834
|
style: { "justify-content": "flex-end" }
|
|
4826
4835
|
}, Fr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("span", { class: "more" }, "More >>", -1)), Vr = [
|
|
4827
4836
|
Fr
|
|
4828
4837
|
];
|
|
4829
|
-
function Ur(
|
|
4830
|
-
var n, s, c, h,
|
|
4831
|
-
return
|
|
4838
|
+
function Ur(t, e, a, r, i, o) {
|
|
4839
|
+
var n, s, c, h, p, d, y, u, g, f, m, v, b, w, k, _, A, D, $, O, W, H, X, ee, he, te, R, V, de, q, ne, fe, ge, be, ve, _e, we, Le, xe, Ce, Se, ke, ze, Pe, Te, Ie, Ee;
|
|
4840
|
+
return Me((L(), x("div", gr, [
|
|
4832
4841
|
l("div", br, [
|
|
4833
4842
|
l("div", vr, [
|
|
4834
4843
|
l("div", {
|
|
4835
4844
|
class: "iconfont close",
|
|
4836
4845
|
onClick: e[0] || (e[0] = (Ne) => i.showMeteo = !1)
|
|
4837
4846
|
}, ""),
|
|
4838
|
-
l("div", _r, S(o.computeLat((n =
|
|
4839
|
-
l("div", wr, S(o.computeTime((c =
|
|
4847
|
+
l("div", _r, S(o.computeLat((n = a.meteo) == null ? void 0 : n.lat)) + "," + S(o.computeLng((s = a.meteo) == null ? void 0 : s.lng)), 1),
|
|
4848
|
+
l("div", wr, S(o.computeTime((c = a.meteo) == null ? void 0 : c.utc)), 1)
|
|
4840
4849
|
]),
|
|
4841
4850
|
l("div", Lr, [
|
|
4842
4851
|
l("div", xr, [
|
|
4843
4852
|
Cr,
|
|
4844
|
-
l("span", null, S(((
|
|
4853
|
+
l("span", null, S(((p = (h = a.meteo) == null ? void 0 : h.wind) == null ? void 0 : p.direction) || "-") + "/" + S(o.roundPrecision((y = (d = a.meteo) == null ? void 0 : d.wind) == null ? void 0 : y.kts, 1)) + "[kts]/" + S((g = (u = a.meteo) == null ? void 0 : u.wind) == null ? void 0 : g.scale) + "[BF]/" + S(o.roundPrecision((m = (f = a.meteo) == null ? void 0 : f.gusts) == null ? void 0 : m.kts, 1)) + "[kts]", 1)
|
|
4845
4854
|
]),
|
|
4846
4855
|
l("div", Sr, [
|
|
4847
4856
|
kr,
|
|
4848
|
-
l("span", null, S(((w = (b = (v =
|
|
4857
|
+
l("span", null, S(((w = (b = (v = a.meteo) == null ? void 0 : v.wave) == null ? void 0 : b.wd) == null ? void 0 : w.direction) || "-") + "/" + S(o.roundPrecision((A = (_ = (k = a.meteo) == null ? void 0 : k.wave) == null ? void 0 : _.wd) == null ? void 0 : A.height, 1)) + "[m]/" + S(o.roundPrecision((O = ($ = (D = a.meteo) == null ? void 0 : D.wave) == null ? void 0 : $.wd) == null ? void 0 : O.period, 1)) + "[s]", 1)
|
|
4849
4858
|
]),
|
|
4850
4859
|
l("div", zr, [
|
|
4851
4860
|
Pr,
|
|
4852
|
-
l("span", null, S(((X = (H = (
|
|
4861
|
+
l("span", null, S(((X = (H = (W = a.meteo) == null ? void 0 : W.wave) == null ? void 0 : H.swell) == null ? void 0 : X.direction) || "-") + "/" + S(o.roundPrecision((te = (he = (ee = a.meteo) == null ? void 0 : ee.wave) == null ? void 0 : he.swell) == null ? void 0 : te.height, 1)) + "[m]/" + S(o.roundPrecision((de = (V = (R = a.meteo) == null ? void 0 : R.wave) == null ? void 0 : V.swell) == null ? void 0 : de.period, 1)) + "[s]", 1)
|
|
4853
4862
|
]),
|
|
4854
4863
|
l("div", Tr, [
|
|
4855
4864
|
Ir,
|
|
4856
|
-
l("span", null, S(((fe = (ne = (q =
|
|
4865
|
+
l("span", null, S(((fe = (ne = (q = a.meteo) == null ? void 0 : q.wave) == null ? void 0 : ne.sig) == null ? void 0 : fe.direction) || "-") + "/" + S(o.roundPrecision((ve = (be = (ge = a.meteo) == null ? void 0 : ge.wave) == null ? void 0 : be.sig) == null ? void 0 : ve.height, 1)) + "[m]/" + S(o.roundPrecision((Le = (we = (_e = a.meteo) == null ? void 0 : _e.wave) == null ? void 0 : we.sig) == null ? void 0 : Le.period, 1)) + "[s]", 1)
|
|
4857
4866
|
]),
|
|
4858
4867
|
l("div", Er, [
|
|
4859
4868
|
Rr,
|
|
4860
|
-
l("span", null, S(((Ce = (xe =
|
|
4869
|
+
l("span", null, S(((Ce = (xe = a.meteo) == null ? void 0 : xe.current) == null ? void 0 : Ce.direction) || "-") + "/" + S(o.roundPrecision((ke = (Se = a.meteo) == null ? void 0 : Se.current) == null ? void 0 : ke.kts, 2)) + "[kts]", 1)
|
|
4861
4870
|
]),
|
|
4862
4871
|
l("div", Ar, [
|
|
4863
4872
|
Dr,
|
|
4864
|
-
l("span", null, S(o.roundPrecision((Pe = (ze =
|
|
4873
|
+
l("span", null, S(o.roundPrecision((Pe = (ze = a.meteo) == null ? void 0 : ze.precip) == null ? void 0 : Pe.inter6h, 2)) + "[mm]", 1)
|
|
4865
4874
|
]),
|
|
4866
|
-
l("div",
|
|
4867
|
-
|
|
4868
|
-
l("span", null, S(o.roundPrecision(((Te =
|
|
4875
|
+
l("div", Mr, [
|
|
4876
|
+
$r,
|
|
4877
|
+
l("span", null, S(o.roundPrecision(((Te = a.meteo) == null ? void 0 : Te.visibility) / 1852, 0)) + "[nm]", 1)
|
|
4869
4878
|
]),
|
|
4870
4879
|
l("div", Br, [
|
|
4871
4880
|
Nr,
|
|
4872
|
-
l("span", null, S(o.roundPrecision((Ie =
|
|
4881
|
+
l("span", null, S(o.roundPrecision((Ie = a.meteo) == null ? void 0 : Ie.temp, 0)) + "[°C]", 1)
|
|
4873
4882
|
]),
|
|
4874
|
-
l("div",
|
|
4875
|
-
|
|
4876
|
-
l("span", null, S(o.roundPrecision((Ee =
|
|
4883
|
+
l("div", Or, [
|
|
4884
|
+
Wr,
|
|
4885
|
+
l("span", null, S(o.roundPrecision((Ee = a.meteo) == null ? void 0 : Ee.waterTemp, 2)) + "[°C]", 1)
|
|
4877
4886
|
])
|
|
4878
4887
|
]),
|
|
4879
|
-
|
|
4888
|
+
t.$attrs.permission & i.helper.LEVEL.Prime ? (L(), x("div", jr, Vr)) : N("", !0)
|
|
4880
4889
|
])
|
|
4881
4890
|
], 512)), [
|
|
4882
|
-
[
|
|
4891
|
+
[$e, i.showMeteo]
|
|
4883
4892
|
]);
|
|
4884
4893
|
}
|
|
4885
4894
|
const Gr = /* @__PURE__ */ T(fr, [["render", Ur], ["__scopeId", "data-v-fb5b12d6"]]), Hr = {
|
|
@@ -4972,7 +4981,7 @@ const Gr = /* @__PURE__ */ T(fr, [["render", Ur], ["__scopeId", "data-v-fb5b12d6
|
|
|
4972
4981
|
}
|
|
4973
4982
|
}
|
|
4974
4983
|
};
|
|
4975
|
-
function Zr(
|
|
4984
|
+
function Zr(t, e, a, r, i, o) {
|
|
4976
4985
|
return L(), x("div");
|
|
4977
4986
|
}
|
|
4978
4987
|
const Xr = /* @__PURE__ */ T(Hr, [["render", Zr]]), Jr = {
|
|
@@ -5095,7 +5104,7 @@ const Xr = /* @__PURE__ */ T(Hr, [["render", Zr]]), Jr = {
|
|
|
5095
5104
|
}
|
|
5096
5105
|
}
|
|
5097
5106
|
};
|
|
5098
|
-
function qr(
|
|
5107
|
+
function qr(t, e, a, r, i, o) {
|
|
5099
5108
|
return L(), x("div");
|
|
5100
5109
|
}
|
|
5101
5110
|
const Yr = /* @__PURE__ */ T(Jr, [["render", qr]]), Qr = {
|
|
@@ -5127,8 +5136,8 @@ const Yr = /* @__PURE__ */ T(Jr, [["render", qr]]), Qr = {
|
|
|
5127
5136
|
},
|
|
5128
5137
|
methods: {
|
|
5129
5138
|
handleRender() {
|
|
5130
|
-
var
|
|
5131
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
5139
|
+
var t;
|
|
5140
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (t = this.map) == null || t.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
5132
5141
|
type: "geojson",
|
|
5133
5142
|
data: this.zone
|
|
5134
5143
|
}), this.map.addLayer({
|
|
@@ -5186,7 +5195,7 @@ const Yr = /* @__PURE__ */ T(Jr, [["render", qr]]), Qr = {
|
|
|
5186
5195
|
}
|
|
5187
5196
|
}
|
|
5188
5197
|
};
|
|
5189
|
-
function Kr(
|
|
5198
|
+
function Kr(t, e, a, r, i, o) {
|
|
5190
5199
|
return L(), x("div");
|
|
5191
5200
|
}
|
|
5192
5201
|
const eo = /* @__PURE__ */ T(Qr, [["render", Kr]]);
|
|
@@ -5218,23 +5227,23 @@ const to = {
|
|
|
5218
5227
|
watch: {
|
|
5219
5228
|
zone: {
|
|
5220
5229
|
handler() {
|
|
5221
|
-
var
|
|
5222
|
-
this.zone ? (this.handleRender(), (
|
|
5230
|
+
var t, e;
|
|
5231
|
+
this.zone ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick)) : (this.handleClear(), (e = this.map) == null || e.off("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick));
|
|
5223
5232
|
}
|
|
5224
5233
|
}
|
|
5225
5234
|
},
|
|
5226
5235
|
methods: {
|
|
5227
|
-
handleClick(
|
|
5236
|
+
handleClick(t) {
|
|
5228
5237
|
var r;
|
|
5229
|
-
const e =
|
|
5238
|
+
const e = t.features[0], a = (r = this.zone) == null ? void 0 : r.features.filter((i) => {
|
|
5230
5239
|
var o;
|
|
5231
5240
|
return i.properties.id === ((o = e == null ? void 0 : e.properties) == null ? void 0 : o.id);
|
|
5232
5241
|
})[0];
|
|
5233
|
-
|
|
5242
|
+
a && (this.showZone = !0, this.form = { ...a.properties });
|
|
5234
5243
|
},
|
|
5235
5244
|
handleRender() {
|
|
5236
|
-
var
|
|
5237
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
5245
|
+
var t;
|
|
5246
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (t = this.map) == null || t.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
5238
5247
|
type: "geojson",
|
|
5239
5248
|
data: this.zone
|
|
5240
5249
|
}), this.map.addLayer({
|
|
@@ -5317,9 +5326,9 @@ const to = {
|
|
|
5317
5326
|
}
|
|
5318
5327
|
}
|
|
5319
5328
|
}, ao = { id: "zone-info" }, io = ["innerHTML"];
|
|
5320
|
-
function ro(
|
|
5329
|
+
function ro(t, e, a, r, i, o) {
|
|
5321
5330
|
var n;
|
|
5322
|
-
return
|
|
5331
|
+
return Me((L(), x("div", ao, [
|
|
5323
5332
|
l("div", {
|
|
5324
5333
|
class: "iconfont close",
|
|
5325
5334
|
onClick: e[0] || (e[0] = (s) => i.showZone = !1)
|
|
@@ -5329,7 +5338,7 @@ function ro(a, e, t, r, i, o) {
|
|
|
5329
5338
|
innerHTML: (n = i.form) == null ? void 0 : n.name
|
|
5330
5339
|
}, null, 8, io)
|
|
5331
5340
|
], 512)), [
|
|
5332
|
-
[
|
|
5341
|
+
[$e, i.showZone]
|
|
5333
5342
|
]);
|
|
5334
5343
|
}
|
|
5335
5344
|
const oo = /* @__PURE__ */ T(to, [["render", ro], ["__scopeId", "data-v-c0864afc"]]);
|
|
@@ -5358,43 +5367,43 @@ const so = {
|
|
|
5358
5367
|
},
|
|
5359
5368
|
computed: {
|
|
5360
5369
|
computeLat() {
|
|
5361
|
-
return function(
|
|
5362
|
-
return K.lat2pretty(
|
|
5370
|
+
return function(t) {
|
|
5371
|
+
return K.lat2pretty(t, 4).pretty;
|
|
5363
5372
|
};
|
|
5364
5373
|
},
|
|
5365
5374
|
computeLng() {
|
|
5366
|
-
return function(
|
|
5367
|
-
return K.lng2pretty(
|
|
5375
|
+
return function(t) {
|
|
5376
|
+
return K.lng2pretty(t, 4).pretty;
|
|
5368
5377
|
};
|
|
5369
5378
|
}
|
|
5370
5379
|
},
|
|
5371
5380
|
watch: {
|
|
5372
5381
|
port: {
|
|
5373
5382
|
handler() {
|
|
5374
|
-
var
|
|
5375
|
-
this.port ? (this.handleRender(), (
|
|
5383
|
+
var t, e;
|
|
5384
|
+
this.port ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.layer], this.handleClick)) : (this.handleClear(), (e = this.map) == null || e.off("click", [this.layer], this.handleClick));
|
|
5376
5385
|
}
|
|
5377
5386
|
}
|
|
5378
5387
|
},
|
|
5379
5388
|
methods: {
|
|
5380
|
-
handleClick(
|
|
5389
|
+
handleClick(t) {
|
|
5381
5390
|
var r;
|
|
5382
|
-
const e =
|
|
5391
|
+
const e = t.features[0], a = (r = this.port) == null ? void 0 : r.features.filter((i) => {
|
|
5383
5392
|
var o;
|
|
5384
5393
|
return i.properties.id === ((o = e == null ? void 0 : e.properties) == null ? void 0 : o.id);
|
|
5385
5394
|
})[0];
|
|
5386
|
-
if (
|
|
5387
|
-
this.showPort = !0, this.form = { ...
|
|
5395
|
+
if (a) {
|
|
5396
|
+
this.showPort = !0, this.form = { ...a.properties }, this.form.lng = a.geometry.coordinates[0], this.form.lat = a.geometry.coordinates[1];
|
|
5388
5397
|
const i = document.getElementById("port-info");
|
|
5389
|
-
this.marker ? this.marker.setLngLat([
|
|
5398
|
+
this.marker ? this.marker.setLngLat([t.lngLat.lng, t.lngLat.lat]) : this.marker = new ie.Marker(i).setLngLat([t.lngLat.lng, t.lngLat.lat]).setOffset([0, -85]).addTo(this.map);
|
|
5390
5399
|
}
|
|
5391
5400
|
},
|
|
5392
5401
|
handleEmit() {
|
|
5393
5402
|
this.$emit("port", this.form);
|
|
5394
5403
|
},
|
|
5395
5404
|
handleRender() {
|
|
5396
|
-
var
|
|
5397
|
-
this.map ? this.port && (this.map.getSource(this.source) ? (
|
|
5405
|
+
var t;
|
|
5406
|
+
this.map ? this.port && (this.map.getSource(this.source) ? (t = this.map) == null || t.getSource(this.source).setData(this.port) : (this.map.addSource(this.source, {
|
|
5398
5407
|
type: "geojson",
|
|
5399
5408
|
data: this.port
|
|
5400
5409
|
}), this.map.addLayer({
|
|
@@ -5425,12 +5434,12 @@ const so = {
|
|
|
5425
5434
|
this.showPort = !1, this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
5426
5435
|
}
|
|
5427
5436
|
}
|
|
5428
|
-
}, Be = (
|
|
5437
|
+
}, Be = (t) => (U("data-v-30e545a2"), t = t(), G(), t), no = { id: "port-info" }, lo = { class: "port-box" }, co = { class: "flex-start" }, ho = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Name : ", -1)), po = { class: "flex-start" }, mo = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Position : ", -1)), uo = { class: "flex-start" }, yo = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "LoCode : ", -1)), fo = {
|
|
5429
5438
|
class: "flex-start",
|
|
5430
5439
|
style: { "align-items": "flex-start" }
|
|
5431
5440
|
}, go = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Region : ", -1));
|
|
5432
|
-
function bo(
|
|
5433
|
-
return
|
|
5441
|
+
function bo(t, e, a, r, i, o) {
|
|
5442
|
+
return Me((L(), x("div", no, [
|
|
5434
5443
|
l("div", {
|
|
5435
5444
|
class: "close iconfont",
|
|
5436
5445
|
onClick: e[0] || (e[0] = (n) => i.showPort = !1)
|
|
@@ -5456,7 +5465,7 @@ function bo(a, e, t, r, i, o) {
|
|
|
5456
5465
|
])
|
|
5457
5466
|
])
|
|
5458
5467
|
], 512)), [
|
|
5459
|
-
[
|
|
5468
|
+
[$e, i.showPort]
|
|
5460
5469
|
]);
|
|
5461
5470
|
}
|
|
5462
5471
|
const vo = /* @__PURE__ */ T(so, [["render", bo], ["__scopeId", "data-v-30e545a2"]]), _o = {
|
|
@@ -5529,7 +5538,7 @@ const vo = /* @__PURE__ */ T(so, [["render", bo], ["__scopeId", "data-v-30e545a2
|
|
|
5529
5538
|
}
|
|
5530
5539
|
}
|
|
5531
5540
|
};
|
|
5532
|
-
function wo(
|
|
5541
|
+
function wo(t, e, a, r, i, o) {
|
|
5533
5542
|
return L(), x("div");
|
|
5534
5543
|
}
|
|
5535
5544
|
const Lo = /* @__PURE__ */ T(_o, [["render", wo]]), xo = {
|
|
@@ -5697,7 +5706,7 @@ const Lo = /* @__PURE__ */ T(_o, [["render", wo]]), xo = {
|
|
|
5697
5706
|
}
|
|
5698
5707
|
}
|
|
5699
5708
|
};
|
|
5700
|
-
function Co(
|
|
5709
|
+
function Co(t, e, a, r, i, o) {
|
|
5701
5710
|
return L(), x("div");
|
|
5702
5711
|
}
|
|
5703
5712
|
const So = /* @__PURE__ */ T(xo, [["render", Co]]), ko = {
|
|
@@ -5788,7 +5797,7 @@ const So = /* @__PURE__ */ T(xo, [["render", Co]]), ko = {
|
|
|
5788
5797
|
}
|
|
5789
5798
|
}
|
|
5790
5799
|
};
|
|
5791
|
-
function zo(
|
|
5800
|
+
function zo(t, e, a, r, i, o) {
|
|
5792
5801
|
return L(), x("div");
|
|
5793
5802
|
}
|
|
5794
5803
|
const Po = /* @__PURE__ */ T(ko, [["render", zo]]), To = {
|
|
@@ -5820,8 +5829,8 @@ const Po = /* @__PURE__ */ T(ko, [["render", zo]]), To = {
|
|
|
5820
5829
|
},
|
|
5821
5830
|
methods: {
|
|
5822
5831
|
handleRender() {
|
|
5823
|
-
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((
|
|
5824
|
-
|
|
5832
|
+
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((t) => {
|
|
5833
|
+
t.geometry.type === "Polygon" && t.geometry.coordinates.forEach((e) => st(e));
|
|
5825
5834
|
}), this.map.addSource(this.source, {
|
|
5826
5835
|
type: "geojson",
|
|
5827
5836
|
data: this.area
|
|
@@ -5881,7 +5890,7 @@ const Po = /* @__PURE__ */ T(ko, [["render", zo]]), To = {
|
|
|
5881
5890
|
}
|
|
5882
5891
|
}
|
|
5883
5892
|
};
|
|
5884
|
-
function Io(
|
|
5893
|
+
function Io(t, e, a, r, i, o) {
|
|
5885
5894
|
return L(), x("div");
|
|
5886
5895
|
}
|
|
5887
5896
|
const Eo = /* @__PURE__ */ T(To, [["render", Io]]), Ro = {
|
|
@@ -5933,11 +5942,11 @@ const Eo = /* @__PURE__ */ T(To, [["render", Io]]), Ro = {
|
|
|
5933
5942
|
}
|
|
5934
5943
|
}
|
|
5935
5944
|
};
|
|
5936
|
-
function Ao(
|
|
5945
|
+
function Ao(t, e, a, r, i, o) {
|
|
5937
5946
|
return L(), x("div");
|
|
5938
5947
|
}
|
|
5939
5948
|
const Do = /* @__PURE__ */ T(Ro, [["render", Ao]]);
|
|
5940
|
-
const
|
|
5949
|
+
const Mo = {
|
|
5941
5950
|
name: "IdmLatLng",
|
|
5942
5951
|
props: {
|
|
5943
5952
|
map: {
|
|
@@ -5976,37 +5985,37 @@ const $o = {
|
|
|
5976
5985
|
},
|
|
5977
5986
|
map: {
|
|
5978
5987
|
handler() {
|
|
5979
|
-
var
|
|
5980
|
-
this.map && ((
|
|
5988
|
+
var t;
|
|
5989
|
+
this.map && ((t = this.map) == null || t.on("mousemove", this.handleMouseMove));
|
|
5981
5990
|
},
|
|
5982
5991
|
immediate: !0
|
|
5983
5992
|
},
|
|
5984
5993
|
toggleVersion: {
|
|
5985
5994
|
handler() {
|
|
5986
|
-
var
|
|
5987
|
-
this.right = (((
|
|
5995
|
+
var t, e, a;
|
|
5996
|
+
this.right = (((t = document.getElementsByClassName("legend-bars")[0]) == null ? void 0 : t.clientWidth) || -10) + (((e = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : e.clientWidth) || 0) + (((a = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : a.clientWidth) || 0) + 20;
|
|
5988
5997
|
},
|
|
5989
5998
|
immediate: !0
|
|
5990
5999
|
}
|
|
5991
6000
|
},
|
|
5992
6001
|
methods: {
|
|
5993
6002
|
handleBind() {
|
|
5994
|
-
var
|
|
5995
|
-
this.show ? ((
|
|
6003
|
+
var t, e;
|
|
6004
|
+
this.show ? ((t = this.map) == null || t.on("zoomend", this.handleZoomEnd), this.handleRender()) : (this.handleClear(), (e = this.map) == null || e.off("zoomend", this.handleZoomEnd));
|
|
5996
6005
|
},
|
|
5997
|
-
handleMouseMove(
|
|
5998
|
-
const e =
|
|
5999
|
-
this.lngLat = { lng:
|
|
6006
|
+
handleMouseMove(t) {
|
|
6007
|
+
const e = t.lngLat, a = K.lng2pretty(e.lng, 2), r = K.lat2pretty(e.lat, 2);
|
|
6008
|
+
this.lngLat = { lng: a, lat: r };
|
|
6000
6009
|
},
|
|
6001
6010
|
handleComputeLatLngs() {
|
|
6002
6011
|
var r;
|
|
6003
|
-
const
|
|
6004
|
-
console.log(
|
|
6012
|
+
const t = (r = this.map) == null ? void 0 : r.getZoom();
|
|
6013
|
+
console.log(t);
|
|
6005
6014
|
let e = 30;
|
|
6006
|
-
|
|
6007
|
-
const
|
|
6015
|
+
t > 4 ? e = 10 : t > 3 && (e = 15);
|
|
6016
|
+
const a = [];
|
|
6008
6017
|
for (let i = -60; i < 90; i += e)
|
|
6009
|
-
|
|
6018
|
+
a.push({
|
|
6010
6019
|
type: "Feature",
|
|
6011
6020
|
geometry: {
|
|
6012
6021
|
type: "LineString",
|
|
@@ -6017,7 +6026,7 @@ const $o = {
|
|
|
6017
6026
|
}
|
|
6018
6027
|
});
|
|
6019
6028
|
for (let i = -180; i < 180; i += e)
|
|
6020
|
-
|
|
6029
|
+
a.push({
|
|
6021
6030
|
type: "Feature",
|
|
6022
6031
|
geometry: {
|
|
6023
6032
|
type: "LineString",
|
|
@@ -6029,7 +6038,7 @@ const $o = {
|
|
|
6029
6038
|
});
|
|
6030
6039
|
for (let i = 180; i > -180; i -= e)
|
|
6031
6040
|
for (let o = -60; o < 90; o += e)
|
|
6032
|
-
|
|
6041
|
+
a.push({
|
|
6033
6042
|
type: "Feature",
|
|
6034
6043
|
geometry: {
|
|
6035
6044
|
type: "Point",
|
|
@@ -6039,21 +6048,21 @@ const $o = {
|
|
|
6039
6048
|
val: `${o > 0 ? o + " N" : o === 0 ? o : o * -1 + " S"}, ${i > 0 ? i + " E" : i * -1 + " W"}`
|
|
6040
6049
|
}
|
|
6041
6050
|
});
|
|
6042
|
-
return
|
|
6051
|
+
return a;
|
|
6043
6052
|
},
|
|
6044
6053
|
handleZoomEnd() {
|
|
6045
6054
|
var e;
|
|
6046
|
-
const
|
|
6047
|
-
(e = this.map) == null || e.getSource(this.source).setData(C.featureCollection(
|
|
6055
|
+
const t = this.handleComputeLatLngs();
|
|
6056
|
+
(e = this.map) == null || e.getSource(this.source).setData(C.featureCollection(t));
|
|
6048
6057
|
},
|
|
6049
6058
|
handleRender() {
|
|
6050
6059
|
if (this.map) {
|
|
6051
|
-
const
|
|
6060
|
+
const t = this.handleComputeLatLngs();
|
|
6052
6061
|
this.map.addSource(this.source, {
|
|
6053
6062
|
type: "geojson",
|
|
6054
6063
|
data: {
|
|
6055
6064
|
type: "FeatureCollection",
|
|
6056
|
-
features:
|
|
6065
|
+
features: t
|
|
6057
6066
|
}
|
|
6058
6067
|
}), this.map.addLayer({
|
|
6059
6068
|
id: this.layer,
|
|
@@ -6088,23 +6097,23 @@ const $o = {
|
|
|
6088
6097
|
}
|
|
6089
6098
|
},
|
|
6090
6099
|
handleClear() {
|
|
6091
|
-
var
|
|
6092
|
-
(
|
|
6100
|
+
var t, e, a, r, i, o;
|
|
6101
|
+
(t = this.map) != null && t.getLayer(this.layer) && ((e = this.map) == null || e.removeLayer(this.layer)), (a = this.map) != null && a.getLayer(this.labelLayer) && ((r = this.map) == null || r.removeLayer(this.labelLayer)), (i = this.map) != null && i.getSource(this.source) && ((o = this.map) == null || o.removeSource(this.source));
|
|
6093
6102
|
}
|
|
6094
6103
|
}
|
|
6095
|
-
},
|
|
6096
|
-
function No(
|
|
6104
|
+
}, $o = (t) => (U("data-v-51cc4052"), t = t(), G(), t), Bo = /* @__PURE__ */ $o(() => /* @__PURE__ */ l("span", null, ", ", -1));
|
|
6105
|
+
function No(t, e, a, r, i, o) {
|
|
6097
6106
|
return i.lngLat ? (L(), x("div", {
|
|
6098
6107
|
key: 0,
|
|
6099
6108
|
class: "lat-lng-tip",
|
|
6100
|
-
style: j({ right: i.right + "px", bottom:
|
|
6109
|
+
style: j({ right: i.right + "px", bottom: a.bottom })
|
|
6101
6110
|
}, [
|
|
6102
6111
|
l("span", null, S(i.lngLat.lat.pretty), 1),
|
|
6103
6112
|
Bo,
|
|
6104
6113
|
l("span", null, S(i.lngLat.lng.pretty), 1)
|
|
6105
6114
|
], 4)) : N("", !0);
|
|
6106
6115
|
}
|
|
6107
|
-
const at = /* @__PURE__ */ T(
|
|
6116
|
+
const at = /* @__PURE__ */ T(Mo, [["render", No], ["__scopeId", "data-v-51cc4052"]]), Oo = {
|
|
6108
6117
|
name: "IdmMeasure",
|
|
6109
6118
|
props: {
|
|
6110
6119
|
map: {
|
|
@@ -6145,82 +6154,82 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6145
6154
|
},
|
|
6146
6155
|
methods: {
|
|
6147
6156
|
handleBind() {
|
|
6148
|
-
var
|
|
6157
|
+
var t, e, a, r, i, o, n, s, c, h;
|
|
6149
6158
|
if (this.show)
|
|
6150
|
-
(
|
|
6159
|
+
(t = this.map) == null || t.getCanvas().addEventListener("keydown", this.handleKeydown), (e = this.map) == null || e.on("mousemove", this.handleMove), (a = this.map) == null || a.on("dblclick", this.handleDblClick), (r = this.map) == null || r.on("click", this.handleClick), (i = this.map) == null || i.on("contextmenu", this.handleContextmenu), this.map && (this.map.getCanvas().style.cursor = "crosshair");
|
|
6151
6160
|
else {
|
|
6152
6161
|
(o = this.map) == null || o.getCanvas().removeEventListener("keydown", this.handleKeydown), (n = this.map) == null || n.off("mousemove", this.handleMove), (s = this.map) == null || s.off("dblclick", this.handleDblClick), (c = this.map) == null || c.off("click", this.handleClick), (h = this.map) == null || h.off("contextmenu", this.handleContextmenu);
|
|
6153
|
-
for (const
|
|
6154
|
-
this.handleClear(
|
|
6162
|
+
for (const p of this.geojson)
|
|
6163
|
+
this.handleClear(p, !0);
|
|
6155
6164
|
this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
6156
6165
|
}
|
|
6157
6166
|
},
|
|
6158
|
-
handleKeydown(
|
|
6159
|
-
if (
|
|
6167
|
+
handleKeydown(t) {
|
|
6168
|
+
if (t.key === "Shift") {
|
|
6160
6169
|
this.navigation = this.navigation === "RL" ? "GC" : "RL";
|
|
6161
|
-
const
|
|
6162
|
-
|
|
6170
|
+
const a = this.geojson.at(-1).features.filter((r) => r.geometry.type === "Point");
|
|
6171
|
+
a.length && (a.at(-1).properties.mode = this.navigation);
|
|
6163
6172
|
}
|
|
6164
6173
|
},
|
|
6165
|
-
handleDrag(
|
|
6166
|
-
var
|
|
6167
|
-
const e = (r = (
|
|
6174
|
+
handleDrag(t) {
|
|
6175
|
+
var a, r, i, o, n, s, c, h, p, d;
|
|
6176
|
+
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
6168
6177
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6169
|
-
const
|
|
6170
|
-
this.pointMarkers[
|
|
6178
|
+
const y = this.geojson.filter((m) => m.id === e.split("-")[0])[0];
|
|
6179
|
+
this.pointMarkers[y.id].filter((m) => {
|
|
6171
6180
|
var v;
|
|
6172
|
-
return ((v =
|
|
6173
|
-
})[0].setLngLat([(o = (i =
|
|
6181
|
+
return ((v = m._element) == null ? void 0 : v.id) === e;
|
|
6182
|
+
})[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]);
|
|
6174
6183
|
let g;
|
|
6175
|
-
|
|
6176
|
-
if (
|
|
6184
|
+
y.features.forEach((m, v) => {
|
|
6185
|
+
if (m.geometry.type === "Point" && m.properties.id == e.split("-")[1]) {
|
|
6177
6186
|
g = v;
|
|
6178
6187
|
return;
|
|
6179
6188
|
}
|
|
6180
6189
|
});
|
|
6181
|
-
const f =
|
|
6190
|
+
const f = y.features.filter((m) => m.geometry.type === "Point");
|
|
6182
6191
|
this.handleTmpPointUpdate(
|
|
6183
|
-
|
|
6192
|
+
y,
|
|
6184
6193
|
f[g - 1],
|
|
6185
|
-
{ lng: (h = (c =
|
|
6194
|
+
{ lng: (h = (c = t.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (d = (p = t.target) == null ? void 0 : p._lngLat) == null ? void 0 : d.lat, properties: f[g].properties },
|
|
6186
6195
|
g === f.length - 1 ? void 0 : f[g + 1]
|
|
6187
6196
|
);
|
|
6188
6197
|
}
|
|
6189
6198
|
},
|
|
6190
|
-
handleDragEnd(
|
|
6191
|
-
var
|
|
6192
|
-
const e = (r = (
|
|
6199
|
+
handleDragEnd(t) {
|
|
6200
|
+
var a, r, i, o, n, s, c, h, p, d;
|
|
6201
|
+
const e = (r = (a = t.target) == null ? void 0 : a._element) == null ? void 0 : r.id;
|
|
6193
6202
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6194
|
-
const
|
|
6195
|
-
this.pointMarkers[
|
|
6196
|
-
var
|
|
6197
|
-
return ((
|
|
6198
|
-
})[0].setLngLat([(o = (i =
|
|
6199
|
-
const g =
|
|
6200
|
-
g.geometry.coordinates = [(h = (c =
|
|
6203
|
+
const y = this.geojson.filter((f) => f.id === e.split("-")[0])[0];
|
|
6204
|
+
this.pointMarkers[y.id].filter((f) => {
|
|
6205
|
+
var m;
|
|
6206
|
+
return ((m = f._element) == null ? void 0 : m.id) === e;
|
|
6207
|
+
})[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]);
|
|
6208
|
+
const g = y.features.filter((f) => f.geometry.type === "Point" && f.properties.id == e.split("-")[1])[0];
|
|
6209
|
+
g.geometry.coordinates = [(h = (c = t.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (d = (p = t.target) == null ? void 0 : p._lngLat) == null ? void 0 : d.lat], y.features = y.features.filter((f) => f.geometry.type === "Point"), this.handlePointUpdate(y);
|
|
6201
6210
|
}
|
|
6202
6211
|
},
|
|
6203
|
-
handleContextmenu(
|
|
6204
|
-
var
|
|
6205
|
-
|
|
6206
|
-
const e = (o = (i = (r =
|
|
6212
|
+
handleContextmenu(t) {
|
|
6213
|
+
var a, r, i, o;
|
|
6214
|
+
t.preventDefault(), (a = this.contextmenu) == null || a.remove();
|
|
6215
|
+
const e = (o = (i = (r = t.originalEvent) == null ? void 0 : r.target) == null ? void 0 : i.parentElement) == null ? void 0 : o.id;
|
|
6207
6216
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6208
6217
|
const s = this.geojson.filter((c) => c.id === e.split("-")[0])[0].features.filter((c) => c.geometry.type === "Point");
|
|
6209
6218
|
if (s.length > 2 && s.filter((h) => h.properties.id === (e == null ? void 0 : e.split("-")[1]))[0]) {
|
|
6210
6219
|
const h = document.createElement("div");
|
|
6211
|
-
h.className = "point-contextmenu-marker", h.innerHTML = `<span id="del-${e}" class="del-point">Del</span>`, this.contextmenu = new ie.Marker(h).setOffset([24, 0]).setLngLat([
|
|
6220
|
+
h.className = "point-contextmenu-marker", h.innerHTML = `<span id="del-${e}" class="del-point">Del</span>`, this.contextmenu = new ie.Marker(h).setOffset([24, 0]).setLngLat([t.lngLat.lng, t.lngLat.lat]).addTo(this.map);
|
|
6212
6221
|
}
|
|
6213
6222
|
}
|
|
6214
6223
|
},
|
|
6215
|
-
handleClick(
|
|
6216
|
-
var
|
|
6217
|
-
(
|
|
6218
|
-
const e =
|
|
6224
|
+
handleClick(t) {
|
|
6225
|
+
var a, r, i, o, n;
|
|
6226
|
+
(a = this.contextmenu) == null || a.remove();
|
|
6227
|
+
const e = t.originalEvent.target.className;
|
|
6219
6228
|
if (e === "marker-close") {
|
|
6220
|
-
const s = (i = (r =
|
|
6229
|
+
const s = (i = (r = t.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, c = this.geojson.filter((h) => h.id === s)[0];
|
|
6221
6230
|
c && this.handleClear(c, !0), this.geojson = this.geojson.filter((h) => h.id !== s);
|
|
6222
6231
|
} else if (e === "del-point") {
|
|
6223
|
-
const s = (n = (o =
|
|
6232
|
+
const s = (n = (o = t.originalEvent.target.id) == null ? void 0 : o.replace("del-", "")) == null ? void 0 : n.split("-"), c = this.geojson.filter((h) => h.id === s[0])[0];
|
|
6224
6233
|
c.features = c.features.filter((h) => h.geometry.type === "Point" && h.properties.id !== s[1]), this.handlePointUpdate(c);
|
|
6225
6234
|
} else if (e !== "marker-label") {
|
|
6226
6235
|
let s = this.geojson.at(-1);
|
|
@@ -6228,7 +6237,7 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6228
6237
|
const c = C.feature(
|
|
6229
6238
|
{
|
|
6230
6239
|
type: "Point",
|
|
6231
|
-
coordinates: [
|
|
6240
|
+
coordinates: [t.lngLat.lng, t.lngLat.lat]
|
|
6232
6241
|
},
|
|
6233
6242
|
{
|
|
6234
6243
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -6238,41 +6247,41 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6238
6247
|
s.features.push(c), this.handlePointUpdate(s);
|
|
6239
6248
|
}
|
|
6240
6249
|
},
|
|
6241
|
-
handlePointUpdate(
|
|
6242
|
-
const e =
|
|
6250
|
+
handlePointUpdate(t) {
|
|
6251
|
+
const e = t.features;
|
|
6243
6252
|
if (e.length > 1) {
|
|
6244
|
-
let
|
|
6253
|
+
let a = 0;
|
|
6245
6254
|
const r = [];
|
|
6246
6255
|
for (let i = 1; i < e.length; i++) {
|
|
6247
|
-
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] },
|
|
6248
|
-
|
|
6249
|
-
let
|
|
6250
|
-
s.mode === "RL" ?
|
|
6251
|
-
const u = C.lineString(
|
|
6252
|
-
u.properties.dist =
|
|
6256
|
+
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] }, p = Oe(c, h, s.mode === "RL", 2), d = We(c, h, s.mode === "RL", 2);
|
|
6257
|
+
a = K.roundPrecision(a + p, 2);
|
|
6258
|
+
let y;
|
|
6259
|
+
s.mode === "RL" ? y = pe([c, h]) : y = pe(je(c, h, 200));
|
|
6260
|
+
const u = C.lineString(y.map((g) => [g.lng, g.lat]));
|
|
6261
|
+
u.properties.dist = p, u.properties.bearing = d, u.properties.total = a, r.push(u);
|
|
6253
6262
|
}
|
|
6254
|
-
e.push(...r),
|
|
6263
|
+
e.push(...r), t.total = a;
|
|
6255
6264
|
}
|
|
6256
|
-
return this.handleRender(
|
|
6265
|
+
return this.handleRender(t), t;
|
|
6257
6266
|
},
|
|
6258
|
-
handleTmpPointUpdate(
|
|
6267
|
+
handleTmpPointUpdate(t, e, a, r) {
|
|
6259
6268
|
const i = C.featureCollection([]);
|
|
6260
6269
|
let o, n;
|
|
6261
6270
|
if (e) {
|
|
6262
|
-
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] },
|
|
6263
|
-
o =
|
|
6271
|
+
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, p = { lng: a.lng, lat: a.lat };
|
|
6272
|
+
o = Oe(h, p, c.mode === "RL", 2), n = We(h, p, c.mode === "RL", 2);
|
|
6264
6273
|
let d;
|
|
6265
|
-
c.mode === "RL" ? d = pe([h,
|
|
6266
|
-
const
|
|
6267
|
-
|
|
6274
|
+
c.mode === "RL" ? d = pe([h, p]) : d = pe(je(h, p, 200));
|
|
6275
|
+
const y = C.lineString(d.map((u) => [u.lng, u.lat]));
|
|
6276
|
+
y.properties.dist = o, y.properties.bearing = n, i.features.push(y);
|
|
6268
6277
|
}
|
|
6269
6278
|
if (r) {
|
|
6270
|
-
const c =
|
|
6271
|
-
o =
|
|
6279
|
+
const c = a.properties, h = a, p = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
6280
|
+
o = Oe(h, p, c.mode === "RL", 2), n = We(h, p, c.mode === "RL", 2);
|
|
6272
6281
|
let d;
|
|
6273
|
-
c.mode === "RL" ? d = pe([h,
|
|
6274
|
-
const
|
|
6275
|
-
|
|
6282
|
+
c.mode === "RL" ? d = pe([h, p]) : d = pe(je(h, p, 200));
|
|
6283
|
+
const y = C.lineString(d.map((u) => [u.lng, u.lat]));
|
|
6284
|
+
y.properties.dist = o, y.properties.bearing = n, i.features.push(y);
|
|
6276
6285
|
}
|
|
6277
6286
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
6278
6287
|
type: "geojson",
|
|
@@ -6312,36 +6321,36 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6312
6321
|
}
|
|
6313
6322
|
});
|
|
6314
6323
|
let s;
|
|
6315
|
-
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${K.roundPrecision((
|
|
6316
|
-
this.tipMarker._element.innerHTML = s, this.tipMarker.setLngLat([
|
|
6324
|
+
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${K.roundPrecision((t.total ?? 0) + o, 2)}</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)
|
|
6325
|
+
this.tipMarker._element.innerHTML = s, this.tipMarker.setLngLat([a.lng, a.lat]);
|
|
6317
6326
|
else {
|
|
6318
6327
|
const c = document.createElement("div");
|
|
6319
|
-
c.className = "tip-marker", c.innerHTML = s, this.tipMarker = new ie.Marker(c).setOffset([140, 0]).setLngLat([
|
|
6328
|
+
c.className = "tip-marker", c.innerHTML = s, this.tipMarker = new ie.Marker(c).setOffset([140, 0]).setLngLat([a.lng, a.lat]).addTo(this.map);
|
|
6320
6329
|
}
|
|
6321
6330
|
},
|
|
6322
|
-
handleMove(
|
|
6331
|
+
handleMove(t) {
|
|
6323
6332
|
this.map.getCanvas().style.cursor = "crosshair";
|
|
6324
6333
|
let e = this.geojson.at(-1);
|
|
6325
6334
|
e || (e = C.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(e));
|
|
6326
|
-
const
|
|
6327
|
-
|
|
6335
|
+
const a = e.features.filter((r) => r.geometry.type === "Point");
|
|
6336
|
+
a != null && a.length && this.handleTmpPointUpdate(e, a.at(-1), { lng: t.lngLat.lng, lat: t.lngLat.lat });
|
|
6328
6337
|
},
|
|
6329
|
-
handleDblClick(
|
|
6330
|
-
|
|
6338
|
+
handleDblClick(t) {
|
|
6339
|
+
t.preventDefault();
|
|
6331
6340
|
let e = this.geojson.at(-1);
|
|
6332
6341
|
e.closed = !0, this.handleRender(e), e = C.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(e);
|
|
6333
6342
|
},
|
|
6334
|
-
handleRender(
|
|
6343
|
+
handleRender(t) {
|
|
6335
6344
|
var e;
|
|
6336
|
-
if ((e =
|
|
6337
|
-
const
|
|
6338
|
-
this.map.getSource(
|
|
6345
|
+
if ((e = t == null ? void 0 : t.features) != null && e.length) {
|
|
6346
|
+
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
6347
|
+
this.map.getSource(a) ? this.map.getSource(a).setData(t) : this.map.addSource(a, {
|
|
6339
6348
|
type: "geojson",
|
|
6340
|
-
data:
|
|
6341
|
-
}), this.handleClear(
|
|
6349
|
+
data: t
|
|
6350
|
+
}), this.handleClear(t, !1), this.map.addLayer({
|
|
6342
6351
|
id: r,
|
|
6343
6352
|
type: "line",
|
|
6344
|
-
source:
|
|
6353
|
+
source: a,
|
|
6345
6354
|
filter: ["==", "$type", "LineString"],
|
|
6346
6355
|
layout: {
|
|
6347
6356
|
"line-cap": "round",
|
|
@@ -6354,7 +6363,7 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6354
6363
|
}), this.map.addLayer({
|
|
6355
6364
|
id: i,
|
|
6356
6365
|
type: "symbol",
|
|
6357
|
-
source:
|
|
6366
|
+
source: a,
|
|
6358
6367
|
filter: ["==", "$type", "LineString"],
|
|
6359
6368
|
layout: {
|
|
6360
6369
|
"symbol-placement": "line-center",
|
|
@@ -6370,32 +6379,32 @@ const at = /* @__PURE__ */ T($o, [["render", No], ["__scopeId", "data-v-51cc4052
|
|
|
6370
6379
|
"text-halo-blur": 0
|
|
6371
6380
|
}
|
|
6372
6381
|
});
|
|
6373
|
-
const o =
|
|
6382
|
+
const o = t.features.filter((n) => n.geometry.type === "Point");
|
|
6374
6383
|
for (const n of o) {
|
|
6375
6384
|
const s = document.createElement("div");
|
|
6376
|
-
s.id = `${
|
|
6385
|
+
s.id = `${t.id}-${n.properties.id}`, s.className = `${t.closed ? "point-marker closed" : "point-marker"}`, s.innerHTML = '<div class="marker-circle"></div>';
|
|
6377
6386
|
const c = new ie.Marker({ element: s, draggable: !0, contextmenu: !0 }).setLngLat(n.geometry.coordinates).addTo(this.map);
|
|
6378
|
-
c.on("drag", this.handleDrag), c.on("dragend", this.handleDragEnd), this.pointMarkers[
|
|
6387
|
+
c.on("drag", this.handleDrag), c.on("dragend", this.handleDragEnd), this.pointMarkers[t.id] ? this.pointMarkers[t.id].push(c) : this.pointMarkers[t.id] = [c];
|
|
6379
6388
|
}
|
|
6380
|
-
if (
|
|
6381
|
-
const n = o.at(-1), c =
|
|
6382
|
-
h.className = "point-summary-marker", h.innerHTML = `<div id="${
|
|
6389
|
+
if (t.closed) {
|
|
6390
|
+
const n = o.at(-1), c = t.features.filter((p) => p.geometry.type === "LineString").at(-1), h = document.createElement("div");
|
|
6391
|
+
h.className = "point-summary-marker", h.innerHTML = `<div id="${t.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`, this.closeMarkers[t.id] = new ie.Marker(h).setOffset([60, 0]).setLngLat(n.geometry.coordinates).addTo(this.map);
|
|
6383
6392
|
}
|
|
6384
6393
|
}
|
|
6385
6394
|
},
|
|
6386
|
-
handleClear(
|
|
6387
|
-
var o, n, s, c, h,
|
|
6388
|
-
const
|
|
6389
|
-
(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[
|
|
6395
|
+
handleClear(t, e = !0) {
|
|
6396
|
+
var o, n, s, c, h, p, d, y, u;
|
|
6397
|
+
const a = `${t.id}-${this.source}`, r = `${t.id}-${this.layer}`, i = `${t.id}-${this.labelLayer}`;
|
|
6398
|
+
(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, (p = this.pointMarkers[t.id]) == null || p.forEach((g) => {
|
|
6390
6399
|
g == null || g.remove();
|
|
6391
|
-
}), this.pointMarkers[
|
|
6400
|
+
}), this.pointMarkers[t.id] = [], (d = this.tipMarker) == null || d.remove(), this.tipMarker = void 0, e && ((y = this.map) != null && y.getSource(a)) && this.map.removeSource(a), e && ((u = this.map) != null && u.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
6392
6401
|
}
|
|
6393
6402
|
}
|
|
6394
6403
|
};
|
|
6395
|
-
function
|
|
6404
|
+
function Wo(t, e, a, r, i, o) {
|
|
6396
6405
|
return L(), x("div");
|
|
6397
6406
|
}
|
|
6398
|
-
const jo = /* @__PURE__ */ T(
|
|
6407
|
+
const jo = /* @__PURE__ */ T(Oo, [["render", Wo]]);
|
|
6399
6408
|
const Fo = {
|
|
6400
6409
|
name: "IdmENC",
|
|
6401
6410
|
props: {
|
|
@@ -6441,23 +6450,23 @@ const Fo = {
|
|
|
6441
6450
|
},
|
|
6442
6451
|
toggleVersion: {
|
|
6443
6452
|
handler() {
|
|
6444
|
-
var
|
|
6445
|
-
this.right = (((
|
|
6453
|
+
var t, e;
|
|
6454
|
+
this.right = (((t = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : t.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
6446
6455
|
},
|
|
6447
6456
|
immediate: !0
|
|
6448
6457
|
}
|
|
6449
6458
|
},
|
|
6450
6459
|
methods: {}
|
|
6451
|
-
}, it = (
|
|
6460
|
+
}, it = (t) => (U("data-v-ab627b83"), t = t(), G(), t), Vo = { key: 0 }, Uo = { class: "bar-item" }, Go = /* @__PURE__ */ it(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "HI", -1)), Ho = [
|
|
6452
6461
|
Go
|
|
6453
6462
|
], Zo = /* @__PURE__ */ it(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "I4", -1)), Xo = [
|
|
6454
6463
|
Zo
|
|
6455
6464
|
];
|
|
6456
|
-
function Jo(
|
|
6457
|
-
return
|
|
6465
|
+
function Jo(t, e, a, r, i, o) {
|
|
6466
|
+
return a.enabled && a.permission & i.helper.LEVEL.Supper ? (L(), x("div", Vo, [
|
|
6458
6467
|
l("div", {
|
|
6459
6468
|
class: "menu-bar-box",
|
|
6460
|
-
style: j({ position: "absolute", right: i.right + "px", bottom:
|
|
6469
|
+
style: j({ position: "absolute", right: i.right + "px", bottom: a.bottom })
|
|
6461
6470
|
}, [
|
|
6462
6471
|
l("div", Uo, [
|
|
6463
6472
|
l("div", {
|
|
@@ -6483,7 +6492,7 @@ const Yo = {
|
|
|
6483
6492
|
IdmCurrentParticle: Ea,
|
|
6484
6493
|
IdmSigWave: Da,
|
|
6485
6494
|
IdmSwell: Ba,
|
|
6486
|
-
IdmPrmsl:
|
|
6495
|
+
IdmPrmsl: Wa,
|
|
6487
6496
|
// IdmIceEdge,
|
|
6488
6497
|
IdmIceberg: Va,
|
|
6489
6498
|
IdmTropicals: tt,
|
|
@@ -6552,8 +6561,8 @@ const Yo = {
|
|
|
6552
6561
|
},
|
|
6553
6562
|
watch: {
|
|
6554
6563
|
ts: {
|
|
6555
|
-
handler(
|
|
6556
|
-
|
|
6564
|
+
handler(t, e) {
|
|
6565
|
+
t && e && Q(t).utc().format("yyyy-MM-DD HH") !== Q(e).utc().format("yyyy-MM-DD HH") && this.$nextTick(() => {
|
|
6557
6566
|
this.handleDateChange({ tropicals: !1 });
|
|
6558
6567
|
});
|
|
6559
6568
|
},
|
|
@@ -6561,31 +6570,25 @@ const Yo = {
|
|
|
6561
6570
|
},
|
|
6562
6571
|
map: {
|
|
6563
6572
|
handler() {
|
|
6564
|
-
var
|
|
6565
|
-
this.map && (this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new Ue(this.map), this.handleRampColorInitial(), this.activeWeatherLayers.
|
|
6573
|
+
var t, e, a, r, i, o, n, s, c, h, p, d, y, u, g;
|
|
6574
|
+
this.map && (this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new Ue(this.map), this.handleRampColorInitial(), this.activeWeatherLayers.length > 0 ? ((e = (t = this.map) == null ? void 0 : t.getLayer(this.enc)) == null || e.setLayoutProperty("visibility", "none"), (r = (a = this.map) == null ? void 0 : a.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || r.setLayoutProperty("visibility", "visible"), (i = this.map) != null && i.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id) && ((n = this.map) == null || n.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (c = this.map) != null && c.getLayer((s = this.viewport) == null ? void 0 : s.particleLayer) && ((p = this.map) == null || p.moveLayer((h = this.viewport) == null ? void 0 : h.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((y = (d = this.map) == null ? void 0 : d.getLayer(this.enc)) == null || y.setLayoutProperty("visibility", "visible"), (g = (u = this.map) == null ? void 0 : u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || g.setLayoutProperty("visibility", "none")));
|
|
6566
6575
|
},
|
|
6567
6576
|
immediate: !0
|
|
6568
6577
|
},
|
|
6569
6578
|
enc: {
|
|
6570
|
-
handler(
|
|
6571
|
-
var
|
|
6572
|
-
|
|
6579
|
+
handler(t, e) {
|
|
6580
|
+
var a, r, i, o, n, s, c, h;
|
|
6581
|
+
t ? ((r = (a = this.map) == null ? void 0 : a.getLayer(t)) == null || r.setLayoutProperty("visibility", "visible"), (o = (i = this.map) == null ? void 0 : i.getLayer(e)) == null || o.setLayoutProperty("visibility", "none")) : ((s = (n = this.map) == null ? void 0 : n.getLayer("i4")) == null || s.setLayoutProperty("visibility", "none"), (h = (c = this.map) == null ? void 0 : c.getLayer("hi")) == null || h.setLayoutProperty("visibility", "none"));
|
|
6573
6582
|
}
|
|
6574
6583
|
},
|
|
6575
6584
|
activeWeatherLayers: {
|
|
6576
6585
|
handler() {
|
|
6577
|
-
var
|
|
6586
|
+
var t, e, a, r, i, o, n, s, c, h, p, d, y, u, g;
|
|
6578
6587
|
if (!this.map)
|
|
6579
6588
|
return !1;
|
|
6580
|
-
this.activeWeatherLayers.
|
|
6589
|
+
this.activeWeatherLayers.length > 0 ? ((e = (t = this.map) == null ? void 0 : t.getLayer(this.enc)) == null || e.setLayoutProperty("visibility", "none"), (r = (a = this.map) == null ? void 0 : a.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || r.setLayoutProperty("visibility", "visible"), (i = this.map) != null && i.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id) && ((n = this.map) == null || n.moveLayer((o = this.viewport) == null ? void 0 : o.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (c = this.map) != null && c.getLayer((s = this.viewport) == null ? void 0 : s.particleLayer) && ((p = this.map) == null || p.moveLayer((h = this.viewport) == null ? void 0 : h.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((y = (d = this.map) == null ? void 0 : d.getLayer(this.enc)) == null || y.setLayoutProperty("visibility", "visible"), (g = (u = this.map) == null ? void 0 : u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || g.setLayoutProperty("visibility", "none"));
|
|
6581
6590
|
},
|
|
6582
6591
|
immediate: !0
|
|
6583
|
-
},
|
|
6584
|
-
"particleFactor.particle": {
|
|
6585
|
-
handler() {
|
|
6586
|
-
var a, e, t, r, i;
|
|
6587
|
-
this.activeWeatherLayers.some((o) => ["wind", "current"].includes(o.key)) && !((a = this.particleFactor) != null && a.particle) && !this.activeWeatherLayers.some((o) => ["temp", "water-temp"].includes(o.key)) && ((t = this.map) == null || t.moveLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer, null), (i = (r = this.map) == null ? void 0 : r.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || i.setLayoutProperty("visibility", "none"));
|
|
6588
|
-
}
|
|
6589
6592
|
}
|
|
6590
6593
|
/** for offline map**/
|
|
6591
6594
|
// activeWeatherLayers: {
|
|
@@ -6629,28 +6632,28 @@ const Yo = {
|
|
|
6629
6632
|
// },
|
|
6630
6633
|
},
|
|
6631
6634
|
methods: {
|
|
6632
|
-
async fetchWeatherLayers(
|
|
6633
|
-
var i, o, n, s, c, h,
|
|
6635
|
+
async fetchWeatherLayers(t = { tropicals: !1 }) {
|
|
6636
|
+
var i, o, n, s, c, h, p, d;
|
|
6634
6637
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
6635
|
-
let
|
|
6638
|
+
let a = 0, r = 0;
|
|
6636
6639
|
if (this.map) {
|
|
6637
|
-
const
|
|
6640
|
+
const y = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, u = (o = this.map) == null ? void 0 : o.getBounds(), g = `${u._sw.lng},${u._sw.lat},${u._ne.lng},${u._ne.lat}`;
|
|
6638
6641
|
if (this.handleRampColorState(), this.particleFactor) {
|
|
6639
|
-
const f = Fe.WEATHER_LAYERS.find((
|
|
6642
|
+
const f = Fe.WEATHER_LAYERS.find((m) => {
|
|
6640
6643
|
var v;
|
|
6641
|
-
return ((v =
|
|
6644
|
+
return ((v = m.peer) == null ? void 0 : v.weight) === this.particleFactor.weight;
|
|
6642
6645
|
});
|
|
6643
6646
|
this.particleFactor.particle ? this.weatherWeight = this.weatherWeight & f.weight ? this.weatherWeight : this.weatherWeight + f.weight : this.weatherWeight = this.weatherWeight & f.weight ? this.weatherWeight - f.weight : this.weatherWeight;
|
|
6644
6647
|
}
|
|
6645
6648
|
if (this.weatherWeight > 0) {
|
|
6646
|
-
let f = this.weatherWeight,
|
|
6647
|
-
if (
|
|
6648
|
-
const v = await ae.get(`${this.gateway}/api/arc/weather/layers/links?l=${f}&v=${this.source}&z=${
|
|
6649
|
+
let f = this.weatherWeight, m;
|
|
6650
|
+
if (t.tropicals || this.weatherWeight & 256 && (m = this.weatherLayers.tropicals, m && (f -= 256, m.version = Math.random() + 1)), f > 0) {
|
|
6651
|
+
const v = await ae.get(`${this.gateway}/api/arc/weather/layers/links?l=${f}&v=${this.source}&z=${y}&bbox=${g}&t=${this.ts}`, {
|
|
6649
6652
|
headers: {
|
|
6650
6653
|
Authorization: this.token || this.defaultMeteoToken
|
|
6651
6654
|
}
|
|
6652
6655
|
});
|
|
6653
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e +
|
|
6656
|
+
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) {
|
|
6654
6657
|
const b = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data, w = [];
|
|
6655
6658
|
for (const _ in b)
|
|
6656
6659
|
_ === "ice-edge" && (b[_] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), _ !== "tropicals" && w.push(
|
|
@@ -6660,16 +6663,16 @@ const Yo = {
|
|
|
6660
6663
|
key: _
|
|
6661
6664
|
},
|
|
6662
6665
|
responseType: /\.(jpg|png)$/.test(b[_]) ? "blob" : "json"
|
|
6663
|
-
}).catch((
|
|
6664
|
-
console.log(`[${_}] fetch layer error: ${
|
|
6666
|
+
}).catch((A) => {
|
|
6667
|
+
console.log(`[${_}] fetch layer error: ${A}`);
|
|
6665
6668
|
})
|
|
6666
6669
|
);
|
|
6667
6670
|
const k = await Promise.all(w);
|
|
6668
6671
|
this.weatherLayers = {}, k.map((_) => {
|
|
6669
|
-
var $,
|
|
6670
|
-
const
|
|
6671
|
-
D &&
|
|
6672
|
-
raw:
|
|
6672
|
+
var $, O, W, H;
|
|
6673
|
+
const A = (($ = _ == null ? void 0 : _.data) == null ? void 0 : $.data) || (_ == null ? void 0 : _.data), D = (W = (O = _ == null ? void 0 : _.config) == null ? void 0 : O.headers) == null ? void 0 : W.key;
|
|
6674
|
+
D && A && (this.weatherLayers[D] = {
|
|
6675
|
+
raw: A,
|
|
6673
6676
|
type: ((H = _ == null ? void 0 : _.config) == null ? void 0 : H.responseType) === "blob" ? "image" : "json",
|
|
6674
6677
|
etime: this.ts
|
|
6675
6678
|
});
|
|
@@ -6679,10 +6682,10 @@ const Yo = {
|
|
|
6679
6682
|
key: "tropicals"
|
|
6680
6683
|
}
|
|
6681
6684
|
}).then((_) => {
|
|
6682
|
-
var $,
|
|
6683
|
-
const
|
|
6685
|
+
var $, O, W;
|
|
6686
|
+
const A = et.convert2Geojson((($ = _ == null ? void 0 : _.data) == null ? void 0 : $.data) || (_ == null ? void 0 : _.data)), D = (W = (O = _ == null ? void 0 : _.config) == null ? void 0 : O.headers) == null ? void 0 : W.key;
|
|
6684
6687
|
this.weatherLayers[D] = {
|
|
6685
|
-
data:
|
|
6688
|
+
data: A,
|
|
6686
6689
|
active: !0,
|
|
6687
6690
|
cached: !1,
|
|
6688
6691
|
type: "json",
|
|
@@ -6691,7 +6694,7 @@ const Yo = {
|
|
|
6691
6694
|
};
|
|
6692
6695
|
});
|
|
6693
6696
|
}
|
|
6694
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e +
|
|
6697
|
+
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"]) {
|
|
6695
6698
|
const b = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw, w = (h = this.weatherLayers["swell-height"]) == null ? void 0 : h.raw;
|
|
6696
6699
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
6697
6700
|
type: "json",
|
|
@@ -6701,7 +6704,7 @@ const Yo = {
|
|
|
6701
6704
|
};
|
|
6702
6705
|
}
|
|
6703
6706
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
6704
|
-
const b = (
|
|
6707
|
+
const b = (p = this.weatherLayers["current-direction"]) == null ? void 0 : p.raw, w = (d = this.weatherLayers["current-speed"]) == null ? void 0 : d.raw;
|
|
6705
6708
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
6706
6709
|
type: "json",
|
|
6707
6710
|
direction: b,
|
|
@@ -6710,27 +6713,27 @@ const Yo = {
|
|
|
6710
6713
|
};
|
|
6711
6714
|
}
|
|
6712
6715
|
}
|
|
6713
|
-
|
|
6716
|
+
m && (m.etime = this.ts, m.cached = !0, this.weatherLayers.tropicals = m);
|
|
6714
6717
|
}
|
|
6715
6718
|
this.handleWeatherLayerToggle(), this.handleDragEndWithZoom4Json();
|
|
6716
6719
|
}
|
|
6717
6720
|
this.toggleVersion = Math.random();
|
|
6718
6721
|
},
|
|
6719
|
-
async fetchOtherLayers(
|
|
6720
|
-
var e,
|
|
6722
|
+
async fetchOtherLayers(t = { all: !1, dayNight: !1, enc: !1 }) {
|
|
6723
|
+
var e, a, r, i;
|
|
6721
6724
|
if (this.map) {
|
|
6722
6725
|
let o = this.otherWeight;
|
|
6723
6726
|
if (o) {
|
|
6724
6727
|
let n = !1;
|
|
6725
6728
|
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, n = !0), o) {
|
|
6726
|
-
if (
|
|
6729
|
+
if (t.all) {
|
|
6727
6730
|
const s = await ae.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
6728
6731
|
headers: {
|
|
6729
6732
|
Authorization: this.token || this.defaultMeteoToken
|
|
6730
6733
|
}
|
|
6731
6734
|
});
|
|
6732
6735
|
if (((e = s == null ? void 0 : s.data) == null ? void 0 : e.code) === 0) {
|
|
6733
|
-
const c = (
|
|
6736
|
+
const c = (a = s == null ? void 0 : s.data) == null ? void 0 : a.data, h = [];
|
|
6734
6737
|
for (const d in c)
|
|
6735
6738
|
h.push(
|
|
6736
6739
|
ae.get(c[d], {
|
|
@@ -6740,14 +6743,14 @@ const Yo = {
|
|
|
6740
6743
|
}
|
|
6741
6744
|
})
|
|
6742
6745
|
);
|
|
6743
|
-
const
|
|
6744
|
-
this.otherLayers = { enc: n },
|
|
6745
|
-
var g, f,
|
|
6746
|
-
const
|
|
6747
|
-
this.otherLayers[u] =
|
|
6746
|
+
const p = await Promise.all(h);
|
|
6747
|
+
this.otherLayers = { enc: n }, p.map((d) => {
|
|
6748
|
+
var g, f, m;
|
|
6749
|
+
const y = ((g = d == null ? void 0 : d.data) == null ? void 0 : g.data) || (d == null ? void 0 : d.data), u = (m = (f = d == null ? void 0 : d.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6750
|
+
this.otherLayers[u] = y;
|
|
6748
6751
|
});
|
|
6749
6752
|
}
|
|
6750
|
-
} else if (
|
|
6753
|
+
} else if (t.dayNight && o & 1024) {
|
|
6751
6754
|
const s = await ae.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
6752
6755
|
headers: {
|
|
6753
6756
|
Authorization: this.token || this.defaultMeteoToken
|
|
@@ -6765,9 +6768,9 @@ const Yo = {
|
|
|
6765
6768
|
})
|
|
6766
6769
|
);
|
|
6767
6770
|
(await Promise.all(h)).map((d) => {
|
|
6768
|
-
var g, f,
|
|
6769
|
-
const
|
|
6770
|
-
this.otherLayers[u] =
|
|
6771
|
+
var g, f, m;
|
|
6772
|
+
const y = ((g = d == null ? void 0 : d.data) == null ? void 0 : g.data) || (d == null ? void 0 : d.data), u = (m = (f = d == null ? void 0 : d.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6773
|
+
this.otherLayers[u] = y;
|
|
6771
6774
|
});
|
|
6772
6775
|
}
|
|
6773
6776
|
}
|
|
@@ -6779,8 +6782,8 @@ const Yo = {
|
|
|
6779
6782
|
}
|
|
6780
6783
|
},
|
|
6781
6784
|
handleRampColorState() {
|
|
6782
|
-
var
|
|
6783
|
-
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (
|
|
6785
|
+
var t;
|
|
6786
|
+
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (t = this.particleFactor) != null && t.particle)
|
|
6784
6787
|
this.showRampColor = !0, this.showWindParticle = this.particleFactor.key === "wind", this.showCurrentParticle = this.particleFactor.key === "current", this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.type === "json");
|
|
6785
6788
|
else
|
|
6786
6789
|
for (const e of this.activeWeatherLayers)
|
|
@@ -6788,10 +6791,10 @@ const Yo = {
|
|
|
6788
6791
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
6789
6792
|
},
|
|
6790
6793
|
handleRampColorInitial() {
|
|
6791
|
-
var
|
|
6792
|
-
this.viewport.map.getSource((
|
|
6794
|
+
var t, e, a, r, i, o, n, s, c, h, p, d;
|
|
6795
|
+
this.viewport.map.getSource((t = this.viewport) == null ? void 0 : t.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
6793
6796
|
type: "canvas",
|
|
6794
|
-
canvas: (
|
|
6797
|
+
canvas: (a = this.viewport) == null ? void 0 : a.rampColorCanvas,
|
|
6795
6798
|
animate: !0,
|
|
6796
6799
|
coordinates: this.viewport.getBoundLngLat()
|
|
6797
6800
|
}), this.viewport.map.getLayer((r = this.viewport) == null ? void 0 : r.rampColorLayer) || this.viewport.map.addLayer(
|
|
@@ -6812,7 +6815,7 @@ const Yo = {
|
|
|
6812
6815
|
}), this.viewport.map.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) || this.viewport.map.addLayer(
|
|
6813
6816
|
{
|
|
6814
6817
|
type: "raster",
|
|
6815
|
-
id: (
|
|
6818
|
+
id: (p = this.viewport) == null ? void 0 : p.particleLayer,
|
|
6816
6819
|
source: (d = this.viewport) == null ? void 0 : d.particleSource,
|
|
6817
6820
|
layout: {
|
|
6818
6821
|
visibility: "none"
|
|
@@ -6822,69 +6825,69 @@ const Yo = {
|
|
|
6822
6825
|
);
|
|
6823
6826
|
},
|
|
6824
6827
|
handleDragEndWithZoom4Json() {
|
|
6825
|
-
var h,
|
|
6826
|
-
const
|
|
6827
|
-
let e = 0,
|
|
6828
|
+
var h, p, d, y;
|
|
6829
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
6830
|
+
let e = 0, a = 0;
|
|
6828
6831
|
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);
|
|
6829
6832
|
for (const u in this.weatherLayers)
|
|
6830
6833
|
if (this.weatherLayers[u].active && this.weatherLayers[u].type === "json") {
|
|
6831
6834
|
this.weatherLayers[u].active = !1, this.weatherLayers[u].version = Math.random() + 1;
|
|
6832
6835
|
let g = [];
|
|
6833
6836
|
if (["swell", "current"].includes(u)) {
|
|
6834
|
-
const f = ((
|
|
6835
|
-
for (const
|
|
6836
|
-
if (
|
|
6837
|
-
const v = f[
|
|
6837
|
+
const f = ((p = this.weatherLayers[u]) == null ? void 0 : p.direction) || {};
|
|
6838
|
+
for (const m in f)
|
|
6839
|
+
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6840
|
+
const v = f[m].lng;
|
|
6838
6841
|
o > n ? v.forEach((b, w) => {
|
|
6839
6842
|
var k;
|
|
6840
6843
|
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6841
|
-
const _ = C.point([b,
|
|
6842
|
-
val: f[
|
|
6843
|
-
spd: (k = f[
|
|
6844
|
+
const _ = C.point([b, m], {
|
|
6845
|
+
val: f[m].val[w],
|
|
6846
|
+
spd: (k = f[m].spd) == null ? void 0 : k[w]
|
|
6844
6847
|
});
|
|
6845
6848
|
g.push(_);
|
|
6846
6849
|
}
|
|
6847
6850
|
}) : v.forEach((b, w) => {
|
|
6848
6851
|
var k;
|
|
6849
6852
|
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6850
|
-
const _ = C.point([b,
|
|
6851
|
-
val: f[
|
|
6852
|
-
spd: (k = f[
|
|
6853
|
+
const _ = C.point([b, m], {
|
|
6854
|
+
val: f[m].val[w],
|
|
6855
|
+
spd: (k = f[m].spd) == null ? void 0 : k[w]
|
|
6853
6856
|
});
|
|
6854
6857
|
g.push(_);
|
|
6855
6858
|
}
|
|
6856
6859
|
});
|
|
6857
6860
|
}
|
|
6858
|
-
if (
|
|
6859
|
-
const
|
|
6860
|
-
if (
|
|
6861
|
-
if (!
|
|
6861
|
+
if (a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("direction elapsed: ", a, ", total: ", e += a), u === "swell") {
|
|
6862
|
+
const m = this.weatherLayers[u].height;
|
|
6863
|
+
if (m) {
|
|
6864
|
+
if (!m.data) {
|
|
6862
6865
|
const v = [];
|
|
6863
|
-
for (const b in (d =
|
|
6864
|
-
const w =
|
|
6866
|
+
for (const b in (d = m.raw) == null ? void 0 : d.LineString) {
|
|
6867
|
+
const w = m.raw.LineString[b];
|
|
6865
6868
|
for (const k of w)
|
|
6866
6869
|
v.push(
|
|
6867
6870
|
C.lineString(k, {
|
|
6868
6871
|
val: Number(b)
|
|
6869
6872
|
})
|
|
6870
6873
|
);
|
|
6871
|
-
|
|
6874
|
+
m.data = C.featureCollection(v);
|
|
6872
6875
|
}
|
|
6873
6876
|
}
|
|
6874
|
-
if (
|
|
6875
|
-
const v = this.handleBboxClip(
|
|
6877
|
+
if (m.data) {
|
|
6878
|
+
const v = this.handleBboxClip(m.data, r);
|
|
6876
6879
|
g = g.concat(v);
|
|
6877
6880
|
}
|
|
6878
|
-
|
|
6881
|
+
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("height elapsed: ", a, ", total: ", e += a);
|
|
6879
6882
|
}
|
|
6880
6883
|
}
|
|
6881
6884
|
if (u === "current") {
|
|
6882
|
-
const
|
|
6883
|
-
if (
|
|
6884
|
-
if (!
|
|
6885
|
+
const m = this.weatherLayers[u].speed;
|
|
6886
|
+
if (m) {
|
|
6887
|
+
if (!m.data) {
|
|
6885
6888
|
const b = [];
|
|
6886
|
-
for (const w in (
|
|
6887
|
-
const k =
|
|
6889
|
+
for (const w in (y = m.raw) == null ? void 0 : y.Polygon) {
|
|
6890
|
+
const k = m.raw.Polygon[w];
|
|
6888
6891
|
for (const _ of k)
|
|
6889
6892
|
b.push(
|
|
6890
6893
|
C.polygon(_, {
|
|
@@ -6892,67 +6895,67 @@ const Yo = {
|
|
|
6892
6895
|
})
|
|
6893
6896
|
);
|
|
6894
6897
|
}
|
|
6895
|
-
|
|
6898
|
+
m.data = C.featureCollection(b);
|
|
6896
6899
|
}
|
|
6897
|
-
const v = i < this.zoom ?
|
|
6898
|
-
g = g.concat(v),
|
|
6900
|
+
const v = i < this.zoom ? m.data.features.filter((b) => b.properties.val > 0.5) : m.data.features;
|
|
6901
|
+
g = g.concat(v), a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("speed elapsed: ", a, ", total: ", e += a);
|
|
6899
6902
|
}
|
|
6900
6903
|
}
|
|
6901
6904
|
} else if (u === "wind") {
|
|
6902
6905
|
const f = this.weatherLayers.wind.raw;
|
|
6903
|
-
for (const
|
|
6904
|
-
if (
|
|
6905
|
-
const v = f[
|
|
6906
|
+
for (const m in f)
|
|
6907
|
+
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6908
|
+
const v = f[m].lng;
|
|
6906
6909
|
o > n ? v.forEach((b, w) => {
|
|
6907
6910
|
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6908
|
-
const k = C.point([b,
|
|
6909
|
-
val: f[
|
|
6910
|
-
spd: f[
|
|
6911
|
+
const k = C.point([b, m], {
|
|
6912
|
+
val: f[m].val[w],
|
|
6913
|
+
spd: f[m].spd[w]
|
|
6911
6914
|
});
|
|
6912
6915
|
g.push(k);
|
|
6913
6916
|
}
|
|
6914
6917
|
}) : v.forEach((b, w) => {
|
|
6915
6918
|
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6916
|
-
const k = C.point([b,
|
|
6917
|
-
val: f[
|
|
6918
|
-
spd: f[
|
|
6919
|
+
const k = C.point([b, m], {
|
|
6920
|
+
val: f[m].val[w],
|
|
6921
|
+
spd: f[m].spd[w]
|
|
6919
6922
|
});
|
|
6920
6923
|
g.push(k);
|
|
6921
6924
|
}
|
|
6922
6925
|
});
|
|
6923
6926
|
}
|
|
6924
|
-
|
|
6927
|
+
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("wind barb elapsed: ", a, ", total: ", e += a);
|
|
6925
6928
|
} else if (u === "sig-wave-height") {
|
|
6926
6929
|
if (this.weatherLayers[u].data)
|
|
6927
6930
|
g = this.weatherLayers[u].data;
|
|
6928
6931
|
else {
|
|
6929
6932
|
const f = this.weatherLayers[u].raw;
|
|
6930
6933
|
if (f) {
|
|
6931
|
-
const
|
|
6934
|
+
const m = [];
|
|
6932
6935
|
for (const v in f.Polygon) {
|
|
6933
6936
|
const b = f.Polygon[v];
|
|
6934
6937
|
for (const w of b)
|
|
6935
|
-
|
|
6938
|
+
m.push(
|
|
6936
6939
|
C.polygon(w, {
|
|
6937
6940
|
val: Number(v)
|
|
6938
6941
|
})
|
|
6939
6942
|
);
|
|
6940
6943
|
}
|
|
6941
|
-
g = g.concat(
|
|
6944
|
+
g = g.concat(m);
|
|
6942
6945
|
}
|
|
6943
6946
|
}
|
|
6944
|
-
|
|
6947
|
+
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("sigWave elapsed: ", a, ", total: ", e += a);
|
|
6945
6948
|
} else if (u === "prmsl") {
|
|
6946
6949
|
if (this.weatherLayers[u].data)
|
|
6947
6950
|
g = this.weatherLayers[u].data;
|
|
6948
6951
|
else {
|
|
6949
6952
|
const f = this.weatherLayers[u].raw;
|
|
6950
6953
|
if (f) {
|
|
6951
|
-
const
|
|
6954
|
+
const m = [];
|
|
6952
6955
|
for (const v in f.LineString) {
|
|
6953
6956
|
const b = f.LineString[v];
|
|
6954
6957
|
for (const w of b)
|
|
6955
|
-
|
|
6958
|
+
m.push(
|
|
6956
6959
|
C.lineString(w, {
|
|
6957
6960
|
val: Number(v)
|
|
6958
6961
|
})
|
|
@@ -6960,138 +6963,138 @@ const Yo = {
|
|
|
6960
6963
|
}
|
|
6961
6964
|
for (const v in f.Point)
|
|
6962
6965
|
f.Point[v].lng.forEach((b, w) => {
|
|
6963
|
-
b = Re(b),
|
|
6966
|
+
b = Re(b), m.push(
|
|
6964
6967
|
C.point([b, v], {
|
|
6965
6968
|
val: f.Point[v].val[w],
|
|
6966
6969
|
type: f.Point[v].type[w]
|
|
6967
6970
|
})
|
|
6968
6971
|
);
|
|
6969
6972
|
});
|
|
6970
|
-
g = g.concat(
|
|
6973
|
+
g = g.concat(m);
|
|
6971
6974
|
}
|
|
6972
6975
|
}
|
|
6973
|
-
|
|
6976
|
+
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e), console.log("prmsl elapsed: ", a, ", total: ", e += a);
|
|
6974
6977
|
} else if (u === "arctic" || u === "iceberg") {
|
|
6975
6978
|
if (this.weatherLayers[u].data)
|
|
6976
6979
|
g = this.weatherLayers[u].data;
|
|
6977
6980
|
else {
|
|
6978
6981
|
const f = this.weatherLayers[u].raw;
|
|
6979
6982
|
if (f) {
|
|
6980
|
-
const
|
|
6983
|
+
const m = [];
|
|
6981
6984
|
for (const v in f.LineString) {
|
|
6982
6985
|
const b = f.LineString[v];
|
|
6983
6986
|
for (const w of b)
|
|
6984
|
-
|
|
6987
|
+
m.push(
|
|
6985
6988
|
C.lineString(w, {
|
|
6986
6989
|
val: Number(v)
|
|
6987
6990
|
})
|
|
6988
6991
|
);
|
|
6989
6992
|
}
|
|
6990
|
-
g = g.concat(
|
|
6993
|
+
g = g.concat(m);
|
|
6991
6994
|
}
|
|
6992
6995
|
}
|
|
6993
|
-
|
|
6996
|
+
a = (/* @__PURE__ */ new Date()).valueOf() - (t + e);
|
|
6994
6997
|
}
|
|
6995
|
-
console.log(u, " elapsed: ",
|
|
6998
|
+
console.log(u, " elapsed: ", a, ", total: ", e += a), g.length && (this.weatherLayers[u].data = C.featureCollection(g)), this.weatherLayers[u].active = !0, this.weatherLayers[u].version = Math.random() + 1;
|
|
6996
6999
|
}
|
|
6997
7000
|
},
|
|
6998
7001
|
handleDragEndWithZoom4Image() {
|
|
6999
|
-
for (const
|
|
7000
|
-
this.weatherLayers[
|
|
7002
|
+
for (const t in this.weatherLayers)
|
|
7003
|
+
this.weatherLayers[t].active && this.weatherLayers[t].type === "image" && (this.weatherLayers[t].active = !0, this.weatherLayers[t].version = Math.random() + 1);
|
|
7001
7004
|
},
|
|
7002
|
-
handleBboxClip(
|
|
7003
|
-
const
|
|
7004
|
-
return
|
|
7005
|
+
handleBboxClip(t, e) {
|
|
7006
|
+
const a = [], r = Re(e._sw.lng), i = Re(e._ne.lng);
|
|
7007
|
+
return t.features.forEach((o) => {
|
|
7005
7008
|
if (o.geometry.type !== "Point")
|
|
7006
7009
|
if (r > i) {
|
|
7007
7010
|
let n = [r, e._sw.lat, 180, e._ne.lat], s = C.bboxClip(o, n);
|
|
7008
|
-
s.geometry.coordinates.length &&
|
|
7011
|
+
s.geometry.coordinates.length && a.push(s), n = [-180, e._sw.lat, i, e._ne.lat], s = C.bboxClip(o, n), s.geometry.coordinates.length && a.push(s);
|
|
7009
7012
|
} else {
|
|
7010
7013
|
const n = [r, e._sw.lat, i, e._ne.lat], s = C.bboxClip(o, n);
|
|
7011
|
-
s.geometry.coordinates.length &&
|
|
7014
|
+
s.geometry.coordinates.length && a.push(s);
|
|
7012
7015
|
}
|
|
7013
7016
|
else
|
|
7014
|
-
|
|
7015
|
-
}),
|
|
7017
|
+
a.push(o);
|
|
7018
|
+
}), a;
|
|
7016
7019
|
},
|
|
7017
7020
|
handleWeatherLayerToggle() {
|
|
7018
|
-
var
|
|
7021
|
+
var t;
|
|
7019
7022
|
for (const e in this.weatherLayers)
|
|
7020
7023
|
this.weatherLayers[e].active = !1, this.weatherLayers[e].version = Math.random() + 1;
|
|
7021
7024
|
for (const e of this.activeWeatherLayers) {
|
|
7022
|
-
let
|
|
7023
|
-
|
|
7025
|
+
let a = e.key;
|
|
7026
|
+
a.indexOf("swell") > -1 ? a = "swell" : a.indexOf("current") > -1 && (a = "current"), this.weatherLayers[a] && (this.weatherLayers[a].active = !0, this.weatherLayers[a].version = Math.random() + 1, ((t = this.particleFactor) == null ? void 0 : t.key) === a && this.weatherLayers[`${a}-particle`] && (this.weatherLayers[`${a}-particle`].active = this.particleFactor.particle));
|
|
7024
7027
|
}
|
|
7025
7028
|
this.handleBeforeLayerToggle();
|
|
7026
7029
|
},
|
|
7027
7030
|
handleBeforeLayerToggle() {
|
|
7028
|
-
var
|
|
7029
|
-
(
|
|
7031
|
+
var t, e, a, r, i, o, n, s, c, h, p, d, y;
|
|
7032
|
+
(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 || (p = this.otherLayers) != null && p["voluntary-reporting-area"] || (d = this.otherLayers) != null && d["eca-zones"] || (y = this.otherLayers) != null && y["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
7030
7033
|
},
|
|
7031
|
-
handleDateChange(
|
|
7032
|
-
this.fetchWeatherLayers(
|
|
7034
|
+
handleDateChange(t = { tropicals: !1 }) {
|
|
7035
|
+
this.fetchWeatherLayers(t), this.fetchOtherLayers({ dayNight: !0 });
|
|
7033
7036
|
},
|
|
7034
|
-
handleWeatherLayerChange(
|
|
7037
|
+
handleWeatherLayerChange(t, e, a) {
|
|
7035
7038
|
if (!this.map)
|
|
7036
7039
|
setTimeout(() => {
|
|
7037
|
-
this.handleWeatherLayerChange(
|
|
7040
|
+
this.handleWeatherLayerChange(t, e, a);
|
|
7038
7041
|
}, 500);
|
|
7039
7042
|
else {
|
|
7040
7043
|
this.activeWeatherLayers = e;
|
|
7041
7044
|
const r = this.activeWeatherLayers.some((n) => ["wind", "current"].includes(n.key)), i = this.activeWeatherLayers.some((n) => ["png", "jpg"].includes(n.type));
|
|
7042
7045
|
r && !i ? (this.particleFactor = this.activeWeatherLayers.find((n) => ["wind", "current"].includes(n.key)), this.particleFactor.particle = !0) : i && this.particleFactor && (this.particleFactor.particle = !1);
|
|
7043
7046
|
const o = e == null ? void 0 : e.reduce((n, s) => n + (n & (s == null ? void 0 : s.weight) ? 0 : s == null ? void 0 : s.weight), 0);
|
|
7044
|
-
this.weatherWeight !== o || this.source !==
|
|
7047
|
+
this.weatherWeight !== o || this.source !== a ? (this.source = a, this.weatherWeight = o, this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
7045
7048
|
}
|
|
7046
7049
|
},
|
|
7047
|
-
handleOtherLayerChange(
|
|
7050
|
+
handleOtherLayerChange(t) {
|
|
7048
7051
|
if (!this.map)
|
|
7049
7052
|
setTimeout(() => {
|
|
7050
|
-
this.handleOtherLayerChange(
|
|
7053
|
+
this.handleOtherLayerChange(t);
|
|
7051
7054
|
}, 500);
|
|
7052
7055
|
else {
|
|
7053
|
-
const e =
|
|
7054
|
-
|
|
7056
|
+
const e = t == null ? void 0 : t.reduce((a, r) => a + (r == null ? void 0 : r.weight), 0);
|
|
7057
|
+
t.find((a) => a.key === "enc") ? this.enc = "i4" : this.enc = "", this.otherWeight != e && (this.otherWeight = e, this.fetchOtherLayers({ all: !0 }));
|
|
7055
7058
|
}
|
|
7056
7059
|
},
|
|
7057
|
-
async handlePointChange(
|
|
7058
|
-
const e = this.ts ? Q(this.ts) : Q(),
|
|
7059
|
-
lat:
|
|
7060
|
-
lng:
|
|
7060
|
+
async handlePointChange(t) {
|
|
7061
|
+
const e = this.ts ? Q(this.ts) : Q(), a = {
|
|
7062
|
+
lat: t.lat,
|
|
7063
|
+
lng: t.lng,
|
|
7061
7064
|
ts: e.utc().format(),
|
|
7062
7065
|
wt: !0,
|
|
7063
7066
|
src: this.source
|
|
7064
7067
|
}, r = await ae.get(`${this.gateway}/api/arc/meteo/query`, {
|
|
7065
|
-
params:
|
|
7068
|
+
params: a,
|
|
7066
7069
|
headers: {
|
|
7067
7070
|
Authorization: this.token || this.defaultMeteoToken
|
|
7068
7071
|
}
|
|
7069
7072
|
});
|
|
7070
7073
|
(r == null ? void 0 : r.status) === 200 && (this.meteo = {
|
|
7071
7074
|
...r == null ? void 0 : r.data,
|
|
7072
|
-
...
|
|
7075
|
+
...t
|
|
7073
7076
|
});
|
|
7074
7077
|
},
|
|
7075
|
-
handle3dToggle(
|
|
7076
|
-
|
|
7078
|
+
handle3dToggle(t) {
|
|
7079
|
+
t ? this.map.setProjection("globe") : this.map.setProjection("mercator");
|
|
7077
7080
|
},
|
|
7078
|
-
handleParticle(
|
|
7079
|
-
this.particleFactor =
|
|
7081
|
+
handleParticle(t) {
|
|
7082
|
+
this.particleFactor = t, this.fetchWeatherLayers({ tropicals: !1 });
|
|
7080
7083
|
}
|
|
7081
7084
|
}
|
|
7082
7085
|
}, Qo = {
|
|
7083
7086
|
key: 0,
|
|
7084
7087
|
className: "map-gl-home"
|
|
7085
7088
|
};
|
|
7086
|
-
function Ko(
|
|
7089
|
+
function Ko(t, e, a, r, i, o) {
|
|
7087
7090
|
var q, ne, fe, ge, be, ve, _e, we, Le, xe, Ce, Se, ke, ze, Pe, Te, Ie, Ee, Ne, He, Ze, Xe, Je, qe, Ye, Qe;
|
|
7088
|
-
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"),
|
|
7089
|
-
return
|
|
7091
|
+
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), p = z("IdmPrmsl"), d = z("IdmIceberg"), y = z("IdmTropicals"), u = z("IdmCurrents"), g = z("IdmCurrentParticle"), f = z("IdmWindBarb"), m = z("IdmWindParticle"), v = z("IdmPrecip3h"), b = z("IdmVisibility"), w = z("IdmWaterTemp"), k = z("IdmTemp"), _ = z("IdmArctic"), A = z("IdmWarZone"), D = z("IdmGmdssArea"), $ = z("IdmEcaZone"), O = z("IdmAlertZone"), W = z("IdmPort"), H = z("IdmLoadLine"), X = z("IdmTimezone"), ee = z("IdmVRA"), he = z("IdmSpecialArea"), te = z("IdmTerminator"), R = z("IdmLatLng"), V = z("IdmMeasure"), de = z("IdmPoint");
|
|
7092
|
+
return a.map ? (L(), x("div", Qo, [
|
|
7090
7093
|
P(n, I({
|
|
7091
7094
|
ref: "layer",
|
|
7092
|
-
map:
|
|
7095
|
+
map: a.map,
|
|
7093
7096
|
"toggle-version": i.toggleVersion
|
|
7094
|
-
},
|
|
7097
|
+
}, t.$attrs, {
|
|
7095
7098
|
onWeather: o.handleWeatherLayerChange,
|
|
7096
7099
|
onOther: o.handleOtherLayerChange,
|
|
7097
7100
|
onCoordinate: e[0] || (e[0] = (Y) => i.showCoord = Y),
|
|
@@ -7101,171 +7104,171 @@ function Ko(a, e, t, r, i, o) {
|
|
|
7101
7104
|
onToggleVersion: e[3] || (e[3] = (Y) => i.toggleVersion = Y)
|
|
7102
7105
|
}), null, 16, ["map", "toggle-version", "onWeather", "onOther", "on3d"]),
|
|
7103
7106
|
P(s, I({
|
|
7104
|
-
map:
|
|
7105
|
-
token:
|
|
7107
|
+
map: a.map,
|
|
7108
|
+
token: a.token,
|
|
7106
7109
|
enabled: (q = i.otherLayers) == null ? void 0 : q.enc,
|
|
7107
7110
|
"toggle-version": i.toggleVersion
|
|
7108
|
-
},
|
|
7111
|
+
}, t.$attrs, {
|
|
7109
7112
|
onEnc: e[4] || (e[4] = (Y) => i.enc = Y)
|
|
7110
7113
|
}), null, 16, ["map", "token", "enabled", "toggle-version"]),
|
|
7111
7114
|
P(c, I({
|
|
7112
|
-
map:
|
|
7115
|
+
map: a.map,
|
|
7113
7116
|
"sig-wave": (ne = i.weatherLayers) == null ? void 0 : ne["sig-wave-height"],
|
|
7114
|
-
"before-layer":
|
|
7115
|
-
},
|
|
7117
|
+
"before-layer": a.beforeLayer
|
|
7118
|
+
}, t.$attrs), null, 16, ["map", "sig-wave", "before-layer"]),
|
|
7116
7119
|
P(h, I({
|
|
7117
|
-
map:
|
|
7120
|
+
map: a.map,
|
|
7118
7121
|
swell: (fe = i.weatherLayers) == null ? void 0 : fe.swell,
|
|
7119
|
-
"before-layer":
|
|
7120
|
-
},
|
|
7121
|
-
P(
|
|
7122
|
-
map:
|
|
7122
|
+
"before-layer": a.beforeLayer
|
|
7123
|
+
}, t.$attrs), null, 16, ["map", "swell", "before-layer"]),
|
|
7124
|
+
P(p, I({
|
|
7125
|
+
map: a.map,
|
|
7123
7126
|
prmsl: (ge = i.weatherLayers) == null ? void 0 : ge.prmsl,
|
|
7124
|
-
"before-layer":
|
|
7125
|
-
},
|
|
7127
|
+
"before-layer": a.beforeLayer
|
|
7128
|
+
}, t.$attrs), null, 16, ["map", "prmsl", "before-layer"]),
|
|
7126
7129
|
P(d, I({
|
|
7127
|
-
map:
|
|
7130
|
+
map: a.map,
|
|
7128
7131
|
iceberg: (be = i.weatherLayers) == null ? void 0 : be.iceberg,
|
|
7129
|
-
"before-layer":
|
|
7130
|
-
},
|
|
7131
|
-
P(
|
|
7132
|
-
map:
|
|
7133
|
-
date:
|
|
7132
|
+
"before-layer": a.beforeLayer
|
|
7133
|
+
}, t.$attrs), null, 16, ["map", "iceberg", "before-layer"]),
|
|
7134
|
+
P(y, I({
|
|
7135
|
+
map: a.map,
|
|
7136
|
+
date: a.ts,
|
|
7134
7137
|
tropicals: (ve = i.weatherLayers) == null ? void 0 : ve.tropicals,
|
|
7135
|
-
"before-layer":
|
|
7136
|
-
},
|
|
7138
|
+
"before-layer": a.beforeLayer
|
|
7139
|
+
}, t.$attrs), null, 16, ["map", "date", "tropicals", "before-layer"]),
|
|
7137
7140
|
P(u, I({
|
|
7138
|
-
map:
|
|
7141
|
+
map: a.map,
|
|
7139
7142
|
current: (_e = i.weatherLayers) == null ? void 0 : _e.current,
|
|
7140
|
-
"before-layer":
|
|
7143
|
+
"before-layer": a.beforeLayer,
|
|
7141
7144
|
"show-particle": i.showCurrentParticle,
|
|
7142
7145
|
"margin-bottom": i.activeWindLayer ? i.showRampColor ? "84px" : "56px" : i.showRampColor ? "56px" : "30px",
|
|
7143
7146
|
"toggle-version": i.toggleVersion,
|
|
7144
7147
|
"weather-layers": i.weatherLayers
|
|
7145
|
-
},
|
|
7148
|
+
}, t.$attrs, { onParticle: o.handleParticle }), null, 16, ["map", "current", "before-layer", "show-particle", "margin-bottom", "toggle-version", "weather-layers", "onParticle"]),
|
|
7146
7149
|
P(g, I({
|
|
7147
7150
|
viewport: i.viewport,
|
|
7148
7151
|
factor: (we = i.weatherLayers) == null ? void 0 : we["current-particle"],
|
|
7149
|
-
"before-layer":
|
|
7152
|
+
"before-layer": a.beforeLayer,
|
|
7150
7153
|
"toggle-version": i.toggleVersion
|
|
7151
|
-
},
|
|
7154
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7152
7155
|
P(f, I({
|
|
7153
7156
|
ref: "windBarb",
|
|
7154
|
-
map:
|
|
7157
|
+
map: a.map,
|
|
7155
7158
|
wind: (Le = i.weatherLayers) == null ? void 0 : Le.wind,
|
|
7156
7159
|
current: (xe = i.weatherLayers) == null ? void 0 : xe.current,
|
|
7157
|
-
"before-layer":
|
|
7160
|
+
"before-layer": a.beforeLayer,
|
|
7158
7161
|
"margin-bottom": i.showRampColor ? "56px" : "30px",
|
|
7159
7162
|
"show-particle": i.showWindParticle
|
|
7160
|
-
},
|
|
7163
|
+
}, t.$attrs, {
|
|
7161
7164
|
"toggle-version": i.toggleVersion,
|
|
7162
7165
|
"weather-layers": i.weatherLayers,
|
|
7163
7166
|
onParticle: o.handleParticle
|
|
7164
7167
|
}), null, 16, ["map", "wind", "current", "before-layer", "margin-bottom", "show-particle", "toggle-version", "weather-layers", "onParticle"]),
|
|
7165
|
-
P(
|
|
7168
|
+
P(m, I({
|
|
7166
7169
|
viewport: i.viewport,
|
|
7167
7170
|
factor: (Ce = i.weatherLayers) == null ? void 0 : Ce["wind-particle"],
|
|
7168
|
-
"before-layer":
|
|
7171
|
+
"before-layer": a.beforeLayer,
|
|
7169
7172
|
"toggle-version": i.toggleVersion
|
|
7170
|
-
},
|
|
7173
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7171
7174
|
P(v, I({
|
|
7172
7175
|
viewport: i.viewport,
|
|
7173
7176
|
factor: (Se = i.weatherLayers) == null ? void 0 : Se.precip3h,
|
|
7174
|
-
"before-layer":
|
|
7177
|
+
"before-layer": a.beforeLayer,
|
|
7175
7178
|
"toggle-version": i.toggleVersion
|
|
7176
|
-
},
|
|
7179
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7177
7180
|
P(b, I({
|
|
7178
7181
|
viewport: i.viewport,
|
|
7179
7182
|
factor: (ke = i.weatherLayers) == null ? void 0 : ke.visibility,
|
|
7180
|
-
"before-layer":
|
|
7183
|
+
"before-layer": a.beforeLayer,
|
|
7181
7184
|
"toggle-version": i.toggleVersion
|
|
7182
|
-
},
|
|
7185
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7183
7186
|
P(w, I({
|
|
7184
7187
|
viewport: i.viewport,
|
|
7185
7188
|
factor: (ze = i.weatherLayers) == null ? void 0 : ze["water-temp"],
|
|
7186
|
-
"before-layer":
|
|
7189
|
+
"before-layer": a.beforeLayer,
|
|
7187
7190
|
"toggle-version": i.toggleVersion
|
|
7188
|
-
},
|
|
7191
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7189
7192
|
P(k, I({
|
|
7190
7193
|
viewport: i.viewport,
|
|
7191
7194
|
factor: (Pe = i.weatherLayers) == null ? void 0 : Pe.temp,
|
|
7192
|
-
"before-layer":
|
|
7195
|
+
"before-layer": a.beforeLayer,
|
|
7193
7196
|
"toggle-version": i.toggleVersion
|
|
7194
|
-
},
|
|
7197
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7195
7198
|
P(_, I({
|
|
7196
7199
|
viewport: i.viewport,
|
|
7197
7200
|
factor: (Te = i.weatherLayers) == null ? void 0 : Te.arctic,
|
|
7198
|
-
"before-layer":
|
|
7201
|
+
"before-layer": a.beforeLayer,
|
|
7199
7202
|
"toggle-version": i.toggleVersion
|
|
7200
|
-
},
|
|
7201
|
-
P(
|
|
7202
|
-
map:
|
|
7203
|
+
}, t.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7204
|
+
P(A, I({
|
|
7205
|
+
map: a.map,
|
|
7203
7206
|
zone: (Ie = i.otherLayers) == null ? void 0 : Ie["war-zones"],
|
|
7204
|
-
"before-layer":
|
|
7205
|
-
},
|
|
7207
|
+
"before-layer": a.beforeLayer
|
|
7208
|
+
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7206
7209
|
P(D, I({
|
|
7207
|
-
map:
|
|
7210
|
+
map: a.map,
|
|
7208
7211
|
area: (Ee = i.otherLayers) == null ? void 0 : Ee["gmdss-areas"],
|
|
7209
|
-
"before-layer":
|
|
7210
|
-
},
|
|
7212
|
+
"before-layer": a.beforeLayer
|
|
7213
|
+
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7211
7214
|
P($, I({
|
|
7212
|
-
map:
|
|
7215
|
+
map: a.map,
|
|
7213
7216
|
zone: (Ne = i.otherLayers) == null ? void 0 : Ne["eca-zones"],
|
|
7214
|
-
"before-layer":
|
|
7215
|
-
},
|
|
7216
|
-
P(W, I({
|
|
7217
|
-
map: t.map,
|
|
7218
|
-
zone: (He = i.otherLayers) == null ? void 0 : He["alert-zones"],
|
|
7219
|
-
"before-layer": t.beforeLayer
|
|
7220
|
-
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7217
|
+
"before-layer": a.beforeLayer
|
|
7218
|
+
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7221
7219
|
P(O, I({
|
|
7222
|
-
map:
|
|
7220
|
+
map: a.map,
|
|
7221
|
+
zone: (He = i.otherLayers) == null ? void 0 : He["alert-zones"],
|
|
7222
|
+
"before-layer": a.beforeLayer
|
|
7223
|
+
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7224
|
+
P(W, I({
|
|
7225
|
+
map: a.map,
|
|
7223
7226
|
port: (Ze = i.otherLayers) == null ? void 0 : Ze.ports,
|
|
7224
|
-
"before-layer":
|
|
7225
|
-
},
|
|
7227
|
+
"before-layer": a.beforeLayer
|
|
7228
|
+
}, t.$attrs), null, 16, ["map", "port", "before-layer"]),
|
|
7226
7229
|
P(H, I({
|
|
7227
|
-
map:
|
|
7230
|
+
map: a.map,
|
|
7228
7231
|
line: (Xe = i.otherLayers) == null ? void 0 : Xe["load-lines"],
|
|
7229
|
-
"before-layer":
|
|
7230
|
-
},
|
|
7232
|
+
"before-layer": a.beforeLayer
|
|
7233
|
+
}, t.$attrs), null, 16, ["map", "line", "before-layer"]),
|
|
7231
7234
|
P(X, I({
|
|
7232
|
-
map:
|
|
7235
|
+
map: a.map,
|
|
7233
7236
|
zone: (Je = i.otherLayers) == null ? void 0 : Je["time-zones"],
|
|
7234
|
-
"before-layer":
|
|
7235
|
-
},
|
|
7237
|
+
"before-layer": a.beforeLayer
|
|
7238
|
+
}, t.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7236
7239
|
P(ee, I({
|
|
7237
|
-
map:
|
|
7240
|
+
map: a.map,
|
|
7238
7241
|
area: (qe = i.otherLayers) == null ? void 0 : qe["voluntary-reporting-area"],
|
|
7239
|
-
"before-layer":
|
|
7240
|
-
},
|
|
7242
|
+
"before-layer": a.beforeLayer
|
|
7243
|
+
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7241
7244
|
P(he, I({
|
|
7242
|
-
map:
|
|
7245
|
+
map: a.map,
|
|
7243
7246
|
area: (Ye = i.otherLayers) == null ? void 0 : Ye["special-area"],
|
|
7244
|
-
"before-layer":
|
|
7245
|
-
},
|
|
7247
|
+
"before-layer": a.beforeLayer
|
|
7248
|
+
}, t.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7246
7249
|
P(te, I({
|
|
7247
|
-
map:
|
|
7250
|
+
map: a.map,
|
|
7248
7251
|
area: (Qe = i.otherLayers) == null ? void 0 : Qe["day-night"]
|
|
7249
|
-
},
|
|
7250
|
-
P(
|
|
7251
|
-
map:
|
|
7252
|
+
}, t.$attrs), null, 16, ["map", "area"]),
|
|
7253
|
+
P(R, I({
|
|
7254
|
+
map: a.map,
|
|
7252
7255
|
show: i.showCoord,
|
|
7253
7256
|
"toggle-version": i.toggleVersion
|
|
7254
|
-
},
|
|
7257
|
+
}, t.$attrs), null, 16, ["map", "show", "toggle-version"]),
|
|
7255
7258
|
P(V, I({
|
|
7256
|
-
map:
|
|
7259
|
+
map: a.map,
|
|
7257
7260
|
show: i.showMeasure
|
|
7258
|
-
},
|
|
7261
|
+
}, t.$attrs), null, 16, ["map", "show"]),
|
|
7259
7262
|
P(de, I({
|
|
7260
|
-
map:
|
|
7263
|
+
map: a.map,
|
|
7261
7264
|
show: i.showPoint,
|
|
7262
7265
|
meteo: i.meteo
|
|
7263
|
-
},
|
|
7266
|
+
}, t.$attrs, { onPoint: o.handlePointChange }), null, 16, ["map", "show", "meteo", "onPoint"])
|
|
7264
7267
|
])) : N("", !0);
|
|
7265
7268
|
}
|
|
7266
7269
|
const es = /* @__PURE__ */ T(Yo, [["render", Ko]]), cs = {
|
|
7267
|
-
install(
|
|
7268
|
-
|
|
7270
|
+
install(t) {
|
|
7271
|
+
t.component("MapboxGL", es), t.component("TropicalGL", tt), t.component("LatLngGL", at);
|
|
7269
7272
|
}
|
|
7270
7273
|
};
|
|
7271
7274
|
export {
|