@idmwx/idmui-gl3 4.0.5 → 4.0.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
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var et = Object.defineProperty;
|
|
2
|
-
var tt = (
|
|
3
|
-
var R = (
|
|
2
|
+
var tt = (a, e, t) => e in a ? et(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var R = (a, e, t) => (tt(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { LayerHelper as We, CompanyHelper as Ae, convertToStandardLng as Ie } from "@idmwx/idmwx-base";
|
|
5
|
-
import { resolveComponent as z, openBlock as L, createElementBlock as x, createElementVNode as l, normalizeStyle as F, normalizeClass as M, Fragment as Re, renderList as De, toDisplayString as S, createVNode as P, withCtx as at, createTextVNode as Xe, createCommentVNode as $, pushScopeId as
|
|
5
|
+
import { resolveComponent as z, openBlock as L, createElementBlock as x, createElementVNode as l, normalizeStyle as F, normalizeClass as M, Fragment as Re, renderList as De, toDisplayString as S, createVNode as P, withCtx as at, createTextVNode as Xe, createCommentVNode as $, pushScopeId as H, popScopeId as G, withDirectives as Me, vShow as $e, createStaticVNode as it, mergeProps as I } from "vue";
|
|
6
6
|
import * as C from "@turf/turf";
|
|
7
7
|
import rt from "@mapbox/sphericalmercator";
|
|
8
|
-
import
|
|
8
|
+
import Z from "moment";
|
|
9
9
|
import ne from "mapbox-gl";
|
|
10
|
-
import { TropicalHelper as qe, LngLatHelper as j, LaneHelper as
|
|
10
|
+
import { TropicalHelper as qe, LngLatHelper as j, LaneHelper as te } from "@idm-plugin/geo";
|
|
11
11
|
import se from "axios";
|
|
12
|
-
const T = (
|
|
13
|
-
const
|
|
12
|
+
const T = (a, e) => {
|
|
13
|
+
const t = a.__vccOpts || a;
|
|
14
14
|
for (const [r, i] of e)
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
t[r] = i;
|
|
16
|
+
return t;
|
|
17
17
|
}, ot = {
|
|
18
18
|
name: "IdmGlLayer",
|
|
19
19
|
props: {
|
|
@@ -70,9 +70,9 @@ const T = (t, e) => {
|
|
|
70
70
|
},
|
|
71
71
|
computed: {
|
|
72
72
|
computeLayerClass() {
|
|
73
|
-
return function(
|
|
74
|
-
let
|
|
75
|
-
return e.some((r) => r.key ===
|
|
73
|
+
return function(a, e) {
|
|
74
|
+
let t = "layer";
|
|
75
|
+
return e.some((r) => r.key === a.key) && (t = "layer active"), (!a.enabled || this.rampColorLayers.includes(a.key) && this.mapProjection === "globe") && (t = "layer disabled"), t;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
},
|
|
@@ -80,56 +80,56 @@ const T = (t, e) => {
|
|
|
80
80
|
showLayers: {
|
|
81
81
|
handler() {
|
|
82
82
|
this.$nextTick(() => {
|
|
83
|
-
var
|
|
84
|
-
this.$emit("menu", this.showLayers ? !1 : this.toggleMenu), this.$emit("toggleVersion", Math.random()), this.right = (((
|
|
83
|
+
var a, e;
|
|
84
|
+
this.$emit("menu", this.showLayers ? !1 : this.toggleMenu), this.$emit("toggleVersion", Math.random()), this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
toggleMenu: {
|
|
89
89
|
handler() {
|
|
90
90
|
this.$nextTick(() => {
|
|
91
|
-
var
|
|
92
|
-
this.showLayers = this.toggleMenu ? !1 : this.showLayers, this.$emit("toggleVersion", Math.random()), this.right = (((
|
|
91
|
+
var a, e;
|
|
92
|
+
this.showLayers = this.toggleMenu ? !1 : this.showLayers, this.$emit("toggleVersion", Math.random()), this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
mounted() {
|
|
98
|
-
const
|
|
99
|
-
this.version.v !==
|
|
98
|
+
const a = localStorage.getItem(this.version.k);
|
|
99
|
+
this.version.v !== a && (localStorage.removeItem(this.weatherLayersCache), localStorage.setItem(this.version.k, this.version.v));
|
|
100
100
|
let e = localStorage.getItem(this.autoActiveCache);
|
|
101
101
|
this.autoActive = e !== "false", e = localStorage.getItem(this.weatherLayersCache);
|
|
102
|
-
let
|
|
102
|
+
let t = JSON.parse(
|
|
103
103
|
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"}]'
|
|
104
104
|
);
|
|
105
|
-
this.weatherLayers =
|
|
105
|
+
this.weatherLayers = t, this.autoActive && (this.activeWeatherLayers = [...t]), e = localStorage.getItem(this.otherLayersCache), t = JSON.parse(
|
|
106
106
|
e || // '[{"weight":2048,"name":"ENC","key":"enc","enabled":true,"type":"json"},{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]',
|
|
107
107
|
'[{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'
|
|
108
|
-
), this.otherLayers =
|
|
108
|
+
), this.otherLayers = t, e = localStorage.getItem(this.sourceCache), this.source = e || "GFS", this.handleConfirm();
|
|
109
109
|
},
|
|
110
110
|
methods: {
|
|
111
111
|
handleConfirm() {
|
|
112
112
|
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);
|
|
113
113
|
},
|
|
114
|
-
handleWeatherLayerPick(
|
|
115
|
-
if (this.rampColorLayers.includes(
|
|
114
|
+
handleWeatherLayerPick(a) {
|
|
115
|
+
if (this.rampColorLayers.includes(a.key) && this.mapProjection === "globe")
|
|
116
116
|
return !1;
|
|
117
|
-
this.weatherLayers.some((e) => e.key ===
|
|
117
|
+
this.weatherLayers.some((e) => e.key === a.key) ? (this.weatherLayers = this.weatherLayers.filter((e) => e.key !== a.key), this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !== a.key)) : this.weatherLayers.length < 12 && a.enabled && (["png", "jpg"].includes(a.type) && (this.weatherLayers = this.weatherLayers.filter((e) => e.type === "json"), this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.type === "json")), this.weatherLayers.push(a), this.activeWeatherLayers.push(a)), 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);
|
|
118
118
|
},
|
|
119
|
-
handleActiveWeatherLayerPick(
|
|
120
|
-
if (this.rampColorLayers.includes(
|
|
119
|
+
handleActiveWeatherLayerPick(a) {
|
|
120
|
+
if (this.rampColorLayers.includes(a.key) && this.mapProjection === "globe")
|
|
121
121
|
return !1;
|
|
122
|
-
if (this.activeWeatherLayers.some((e) => e.key ===
|
|
123
|
-
this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !==
|
|
124
|
-
else if (
|
|
125
|
-
this.activeWeatherLayers.push(
|
|
122
|
+
if (this.activeWeatherLayers.some((e) => e.key === a.key))
|
|
123
|
+
this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.key !== a.key);
|
|
124
|
+
else if (a.enabled) {
|
|
125
|
+
this.activeWeatherLayers.push(a);
|
|
126
126
|
for (const e of this.weatherLayers)
|
|
127
|
-
|
|
127
|
+
a.weight > e.weight && a.weight & e.weight && this.activeWeatherLayers.push(e);
|
|
128
128
|
}
|
|
129
129
|
this.$emit("weather", this.weatherLayers, this.activeWeatherLayers, this.source);
|
|
130
130
|
},
|
|
131
|
-
handleOtherLayerPick(
|
|
132
|
-
this.otherLayers.some((e) => e.key ===
|
|
131
|
+
handleOtherLayerPick(a) {
|
|
132
|
+
this.otherLayers.some((e) => e.key === a.key) ? this.otherLayers = this.otherLayers.filter((e) => e.key !== a.key) : a.enabled && this.otherLayers.push(a), localStorage.setItem(this.otherLayersCache, JSON.stringify(this.otherLayers)), this.$emit("other", this.otherLayers);
|
|
133
133
|
},
|
|
134
134
|
handleMenuToggle() {
|
|
135
135
|
this.showLayers = !this.showLayers;
|
|
@@ -146,8 +146,8 @@ const T = (t, e) => {
|
|
|
146
146
|
handle3DToggle() {
|
|
147
147
|
this.show3d = !this.show3d, this.$emit("3d", this.show3d);
|
|
148
148
|
},
|
|
149
|
-
handleSourceToggle(
|
|
150
|
-
this.source =
|
|
149
|
+
handleSourceToggle(a) {
|
|
150
|
+
this.source = a, this.handleConfirm();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}, st = { class: "idm-gl3-layer" }, nt = { class: "bar-item layer-bars" }, lt = /* @__PURE__ */ l("span", { class: "iconfont" }, "", -1), ct = [
|
|
@@ -166,12 +166,12 @@ const T = (t, e) => {
|
|
|
166
166
|
class: "layers-title",
|
|
167
167
|
style: { display: "flex", "align-items": "center", "justify-content": "space-between" }
|
|
168
168
|
}, St = { style: { "font-size": "12px" } }, kt = { class: "layers-body" }, zt = ["onClick"], Pt = /* @__PURE__ */ l("div", { class: "checkbox" }, null, -1), Tt = { class: "other-layers" }, Et = /* @__PURE__ */ l("div", { class: "layers-title" }, "Other Layers", -1), It = { class: "layers-body" }, Rt = ["onClick"], Dt = /* @__PURE__ */ l("div", { class: "checkbox" }, null, -1), At = { class: "source-layers" }, Mt = /* @__PURE__ */ l("span", { class: "layers-title" }, "Forecast Model", -1), $t = { class: "layers-body model-box" };
|
|
169
|
-
function Bt(
|
|
169
|
+
function Bt(a, e, t, r, i, o) {
|
|
170
170
|
const n = z("ElScrollbar");
|
|
171
171
|
return L(), x("div", st, [
|
|
172
172
|
l("div", {
|
|
173
173
|
class: "menu-bar-box",
|
|
174
|
-
style: F({ top:
|
|
174
|
+
style: F({ top: t.top + 10 + "px", right: i.right + "px" })
|
|
175
175
|
}, [
|
|
176
176
|
l("div", nt, [
|
|
177
177
|
l("div", {
|
|
@@ -182,7 +182,7 @@ function Bt(t, e, a, r, i, o) {
|
|
|
182
182
|
], 4),
|
|
183
183
|
l("div", {
|
|
184
184
|
class: "menu-bar-box",
|
|
185
|
-
style: F({ top:
|
|
185
|
+
style: F({ top: t.top + 160 + "px", right: i.right + "px" })
|
|
186
186
|
}, [
|
|
187
187
|
l("div", ht, [
|
|
188
188
|
l("div", {
|
|
@@ -218,7 +218,7 @@ function Bt(t, e, a, r, i, o) {
|
|
|
218
218
|
], 4),
|
|
219
219
|
l("div", {
|
|
220
220
|
class: "available-layers flex-center",
|
|
221
|
-
style: F({ top:
|
|
221
|
+
style: F({ top: t.top + "px", right: i.showLayers ? "0px" : "-240px" })
|
|
222
222
|
}, [
|
|
223
223
|
l("div", {
|
|
224
224
|
class: "side-bar",
|
|
@@ -330,8 +330,8 @@ const Wt = {
|
|
|
330
330
|
watch: {
|
|
331
331
|
"wind.version": {
|
|
332
332
|
handler() {
|
|
333
|
-
var
|
|
334
|
-
(
|
|
333
|
+
var a;
|
|
334
|
+
(a = this.wind) != null && a.active && this.showFeather ? this.handleRender() : this.handleClear();
|
|
335
335
|
},
|
|
336
336
|
deep: !0
|
|
337
337
|
},
|
|
@@ -349,22 +349,22 @@ const Wt = {
|
|
|
349
349
|
},
|
|
350
350
|
toggleVersion: {
|
|
351
351
|
handler() {
|
|
352
|
-
var
|
|
353
|
-
this.right = (((
|
|
352
|
+
var a, e;
|
|
353
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
354
354
|
},
|
|
355
355
|
immediate: !0
|
|
356
356
|
},
|
|
357
357
|
"current.version": {
|
|
358
358
|
handler() {
|
|
359
|
-
var
|
|
360
|
-
this.bottom = (
|
|
359
|
+
var a, e, t;
|
|
360
|
+
this.bottom = (a = this.current) != null && a.active ? (((e = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : e.clientHeight) || 0) + 135 : (((t = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : t.clientHeight) || 0) + 105;
|
|
361
361
|
},
|
|
362
362
|
immediate: !0
|
|
363
363
|
},
|
|
364
364
|
weatherLayers: {
|
|
365
365
|
handler() {
|
|
366
|
-
var
|
|
367
|
-
this.bottom = (
|
|
366
|
+
var a, e, t;
|
|
367
|
+
this.bottom = (a = this.current) != null && a.active ? (((e = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : e.clientHeight) || 0) + 135 : (((t = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : t.clientHeight) || 0) + 105;
|
|
368
368
|
},
|
|
369
369
|
immediate: !0
|
|
370
370
|
}
|
|
@@ -374,7 +374,7 @@ const Wt = {
|
|
|
374
374
|
this.$emit("particle", { particle: !this.showParticle, key: "wind", weight: 1 });
|
|
375
375
|
},
|
|
376
376
|
handleRender() {
|
|
377
|
-
var
|
|
377
|
+
var a, e, t, r;
|
|
378
378
|
if (!this.map)
|
|
379
379
|
setTimeout(() => {
|
|
380
380
|
this.handleRender();
|
|
@@ -382,7 +382,7 @@ const Wt = {
|
|
|
382
382
|
else if (this.wind) {
|
|
383
383
|
const i = (/* @__PURE__ */ new Date()).valueOf();
|
|
384
384
|
let o = 0, n = 0, s = this.empty;
|
|
385
|
-
if ((
|
|
385
|
+
if ((a = this.wind) != null && a.active && (s = (e = this.wind) == null ? void 0 : e.data), (t = this.map) != null && t.getSource(this.source))
|
|
386
386
|
(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);
|
|
387
387
|
else {
|
|
388
388
|
this.map.addSource(this.source, { type: "geojson", data: s });
|
|
@@ -432,14 +432,14 @@ const Wt = {
|
|
|
432
432
|
if (!this.windBarbLoaded)
|
|
433
433
|
this.handleRender();
|
|
434
434
|
else
|
|
435
|
-
for (const
|
|
436
|
-
const e =
|
|
435
|
+
for (const a of this.barbs ?? []) {
|
|
436
|
+
const e = a < 10 ? `00${a}kts` : a < 100 ? `0${a}kts` : `${a}kts`;
|
|
437
437
|
this.map.getLayer(e) && this.map.setLayoutProperty(e, "visibility", this.showFeather ? "visible" : "none");
|
|
438
438
|
}
|
|
439
439
|
},
|
|
440
440
|
handleClear() {
|
|
441
|
-
for (const
|
|
442
|
-
const e =
|
|
441
|
+
for (const a of this.barbs ?? []) {
|
|
442
|
+
const e = a < 10 ? `00${a}kts` : a < 100 ? `0${a}kts` : `${a}kts`;
|
|
443
443
|
this.map.getLayer(e) && this.map.removeLayer(e);
|
|
444
444
|
}
|
|
445
445
|
this.map.getSource(this.source) && this.map.removeSource(this.source), this.windBarbLoaded = !1;
|
|
@@ -451,37 +451,37 @@ const Wt = {
|
|
|
451
451
|
}, Ft = {
|
|
452
452
|
key: 1,
|
|
453
453
|
class: "iconfont"
|
|
454
|
-
},
|
|
454
|
+
}, Ut = {
|
|
455
455
|
key: 0,
|
|
456
456
|
class: "iconfont active"
|
|
457
|
-
},
|
|
457
|
+
}, Vt = {
|
|
458
458
|
key: 1,
|
|
459
459
|
class: "iconfont"
|
|
460
460
|
};
|
|
461
|
-
function
|
|
461
|
+
function Zt(a, e, t, r, i, o) {
|
|
462
462
|
var n;
|
|
463
|
-
return (n =
|
|
463
|
+
return (n = t.wind) != null && n.active ? (L(), x("div", Ot, [
|
|
464
464
|
l("div", {
|
|
465
465
|
class: "flex-center tool-bars",
|
|
466
466
|
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
467
467
|
}, [
|
|
468
|
-
|
|
468
|
+
t.mapProjection === "mercator" ? (L(), x("div", {
|
|
469
469
|
key: 0,
|
|
470
470
|
class: "flex-start",
|
|
471
471
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
472
472
|
}, [
|
|
473
|
-
|
|
473
|
+
t.showParticle ? (L(), x("i", jt, "")) : (L(), x("i", Ft, "")),
|
|
474
474
|
l("span", {
|
|
475
|
-
class: M(
|
|
475
|
+
class: M(t.showParticle ? "active" : "")
|
|
476
476
|
}, "Wind Particles", 2)
|
|
477
477
|
])) : $("", !0),
|
|
478
|
-
|
|
478
|
+
t.showParticle ? (L(), x("div", {
|
|
479
479
|
key: 1,
|
|
480
480
|
class: "flex-start",
|
|
481
481
|
style: { "margin-left": "16px" },
|
|
482
482
|
onClick: e[1] || (e[1] = (s) => i.showFeather = !i.showFeather)
|
|
483
483
|
}, [
|
|
484
|
-
i.showFeather ? (L(), x("i",
|
|
484
|
+
i.showFeather ? (L(), x("i", Ut, "")) : (L(), x("i", Vt, "")),
|
|
485
485
|
l("span", {
|
|
486
486
|
class: M(i.showFeather ? "active" : "")
|
|
487
487
|
}, "Wind Feather", 2)
|
|
@@ -489,7 +489,7 @@ function Gt(t, e, a, r, i, o) {
|
|
|
489
489
|
], 4)
|
|
490
490
|
])) : $("", !0);
|
|
491
491
|
}
|
|
492
|
-
const Ht = /* @__PURE__ */ T(Wt, [["render",
|
|
492
|
+
const Ht = /* @__PURE__ */ T(Wt, [["render", Zt], ["__scopeId", "data-v-b6fb74d9"]]);
|
|
493
493
|
class Oe {
|
|
494
494
|
constructor(e) {
|
|
495
495
|
R(this, "map");
|
|
@@ -508,8 +508,8 @@ class Oe {
|
|
|
508
508
|
* @param lng
|
|
509
509
|
* @param n
|
|
510
510
|
*/
|
|
511
|
-
convertNLng(e,
|
|
512
|
-
return e > 180 ? this.convertNLng(e - 360,
|
|
511
|
+
convertNLng(e, t = 0) {
|
|
512
|
+
return e > 180 ? this.convertNLng(e - 360, t + 1) : e < -180 ? this.convertNLng(e + 360, t + 1) : [e, t];
|
|
513
513
|
}
|
|
514
514
|
/**
|
|
515
515
|
* [4326坐标]
|
|
@@ -535,28 +535,28 @@ class Oe {
|
|
|
535
535
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
536
536
|
*/
|
|
537
537
|
getBoundPixel() {
|
|
538
|
-
const e = this.map.getBounds(),
|
|
538
|
+
const e = this.map.getBounds(), t = this.map.getZoom() + 1, r = [e._ne.lng, e._ne.lat], i = [e._sw.lng, e._sw.lat], [o, n] = this.convertNLng(r[0]), [s, c] = this.convertNLng(i[0]), [h, d] = this.mercator.px([o, r[1]], t), [p, f] = this.mercator.px([s, i[1]], t), m = Math.round(this.mercator.size * Math.pow(2, t) * (n + c));
|
|
539
539
|
return [p, f, h + m, d];
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
* [视窗边界像素宽度]
|
|
543
543
|
*/
|
|
544
544
|
getBoundRange() {
|
|
545
|
-
const e = this.map.getZoom() + 1,
|
|
546
|
-
return [r[0] /
|
|
545
|
+
const e = this.map.getZoom() + 1, t = this.mercator.size * Math.pow(2, e), r = this.getBoundPixel();
|
|
546
|
+
return [r[0] / t, r[2] / t, r[3] / t, r[1] / t];
|
|
547
547
|
}
|
|
548
548
|
/**
|
|
549
549
|
* 获取视窗世界(多世界复本)
|
|
550
550
|
* @param pixels
|
|
551
551
|
* @param zoom
|
|
552
552
|
*/
|
|
553
|
-
getWorldCopy(e,
|
|
554
|
-
const r = 2 **
|
|
553
|
+
getWorldCopy(e, t) {
|
|
554
|
+
const r = 2 ** t, [i, o, n, s] = e.map((d) => ~~(d / (r * 256))), c = [];
|
|
555
555
|
for (let d = s; d <= o; d++)
|
|
556
556
|
for (let p = i; p <= n; p++)
|
|
557
557
|
c.push([p, d]);
|
|
558
558
|
return c.map((d) => {
|
|
559
|
-
const p = 2 **
|
|
559
|
+
const p = 2 ** t * 256;
|
|
560
560
|
return [d[0] * p, d[1] * p, p];
|
|
561
561
|
});
|
|
562
562
|
}
|
|
@@ -565,12 +565,12 @@ class Oe {
|
|
|
565
565
|
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;
|
|
566
566
|
}
|
|
567
567
|
toggle(e) {
|
|
568
|
-
const
|
|
569
|
-
|
|
568
|
+
const t = this.map.getLayoutProperty(this.rampColorLayer, "visibility"), r = e ? "visible" : "none";
|
|
569
|
+
t !== r && this.map.setLayoutProperty(this.rampColorLayer, "visibility", r);
|
|
570
570
|
}
|
|
571
571
|
toggleParticle(e) {
|
|
572
|
-
const
|
|
573
|
-
|
|
572
|
+
const t = this.map.getLayoutProperty(this.particleLayer, "visibility"), r = e ? "visible" : "none";
|
|
573
|
+
t !== r && this.map.setLayoutProperty(this.particleLayer, "visibility", r);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
class we {
|
|
@@ -581,8 +581,8 @@ class we {
|
|
|
581
581
|
* @param type [VERTEX_SHADER, FRAGMENT_SHADER]
|
|
582
582
|
* @param schema 着色器渲染代码[GLSL]
|
|
583
583
|
*/
|
|
584
|
-
createShader(e,
|
|
585
|
-
const i = e.createShader(
|
|
584
|
+
createShader(e, t, r) {
|
|
585
|
+
const i = e.createShader(t);
|
|
586
586
|
if (i && (e.shaderSource(i, r), e.compileShader(i), !e.getShaderParameter(i, e.COMPILE_STATUS)))
|
|
587
587
|
throw new Error(e.getShaderInfoLog(i) || "error happened while create shader...");
|
|
588
588
|
return i;
|
|
@@ -598,9 +598,9 @@ class we {
|
|
|
598
598
|
* @param width??
|
|
599
599
|
* @param height??
|
|
600
600
|
*/
|
|
601
|
-
createTexture(e,
|
|
601
|
+
createTexture(e, t, r, i, o, n, s) {
|
|
602
602
|
const c = e.createTexture();
|
|
603
|
-
return e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER,
|
|
603
|
+
return e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, t), 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;
|
|
604
604
|
}
|
|
605
605
|
/**
|
|
606
606
|
* 创建数据资源
|
|
@@ -609,10 +609,10 @@ class we {
|
|
|
609
609
|
* element: ELEMENT_ARRAY_BUFFER
|
|
610
610
|
* @param resource 顶点数据
|
|
611
611
|
*/
|
|
612
|
-
createDataBuffer(e,
|
|
612
|
+
createDataBuffer(e, t, r) {
|
|
613
613
|
if (e) {
|
|
614
614
|
const i = e.createBuffer();
|
|
615
|
-
return
|
|
615
|
+
return t === "array" ? (e.bindBuffer(e.ARRAY_BUFFER, i), r && e.bufferData(e.ARRAY_BUFFER, r, e.STATIC_DRAW)) : t === "element" && (e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, i), r && e.bufferData(e.ELEMENT_ARRAY_BUFFER, r, e.STATIC_DRAW)), i;
|
|
616
616
|
}
|
|
617
617
|
return null;
|
|
618
618
|
}
|
|
@@ -622,8 +622,8 @@ class we {
|
|
|
622
622
|
* @param vertexSchema
|
|
623
623
|
* @param fragmentSchema
|
|
624
624
|
*/
|
|
625
|
-
createProgram(e,
|
|
626
|
-
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER,
|
|
625
|
+
createProgram(e, t, r) {
|
|
626
|
+
const i = e.createProgram(), o = this.createShader(e, e.VERTEX_SHADER, t), n = this.createShader(e, e.FRAGMENT_SHADER, r);
|
|
627
627
|
if (i && o && n && (e.attachShader(i, o), e.attachShader(i, n), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)))
|
|
628
628
|
throw new Error(e.getProgramInfoLog(i) || "error happened while creating ramp color program");
|
|
629
629
|
return i;
|
|
@@ -634,8 +634,8 @@ class we {
|
|
|
634
634
|
* @param vertexSchema
|
|
635
635
|
* @param fragmentSchema
|
|
636
636
|
*/
|
|
637
|
-
createProgramWrapper(e,
|
|
638
|
-
const i = this.createProgram(e,
|
|
637
|
+
createProgramWrapper(e, t, r) {
|
|
638
|
+
const i = this.createProgram(e, t, r);
|
|
639
639
|
if (i) {
|
|
640
640
|
const o = { program: i }, n = e.getProgramParameter(i, e.ACTIVE_ATTRIBUTES);
|
|
641
641
|
for (let c = 0; c < n; c++) {
|
|
@@ -654,13 +654,13 @@ class we {
|
|
|
654
654
|
* 初始化渐变色纹理
|
|
655
655
|
* @param colors
|
|
656
656
|
*/
|
|
657
|
-
setup(e,
|
|
657
|
+
setup(e, t, r = !1, i, o) {
|
|
658
658
|
const n = document.createElement("canvas");
|
|
659
659
|
n.width = 256, n.height = 1;
|
|
660
660
|
const s = n.getContext("2d");
|
|
661
661
|
if (s && e) {
|
|
662
662
|
const c = s == null ? void 0 : s.createLinearGradient(0, 0, 256, 0);
|
|
663
|
-
return
|
|
663
|
+
return t.forEach(([h, d]) => {
|
|
664
664
|
c.addColorStop(h, d);
|
|
665
665
|
}), s.fillStyle = c, s.fillRect(0, 0, 256, 1), {
|
|
666
666
|
canvas: n,
|
|
@@ -676,8 +676,8 @@ class we {
|
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
setupParticle(e,
|
|
680
|
-
const r = Math.ceil(Math.sqrt(
|
|
679
|
+
setupParticle(e, t = 1e3) {
|
|
680
|
+
const r = Math.ceil(Math.sqrt(t)), i = r * r, o = new Uint8Array(i * 4);
|
|
681
681
|
for (let d = 0; d < o.length; d++)
|
|
682
682
|
o[d] = Math.floor(Math.random() * 256);
|
|
683
683
|
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);
|
|
@@ -686,8 +686,8 @@ class we {
|
|
|
686
686
|
const h = this.createDataBuffer(e, "array", c);
|
|
687
687
|
return { resolution: r, total: i, texture0: n, texture1: s, indexBuffer: h };
|
|
688
688
|
}
|
|
689
|
-
bind(e,
|
|
690
|
-
const i = this.createProgram(e,
|
|
689
|
+
bind(e, t, r) {
|
|
690
|
+
const i = this.createProgram(e, t, r);
|
|
691
691
|
if (i) {
|
|
692
692
|
const o = this.createDataBuffer(e, "array", void 0), n = e.getAttribLocation(i, "a_position");
|
|
693
693
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 2, e.FLOAT, !1, 0, 0);
|
|
@@ -698,68 +698,68 @@ class we {
|
|
|
698
698
|
}
|
|
699
699
|
return {};
|
|
700
700
|
}
|
|
701
|
-
bindParticle(e,
|
|
702
|
-
const s = this.createProgramWrapper(e,
|
|
701
|
+
bindParticle(e, t, r, i, o, n) {
|
|
702
|
+
const s = this.createProgramWrapper(e, t, r), c = this.createProgramWrapper(e, i, o), h = this.createProgramWrapper(e, i, n), d = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), p = e.createFramebuffer();
|
|
703
703
|
return { particle: s, screen: c, update: h, quadBuffer: d, frameBuffer: p };
|
|
704
704
|
}
|
|
705
|
-
draw(e,
|
|
705
|
+
draw(e, t, r, i, o, n, s) {
|
|
706
706
|
var c, h;
|
|
707
|
-
if (
|
|
708
|
-
e.resize(),
|
|
707
|
+
if (t && r) {
|
|
708
|
+
e.resize(), t == null || t.viewport(0, 0, (c = t == null ? void 0 : t.canvas) == null ? void 0 : c.width, (h = t == null ? void 0 : t.canvas) == null ? void 0 : h.height), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT);
|
|
709
709
|
try {
|
|
710
|
-
const d =
|
|
711
|
-
if (
|
|
712
|
-
const u =
|
|
713
|
-
|
|
710
|
+
const d = t.getUniformLocation(r, "u_resolution"), p = t.getUniformLocation(r, "u_image"), f = t.getUniformLocation(r, "u_color");
|
|
711
|
+
if (t.useProgram(r), t.uniform2f(d, t.canvas.width * e.ratio, t.canvas.height * e.ratio), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(p, 0), t.activeTexture(t.TEXTURE1), t.bindTexture(t.TEXTURE_2D, o), t.uniform1i(f, 1), s != null && s.uvRange && (s != null && s.sRange)) {
|
|
712
|
+
const u = t.getUniformLocation(r, "u_range_u_v"), v = t.getUniformLocation(r, "u_range_s");
|
|
713
|
+
t.uniform2f(u, s.uvRange[0], s.uvRange[1]), t.uniform2f(v, s.sRange[0], s.sRange[1]);
|
|
714
714
|
}
|
|
715
715
|
const m = e.getBoundPixel(), b = e.map.getZoom() + 1, y = e.getWorldCopy(m, b);
|
|
716
716
|
for (const u of y) {
|
|
717
717
|
const v = (u[0] - m[0]) * e.ratio, g = (u[1] - m[3]) * e.ratio, w = u[2] * e.ratio, [k, _, D, A] = [v, w + v, g, w + g], B = new Float32Array([k, D, _, D, k, A, k, A, _, D, _, A]);
|
|
718
|
-
|
|
718
|
+
t.bindBuffer(t.ARRAY_BUFFER, n), t.bufferData(t.ARRAY_BUFFER, B, t.STATIC_DRAW), t.drawArrays(t.TRIANGLES, 0, 6);
|
|
719
719
|
}
|
|
720
720
|
} catch (d) {
|
|
721
721
|
console.log(`render failed...${d}`);
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
drawParticle(e,
|
|
725
|
+
drawParticle(e, t, r, i, o) {
|
|
726
726
|
var n, s;
|
|
727
|
-
|
|
727
|
+
t && (t == null || t.viewport(0, 0, (n = t == null ? void 0 : t.canvas) == null ? void 0 : n.width, (s = t == null ? void 0 : t.canvas) == null ? void 0 : s.height), t.disable(t.DEPTH_TEST), t.disable(t.STENCIL_TEST), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, r), t.activeTexture(t.TEXTURE1), t.bindTexture(t.TEXTURE_2D, i.texture0), this.renderScreen(e, t, i, o), this.updateParticles(e, t, i, o));
|
|
728
728
|
}
|
|
729
|
-
renderScreen(e,
|
|
730
|
-
|
|
729
|
+
renderScreen(e, t, r, i) {
|
|
730
|
+
t.bindFramebuffer(t.FRAMEBUFFER, r.frameBuffer), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, r.screenTexture, 0), t.viewport(0, 0, t.canvas.width, t.canvas.height), this.renderScreenTexture(t, r.backgroundTexture, r.screen, r.quadBuffer, 0.95), this.renderParticles(e, t, r, i), t.bindFramebuffer(t.FRAMEBUFFER, null), this.renderScreenTexture(t, r.screenTexture, r.screen, r.quadBuffer, 1);
|
|
731
731
|
const o = r.backgroundTexture;
|
|
732
732
|
r.backgroundTexture = r.screenTexture, r.screenTexture = o;
|
|
733
733
|
}
|
|
734
|
-
renderScreenTexture(e,
|
|
735
|
-
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,
|
|
734
|
+
renderScreenTexture(e, t, r, i, o) {
|
|
735
|
+
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, t), e.uniform1i(r.u_screen, 2), e.uniform1f(r.u_opacity, o), e.drawArrays(e.TRIANGLES, 0, 6));
|
|
736
736
|
}
|
|
737
|
-
renderParticles(e,
|
|
738
|
-
if (
|
|
739
|
-
|
|
737
|
+
renderParticles(e, t, r, i) {
|
|
738
|
+
if (t) {
|
|
739
|
+
t.useProgram(r.particle.program), t.bindBuffer(t.ARRAY_BUFFER, r.indexBuffer), t.enableVertexAttribArray(r.particle.a_index), t.vertexAttribPointer(r.particle.a_index, 1, t.FLOAT, !1, 0, 0), t.activeTexture(t.TEXTURE2), t.bindTexture(t.TEXTURE_2D, r.color.texture), t.uniform1i(r.particle.u_factor, 0), t.uniform1i(r.particle.u_particles, 1), t.uniform1i(r.particle.u_color_ramp, 2), t.uniform1f(r.particle.u_particles_resolution, r.resolution * e.ratio), t.uniform1f(r.particle.u_point, e.ratio);
|
|
740
740
|
const o = e.getBoundRange();
|
|
741
|
-
|
|
741
|
+
t.uniform4f(r.particle.u_viewport, o[0], o[1], o[2], o[3]), t.uniform2f(r.particle.u_factor_min, i.uvRange[0], i.uvRange[0]), t.uniform2f(r.particle.u_factor_max, i.uvRange[1], i.uvRange[1]), t.drawArrays(t.POINTS, 0, r.total);
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
updateParticles(e,
|
|
744
|
+
updateParticles(e, t, r, i) {
|
|
745
745
|
var n, s;
|
|
746
|
-
if (
|
|
747
|
-
|
|
746
|
+
if (t) {
|
|
747
|
+
t.bindFramebuffer(t.FRAMEBUFFER, r.frameBuffer), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, r.texture1, 0), t.viewport(0, 0, r.resolution, r.resolution), t.useProgram(r.update.program), t.bindBuffer(t.ARRAY_BUFFER, r.quadBuffer), t.enableVertexAttribArray(r.update.a_pos), t.vertexAttribPointer(r.update.a_pos, 2, t.FLOAT, !1, 0, 0), t.uniform1i(r.update.u_factor, 0), t.uniform1i(r.update.u_particles, 1);
|
|
748
748
|
const c = e.getBoundRange();
|
|
749
|
-
|
|
749
|
+
t.uniform4f(r.update.u_viewport, c[0], c[1], c[2], c[3]), t.uniform1f(r.update.u_rand_seed, Math.random()), t.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), t.uniform2f(r.update.u_factor_min, i.uvRange[0], i.uvRange[0]), t.uniform2f(r.update.u_factor_max, i.uvRange[1], i.uvRange[1]), t.uniform1f(r.update.u_speed_factor, i.speedFactor * e.ratio), t.uniform1f(r.update.u_drop_rate, i.dropRate), t.uniform1f(r.update.u_drop_rate_bump, i.dropRateBump), t.drawArrays(t.TRIANGLES, 0, 6);
|
|
750
750
|
}
|
|
751
751
|
const o = r.texture0;
|
|
752
752
|
r.texture0 = r.texture1, r.texture1 = o;
|
|
753
753
|
}
|
|
754
|
-
resize(e,
|
|
754
|
+
resize(e, t) {
|
|
755
755
|
e.resize();
|
|
756
|
-
const r = new Uint8Array(
|
|
756
|
+
const r = new Uint8Array(t.canvas.width * t.canvas.height * 4).fill(0, 0, t.canvas.width * t.canvas.height * 4), i = this.createTexture(t, t.NEAREST, t.NEAREST, t.CLAMP_TO_EDGE, r, t.canvas.width, t.canvas.height), o = this.createTexture(t, t.NEAREST, t.NEAREST, t.CLAMP_TO_EDGE, r, t.canvas.width, t.canvas.height);
|
|
757
757
|
return { screenTexture: i, backgroundTexture: o };
|
|
758
758
|
}
|
|
759
759
|
async loadImg(e) {
|
|
760
|
-
return new Promise((
|
|
760
|
+
return new Promise((t) => {
|
|
761
761
|
const r = new Blob([e], { type: e.type }), i = URL.createObjectURL(r), o = new Image();
|
|
762
|
-
o.crossOrigin = "anonymous", o.src = i, o.onload = () =>
|
|
762
|
+
o.crossOrigin = "anonymous", o.src = i, o.onload = () => t(o);
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
765
|
}
|
|
@@ -811,9 +811,9 @@ R(N, "fragmentSchema", `
|
|
|
811
811
|
vec4 color = texture2D(u_color, vec2(rgba.r, 0));
|
|
812
812
|
gl_FragColor = color;
|
|
813
813
|
}`);
|
|
814
|
-
class
|
|
814
|
+
class V {
|
|
815
815
|
}
|
|
816
|
-
R(
|
|
816
|
+
R(V, "vertexSchema", `
|
|
817
817
|
precision mediump float;
|
|
818
818
|
|
|
819
819
|
attribute float a_index; // 索引
|
|
@@ -837,7 +837,7 @@ R(U, "vertexSchema", `
|
|
|
837
837
|
gl_PointSize = 1.0;
|
|
838
838
|
// gl_PointSize = u_point;
|
|
839
839
|
gl_Position = vec4(2.0 * v_particle_pos.x - 1.0, 1.0 - 2.0 * v_particle_pos.y, 0, 1);
|
|
840
|
-
}`), R(
|
|
840
|
+
}`), R(V, "fragmentSchema", `
|
|
841
841
|
precision mediump float;
|
|
842
842
|
|
|
843
843
|
uniform sampler2D u_factor;
|
|
@@ -859,7 +859,7 @@ R(U, "vertexSchema", `
|
|
|
859
859
|
|
|
860
860
|
float f = 1.0 - uv.b;
|
|
861
861
|
gl_FragColor = texture2D(u_color_ramp, ramp_pos) * f;
|
|
862
|
-
}`), R(
|
|
862
|
+
}`), R(V, "quadVertSchema", `
|
|
863
863
|
precision mediump float;
|
|
864
864
|
|
|
865
865
|
attribute vec2 a_pos;
|
|
@@ -869,7 +869,7 @@ R(U, "vertexSchema", `
|
|
|
869
869
|
void main() {
|
|
870
870
|
v_tex_pos = a_pos;
|
|
871
871
|
gl_Position = vec4(1.0 - 2.0 * a_pos, 0, 1);
|
|
872
|
-
}`), R(
|
|
872
|
+
}`), R(V, "screenFragmentSchema", `
|
|
873
873
|
precision mediump float;
|
|
874
874
|
|
|
875
875
|
uniform sampler2D u_screen;
|
|
@@ -881,7 +881,7 @@ R(U, "vertexSchema", `
|
|
|
881
881
|
vec4 color = texture2D(u_screen, 1.0 - v_tex_pos);
|
|
882
882
|
// a hack to guarantee opacity fade out even with a value close to 1.0
|
|
883
883
|
gl_FragColor = vec4(floor(255.0 * color * u_opacity) / 255.0);
|
|
884
|
-
}`), R(
|
|
884
|
+
}`), R(V, "updateFragmentSchema", `
|
|
885
885
|
precision mediump float;
|
|
886
886
|
|
|
887
887
|
uniform sampler2D u_particles;
|
|
@@ -960,7 +960,7 @@ R(U, "vertexSchema", `
|
|
|
960
960
|
fract(pos * 255.0),
|
|
961
961
|
floor(pos * 255.0) / 255.0);
|
|
962
962
|
}`);
|
|
963
|
-
class
|
|
963
|
+
class Gt {
|
|
964
964
|
constructor(e = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg") {
|
|
965
965
|
R(this, "token");
|
|
966
966
|
R(this, "mapboxCustomer");
|
|
@@ -2616,15 +2616,15 @@ const Jt = {
|
|
|
2616
2616
|
watch: {
|
|
2617
2617
|
"factor.version": {
|
|
2618
2618
|
handler() {
|
|
2619
|
-
var
|
|
2620
|
-
(
|
|
2619
|
+
var a;
|
|
2620
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
2621
2621
|
},
|
|
2622
2622
|
deep: !0
|
|
2623
2623
|
},
|
|
2624
2624
|
toggleVersion: {
|
|
2625
2625
|
handler() {
|
|
2626
|
-
var
|
|
2627
|
-
this.right = (((
|
|
2626
|
+
var a, e;
|
|
2627
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
2628
2628
|
},
|
|
2629
2629
|
immediate: !0
|
|
2630
2630
|
}
|
|
@@ -2636,19 +2636,19 @@ const Jt = {
|
|
|
2636
2636
|
this.handleRender();
|
|
2637
2637
|
}, 500);
|
|
2638
2638
|
else if (this.factor) {
|
|
2639
|
-
const
|
|
2640
|
-
let e = 0,
|
|
2641
|
-
this.handleDraw(),
|
|
2639
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
2640
|
+
let e = 0, t = 0;
|
|
2641
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[wind-particle] add elapsed: ", t, ", total: ", e += t);
|
|
2642
2642
|
}
|
|
2643
2643
|
},
|
|
2644
2644
|
handleClear() {
|
|
2645
|
-
var
|
|
2646
|
-
(
|
|
2645
|
+
var a, e, t, r, i, o, n, s;
|
|
2646
|
+
(a = this.viewport) == null || a.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 = (t = this.viewport) == null ? void 0 : t.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();
|
|
2647
2647
|
},
|
|
2648
2648
|
handleSetup() {
|
|
2649
2649
|
if (!this.context) {
|
|
2650
2650
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
2651
|
-
const
|
|
2651
|
+
const a = [
|
|
2652
2652
|
[0, "rgb(98, 113, 184, 0.8)"],
|
|
2653
2653
|
// 0
|
|
2654
2654
|
[12 / 255, "rgb(98, 113, 184)"],
|
|
@@ -2677,40 +2677,40 @@ const Jt = {
|
|
|
2677
2677
|
// 30m/s
|
|
2678
2678
|
[1, "rgb(91, 136, 161)"]
|
|
2679
2679
|
];
|
|
2680
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
2681
|
-
const { program: e, aPositionBuffer:
|
|
2682
|
-
this.program = e, this.aPositionBuffer =
|
|
2680
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
2681
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.uvFragmentSchema);
|
|
2682
|
+
this.program = e, this.aPositionBuffer = t;
|
|
2683
2683
|
}
|
|
2684
2684
|
this.handleParticleSetup();
|
|
2685
2685
|
},
|
|
2686
2686
|
handleParticleSetup() {
|
|
2687
2687
|
if (!this.particleContext) {
|
|
2688
2688
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
2689
|
-
const
|
|
2689
|
+
const a = [
|
|
2690
2690
|
[0, "rgb(183,224,224)"],
|
|
2691
2691
|
[1, "rgb(217,220,220)"]
|
|
2692
2692
|
];
|
|
2693
2693
|
this.wrapper = this.webgl.bindParticle(
|
|
2694
2694
|
this.particleContext,
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
2695
|
+
V.vertexSchema,
|
|
2696
|
+
V.fragmentSchema,
|
|
2697
|
+
V.quadVertSchema,
|
|
2698
|
+
V.screenFragmentSchema,
|
|
2699
|
+
V.updateFragmentSchema
|
|
2700
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, a, !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);
|
|
2701
2701
|
}
|
|
2702
2702
|
},
|
|
2703
2703
|
async handleDraw() {
|
|
2704
2704
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
2705
2705
|
this.etime = this.factor.etime;
|
|
2706
|
-
const
|
|
2707
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
2706
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
2707
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a), this.particleTexture = this.webgl.createTexture(
|
|
2708
2708
|
this.particleContext,
|
|
2709
2709
|
this.particleContext.NEAREST,
|
|
2710
2710
|
this.particleContext.LINEAR,
|
|
2711
2711
|
this.particleContext.CLAMP_TO_EDGE,
|
|
2712
|
-
|
|
2713
|
-
), this.wrapper.image =
|
|
2712
|
+
a
|
|
2713
|
+
), this.wrapper.image = a;
|
|
2714
2714
|
}
|
|
2715
2715
|
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);
|
|
2716
2716
|
},
|
|
@@ -2726,7 +2726,7 @@ const Jt = {
|
|
|
2726
2726
|
});
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
|
-
}, le = (
|
|
2729
|
+
}, le = (a) => (H("data-v-41a686d0"), a = a(), G(), a), Xt = { key: 0 }, qt = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "kts", -1)), Yt = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "0", -1)), Qt = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "5", -1)), Kt = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "10", -1)), ea = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "20", -1)), ta = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "30", -1)), aa = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "40", -1)), ia = /* @__PURE__ */ le(() => /* @__PURE__ */ l("span", null, "60", -1)), ra = [
|
|
2730
2730
|
qt,
|
|
2731
2731
|
Yt,
|
|
2732
2732
|
Qt,
|
|
@@ -2736,12 +2736,12 @@ const Jt = {
|
|
|
2736
2736
|
aa,
|
|
2737
2737
|
ia
|
|
2738
2738
|
];
|
|
2739
|
-
function oa(
|
|
2739
|
+
function oa(a, e, t, r, i, o) {
|
|
2740
2740
|
var n;
|
|
2741
|
-
return (n =
|
|
2741
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", Xt, [
|
|
2742
2742
|
l("div", {
|
|
2743
2743
|
class: "legend-bars flex-center",
|
|
2744
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
2744
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
2745
2745
|
}, ra, 4)
|
|
2746
2746
|
])) : $("", !0);
|
|
2747
2747
|
}
|
|
@@ -2792,8 +2792,8 @@ const na = {
|
|
|
2792
2792
|
watch: {
|
|
2793
2793
|
"current.version": {
|
|
2794
2794
|
handler() {
|
|
2795
|
-
var
|
|
2796
|
-
(
|
|
2795
|
+
var a;
|
|
2796
|
+
(a = this.current) != null && a.active ? this.handleRender() : this.handleClear();
|
|
2797
2797
|
},
|
|
2798
2798
|
deep: !0
|
|
2799
2799
|
},
|
|
@@ -2811,15 +2811,15 @@ const na = {
|
|
|
2811
2811
|
},
|
|
2812
2812
|
toggleVersion: {
|
|
2813
2813
|
handler() {
|
|
2814
|
-
var
|
|
2815
|
-
this.right = (((
|
|
2814
|
+
var a, e;
|
|
2815
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
2816
2816
|
},
|
|
2817
2817
|
immediate: !0
|
|
2818
2818
|
},
|
|
2819
2819
|
weatherLayers: {
|
|
2820
2820
|
handler() {
|
|
2821
|
-
var
|
|
2822
|
-
this.bottom = (((
|
|
2821
|
+
var a;
|
|
2822
|
+
this.bottom = (((a = document.getElementsByClassName("active-layers")[0]) == null ? void 0 : a.clientHeight) || 0) + 105;
|
|
2823
2823
|
},
|
|
2824
2824
|
immediate: !0
|
|
2825
2825
|
}
|
|
@@ -2829,15 +2829,15 @@ const na = {
|
|
|
2829
2829
|
this.$emit("particle", { particle: !this.showParticle, key: "current", weight: 96 });
|
|
2830
2830
|
},
|
|
2831
2831
|
handleRender() {
|
|
2832
|
-
var
|
|
2832
|
+
var a, e;
|
|
2833
2833
|
if (!this.map)
|
|
2834
2834
|
setTimeout(() => {
|
|
2835
2835
|
this.handleRender();
|
|
2836
2836
|
}, 500);
|
|
2837
2837
|
else if (this.current) {
|
|
2838
|
-
const
|
|
2838
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
2839
2839
|
let r = 0, i = 0, o = this.empty;
|
|
2840
|
-
this.current.active && (o = this.current.data), (
|
|
2840
|
+
this.current.active && (o = this.current.data), (a = this.map) != null && a.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[current] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
2841
2841
|
{
|
|
2842
2842
|
id: this.speedLayer,
|
|
2843
2843
|
type: "fill",
|
|
@@ -2896,7 +2896,7 @@ const na = {
|
|
|
2896
2896
|
}
|
|
2897
2897
|
},
|
|
2898
2898
|
this.beforeLayer
|
|
2899
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
2899
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[current] add elapsed: ", i, ", total: ", r += i)), this.handleToggle();
|
|
2900
2900
|
}
|
|
2901
2901
|
},
|
|
2902
2902
|
handleToggle() {
|
|
@@ -2919,24 +2919,24 @@ const na = {
|
|
|
2919
2919
|
key: 1,
|
|
2920
2920
|
class: "iconfont"
|
|
2921
2921
|
};
|
|
2922
|
-
function ma(
|
|
2922
|
+
function ma(a, e, t, r, i, o) {
|
|
2923
2923
|
var n;
|
|
2924
|
-
return (n =
|
|
2924
|
+
return (n = t.current) != null && n.active ? (L(), x("div", la, [
|
|
2925
2925
|
l("div", {
|
|
2926
2926
|
class: "flex-center tool-bars",
|
|
2927
2927
|
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
2928
2928
|
}, [
|
|
2929
|
-
|
|
2929
|
+
t.mapProjection === "mercator" ? (L(), x("div", {
|
|
2930
2930
|
key: 0,
|
|
2931
2931
|
class: "flex-start",
|
|
2932
2932
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
2933
2933
|
}, [
|
|
2934
|
-
|
|
2934
|
+
t.showParticle ? (L(), x("i", ca, "")) : (L(), x("i", ha, "")),
|
|
2935
2935
|
l("span", {
|
|
2936
|
-
class: M(
|
|
2936
|
+
class: M(t.showParticle ? "active" : "")
|
|
2937
2937
|
}, "Current Particles", 2)
|
|
2938
2938
|
])) : $("", !0),
|
|
2939
|
-
|
|
2939
|
+
t.showParticle ? (L(), x("div", {
|
|
2940
2940
|
key: 1,
|
|
2941
2941
|
class: "flex-start",
|
|
2942
2942
|
style: { "margin-left": "16px" },
|
|
@@ -3003,15 +3003,15 @@ const ya = {
|
|
|
3003
3003
|
watch: {
|
|
3004
3004
|
"factor.version": {
|
|
3005
3005
|
handler() {
|
|
3006
|
-
var
|
|
3007
|
-
(
|
|
3006
|
+
var a;
|
|
3007
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3008
3008
|
},
|
|
3009
3009
|
deep: !0
|
|
3010
3010
|
},
|
|
3011
3011
|
toggleVersion: {
|
|
3012
3012
|
handler() {
|
|
3013
|
-
var
|
|
3014
|
-
this.right = (((
|
|
3013
|
+
var a, e;
|
|
3014
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
3015
3015
|
},
|
|
3016
3016
|
immediate: !0
|
|
3017
3017
|
}
|
|
@@ -3023,19 +3023,19 @@ const ya = {
|
|
|
3023
3023
|
this.handleRender();
|
|
3024
3024
|
}, 500);
|
|
3025
3025
|
else if (this.factor) {
|
|
3026
|
-
const
|
|
3027
|
-
let e = 0,
|
|
3028
|
-
this.handleDraw(),
|
|
3026
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
3027
|
+
let e = 0, t = 0;
|
|
3028
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[current-particle] add elapsed: ", t, ", total: ", e += t);
|
|
3029
3029
|
}
|
|
3030
3030
|
},
|
|
3031
3031
|
handleClear() {
|
|
3032
|
-
var
|
|
3033
|
-
(
|
|
3032
|
+
var a, e, t, r, i, o, n, s;
|
|
3033
|
+
(a = this.viewport) == null || a.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 = (t = this.viewport) == null ? void 0 : t.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();
|
|
3034
3034
|
},
|
|
3035
3035
|
handleSetup() {
|
|
3036
3036
|
if (!this.context) {
|
|
3037
3037
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
3038
|
-
const
|
|
3038
|
+
const a = [
|
|
3039
3039
|
[0 / 255, "rgba(95, 143, 197,1)"],
|
|
3040
3040
|
[5 / 255, "rgba(64,127,115,1)"],
|
|
3041
3041
|
[10 / 255, "rgb(58,164,58)"],
|
|
@@ -3055,27 +3055,27 @@ const ya = {
|
|
|
3055
3055
|
// 2.54
|
|
3056
3056
|
[1, "rgb(195,194,194)"]
|
|
3057
3057
|
];
|
|
3058
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
3059
|
-
const { program: e, aPositionBuffer:
|
|
3060
|
-
this.program = e, this.aPositionBuffer =
|
|
3058
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
3059
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.uvFragmentSchema);
|
|
3060
|
+
this.program = e, this.aPositionBuffer = t;
|
|
3061
3061
|
}
|
|
3062
3062
|
this.handleParticleSetup();
|
|
3063
3063
|
},
|
|
3064
3064
|
handleParticleSetup() {
|
|
3065
3065
|
if (!this.particleContext) {
|
|
3066
3066
|
this.particleContext = this.viewport.particleCanvas.getContext("webgl");
|
|
3067
|
-
const
|
|
3067
|
+
const a = [
|
|
3068
3068
|
[0, "rgb(183,224,224)"],
|
|
3069
3069
|
[1, "rgb(199,202,202)"]
|
|
3070
3070
|
];
|
|
3071
3071
|
this.wrapper = this.webgl.bindParticle(
|
|
3072
3072
|
this.particleContext,
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
), this.wrapper.color = this.webgl.setup(this.particleContext,
|
|
3073
|
+
V.vertexSchema,
|
|
3074
|
+
V.fragmentSchema,
|
|
3075
|
+
V.quadVertSchema,
|
|
3076
|
+
V.screenFragmentSchema,
|
|
3077
|
+
V.updateFragmentSchema
|
|
3078
|
+
), this.wrapper.color = this.webgl.setup(this.particleContext, a, !0, 16, 16), this.wrapper = {
|
|
3079
3079
|
...this.wrapper,
|
|
3080
3080
|
...this.webgl.setupParticle(this.particleContext, 12e3),
|
|
3081
3081
|
...this.webgl.resize(this.viewport, this.particleContext)
|
|
@@ -3085,14 +3085,14 @@ const ya = {
|
|
|
3085
3085
|
async handleDraw() {
|
|
3086
3086
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
3087
3087
|
this.etime = this.factor.etime;
|
|
3088
|
-
const
|
|
3089
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
3088
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
3089
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a), this.particleTexture = this.webgl.createTexture(
|
|
3090
3090
|
this.particleContext,
|
|
3091
3091
|
this.particleContext.NEAREST,
|
|
3092
3092
|
this.particleContext.LINEAR,
|
|
3093
3093
|
this.particleContext.CLAMP_TO_EDGE,
|
|
3094
|
-
|
|
3095
|
-
), this.wrapper.image =
|
|
3094
|
+
a
|
|
3095
|
+
), this.wrapper.image = a;
|
|
3096
3096
|
}
|
|
3097
3097
|
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);
|
|
3098
3098
|
},
|
|
@@ -3108,7 +3108,7 @@ const ya = {
|
|
|
3108
3108
|
});
|
|
3109
3109
|
}
|
|
3110
3110
|
}
|
|
3111
|
-
}, Le = (
|
|
3111
|
+
}, Le = (a) => (H("data-v-9115889b"), a = a(), G(), a), fa = { key: 0 }, ga = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "kts", -1)), ba = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "0", -1)), va = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "0.4", -1)), _a = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "0.8", -1)), wa = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "1.6", -1)), La = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "2", -1)), xa = /* @__PURE__ */ Le(() => /* @__PURE__ */ l("span", null, "3.2", -1)), Ca = [
|
|
3112
3112
|
ga,
|
|
3113
3113
|
ba,
|
|
3114
3114
|
va,
|
|
@@ -3117,12 +3117,12 @@ const ya = {
|
|
|
3117
3117
|
La,
|
|
3118
3118
|
xa
|
|
3119
3119
|
];
|
|
3120
|
-
function Sa(
|
|
3120
|
+
function Sa(a, e, t, r, i, o) {
|
|
3121
3121
|
var n;
|
|
3122
|
-
return (n =
|
|
3122
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", fa, [
|
|
3123
3123
|
l("div", {
|
|
3124
3124
|
class: "legend-bars flex-center",
|
|
3125
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
3125
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
3126
3126
|
}, Ca, 4)
|
|
3127
3127
|
])) : $("", !0);
|
|
3128
3128
|
}
|
|
@@ -3150,23 +3150,23 @@ const ka = /* @__PURE__ */ T(ya, [["render", Sa], ["__scopeId", "data-v-9115889b
|
|
|
3150
3150
|
watch: {
|
|
3151
3151
|
"sigWave.version": {
|
|
3152
3152
|
handler() {
|
|
3153
|
-
var
|
|
3154
|
-
(
|
|
3153
|
+
var a;
|
|
3154
|
+
(a = this.sigWave) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3155
3155
|
},
|
|
3156
3156
|
deep: !0
|
|
3157
3157
|
}
|
|
3158
3158
|
},
|
|
3159
3159
|
methods: {
|
|
3160
3160
|
handleRender() {
|
|
3161
|
-
var
|
|
3161
|
+
var a, e;
|
|
3162
3162
|
if (!this.map)
|
|
3163
3163
|
setTimeout(() => {
|
|
3164
3164
|
this.handleRender();
|
|
3165
3165
|
}, 500);
|
|
3166
3166
|
else if (this.sigWave) {
|
|
3167
|
-
const
|
|
3167
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
3168
3168
|
let r = 0, i = 0, o = this.empty;
|
|
3169
|
-
this.sigWave.active && (o = this.sigWave.data), (
|
|
3169
|
+
this.sigWave.active && (o = this.sigWave.data), (a = this.map) != null && a.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[sig.wave] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
3170
3170
|
{
|
|
3171
3171
|
id: this.heightLayer,
|
|
3172
3172
|
type: "fill",
|
|
@@ -3229,7 +3229,7 @@ const ka = /* @__PURE__ */ T(ya, [["render", Sa], ["__scopeId", "data-v-9115889b
|
|
|
3229
3229
|
}
|
|
3230
3230
|
},
|
|
3231
3231
|
this.beforeLayer
|
|
3232
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3232
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[sig.wave] add elapsed: ", i, ", total: ", r += i));
|
|
3233
3233
|
}
|
|
3234
3234
|
},
|
|
3235
3235
|
handleClear() {
|
|
@@ -3237,7 +3237,7 @@ const ka = /* @__PURE__ */ T(ya, [["render", Sa], ["__scopeId", "data-v-9115889b
|
|
|
3237
3237
|
}
|
|
3238
3238
|
}
|
|
3239
3239
|
};
|
|
3240
|
-
function Pa(
|
|
3240
|
+
function Pa(a, e, t, r, i, o) {
|
|
3241
3241
|
return L(), x("div");
|
|
3242
3242
|
}
|
|
3243
3243
|
const Ta = /* @__PURE__ */ T(za, [["render", Pa]]), Ea = {
|
|
@@ -3265,23 +3265,23 @@ const Ta = /* @__PURE__ */ T(za, [["render", Pa]]), Ea = {
|
|
|
3265
3265
|
watch: {
|
|
3266
3266
|
"swell.version": {
|
|
3267
3267
|
handler() {
|
|
3268
|
-
var
|
|
3269
|
-
(
|
|
3268
|
+
var a;
|
|
3269
|
+
(a = this.swell) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3270
3270
|
},
|
|
3271
3271
|
deep: !0
|
|
3272
3272
|
}
|
|
3273
3273
|
},
|
|
3274
3274
|
methods: {
|
|
3275
3275
|
handleRender() {
|
|
3276
|
-
var
|
|
3276
|
+
var a, e;
|
|
3277
3277
|
if (!this.map)
|
|
3278
3278
|
setTimeout(() => {
|
|
3279
3279
|
this.handleRender();
|
|
3280
3280
|
}, 500);
|
|
3281
3281
|
else if (this.swell) {
|
|
3282
|
-
const
|
|
3282
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
3283
3283
|
let r = 0, i = 0, o = this.empty;
|
|
3284
|
-
this.swell.active && (o = this.swell.data), (
|
|
3284
|
+
this.swell.active && (o = this.swell.data), (a = this.map) != null && a.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[swell] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer(
|
|
3285
3285
|
{
|
|
3286
3286
|
id: this.heightLayer,
|
|
3287
3287
|
type: "line",
|
|
@@ -3370,7 +3370,7 @@ const Ta = /* @__PURE__ */ T(za, [["render", Pa]]), Ea = {
|
|
|
3370
3370
|
}
|
|
3371
3371
|
},
|
|
3372
3372
|
this.beforeLayer
|
|
3373
|
-
), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3373
|
+
), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[swell] add elapsed: ", i, ", total: ", r += i));
|
|
3374
3374
|
}
|
|
3375
3375
|
},
|
|
3376
3376
|
handleClear() {
|
|
@@ -3378,7 +3378,7 @@ const Ta = /* @__PURE__ */ T(za, [["render", Pa]]), Ea = {
|
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
3380
|
};
|
|
3381
|
-
function Ia(
|
|
3381
|
+
function Ia(a, e, t, r, i, o) {
|
|
3382
3382
|
return L(), x("div");
|
|
3383
3383
|
}
|
|
3384
3384
|
const Ra = /* @__PURE__ */ T(Ea, [["render", Ia]]), Da = {
|
|
@@ -3409,15 +3409,15 @@ const Ra = /* @__PURE__ */ T(Ea, [["render", Ia]]), Da = {
|
|
|
3409
3409
|
watch: {
|
|
3410
3410
|
"prmsl.version": {
|
|
3411
3411
|
handler() {
|
|
3412
|
-
var
|
|
3413
|
-
(
|
|
3412
|
+
var a;
|
|
3413
|
+
(a = this.prmsl) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3414
3414
|
},
|
|
3415
3415
|
deep: !0
|
|
3416
3416
|
}
|
|
3417
3417
|
},
|
|
3418
3418
|
methods: {
|
|
3419
3419
|
handleRender() {
|
|
3420
|
-
var
|
|
3420
|
+
var a, e, t;
|
|
3421
3421
|
if (!this.map)
|
|
3422
3422
|
setTimeout(() => {
|
|
3423
3423
|
this.handleRender();
|
|
@@ -3425,7 +3425,7 @@ const Ra = /* @__PURE__ */ T(Ea, [["render", Ia]]), Da = {
|
|
|
3425
3425
|
else if (this.prmsl) {
|
|
3426
3426
|
const r = (/* @__PURE__ */ new Date()).valueOf();
|
|
3427
3427
|
let i = 0, o = 0, n = this.empty;
|
|
3428
|
-
this.prmsl.active && (n = this.prmsl.data), (
|
|
3428
|
+
this.prmsl.active && (n = this.prmsl.data), (a = this.map) != null && a.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(
|
|
3429
3429
|
{
|
|
3430
3430
|
id: this.layer,
|
|
3431
3431
|
type: "line",
|
|
@@ -3438,7 +3438,7 @@ const Ra = /* @__PURE__ */ T(Ea, [["render", Ia]]), Da = {
|
|
|
3438
3438
|
}
|
|
3439
3439
|
},
|
|
3440
3440
|
this.beforeLayer
|
|
3441
|
-
), (
|
|
3441
|
+
), (t = this.map) == null || t.addLayer(
|
|
3442
3442
|
{
|
|
3443
3443
|
id: this.labelLayer,
|
|
3444
3444
|
type: "symbol",
|
|
@@ -3497,16 +3497,16 @@ const Ra = /* @__PURE__ */ T(Ea, [["render", Ia]]), Da = {
|
|
|
3497
3497
|
}
|
|
3498
3498
|
},
|
|
3499
3499
|
handleMove() {
|
|
3500
|
-
var
|
|
3501
|
-
(e = (
|
|
3500
|
+
var a, e;
|
|
3501
|
+
(e = (a = this.map) == null ? void 0 : a.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");
|
|
3502
3502
|
},
|
|
3503
3503
|
handleClear() {
|
|
3504
|
-
var
|
|
3505
|
-
this.activeWeatherLayers.length === 0 && ((e = (
|
|
3504
|
+
var a, e;
|
|
3505
|
+
this.activeWeatherLayers.length === 0 && ((e = (a = this.map) == null ? void 0 : a.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);
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
3508
|
};
|
|
3509
|
-
function Aa(
|
|
3509
|
+
function Aa(a, e, t, r, i, o) {
|
|
3510
3510
|
return L(), x("div");
|
|
3511
3511
|
}
|
|
3512
3512
|
const Ma = /* @__PURE__ */ T(Da, [["render", Aa]]), $a = {
|
|
@@ -3532,23 +3532,23 @@ const Ma = /* @__PURE__ */ T(Da, [["render", Aa]]), $a = {
|
|
|
3532
3532
|
watch: {
|
|
3533
3533
|
"iceberg.version": {
|
|
3534
3534
|
handler() {
|
|
3535
|
-
var
|
|
3536
|
-
(
|
|
3535
|
+
var a;
|
|
3536
|
+
(a = this.iceberg) != null && a.active ? this.handleRender() : this.handleClear();
|
|
3537
3537
|
},
|
|
3538
3538
|
deep: !0
|
|
3539
3539
|
}
|
|
3540
3540
|
},
|
|
3541
3541
|
methods: {
|
|
3542
3542
|
handleRender() {
|
|
3543
|
-
var
|
|
3543
|
+
var a, e;
|
|
3544
3544
|
if (!this.map)
|
|
3545
3545
|
setTimeout(() => {
|
|
3546
3546
|
this.handleRender();
|
|
3547
3547
|
}, 500);
|
|
3548
3548
|
else if (this.iceberg) {
|
|
3549
|
-
const
|
|
3549
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
3550
3550
|
let r = 0, i = 0, o = this.empty;
|
|
3551
|
-
this.iceberg.active && (o = this.iceberg.data), (
|
|
3551
|
+
this.iceberg.active && (o = this.iceberg.data), (a = this.map) != null && a.getSource(this.source) ? ((e = this.map) == null || e.getSource(this.source).setData(o), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[iceberg] update elapsed: ", i, ", total: ", r += i)) : (this.map.addSource(this.source, { type: "geojson", data: o }), this.map.addLayer({
|
|
3552
3552
|
id: this.layer,
|
|
3553
3553
|
type: "line",
|
|
3554
3554
|
source: this.source,
|
|
@@ -3558,7 +3558,7 @@ const Ma = /* @__PURE__ */ T(Da, [["render", Aa]]), $a = {
|
|
|
3558
3558
|
"line-width": 2,
|
|
3559
3559
|
"line-opacity": 1
|
|
3560
3560
|
}
|
|
3561
|
-
}), i = (/* @__PURE__ */ new Date()).valueOf() - (
|
|
3561
|
+
}), i = (/* @__PURE__ */ new Date()).valueOf() - (t + r), console.log("[iceberg] add elapsed: ", i, ", total: ", r += i));
|
|
3562
3562
|
}
|
|
3563
3563
|
},
|
|
3564
3564
|
handleClear() {
|
|
@@ -3566,7 +3566,7 @@ const Ma = /* @__PURE__ */ T(Da, [["render", Aa]]), $a = {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
3568
|
};
|
|
3569
|
-
function Ba(
|
|
3569
|
+
function Ba(a, e, t, r, i, o) {
|
|
3570
3570
|
return L(), x("div");
|
|
3571
3571
|
}
|
|
3572
3572
|
const Na = /* @__PURE__ */ T($a, [["render", Ba]]);
|
|
@@ -3581,6 +3581,10 @@ const Wa = {
|
|
|
3581
3581
|
},
|
|
3582
3582
|
date: {
|
|
3583
3583
|
type: String
|
|
3584
|
+
},
|
|
3585
|
+
timeZone: {
|
|
3586
|
+
type: Number,
|
|
3587
|
+
default: 0
|
|
3584
3588
|
}
|
|
3585
3589
|
},
|
|
3586
3590
|
emits: ["tropical", "tropicalProbability"],
|
|
@@ -3612,13 +3616,16 @@ const Wa = {
|
|
|
3612
3616
|
},
|
|
3613
3617
|
computed: {
|
|
3614
3618
|
computeTime() {
|
|
3615
|
-
return function(
|
|
3616
|
-
if (
|
|
3617
|
-
const e =
|
|
3618
|
-
return `${e.format("MMM-DD,HHmm
|
|
3619
|
+
return function(a) {
|
|
3620
|
+
if (a) {
|
|
3621
|
+
const e = Z(a).utc().utcOffset(this.timeZone), t = this.timeZone < 0 ? this.timeZone : "+" + this.timeZone;
|
|
3622
|
+
return `${e.format("MMM-DD,HHmm")}[ UTC ${t} ] ( ${e == null ? void 0 : e.fromNow()} )`;
|
|
3619
3623
|
}
|
|
3620
3624
|
return "-";
|
|
3621
3625
|
};
|
|
3626
|
+
},
|
|
3627
|
+
computeTimezone() {
|
|
3628
|
+
return this.timeZone < 0 ? this.timeZone : "+" + this.timeZone;
|
|
3622
3629
|
}
|
|
3623
3630
|
},
|
|
3624
3631
|
watch: {
|
|
@@ -3636,40 +3643,49 @@ const Wa = {
|
|
|
3636
3643
|
},
|
|
3637
3644
|
"tropicals.version": {
|
|
3638
3645
|
handler() {
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
var h;
|
|
3646
|
-
let n = 0, s;
|
|
3647
|
-
const c = t.filter((d) => {
|
|
3648
|
-
var p, f;
|
|
3649
|
-
return ((f = (p = d.properties) == null ? void 0 : p.category) == null ? void 0 : f.split("-")[0]) === o;
|
|
3650
|
-
});
|
|
3651
|
-
(h = c.filter((d) => {
|
|
3652
|
-
var p, f;
|
|
3653
|
-
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((f = d.properties) == null ? void 0 : f.type) === "forecast";
|
|
3654
|
-
})[0]) == null || h.properties.model, c.forEach((d, p) => {
|
|
3655
|
-
var f, m, b, y, u, v;
|
|
3656
|
-
((f = d.geometry) == null ? void 0 : f.type) === "Point" && ((m = d.properties) == null ? void 0 : m.type) === "history" && (n = p, s = s === void 0 ? p : s), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && s === void 0 && (s = p), ((u = d.geometry) == null ? void 0 : u.type) === "LineString" && ((v = d.properties) == null || v.type);
|
|
3657
|
-
}), c.map((d, p) => {
|
|
3658
|
-
var f, m, b, y, u, v, g, w;
|
|
3659
|
-
if (((f = d.geometry) == null ? void 0 : f.type) === "LineString" && ((m = d.properties) == null || m.type), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && (d.properties.name = o), ((u = d.geometry) == null ? void 0 : u.type) === "Point" && ((v = d.properties) == null ? void 0 : v.type) === "history") {
|
|
3660
|
-
const k = ((w = (g = d.properties) == null ? void 0 : g.format) == null ? void 0 : w.slice(7, 12)) === te().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm") + "Z";
|
|
3661
|
-
d.properties.showHistoryLabel = k || p === n, d.properties.showNameLabel = p === n, d.properties.name = o;
|
|
3662
|
-
}
|
|
3663
|
-
return d;
|
|
3664
|
-
});
|
|
3665
|
-
}), this.handleInit();
|
|
3646
|
+
this.handleRefresh();
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
timeZone: {
|
|
3650
|
+
handler() {
|
|
3651
|
+
this.handleRefresh();
|
|
3666
3652
|
}
|
|
3667
3653
|
}
|
|
3668
3654
|
},
|
|
3669
3655
|
methods: {
|
|
3656
|
+
handleRefresh() {
|
|
3657
|
+
var r, i;
|
|
3658
|
+
const a = ((i = (r = this.tropicals) == null ? void 0 : r.data) == null ? void 0 : i.features) || [], e = Z().utc().hour(), t = [];
|
|
3659
|
+
a.forEach((o) => {
|
|
3660
|
+
var n, s, c;
|
|
3661
|
+
(n = o.properties) != null && n.name && !t.includes((s = o.properties) == null ? void 0 : s.name) && t.push((c = o.properties) == null ? void 0 : c.name);
|
|
3662
|
+
}), t.forEach((o) => {
|
|
3663
|
+
var h;
|
|
3664
|
+
let n = 0, s;
|
|
3665
|
+
const c = a.filter((d) => {
|
|
3666
|
+
var p, f;
|
|
3667
|
+
return ((f = (p = d.properties) == null ? void 0 : p.category) == null ? void 0 : f.split("-")[0]) === o;
|
|
3668
|
+
});
|
|
3669
|
+
(h = c.filter((d) => {
|
|
3670
|
+
var p, f;
|
|
3671
|
+
return ((p = d.geometry) == null ? void 0 : p.type) === "LineString" && ((f = d.properties) == null ? void 0 : f.type) === "forecast";
|
|
3672
|
+
})[0]) == null || h.properties.model, c.forEach((d, p) => {
|
|
3673
|
+
var f, m, b, y, u, v;
|
|
3674
|
+
((f = d.geometry) == null ? void 0 : f.type) === "Point" && ((m = d.properties) == null ? void 0 : m.type) === "history" && (n = p, s = s === void 0 ? p : s), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && s === void 0 && (s = p), ((u = d.geometry) == null ? void 0 : u.type) === "LineString" && ((v = d.properties) == null || v.type);
|
|
3675
|
+
}), c.map((d, p) => {
|
|
3676
|
+
var f, m, b, y, u, v, g;
|
|
3677
|
+
if (((f = d.geometry) == null ? void 0 : f.type) === "LineString" && ((m = d.properties) == null || m.type), ((b = d.geometry) == null ? void 0 : b.type) === "Point" && ((y = d.properties) == null ? void 0 : y.type) === "forecast" && (d.properties.name = o, d.properties.format = Z(d.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((u = d.geometry) == null ? void 0 : u.type) === "Point" && ((v = d.properties) == null ? void 0 : v.type) === "history") {
|
|
3678
|
+
d.properties.format = Z(d.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
3679
|
+
const w = Z((g = d.properties) == null ? void 0 : g.date).utc().format("HHmm") === Z().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
3680
|
+
d.properties.showHistoryLabel = w || p === n, d.properties.showNameLabel = p === n, d.properties.name = o;
|
|
3681
|
+
}
|
|
3682
|
+
return d;
|
|
3683
|
+
});
|
|
3684
|
+
}), this.handleInit();
|
|
3685
|
+
},
|
|
3670
3686
|
handleInit() {
|
|
3671
|
-
var
|
|
3672
|
-
this.tropicals && this.tropicals.active ? (this.handleRender(), (
|
|
3687
|
+
var a, e;
|
|
3688
|
+
this.tropicals && this.tropicals.active ? (this.handleRender(), (a = this.map) == null || a.on(
|
|
3673
3689
|
"click",
|
|
3674
3690
|
[
|
|
3675
3691
|
this.forecastNameLayer,
|
|
@@ -3698,7 +3714,7 @@ const Wa = {
|
|
|
3698
3714
|
));
|
|
3699
3715
|
},
|
|
3700
3716
|
handleRender() {
|
|
3701
|
-
var
|
|
3717
|
+
var a, e, t, r, i, o, n, s, c, h;
|
|
3702
3718
|
if (!this.map)
|
|
3703
3719
|
setTimeout(() => {
|
|
3704
3720
|
this.handleRender();
|
|
@@ -3707,7 +3723,7 @@ const Wa = {
|
|
|
3707
3723
|
if (this.tropicals) {
|
|
3708
3724
|
const p = (/* @__PURE__ */ new Date()).valueOf();
|
|
3709
3725
|
let f = 0, m = 0;
|
|
3710
|
-
(
|
|
3726
|
+
(a = this.map) != null && a.getSource(this.source) ? ((t = this.map) == null || t.getSource(this.source).setData((e = this.tropicals) != null && e.active ? this.tropicals.data : this.empty), m = (/* @__PURE__ */ new Date()).valueOf() - (p + f), console.log("[tropicals] update elapsed: ", m, ", total: ", f += m)) : (this.map.addSource(this.source, {
|
|
3711
3727
|
type: "geojson",
|
|
3712
3728
|
data: (r = this.tropicals) != null && r.active ? (i = this.tropicals) == null ? void 0 : i.data : this.empty
|
|
3713
3729
|
}), this.map.addLayer({
|
|
@@ -3929,18 +3945,18 @@ const Wa = {
|
|
|
3929
3945
|
}
|
|
3930
3946
|
},
|
|
3931
3947
|
handleClear() {
|
|
3932
|
-
var
|
|
3933
|
-
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), (
|
|
3948
|
+
var a;
|
|
3949
|
+
this.map && (this.map.getLayer(this.historyLayer) && this.map.removeLayer(this.historyLayer), this.map.getLayer(this.forecastLayer) && this.map.removeLayer(this.forecastLayer), this.map.getLayer(this.forecastModelLayer) && this.map.removeLayer(this.forecastModelLayer), this.map.getLayer(this.forecastNameLayer) && this.map.removeLayer(this.forecastNameLayer), this.map.getLayer(this.pointCircleLayer) && this.map.removeLayer(this.pointCircleLayer), this.map.getLayer(this.pointCircleLayer + "-border") && this.map.removeLayer(this.pointCircleLayer + "-border"), this.map.getLayer(this.pointLabelLayer) && this.map.removeLayer(this.pointLabelLayer), this.map.getLayer(this.historyPointCircleLayer) && this.map.removeLayer(this.historyPointCircleLayer), this.map.getLayer(this.historyPointCircleLayer + "-border") && this.map.removeLayer(this.historyPointCircleLayer + "-border"), this.map.getLayer(this.historyPointCircleLayer + "-inner") && this.map.removeLayer(this.historyPointCircleLayer + "-inner"), this.map.getLayer(this.historyPointLabelLayer) && this.map.removeLayer(this.historyPointLabelLayer), this.map.getLayer(this.interpolateLineLayer) && this.map.removeLayer(this.interpolateLineLayer), (a = this.interpolateMarkers) == null || a.forEach((e) => e == null ? void 0 : e.remove()), this.map.getSource(this.source) && this.map.removeSource(this.source), this.map.getSource(this.clusterSource) && this.map.removeSource(this.clusterSource), this.map.getSource(this.interpolateSource) && this.map.removeSource(this.interpolateSource), this.map.getLayer(this.circleLayer) && this.map.removeLayer(this.circleLayer), this.map.getSource(this.circleSource) && this.map.removeSource(this.circleSource));
|
|
3934
3950
|
},
|
|
3935
3951
|
handleDateChange() {
|
|
3936
|
-
var
|
|
3937
|
-
if ((
|
|
3938
|
-
const
|
|
3952
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _, D, A, B, W, O, J, de, pe, me, ue, ye, fe, ge, ae;
|
|
3953
|
+
if ((a = this.interpolateMarkers) == null || a.forEach((X) => X == null ? void 0 : X.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
3954
|
+
const X = Z(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), Y = this.interpolateData.filter((E) => E.properties.date === X.format() && !E.properties.disabled), be = this.handleComputePolygons(Y), Q = C.featureCollection([...Y]);
|
|
3939
3955
|
be.forEach((E) => {
|
|
3940
|
-
|
|
3941
|
-
}), (
|
|
3956
|
+
Q.features.push(E);
|
|
3957
|
+
}), (t = this.map) != null && t.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(Q) : ((i = this.map) == null || i.addSource(this.interpolateSource, {
|
|
3942
3958
|
type: "geojson",
|
|
3943
|
-
data:
|
|
3959
|
+
data: Q
|
|
3944
3960
|
}), (o = this.map) == null || o.addLayer({
|
|
3945
3961
|
id: this.interpolateLineLayer,
|
|
3946
3962
|
type: "line",
|
|
@@ -3952,17 +3968,17 @@ const Wa = {
|
|
|
3952
3968
|
"line-width": 1
|
|
3953
3969
|
}
|
|
3954
3970
|
})), this.interpolateMarkers = [];
|
|
3955
|
-
for (const E of
|
|
3971
|
+
for (const E of Y)
|
|
3956
3972
|
if (!E.properties.disabled) {
|
|
3957
|
-
let
|
|
3958
|
-
((s = (n = E.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = E.properties) == null ? void 0 : c.wind) != null && h.spd) ?
|
|
3973
|
+
let U = "#f44336";
|
|
3974
|
+
((s = (n = E.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = E.properties) == null ? void 0 : c.wind) != null && h.spd) ? U = "#03f869" : ((p = (d = E.properties) == null ? void 0 : d.wind) == null ? void 0 : p.spd) >= 17.2 && ((m = (f = E.properties) == null ? void 0 : f.wind) == null ? void 0 : m.spd) < 24.5 ? U = "#f2f202" : ((y = (b = E.properties) == null ? void 0 : b.wind) == null ? void 0 : y.spd) >= 24.5 && ((v = (u = E.properties) == null ? void 0 : u.wind) == null ? void 0 : v.spd) < 32.7 ? U = "#ff9100" : ((w = (g = E.properties) == null ? void 0 : g.wind) == null ? void 0 : w.spd) >= 32.7 && ((_ = (k = E.properties) == null ? void 0 : k.wind) == null ? void 0 : _.spd) < 41.5 ? U = "#f44336" : ((A = (D = E.properties) == null ? void 0 : D.wind) == null ? void 0 : A.spd) >= 41.5 && ((W = (B = E.properties) == null ? void 0 : B.wind) == null ? void 0 : W.spd) < 51 ? U = "#f903d0" : ((J = (O = E.properties) == null ? void 0 : O.wind) == null ? void 0 : J.spd) >= 51 ? U = "#8702f9" : U = "#f44336";
|
|
3959
3975
|
const ve = `<svg t="1719918955501"
|
|
3960
3976
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
3961
3977
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
3962
3978
|
<path
|
|
3963
3979
|
d="M515.17000001 169.34666667c41-77.73 95.33-96 95.33-96-240 0-434.5 194.53-434.5 434.5 0 186.47 150.78 337.7 337.06 338.48C472.11000001 923.66666667 418.00000001 941.83666667 418.00000001 941.83666667c240 0 434.5-194.54 434.5-434.5l0.5 0.5C853.00000001 321.10666667 701.81000001 169.66666667 515.17000001 169.34666667z m-0.67 468A129.5 129.5 0 1 1 644.00000001 507.83666667a129.5 129.5 0 0 1-129.5 129.5z"
|
|
3964
|
-
fill="${
|
|
3965
|
-
<path d="M514.50000001 507.83666667m-129.5 0a129.5 129.5 0 1 0 259 0 129.5 129.5 0 1 0-259 0Z" fill="${
|
|
3980
|
+
fill="${U}" p-id="18383"></path>
|
|
3981
|
+
<path d="M514.50000001 507.83666667m-129.5 0a129.5 129.5 0 1 0 259 0 129.5 129.5 0 1 0-259 0Z" fill="${U}"
|
|
3966
3982
|
p-id="18384"></path>
|
|
3967
3983
|
<path
|
|
3968
3984
|
d="M517.16666667 654.67c-80.23 0-145.5-65.27-145.5-145.5s65.27-145.5 145.5-145.5S662.66666667 428.94 662.66666667 509.17s-65.27 145.5-145.5 145.5z m0-259A113.5 113.5 0 1 0 630.66666667 509.17a113.63 113.63 0 0 0-113.5-113.5z"
|
|
@@ -3970,9 +3986,9 @@ const Wa = {
|
|
|
3970
3986
|
<path
|
|
3971
3987
|
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"
|
|
3972
3988
|
fill="#ffffff" p-id="18386"></path>
|
|
3973
|
-
</svg>`,
|
|
3974
|
-
|
|
3975
|
-
const _e = new ne.Marker(
|
|
3989
|
+
</svg>`, K = document.createElement("div");
|
|
3990
|
+
K.className = "hurricane-hourly-marker", K.innerHTML = `<div class="${E.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${ve}</div>`;
|
|
3991
|
+
const _e = new ne.Marker(K).setLngLat(E.geometry.coordinates).addTo(this.map);
|
|
3976
3992
|
if (this.interpolateMarkers.push(_e), (de = E.properties) != null && de.showCircle) {
|
|
3977
3993
|
const ie = { radius: 100, coordinates: E.geometry.coordinates }, re = { radius: 200, coordinates: E.geometry.coordinates }, oe = { radius: 500, coordinates: E.geometry.coordinates };
|
|
3978
3994
|
(pe = this.circleSourceData) == null || pe.features.push(
|
|
@@ -3988,15 +4004,15 @@ const Wa = {
|
|
|
3988
4004
|
} else
|
|
3989
4005
|
(ge = this.map) != null && ge.getSource(this.interpolateSource) && ((ae = this.map) == null || ae.getSource(this.interpolateSource).setData(this.empty));
|
|
3990
4006
|
},
|
|
3991
|
-
handleClick(
|
|
4007
|
+
handleClick(a) {
|
|
3992
4008
|
var o, n, s, c, h, d, p, f;
|
|
3993
|
-
const e =
|
|
4009
|
+
const e = a.features[0], t = (n = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : n.features.filter(
|
|
3994
4010
|
(m) => {
|
|
3995
4011
|
var b;
|
|
3996
4012
|
return m.geometry.type === "LineString" && m.properties.type === "forecast" && m.properties.name === ((b = e == null ? void 0 : e.properties) == null ? void 0 : b.name);
|
|
3997
4013
|
}
|
|
3998
4014
|
);
|
|
3999
|
-
|
|
4015
|
+
t.sort((m, b) => {
|
|
4000
4016
|
var y, u, v, g;
|
|
4001
4017
|
return ((y = m.properties) == null ? void 0 : y.model) === "cma" ? -1 : ((u = m.properties) == null ? void 0 : u.model) === "jma" ? ((v = b.properties) == null ? void 0 : v.model) === "cma" ? 1 : -1 : m.properties.model === "ecmwf" ? ["jma", "cma"].includes((g = b.properties) == null ? void 0 : g.model) ? 1 : -1 : 0;
|
|
4002
4018
|
});
|
|
@@ -4008,35 +4024,35 @@ const Wa = {
|
|
|
4008
4024
|
);
|
|
4009
4025
|
this.activeTropicals = {
|
|
4010
4026
|
name: (h = e == null ? void 0 : e.properties) == null ? void 0 : h.name,
|
|
4011
|
-
forecasts:
|
|
4027
|
+
forecasts: t.map((m) => m.properties),
|
|
4012
4028
|
history: (d = r[0]) == null ? void 0 : d.properties,
|
|
4013
|
-
showCircle: (f = (p =
|
|
4029
|
+
showCircle: (f = (p = t[0]) == null ? void 0 : p.properties) == null ? void 0 : f.showCircle
|
|
4014
4030
|
}, this.showTropicals = !0;
|
|
4015
4031
|
const i = document.getElementById("active-tropical");
|
|
4016
|
-
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([
|
|
4032
|
+
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([a.lngLat.lng, a.lngLat.lat]) : this.activeTropicalsMarker = new ne.Marker(i).setLngLat([a.lngLat.lng, a.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
4017
4033
|
},
|
|
4018
|
-
handleForecastToggle(
|
|
4034
|
+
handleForecastToggle(a) {
|
|
4019
4035
|
var r, i, o, n, s, c;
|
|
4020
|
-
|
|
4021
|
-
const e = `${
|
|
4022
|
-
|
|
4023
|
-
h.properties.category === e && (h.properties.disabled =
|
|
4036
|
+
a.disabled = !a.disabled;
|
|
4037
|
+
const e = `${a.name}-${a.model}`, t = (i = (r = this.map) == null ? void 0 : r.getSource(this.source)._data) == null ? void 0 : i.features;
|
|
4038
|
+
t.forEach((h) => {
|
|
4039
|
+
h.properties.category === e && (h.properties.disabled = a.disabled);
|
|
4024
4040
|
}), this.interpolateData.forEach((h) => {
|
|
4025
|
-
h.properties.category === e && (h.properties.disabled =
|
|
4026
|
-
}), (n = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || n.setData(C.featureCollection(
|
|
4041
|
+
h.properties.category === e && (h.properties.disabled = a.disabled);
|
|
4042
|
+
}), (n = (o = this.map) == null ? void 0 : o.getSource(this.source)) == null || n.setData(C.featureCollection(t)), (c = (s = this.map) == null ? void 0 : s.getSource(this.clusterSource)) == null || c.setData(C.featureCollection(t)), this.handleDateChange();
|
|
4027
4043
|
},
|
|
4028
|
-
handleStrikeProbability(
|
|
4029
|
-
this.$emit("tropicalProbability",
|
|
4044
|
+
handleStrikeProbability(a) {
|
|
4045
|
+
this.$emit("tropicalProbability", a);
|
|
4030
4046
|
},
|
|
4031
|
-
handleToggleCircles(
|
|
4032
|
-
var e,
|
|
4033
|
-
|
|
4034
|
-
r.properties.name ===
|
|
4047
|
+
handleToggleCircles(a) {
|
|
4048
|
+
var e, t;
|
|
4049
|
+
a.showCircle = !a.showCircle, (t = (e = this.tropicals.data) == null ? void 0 : e.features) == null || t.forEach((r) => {
|
|
4050
|
+
r.properties.name === a.name && (r.properties.showCircle = a.showCircle);
|
|
4035
4051
|
}), this.handleRender();
|
|
4036
4052
|
},
|
|
4037
4053
|
handleDrawCircle() {
|
|
4038
|
-
var
|
|
4039
|
-
(
|
|
4054
|
+
var a, e;
|
|
4055
|
+
(a = this.map) != null && a.getSource(this.circleSource) ? (e = this.map) == null || e.getSource(this.circleSource).setData(this.circleSourceData) : (this.map.addSource(this.circleSource, {
|
|
4040
4056
|
type: "geojson",
|
|
4041
4057
|
data: this.circleSourceData
|
|
4042
4058
|
}), this.map.addLayer({
|
|
@@ -4052,27 +4068,27 @@ const Wa = {
|
|
|
4052
4068
|
}
|
|
4053
4069
|
}));
|
|
4054
4070
|
},
|
|
4055
|
-
handleComputePolygons(
|
|
4071
|
+
handleComputePolygons(a) {
|
|
4056
4072
|
const e = [];
|
|
4057
|
-
for (const
|
|
4058
|
-
const r =
|
|
4073
|
+
for (const t of a) {
|
|
4074
|
+
const r = t.properties.wind, i = {
|
|
4059
4075
|
ne: r.r7ne >= 0 ? r.r7ne : void 0,
|
|
4060
4076
|
se: r.r7se >= 0 ? r.r7se : void 0,
|
|
4061
4077
|
sw: r.r7sw >= 0 ? r.r7sw : void 0,
|
|
4062
4078
|
nw: r.r7nw >= 0 ? r.r7nw : void 0
|
|
4063
|
-
}, o = this.handleComputeArc(
|
|
4079
|
+
}, o = this.handleComputeArc(t.geometry.coordinates, i, { ...t.properties, level: 7 });
|
|
4064
4080
|
e.push(o);
|
|
4065
4081
|
const n = {
|
|
4066
4082
|
ne: r.r10ne >= 0 ? r.r10ne : void 0,
|
|
4067
4083
|
se: r.r10se >= 0 ? r.r10se : void 0,
|
|
4068
4084
|
sw: r.r10sw >= 0 ? r.r10sw : void 0,
|
|
4069
4085
|
nw: r.r10nw >= 0 ? r.r10nw : void 0
|
|
4070
|
-
}, s = this.handleComputeArc(
|
|
4086
|
+
}, s = this.handleComputeArc(t.geometry.coordinates, n, { ...t.properties, level: 10 });
|
|
4071
4087
|
e.push(s);
|
|
4072
4088
|
}
|
|
4073
4089
|
return e;
|
|
4074
4090
|
},
|
|
4075
|
-
handleComputeArc(
|
|
4091
|
+
handleComputeArc(a, e, t) {
|
|
4076
4092
|
var o;
|
|
4077
4093
|
const r = [];
|
|
4078
4094
|
for (const n in e) {
|
|
@@ -4080,31 +4096,31 @@ const Wa = {
|
|
|
4080
4096
|
let c;
|
|
4081
4097
|
switch (n) {
|
|
4082
4098
|
case "ne":
|
|
4083
|
-
c = C.lineArc(
|
|
4099
|
+
c = C.lineArc(a, s * 1.852, 0, 90, { steps: s > 0 ? 64 : 1 });
|
|
4084
4100
|
break;
|
|
4085
4101
|
case "se":
|
|
4086
|
-
c = C.lineArc(
|
|
4102
|
+
c = C.lineArc(a, s * 1.852, 90, 180, { steps: s > 0 ? 64 : 1 });
|
|
4087
4103
|
break;
|
|
4088
4104
|
case "sw":
|
|
4089
|
-
c = C.lineArc(
|
|
4105
|
+
c = C.lineArc(a, s * 1.852, 180, 270, { steps: s > 0 ? 64 : 1 });
|
|
4090
4106
|
break;
|
|
4091
4107
|
case "nw":
|
|
4092
|
-
c = C.lineArc(
|
|
4108
|
+
c = C.lineArc(a, s * 1.852, 270, 360, { steps: s > 0 ? 64 : 1 });
|
|
4093
4109
|
break;
|
|
4094
4110
|
}
|
|
4095
4111
|
r.push(...(o = c == null ? void 0 : c.geometry) == null ? void 0 : o.coordinates);
|
|
4096
4112
|
}
|
|
4097
4113
|
const i = C.lineString(r);
|
|
4098
|
-
return C.lineToPolygon(i, { properties:
|
|
4114
|
+
return C.lineToPolygon(i, { properties: t });
|
|
4099
4115
|
}
|
|
4100
4116
|
}
|
|
4101
|
-
}, je = (
|
|
4117
|
+
}, je = (a) => (H("data-v-08ecb5a5"), a = a(), G(), a), Oa = {
|
|
4102
4118
|
id: "active-tropical",
|
|
4103
4119
|
class: "active-tropical"
|
|
4104
|
-
}, ja = { class: "header-box" }, Fa = { class: "main" },
|
|
4120
|
+
}, ja = { class: "header-box" }, Fa = { class: "main" }, Ua = { key: 0 }, Va = { class: "sub" }, Za = {
|
|
4105
4121
|
id: "meteoBox",
|
|
4106
4122
|
class: "main-box"
|
|
4107
|
-
}, Ha = { class: "content" },
|
|
4123
|
+
}, Ha = { class: "content" }, Ga = { class: "row" }, Ja = {
|
|
4108
4124
|
class: "col col-left",
|
|
4109
4125
|
style: { "justify-content": "flex-start" }
|
|
4110
4126
|
}, Xa = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", null, "Wind speed : ", -1)), qa = {
|
|
@@ -4113,8 +4129,8 @@ const Wa = {
|
|
|
4113
4129
|
}, Ya = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", null, "Pressure : ", -1)), Qa = { class: "row" }, Ka = {
|
|
4114
4130
|
class: "col col-24",
|
|
4115
4131
|
style: { "justify-content": "flex-start" }
|
|
4116
|
-
}, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-
|
|
4117
|
-
function oi(
|
|
4132
|
+
}, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-08ecb5a5></div><div class="row" style="padding:2px 10px;" data-v-08ecb5a5><div class="legend" data-v-08ecb5a5><div class="icon td" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>TD</div></div><div class="legend" data-v-08ecb5a5><div class="icon ts" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>TS</div></div><div class="legend" data-v-08ecb5a5><div class="icon sts" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>STS</div></div><div class="legend" data-v-08ecb5a5><div class="icon ty" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>TY</div></div><div class="legend" data-v-08ecb5a5><div class="icon sty" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>STY</div></div><div class="legend" data-v-08ecb5a5><div class="icon supper-ty" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-08ecb5a5><div class="legend" data-v-08ecb5a5><div class="icon history" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>History</div></div><div class="legend" data-v-08ecb5a5><div class="icon r7" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>35kts Radii</div></div><div class="legend" data-v-08ecb5a5><div class="icon r10" data-v-08ecb5a5></div><div class="label" data-v-08ecb5a5>50kts Radii</div></div></div>', 3), ri = { class: "more" };
|
|
4133
|
+
function oi(a, e, t, r, i, o) {
|
|
4118
4134
|
var n, s, c, h, d, p, f, m, b, y, u, v, g, w, k;
|
|
4119
4135
|
return Me((L(), x("div", Oa, [
|
|
4120
4136
|
l("div", ja, [
|
|
@@ -4123,14 +4139,14 @@ function oi(t, e, a, r, i, o) {
|
|
|
4123
4139
|
onClick: e[0] || (e[0] = (_) => i.showTropicals = !1)
|
|
4124
4140
|
}, ""),
|
|
4125
4141
|
l("div", Fa, [
|
|
4126
|
-
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (L(), x("span",
|
|
4142
|
+
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (L(), x("span", Ua, S((h = (c = i.activeTropicals) == null ? void 0 : c.history) == null ? void 0 : h.level) + " , ", 1)) : $("", !0),
|
|
4127
4143
|
Xe(S((d = i.activeTropicals) == null ? void 0 : d.name), 1)
|
|
4128
4144
|
]),
|
|
4129
|
-
l("div",
|
|
4145
|
+
l("div", Va, " Last update: " + S(o.computeTime(((f = (p = i.activeTropicals) == null ? void 0 : p.history) == null ? void 0 : f.updated) || ((y = (b = (m = i.activeTropicals) == null ? void 0 : m.forecasts) == null ? void 0 : b.filter((_) => !_.disabled)[0]) == null ? void 0 : y.date))), 1)
|
|
4130
4146
|
]),
|
|
4131
|
-
l("div",
|
|
4147
|
+
l("div", Za, [
|
|
4132
4148
|
l("div", Ha, [
|
|
4133
|
-
l("div",
|
|
4149
|
+
l("div", Ga, [
|
|
4134
4150
|
l("div", Ja, [
|
|
4135
4151
|
Xa,
|
|
4136
4152
|
l("span", null, S(((v = (u = i.activeTropicals) == null ? void 0 : u.history) == null ? void 0 : v.kts) || "-") + "[kts]", 1)
|
|
@@ -4153,7 +4169,7 @@ function oi(t, e, a, r, i, o) {
|
|
|
4153
4169
|
_.disabled ? "" : "active",
|
|
4154
4170
|
D > 0 && D < ((B = (A = i.activeTropicals) == null ? void 0 : A.forecasts) == null ? void 0 : B.length) - 1 && ((O = (W = i.activeTropicals) == null ? void 0 : W.forecasts) == null ? void 0 : O.length) > 2 ? "center-child" : ""
|
|
4155
4171
|
]),
|
|
4156
|
-
onClick: (
|
|
4172
|
+
onClick: (J) => o.handleForecastToggle(_)
|
|
4157
4173
|
}, [
|
|
4158
4174
|
l("span", {
|
|
4159
4175
|
class: M(_.model)
|
|
@@ -4173,10 +4189,10 @@ function oi(t, e, a, r, i, o) {
|
|
|
4173
4189
|
])
|
|
4174
4190
|
])
|
|
4175
4191
|
], 512)), [
|
|
4176
|
-
[$e, i.showTropicals && !
|
|
4192
|
+
[$e, i.showTropicals && !a.$attrs.hideTropicalsLegend]
|
|
4177
4193
|
]);
|
|
4178
4194
|
}
|
|
4179
|
-
const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-
|
|
4195
|
+
const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-08ecb5a5"]]);
|
|
4180
4196
|
const si = {
|
|
4181
4197
|
name: "IdmPrecip3h",
|
|
4182
4198
|
props: {
|
|
@@ -4213,15 +4229,15 @@ const si = {
|
|
|
4213
4229
|
watch: {
|
|
4214
4230
|
"factor.version": {
|
|
4215
4231
|
handler() {
|
|
4216
|
-
var
|
|
4217
|
-
(
|
|
4232
|
+
var a;
|
|
4233
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
4218
4234
|
},
|
|
4219
4235
|
deep: !0
|
|
4220
4236
|
},
|
|
4221
4237
|
toggleVersion: {
|
|
4222
4238
|
handler() {
|
|
4223
|
-
var
|
|
4224
|
-
this.right = (((
|
|
4239
|
+
var a, e;
|
|
4240
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4225
4241
|
},
|
|
4226
4242
|
immediate: !0
|
|
4227
4243
|
}
|
|
@@ -4233,9 +4249,9 @@ const si = {
|
|
|
4233
4249
|
this.handleRender();
|
|
4234
4250
|
}, 500);
|
|
4235
4251
|
else if (this.factor) {
|
|
4236
|
-
const
|
|
4237
|
-
let e = 0,
|
|
4238
|
-
this.handleDraw(),
|
|
4252
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
4253
|
+
let e = 0, t = 0;
|
|
4254
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[precip3h] add elapsed: ", t, ", total: ", e += t);
|
|
4239
4255
|
}
|
|
4240
4256
|
},
|
|
4241
4257
|
handleClear() {
|
|
@@ -4244,7 +4260,7 @@ const si = {
|
|
|
4244
4260
|
handleSetup() {
|
|
4245
4261
|
if (!this.context) {
|
|
4246
4262
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4247
|
-
const
|
|
4263
|
+
const a = [
|
|
4248
4264
|
[0, "rgba(59, 126, 162, 0)"],
|
|
4249
4265
|
[14 / 255, "rgba(84,170,230, 0)"],
|
|
4250
4266
|
//1.4mm
|
|
@@ -4264,21 +4280,21 @@ const si = {
|
|
|
4264
4280
|
//30mm
|
|
4265
4281
|
[1, "rgba(197,5,58,0.8)"]
|
|
4266
4282
|
];
|
|
4267
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4268
|
-
const { program: e, aPositionBuffer:
|
|
4269
|
-
this.program = e, this.aPositionBuffer =
|
|
4283
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
4284
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.fragmentSchema);
|
|
4285
|
+
this.program = e, this.aPositionBuffer = t;
|
|
4270
4286
|
}
|
|
4271
4287
|
},
|
|
4272
4288
|
async handleDraw() {
|
|
4273
4289
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4274
4290
|
this.etime = this.factor.etime;
|
|
4275
|
-
const
|
|
4276
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4291
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
4292
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a);
|
|
4277
4293
|
}
|
|
4278
4294
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4279
4295
|
}
|
|
4280
4296
|
}
|
|
4281
|
-
}, ce = (
|
|
4297
|
+
}, ce = (a) => (H("data-v-dec867b8"), a = a(), G(), a), ni = { key: 0 }, li = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "mm", -1)), ci = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "1.5", -1)), hi = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "2", -1)), di = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "3", -1)), pi = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "7", -1)), mi = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "10", -1)), ui = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "20", -1)), yi = /* @__PURE__ */ ce(() => /* @__PURE__ */ l("span", null, "30", -1)), fi = [
|
|
4282
4298
|
li,
|
|
4283
4299
|
ci,
|
|
4284
4300
|
hi,
|
|
@@ -4288,12 +4304,12 @@ const si = {
|
|
|
4288
4304
|
ui,
|
|
4289
4305
|
yi
|
|
4290
4306
|
];
|
|
4291
|
-
function gi(
|
|
4307
|
+
function gi(a, e, t, r, i, o) {
|
|
4292
4308
|
var n;
|
|
4293
|
-
return (n =
|
|
4309
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", ni, [
|
|
4294
4310
|
l("div", {
|
|
4295
4311
|
class: "legend-bars flex-center",
|
|
4296
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4312
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4297
4313
|
}, fi, 4)
|
|
4298
4314
|
])) : $("", !0);
|
|
4299
4315
|
}
|
|
@@ -4333,15 +4349,15 @@ const vi = {
|
|
|
4333
4349
|
watch: {
|
|
4334
4350
|
"factor.version": {
|
|
4335
4351
|
handler() {
|
|
4336
|
-
var
|
|
4337
|
-
(
|
|
4352
|
+
var a;
|
|
4353
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
4338
4354
|
},
|
|
4339
4355
|
deep: !0
|
|
4340
4356
|
},
|
|
4341
4357
|
toggleVersion: {
|
|
4342
4358
|
handler() {
|
|
4343
|
-
var
|
|
4344
|
-
this.right = (((
|
|
4359
|
+
var a, e;
|
|
4360
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4345
4361
|
},
|
|
4346
4362
|
immediate: !0
|
|
4347
4363
|
}
|
|
@@ -4353,9 +4369,9 @@ const vi = {
|
|
|
4353
4369
|
this.handleRender();
|
|
4354
4370
|
}, 500);
|
|
4355
4371
|
else if (this.factor) {
|
|
4356
|
-
const
|
|
4357
|
-
let e = 0,
|
|
4358
|
-
this.handleDraw(),
|
|
4372
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
4373
|
+
let e = 0, t = 0;
|
|
4374
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[visibility] add elapsed: ", t, ", total: ", e += t);
|
|
4359
4375
|
}
|
|
4360
4376
|
},
|
|
4361
4377
|
handleClear() {
|
|
@@ -4364,7 +4380,7 @@ const vi = {
|
|
|
4364
4380
|
handleSetup() {
|
|
4365
4381
|
if (!this.context) {
|
|
4366
4382
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4367
|
-
const
|
|
4383
|
+
const a = [
|
|
4368
4384
|
[0, "rgba(189,50,160,0.8)"],
|
|
4369
4385
|
[8 / 255, "rgba(208,56,56,0.8)"],
|
|
4370
4386
|
//0.8km
|
|
@@ -4378,21 +4394,21 @@ const vi = {
|
|
|
4378
4394
|
//16km
|
|
4379
4395
|
[1, "rgba(144,144,144,0)"]
|
|
4380
4396
|
];
|
|
4381
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4382
|
-
const { program: e, aPositionBuffer:
|
|
4383
|
-
this.program = e, this.aPositionBuffer =
|
|
4397
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
4398
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.fragmentSchema);
|
|
4399
|
+
this.program = e, this.aPositionBuffer = t;
|
|
4384
4400
|
}
|
|
4385
4401
|
},
|
|
4386
4402
|
async handleDraw() {
|
|
4387
4403
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4388
4404
|
this.etime = this.factor.etime;
|
|
4389
|
-
const
|
|
4390
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4405
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
4406
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a);
|
|
4391
4407
|
}
|
|
4392
4408
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4393
4409
|
}
|
|
4394
4410
|
}
|
|
4395
|
-
}, xe = (
|
|
4411
|
+
}, xe = (a) => (H("data-v-952dee5c"), a = a(), G(), a), _i = { key: 0 }, wi = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "nm", -1)), Li = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "0", -1)), xi = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "0.5", -1)), Ci = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "1.5", -1)), Si = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "3", -1)), ki = /* @__PURE__ */ xe(() => /* @__PURE__ */ l("span", null, "9", -1)), zi = [
|
|
4396
4412
|
wi,
|
|
4397
4413
|
Li,
|
|
4398
4414
|
xi,
|
|
@@ -4400,12 +4416,12 @@ const vi = {
|
|
|
4400
4416
|
Si,
|
|
4401
4417
|
ki
|
|
4402
4418
|
];
|
|
4403
|
-
function Pi(
|
|
4419
|
+
function Pi(a, e, t, r, i, o) {
|
|
4404
4420
|
var n;
|
|
4405
|
-
return (n =
|
|
4421
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", _i, [
|
|
4406
4422
|
l("div", {
|
|
4407
4423
|
class: "legend-bars flex-center",
|
|
4408
|
-
style: F([{ position: "absolute" }, { right:
|
|
4424
|
+
style: F([{ position: "absolute" }, { right: a.right + "px", bottom: t.bottom }])
|
|
4409
4425
|
}, zi, 4)
|
|
4410
4426
|
])) : $("", !0);
|
|
4411
4427
|
}
|
|
@@ -4446,15 +4462,15 @@ const Ei = {
|
|
|
4446
4462
|
watch: {
|
|
4447
4463
|
"factor.version": {
|
|
4448
4464
|
handler() {
|
|
4449
|
-
var
|
|
4450
|
-
(
|
|
4465
|
+
var a;
|
|
4466
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
4451
4467
|
},
|
|
4452
4468
|
deep: !0
|
|
4453
4469
|
},
|
|
4454
4470
|
toggleVersion: {
|
|
4455
4471
|
handler() {
|
|
4456
|
-
var
|
|
4457
|
-
this.right = (((
|
|
4472
|
+
var a, e;
|
|
4473
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4458
4474
|
},
|
|
4459
4475
|
immediate: !0
|
|
4460
4476
|
}
|
|
@@ -4466,9 +4482,9 @@ const Ei = {
|
|
|
4466
4482
|
this.handleRender();
|
|
4467
4483
|
}, 500);
|
|
4468
4484
|
else if (this.factor) {
|
|
4469
|
-
const
|
|
4470
|
-
let e = 0,
|
|
4471
|
-
this.handleDraw(),
|
|
4485
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
4486
|
+
let e = 0, t = 0;
|
|
4487
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[water-temp] add elapsed: ", t, ", total: ", e += t);
|
|
4472
4488
|
}
|
|
4473
4489
|
},
|
|
4474
4490
|
handleClear() {
|
|
@@ -4477,7 +4493,7 @@ const Ei = {
|
|
|
4477
4493
|
handleSetup() {
|
|
4478
4494
|
if (!this.context) {
|
|
4479
4495
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4480
|
-
const
|
|
4496
|
+
const a = [
|
|
4481
4497
|
[0, "rgba(95, 143, 197)"],
|
|
4482
4498
|
// -10°C
|
|
4483
4499
|
[46 / 255, "rgba(95, 143, 197)"],
|
|
@@ -4498,21 +4514,21 @@ const Ei = {
|
|
|
4498
4514
|
[1, "rgb(138, 43, 10)"]
|
|
4499
4515
|
//
|
|
4500
4516
|
];
|
|
4501
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4502
|
-
const { program: e, aPositionBuffer:
|
|
4503
|
-
this.program = e, this.aPositionBuffer =
|
|
4517
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
4518
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.fragmentSchema);
|
|
4519
|
+
this.program = e, this.aPositionBuffer = t;
|
|
4504
4520
|
}
|
|
4505
4521
|
},
|
|
4506
4522
|
async handleDraw() {
|
|
4507
4523
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4508
4524
|
this.etime = this.factor.etime;
|
|
4509
|
-
const
|
|
4510
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4525
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
4526
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a);
|
|
4511
4527
|
}
|
|
4512
4528
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4513
4529
|
}
|
|
4514
4530
|
}
|
|
4515
|
-
}, Ce = (
|
|
4531
|
+
}, Ce = (a) => (H("data-v-67e5094b"), a = a(), G(), a), Ii = { key: 0 }, Ri = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "°C", -1)), Di = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "0", -1)), Ai = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "10", -1)), Mi = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "20", -1)), $i = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "30", -1)), Bi = /* @__PURE__ */ Ce(() => /* @__PURE__ */ l("span", null, "40", -1)), Ni = [
|
|
4516
4532
|
Ri,
|
|
4517
4533
|
Di,
|
|
4518
4534
|
Ai,
|
|
@@ -4520,12 +4536,12 @@ const Ei = {
|
|
|
4520
4536
|
$i,
|
|
4521
4537
|
Bi
|
|
4522
4538
|
];
|
|
4523
|
-
function Wi(
|
|
4539
|
+
function Wi(a, e, t, r, i, o) {
|
|
4524
4540
|
var n;
|
|
4525
|
-
return (n =
|
|
4541
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", Ii, [
|
|
4526
4542
|
l("div", {
|
|
4527
4543
|
class: "legend-bars flex-center",
|
|
4528
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4544
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4529
4545
|
}, Ni, 4)
|
|
4530
4546
|
])) : $("", !0);
|
|
4531
4547
|
}
|
|
@@ -4566,15 +4582,15 @@ const ji = {
|
|
|
4566
4582
|
watch: {
|
|
4567
4583
|
"factor.version": {
|
|
4568
4584
|
handler() {
|
|
4569
|
-
var
|
|
4570
|
-
(
|
|
4585
|
+
var a;
|
|
4586
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
4571
4587
|
},
|
|
4572
4588
|
deep: !0
|
|
4573
4589
|
},
|
|
4574
4590
|
toggleVersion: {
|
|
4575
4591
|
handler() {
|
|
4576
|
-
var
|
|
4577
|
-
this.right = (((
|
|
4592
|
+
var a, e;
|
|
4593
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4578
4594
|
},
|
|
4579
4595
|
immediate: !0
|
|
4580
4596
|
}
|
|
@@ -4586,9 +4602,9 @@ const ji = {
|
|
|
4586
4602
|
this.handleRender();
|
|
4587
4603
|
}, 500);
|
|
4588
4604
|
else if (this.factor) {
|
|
4589
|
-
const
|
|
4590
|
-
let e = 0,
|
|
4591
|
-
this.handleDraw(),
|
|
4605
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
4606
|
+
let e = 0, t = 0;
|
|
4607
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[water-temp] add elapsed: ", t, ", total: ", e += t);
|
|
4592
4608
|
}
|
|
4593
4609
|
},
|
|
4594
4610
|
handleClear() {
|
|
@@ -4597,7 +4613,7 @@ const ji = {
|
|
|
4597
4613
|
handleSetup() {
|
|
4598
4614
|
if (!this.context) {
|
|
4599
4615
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4600
|
-
const
|
|
4616
|
+
const a = [
|
|
4601
4617
|
[0, "rgb(149, 137, 211)"],
|
|
4602
4618
|
[100 / 255, "rgb(149, 137, 211)"],
|
|
4603
4619
|
// -20°C
|
|
@@ -4621,36 +4637,36 @@ const ji = {
|
|
|
4621
4637
|
// 40
|
|
4622
4638
|
[1, "rgb(138, 43, 10)"]
|
|
4623
4639
|
];
|
|
4624
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4625
|
-
const { program: e, aPositionBuffer:
|
|
4626
|
-
this.program = e, this.aPositionBuffer =
|
|
4640
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
4641
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.fragmentSchema);
|
|
4642
|
+
this.program = e, this.aPositionBuffer = t;
|
|
4627
4643
|
}
|
|
4628
4644
|
},
|
|
4629
4645
|
async handleDraw() {
|
|
4630
4646
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4631
4647
|
this.etime = this.factor.etime;
|
|
4632
|
-
const
|
|
4633
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4648
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
4649
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a);
|
|
4634
4650
|
}
|
|
4635
4651
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4636
4652
|
}
|
|
4637
4653
|
}
|
|
4638
|
-
}, he = (
|
|
4639
|
-
Vi,
|
|
4654
|
+
}, he = (a) => (H("data-v-389ea886"), a = a(), G(), a), Fi = { key: 0 }, Ui = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "°C", -1)), Vi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "-20", -1)), Zi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "-10", -1)), Hi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0", -1)), Gi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "10", -1)), Ji = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "20", -1)), Xi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "30", -1)), qi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "40", -1)), Yi = [
|
|
4640
4655
|
Ui,
|
|
4641
|
-
|
|
4642
|
-
Hi,
|
|
4656
|
+
Vi,
|
|
4643
4657
|
Zi,
|
|
4658
|
+
Hi,
|
|
4659
|
+
Gi,
|
|
4644
4660
|
Ji,
|
|
4645
4661
|
Xi,
|
|
4646
4662
|
qi
|
|
4647
4663
|
];
|
|
4648
|
-
function Qi(
|
|
4664
|
+
function Qi(a, e, t, r, i, o) {
|
|
4649
4665
|
var n;
|
|
4650
|
-
return (n =
|
|
4666
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", Fi, [
|
|
4651
4667
|
l("div", {
|
|
4652
4668
|
class: "legend-bars flex-center",
|
|
4653
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4669
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4654
4670
|
}, Yi, 4)
|
|
4655
4671
|
])) : $("", !0);
|
|
4656
4672
|
}
|
|
@@ -4691,15 +4707,15 @@ const er = {
|
|
|
4691
4707
|
watch: {
|
|
4692
4708
|
"factor.version": {
|
|
4693
4709
|
handler() {
|
|
4694
|
-
var
|
|
4695
|
-
(
|
|
4710
|
+
var a;
|
|
4711
|
+
(a = this.factor) != null && a.active ? this.handleRender() : this.handleClear();
|
|
4696
4712
|
},
|
|
4697
4713
|
deep: !0
|
|
4698
4714
|
},
|
|
4699
4715
|
toggleVersion: {
|
|
4700
4716
|
handler() {
|
|
4701
|
-
var
|
|
4702
|
-
this.right = (((
|
|
4717
|
+
var a, e;
|
|
4718
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
4703
4719
|
},
|
|
4704
4720
|
immediate: !0
|
|
4705
4721
|
}
|
|
@@ -4711,9 +4727,9 @@ const er = {
|
|
|
4711
4727
|
this.handleRender();
|
|
4712
4728
|
}, 500);
|
|
4713
4729
|
else if (this.factor) {
|
|
4714
|
-
const
|
|
4715
|
-
let e = 0,
|
|
4716
|
-
this.handleDraw(),
|
|
4730
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
4731
|
+
let e = 0, t = 0;
|
|
4732
|
+
this.handleDraw(), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("[water-temp] add elapsed: ", t, ", total: ", e += t);
|
|
4717
4733
|
}
|
|
4718
4734
|
},
|
|
4719
4735
|
handleClear() {
|
|
@@ -4722,7 +4738,7 @@ const er = {
|
|
|
4722
4738
|
handleSetup() {
|
|
4723
4739
|
if (!this.context) {
|
|
4724
4740
|
this.context = this.viewport.rampColorCanvas.getContext("webgl");
|
|
4725
|
-
const
|
|
4741
|
+
const a = [
|
|
4726
4742
|
[0, "rgba(76, 165, 228, 0)"],
|
|
4727
4743
|
[50 / 255, "rgba(76, 165, 228, 0)"],
|
|
4728
4744
|
// 0m
|
|
@@ -4737,21 +4753,21 @@ const er = {
|
|
|
4737
4753
|
[1, "rgb(180, 209, 216)"]
|
|
4738
4754
|
// 2m
|
|
4739
4755
|
];
|
|
4740
|
-
this.rampColor = this.webgl.setup(this.context,
|
|
4741
|
-
const { program: e, aPositionBuffer:
|
|
4742
|
-
this.program = e, this.aPositionBuffer =
|
|
4756
|
+
this.rampColor = this.webgl.setup(this.context, a);
|
|
4757
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, N.vertexSchema, N.fragmentSchema);
|
|
4758
|
+
this.program = e, this.aPositionBuffer = t;
|
|
4743
4759
|
}
|
|
4744
4760
|
},
|
|
4745
4761
|
async handleDraw() {
|
|
4746
4762
|
if (this.handleSetup(), this.etime !== this.factor.etime) {
|
|
4747
4763
|
this.etime = this.factor.etime;
|
|
4748
|
-
const
|
|
4749
|
-
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE,
|
|
4764
|
+
const a = await this.webgl.loadImg(this.factor.raw);
|
|
4765
|
+
this.texture = this.webgl.createTexture(this.context, this.context.NEAREST, this.context.LINEAR, this.context.CLAMP_TO_EDGE, a);
|
|
4750
4766
|
}
|
|
4751
4767
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4752
4768
|
}
|
|
4753
4769
|
}
|
|
4754
|
-
}, Se = (
|
|
4770
|
+
}, Se = (a) => (H("data-v-db805141"), a = a(), G(), a), tr = { key: 0 }, ar = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "m", -1)), ir = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "0", -1)), rr = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "0.5", -1)), or = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "1", -1)), sr = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "1.5", -1)), nr = /* @__PURE__ */ Se(() => /* @__PURE__ */ l("span", null, "2", -1)), lr = [
|
|
4755
4771
|
ar,
|
|
4756
4772
|
ir,
|
|
4757
4773
|
rr,
|
|
@@ -4759,12 +4775,12 @@ const er = {
|
|
|
4759
4775
|
sr,
|
|
4760
4776
|
nr
|
|
4761
4777
|
];
|
|
4762
|
-
function cr(
|
|
4778
|
+
function cr(a, e, t, r, i, o) {
|
|
4763
4779
|
var n;
|
|
4764
|
-
return (n =
|
|
4780
|
+
return (n = t.factor) != null && n.active ? (L(), x("div", tr, [
|
|
4765
4781
|
l("div", {
|
|
4766
4782
|
class: "legend-bars flex-center",
|
|
4767
|
-
style: F([{ position: "absolute" }, { right: i.right + "px", bottom:
|
|
4783
|
+
style: F([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4768
4784
|
}, lr, 4)
|
|
4769
4785
|
])) : $("", !0);
|
|
4770
4786
|
}
|
|
@@ -4779,6 +4795,10 @@ const dr = {
|
|
|
4779
4795
|
show: {
|
|
4780
4796
|
type: Boolean
|
|
4781
4797
|
},
|
|
4798
|
+
timeZone: {
|
|
4799
|
+
type: Number,
|
|
4800
|
+
default: 0
|
|
4801
|
+
},
|
|
4782
4802
|
meteo: {
|
|
4783
4803
|
type: Object
|
|
4784
4804
|
}
|
|
@@ -4810,56 +4830,60 @@ const dr = {
|
|
|
4810
4830
|
},
|
|
4811
4831
|
computed: {
|
|
4812
4832
|
computeTime() {
|
|
4813
|
-
return function(
|
|
4814
|
-
|
|
4833
|
+
return function(a) {
|
|
4834
|
+
if (a) {
|
|
4835
|
+
const e = Z(a).utc().utcOffset(this.timeZone), t = this.timeZone < 0 ? this.timeZone : "+" + this.timeZone;
|
|
4836
|
+
return `${e.format("MMM-DD,HHmm[Z]")} ( UTC ${t} )`;
|
|
4837
|
+
}
|
|
4838
|
+
return "-";
|
|
4815
4839
|
};
|
|
4816
4840
|
},
|
|
4817
4841
|
computeLat() {
|
|
4818
|
-
return function(
|
|
4819
|
-
return j.lat2pretty(
|
|
4842
|
+
return function(a, e = 4) {
|
|
4843
|
+
return j.lat2pretty(a, e).pretty;
|
|
4820
4844
|
};
|
|
4821
4845
|
},
|
|
4822
4846
|
computeLng() {
|
|
4823
|
-
return function(
|
|
4824
|
-
return j.lng2pretty(
|
|
4847
|
+
return function(a, e = 4) {
|
|
4848
|
+
return j.lng2pretty(a, e).pretty;
|
|
4825
4849
|
};
|
|
4826
4850
|
},
|
|
4827
4851
|
roundPrecision() {
|
|
4828
|
-
return function(
|
|
4829
|
-
return isNaN(
|
|
4852
|
+
return function(a, e = 4) {
|
|
4853
|
+
return isNaN(a) ? "-" : j.roundPrecision(a, e);
|
|
4830
4854
|
};
|
|
4831
4855
|
}
|
|
4832
4856
|
},
|
|
4833
4857
|
methods: {
|
|
4834
4858
|
handleBind() {
|
|
4835
|
-
var
|
|
4836
|
-
this.show ? (
|
|
4859
|
+
var a, e;
|
|
4860
|
+
this.show ? (a = this.map) == null || a.on("click", this.handleClick) : ((e = this.map) == null || e.off("click", this.handleClick), this.showMeteo = !1);
|
|
4837
4861
|
},
|
|
4838
|
-
handleClick(
|
|
4839
|
-
|
|
4840
|
-
const e =
|
|
4841
|
-
e.indexOf("close") > -1 ? this.showMeteo = !1 : e === "more" ? this.$emit("more", this.meteo) : this.$emit("point",
|
|
4862
|
+
handleClick(a) {
|
|
4863
|
+
a.originalEvent.stopPropagation();
|
|
4864
|
+
const e = a.originalEvent.target.className;
|
|
4865
|
+
e.indexOf("close") > -1 ? this.showMeteo = !1 : e === "more" ? this.$emit("more", this.meteo) : this.$emit("point", a.lngLat);
|
|
4842
4866
|
},
|
|
4843
4867
|
handleRender() {
|
|
4844
|
-
var
|
|
4868
|
+
var a;
|
|
4845
4869
|
if (this.meteo) {
|
|
4846
4870
|
const e = document.getElementById("point-meteo");
|
|
4847
|
-
this.meteoMarker ? (
|
|
4871
|
+
this.meteoMarker ? (a = this.meteoMarker) == null || a.setLngLat([this.meteo.lng, this.meteo.lat]) : this.meteoMarker = new ne.Marker(e).setLngLat([this.meteo.lng, this.meteo.lat]).addTo(this.map);
|
|
4848
4872
|
}
|
|
4849
4873
|
}
|
|
4850
4874
|
}
|
|
4851
|
-
},
|
|
4875
|
+
}, q = (a) => (H("data-v-de0e51d2"), a = a(), G(), a), pr = {
|
|
4852
4876
|
id: "point-meteo",
|
|
4853
4877
|
class: "point-meteo"
|
|
4854
|
-
}, mr = { class: "meteo-box" }, ur = { class: "header-box" }, yr = { class: "main" }, fr = { class: "sub" }, gr = { class: "main-box" }, br = { class: "flex-space" }, vr = /* @__PURE__ */
|
|
4878
|
+
}, mr = { class: "meteo-box" }, ur = { class: "header-box" }, yr = { class: "main" }, fr = { class: "sub" }, gr = { class: "main-box" }, br = { class: "flex-space" }, vr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Wind", -1)), _r = { class: "flex-space" }, wr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Wind.Wave", -1)), Lr = { class: "flex-space" }, xr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Swell", -1)), Cr = { class: "flex-space" }, Sr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Sig.Wave", -1)), kr = { class: "flex-space" }, zr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Current", -1)), Pr = { class: "flex-space" }, Tr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Precip", -1)), Er = { class: "flex-space" }, Ir = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Visibility", -1)), Rr = { class: "flex-space" }, Dr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Temp", -1)), Ar = { class: "flex-space" }, Mr = /* @__PURE__ */ q(() => /* @__PURE__ */ l("label", null, "Water Temp", -1)), $r = {
|
|
4855
4879
|
key: 0,
|
|
4856
4880
|
class: "flex-space",
|
|
4857
4881
|
style: { "justify-content": "flex-end" }
|
|
4858
|
-
}, Br = /* @__PURE__ */
|
|
4882
|
+
}, Br = /* @__PURE__ */ q(() => /* @__PURE__ */ l("span", { class: "more" }, "More >>", -1)), Nr = [
|
|
4859
4883
|
Br
|
|
4860
4884
|
];
|
|
4861
|
-
function Wr(
|
|
4862
|
-
var n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _, D, A, B, W, O,
|
|
4885
|
+
function Wr(a, e, t, r, i, o) {
|
|
4886
|
+
var n, s, c, h, d, p, f, m, b, y, u, v, g, w, k, _, D, A, B, W, O, J, de, pe, me, ue, ye, fe, ge, ae, X, Y, be, Q, E, U, ve, K, _e, ie, re, oe, ke, ze, Pe, Te, Ee;
|
|
4863
4887
|
return Me((L(), x("div", pr, [
|
|
4864
4888
|
l("div", mr, [
|
|
4865
4889
|
l("div", ur, [
|
|
@@ -4867,54 +4891,54 @@ function Wr(t, e, a, r, i, o) {
|
|
|
4867
4891
|
class: "iconfont close",
|
|
4868
4892
|
onClick: e[0] || (e[0] = (Ne) => i.showMeteo = !1)
|
|
4869
4893
|
}, ""),
|
|
4870
|
-
l("div", yr, S(o.computeLat((n =
|
|
4871
|
-
l("div", fr, S(o.computeTime((c =
|
|
4894
|
+
l("div", yr, S(o.computeLat((n = t.meteo) == null ? void 0 : n.lat)) + "," + S(o.computeLng((s = t.meteo) == null ? void 0 : s.lng)), 1),
|
|
4895
|
+
l("div", fr, S(o.computeTime((c = t.meteo) == null ? void 0 : c.utc)), 1)
|
|
4872
4896
|
]),
|
|
4873
4897
|
l("div", gr, [
|
|
4874
4898
|
l("div", br, [
|
|
4875
4899
|
vr,
|
|
4876
|
-
l("span", null, S(((d = (h =
|
|
4900
|
+
l("span", null, S(((d = (h = t.meteo) == null ? void 0 : h.wind) == null ? void 0 : d.direction) || "-") + "/" + S(o.roundPrecision((f = (p = t.meteo) == null ? void 0 : p.wind) == null ? void 0 : f.kts, 1)) + "[kts]/" + S((b = (m = t.meteo) == null ? void 0 : m.wind) == null ? void 0 : b.scale) + "[BF]/" + S(o.roundPrecision((u = (y = t.meteo) == null ? void 0 : y.gusts) == null ? void 0 : u.kts, 1)) + "[kts]", 1)
|
|
4877
4901
|
]),
|
|
4878
4902
|
l("div", _r, [
|
|
4879
4903
|
wr,
|
|
4880
|
-
l("span", null, S(((w = (g = (v =
|
|
4904
|
+
l("span", null, S(((w = (g = (v = t.meteo) == null ? void 0 : v.wave) == null ? void 0 : g.wd) == null ? void 0 : w.direction) || "-") + "/" + S(o.roundPrecision((D = (_ = (k = t.meteo) == null ? void 0 : k.wave) == null ? void 0 : _.wd) == null ? void 0 : D.height, 1)) + "[m]/" + S(o.roundPrecision((W = (B = (A = t.meteo) == null ? void 0 : A.wave) == null ? void 0 : B.wd) == null ? void 0 : W.period, 1)) + "[s]", 1)
|
|
4881
4905
|
]),
|
|
4882
4906
|
l("div", Lr, [
|
|
4883
4907
|
xr,
|
|
4884
|
-
l("span", null, S(((de = (
|
|
4908
|
+
l("span", null, S(((de = (J = (O = t.meteo) == null ? void 0 : O.wave) == null ? void 0 : J.swell) == null ? void 0 : de.direction) || "-") + "/" + S(o.roundPrecision((ue = (me = (pe = t.meteo) == null ? void 0 : pe.wave) == null ? void 0 : me.swell) == null ? void 0 : ue.height, 1)) + "[m]/" + S(o.roundPrecision((ge = (fe = (ye = t.meteo) == null ? void 0 : ye.wave) == null ? void 0 : fe.swell) == null ? void 0 : ge.period, 1)) + "[s]", 1)
|
|
4885
4909
|
]),
|
|
4886
4910
|
l("div", Cr, [
|
|
4887
4911
|
Sr,
|
|
4888
|
-
l("span", null, S(((
|
|
4912
|
+
l("span", null, S(((Y = (X = (ae = t.meteo) == null ? void 0 : ae.wave) == null ? void 0 : X.sig) == null ? void 0 : Y.direction) || "-") + "/" + S(o.roundPrecision((E = (Q = (be = t.meteo) == null ? void 0 : be.wave) == null ? void 0 : Q.sig) == null ? void 0 : E.height, 1)) + "[m]/" + S(o.roundPrecision((K = (ve = (U = t.meteo) == null ? void 0 : U.wave) == null ? void 0 : ve.sig) == null ? void 0 : K.period, 1)) + "[s]", 1)
|
|
4889
4913
|
]),
|
|
4890
4914
|
l("div", kr, [
|
|
4891
4915
|
zr,
|
|
4892
|
-
l("span", null, S(((ie = (_e =
|
|
4916
|
+
l("span", null, S(((ie = (_e = t.meteo) == null ? void 0 : _e.current) == null ? void 0 : ie.direction) || "-") + "/" + S(o.roundPrecision((oe = (re = t.meteo) == null ? void 0 : re.current) == null ? void 0 : oe.kts, 2)) + "[kts]", 1)
|
|
4893
4917
|
]),
|
|
4894
4918
|
l("div", Pr, [
|
|
4895
4919
|
Tr,
|
|
4896
|
-
l("span", null, S(o.roundPrecision((ze = (ke =
|
|
4920
|
+
l("span", null, S(o.roundPrecision((ze = (ke = t.meteo) == null ? void 0 : ke.precip) == null ? void 0 : ze.inter6h, 2)) + "[mm]", 1)
|
|
4897
4921
|
]),
|
|
4898
4922
|
l("div", Er, [
|
|
4899
4923
|
Ir,
|
|
4900
|
-
l("span", null, S(o.roundPrecision(((Pe =
|
|
4924
|
+
l("span", null, S(o.roundPrecision(((Pe = t.meteo) == null ? void 0 : Pe.visibility) / 1852, 0)) + "[nm]", 1)
|
|
4901
4925
|
]),
|
|
4902
4926
|
l("div", Rr, [
|
|
4903
4927
|
Dr,
|
|
4904
|
-
l("span", null, S(o.roundPrecision((Te =
|
|
4928
|
+
l("span", null, S(o.roundPrecision((Te = t.meteo) == null ? void 0 : Te.temp, 0)) + "[°C]", 1)
|
|
4905
4929
|
]),
|
|
4906
4930
|
l("div", Ar, [
|
|
4907
4931
|
Mr,
|
|
4908
|
-
l("span", null, S(o.roundPrecision((Ee =
|
|
4932
|
+
l("span", null, S(o.roundPrecision((Ee = t.meteo) == null ? void 0 : Ee.waterTemp, 2)) + "[°C]", 1)
|
|
4909
4933
|
])
|
|
4910
4934
|
]),
|
|
4911
|
-
|
|
4935
|
+
a.$attrs.permission & i.helper.LEVEL.Prime ? (L(), x("div", $r, Nr)) : $("", !0)
|
|
4912
4936
|
])
|
|
4913
4937
|
], 512)), [
|
|
4914
4938
|
[$e, i.showMeteo]
|
|
4915
4939
|
]);
|
|
4916
4940
|
}
|
|
4917
|
-
const Or = /* @__PURE__ */ T(dr, [["render", Wr], ["__scopeId", "data-v-
|
|
4941
|
+
const Or = /* @__PURE__ */ T(dr, [["render", Wr], ["__scopeId", "data-v-de0e51d2"]]), jr = {
|
|
4918
4942
|
name: "IdmWarZone",
|
|
4919
4943
|
props: {
|
|
4920
4944
|
map: {
|
|
@@ -5004,10 +5028,10 @@ const Or = /* @__PURE__ */ T(dr, [["render", Wr], ["__scopeId", "data-v-ef7fa87d
|
|
|
5004
5028
|
}
|
|
5005
5029
|
}
|
|
5006
5030
|
};
|
|
5007
|
-
function Fr(
|
|
5031
|
+
function Fr(a, e, t, r, i, o) {
|
|
5008
5032
|
return L(), x("div");
|
|
5009
5033
|
}
|
|
5010
|
-
const
|
|
5034
|
+
const Ur = /* @__PURE__ */ T(jr, [["render", Fr]]), Vr = {
|
|
5011
5035
|
name: "IdmGmdssArea",
|
|
5012
5036
|
props: {
|
|
5013
5037
|
map: {
|
|
@@ -5127,10 +5151,10 @@ const Vr = /* @__PURE__ */ T(jr, [["render", Fr]]), Ur = {
|
|
|
5127
5151
|
}
|
|
5128
5152
|
}
|
|
5129
5153
|
};
|
|
5130
|
-
function
|
|
5154
|
+
function Zr(a, e, t, r, i, o) {
|
|
5131
5155
|
return L(), x("div");
|
|
5132
5156
|
}
|
|
5133
|
-
const Hr = /* @__PURE__ */ T(
|
|
5157
|
+
const Hr = /* @__PURE__ */ T(Vr, [["render", Zr]]), Gr = {
|
|
5134
5158
|
name: "IdmEcaZone",
|
|
5135
5159
|
props: {
|
|
5136
5160
|
map: {
|
|
@@ -5159,8 +5183,8 @@ const Hr = /* @__PURE__ */ T(Ur, [["render", Gr]]), Zr = {
|
|
|
5159
5183
|
},
|
|
5160
5184
|
methods: {
|
|
5161
5185
|
handleRender() {
|
|
5162
|
-
var
|
|
5163
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
5186
|
+
var a;
|
|
5187
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (a = this.map) == null || a.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
5164
5188
|
type: "geojson",
|
|
5165
5189
|
data: this.zone
|
|
5166
5190
|
}), this.map.addLayer({
|
|
@@ -5218,10 +5242,10 @@ const Hr = /* @__PURE__ */ T(Ur, [["render", Gr]]), Zr = {
|
|
|
5218
5242
|
}
|
|
5219
5243
|
}
|
|
5220
5244
|
};
|
|
5221
|
-
function Jr(
|
|
5245
|
+
function Jr(a, e, t, r, i, o) {
|
|
5222
5246
|
return L(), x("div");
|
|
5223
5247
|
}
|
|
5224
|
-
const Xr = /* @__PURE__ */ T(
|
|
5248
|
+
const Xr = /* @__PURE__ */ T(Gr, [["render", Jr]]);
|
|
5225
5249
|
const qr = {
|
|
5226
5250
|
name: "IdmAlertZone",
|
|
5227
5251
|
props: {
|
|
@@ -5250,23 +5274,23 @@ const qr = {
|
|
|
5250
5274
|
watch: {
|
|
5251
5275
|
zone: {
|
|
5252
5276
|
handler() {
|
|
5253
|
-
var
|
|
5254
|
-
this.zone ? (this.handleRender(), (
|
|
5277
|
+
var a, e;
|
|
5278
|
+
this.zone ? (this.handleRender(), (a = this.map) == null || a.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));
|
|
5255
5279
|
}
|
|
5256
5280
|
}
|
|
5257
5281
|
},
|
|
5258
5282
|
methods: {
|
|
5259
|
-
handleClick(
|
|
5283
|
+
handleClick(a) {
|
|
5260
5284
|
var r;
|
|
5261
|
-
const e =
|
|
5285
|
+
const e = a.features[0], t = (r = this.zone) == null ? void 0 : r.features.filter((i) => {
|
|
5262
5286
|
var o;
|
|
5263
5287
|
return i.properties.id === ((o = e == null ? void 0 : e.properties) == null ? void 0 : o.id);
|
|
5264
5288
|
})[0];
|
|
5265
|
-
|
|
5289
|
+
t && (this.showZone = !0, this.form = { ...t.properties });
|
|
5266
5290
|
},
|
|
5267
5291
|
handleRender() {
|
|
5268
|
-
var
|
|
5269
|
-
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (
|
|
5292
|
+
var a;
|
|
5293
|
+
this.map ? (this.handleClear(), this.zone && (this.map.getSource(this.source) ? (a = this.map) == null || a.getSource(this.source).setData(this.zone) : (this.map.addSource(this.source, {
|
|
5270
5294
|
type: "geojson",
|
|
5271
5295
|
data: this.zone
|
|
5272
5296
|
}), this.map.addLayer({
|
|
@@ -5349,7 +5373,7 @@ const qr = {
|
|
|
5349
5373
|
}
|
|
5350
5374
|
}
|
|
5351
5375
|
}, Yr = { id: "zone-info" }, Qr = ["innerHTML"];
|
|
5352
|
-
function Kr(
|
|
5376
|
+
function Kr(a, e, t, r, i, o) {
|
|
5353
5377
|
var n;
|
|
5354
5378
|
return Me((L(), x("div", Yr, [
|
|
5355
5379
|
l("div", {
|
|
@@ -5390,43 +5414,43 @@ const to = {
|
|
|
5390
5414
|
},
|
|
5391
5415
|
computed: {
|
|
5392
5416
|
computeLat() {
|
|
5393
|
-
return function(
|
|
5394
|
-
return j.lat2pretty(
|
|
5417
|
+
return function(a) {
|
|
5418
|
+
return j.lat2pretty(a, 4).pretty;
|
|
5395
5419
|
};
|
|
5396
5420
|
},
|
|
5397
5421
|
computeLng() {
|
|
5398
|
-
return function(
|
|
5399
|
-
return j.lng2pretty(
|
|
5422
|
+
return function(a) {
|
|
5423
|
+
return j.lng2pretty(a, 4).pretty;
|
|
5400
5424
|
};
|
|
5401
5425
|
}
|
|
5402
5426
|
},
|
|
5403
5427
|
watch: {
|
|
5404
5428
|
port: {
|
|
5405
5429
|
handler() {
|
|
5406
|
-
var
|
|
5407
|
-
this.port ? (this.handleRender(), (
|
|
5430
|
+
var a, e;
|
|
5431
|
+
this.port ? (this.handleRender(), (a = this.map) == null || a.on("click", [this.layer], this.handleClick)) : (this.handleClear(), (e = this.map) == null || e.off("click", [this.layer], this.handleClick));
|
|
5408
5432
|
}
|
|
5409
5433
|
}
|
|
5410
5434
|
},
|
|
5411
5435
|
methods: {
|
|
5412
|
-
handleClick(
|
|
5436
|
+
handleClick(a) {
|
|
5413
5437
|
var r;
|
|
5414
|
-
const e =
|
|
5438
|
+
const e = a.features[0], t = (r = this.port) == null ? void 0 : r.features.filter((i) => {
|
|
5415
5439
|
var o;
|
|
5416
5440
|
return i.properties.id === ((o = e == null ? void 0 : e.properties) == null ? void 0 : o.id);
|
|
5417
5441
|
})[0];
|
|
5418
|
-
if (
|
|
5419
|
-
this.showPort = !0, this.form = { ...
|
|
5442
|
+
if (t) {
|
|
5443
|
+
this.showPort = !0, this.form = { ...t.properties }, this.form.lng = t.geometry.coordinates[0], this.form.lat = t.geometry.coordinates[1];
|
|
5420
5444
|
const i = document.getElementById("port-info");
|
|
5421
|
-
this.marker ? this.marker.setLngLat([
|
|
5445
|
+
this.marker ? this.marker.setLngLat([a.lngLat.lng, a.lngLat.lat]) : this.marker = new ne.Marker(i).setLngLat([a.lngLat.lng, a.lngLat.lat]).setOffset([0, -85]).addTo(this.map);
|
|
5422
5446
|
}
|
|
5423
5447
|
},
|
|
5424
5448
|
handleEmit() {
|
|
5425
5449
|
this.$emit("port", this.form);
|
|
5426
5450
|
},
|
|
5427
5451
|
handleRender() {
|
|
5428
|
-
var
|
|
5429
|
-
this.map ? this.port && (this.map.getSource(this.source) ? (
|
|
5452
|
+
var a;
|
|
5453
|
+
this.map ? this.port && (this.map.getSource(this.source) ? (a = this.map) == null || a.getSource(this.source).setData(this.port) : (this.map.addSource(this.source, {
|
|
5430
5454
|
type: "geojson",
|
|
5431
5455
|
data: this.port
|
|
5432
5456
|
}), this.map.addLayer({
|
|
@@ -5457,11 +5481,11 @@ const to = {
|
|
|
5457
5481
|
this.showPort = !1, this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
5458
5482
|
}
|
|
5459
5483
|
}
|
|
5460
|
-
}, Be = (
|
|
5484
|
+
}, Be = (a) => (H("data-v-4ab013cc"), a = a(), G(), a), ao = { id: "port-info" }, io = { class: "port-box" }, ro = { class: "flex-start" }, oo = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Name : ", -1)), so = { class: "flex-start" }, no = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Position : ", -1)), lo = { class: "flex-start" }, co = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "LoCode : ", -1)), ho = {
|
|
5461
5485
|
class: "flex-start",
|
|
5462
5486
|
style: { "align-items": "flex-start" }
|
|
5463
5487
|
}, po = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("label", null, "Region : ", -1));
|
|
5464
|
-
function mo(
|
|
5488
|
+
function mo(a, e, t, r, i, o) {
|
|
5465
5489
|
return Me((L(), x("div", ao, [
|
|
5466
5490
|
l("div", {
|
|
5467
5491
|
class: "close iconfont",
|
|
@@ -5561,7 +5585,7 @@ const uo = /* @__PURE__ */ T(to, [["render", mo], ["__scopeId", "data-v-4ab013cc
|
|
|
5561
5585
|
}
|
|
5562
5586
|
}
|
|
5563
5587
|
};
|
|
5564
|
-
function fo(
|
|
5588
|
+
function fo(a, e, t, r, i, o) {
|
|
5565
5589
|
return L(), x("div");
|
|
5566
5590
|
}
|
|
5567
5591
|
const go = /* @__PURE__ */ T(yo, [["render", fo]]), bo = {
|
|
@@ -5729,7 +5753,7 @@ const go = /* @__PURE__ */ T(yo, [["render", fo]]), bo = {
|
|
|
5729
5753
|
}
|
|
5730
5754
|
}
|
|
5731
5755
|
};
|
|
5732
|
-
function vo(
|
|
5756
|
+
function vo(a, e, t, r, i, o) {
|
|
5733
5757
|
return L(), x("div");
|
|
5734
5758
|
}
|
|
5735
5759
|
const _o = /* @__PURE__ */ T(bo, [["render", vo]]), wo = {
|
|
@@ -5820,7 +5844,7 @@ const _o = /* @__PURE__ */ T(bo, [["render", vo]]), wo = {
|
|
|
5820
5844
|
}
|
|
5821
5845
|
}
|
|
5822
5846
|
};
|
|
5823
|
-
function Lo(
|
|
5847
|
+
function Lo(a, e, t, r, i, o) {
|
|
5824
5848
|
return L(), x("div");
|
|
5825
5849
|
}
|
|
5826
5850
|
const xo = /* @__PURE__ */ T(wo, [["render", Lo]]), Co = {
|
|
@@ -5852,8 +5876,8 @@ const xo = /* @__PURE__ */ T(wo, [["render", Lo]]), Co = {
|
|
|
5852
5876
|
},
|
|
5853
5877
|
methods: {
|
|
5854
5878
|
handleRender() {
|
|
5855
|
-
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((
|
|
5856
|
-
|
|
5879
|
+
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((a) => {
|
|
5880
|
+
a.geometry.type === "Polygon" && a.geometry.coordinates.forEach((e) => j.convertToMonotonicLng2(e));
|
|
5857
5881
|
}), this.map.addSource(this.source, {
|
|
5858
5882
|
type: "geojson",
|
|
5859
5883
|
data: this.area
|
|
@@ -5913,7 +5937,7 @@ const xo = /* @__PURE__ */ T(wo, [["render", Lo]]), Co = {
|
|
|
5913
5937
|
}
|
|
5914
5938
|
}
|
|
5915
5939
|
};
|
|
5916
|
-
function So(
|
|
5940
|
+
function So(a, e, t, r, i, o) {
|
|
5917
5941
|
return L(), x("div");
|
|
5918
5942
|
}
|
|
5919
5943
|
const ko = /* @__PURE__ */ T(Co, [["render", So]]), zo = {
|
|
@@ -5965,7 +5989,7 @@ const ko = /* @__PURE__ */ T(Co, [["render", So]]), zo = {
|
|
|
5965
5989
|
}
|
|
5966
5990
|
}
|
|
5967
5991
|
};
|
|
5968
|
-
function Po(
|
|
5992
|
+
function Po(a, e, t, r, i, o) {
|
|
5969
5993
|
return L(), x("div");
|
|
5970
5994
|
}
|
|
5971
5995
|
const To = /* @__PURE__ */ T(zo, [["render", Po]]);
|
|
@@ -6008,37 +6032,37 @@ const Eo = {
|
|
|
6008
6032
|
},
|
|
6009
6033
|
map: {
|
|
6010
6034
|
handler() {
|
|
6011
|
-
var
|
|
6012
|
-
this.map && ((
|
|
6035
|
+
var a;
|
|
6036
|
+
this.map && ((a = this.map) == null || a.on("mousemove", this.handleMouseMove));
|
|
6013
6037
|
},
|
|
6014
6038
|
immediate: !0
|
|
6015
6039
|
},
|
|
6016
6040
|
toggleVersion: {
|
|
6017
6041
|
handler() {
|
|
6018
|
-
var
|
|
6019
|
-
this.right = (((
|
|
6042
|
+
var a, e, t;
|
|
6043
|
+
this.right = (((a = document.getElementsByClassName("legend-bars")[0]) == null ? void 0 : a.clientWidth) || -10) + (((e = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : e.clientWidth) || 0) + (((t = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : t.clientWidth) || 0) + 20;
|
|
6020
6044
|
},
|
|
6021
6045
|
immediate: !0
|
|
6022
6046
|
}
|
|
6023
6047
|
},
|
|
6024
6048
|
methods: {
|
|
6025
6049
|
handleBind() {
|
|
6026
|
-
var
|
|
6027
|
-
this.show ? ((
|
|
6050
|
+
var a, e;
|
|
6051
|
+
this.show ? ((a = this.map) == null || a.on("zoomend", this.handleZoomEnd), this.handleRender()) : (this.handleClear(), (e = this.map) == null || e.off("zoomend", this.handleZoomEnd));
|
|
6028
6052
|
},
|
|
6029
|
-
handleMouseMove(
|
|
6030
|
-
const e =
|
|
6031
|
-
this.lngLat = { lng:
|
|
6053
|
+
handleMouseMove(a) {
|
|
6054
|
+
const e = a.lngLat, t = j.lng2pretty(e.lng, 2), r = j.lat2pretty(e.lat, 2);
|
|
6055
|
+
this.lngLat = { lng: t, lat: r };
|
|
6032
6056
|
},
|
|
6033
6057
|
handleComputeLatLngs() {
|
|
6034
6058
|
var r;
|
|
6035
|
-
const
|
|
6036
|
-
console.log(
|
|
6059
|
+
const a = (r = this.map) == null ? void 0 : r.getZoom();
|
|
6060
|
+
console.log(a);
|
|
6037
6061
|
let e = 30;
|
|
6038
|
-
|
|
6039
|
-
const
|
|
6062
|
+
a > 4 ? e = 10 : a > 3 && (e = 15);
|
|
6063
|
+
const t = [];
|
|
6040
6064
|
for (let i = -60; i < 90; i += e)
|
|
6041
|
-
|
|
6065
|
+
t.push({
|
|
6042
6066
|
type: "Feature",
|
|
6043
6067
|
geometry: {
|
|
6044
6068
|
type: "LineString",
|
|
@@ -6049,7 +6073,7 @@ const Eo = {
|
|
|
6049
6073
|
}
|
|
6050
6074
|
});
|
|
6051
6075
|
for (let i = -180; i < 180; i += e)
|
|
6052
|
-
|
|
6076
|
+
t.push({
|
|
6053
6077
|
type: "Feature",
|
|
6054
6078
|
geometry: {
|
|
6055
6079
|
type: "LineString",
|
|
@@ -6061,7 +6085,7 @@ const Eo = {
|
|
|
6061
6085
|
});
|
|
6062
6086
|
for (let i = 180; i > -180; i -= e)
|
|
6063
6087
|
for (let o = -60; o < 90; o += e)
|
|
6064
|
-
|
|
6088
|
+
t.push({
|
|
6065
6089
|
type: "Feature",
|
|
6066
6090
|
geometry: {
|
|
6067
6091
|
type: "Point",
|
|
@@ -6071,21 +6095,21 @@ const Eo = {
|
|
|
6071
6095
|
val: `${o > 0 ? o + " N" : o === 0 ? o : o * -1 + " S"}, ${i > 0 ? i + " E" : i * -1 + " W"}`
|
|
6072
6096
|
}
|
|
6073
6097
|
});
|
|
6074
|
-
return
|
|
6098
|
+
return t;
|
|
6075
6099
|
},
|
|
6076
6100
|
handleZoomEnd() {
|
|
6077
6101
|
var e;
|
|
6078
|
-
const
|
|
6079
|
-
(e = this.map) == null || e.getSource(this.source).setData(C.featureCollection(
|
|
6102
|
+
const a = this.handleComputeLatLngs();
|
|
6103
|
+
(e = this.map) == null || e.getSource(this.source).setData(C.featureCollection(a));
|
|
6080
6104
|
},
|
|
6081
6105
|
handleRender() {
|
|
6082
6106
|
if (this.map) {
|
|
6083
|
-
const
|
|
6107
|
+
const a = this.handleComputeLatLngs();
|
|
6084
6108
|
this.map.addSource(this.source, {
|
|
6085
6109
|
type: "geojson",
|
|
6086
6110
|
data: {
|
|
6087
6111
|
type: "FeatureCollection",
|
|
6088
|
-
features:
|
|
6112
|
+
features: a
|
|
6089
6113
|
}
|
|
6090
6114
|
}), this.map.addLayer({
|
|
6091
6115
|
id: this.layer,
|
|
@@ -6120,16 +6144,16 @@ const Eo = {
|
|
|
6120
6144
|
}
|
|
6121
6145
|
},
|
|
6122
6146
|
handleClear() {
|
|
6123
|
-
var
|
|
6124
|
-
(
|
|
6147
|
+
var a, e, t, r, i, o;
|
|
6148
|
+
(a = this.map) != null && a.getLayer(this.layer) && ((e = this.map) == null || e.removeLayer(this.layer)), (t = this.map) != null && t.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));
|
|
6125
6149
|
}
|
|
6126
6150
|
}
|
|
6127
|
-
}, Io = (
|
|
6128
|
-
function Do(
|
|
6151
|
+
}, Io = (a) => (H("data-v-7367f59b"), a = a(), G(), a), Ro = /* @__PURE__ */ Io(() => /* @__PURE__ */ l("span", null, ", ", -1));
|
|
6152
|
+
function Do(a, e, t, r, i, o) {
|
|
6129
6153
|
return i.lngLat ? (L(), x("div", {
|
|
6130
6154
|
key: 0,
|
|
6131
6155
|
class: "lat-lng-tip",
|
|
6132
|
-
style: F({ right: i.right + "px", bottom:
|
|
6156
|
+
style: F({ right: i.right + "px", bottom: t.bottom })
|
|
6133
6157
|
}, [
|
|
6134
6158
|
l("span", null, S(i.lngLat.lat.pretty), 1),
|
|
6135
6159
|
Ro,
|
|
@@ -6177,9 +6201,9 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6177
6201
|
},
|
|
6178
6202
|
methods: {
|
|
6179
6203
|
handleBind() {
|
|
6180
|
-
var
|
|
6204
|
+
var a, e, t, r, i, o, n, s, c, h;
|
|
6181
6205
|
if (this.show)
|
|
6182
|
-
(
|
|
6206
|
+
(a = this.map) == null || a.getCanvas().addEventListener("keydown", this.handleKeydown), (e = this.map) == null || e.on("mousemove", this.handleMove), (t = this.map) == null || t.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");
|
|
6183
6207
|
else {
|
|
6184
6208
|
(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);
|
|
6185
6209
|
for (const d of this.geojson)
|
|
@@ -6187,22 +6211,22 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6187
6211
|
this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
6188
6212
|
}
|
|
6189
6213
|
},
|
|
6190
|
-
handleKeydown(
|
|
6191
|
-
if (
|
|
6214
|
+
handleKeydown(a) {
|
|
6215
|
+
if (a.key === "Shift") {
|
|
6192
6216
|
this.navigation = this.navigation === "RL" ? "GC" : "RL";
|
|
6193
|
-
const
|
|
6194
|
-
|
|
6217
|
+
const t = this.geojson.at(-1).features.filter((r) => r.geometry.type === "Point");
|
|
6218
|
+
t.length && (t.at(-1).properties.mode = this.navigation);
|
|
6195
6219
|
}
|
|
6196
6220
|
},
|
|
6197
|
-
handleDrag(
|
|
6198
|
-
var
|
|
6199
|
-
const e = (r = (
|
|
6221
|
+
handleDrag(a) {
|
|
6222
|
+
var t, r, i, o, n, s, c, h, d, p;
|
|
6223
|
+
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6200
6224
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6201
6225
|
const f = this.geojson.filter((u) => u.id === e.split("-")[0])[0];
|
|
6202
6226
|
this.pointMarkers[f.id].filter((u) => {
|
|
6203
6227
|
var v;
|
|
6204
6228
|
return ((v = u._element) == null ? void 0 : v.id) === e;
|
|
6205
|
-
})[0].setLngLat([(o = (i =
|
|
6229
|
+
})[0].setLngLat([(o = (i = a.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = a.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6206
6230
|
let b;
|
|
6207
6231
|
f.features.forEach((u, v) => {
|
|
6208
6232
|
if (u.geometry.type === "Point" && u.properties.id == e.split("-")[1]) {
|
|
@@ -6214,45 +6238,45 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6214
6238
|
this.handleTmpPointUpdate(
|
|
6215
6239
|
f,
|
|
6216
6240
|
y[b - 1],
|
|
6217
|
-
{ lng: (h = (c =
|
|
6241
|
+
{ lng: (h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (p = (d = a.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat, properties: y[b].properties },
|
|
6218
6242
|
b === y.length - 1 ? void 0 : y[b + 1]
|
|
6219
6243
|
);
|
|
6220
6244
|
}
|
|
6221
6245
|
},
|
|
6222
|
-
handleDragEnd(
|
|
6223
|
-
var
|
|
6224
|
-
const e = (r = (
|
|
6246
|
+
handleDragEnd(a) {
|
|
6247
|
+
var t, r, i, o, n, s, c, h, d, p;
|
|
6248
|
+
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6225
6249
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6226
6250
|
const f = this.geojson.filter((y) => y.id === e.split("-")[0])[0];
|
|
6227
6251
|
this.pointMarkers[f.id].filter((y) => {
|
|
6228
6252
|
var u;
|
|
6229
6253
|
return ((u = y._element) == null ? void 0 : u.id) === e;
|
|
6230
|
-
})[0].setLngLat([(o = (i =
|
|
6254
|
+
})[0].setLngLat([(o = (i = a.target) == null ? void 0 : i._lngLat) == null ? void 0 : o.lng, (s = (n = a.target) == null ? void 0 : n._lngLat) == null ? void 0 : s.lat]);
|
|
6231
6255
|
const b = f.features.filter((y) => y.geometry.type === "Point" && y.properties.id == e.split("-")[1])[0];
|
|
6232
|
-
b.geometry.coordinates = [(h = (c =
|
|
6256
|
+
b.geometry.coordinates = [(h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (p = (d = a.target) == null ? void 0 : d._lngLat) == null ? void 0 : p.lat], f.features = f.features.filter((y) => y.geometry.type === "Point"), this.handlePointUpdate(f);
|
|
6233
6257
|
}
|
|
6234
6258
|
},
|
|
6235
|
-
handleContextmenu(
|
|
6236
|
-
var
|
|
6237
|
-
|
|
6238
|
-
const e = (o = (i = (r =
|
|
6259
|
+
handleContextmenu(a) {
|
|
6260
|
+
var t, r, i, o;
|
|
6261
|
+
a.preventDefault(), (t = this.contextmenu) == null || t.remove();
|
|
6262
|
+
const e = (o = (i = (r = a.originalEvent) == null ? void 0 : r.target) == null ? void 0 : i.parentElement) == null ? void 0 : o.id;
|
|
6239
6263
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6240
6264
|
const s = this.geojson.filter((c) => c.id === e.split("-")[0])[0].features.filter((c) => c.geometry.type === "Point");
|
|
6241
6265
|
if (s.length > 2 && s.filter((h) => h.properties.id === (e == null ? void 0 : e.split("-")[1]))[0]) {
|
|
6242
6266
|
const h = document.createElement("div");
|
|
6243
|
-
h.className = "point-contextmenu-marker", h.innerHTML = `<span id="del-${e}" class="del-point">Del</span>`, this.contextmenu = new ne.Marker(h).setOffset([24, 0]).setLngLat([
|
|
6267
|
+
h.className = "point-contextmenu-marker", h.innerHTML = `<span id="del-${e}" class="del-point">Del</span>`, this.contextmenu = new ne.Marker(h).setOffset([24, 0]).setLngLat([a.lngLat.lng, a.lngLat.lat]).addTo(this.map);
|
|
6244
6268
|
}
|
|
6245
6269
|
}
|
|
6246
6270
|
},
|
|
6247
|
-
handleClick(
|
|
6248
|
-
var
|
|
6249
|
-
(
|
|
6250
|
-
const e =
|
|
6271
|
+
handleClick(a) {
|
|
6272
|
+
var t, r, i, o, n;
|
|
6273
|
+
(t = this.contextmenu) == null || t.remove();
|
|
6274
|
+
const e = a.originalEvent.target.className;
|
|
6251
6275
|
if (e === "marker-close") {
|
|
6252
|
-
const s = (i = (r =
|
|
6276
|
+
const s = (i = (r = a.originalEvent) == null ? void 0 : r.srcElement) == null ? void 0 : i.id, c = this.geojson.filter((h) => h.id === s)[0];
|
|
6253
6277
|
c && this.handleClear(c, !0), this.geojson = this.geojson.filter((h) => h.id !== s);
|
|
6254
6278
|
} else if (e === "del-point") {
|
|
6255
|
-
const s = (n = (o =
|
|
6279
|
+
const s = (n = (o = a.originalEvent.target.id) == null ? void 0 : o.replace("del-", "")) == null ? void 0 : n.split("-"), c = this.geojson.filter((h) => h.id === s[0])[0];
|
|
6256
6280
|
c.features = c.features.filter((h) => h.geometry.type === "Point" && h.properties.id !== s[1]), this.handlePointUpdate(c);
|
|
6257
6281
|
} else if (e !== "marker-label") {
|
|
6258
6282
|
let s = this.geojson.at(-1);
|
|
@@ -6260,7 +6284,7 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6260
6284
|
const c = C.feature(
|
|
6261
6285
|
{
|
|
6262
6286
|
type: "Point",
|
|
6263
|
-
coordinates: [
|
|
6287
|
+
coordinates: [a.lngLat.lng, a.lngLat.lat]
|
|
6264
6288
|
},
|
|
6265
6289
|
{
|
|
6266
6290
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -6270,39 +6294,39 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6270
6294
|
s.features.push(c), this.handlePointUpdate(s);
|
|
6271
6295
|
}
|
|
6272
6296
|
},
|
|
6273
|
-
handlePointUpdate(
|
|
6274
|
-
const e =
|
|
6297
|
+
handlePointUpdate(a) {
|
|
6298
|
+
const e = a.features;
|
|
6275
6299
|
if (e.length > 1) {
|
|
6276
|
-
let
|
|
6300
|
+
let t = 0;
|
|
6277
6301
|
const r = [];
|
|
6278
6302
|
for (let i = 1; i < e.length; i++) {
|
|
6279
|
-
const o = e[i - 1], n = e[i], s = o.properties, c = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, h = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, d =
|
|
6280
|
-
|
|
6303
|
+
const o = e[i - 1], n = e[i], s = o.properties, c = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, h = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, d = te.calculateDistance(c, h, s.mode === "RL", 2), p = te.calculateBearing(c, h, s.mode === "RL", 2);
|
|
6304
|
+
t = j.roundPrecision(t + d, 2);
|
|
6281
6305
|
let f;
|
|
6282
|
-
s.mode === "RL" ? f = j.convertToMonotonicLng([c, h]) : f = j.convertToMonotonicLng(
|
|
6306
|
+
s.mode === "RL" ? f = j.convertToMonotonicLng([c, h]) : f = j.convertToMonotonicLng(te.interpolateCoordinates(c, h, 200));
|
|
6283
6307
|
const m = C.lineString(f.map((b) => [b.lng, b.lat]));
|
|
6284
|
-
m.properties.dist = d, m.properties.bearing = p, m.properties.total =
|
|
6308
|
+
m.properties.dist = d, m.properties.bearing = p, m.properties.total = t, r.push(m);
|
|
6285
6309
|
}
|
|
6286
|
-
e.push(...r),
|
|
6310
|
+
e.push(...r), a.total = t;
|
|
6287
6311
|
}
|
|
6288
|
-
return this.handleRender(
|
|
6312
|
+
return this.handleRender(a), a;
|
|
6289
6313
|
},
|
|
6290
|
-
handleTmpPointUpdate(
|
|
6314
|
+
handleTmpPointUpdate(a, e, t, r) {
|
|
6291
6315
|
const i = C.featureCollection([]);
|
|
6292
6316
|
let o, n;
|
|
6293
6317
|
if (e) {
|
|
6294
|
-
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, d = { lng:
|
|
6295
|
-
o =
|
|
6318
|
+
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, d = { lng: t.lng, lat: t.lat };
|
|
6319
|
+
o = te.calculateDistance(h, d, c.mode === "RL", 2), n = te.calculateBearing(h, d, c.mode === "RL", 2);
|
|
6296
6320
|
let p;
|
|
6297
|
-
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(
|
|
6321
|
+
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(te.interpolateCoordinates(h, d, 200));
|
|
6298
6322
|
const f = C.lineString(p.map((m) => [m.lng, m.lat]));
|
|
6299
6323
|
f.properties.dist = o, f.properties.bearing = n, i.features.push(f);
|
|
6300
6324
|
}
|
|
6301
6325
|
if (r) {
|
|
6302
|
-
const c =
|
|
6303
|
-
o =
|
|
6326
|
+
const c = t.properties, h = t, d = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
6327
|
+
o = te.calculateDistance(h, d, c.mode === "RL", 2), n = te.calculateBearing(h, d, c.mode === "RL", 2);
|
|
6304
6328
|
let p;
|
|
6305
|
-
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(
|
|
6329
|
+
c.mode === "RL" ? p = j.convertToMonotonicLng([h, d]) : p = j.convertToMonotonicLng(te.interpolateCoordinates(h, d, 200));
|
|
6306
6330
|
const f = C.lineString(p.map((m) => [m.lng, m.lat]));
|
|
6307
6331
|
f.properties.dist = o, f.properties.bearing = n, i.features.push(f);
|
|
6308
6332
|
}
|
|
@@ -6344,36 +6368,36 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6344
6368
|
}
|
|
6345
6369
|
});
|
|
6346
6370
|
let s;
|
|
6347
|
-
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${j.roundPrecision((
|
|
6348
|
-
this.tipMarker._element.innerHTML = s, this.tipMarker.setLngLat([
|
|
6371
|
+
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${j.roundPrecision((a.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)
|
|
6372
|
+
this.tipMarker._element.innerHTML = s, this.tipMarker.setLngLat([t.lng, t.lat]);
|
|
6349
6373
|
else {
|
|
6350
6374
|
const c = document.createElement("div");
|
|
6351
|
-
c.className = "tip-marker", c.innerHTML = s, this.tipMarker = new ne.Marker(c).setOffset([140, 0]).setLngLat([
|
|
6375
|
+
c.className = "tip-marker", c.innerHTML = s, this.tipMarker = new ne.Marker(c).setOffset([140, 0]).setLngLat([t.lng, t.lat]).addTo(this.map);
|
|
6352
6376
|
}
|
|
6353
6377
|
},
|
|
6354
|
-
handleMove(
|
|
6378
|
+
handleMove(a) {
|
|
6355
6379
|
this.map.getCanvas().style.cursor = "crosshair";
|
|
6356
6380
|
let e = this.geojson.at(-1);
|
|
6357
6381
|
e || (e = C.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(e));
|
|
6358
|
-
const
|
|
6359
|
-
|
|
6382
|
+
const t = e.features.filter((r) => r.geometry.type === "Point");
|
|
6383
|
+
t != null && t.length && this.handleTmpPointUpdate(e, t.at(-1), { lng: a.lngLat.lng, lat: a.lngLat.lat });
|
|
6360
6384
|
},
|
|
6361
|
-
handleDblClick(
|
|
6362
|
-
|
|
6385
|
+
handleDblClick(a) {
|
|
6386
|
+
a.preventDefault();
|
|
6363
6387
|
let e = this.geojson.at(-1);
|
|
6364
6388
|
e.closed = !0, this.handleRender(e), e = C.featureCollection([], { id: (/* @__PURE__ */ new Date()).getTime().toString() }), this.geojson.push(e);
|
|
6365
6389
|
},
|
|
6366
|
-
handleRender(
|
|
6390
|
+
handleRender(a) {
|
|
6367
6391
|
var e;
|
|
6368
|
-
if ((e =
|
|
6369
|
-
const
|
|
6370
|
-
this.map.getSource(
|
|
6392
|
+
if ((e = a == null ? void 0 : a.features) != null && e.length) {
|
|
6393
|
+
const t = `${a.id}-${this.source}`, r = `${a.id}-${this.layer}`, i = `${a.id}-${this.labelLayer}`;
|
|
6394
|
+
this.map.getSource(t) ? this.map.getSource(t).setData(a) : this.map.addSource(t, {
|
|
6371
6395
|
type: "geojson",
|
|
6372
|
-
data:
|
|
6373
|
-
}), this.handleClear(
|
|
6396
|
+
data: a
|
|
6397
|
+
}), this.handleClear(a, !1), this.map.addLayer({
|
|
6374
6398
|
id: r,
|
|
6375
6399
|
type: "line",
|
|
6376
|
-
source:
|
|
6400
|
+
source: t,
|
|
6377
6401
|
filter: ["==", "$type", "LineString"],
|
|
6378
6402
|
layout: {
|
|
6379
6403
|
"line-cap": "round",
|
|
@@ -6386,7 +6410,7 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6386
6410
|
}), this.map.addLayer({
|
|
6387
6411
|
id: i,
|
|
6388
6412
|
type: "symbol",
|
|
6389
|
-
source:
|
|
6413
|
+
source: t,
|
|
6390
6414
|
filter: ["==", "$type", "LineString"],
|
|
6391
6415
|
layout: {
|
|
6392
6416
|
"symbol-placement": "line-center",
|
|
@@ -6402,29 +6426,29 @@ const Qe = /* @__PURE__ */ T(Eo, [["render", Do], ["__scopeId", "data-v-7367f59b
|
|
|
6402
6426
|
"text-halo-blur": 0
|
|
6403
6427
|
}
|
|
6404
6428
|
});
|
|
6405
|
-
const o =
|
|
6429
|
+
const o = a.features.filter((n) => n.geometry.type === "Point");
|
|
6406
6430
|
for (const n of o) {
|
|
6407
6431
|
const s = document.createElement("div");
|
|
6408
|
-
s.id = `${
|
|
6432
|
+
s.id = `${a.id}-${n.properties.id}`, s.className = `${a.closed ? "point-marker closed" : "point-marker"}`, s.innerHTML = '<div class="marker-circle"></div>';
|
|
6409
6433
|
const c = new ne.Marker({ element: s, draggable: !0, contextmenu: !0 }).setLngLat(n.geometry.coordinates).addTo(this.map);
|
|
6410
|
-
c.on("drag", this.handleDrag), c.on("dragend", this.handleDragEnd), this.pointMarkers[
|
|
6434
|
+
c.on("drag", this.handleDrag), c.on("dragend", this.handleDragEnd), this.pointMarkers[a.id] ? this.pointMarkers[a.id].push(c) : this.pointMarkers[a.id] = [c];
|
|
6411
6435
|
}
|
|
6412
|
-
if (
|
|
6413
|
-
const n = o.at(-1), c =
|
|
6414
|
-
h.className = "point-summary-marker", h.innerHTML = `<div id="${
|
|
6436
|
+
if (a.closed) {
|
|
6437
|
+
const n = o.at(-1), c = a.features.filter((d) => d.geometry.type === "LineString").at(-1), h = document.createElement("div");
|
|
6438
|
+
h.className = "point-summary-marker", h.innerHTML = `<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`, this.closeMarkers[a.id] = new ne.Marker(h).setOffset([60, 0]).setLngLat(n.geometry.coordinates).addTo(this.map);
|
|
6415
6439
|
}
|
|
6416
6440
|
}
|
|
6417
6441
|
},
|
|
6418
|
-
handleClear(
|
|
6442
|
+
handleClear(a, e = !0) {
|
|
6419
6443
|
var o, n, s, c, h, d, p, f, m;
|
|
6420
|
-
const
|
|
6421
|
-
(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[
|
|
6444
|
+
const t = `${a.id}-${this.source}`, r = `${a.id}-${this.layer}`, i = `${a.id}-${this.labelLayer}`;
|
|
6445
|
+
(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[a.id]) == null || h.remove(), this.closeMarkers[a.id] = void 0, (d = this.pointMarkers[a.id]) == null || d.forEach((b) => {
|
|
6422
6446
|
b == null || b.remove();
|
|
6423
|
-
}), this.pointMarkers[
|
|
6447
|
+
}), this.pointMarkers[a.id] = [], (p = this.tipMarker) == null || p.remove(), this.tipMarker = void 0, e && ((f = this.map) != null && f.getSource(t)) && this.map.removeSource(t), e && ((m = this.map) != null && m.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
6424
6448
|
}
|
|
6425
6449
|
}
|
|
6426
6450
|
};
|
|
6427
|
-
function Mo(
|
|
6451
|
+
function Mo(a, e, t, r, i, o) {
|
|
6428
6452
|
return L(), x("div");
|
|
6429
6453
|
}
|
|
6430
6454
|
const $o = /* @__PURE__ */ T(Ao, [["render", Mo]]);
|
|
@@ -6473,23 +6497,23 @@ const Bo = {
|
|
|
6473
6497
|
},
|
|
6474
6498
|
toggleVersion: {
|
|
6475
6499
|
handler() {
|
|
6476
|
-
var
|
|
6477
|
-
this.right = (((
|
|
6500
|
+
var a, e;
|
|
6501
|
+
this.right = (((a = document.getElementsByClassName("available-layers-show")[0]) == null ? void 0 : a.clientWidth) || 0) + (((e = document.getElementsByClassName("fleet-list-container")[0]) == null ? void 0 : e.clientWidth) || 0) + 10;
|
|
6478
6502
|
},
|
|
6479
6503
|
immediate: !0
|
|
6480
6504
|
}
|
|
6481
6505
|
},
|
|
6482
6506
|
methods: {}
|
|
6483
|
-
}, Ke = (
|
|
6507
|
+
}, Ke = (a) => (H("data-v-ab627b83"), a = a(), G(), a), No = { key: 0 }, Wo = { class: "bar-item" }, Oo = /* @__PURE__ */ Ke(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "HI", -1)), jo = [
|
|
6484
6508
|
Oo
|
|
6485
|
-
], Fo = /* @__PURE__ */ Ke(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "I4", -1)),
|
|
6509
|
+
], Fo = /* @__PURE__ */ Ke(() => /* @__PURE__ */ l("span", { class: "iconfont" }, "I4", -1)), Uo = [
|
|
6486
6510
|
Fo
|
|
6487
6511
|
];
|
|
6488
|
-
function
|
|
6489
|
-
return
|
|
6512
|
+
function Vo(a, e, t, r, i, o) {
|
|
6513
|
+
return t.enabled && t.permission & i.helper.LEVEL.Supper ? (L(), x("div", No, [
|
|
6490
6514
|
l("div", {
|
|
6491
6515
|
class: "menu-bar-box",
|
|
6492
|
-
style: F({ position: "absolute", right: i.right + "px", bottom:
|
|
6516
|
+
style: F({ position: "absolute", right: i.right + "px", bottom: t.bottom })
|
|
6493
6517
|
}, [
|
|
6494
6518
|
l("div", Wo, [
|
|
6495
6519
|
l("div", {
|
|
@@ -6499,12 +6523,12 @@ function Uo(t, e, a, r, i, o) {
|
|
|
6499
6523
|
l("div", {
|
|
6500
6524
|
class: M(i.vendor === "i4" ? "menu-icon active" : "menu-icon"),
|
|
6501
6525
|
onClick: e[1] || (e[1] = (n) => i.vendor = "i4")
|
|
6502
|
-
},
|
|
6526
|
+
}, Uo, 2)
|
|
6503
6527
|
])
|
|
6504
6528
|
], 4)
|
|
6505
6529
|
])) : $("", !0);
|
|
6506
6530
|
}
|
|
6507
|
-
const
|
|
6531
|
+
const Zo = /* @__PURE__ */ T(Bo, [["render", Vo], ["__scopeId", "data-v-ab627b83"]]);
|
|
6508
6532
|
const Ho = {
|
|
6509
6533
|
name: "IdmGLV2",
|
|
6510
6534
|
components: {
|
|
@@ -6524,7 +6548,7 @@ const Ho = {
|
|
|
6524
6548
|
IdmWaterTemp: Oi,
|
|
6525
6549
|
IdmTemp: Ki,
|
|
6526
6550
|
IdmArctic: hr,
|
|
6527
|
-
IdmWarZone:
|
|
6551
|
+
IdmWarZone: Ur,
|
|
6528
6552
|
IdmGmdssArea: Hr,
|
|
6529
6553
|
IdmEcaZone: Xr,
|
|
6530
6554
|
IdmAlertZone: eo,
|
|
@@ -6537,7 +6561,7 @@ const Ho = {
|
|
|
6537
6561
|
IdmLatLng: Qe,
|
|
6538
6562
|
IdmMeasure: $o,
|
|
6539
6563
|
IdmPoint: Or,
|
|
6540
|
-
IdmENC:
|
|
6564
|
+
IdmENC: Zo
|
|
6541
6565
|
},
|
|
6542
6566
|
props: {
|
|
6543
6567
|
map: {
|
|
@@ -6581,13 +6605,13 @@ const Ho = {
|
|
|
6581
6605
|
enc: "",
|
|
6582
6606
|
// enc: 'i4',
|
|
6583
6607
|
defaultMeteoToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",
|
|
6584
|
-
helper: new
|
|
6608
|
+
helper: new Gt()
|
|
6585
6609
|
};
|
|
6586
6610
|
},
|
|
6587
6611
|
watch: {
|
|
6588
6612
|
ts: {
|
|
6589
|
-
handler(
|
|
6590
|
-
|
|
6613
|
+
handler(a, e) {
|
|
6614
|
+
a && e && Z(a).utc().format("yyyy-MM-DD HH") !== Z(e).utc().format("yyyy-MM-DD HH") && this.$nextTick(() => {
|
|
6591
6615
|
this.handleDateChange({ tropicals: !1 });
|
|
6592
6616
|
});
|
|
6593
6617
|
},
|
|
@@ -6600,17 +6624,17 @@ const Ho = {
|
|
|
6600
6624
|
immediate: !0
|
|
6601
6625
|
},
|
|
6602
6626
|
enc: {
|
|
6603
|
-
handler(
|
|
6604
|
-
var
|
|
6605
|
-
|
|
6627
|
+
handler(a, e) {
|
|
6628
|
+
var t, r, i, o, n, s, c, h;
|
|
6629
|
+
a ? ((r = (t = this.map) == null ? void 0 : t.getLayer(a)) == 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"));
|
|
6606
6630
|
}
|
|
6607
6631
|
},
|
|
6608
6632
|
activeWeatherLayers: {
|
|
6609
6633
|
handler() {
|
|
6610
|
-
var
|
|
6634
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v;
|
|
6611
6635
|
if (!this.map)
|
|
6612
6636
|
return !1;
|
|
6613
|
-
this.activeWeatherLayers.length > 0 ? ((e = (
|
|
6637
|
+
this.activeWeatherLayers.length > 0 ? ((e = (a = this.map) == null ? void 0 : a.getLayer(this.enc)) == null || e.setLayoutProperty("visibility", "none"), (r = (t = this.map) == null ? void 0 : t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || r.setLayoutProperty("visibility", "visible"), (o = this.map) != null && o.getLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer) && ((n = this.map) != null && n.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((c = this.map) == null || c.moveLayer((s = this.viewport) == null ? void 0 : s.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (d = this.map) != null && d.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((p = this.map) != null && p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((m = this.map) == null || m.moveLayer((f = this.viewport) == null ? void 0 : f.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((y = (b = this.map) == null ? void 0 : b.getLayer(this.enc)) == null || y.setLayoutProperty("visibility", "visible"), (v = (u = this.map) == null ? void 0 : u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || v.setLayoutProperty("visibility", "none"));
|
|
6614
6638
|
},
|
|
6615
6639
|
immediate: !0
|
|
6616
6640
|
}
|
|
@@ -6656,10 +6680,10 @@ const Ho = {
|
|
|
6656
6680
|
// },
|
|
6657
6681
|
},
|
|
6658
6682
|
methods: {
|
|
6659
|
-
async fetchWeatherLayers(
|
|
6683
|
+
async fetchWeatherLayers(a = { tropicals: !1 }) {
|
|
6660
6684
|
var i, o, n, s, c, h, d, p;
|
|
6661
6685
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
6662
|
-
let
|
|
6686
|
+
let t = 0, r = 0;
|
|
6663
6687
|
if (this.map) {
|
|
6664
6688
|
const f = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, m = (o = this.map) == null ? void 0 : o.getBounds(), b = `${m._sw.lng},${m._sw.lat},${m._ne.lng},${m._ne.lat}`;
|
|
6665
6689
|
if (this.handleRampColorState(), this.particleFactor) {
|
|
@@ -6671,13 +6695,13 @@ const Ho = {
|
|
|
6671
6695
|
}
|
|
6672
6696
|
if (this.weatherWeight > 0) {
|
|
6673
6697
|
let y = this.weatherWeight, u;
|
|
6674
|
-
if (
|
|
6698
|
+
if (a.tropicals || this.weatherWeight & 256 && (u = this.weatherLayers.tropicals, u && (y -= 256, u.version = Math.random() + 1)), y > 0) {
|
|
6675
6699
|
const v = await se.get(`${this.gateway}/api/arc/weather/layers/links?l=${y}&v=${this.source}&z=${f}&bbox=${b}&t=${this.ts}`, {
|
|
6676
6700
|
headers: {
|
|
6677
6701
|
Authorization: this.token || this.defaultMeteoToken
|
|
6678
6702
|
}
|
|
6679
6703
|
});
|
|
6680
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e +
|
|
6704
|
+
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + t), console.log("weather links elapsed: ", r, ", total: ", t += r), ((n = v == null ? void 0 : v.data) == null ? void 0 : n.code) === 0) {
|
|
6681
6705
|
const g = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data, w = [];
|
|
6682
6706
|
for (const _ in g)
|
|
6683
6707
|
_ === "ice-edge" && (g[_] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), _ !== "tropicals" && w.push(
|
|
@@ -6693,11 +6717,11 @@ const Ho = {
|
|
|
6693
6717
|
);
|
|
6694
6718
|
const k = await Promise.all(w);
|
|
6695
6719
|
this.weatherLayers = {}, k.map((_) => {
|
|
6696
|
-
var B, W, O,
|
|
6720
|
+
var B, W, O, J;
|
|
6697
6721
|
const D = ((B = _ == null ? void 0 : _.data) == null ? void 0 : B.data) || (_ == null ? void 0 : _.data), A = (O = (W = _ == null ? void 0 : _.config) == null ? void 0 : W.headers) == null ? void 0 : O.key;
|
|
6698
6722
|
A && D && (this.weatherLayers[A] = {
|
|
6699
6723
|
raw: D,
|
|
6700
|
-
type: ((
|
|
6724
|
+
type: ((J = _ == null ? void 0 : _.config) == null ? void 0 : J.responseType) === "blob" ? "image" : "json",
|
|
6701
6725
|
etime: this.ts
|
|
6702
6726
|
});
|
|
6703
6727
|
}), g.tropicals && se.get(g.tropicals, {
|
|
@@ -6718,7 +6742,7 @@ const Ho = {
|
|
|
6718
6742
|
};
|
|
6719
6743
|
});
|
|
6720
6744
|
}
|
|
6721
|
-
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e +
|
|
6745
|
+
if (r = (/* @__PURE__ */ new Date()).valueOf() - (e + t), console.log("weather layers elapsed: ", r, ", total: ", t += r), this.weatherLayers["swell-direction"] || this.weatherLayers["swell-height"]) {
|
|
6722
6746
|
const g = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw, w = (h = this.weatherLayers["swell-height"]) == null ? void 0 : h.raw;
|
|
6723
6747
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
6724
6748
|
type: "json",
|
|
@@ -6743,21 +6767,21 @@ const Ho = {
|
|
|
6743
6767
|
}
|
|
6744
6768
|
this.toggleVersion = Math.random();
|
|
6745
6769
|
},
|
|
6746
|
-
async fetchOtherLayers(
|
|
6747
|
-
var e,
|
|
6770
|
+
async fetchOtherLayers(a = { all: !1, dayNight: !1, enc: !1 }) {
|
|
6771
|
+
var e, t, r, i;
|
|
6748
6772
|
if (this.map) {
|
|
6749
6773
|
let o = this.otherWeight;
|
|
6750
6774
|
if (o) {
|
|
6751
6775
|
let n = !1;
|
|
6752
6776
|
if (this.otherWeight & 2048 && (o = this.otherWeight - 2048, n = !0), o) {
|
|
6753
|
-
if (
|
|
6777
|
+
if (a.all) {
|
|
6754
6778
|
const s = await se.get(`${this.gateway}/api/arc/other/layers/links?l=${o}&t=${this.ts}`, {
|
|
6755
6779
|
headers: {
|
|
6756
6780
|
Authorization: this.token || this.defaultMeteoToken
|
|
6757
6781
|
}
|
|
6758
6782
|
});
|
|
6759
6783
|
if (((e = s == null ? void 0 : s.data) == null ? void 0 : e.code) === 0) {
|
|
6760
|
-
const c = (
|
|
6784
|
+
const c = (t = s == null ? void 0 : s.data) == null ? void 0 : t.data, h = [];
|
|
6761
6785
|
for (const p in c)
|
|
6762
6786
|
h.push(
|
|
6763
6787
|
se.get(c[p], {
|
|
@@ -6774,7 +6798,7 @@ const Ho = {
|
|
|
6774
6798
|
this.otherLayers[m] = f;
|
|
6775
6799
|
});
|
|
6776
6800
|
}
|
|
6777
|
-
} else if (
|
|
6801
|
+
} else if (a.dayNight && o & 1024) {
|
|
6778
6802
|
const s = await se.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`, {
|
|
6779
6803
|
headers: {
|
|
6780
6804
|
Authorization: this.token || this.defaultMeteoToken
|
|
@@ -6806,8 +6830,8 @@ const Ho = {
|
|
|
6806
6830
|
}
|
|
6807
6831
|
},
|
|
6808
6832
|
handleRampColorState() {
|
|
6809
|
-
var
|
|
6810
|
-
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (
|
|
6833
|
+
var a;
|
|
6834
|
+
if (this.showRampColor = !1, this.showWindParticle = !1, this.showCurrentParticle = !1, (a = this.particleFactor) != null && a.particle)
|
|
6811
6835
|
this.showRampColor = !0, this.showWindParticle = this.particleFactor.key === "wind", this.showCurrentParticle = this.particleFactor.key === "current", this.activeWeatherLayers = this.activeWeatherLayers.filter((e) => e.type === "json");
|
|
6812
6836
|
else
|
|
6813
6837
|
for (const e of this.activeWeatherLayers)
|
|
@@ -6815,10 +6839,10 @@ const Ho = {
|
|
|
6815
6839
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
6816
6840
|
},
|
|
6817
6841
|
handleRampColorInitial() {
|
|
6818
|
-
var
|
|
6819
|
-
this.viewport.map.getSource((
|
|
6842
|
+
var a, e, t, r, i, o, n, s, c, h, d, p;
|
|
6843
|
+
this.viewport.map.getSource((a = this.viewport) == null ? void 0 : a.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
6820
6844
|
type: "canvas",
|
|
6821
|
-
canvas: (
|
|
6845
|
+
canvas: (t = this.viewport) == null ? void 0 : t.rampColorCanvas,
|
|
6822
6846
|
animate: !0,
|
|
6823
6847
|
coordinates: this.viewport.getBoundLngLat()
|
|
6824
6848
|
}), this.viewport.map.getLayer((r = this.viewport) == null ? void 0 : r.rampColorLayer) || this.viewport.map.addLayer(
|
|
@@ -6850,8 +6874,8 @@ const Ho = {
|
|
|
6850
6874
|
},
|
|
6851
6875
|
handleDragEndWithZoom4Json() {
|
|
6852
6876
|
var h, d, p, f;
|
|
6853
|
-
const
|
|
6854
|
-
let e = 0,
|
|
6877
|
+
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
6878
|
+
let e = 0, t = 0;
|
|
6855
6879
|
const r = (h = this.map) == null ? void 0 : h.getBounds(), i = this.map.getZoom(), o = Ie(r._sw.lng), n = Ie(r._ne.lng), s = Math.floor(r._sw.lat), c = Math.ceil(r._ne.lat);
|
|
6856
6880
|
for (const m in this.weatherLayers)
|
|
6857
6881
|
if (this.weatherLayers[m].active && this.weatherLayers[m].type === "json") {
|
|
@@ -6882,7 +6906,7 @@ const Ho = {
|
|
|
6882
6906
|
}
|
|
6883
6907
|
});
|
|
6884
6908
|
}
|
|
6885
|
-
if (
|
|
6909
|
+
if (t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("direction elapsed: ", t, ", total: ", e += t), m === "swell") {
|
|
6886
6910
|
const u = this.weatherLayers[m].height;
|
|
6887
6911
|
if (u) {
|
|
6888
6912
|
if (!u.data) {
|
|
@@ -6902,7 +6926,7 @@ const Ho = {
|
|
|
6902
6926
|
const v = this.handleBboxClip(u.data, r);
|
|
6903
6927
|
b = b.concat(v);
|
|
6904
6928
|
}
|
|
6905
|
-
|
|
6929
|
+
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("height elapsed: ", t, ", total: ", e += t);
|
|
6906
6930
|
}
|
|
6907
6931
|
}
|
|
6908
6932
|
if (m === "current") {
|
|
@@ -6922,7 +6946,7 @@ const Ho = {
|
|
|
6922
6946
|
u.data = C.featureCollection(g);
|
|
6923
6947
|
}
|
|
6924
6948
|
const v = i < this.zoom ? u.data.features.filter((g) => g.properties.val > 0.5) : u.data.features;
|
|
6925
|
-
b = b.concat(v),
|
|
6949
|
+
b = b.concat(v), t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("speed elapsed: ", t, ", total: ", e += t);
|
|
6926
6950
|
}
|
|
6927
6951
|
}
|
|
6928
6952
|
} else if (m === "wind") {
|
|
@@ -6948,7 +6972,7 @@ const Ho = {
|
|
|
6948
6972
|
}
|
|
6949
6973
|
});
|
|
6950
6974
|
}
|
|
6951
|
-
|
|
6975
|
+
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("wind barb elapsed: ", t, ", total: ", e += t);
|
|
6952
6976
|
} else if (m === "sig-wave-height") {
|
|
6953
6977
|
if (this.weatherLayers[m].data)
|
|
6954
6978
|
b = this.weatherLayers[m].data;
|
|
@@ -6977,7 +7001,7 @@ const Ho = {
|
|
|
6977
7001
|
b = b.concat(u);
|
|
6978
7002
|
}
|
|
6979
7003
|
}
|
|
6980
|
-
|
|
7004
|
+
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("sigWave elapsed: ", t, ", total: ", e += t);
|
|
6981
7005
|
} else if (m === "prmsl") {
|
|
6982
7006
|
if (this.weatherLayers[m].data)
|
|
6983
7007
|
b = this.weatherLayers[m].data;
|
|
@@ -7006,7 +7030,7 @@ const Ho = {
|
|
|
7006
7030
|
b = b.concat(u);
|
|
7007
7031
|
}
|
|
7008
7032
|
}
|
|
7009
|
-
|
|
7033
|
+
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e), console.log("prmsl elapsed: ", t, ", total: ", e += t);
|
|
7010
7034
|
} else if (m === "arctic" || m === "iceberg") {
|
|
7011
7035
|
if (this.weatherLayers[m].data)
|
|
7012
7036
|
b = this.weatherLayers[m].data;
|
|
@@ -7026,179 +7050,179 @@ const Ho = {
|
|
|
7026
7050
|
b = b.concat(u);
|
|
7027
7051
|
}
|
|
7028
7052
|
}
|
|
7029
|
-
|
|
7053
|
+
t = (/* @__PURE__ */ new Date()).valueOf() - (a + e);
|
|
7030
7054
|
}
|
|
7031
|
-
console.log(m, " elapsed: ",
|
|
7055
|
+
console.log(m, " elapsed: ", t, ", total: ", e += t), b.length && (this.weatherLayers[m].data = C.featureCollection(b)), this.weatherLayers[m].active = !0, this.weatherLayers[m].version = Math.random() + 1;
|
|
7032
7056
|
}
|
|
7033
7057
|
},
|
|
7034
7058
|
handleDragEndWithZoom4Image() {
|
|
7035
|
-
for (const
|
|
7036
|
-
this.weatherLayers[
|
|
7059
|
+
for (const a in this.weatherLayers)
|
|
7060
|
+
this.weatherLayers[a].active && this.weatherLayers[a].type === "image" && (this.weatherLayers[a].active = !0, this.weatherLayers[a].version = Math.random() + 1);
|
|
7037
7061
|
},
|
|
7038
|
-
handleBboxClip(
|
|
7039
|
-
const
|
|
7040
|
-
return
|
|
7062
|
+
handleBboxClip(a, e) {
|
|
7063
|
+
const t = [], r = Ie(e._sw.lng), i = Ie(e._ne.lng);
|
|
7064
|
+
return a.features.forEach((o) => {
|
|
7041
7065
|
if (o.geometry.type !== "Point")
|
|
7042
7066
|
if (r > i) {
|
|
7043
7067
|
let n = [r, e._sw.lat, 180, e._ne.lat], s = C.bboxClip(o, n);
|
|
7044
|
-
s.geometry.coordinates.length &&
|
|
7068
|
+
s.geometry.coordinates.length && t.push(s), n = [-180, e._sw.lat, i, e._ne.lat], s = C.bboxClip(o, n), s.geometry.coordinates.length && t.push(s);
|
|
7045
7069
|
} else {
|
|
7046
7070
|
const n = [r, e._sw.lat, i, e._ne.lat], s = C.bboxClip(o, n);
|
|
7047
|
-
s.geometry.coordinates.length &&
|
|
7071
|
+
s.geometry.coordinates.length && t.push(s);
|
|
7048
7072
|
}
|
|
7049
7073
|
else
|
|
7050
|
-
|
|
7051
|
-
}),
|
|
7074
|
+
t.push(o);
|
|
7075
|
+
}), t;
|
|
7052
7076
|
},
|
|
7053
7077
|
handleWeatherLayerToggle() {
|
|
7054
|
-
var
|
|
7078
|
+
var a;
|
|
7055
7079
|
for (const e in this.weatherLayers)
|
|
7056
7080
|
this.weatherLayers[e].active = !1, this.weatherLayers[e].version = Math.random() + 1;
|
|
7057
7081
|
for (const e of this.activeWeatherLayers) {
|
|
7058
|
-
let
|
|
7059
|
-
|
|
7082
|
+
let t = e.key;
|
|
7083
|
+
t.indexOf("swell") > -1 ? t = "swell" : t.indexOf("current") > -1 && (t = "current"), this.weatherLayers[t] && (this.weatherLayers[t].active = !0, this.weatherLayers[t].version = Math.random() + 1, ((a = this.particleFactor) == null ? void 0 : a.key) === t && this.weatherLayers[`${t}-particle`] && (this.weatherLayers[`${t}-particle`].active = this.particleFactor.particle));
|
|
7060
7084
|
}
|
|
7061
7085
|
this.handleBeforeLayerToggle();
|
|
7062
7086
|
},
|
|
7063
7087
|
handleBeforeLayerToggle() {
|
|
7064
|
-
var
|
|
7065
|
-
(
|
|
7088
|
+
var a, e, t, r, i, o, n, s, c, h, d, p, f;
|
|
7089
|
+
(a = this.map) != null && a.getLayer(this.beforeLayer) && ((e = this.activeWeatherLayers) != null && e.length || (t = this.otherLayers) != null && t["war-zones"] || (r = this.otherLayers) != null && r["gmdss-areas"] || (i = this.otherLayers) != null && i["load-lines"] || (o = this.otherLayers) != null && o["high-risk-area"] || (n = this.otherLayers) != null && n["time-zones"] || (s = this.otherLayers) != null && s.pirates || (c = this.otherLayers) != null && c.ports || (h = this.otherLayers) != null && h.enc || (d = this.otherLayers) != null && d["voluntary-reporting-area"] || (p = this.otherLayers) != null && p["eca-zones"] || (f = this.otherLayers) != null && f["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
7066
7090
|
},
|
|
7067
|
-
handleDateChange(
|
|
7068
|
-
this.fetchWeatherLayers(
|
|
7091
|
+
handleDateChange(a = { tropicals: !1 }) {
|
|
7092
|
+
this.fetchWeatherLayers(a), this.fetchOtherLayers({ dayNight: !0 });
|
|
7069
7093
|
},
|
|
7070
|
-
handleWeatherLayerChange(
|
|
7094
|
+
handleWeatherLayerChange(a, e, t) {
|
|
7071
7095
|
if (!this.map)
|
|
7072
7096
|
setTimeout(() => {
|
|
7073
|
-
this.handleWeatherLayerChange(
|
|
7097
|
+
this.handleWeatherLayerChange(a, e, t);
|
|
7074
7098
|
}, 500);
|
|
7075
7099
|
else {
|
|
7076
7100
|
this.activeWeatherLayers = e;
|
|
7077
7101
|
const r = this.activeWeatherLayers.some((n) => ["wind", "current"].includes(n.key)), i = this.activeWeatherLayers.some((n) => ["png", "jpg"].includes(n.type));
|
|
7078
7102
|
r && !i ? (this.particleFactor = this.activeWeatherLayers.find((n) => ["wind", "current"].includes(n.key)), this.particleFactor.particle = !0) : i && this.particleFactor && (this.particleFactor.particle = !1);
|
|
7079
7103
|
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);
|
|
7080
|
-
this.weatherWeight !== o || this.source !==
|
|
7104
|
+
this.weatherWeight !== o || this.source !== t ? (this.source = t, this.weatherWeight = o, this.fetchWeatherLayers({ tropicals: !1 })) : this.handleWeatherLayerToggle();
|
|
7081
7105
|
}
|
|
7082
7106
|
},
|
|
7083
|
-
handleOtherLayerChange(
|
|
7107
|
+
handleOtherLayerChange(a) {
|
|
7084
7108
|
if (!this.map)
|
|
7085
7109
|
setTimeout(() => {
|
|
7086
|
-
this.handleOtherLayerChange(
|
|
7110
|
+
this.handleOtherLayerChange(a);
|
|
7087
7111
|
}, 500);
|
|
7088
7112
|
else {
|
|
7089
|
-
const e =
|
|
7090
|
-
|
|
7113
|
+
const e = a == null ? void 0 : a.reduce((t, r) => t + (r == null ? void 0 : r.weight), 0);
|
|
7114
|
+
a.find((t) => t.key === "enc") ? this.enc = "i4" : this.enc = "", this.otherWeight != e && (this.otherWeight = e, this.fetchOtherLayers({ all: !0 }));
|
|
7091
7115
|
}
|
|
7092
7116
|
},
|
|
7093
|
-
async handlePointChange(
|
|
7094
|
-
const e = this.ts ?
|
|
7095
|
-
lat:
|
|
7096
|
-
lng:
|
|
7117
|
+
async handlePointChange(a) {
|
|
7118
|
+
const e = this.ts ? Z(this.ts) : Z(), t = {
|
|
7119
|
+
lat: a.lat,
|
|
7120
|
+
lng: a.lng,
|
|
7097
7121
|
ts: e.utc().format(),
|
|
7098
7122
|
wt: !0,
|
|
7099
7123
|
src: this.source
|
|
7100
7124
|
}, r = await se.get(`${this.gateway}/api/arc/meteo/query`, {
|
|
7101
|
-
params:
|
|
7125
|
+
params: t,
|
|
7102
7126
|
headers: {
|
|
7103
7127
|
Authorization: this.token || this.defaultMeteoToken
|
|
7104
7128
|
}
|
|
7105
7129
|
});
|
|
7106
7130
|
(r == null ? void 0 : r.status) === 200 && (this.meteo = {
|
|
7107
7131
|
...r == null ? void 0 : r.data,
|
|
7108
|
-
...
|
|
7132
|
+
...a
|
|
7109
7133
|
});
|
|
7110
7134
|
},
|
|
7111
|
-
handle3dToggle(
|
|
7112
|
-
var e,
|
|
7113
|
-
|
|
7135
|
+
handle3dToggle(a) {
|
|
7136
|
+
var e, t, r, i, o, n, s, c, h, d, p, f, m, b, y, u, v, g, w, k;
|
|
7137
|
+
a ? (this.map.setProjection("globe"), this.mapProjection = "globe", (t = this.map) != null && t.getLayer((e = this.viewport) == null ? void 0 : e.rampColorLayer) && ((r = this.map) != null && r.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((o = this.map) == null || o.moveLayer((i = this.viewport) == null ? void 0 : i.rampColorLayer, this.helper.mapboxCustomer.layers.water.id)), (s = this.map) != null && s.getLayer((n = this.viewport) == null ? void 0 : n.particleLayer) && ((c = this.map) != null && c.getLayer(this.helper.mapboxCustomer.layers.water.id)) && ((d = this.map) == null || d.moveLayer((h = this.viewport) == null ? void 0 : h.particleLayer, this.helper.mapboxCustomer.layers.water.id)), this.map.off("zoomend", this.handleDragEndWithZoom4Json), this.map.off("dragend", this.handleDragEndWithZoom4Json), this.map.off("move", this.handleDragEndWithZoom4Image)) : (this.map.setProjection("mercator"), this.mapProjection = "mercator", this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.handleDragEndWithZoom4Image(), this.handleDragEndWithZoom4Json(), (f = this.map) != null && f.getLayer((p = this.viewport) == null ? void 0 : p.rampColorLayer) && ((m = this.map) != null && m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((y = this.map) == null || y.moveLayer((b = this.viewport) == null ? void 0 : b.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (v = this.map) != null && v.getLayer((u = this.viewport) == null ? void 0 : u.particleLayer) && ((g = this.map) != null && g.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((k = this.map) == null || k.moveLayer((w = this.viewport) == null ? void 0 : w.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
7114
7138
|
},
|
|
7115
|
-
handleParticle(
|
|
7116
|
-
this.particleFactor =
|
|
7139
|
+
handleParticle(a) {
|
|
7140
|
+
this.particleFactor = a, this.fetchWeatherLayers({ tropicals: !1 });
|
|
7117
7141
|
}
|
|
7118
7142
|
}
|
|
7119
|
-
},
|
|
7143
|
+
}, Go = {
|
|
7120
7144
|
key: 0,
|
|
7121
7145
|
className: "map-gl-home"
|
|
7122
7146
|
};
|
|
7123
|
-
function Jo(
|
|
7124
|
-
var ae,
|
|
7125
|
-
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"), f = z("IdmTropicals"), m = z("IdmCurrents"), b = z("IdmCurrentParticle"), y = z("IdmWindBarb"), u = z("IdmWindParticle"), v = z("IdmPrecip3h"), g = z("IdmVisibility"), w = z("IdmWaterTemp"), k = z("IdmTemp"), _ = z("IdmArctic"), D = z("IdmWarZone"), A = z("IdmGmdssArea"), B = z("IdmEcaZone"), W = z("IdmAlertZone"), O = z("IdmPort"),
|
|
7126
|
-
return
|
|
7147
|
+
function Jo(a, e, t, r, i, o) {
|
|
7148
|
+
var ae, X, Y, be, Q, E, U, ve, K, _e, ie, re, oe, ke, ze, Pe, Te, Ee, Ne, Fe, Ue, Ve, Ze, He, Ge, Je;
|
|
7149
|
+
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), d = z("IdmPrmsl"), p = z("IdmIceberg"), f = z("IdmTropicals"), m = z("IdmCurrents"), b = z("IdmCurrentParticle"), y = z("IdmWindBarb"), u = z("IdmWindParticle"), v = z("IdmPrecip3h"), g = z("IdmVisibility"), w = z("IdmWaterTemp"), k = z("IdmTemp"), _ = z("IdmArctic"), D = z("IdmWarZone"), A = z("IdmGmdssArea"), B = z("IdmEcaZone"), W = z("IdmAlertZone"), O = z("IdmPort"), J = z("IdmLoadLine"), de = z("IdmTimezone"), pe = z("IdmVRA"), me = z("IdmSpecialArea"), ue = z("IdmTerminator"), ye = z("IdmLatLng"), fe = z("IdmMeasure"), ge = z("IdmPoint");
|
|
7150
|
+
return t.map ? (L(), x("div", Go, [
|
|
7127
7151
|
P(n, I({
|
|
7128
7152
|
ref: "layer",
|
|
7129
|
-
map:
|
|
7153
|
+
map: t.map,
|
|
7130
7154
|
"toggle-version": i.toggleVersion,
|
|
7131
7155
|
"map-projection": i.mapProjection
|
|
7132
|
-
},
|
|
7156
|
+
}, a.$attrs, {
|
|
7133
7157
|
onWeather: o.handleWeatherLayerChange,
|
|
7134
7158
|
onOther: o.handleOtherLayerChange,
|
|
7135
|
-
onCoordinate: e[0] || (e[0] = (
|
|
7136
|
-
onMeasure: e[1] || (e[1] = (
|
|
7137
|
-
onPoint: e[2] || (e[2] = (
|
|
7159
|
+
onCoordinate: e[0] || (e[0] = (ee) => i.showCoord = ee),
|
|
7160
|
+
onMeasure: e[1] || (e[1] = (ee) => i.showMeasure = ee),
|
|
7161
|
+
onPoint: e[2] || (e[2] = (ee) => i.showPoint = ee),
|
|
7138
7162
|
on3d: o.handle3dToggle,
|
|
7139
|
-
onToggleVersion: e[3] || (e[3] = (
|
|
7163
|
+
onToggleVersion: e[3] || (e[3] = (ee) => i.toggleVersion = ee)
|
|
7140
7164
|
}), null, 16, ["map", "toggle-version", "map-projection", "onWeather", "onOther", "on3d"]),
|
|
7141
7165
|
P(s, I({
|
|
7142
|
-
map:
|
|
7143
|
-
token:
|
|
7166
|
+
map: t.map,
|
|
7167
|
+
token: t.token,
|
|
7144
7168
|
enabled: (ae = i.otherLayers) == null ? void 0 : ae.enc,
|
|
7145
7169
|
"toggle-version": i.toggleVersion
|
|
7146
|
-
},
|
|
7147
|
-
onEnc: e[4] || (e[4] = (
|
|
7170
|
+
}, a.$attrs, {
|
|
7171
|
+
onEnc: e[4] || (e[4] = (ee) => i.enc = ee)
|
|
7148
7172
|
}), null, 16, ["map", "token", "enabled", "toggle-version"]),
|
|
7149
7173
|
P(c, I({
|
|
7150
|
-
map:
|
|
7151
|
-
"sig-wave": (
|
|
7152
|
-
"before-layer":
|
|
7153
|
-
},
|
|
7174
|
+
map: t.map,
|
|
7175
|
+
"sig-wave": (X = i.weatherLayers) == null ? void 0 : X["sig-wave-height"],
|
|
7176
|
+
"before-layer": t.beforeLayer
|
|
7177
|
+
}, a.$attrs), null, 16, ["map", "sig-wave", "before-layer"]),
|
|
7154
7178
|
P(h, I({
|
|
7155
|
-
map:
|
|
7156
|
-
swell: (
|
|
7157
|
-
"before-layer":
|
|
7158
|
-
},
|
|
7179
|
+
map: t.map,
|
|
7180
|
+
swell: (Y = i.weatherLayers) == null ? void 0 : Y.swell,
|
|
7181
|
+
"before-layer": t.beforeLayer
|
|
7182
|
+
}, a.$attrs), null, 16, ["map", "swell", "before-layer"]),
|
|
7159
7183
|
P(d, I({
|
|
7160
|
-
map:
|
|
7184
|
+
map: t.map,
|
|
7161
7185
|
prmsl: (be = i.weatherLayers) == null ? void 0 : be.prmsl,
|
|
7162
|
-
"before-layer":
|
|
7186
|
+
"before-layer": t.beforeLayer,
|
|
7163
7187
|
"active-weather-layers": i.activeWeatherLayers
|
|
7164
|
-
},
|
|
7188
|
+
}, a.$attrs), null, 16, ["map", "prmsl", "before-layer", "active-weather-layers"]),
|
|
7165
7189
|
P(p, I({
|
|
7166
|
-
map:
|
|
7167
|
-
iceberg: (
|
|
7168
|
-
"before-layer":
|
|
7169
|
-
},
|
|
7190
|
+
map: t.map,
|
|
7191
|
+
iceberg: (Q = i.weatherLayers) == null ? void 0 : Q.iceberg,
|
|
7192
|
+
"before-layer": t.beforeLayer
|
|
7193
|
+
}, a.$attrs), null, 16, ["map", "iceberg", "before-layer"]),
|
|
7170
7194
|
P(f, I({
|
|
7171
|
-
map:
|
|
7172
|
-
date:
|
|
7195
|
+
map: t.map,
|
|
7196
|
+
date: t.ts,
|
|
7173
7197
|
tropicals: (E = i.weatherLayers) == null ? void 0 : E.tropicals,
|
|
7174
|
-
"before-layer":
|
|
7175
|
-
},
|
|
7198
|
+
"before-layer": t.beforeLayer
|
|
7199
|
+
}, a.$attrs), null, 16, ["map", "date", "tropicals", "before-layer"]),
|
|
7176
7200
|
P(m, I({
|
|
7177
|
-
map:
|
|
7201
|
+
map: t.map,
|
|
7178
7202
|
"map-projection": i.mapProjection,
|
|
7179
|
-
current: (
|
|
7180
|
-
"before-layer":
|
|
7203
|
+
current: (U = i.weatherLayers) == null ? void 0 : U.current,
|
|
7204
|
+
"before-layer": t.beforeLayer,
|
|
7181
7205
|
"show-particle": i.showCurrentParticle,
|
|
7182
7206
|
"margin-bottom": i.activeWindLayer ? i.showRampColor ? "84px" : "56px" : i.showRampColor ? "56px" : "30px",
|
|
7183
7207
|
"toggle-version": i.toggleVersion,
|
|
7184
7208
|
"weather-layers": i.weatherLayers
|
|
7185
|
-
},
|
|
7209
|
+
}, a.$attrs, { onParticle: o.handleParticle }), null, 16, ["map", "map-projection", "current", "before-layer", "show-particle", "margin-bottom", "toggle-version", "weather-layers", "onParticle"]),
|
|
7186
7210
|
P(b, I({
|
|
7187
7211
|
viewport: i.viewport,
|
|
7188
7212
|
factor: (ve = i.weatherLayers) == null ? void 0 : ve["current-particle"],
|
|
7189
|
-
"before-layer":
|
|
7213
|
+
"before-layer": t.beforeLayer,
|
|
7190
7214
|
"toggle-version": i.toggleVersion
|
|
7191
|
-
},
|
|
7215
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7192
7216
|
P(y, I({
|
|
7193
7217
|
ref: "windBarb",
|
|
7194
|
-
map:
|
|
7218
|
+
map: t.map,
|
|
7195
7219
|
"map-projection": i.mapProjection,
|
|
7196
|
-
wind: (
|
|
7220
|
+
wind: (K = i.weatherLayers) == null ? void 0 : K.wind,
|
|
7197
7221
|
current: (_e = i.weatherLayers) == null ? void 0 : _e.current,
|
|
7198
|
-
"before-layer":
|
|
7222
|
+
"before-layer": t.beforeLayer,
|
|
7199
7223
|
"margin-bottom": i.showRampColor ? "56px" : "30px",
|
|
7200
7224
|
"show-particle": i.showWindParticle
|
|
7201
|
-
},
|
|
7225
|
+
}, a.$attrs, {
|
|
7202
7226
|
"toggle-version": i.toggleVersion,
|
|
7203
7227
|
"weather-layers": i.weatherLayers,
|
|
7204
7228
|
onParticle: o.handleParticle
|
|
@@ -7206,115 +7230,115 @@ function Jo(t, e, a, r, i, o) {
|
|
|
7206
7230
|
P(u, I({
|
|
7207
7231
|
viewport: i.viewport,
|
|
7208
7232
|
factor: (ie = i.weatherLayers) == null ? void 0 : ie["wind-particle"],
|
|
7209
|
-
"before-layer":
|
|
7233
|
+
"before-layer": t.beforeLayer,
|
|
7210
7234
|
"toggle-version": i.toggleVersion
|
|
7211
|
-
},
|
|
7235
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7212
7236
|
P(v, I({
|
|
7213
7237
|
viewport: i.viewport,
|
|
7214
7238
|
factor: (re = i.weatherLayers) == null ? void 0 : re.precip3h,
|
|
7215
|
-
"before-layer":
|
|
7239
|
+
"before-layer": t.beforeLayer,
|
|
7216
7240
|
"toggle-version": i.toggleVersion
|
|
7217
|
-
},
|
|
7241
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7218
7242
|
P(g, I({
|
|
7219
7243
|
viewport: i.viewport,
|
|
7220
7244
|
factor: (oe = i.weatherLayers) == null ? void 0 : oe.visibility,
|
|
7221
|
-
"before-layer":
|
|
7245
|
+
"before-layer": t.beforeLayer,
|
|
7222
7246
|
"toggle-version": i.toggleVersion
|
|
7223
|
-
},
|
|
7247
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7224
7248
|
P(w, I({
|
|
7225
7249
|
viewport: i.viewport,
|
|
7226
7250
|
factor: (ke = i.weatherLayers) == null ? void 0 : ke["water-temp"],
|
|
7227
|
-
"before-layer":
|
|
7251
|
+
"before-layer": t.beforeLayer,
|
|
7228
7252
|
"toggle-version": i.toggleVersion
|
|
7229
|
-
},
|
|
7253
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7230
7254
|
P(k, I({
|
|
7231
7255
|
viewport: i.viewport,
|
|
7232
7256
|
factor: (ze = i.weatherLayers) == null ? void 0 : ze.temp,
|
|
7233
|
-
"before-layer":
|
|
7257
|
+
"before-layer": t.beforeLayer,
|
|
7234
7258
|
"toggle-version": i.toggleVersion
|
|
7235
|
-
},
|
|
7259
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7236
7260
|
P(_, I({
|
|
7237
7261
|
viewport: i.viewport,
|
|
7238
7262
|
factor: (Pe = i.weatherLayers) == null ? void 0 : Pe.arctic,
|
|
7239
|
-
"before-layer":
|
|
7263
|
+
"before-layer": t.beforeLayer,
|
|
7240
7264
|
"toggle-version": i.toggleVersion
|
|
7241
|
-
},
|
|
7265
|
+
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7242
7266
|
P(D, I({
|
|
7243
|
-
map:
|
|
7267
|
+
map: t.map,
|
|
7244
7268
|
zone: (Te = i.otherLayers) == null ? void 0 : Te["war-zones"],
|
|
7245
|
-
"before-layer":
|
|
7246
|
-
},
|
|
7269
|
+
"before-layer": t.beforeLayer
|
|
7270
|
+
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7247
7271
|
P(A, I({
|
|
7248
|
-
map:
|
|
7272
|
+
map: t.map,
|
|
7249
7273
|
area: (Ee = i.otherLayers) == null ? void 0 : Ee["gmdss-areas"],
|
|
7250
|
-
"before-layer":
|
|
7251
|
-
},
|
|
7274
|
+
"before-layer": t.beforeLayer
|
|
7275
|
+
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7252
7276
|
P(B, I({
|
|
7253
|
-
map:
|
|
7277
|
+
map: t.map,
|
|
7254
7278
|
zone: (Ne = i.otherLayers) == null ? void 0 : Ne["eca-zones"],
|
|
7255
|
-
"before-layer":
|
|
7256
|
-
},
|
|
7279
|
+
"before-layer": t.beforeLayer
|
|
7280
|
+
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7257
7281
|
P(W, I({
|
|
7258
|
-
map:
|
|
7282
|
+
map: t.map,
|
|
7259
7283
|
zone: (Fe = i.otherLayers) == null ? void 0 : Fe["alert-zones"],
|
|
7260
|
-
"before-layer":
|
|
7261
|
-
},
|
|
7284
|
+
"before-layer": t.beforeLayer
|
|
7285
|
+
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7262
7286
|
P(O, I({
|
|
7263
|
-
map:
|
|
7264
|
-
port: (
|
|
7265
|
-
"before-layer":
|
|
7266
|
-
},
|
|
7267
|
-
P(
|
|
7268
|
-
map:
|
|
7269
|
-
line: (
|
|
7270
|
-
"before-layer":
|
|
7271
|
-
},
|
|
7287
|
+
map: t.map,
|
|
7288
|
+
port: (Ue = i.otherLayers) == null ? void 0 : Ue.ports,
|
|
7289
|
+
"before-layer": t.beforeLayer
|
|
7290
|
+
}, a.$attrs), null, 16, ["map", "port", "before-layer"]),
|
|
7291
|
+
P(J, I({
|
|
7292
|
+
map: t.map,
|
|
7293
|
+
line: (Ve = i.otherLayers) == null ? void 0 : Ve["load-lines"],
|
|
7294
|
+
"before-layer": t.beforeLayer
|
|
7295
|
+
}, a.$attrs), null, 16, ["map", "line", "before-layer"]),
|
|
7272
7296
|
P(de, I({
|
|
7273
|
-
map:
|
|
7274
|
-
zone: (
|
|
7275
|
-
"before-layer":
|
|
7276
|
-
},
|
|
7297
|
+
map: t.map,
|
|
7298
|
+
zone: (Ze = i.otherLayers) == null ? void 0 : Ze["time-zones"],
|
|
7299
|
+
"before-layer": t.beforeLayer
|
|
7300
|
+
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7277
7301
|
P(pe, I({
|
|
7278
|
-
map:
|
|
7302
|
+
map: t.map,
|
|
7279
7303
|
area: (He = i.otherLayers) == null ? void 0 : He["voluntary-reporting-area"],
|
|
7280
|
-
"before-layer":
|
|
7281
|
-
},
|
|
7304
|
+
"before-layer": t.beforeLayer
|
|
7305
|
+
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7282
7306
|
P(me, I({
|
|
7283
|
-
map:
|
|
7284
|
-
area: (
|
|
7285
|
-
"before-layer":
|
|
7286
|
-
},
|
|
7307
|
+
map: t.map,
|
|
7308
|
+
area: (Ge = i.otherLayers) == null ? void 0 : Ge["special-area"],
|
|
7309
|
+
"before-layer": t.beforeLayer
|
|
7310
|
+
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7287
7311
|
P(ue, I({
|
|
7288
|
-
map:
|
|
7312
|
+
map: t.map,
|
|
7289
7313
|
area: (Je = i.otherLayers) == null ? void 0 : Je["day-night"]
|
|
7290
|
-
},
|
|
7314
|
+
}, a.$attrs), null, 16, ["map", "area"]),
|
|
7291
7315
|
P(ye, I({
|
|
7292
|
-
map:
|
|
7316
|
+
map: t.map,
|
|
7293
7317
|
show: i.showCoord,
|
|
7294
7318
|
"toggle-version": i.toggleVersion
|
|
7295
|
-
},
|
|
7319
|
+
}, a.$attrs), null, 16, ["map", "show", "toggle-version"]),
|
|
7296
7320
|
P(fe, I({
|
|
7297
|
-
map:
|
|
7321
|
+
map: t.map,
|
|
7298
7322
|
show: i.showMeasure
|
|
7299
|
-
},
|
|
7323
|
+
}, a.$attrs), null, 16, ["map", "show"]),
|
|
7300
7324
|
P(ge, I({
|
|
7301
|
-
map:
|
|
7325
|
+
map: t.map,
|
|
7302
7326
|
show: i.showPoint,
|
|
7303
7327
|
meteo: i.meteo
|
|
7304
|
-
},
|
|
7328
|
+
}, a.$attrs, { onPoint: o.handlePointChange }), null, 16, ["map", "show", "meteo", "onPoint"])
|
|
7305
7329
|
])) : $("", !0);
|
|
7306
7330
|
}
|
|
7307
7331
|
const Xo = /* @__PURE__ */ T(Ho, [["render", Jo]]), rs = {
|
|
7308
|
-
install(
|
|
7309
|
-
|
|
7332
|
+
install(a) {
|
|
7333
|
+
a.component("MapboxGL", Xo), a.component("TropicalGL", Ye), a.component("LatLngGL", Qe);
|
|
7310
7334
|
}
|
|
7311
7335
|
};
|
|
7312
7336
|
export {
|
|
7313
7337
|
Qe as LatLngGL,
|
|
7314
7338
|
Xo as MapboxGL,
|
|
7315
7339
|
rs as MapboxGLPlugin,
|
|
7316
|
-
|
|
7317
|
-
|
|
7340
|
+
Gt as MapboxHelper,
|
|
7341
|
+
V as ParticleSchema,
|
|
7318
7342
|
Ye as TropicalGL,
|
|
7319
7343
|
Oe as Viewport,
|
|
7320
7344
|
we as WebGL,
|