@idmwx/idmui-gl3 4.4.0 → 4.4.2
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 +992 -541
- package/dist/index.umd.cjs +13 -13
- package/dist/mapbox/src/components/layer.vue.d.ts +1 -9
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,20 +1,486 @@
|
|
|
1
1
|
var $e = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var I = (a, e, t) => (
|
|
4
|
-
import {
|
|
5
|
-
import { resolveComponent as z, openBlock as x, createElementBlock as _, createElementVNode as l, normalizeStyle as F, normalizeClass as M, Fragment as xe, renderList as _e, toDisplayString as S, createVNode as P, withCtx as Ve, createTextVNode as Oe, createCommentVNode as B, withDirectives as Se, createStaticVNode as Ue, vShow as ke, mergeProps as E } from "vue";
|
|
2
|
+
var Ve = (a, e, t) => e in a ? $e(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var I = (a, e, t) => (Ve(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { resolveComponent as z, openBlock as x, createElementBlock as _, createElementVNode as l, normalizeStyle as $, normalizeClass as j, Fragment as xe, renderList as ke, toDisplayString as k, createVNode as P, withCtx as Ue, createTextVNode as Ne, createCommentVNode as B, withDirectives as Se, createStaticVNode as Ze, vShow as ze, mergeProps as E } from "vue";
|
|
6
5
|
import * as C from "@turf/turf";
|
|
7
|
-
import
|
|
6
|
+
import He from "@mapbox/sphericalmercator";
|
|
8
7
|
import Z from "moment";
|
|
9
8
|
import Q from "mapbox-gl";
|
|
10
|
-
import { TropicalHelper as
|
|
9
|
+
import { TropicalHelper as We, LngLatHelper as D, LaneHelper as q } from "@idm-plugin/geo";
|
|
11
10
|
import ie from "axios";
|
|
11
|
+
var Ge = Object.defineProperty, Je = (a, e, t) => e in a ? Ge(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, fe = (a, e, t) => (Je(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
12
|
+
class _e {
|
|
13
|
+
}
|
|
14
|
+
fe(_e, "LEVEL", {
|
|
15
|
+
Basic: 1,
|
|
16
|
+
Prime: 2,
|
|
17
|
+
Supper: 1024
|
|
18
|
+
});
|
|
19
|
+
class Ce {
|
|
20
|
+
}
|
|
21
|
+
fe(Ce, "WEATHER_LAYERS", [
|
|
22
|
+
{
|
|
23
|
+
weight: 1,
|
|
24
|
+
name: "Wind",
|
|
25
|
+
key: "wind",
|
|
26
|
+
h5: !0,
|
|
27
|
+
enabled: !0,
|
|
28
|
+
type: "json",
|
|
29
|
+
particle: !0
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
weight: 524288,
|
|
33
|
+
name: "Wind Particle",
|
|
34
|
+
key: "wind-particle",
|
|
35
|
+
peer: {
|
|
36
|
+
weight: 1,
|
|
37
|
+
key: "wind"
|
|
38
|
+
},
|
|
39
|
+
enabled: !0,
|
|
40
|
+
hide: !0,
|
|
41
|
+
type: "jpg"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
weight: 16,
|
|
45
|
+
name: "Sig Waves",
|
|
46
|
+
key: "sig-wave-height",
|
|
47
|
+
h5: !0,
|
|
48
|
+
enabled: !0,
|
|
49
|
+
type: "json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
weight: 4194304,
|
|
53
|
+
name: "Sig Waves (JPG)",
|
|
54
|
+
key: "sig-wave",
|
|
55
|
+
peer: {
|
|
56
|
+
weight: 16,
|
|
57
|
+
key: "sig-wave"
|
|
58
|
+
},
|
|
59
|
+
enabled: !0,
|
|
60
|
+
hide: !0,
|
|
61
|
+
type: "jpg"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
weight: 8388608,
|
|
65
|
+
name: "Sig Waves (Contour)",
|
|
66
|
+
key: "sig-wave-height-contour",
|
|
67
|
+
peer: {
|
|
68
|
+
weight: 16,
|
|
69
|
+
key: "sig-wave-contour"
|
|
70
|
+
},
|
|
71
|
+
enabled: !0,
|
|
72
|
+
hide: !0,
|
|
73
|
+
type: "json"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
weight: 96,
|
|
77
|
+
name: "Current",
|
|
78
|
+
key: "current",
|
|
79
|
+
vendor: "cmems",
|
|
80
|
+
merge: !0,
|
|
81
|
+
h5: !0,
|
|
82
|
+
enabled: !0,
|
|
83
|
+
type: "json"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
weight: 1048576,
|
|
87
|
+
name: "Current Particle",
|
|
88
|
+
key: "current-particle",
|
|
89
|
+
vendor: "cmems",
|
|
90
|
+
peer: {
|
|
91
|
+
weight: 96,
|
|
92
|
+
key: "current"
|
|
93
|
+
},
|
|
94
|
+
enabled: !0,
|
|
95
|
+
hide: !0,
|
|
96
|
+
type: "jpg"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
weight: 256,
|
|
100
|
+
name: "Tropicals",
|
|
101
|
+
key: "tropicals",
|
|
102
|
+
h5: !0,
|
|
103
|
+
enabled: !0,
|
|
104
|
+
type: "json"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
weight: 4096,
|
|
108
|
+
name: "Pressure",
|
|
109
|
+
h5: !0,
|
|
110
|
+
key: "prmsl",
|
|
111
|
+
enabled: !0,
|
|
112
|
+
type: "json"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
weight: 8192,
|
|
116
|
+
name: "Visibility",
|
|
117
|
+
vendor: "gfs",
|
|
118
|
+
key: "visibility",
|
|
119
|
+
h5: !0,
|
|
120
|
+
enabled: !0,
|
|
121
|
+
type: "jpg"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
weight: 262144,
|
|
125
|
+
name: "Precip Acc",
|
|
126
|
+
key: "precip3h",
|
|
127
|
+
h5: !0,
|
|
128
|
+
enabled: !0,
|
|
129
|
+
type: "jpg"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
weight: 6,
|
|
133
|
+
name: "Swell",
|
|
134
|
+
key: "swell",
|
|
135
|
+
merge: !0,
|
|
136
|
+
h5: !0,
|
|
137
|
+
enabled: !0,
|
|
138
|
+
type: "json"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
weight: 2,
|
|
142
|
+
name: "Swell Height",
|
|
143
|
+
key: "swell-height",
|
|
144
|
+
partly: !0,
|
|
145
|
+
enabled: !0,
|
|
146
|
+
type: "json"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
weight: 4,
|
|
150
|
+
name: "Swell Direction",
|
|
151
|
+
key: "swell-direction",
|
|
152
|
+
partly: !0,
|
|
153
|
+
enabled: !0,
|
|
154
|
+
type: "json"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
weight: 32,
|
|
158
|
+
name: "Current Direction",
|
|
159
|
+
key: "current-direction",
|
|
160
|
+
vendor: "cmems",
|
|
161
|
+
partly: !0,
|
|
162
|
+
enabled: !0,
|
|
163
|
+
type: "json"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
weight: 64,
|
|
167
|
+
name: "Current Speed",
|
|
168
|
+
key: "current-speed",
|
|
169
|
+
vendor: "cmems",
|
|
170
|
+
partly: !0,
|
|
171
|
+
enabled: !0,
|
|
172
|
+
type: "json"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
weight: 512,
|
|
176
|
+
name: "Pressure Contour",
|
|
177
|
+
key: "prmsl-contour",
|
|
178
|
+
partly: !0,
|
|
179
|
+
enabled: !0,
|
|
180
|
+
hide: !0,
|
|
181
|
+
type: "json"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
weight: 1024,
|
|
185
|
+
name: "Pressure Value",
|
|
186
|
+
key: "prmsl-value",
|
|
187
|
+
partly: !0,
|
|
188
|
+
enabled: !0,
|
|
189
|
+
hide: !0,
|
|
190
|
+
type: "json"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
weight: 2048,
|
|
194
|
+
name: "Pressure Front",
|
|
195
|
+
key: "prmsl-front",
|
|
196
|
+
partly: !0,
|
|
197
|
+
enabled: !0,
|
|
198
|
+
hide: !0,
|
|
199
|
+
type: "json"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
weight: 16384,
|
|
203
|
+
name: "Iceberg",
|
|
204
|
+
key: "iceberg",
|
|
205
|
+
vendor: "cmems",
|
|
206
|
+
hide: !0,
|
|
207
|
+
enabled: !1,
|
|
208
|
+
type: "json"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
weight: 32768,
|
|
212
|
+
name: "Struct Ice",
|
|
213
|
+
key: "struct-ice",
|
|
214
|
+
vendor: "cmems",
|
|
215
|
+
enabled: !1,
|
|
216
|
+
hide: !0,
|
|
217
|
+
type: "json"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
weight: 65536,
|
|
221
|
+
name: "Ice Edge",
|
|
222
|
+
key: "arctic",
|
|
223
|
+
vendor: "cmems",
|
|
224
|
+
h5: !0,
|
|
225
|
+
enabled: !0,
|
|
226
|
+
type: "jpg"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
weight: 131072,
|
|
230
|
+
name: "Sea Surf. Temp.",
|
|
231
|
+
key: "water-temp",
|
|
232
|
+
vendor: "cmems",
|
|
233
|
+
h5: !0,
|
|
234
|
+
enabled: !0,
|
|
235
|
+
type: "jpg"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
weight: 2097152,
|
|
239
|
+
name: "Temp.",
|
|
240
|
+
key: "temp",
|
|
241
|
+
h5: !0,
|
|
242
|
+
enabled: !0,
|
|
243
|
+
type: "jpg"
|
|
244
|
+
}
|
|
245
|
+
]), // 其它图层
|
|
246
|
+
fe(Ce, "OTHER_LAYERS", [
|
|
247
|
+
{
|
|
248
|
+
weight: 1,
|
|
249
|
+
name: "War Zones",
|
|
250
|
+
key: "war-zones",
|
|
251
|
+
h5: !0,
|
|
252
|
+
enabled: !0,
|
|
253
|
+
type: "json"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
weight: 2,
|
|
257
|
+
name: "GMDSS Areas",
|
|
258
|
+
key: "gmdss-areas",
|
|
259
|
+
h5: !0,
|
|
260
|
+
enabled: !0,
|
|
261
|
+
type: "json"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
weight: 4,
|
|
265
|
+
name: "ECA Zones",
|
|
266
|
+
key: "eca-zones",
|
|
267
|
+
h5: !0,
|
|
268
|
+
enabled: !0,
|
|
269
|
+
type: "json"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
weight: 8,
|
|
273
|
+
name: "Load Lines",
|
|
274
|
+
key: "load-lines",
|
|
275
|
+
h5: !0,
|
|
276
|
+
enabled: !0,
|
|
277
|
+
type: "json"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
weight: 16,
|
|
281
|
+
name: "HRA",
|
|
282
|
+
key: "high-risk-area",
|
|
283
|
+
enabled: !1,
|
|
284
|
+
type: "json"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
weight: 32,
|
|
288
|
+
name: "Pirates",
|
|
289
|
+
key: "pirates",
|
|
290
|
+
enabled: !1,
|
|
291
|
+
type: "json"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
weight: 4096,
|
|
295
|
+
name: "Alert Zones",
|
|
296
|
+
key: "alert-zones",
|
|
297
|
+
h5: !0,
|
|
298
|
+
enabled: !0,
|
|
299
|
+
type: "json"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
weight: 64,
|
|
303
|
+
name: "Ports",
|
|
304
|
+
key: "ports",
|
|
305
|
+
h5: !0,
|
|
306
|
+
enabled: !0,
|
|
307
|
+
type: "json"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
weight: 128,
|
|
311
|
+
name: "Time Zones",
|
|
312
|
+
key: "time-zones",
|
|
313
|
+
h5: !0,
|
|
314
|
+
enabled: !0,
|
|
315
|
+
type: "json"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
weight: 256,
|
|
319
|
+
name: "VRA",
|
|
320
|
+
key: "voluntary-reporting-area",
|
|
321
|
+
h5: !0,
|
|
322
|
+
enabled: !0,
|
|
323
|
+
type: "json"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
weight: 512,
|
|
327
|
+
name: "Special Areas",
|
|
328
|
+
key: "special-area",
|
|
329
|
+
h5: !0,
|
|
330
|
+
enabled: !0,
|
|
331
|
+
type: "json"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
weight: 1024,
|
|
335
|
+
name: "Day/Night",
|
|
336
|
+
key: "day-night",
|
|
337
|
+
h5: !0,
|
|
338
|
+
enabled: !0,
|
|
339
|
+
type: "json"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
weight: 2048,
|
|
343
|
+
name: "ENC",
|
|
344
|
+
key: "enc",
|
|
345
|
+
h5: !0,
|
|
346
|
+
enabled: !0,
|
|
347
|
+
type: "origin"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
weight: 8192,
|
|
351
|
+
name: "World-12nm",
|
|
352
|
+
key: "world12nm",
|
|
353
|
+
h5: !1,
|
|
354
|
+
enabled: !0,
|
|
355
|
+
type: "origin"
|
|
356
|
+
}
|
|
357
|
+
]);
|
|
358
|
+
class Te {
|
|
359
|
+
}
|
|
360
|
+
fe(Te, "WEATHER_TAG", [
|
|
361
|
+
{
|
|
362
|
+
weight: 4,
|
|
363
|
+
// 2^2
|
|
364
|
+
name: "Adverse Weather Dangerous",
|
|
365
|
+
// 恶劣天气级别, 危险的
|
|
366
|
+
key: "DANGEROUS",
|
|
367
|
+
positive: !0
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
weight: 2,
|
|
371
|
+
// 2^1
|
|
372
|
+
name: "Adverse Weather Severe",
|
|
373
|
+
// 恶劣天气级别, 糟糕的
|
|
374
|
+
key: "SEVERE",
|
|
375
|
+
positive: !0
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
weight: 1,
|
|
379
|
+
// 2^0
|
|
380
|
+
name: "Adverse Weather Heavy",
|
|
381
|
+
// 恶劣天气级别, 严重的
|
|
382
|
+
key: "HEAVY",
|
|
383
|
+
positive: !0
|
|
384
|
+
}
|
|
385
|
+
]), // 航行相关标签, 2^11 <= weight <= 2^20
|
|
386
|
+
fe(Te, "SAILING_TAG", [
|
|
387
|
+
{
|
|
388
|
+
weight: 2048,
|
|
389
|
+
// 2^11
|
|
390
|
+
name: "Deviation",
|
|
391
|
+
// 偏航
|
|
392
|
+
key: "deviation",
|
|
393
|
+
positive: !0
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
weight: 4096,
|
|
397
|
+
// 2^12
|
|
398
|
+
name: "Stoppage",
|
|
399
|
+
// 停航
|
|
400
|
+
key: "stoppage",
|
|
401
|
+
positive: !0
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
weight: 8192,
|
|
405
|
+
// 2^13
|
|
406
|
+
name: "Deceleration",
|
|
407
|
+
// 减速
|
|
408
|
+
key: "deceleration",
|
|
409
|
+
positive: !0
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
weight: 16384,
|
|
413
|
+
// 2^14
|
|
414
|
+
name: "No Lane",
|
|
415
|
+
// 无航线
|
|
416
|
+
key: "noLane",
|
|
417
|
+
positive: !0
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
weight: 32768,
|
|
421
|
+
// 2^15
|
|
422
|
+
name: "No Noon",
|
|
423
|
+
// 没有船报
|
|
424
|
+
key: "noNoon",
|
|
425
|
+
positive: !0
|
|
426
|
+
}
|
|
427
|
+
]), // 其他标签, 2^21 <= weight <= 2^31
|
|
428
|
+
fe(Te, "OTHER_TAG", [
|
|
429
|
+
{
|
|
430
|
+
weight: 2097152,
|
|
431
|
+
// 2^21
|
|
432
|
+
name: "No CP",
|
|
433
|
+
// 没有cp
|
|
434
|
+
key: "noCp",
|
|
435
|
+
positive: !0
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
weight: 4194304,
|
|
439
|
+
// 2^22
|
|
440
|
+
name: "Send Rpt",
|
|
441
|
+
// 已发送 route report
|
|
442
|
+
key: "sendRpt",
|
|
443
|
+
positive: !1
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
weight: 8388608,
|
|
447
|
+
// 2^23
|
|
448
|
+
name: "Send Bps",
|
|
449
|
+
// 已发送 Bps
|
|
450
|
+
key: "sendBps",
|
|
451
|
+
positive: !1
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
weight: 16777216,
|
|
455
|
+
// 2^24
|
|
456
|
+
name: "Send Pvar",
|
|
457
|
+
// 已发送PvarK
|
|
458
|
+
key: "sendPvar",
|
|
459
|
+
positive: !1
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
weight: 33554432,
|
|
463
|
+
// 2^25
|
|
464
|
+
name: "Checked",
|
|
465
|
+
// 已经check的航次
|
|
466
|
+
key: "checked",
|
|
467
|
+
positive: !1
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
weight: 67108864,
|
|
471
|
+
// 2^26
|
|
472
|
+
name: "Send PWFR",
|
|
473
|
+
// 已经check的航次
|
|
474
|
+
key: "sendPwfr",
|
|
475
|
+
positive: !1
|
|
476
|
+
}
|
|
477
|
+
]);
|
|
12
478
|
const T = (a, e) => {
|
|
13
479
|
const t = a.__vccOpts || a;
|
|
14
480
|
for (const [r, i] of e)
|
|
15
481
|
t[r] = i;
|
|
16
482
|
return t;
|
|
17
|
-
},
|
|
483
|
+
}, Xe = {
|
|
18
484
|
name: "IdmGlLayer",
|
|
19
485
|
props: {
|
|
20
486
|
map: {
|
|
@@ -27,7 +493,7 @@ const T = (a, e) => {
|
|
|
27
493
|
type: Number,
|
|
28
494
|
default: 60
|
|
29
495
|
},
|
|
30
|
-
|
|
496
|
+
layerToggle: {
|
|
31
497
|
type: Boolean,
|
|
32
498
|
default: !1
|
|
33
499
|
},
|
|
@@ -39,18 +505,17 @@ const T = (a, e) => {
|
|
|
39
505
|
default: void 0
|
|
40
506
|
}
|
|
41
507
|
},
|
|
42
|
-
emits: ["weather", "other", "coordinate", "measure", "point", "3d", "
|
|
508
|
+
emits: ["weather", "other", "coordinate", "measure", "point", "3d", "layerToggle", "handleToggleVersion"],
|
|
43
509
|
data() {
|
|
44
510
|
return {
|
|
45
|
-
showLayers: !1,
|
|
46
511
|
source: "",
|
|
47
512
|
weatherLayers: [],
|
|
48
513
|
activeWeatherLayers: [],
|
|
49
514
|
autoActive: !0,
|
|
50
515
|
otherLayers: [],
|
|
51
516
|
layers: {
|
|
52
|
-
weather: [...
|
|
53
|
-
other: [...
|
|
517
|
+
weather: [...Ce.WEATHER_LAYERS],
|
|
518
|
+
other: [...Ce.OTHER_LAYERS.filter((a) => a.key !== "world12nm")]
|
|
54
519
|
},
|
|
55
520
|
weatherLayersCache: "weatherLayersCache",
|
|
56
521
|
autoActiveCache: "autoActiveCache",
|
|
@@ -77,20 +542,6 @@ const T = (a, e) => {
|
|
|
77
542
|
}
|
|
78
543
|
},
|
|
79
544
|
watch: {
|
|
80
|
-
showLayers: {
|
|
81
|
-
handler() {
|
|
82
|
-
this.$nextTick(() => {
|
|
83
|
-
this.$emit("menu", this.showLayers ? !1 : this.toggleMenu), this.$emit("handleToggleVersion");
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
toggleMenu: {
|
|
88
|
-
handler() {
|
|
89
|
-
this.$nextTick(() => {
|
|
90
|
-
this.showLayers = this.toggleMenu ? !1 : this.showLayers, this.$emit("handleToggleVersion");
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
545
|
toggleVersion: {
|
|
95
546
|
handler() {
|
|
96
547
|
this.$nextTick(() => {
|
|
@@ -138,7 +589,7 @@ const T = (a, e) => {
|
|
|
138
589
|
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);
|
|
139
590
|
},
|
|
140
591
|
handleMenuToggle() {
|
|
141
|
-
this
|
|
592
|
+
this.$emit("layerToggle", !this.layerToggle);
|
|
142
593
|
},
|
|
143
594
|
handleCoordToggle() {
|
|
144
595
|
this.showCoord = !this.showCoord, this.$emit("coordinate", this.showCoord);
|
|
@@ -156,20 +607,20 @@ const T = (a, e) => {
|
|
|
156
607
|
this.source = a, this.handleConfirm();
|
|
157
608
|
}
|
|
158
609
|
}
|
|
159
|
-
},
|
|
610
|
+
}, Ye = { class: "idm-gl3-layer" }, qe = { class: "bar-item layer-bars" }, Qe = { class: "bar-item tool-bars" }, Ke = ["onClick"], et = { class: "weather-layers" }, tt = {
|
|
160
611
|
class: "layers-title",
|
|
161
612
|
style: { display: "flex", "align-items": "center", "justify-content": "space-between" }
|
|
162
|
-
},
|
|
163
|
-
function
|
|
613
|
+
}, at = { style: { "font-size": "12px" } }, it = { class: "layers-body" }, rt = ["onClick"], ot = { class: "other-layers" }, st = { class: "layers-body" }, nt = ["onClick"], lt = { class: "source-layers" }, ct = { class: "layers-body model-box" };
|
|
614
|
+
function ht(a, e, t, r, i, o) {
|
|
164
615
|
const n = z("ElScrollbar");
|
|
165
|
-
return x(), _("div",
|
|
616
|
+
return x(), _("div", Ye, [
|
|
166
617
|
l("div", {
|
|
167
618
|
class: "menu-bar-box",
|
|
168
|
-
style:
|
|
619
|
+
style: $({ top: t.top + 10 + "px", right: i.right + "px" })
|
|
169
620
|
}, [
|
|
170
|
-
l("div",
|
|
621
|
+
l("div", qe, [
|
|
171
622
|
l("div", {
|
|
172
|
-
class:
|
|
623
|
+
class: j(t.layerToggle ? "menu-icon active" : "menu-icon"),
|
|
173
624
|
onClick: e[0] || (e[0] = (...s) => o.handleMenuToggle && o.handleMenuToggle(...s))
|
|
174
625
|
}, e[8] || (e[8] = [
|
|
175
626
|
l("span", { class: "iconfont" }, "", -1)
|
|
@@ -178,29 +629,29 @@ function nt(a, e, t, r, i, o) {
|
|
|
178
629
|
], 4),
|
|
179
630
|
l("div", {
|
|
180
631
|
class: "menu-bar-box",
|
|
181
|
-
style:
|
|
632
|
+
style: $({ top: t.top + 160 + "px", right: i.right + "px" })
|
|
182
633
|
}, [
|
|
183
|
-
l("div",
|
|
634
|
+
l("div", Qe, [
|
|
184
635
|
l("div", {
|
|
185
|
-
class:
|
|
636
|
+
class: j(i.showMeasure ? "menu-icon active" : "menu-icon"),
|
|
186
637
|
onClick: e[1] || (e[1] = (...s) => o.handleMeasureToggle && o.handleMeasureToggle(...s))
|
|
187
638
|
}, e[9] || (e[9] = [
|
|
188
639
|
l("span", { class: "iconfont" }, "", -1)
|
|
189
640
|
]), 2),
|
|
190
641
|
l("div", {
|
|
191
|
-
class:
|
|
642
|
+
class: j(i.showPoint ? "menu-icon active" : "menu-icon"),
|
|
192
643
|
onClick: e[2] || (e[2] = (...s) => o.handlePointToggle && o.handlePointToggle(...s))
|
|
193
644
|
}, e[10] || (e[10] = [
|
|
194
645
|
l("span", { class: "iconfont" }, "", -1)
|
|
195
646
|
]), 2),
|
|
196
647
|
l("div", {
|
|
197
|
-
class:
|
|
648
|
+
class: j(i.showCoord ? "menu-icon active" : "menu-icon"),
|
|
198
649
|
onClick: e[3] || (e[3] = (...s) => o.handleCoordToggle && o.handleCoordToggle(...s))
|
|
199
650
|
}, e[11] || (e[11] = [
|
|
200
651
|
l("span", { class: "iconfont" }, "", -1)
|
|
201
652
|
]), 2),
|
|
202
653
|
l("div", {
|
|
203
|
-
class:
|
|
654
|
+
class: j(i.show3d ? "menu-icon active" : "menu-icon"),
|
|
204
655
|
onClick: e[4] || (e[4] = (...s) => o.handle3DToggle && o.handle3DToggle(...s))
|
|
205
656
|
}, e[12] || (e[12] = [
|
|
206
657
|
l("span", { class: "iconfont" }, "", -1)
|
|
@@ -209,77 +660,77 @@ function nt(a, e, t, r, i, o) {
|
|
|
209
660
|
], 4),
|
|
210
661
|
l("div", {
|
|
211
662
|
class: "active-layers",
|
|
212
|
-
style:
|
|
663
|
+
style: $({ right: i.right + "px", bottom: "100px" })
|
|
213
664
|
}, [
|
|
214
|
-
(x(!0), _(xe, null,
|
|
665
|
+
(x(!0), _(xe, null, ke(i.weatherLayers, (s) => (x(), _("div", {
|
|
215
666
|
key: s.key,
|
|
216
|
-
class:
|
|
667
|
+
class: j(o.computeLayerClass(s, i.activeWeatherLayers)),
|
|
217
668
|
onClick: (c) => o.handleActiveWeatherLayerPick(s)
|
|
218
669
|
}, [
|
|
219
670
|
e[13] || (e[13] = l("div", { class: "checkbox" }, null, -1)),
|
|
220
|
-
l("span", null,
|
|
221
|
-
], 10,
|
|
671
|
+
l("span", null, k(s.name), 1)
|
|
672
|
+
], 10, Ke))), 128))
|
|
222
673
|
], 4),
|
|
223
674
|
l("div", {
|
|
224
675
|
class: "available-layers flex-center",
|
|
225
|
-
style:
|
|
676
|
+
style: $({ top: t.top + "px", right: t.layerToggle ? "0px" : "-240px" })
|
|
226
677
|
}, [
|
|
227
678
|
l("div", {
|
|
228
679
|
class: "side-bar",
|
|
229
|
-
style:
|
|
680
|
+
style: $({ right: t.layerToggle ? "0px" : "-240px" }),
|
|
230
681
|
onClick: e[5] || (e[5] = (...s) => o.handleMenuToggle && o.handleMenuToggle(...s))
|
|
231
682
|
}, e[14] || (e[14] = [
|
|
232
683
|
l("i", { class: "iconfont" }, "", -1)
|
|
233
684
|
]), 4),
|
|
234
685
|
l("div", {
|
|
235
|
-
class:
|
|
686
|
+
class: j(["list-box", t.layerToggle ? "right-bar" : ""])
|
|
236
687
|
}, [
|
|
237
688
|
P(n, { style: { flex: "1" } }, {
|
|
238
|
-
default:
|
|
239
|
-
l("div",
|
|
240
|
-
l("div",
|
|
689
|
+
default: Ue(() => [
|
|
690
|
+
l("div", et, [
|
|
691
|
+
l("div", tt, [
|
|
241
692
|
l("div", null, [
|
|
242
|
-
e[15] || (e[15] =
|
|
243
|
-
l("span",
|
|
693
|
+
e[15] || (e[15] = Ne(" Weather Layers ")),
|
|
694
|
+
l("span", at, "(" + k(i.weatherLayers.length) + "/12)", 1)
|
|
244
695
|
])
|
|
245
696
|
]),
|
|
246
|
-
l("div",
|
|
247
|
-
(x(!0), _(xe, null,
|
|
697
|
+
l("div", it, [
|
|
698
|
+
(x(!0), _(xe, null, ke(i.layers.weather, (s) => (x(), _(xe, {
|
|
248
699
|
key: s.key
|
|
249
700
|
}, [
|
|
250
701
|
s.hide ? B("", !0) : (x(), _("div", {
|
|
251
702
|
key: 0,
|
|
252
|
-
class:
|
|
703
|
+
class: j(o.computeLayerClass(s, i.weatherLayers)),
|
|
253
704
|
onClick: (c) => o.handleWeatherLayerPick(s)
|
|
254
705
|
}, [
|
|
255
706
|
e[16] || (e[16] = l("div", { class: "checkbox" }, null, -1)),
|
|
256
|
-
l("span", null,
|
|
257
|
-
], 10,
|
|
707
|
+
l("span", null, k(s.name), 1)
|
|
708
|
+
], 10, rt))
|
|
258
709
|
], 64))), 128))
|
|
259
710
|
])
|
|
260
711
|
]),
|
|
261
|
-
l("div",
|
|
712
|
+
l("div", ot, [
|
|
262
713
|
e[18] || (e[18] = l("div", { class: "layers-title" }, "Other Layers", -1)),
|
|
263
|
-
l("div",
|
|
264
|
-
(x(!0), _(xe, null,
|
|
714
|
+
l("div", st, [
|
|
715
|
+
(x(!0), _(xe, null, ke(i.layers.other, (s) => (x(), _("div", {
|
|
265
716
|
key: s.key,
|
|
266
|
-
class:
|
|
717
|
+
class: j(o.computeLayerClass(s, i.otherLayers)),
|
|
267
718
|
onClick: (c) => o.handleOtherLayerPick(s)
|
|
268
719
|
}, [
|
|
269
720
|
e[17] || (e[17] = l("div", { class: "checkbox" }, null, -1)),
|
|
270
|
-
l("span", null,
|
|
271
|
-
], 10,
|
|
721
|
+
l("span", null, k(s.name), 1)
|
|
722
|
+
], 10, nt))), 128))
|
|
272
723
|
])
|
|
273
724
|
]),
|
|
274
|
-
l("div",
|
|
725
|
+
l("div", lt, [
|
|
275
726
|
e[19] || (e[19] = l("span", { class: "layers-title" }, "Forecast Model", -1)),
|
|
276
|
-
l("div",
|
|
727
|
+
l("div", ct, [
|
|
277
728
|
l("span", {
|
|
278
|
-
class:
|
|
729
|
+
class: j(i.source === "GFS" ? "text active" : "text"),
|
|
279
730
|
onClick: e[6] || (e[6] = (s) => o.handleSourceToggle("GFS"))
|
|
280
731
|
}, "GFS", 2),
|
|
281
732
|
l("span", {
|
|
282
|
-
class:
|
|
733
|
+
class: j(i.source === "CMEMS" ? "text active" : "text"),
|
|
283
734
|
onClick: e[7] || (e[7] = (s) => o.handleSourceToggle("CMEMS"))
|
|
284
735
|
}, "ECMWF", 2)
|
|
285
736
|
])
|
|
@@ -291,8 +742,8 @@ function nt(a, e, t, r, i, o) {
|
|
|
291
742
|
], 4)
|
|
292
743
|
]);
|
|
293
744
|
}
|
|
294
|
-
const
|
|
295
|
-
const
|
|
745
|
+
const pt = /* @__PURE__ */ T(Xe, [["render", ht]]);
|
|
746
|
+
const dt = {
|
|
296
747
|
name: "IdmWindBarb",
|
|
297
748
|
props: {
|
|
298
749
|
map: {
|
|
@@ -393,22 +844,22 @@ const ct = {
|
|
|
393
844
|
else {
|
|
394
845
|
this.map.addSource(this.source, { type: "geojson", data: s });
|
|
395
846
|
for (let c = 0; c < (this.barbs ?? []).length - 1; c++) {
|
|
396
|
-
const h = (this.barbs ?? [])[c] || 0,
|
|
847
|
+
const h = (this.barbs ?? [])[c] || 0, p = (this.barbs ?? [])[c + 1] || 0, d = h < 10 ? `00${h}kts` : h < 100 ? `0${h}kts` : `${h}kts`;
|
|
397
848
|
this.map.addLayer(
|
|
398
849
|
{
|
|
399
|
-
id:
|
|
850
|
+
id: d,
|
|
400
851
|
type: "symbol",
|
|
401
852
|
filter: [
|
|
402
853
|
"all",
|
|
403
854
|
// @ts-ignore
|
|
404
855
|
[">=", "spd", h],
|
|
405
856
|
// @ts-ignore
|
|
406
|
-
["<", "spd",
|
|
857
|
+
["<", "spd", p]
|
|
407
858
|
],
|
|
408
859
|
source: this.source,
|
|
409
860
|
layout: {
|
|
410
861
|
"symbol-placement": "point",
|
|
411
|
-
"icon-image":
|
|
862
|
+
"icon-image": d,
|
|
412
863
|
// mapbox sprite
|
|
413
864
|
"icon-size": 0.14,
|
|
414
865
|
"icon-offset": [0, -20],
|
|
@@ -451,34 +902,34 @@ const ct = {
|
|
|
451
902
|
this.map.getSource(this.source) && this.map.removeSource(this.source), this.windBarbLoaded = !1;
|
|
452
903
|
}
|
|
453
904
|
}
|
|
454
|
-
},
|
|
905
|
+
}, mt = { key: 0 }, ut = {
|
|
455
906
|
key: 0,
|
|
456
907
|
class: "iconfont active"
|
|
457
|
-
},
|
|
908
|
+
}, yt = {
|
|
458
909
|
key: 1,
|
|
459
910
|
class: "iconfont"
|
|
460
|
-
},
|
|
911
|
+
}, ft = {
|
|
461
912
|
key: 0,
|
|
462
913
|
class: "iconfont active"
|
|
463
|
-
},
|
|
914
|
+
}, gt = {
|
|
464
915
|
key: 1,
|
|
465
916
|
class: "iconfont"
|
|
466
917
|
};
|
|
467
|
-
function
|
|
918
|
+
function bt(a, e, t, r, i, o) {
|
|
468
919
|
var n;
|
|
469
|
-
return (n = t.wind) != null && n.active ? (x(), _("div",
|
|
920
|
+
return (n = t.wind) != null && n.active ? (x(), _("div", mt, [
|
|
470
921
|
l("div", {
|
|
471
922
|
class: "flex-center tool-bars",
|
|
472
|
-
style:
|
|
923
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
473
924
|
}, [
|
|
474
925
|
t.mapProjection === "mercator" ? (x(), _("div", {
|
|
475
926
|
key: 0,
|
|
476
927
|
class: "flex-start",
|
|
477
928
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
478
929
|
}, [
|
|
479
|
-
t.showParticle ? (x(), _("i",
|
|
930
|
+
t.showParticle ? (x(), _("i", ut, "")) : (x(), _("i", yt, "")),
|
|
480
931
|
l("span", {
|
|
481
|
-
class:
|
|
932
|
+
class: j(t.showParticle ? "active" : "")
|
|
482
933
|
}, "Wind Particles", 2)
|
|
483
934
|
])) : B("", !0),
|
|
484
935
|
t.showParticle ? (x(), _("div", {
|
|
@@ -487,16 +938,16 @@ function yt(a, e, t, r, i, o) {
|
|
|
487
938
|
style: { "margin-left": "16px" },
|
|
488
939
|
onClick: e[1] || (e[1] = (s) => i.showFeather = !i.showFeather)
|
|
489
940
|
}, [
|
|
490
|
-
i.showFeather ? (x(), _("i",
|
|
941
|
+
i.showFeather ? (x(), _("i", ft, "")) : (x(), _("i", gt, "")),
|
|
491
942
|
l("span", {
|
|
492
|
-
class:
|
|
943
|
+
class: j(i.showFeather ? "active" : "")
|
|
493
944
|
}, "Wind Feather", 2)
|
|
494
945
|
])) : B("", !0)
|
|
495
946
|
], 4)
|
|
496
947
|
])) : B("", !0);
|
|
497
948
|
}
|
|
498
|
-
const
|
|
499
|
-
class
|
|
949
|
+
const vt = /* @__PURE__ */ T(dt, [["render", bt], ["__scopeId", "data-v-8af725eb"]]);
|
|
950
|
+
class Re {
|
|
500
951
|
constructor(e) {
|
|
501
952
|
I(this, "map");
|
|
502
953
|
I(this, "mercator");
|
|
@@ -507,7 +958,7 @@ class Te {
|
|
|
507
958
|
I(this, "rampColorCanvas");
|
|
508
959
|
I(this, "particleCanvas");
|
|
509
960
|
I(this, "ratio");
|
|
510
|
-
this.map = e, this.mercator = new
|
|
961
|
+
this.map = e, this.mercator = new He(), this.rampColorLayer = "ramp-color-layer", this.rampColorSource = "ramp-color-source", this.particleLayer = "particle-layer", this.particleSource = "particle-source", this.rampColorCanvas = document.createElement("canvas"), this.particleCanvas = document.createElement("canvas"), this.ratio = window.devicePixelRatio;
|
|
511
962
|
}
|
|
512
963
|
/**
|
|
513
964
|
* 转换为[-180, 180]的经度,且包含转换次数
|
|
@@ -541,8 +992,8 @@ class Te {
|
|
|
541
992
|
* @param [lb.x, lb.y, rt.x, rt.y]
|
|
542
993
|
*/
|
|
543
994
|
getBoundPixel() {
|
|
544
|
-
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,
|
|
545
|
-
return [
|
|
995
|
+
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, p] = this.mercator.px([o, r[1]], t), [d, g] = this.mercator.px([s, i[1]], t), u = Math.round(this.mercator.size * Math.pow(2, t) * (n + c));
|
|
996
|
+
return [d, g, h + u, p];
|
|
546
997
|
}
|
|
547
998
|
/**
|
|
548
999
|
* [视窗边界像素宽度]
|
|
@@ -557,13 +1008,13 @@ class Te {
|
|
|
557
1008
|
* @param zoom
|
|
558
1009
|
*/
|
|
559
1010
|
getWorldCopy(e, t) {
|
|
560
|
-
const r = 2 ** t, [i, o, n, s] = e.map((
|
|
561
|
-
for (let
|
|
562
|
-
for (let
|
|
563
|
-
c.push([
|
|
564
|
-
return c.map((
|
|
565
|
-
const
|
|
566
|
-
return [
|
|
1011
|
+
const r = 2 ** t, [i, o, n, s] = e.map((p) => ~~(p / (r * 256))), c = [];
|
|
1012
|
+
for (let p = s; p <= o; p++)
|
|
1013
|
+
for (let d = i; d <= n; d++)
|
|
1014
|
+
c.push([d, p]);
|
|
1015
|
+
return c.map((p) => {
|
|
1016
|
+
const d = 2 ** t * 256;
|
|
1017
|
+
return [p[0] * d, p[1] * d, d];
|
|
567
1018
|
});
|
|
568
1019
|
}
|
|
569
1020
|
resize() {
|
|
@@ -666,8 +1117,8 @@ class ye {
|
|
|
666
1117
|
const s = n.getContext("2d");
|
|
667
1118
|
if (s && e) {
|
|
668
1119
|
const c = s == null ? void 0 : s.createLinearGradient(0, 0, 256, 0);
|
|
669
|
-
return t.forEach(([h,
|
|
670
|
-
c.addColorStop(h,
|
|
1120
|
+
return t.forEach(([h, p]) => {
|
|
1121
|
+
c.addColorStop(h, p);
|
|
671
1122
|
}), s.fillStyle = c, s.fillRect(0, 0, 256, 1), {
|
|
672
1123
|
canvas: n,
|
|
673
1124
|
texture: this.createTexture(
|
|
@@ -684,11 +1135,11 @@ class ye {
|
|
|
684
1135
|
}
|
|
685
1136
|
setupParticle(e, t = 1e3) {
|
|
686
1137
|
const r = Math.ceil(Math.sqrt(t)), i = r * r, o = new Uint8Array(i * 4);
|
|
687
|
-
for (let
|
|
688
|
-
o[
|
|
1138
|
+
for (let p = 0; p < o.length; p++)
|
|
1139
|
+
o[p] = Math.floor(Math.random() * 256);
|
|
689
1140
|
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);
|
|
690
|
-
for (let
|
|
691
|
-
c[
|
|
1141
|
+
for (let p = 0; p < i; p++)
|
|
1142
|
+
c[p] = p;
|
|
692
1143
|
const h = this.createDataBuffer(e, "array", c);
|
|
693
1144
|
return { resolution: r, total: i, texture0: n, texture1: s, indexBuffer: h };
|
|
694
1145
|
}
|
|
@@ -705,26 +1156,26 @@ class ye {
|
|
|
705
1156
|
return {};
|
|
706
1157
|
}
|
|
707
1158
|
bindParticle(e, t, r, i, o, n) {
|
|
708
|
-
const s = this.createProgramWrapper(e, t, r), c = this.createProgramWrapper(e, i, o), h = this.createProgramWrapper(e, i, n),
|
|
709
|
-
return { particle: s, screen: c, update: h, quadBuffer:
|
|
1159
|
+
const s = this.createProgramWrapper(e, t, r), c = this.createProgramWrapper(e, i, o), h = this.createProgramWrapper(e, i, n), p = this.createDataBuffer(e, "array", new Float32Array([0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1])), d = e.createFramebuffer();
|
|
1160
|
+
return { particle: s, screen: c, update: h, quadBuffer: p, frameBuffer: d };
|
|
710
1161
|
}
|
|
711
1162
|
draw(e, t, r, i, o, n, s) {
|
|
712
1163
|
var c, h;
|
|
713
1164
|
if (t && r) {
|
|
714
1165
|
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);
|
|
715
1166
|
try {
|
|
716
|
-
const
|
|
717
|
-
if (t.useProgram(r), t.uniform2f(
|
|
1167
|
+
const p = t.getUniformLocation(r, "u_resolution"), d = t.getUniformLocation(r, "u_image"), g = t.getUniformLocation(r, "u_color");
|
|
1168
|
+
if (t.useProgram(r), t.uniform2f(p, t.canvas.width * e.ratio, t.canvas.height * e.ratio), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(d, 0), t.activeTexture(t.TEXTURE1), t.bindTexture(t.TEXTURE_2D, o), t.uniform1i(g, 1), s != null && s.uvRange && (s != null && s.sRange)) {
|
|
718
1169
|
const m = t.getUniformLocation(r, "u_range_u_v"), v = t.getUniformLocation(r, "u_range_s");
|
|
719
1170
|
t.uniform2f(m, s.uvRange[0], s.uvRange[1]), t.uniform2f(v, s.sRange[0], s.sRange[1]);
|
|
720
1171
|
}
|
|
721
1172
|
const u = e.getBoundPixel(), y = e.map.getZoom() + 1, f = e.getWorldCopy(u, y);
|
|
722
1173
|
for (const m of f) {
|
|
723
|
-
const v = (m[0] - u[0]) * e.ratio, b = (m[1] - u[3]) * e.ratio,
|
|
724
|
-
t.bindBuffer(t.ARRAY_BUFFER, n), t.bufferData(t.ARRAY_BUFFER,
|
|
1174
|
+
const v = (m[0] - u[0]) * e.ratio, b = (m[1] - u[3]) * e.ratio, L = m[2] * e.ratio, [S, w, A, M] = [v, L + v, b, L + b], N = new Float32Array([S, A, w, A, S, M, S, M, w, A, w, M]);
|
|
1175
|
+
t.bindBuffer(t.ARRAY_BUFFER, n), t.bufferData(t.ARRAY_BUFFER, N, t.STATIC_DRAW), t.drawArrays(t.TRIANGLES, 0, 6);
|
|
725
1176
|
}
|
|
726
|
-
} catch (
|
|
727
|
-
console.log(`render failed...${
|
|
1177
|
+
} catch (p) {
|
|
1178
|
+
console.log(`render failed...${p}`);
|
|
728
1179
|
}
|
|
729
1180
|
}
|
|
730
1181
|
}
|
|
@@ -769,10 +1220,10 @@ class ye {
|
|
|
769
1220
|
});
|
|
770
1221
|
}
|
|
771
1222
|
}
|
|
772
|
-
class
|
|
1223
|
+
class W {
|
|
773
1224
|
}
|
|
774
1225
|
// 顶点渲染
|
|
775
|
-
I(
|
|
1226
|
+
I(W, "vertexSchema", `
|
|
776
1227
|
//canvas 坐标系上的坐标 (x, y)
|
|
777
1228
|
attribute vec2 a_position; //像素坐标
|
|
778
1229
|
attribute vec2 a_texCoord; //纹理坐标
|
|
@@ -787,7 +1238,7 @@ I(N, "vertexSchema", `
|
|
|
787
1238
|
gl_Position = vec4(position * vec2(1, -1), 0.0, 1.0);
|
|
788
1239
|
v_texCoord = a_texCoord;
|
|
789
1240
|
}`), // 类如风、流等u v双变量片元渲染
|
|
790
|
-
I(
|
|
1241
|
+
I(W, "uvFragmentSchema", `
|
|
791
1242
|
precision mediump float;
|
|
792
1243
|
uniform sampler2D u_image;
|
|
793
1244
|
uniform vec2 u_range_u_v;
|
|
@@ -806,7 +1257,7 @@ I(N, "uvFragmentSchema", `
|
|
|
806
1257
|
|
|
807
1258
|
gl_FragColor = color;
|
|
808
1259
|
}`), // 类如浪、气压等单变量片元渲染
|
|
809
|
-
I(
|
|
1260
|
+
I(W, "fragmentSchema", `
|
|
810
1261
|
precision mediump float;
|
|
811
1262
|
uniform sampler2D u_image; // 灰度
|
|
812
1263
|
uniform sampler2D u_color; // 色值映射
|
|
@@ -966,7 +1417,7 @@ I(U, "vertexSchema", `
|
|
|
966
1417
|
fract(pos * 255.0),
|
|
967
1418
|
floor(pos * 255.0) / 255.0);
|
|
968
1419
|
}`);
|
|
969
|
-
class
|
|
1420
|
+
class wt {
|
|
970
1421
|
constructor(e = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg") {
|
|
971
1422
|
I(this, "token");
|
|
972
1423
|
I(this, "mapboxCustomer");
|
|
@@ -2570,14 +3021,14 @@ class gt {
|
|
|
2570
3021
|
};
|
|
2571
3022
|
}
|
|
2572
3023
|
}
|
|
2573
|
-
const
|
|
3024
|
+
const Lt = {
|
|
2574
3025
|
name: "IdmWindParticle",
|
|
2575
3026
|
props: {
|
|
2576
3027
|
factor: {
|
|
2577
3028
|
type: Object
|
|
2578
3029
|
},
|
|
2579
3030
|
viewport: {
|
|
2580
|
-
type:
|
|
3031
|
+
type: Re
|
|
2581
3032
|
},
|
|
2582
3033
|
bottom: {
|
|
2583
3034
|
type: String,
|
|
@@ -2684,7 +3135,7 @@ const bt = {
|
|
|
2684
3135
|
[1, "rgb(91, 136, 161)"]
|
|
2685
3136
|
];
|
|
2686
3137
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
2687
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
3138
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.uvFragmentSchema);
|
|
2688
3139
|
this.program = e, this.aPositionBuffer = t;
|
|
2689
3140
|
}
|
|
2690
3141
|
this.handleParticleSetup();
|
|
@@ -2732,13 +3183,13 @@ const bt = {
|
|
|
2732
3183
|
});
|
|
2733
3184
|
}
|
|
2734
3185
|
}
|
|
2735
|
-
},
|
|
2736
|
-
function
|
|
3186
|
+
}, xt = { key: 0 };
|
|
3187
|
+
function _t(a, e, t, r, i, o) {
|
|
2737
3188
|
var n;
|
|
2738
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
3189
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", xt, [
|
|
2739
3190
|
l("div", {
|
|
2740
3191
|
class: "legend-bars flex-center",
|
|
2741
|
-
style:
|
|
3192
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
2742
3193
|
}, e[0] || (e[0] = [
|
|
2743
3194
|
l("span", null, "kts", -1),
|
|
2744
3195
|
l("span", null, "0", -1),
|
|
@@ -2751,8 +3202,8 @@ function Lt(a, e, t, r, i, o) {
|
|
|
2751
3202
|
]), 4)
|
|
2752
3203
|
])) : B("", !0);
|
|
2753
3204
|
}
|
|
2754
|
-
const
|
|
2755
|
-
const
|
|
3205
|
+
const Ct = /* @__PURE__ */ T(Lt, [["render", _t], ["__scopeId", "data-v-a3cc30c6"]]);
|
|
3206
|
+
const kt = {
|
|
2756
3207
|
name: "IdmCurrent",
|
|
2757
3208
|
props: {
|
|
2758
3209
|
map: {
|
|
@@ -2912,34 +3363,34 @@ const xt = {
|
|
|
2912
3363
|
this.map.getLayer(this.speedLayer) && this.map.removeLayer(this.speedLayer), this.map.getLayer(this.speedLabelLayer) && this.map.removeLayer(this.speedLabelLayer), this.map.getLayer(this.directionLayer) && this.map.removeLayer(this.directionLayer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
2913
3364
|
}
|
|
2914
3365
|
}
|
|
2915
|
-
},
|
|
3366
|
+
}, St = { key: 0 }, zt = {
|
|
2916
3367
|
key: 0,
|
|
2917
3368
|
class: "iconfont active"
|
|
2918
|
-
},
|
|
3369
|
+
}, Pt = {
|
|
2919
3370
|
key: 1,
|
|
2920
3371
|
class: "iconfont"
|
|
2921
|
-
},
|
|
3372
|
+
}, Tt = {
|
|
2922
3373
|
key: 0,
|
|
2923
3374
|
class: "iconfont active"
|
|
2924
|
-
},
|
|
3375
|
+
}, Rt = {
|
|
2925
3376
|
key: 1,
|
|
2926
3377
|
class: "iconfont"
|
|
2927
3378
|
};
|
|
2928
|
-
function
|
|
3379
|
+
function Et(a, e, t, r, i, o) {
|
|
2929
3380
|
var n;
|
|
2930
|
-
return (n = t.current) != null && n.active ? (x(), _("div",
|
|
3381
|
+
return (n = t.current) != null && n.active ? (x(), _("div", St, [
|
|
2931
3382
|
l("div", {
|
|
2932
3383
|
class: "flex-center tool-bars",
|
|
2933
|
-
style:
|
|
3384
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: i.bottom + "px" }])
|
|
2934
3385
|
}, [
|
|
2935
3386
|
t.mapProjection === "mercator" ? (x(), _("div", {
|
|
2936
3387
|
key: 0,
|
|
2937
3388
|
class: "flex-start",
|
|
2938
3389
|
onClick: e[0] || (e[0] = (...s) => o.handleParticle && o.handleParticle(...s))
|
|
2939
3390
|
}, [
|
|
2940
|
-
t.showParticle ? (x(), _("i",
|
|
3391
|
+
t.showParticle ? (x(), _("i", zt, "")) : (x(), _("i", Pt, "")),
|
|
2941
3392
|
l("span", {
|
|
2942
|
-
class:
|
|
3393
|
+
class: j(t.showParticle ? "active" : "")
|
|
2943
3394
|
}, "Current Particles", 2)
|
|
2944
3395
|
])) : B("", !0),
|
|
2945
3396
|
t.showParticle ? (x(), _("div", {
|
|
@@ -2948,23 +3399,23 @@ function Pt(a, e, t, r, i, o) {
|
|
|
2948
3399
|
style: { "margin-left": "16px" },
|
|
2949
3400
|
onClick: e[1] || (e[1] = (s) => i.showJson = !i.showJson)
|
|
2950
3401
|
}, [
|
|
2951
|
-
i.showJson ? (x(), _("i",
|
|
3402
|
+
i.showJson ? (x(), _("i", Tt, "")) : (x(), _("i", Rt, "")),
|
|
2952
3403
|
l("span", {
|
|
2953
|
-
class:
|
|
3404
|
+
class: j(i.showJson ? "active" : "")
|
|
2954
3405
|
}, "Current", 2)
|
|
2955
3406
|
])) : B("", !0)
|
|
2956
3407
|
], 4)
|
|
2957
3408
|
])) : B("", !0);
|
|
2958
3409
|
}
|
|
2959
|
-
const
|
|
2960
|
-
const
|
|
3410
|
+
const It = /* @__PURE__ */ T(kt, [["render", Et], ["__scopeId", "data-v-83a51e73"]]);
|
|
3411
|
+
const At = {
|
|
2961
3412
|
name: "IdmCurrentParticle",
|
|
2962
3413
|
props: {
|
|
2963
3414
|
factor: {
|
|
2964
3415
|
type: Object
|
|
2965
3416
|
},
|
|
2966
3417
|
viewport: {
|
|
2967
|
-
type:
|
|
3418
|
+
type: Re
|
|
2968
3419
|
},
|
|
2969
3420
|
bottom: {
|
|
2970
3421
|
type: String,
|
|
@@ -3062,7 +3513,7 @@ const Rt = {
|
|
|
3062
3513
|
[1, "rgb(195,194,194)"]
|
|
3063
3514
|
];
|
|
3064
3515
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
3065
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
3516
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.uvFragmentSchema);
|
|
3066
3517
|
this.program = e, this.aPositionBuffer = t;
|
|
3067
3518
|
}
|
|
3068
3519
|
this.handleParticleSetup();
|
|
@@ -3114,13 +3565,13 @@ const Rt = {
|
|
|
3114
3565
|
});
|
|
3115
3566
|
}
|
|
3116
3567
|
}
|
|
3117
|
-
},
|
|
3118
|
-
function
|
|
3568
|
+
}, Dt = { key: 0 };
|
|
3569
|
+
function Mt(a, e, t, r, i, o) {
|
|
3119
3570
|
var n;
|
|
3120
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
3571
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", Dt, [
|
|
3121
3572
|
l("div", {
|
|
3122
3573
|
class: "legend-bars flex-center",
|
|
3123
|
-
style:
|
|
3574
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
3124
3575
|
}, e[0] || (e[0] = [
|
|
3125
3576
|
l("span", null, "kts", -1),
|
|
3126
3577
|
l("span", null, "0", -1),
|
|
@@ -3132,7 +3583,7 @@ function It(a, e, t, r, i, o) {
|
|
|
3132
3583
|
]), 4)
|
|
3133
3584
|
])) : B("", !0);
|
|
3134
3585
|
}
|
|
3135
|
-
const
|
|
3586
|
+
const jt = /* @__PURE__ */ T(At, [["render", Mt], ["__scopeId", "data-v-13f659b1"]]), Bt = {
|
|
3136
3587
|
name: "IdmSigWave",
|
|
3137
3588
|
props: {
|
|
3138
3589
|
map: {
|
|
@@ -3243,10 +3694,10 @@ const Dt = /* @__PURE__ */ T(Rt, [["render", It], ["__scopeId", "data-v-13f659b1
|
|
|
3243
3694
|
}
|
|
3244
3695
|
}
|
|
3245
3696
|
};
|
|
3246
|
-
function
|
|
3697
|
+
function Nt(a, e, t, r, i, o) {
|
|
3247
3698
|
return x(), _("div");
|
|
3248
3699
|
}
|
|
3249
|
-
const
|
|
3700
|
+
const Wt = /* @__PURE__ */ T(Bt, [["render", Nt]]), Ot = {
|
|
3250
3701
|
name: "IdmSwell",
|
|
3251
3702
|
props: {
|
|
3252
3703
|
map: {
|
|
@@ -3384,10 +3835,10 @@ const Bt = /* @__PURE__ */ T(At, [["render", Mt]]), Ot = {
|
|
|
3384
3835
|
}
|
|
3385
3836
|
}
|
|
3386
3837
|
};
|
|
3387
|
-
function
|
|
3838
|
+
function Ft(a, e, t, r, i, o) {
|
|
3388
3839
|
return x(), _("div");
|
|
3389
3840
|
}
|
|
3390
|
-
const
|
|
3841
|
+
const $t = /* @__PURE__ */ T(Ot, [["render", Ft]]), Vt = {
|
|
3391
3842
|
name: "IdmPrmsl",
|
|
3392
3843
|
props: {
|
|
3393
3844
|
map: {
|
|
@@ -3512,10 +3963,10 @@ const jt = /* @__PURE__ */ T(Ot, [["render", Nt]]), Wt = {
|
|
|
3512
3963
|
}
|
|
3513
3964
|
}
|
|
3514
3965
|
};
|
|
3515
|
-
function
|
|
3966
|
+
function Ut(a, e, t, r, i, o) {
|
|
3516
3967
|
return x(), _("div");
|
|
3517
3968
|
}
|
|
3518
|
-
const
|
|
3969
|
+
const Zt = /* @__PURE__ */ T(Vt, [["render", Ut]]), Ht = {
|
|
3519
3970
|
name: "IdmIceberg",
|
|
3520
3971
|
props: {
|
|
3521
3972
|
map: {
|
|
@@ -3572,11 +4023,11 @@ const Ft = /* @__PURE__ */ T(Wt, [["render", $t]]), Vt = {
|
|
|
3572
4023
|
}
|
|
3573
4024
|
}
|
|
3574
4025
|
};
|
|
3575
|
-
function
|
|
4026
|
+
function Gt(a, e, t, r, i, o) {
|
|
3576
4027
|
return x(), _("div");
|
|
3577
4028
|
}
|
|
3578
|
-
const
|
|
3579
|
-
const
|
|
4029
|
+
const Jt = /* @__PURE__ */ T(Ht, [["render", Gt]]);
|
|
4030
|
+
const Xt = {
|
|
3580
4031
|
name: "IdmTropicals",
|
|
3581
4032
|
props: {
|
|
3582
4033
|
map: {
|
|
@@ -3596,7 +4047,7 @@ const Ht = {
|
|
|
3596
4047
|
emits: ["tropical", "tropicalProbability"],
|
|
3597
4048
|
data() {
|
|
3598
4049
|
return {
|
|
3599
|
-
helper:
|
|
4050
|
+
helper: _e,
|
|
3600
4051
|
source: "tropicals-source",
|
|
3601
4052
|
clusterSource: "tropicals-cluster-source",
|
|
3602
4053
|
historyLayer: "tropicals-history-layer",
|
|
@@ -3668,24 +4119,24 @@ const Ht = {
|
|
|
3668
4119
|
}), t.forEach((o) => {
|
|
3669
4120
|
var h;
|
|
3670
4121
|
let n = 0, s;
|
|
3671
|
-
const c = a.filter((
|
|
3672
|
-
var
|
|
3673
|
-
return ((g = (
|
|
4122
|
+
const c = a.filter((p) => {
|
|
4123
|
+
var d, g;
|
|
4124
|
+
return ((g = (d = p.properties) == null ? void 0 : d.category) == null ? void 0 : g.split("-")[0]) === o;
|
|
3674
4125
|
});
|
|
3675
|
-
(h = c.filter((
|
|
3676
|
-
var
|
|
3677
|
-
return ((
|
|
3678
|
-
})[0]) == null || h.properties.model, c.forEach((
|
|
4126
|
+
(h = c.filter((p) => {
|
|
4127
|
+
var d, g;
|
|
4128
|
+
return ((d = p.geometry) == null ? void 0 : d.type) === "LineString" && ((g = p.properties) == null ? void 0 : g.type) === "forecast";
|
|
4129
|
+
})[0]) == null || h.properties.model, c.forEach((p, d) => {
|
|
3679
4130
|
var g, u, y, f, m, v;
|
|
3680
|
-
((g =
|
|
3681
|
-
}), c.map((
|
|
4131
|
+
((g = p.geometry) == null ? void 0 : g.type) === "Point" && ((u = p.properties) == null ? void 0 : u.type) === "history" && (n = d, s = s === void 0 ? d : s), ((y = p.geometry) == null ? void 0 : y.type) === "Point" && ((f = p.properties) == null ? void 0 : f.type) === "forecast" && s === void 0 && (s = d), ((m = p.geometry) == null ? void 0 : m.type) === "LineString" && ((v = p.properties) == null || v.type);
|
|
4132
|
+
}), c.map((p, d) => {
|
|
3682
4133
|
var g, u, y, f, m, v, b;
|
|
3683
|
-
if (((g =
|
|
3684
|
-
|
|
3685
|
-
const
|
|
3686
|
-
|
|
4134
|
+
if (((g = p.geometry) == null ? void 0 : g.type) === "LineString" && ((u = p.properties) == null || u.type), ((y = p.geometry) == null ? void 0 : y.type) === "Point" && ((f = p.properties) == null ? void 0 : f.type) === "forecast" && (p.properties.name = o, p.properties.format = Z(p.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)), ((m = p.geometry) == null ? void 0 : m.type) === "Point" && ((v = p.properties) == null ? void 0 : v.type) === "history") {
|
|
4135
|
+
p.properties.format = Z(p.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);
|
|
4136
|
+
const L = Z((b = p.properties) == null ? void 0 : b.date).utc().format("HHmm") === Z().utc().hour(Math.floor(e / 6) * 6).minute("00").format("HHmm");
|
|
4137
|
+
p.properties.showHistoryLabel = L || d === n, p.properties.showNameLabel = d === n, p.properties.name = o;
|
|
3687
4138
|
}
|
|
3688
|
-
return
|
|
4139
|
+
return p;
|
|
3689
4140
|
});
|
|
3690
4141
|
}), this.handleInit();
|
|
3691
4142
|
},
|
|
@@ -3946,10 +4397,10 @@ const Ht = {
|
|
|
3946
4397
|
}), y = (/* @__PURE__ */ new Date()).valueOf() - (g + u), console.log("[tropical] add elapsed: ", y, ", total: ", u += y));
|
|
3947
4398
|
}
|
|
3948
4399
|
this.handleDrawCircle();
|
|
3949
|
-
const
|
|
3950
|
-
this.interpolateData = JSON.parse(JSON.stringify(
|
|
3951
|
-
const
|
|
3952
|
-
console.log(
|
|
4400
|
+
const p = We.interpolate(this.tropicals, 1);
|
|
4401
|
+
this.interpolateData = JSON.parse(JSON.stringify(p));
|
|
4402
|
+
const d = this.interpolateData.filter((g) => g.properties.name === "kristy" && g.properties.model === "ecmwf");
|
|
4403
|
+
console.log(d), this.handleDateChange();
|
|
3953
4404
|
}
|
|
3954
4405
|
},
|
|
3955
4406
|
handleClear() {
|
|
@@ -3957,10 +4408,10 @@ const Ht = {
|
|
|
3957
4408
|
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));
|
|
3958
4409
|
},
|
|
3959
4410
|
handleDateChange() {
|
|
3960
|
-
var a, e, t, r, i, o, n, s, c, h,
|
|
4411
|
+
var a, e, t, r, i, o, n, s, c, h, p, d, g, u, y, f, m, v, b, L, S, w, A, M, N, O, F, H, re, oe, se, ne, le, ce, he, K;
|
|
3961
4412
|
if ((a = this.interpolateMarkers) == null || a.forEach((G) => G == null ? void 0 : G.remove()), this.circleSourceData.features = [], (e = this.interpolateData) != null && e.length && this.tropicals.active) {
|
|
3962
|
-
const G = Z(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), J = this.interpolateData.filter((R) => R.properties.date === G.format() && !R.properties.disabled),
|
|
3963
|
-
|
|
4413
|
+
const G = Z(this.date).utc().set({ minute: 0, second: 0, millisecond: 0 }), J = this.interpolateData.filter((R) => R.properties.date === G.format() && !R.properties.disabled), pe = this.handleComputePolygons(J), X = C.featureCollection([...J]);
|
|
4414
|
+
pe.forEach((R) => {
|
|
3964
4415
|
X.features.push(R);
|
|
3965
4416
|
}), (t = this.map) != null && t.getSource(this.interpolateSource) ? (r = this.map) == null || r.getSource(this.interpolateSource).setData(X) : ((i = this.map) == null || i.addSource(this.interpolateSource, {
|
|
3966
4417
|
type: "geojson",
|
|
@@ -3979,8 +4430,8 @@ const Ht = {
|
|
|
3979
4430
|
for (const R of J)
|
|
3980
4431
|
if (!R.properties.disabled) {
|
|
3981
4432
|
let V = "#f44336";
|
|
3982
|
-
((s = (n = R.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = R.properties) == null ? void 0 : c.wind) != null && h.spd) ? V = "#03f869" : ((
|
|
3983
|
-
const
|
|
4433
|
+
((s = (n = R.properties) == null ? void 0 : n.wind) == null ? void 0 : s.spd) < 17.2 || !((h = (c = R.properties) == null ? void 0 : c.wind) != null && h.spd) ? V = "#03f869" : ((d = (p = R.properties) == null ? void 0 : p.wind) == null ? void 0 : d.spd) >= 17.2 && ((u = (g = R.properties) == null ? void 0 : g.wind) == null ? void 0 : u.spd) < 24.5 ? V = "#f2f202" : ((f = (y = R.properties) == null ? void 0 : y.wind) == null ? void 0 : f.spd) >= 24.5 && ((v = (m = R.properties) == null ? void 0 : m.wind) == null ? void 0 : v.spd) < 32.7 ? V = "#ff9100" : ((L = (b = R.properties) == null ? void 0 : b.wind) == null ? void 0 : L.spd) >= 32.7 && ((w = (S = R.properties) == null ? void 0 : S.wind) == null ? void 0 : w.spd) < 41.5 ? V = "#f44336" : ((M = (A = R.properties) == null ? void 0 : A.wind) == null ? void 0 : M.spd) >= 41.5 && ((O = (N = R.properties) == null ? void 0 : N.wind) == null ? void 0 : O.spd) < 51 ? V = "#f903d0" : ((H = (F = R.properties) == null ? void 0 : F.wind) == null ? void 0 : H.spd) >= 51 ? V = "#8702f9" : V = "#f44336";
|
|
4434
|
+
const de = `<svg t="1719918955501"
|
|
3984
4435
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
3985
4436
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
3986
4437
|
<path
|
|
@@ -3994,9 +4445,9 @@ const Ht = {
|
|
|
3994
4445
|
<path
|
|
3995
4446
|
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"
|
|
3996
4447
|
fill="#ffffff" p-id="18386"></path>
|
|
3997
|
-
</svg>`,
|
|
3998
|
-
|
|
3999
|
-
const me = new Q.Marker(
|
|
4448
|
+
</svg>`, Y = document.createElement("div");
|
|
4449
|
+
Y.className = "hurricane-hourly-marker", Y.innerHTML = `<div class="${R.geometry.coordinates[1] >= 0 ? "center north" : "center south"}">${de}</div>`;
|
|
4450
|
+
const me = new Q.Marker(Y).setLngLat(R.geometry.coordinates).addTo(this.map);
|
|
4000
4451
|
if (this.interpolateMarkers.push(me), (re = R.properties) != null && re.showCircle) {
|
|
4001
4452
|
const ee = { radius: 100, coordinates: R.geometry.coordinates }, te = { radius: 200, coordinates: R.geometry.coordinates }, ae = { radius: 500, coordinates: R.geometry.coordinates };
|
|
4002
4453
|
(oe = this.circleSourceData) == null || oe.features.push(
|
|
@@ -4013,7 +4464,7 @@ const Ht = {
|
|
|
4013
4464
|
(he = this.map) != null && he.getSource(this.interpolateSource) && ((K = this.map) == null || K.getSource(this.interpolateSource).setData(this.empty));
|
|
4014
4465
|
},
|
|
4015
4466
|
handleClick(a) {
|
|
4016
|
-
var o, n, s, c, h,
|
|
4467
|
+
var o, n, s, c, h, p, d, g;
|
|
4017
4468
|
const e = a.features[0], t = (n = (o = this.tropicals) == null ? void 0 : o.data) == null ? void 0 : n.features.filter(
|
|
4018
4469
|
(u) => {
|
|
4019
4470
|
var y;
|
|
@@ -4033,8 +4484,8 @@ const Ht = {
|
|
|
4033
4484
|
this.activeTropicals = {
|
|
4034
4485
|
name: (h = e == null ? void 0 : e.properties) == null ? void 0 : h.name,
|
|
4035
4486
|
forecasts: t.map((u) => u.properties),
|
|
4036
|
-
history: (
|
|
4037
|
-
showCircle: (g = (
|
|
4487
|
+
history: (p = r[0]) == null ? void 0 : p.properties,
|
|
4488
|
+
showCircle: (g = (d = t[0]) == null ? void 0 : d.properties) == null ? void 0 : g.showCircle
|
|
4038
4489
|
}, this.showTropicals = !0;
|
|
4039
4490
|
const i = document.getElementById("active-tropical");
|
|
4040
4491
|
this.activeTropicalsMarker ? this.activeTropicalsMarker.setLngLat([a.lngLat.lng, a.lngLat.lat]) : this.activeTropicalsMarker = new Q.Marker(i).setLngLat([a.lngLat.lng, a.lngLat.lat]).setOffset([220, 0]).addTo(this.map);
|
|
@@ -4122,86 +4573,86 @@ const Ht = {
|
|
|
4122
4573
|
return C.lineToPolygon(i, { properties: t });
|
|
4123
4574
|
}
|
|
4124
4575
|
}
|
|
4125
|
-
},
|
|
4576
|
+
}, Yt = {
|
|
4126
4577
|
id: "active-tropical",
|
|
4127
4578
|
class: "active-tropical"
|
|
4128
|
-
},
|
|
4579
|
+
}, qt = { class: "header-box" }, Qt = { class: "main" }, Kt = { key: 0 }, ea = { class: "sub" }, ta = {
|
|
4129
4580
|
id: "meteoBox",
|
|
4130
4581
|
class: "main-box"
|
|
4131
|
-
},
|
|
4582
|
+
}, aa = { class: "content" }, ia = { class: "row" }, ra = {
|
|
4132
4583
|
class: "col col-left",
|
|
4133
4584
|
style: { "justify-content": "flex-start" }
|
|
4134
|
-
},
|
|
4585
|
+
}, oa = {
|
|
4135
4586
|
class: "col col-right",
|
|
4136
4587
|
style: { "justify-content": "flex-start" }
|
|
4137
|
-
},
|
|
4588
|
+
}, sa = { class: "row" }, na = {
|
|
4138
4589
|
class: "col col-24",
|
|
4139
4590
|
style: { "justify-content": "flex-start" }
|
|
4140
|
-
},
|
|
4141
|
-
function
|
|
4142
|
-
var n, s, c, h,
|
|
4143
|
-
return Se((x(), _("div",
|
|
4144
|
-
l("div",
|
|
4591
|
+
}, la = { class: "forecast-models" }, ca = ["onClick"], ha = { class: "more" };
|
|
4592
|
+
function pa(a, e, t, r, i, o) {
|
|
4593
|
+
var n, s, c, h, p, d, g, u, y, f, m, v, b, L, S;
|
|
4594
|
+
return Se((x(), _("div", Yt, [
|
|
4595
|
+
l("div", qt, [
|
|
4145
4596
|
l("div", {
|
|
4146
4597
|
class: "iconfont close-btn",
|
|
4147
|
-
onClick: e[0] || (e[0] = (
|
|
4598
|
+
onClick: e[0] || (e[0] = (w) => i.showTropicals = !1)
|
|
4148
4599
|
}, ""),
|
|
4149
|
-
l("div",
|
|
4150
|
-
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (x(), _("span",
|
|
4151
|
-
|
|
4600
|
+
l("div", Qt, [
|
|
4601
|
+
(s = (n = i.activeTropicals) == null ? void 0 : n.history) != null && s.level ? (x(), _("span", Kt, k((h = (c = i.activeTropicals) == null ? void 0 : c.history) == null ? void 0 : h.level) + " , ", 1)) : B("", !0),
|
|
4602
|
+
Ne(k((p = i.activeTropicals) == null ? void 0 : p.name), 1)
|
|
4152
4603
|
]),
|
|
4153
|
-
l("div",
|
|
4604
|
+
l("div", ea, " Last update: " + k(o.computeTime(((g = (d = i.activeTropicals) == null ? void 0 : d.history) == null ? void 0 : g.updated) || ((f = (y = (u = i.activeTropicals) == null ? void 0 : u.forecasts) == null ? void 0 : y.filter((w) => !w.disabled)[0]) == null ? void 0 : f.date))), 1)
|
|
4154
4605
|
]),
|
|
4155
|
-
l("div",
|
|
4156
|
-
l("div",
|
|
4157
|
-
l("div",
|
|
4158
|
-
l("div",
|
|
4606
|
+
l("div", ta, [
|
|
4607
|
+
l("div", aa, [
|
|
4608
|
+
l("div", ia, [
|
|
4609
|
+
l("div", ra, [
|
|
4159
4610
|
e[2] || (e[2] = l("label", null, "Wind speed : ", -1)),
|
|
4160
|
-
l("span", null,
|
|
4611
|
+
l("span", null, k(((v = (m = i.activeTropicals) == null ? void 0 : m.history) == null ? void 0 : v.kts) || "-") + "[kts]", 1)
|
|
4161
4612
|
]),
|
|
4162
|
-
l("div",
|
|
4613
|
+
l("div", oa, [
|
|
4163
4614
|
e[3] || (e[3] = l("label", null, "Pressure : ", -1)),
|
|
4164
|
-
l("span", null,
|
|
4615
|
+
l("span", null, k(((L = (b = i.activeTropicals) == null ? void 0 : b.history) == null ? void 0 : L.pressure) || "-") + "[hPa]", 1)
|
|
4165
4616
|
])
|
|
4166
4617
|
]),
|
|
4167
|
-
l("div",
|
|
4168
|
-
l("div",
|
|
4618
|
+
l("div", sa, [
|
|
4619
|
+
l("div", na, [
|
|
4169
4620
|
e[4] || (e[4] = l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)),
|
|
4170
|
-
l("div",
|
|
4171
|
-
(x(!0), _(xe, null,
|
|
4172
|
-
var
|
|
4621
|
+
l("div", la, [
|
|
4622
|
+
(x(!0), _(xe, null, ke((S = i.activeTropicals) == null ? void 0 : S.forecasts, (w, A) => {
|
|
4623
|
+
var M, N, O, F;
|
|
4173
4624
|
return x(), _("div", {
|
|
4174
|
-
key:
|
|
4175
|
-
class:
|
|
4625
|
+
key: A,
|
|
4626
|
+
class: j([
|
|
4176
4627
|
"model",
|
|
4177
|
-
|
|
4178
|
-
|
|
4628
|
+
w.disabled ? "" : "active",
|
|
4629
|
+
A > 0 && A < ((N = (M = i.activeTropicals) == null ? void 0 : M.forecasts) == null ? void 0 : N.length) - 1 && ((F = (O = i.activeTropicals) == null ? void 0 : O.forecasts) == null ? void 0 : F.length) > 2 ? "center-child" : ""
|
|
4179
4630
|
]),
|
|
4180
|
-
onClick: (H) => o.handleForecastToggle(
|
|
4631
|
+
onClick: (H) => o.handleForecastToggle(w)
|
|
4181
4632
|
}, [
|
|
4182
4633
|
l("span", {
|
|
4183
|
-
class:
|
|
4184
|
-
},
|
|
4185
|
-
], 10,
|
|
4634
|
+
class: j(w.model)
|
|
4635
|
+
}, k(w.model), 3)
|
|
4636
|
+
], 10, ca);
|
|
4186
4637
|
}), 128))
|
|
4187
4638
|
])
|
|
4188
4639
|
])
|
|
4189
4640
|
]),
|
|
4190
|
-
e[5] || (e[5] =
|
|
4641
|
+
e[5] || (e[5] = Ze('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-35ea0576></div><div class="row" style="padding:2px 10px;" data-v-35ea0576><div class="legend" data-v-35ea0576><div class="icon td" data-v-35ea0576></div><div class="label" data-v-35ea0576>TD</div></div><div class="legend" data-v-35ea0576><div class="icon ts" data-v-35ea0576></div><div class="label" data-v-35ea0576>TS</div></div><div class="legend" data-v-35ea0576><div class="icon sts" data-v-35ea0576></div><div class="label" data-v-35ea0576>STS</div></div><div class="legend" data-v-35ea0576><div class="icon ty" data-v-35ea0576></div><div class="label" data-v-35ea0576>TY</div></div><div class="legend" data-v-35ea0576><div class="icon sty" data-v-35ea0576></div><div class="label" data-v-35ea0576>STY</div></div><div class="legend" data-v-35ea0576><div class="icon supper-ty" data-v-35ea0576></div><div class="label" data-v-35ea0576>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-35ea0576><div class="legend" data-v-35ea0576><div class="icon history" data-v-35ea0576></div><div class="label" data-v-35ea0576>History</div></div><div class="legend" data-v-35ea0576><div class="icon r7" data-v-35ea0576></div><div class="label" data-v-35ea0576>35kts Radii</div></div><div class="legend" data-v-35ea0576><div class="icon r10" data-v-35ea0576></div><div class="label" data-v-35ea0576>50kts Radii</div></div></div>', 3))
|
|
4191
4642
|
]),
|
|
4192
|
-
l("div",
|
|
4643
|
+
l("div", ha, [
|
|
4193
4644
|
l("div", {
|
|
4194
4645
|
class: "button",
|
|
4195
|
-
onClick: e[1] || (e[1] = (
|
|
4646
|
+
onClick: e[1] || (e[1] = (w) => o.handleStrikeProbability(i.activeTropicals))
|
|
4196
4647
|
}, "Strike Probability >>")
|
|
4197
4648
|
])
|
|
4198
4649
|
])
|
|
4199
4650
|
], 512)), [
|
|
4200
|
-
[
|
|
4651
|
+
[ze, i.showTropicals && !a.$attrs.hideTropicalsLegend]
|
|
4201
4652
|
]);
|
|
4202
4653
|
}
|
|
4203
|
-
const
|
|
4204
|
-
const
|
|
4654
|
+
const Oe = /* @__PURE__ */ T(Xt, [["render", pa], ["__scopeId", "data-v-35ea0576"]]);
|
|
4655
|
+
const da = {
|
|
4205
4656
|
name: "IdmPrecip3h",
|
|
4206
4657
|
props: {
|
|
4207
4658
|
factor: {
|
|
@@ -4289,7 +4740,7 @@ const ca = {
|
|
|
4289
4740
|
[1, "rgba(197,5,58,0.8)"]
|
|
4290
4741
|
];
|
|
4291
4742
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4292
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4743
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.fragmentSchema);
|
|
4293
4744
|
this.program = e, this.aPositionBuffer = t;
|
|
4294
4745
|
}
|
|
4295
4746
|
},
|
|
@@ -4302,13 +4753,13 @@ const ca = {
|
|
|
4302
4753
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4303
4754
|
}
|
|
4304
4755
|
}
|
|
4305
|
-
},
|
|
4306
|
-
function
|
|
4756
|
+
}, ma = { key: 0 };
|
|
4757
|
+
function ua(a, e, t, r, i, o) {
|
|
4307
4758
|
var n;
|
|
4308
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
4759
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", ma, [
|
|
4309
4760
|
l("div", {
|
|
4310
4761
|
class: "legend-bars flex-center",
|
|
4311
|
-
style:
|
|
4762
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4312
4763
|
}, e[0] || (e[0] = [
|
|
4313
4764
|
l("span", null, "mm", -1),
|
|
4314
4765
|
l("span", null, "1.5", -1),
|
|
@@ -4321,8 +4772,8 @@ function da(a, e, t, r, i, o) {
|
|
|
4321
4772
|
]), 4)
|
|
4322
4773
|
])) : B("", !0);
|
|
4323
4774
|
}
|
|
4324
|
-
const
|
|
4325
|
-
const
|
|
4775
|
+
const ya = /* @__PURE__ */ T(da, [["render", ua], ["__scopeId", "data-v-39b1d5ab"]]);
|
|
4776
|
+
const fa = {
|
|
4326
4777
|
name: "IdmVisibility",
|
|
4327
4778
|
props: {
|
|
4328
4779
|
factor: {
|
|
@@ -4403,7 +4854,7 @@ const ma = {
|
|
|
4403
4854
|
[1, "rgba(144,144,144,0)"]
|
|
4404
4855
|
];
|
|
4405
4856
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4406
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4857
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.fragmentSchema);
|
|
4407
4858
|
this.program = e, this.aPositionBuffer = t;
|
|
4408
4859
|
}
|
|
4409
4860
|
},
|
|
@@ -4416,13 +4867,13 @@ const ma = {
|
|
|
4416
4867
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4417
4868
|
}
|
|
4418
4869
|
}
|
|
4419
|
-
},
|
|
4420
|
-
function
|
|
4870
|
+
}, ga = { key: 0 };
|
|
4871
|
+
function ba(a, e, t, r, i, o) {
|
|
4421
4872
|
var n;
|
|
4422
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
4873
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", ga, [
|
|
4423
4874
|
l("div", {
|
|
4424
4875
|
class: "legend-bars flex-center",
|
|
4425
|
-
style:
|
|
4876
|
+
style: $([{ position: "absolute" }, { right: a.right + "px", bottom: t.bottom }])
|
|
4426
4877
|
}, e[0] || (e[0] = [
|
|
4427
4878
|
l("span", null, "nm", -1),
|
|
4428
4879
|
l("span", null, "0", -1),
|
|
@@ -4433,8 +4884,8 @@ function ya(a, e, t, r, i, o) {
|
|
|
4433
4884
|
]), 4)
|
|
4434
4885
|
])) : B("", !0);
|
|
4435
4886
|
}
|
|
4436
|
-
const
|
|
4437
|
-
const
|
|
4887
|
+
const va = /* @__PURE__ */ T(fa, [["render", ba], ["__scopeId", "data-v-b05a7795"]]);
|
|
4888
|
+
const wa = {
|
|
4438
4889
|
name: "IdmWaterTemp",
|
|
4439
4890
|
props: {
|
|
4440
4891
|
factor: {
|
|
@@ -4523,7 +4974,7 @@ const ga = {
|
|
|
4523
4974
|
//
|
|
4524
4975
|
];
|
|
4525
4976
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4526
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
4977
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.fragmentSchema);
|
|
4527
4978
|
this.program = e, this.aPositionBuffer = t;
|
|
4528
4979
|
}
|
|
4529
4980
|
},
|
|
@@ -4536,13 +4987,13 @@ const ga = {
|
|
|
4536
4987
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4537
4988
|
}
|
|
4538
4989
|
}
|
|
4539
|
-
},
|
|
4540
|
-
function
|
|
4990
|
+
}, La = { key: 0 };
|
|
4991
|
+
function xa(a, e, t, r, i, o) {
|
|
4541
4992
|
var n;
|
|
4542
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
4993
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", La, [
|
|
4543
4994
|
l("div", {
|
|
4544
4995
|
class: "legend-bars flex-center",
|
|
4545
|
-
style:
|
|
4996
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4546
4997
|
}, e[0] || (e[0] = [
|
|
4547
4998
|
l("span", null, "°C", -1),
|
|
4548
4999
|
l("span", null, "0", -1),
|
|
@@ -4553,8 +5004,8 @@ function va(a, e, t, r, i, o) {
|
|
|
4553
5004
|
]), 4)
|
|
4554
5005
|
])) : B("", !0);
|
|
4555
5006
|
}
|
|
4556
|
-
const
|
|
4557
|
-
const
|
|
5007
|
+
const _a = /* @__PURE__ */ T(wa, [["render", xa], ["__scopeId", "data-v-7653aa0c"]]);
|
|
5008
|
+
const Ca = {
|
|
4558
5009
|
name: "IdmTemp",
|
|
4559
5010
|
props: {
|
|
4560
5011
|
factor: {
|
|
@@ -4646,7 +5097,7 @@ const wa = {
|
|
|
4646
5097
|
[1, "rgb(138, 43, 10)"]
|
|
4647
5098
|
];
|
|
4648
5099
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4649
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
5100
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.fragmentSchema);
|
|
4650
5101
|
this.program = e, this.aPositionBuffer = t;
|
|
4651
5102
|
}
|
|
4652
5103
|
},
|
|
@@ -4659,13 +5110,13 @@ const wa = {
|
|
|
4659
5110
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4660
5111
|
}
|
|
4661
5112
|
}
|
|
4662
|
-
},
|
|
4663
|
-
function
|
|
5113
|
+
}, ka = { key: 0 };
|
|
5114
|
+
function Sa(a, e, t, r, i, o) {
|
|
4664
5115
|
var n;
|
|
4665
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
5116
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", ka, [
|
|
4666
5117
|
l("div", {
|
|
4667
5118
|
class: "legend-bars flex-center",
|
|
4668
|
-
style:
|
|
5119
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4669
5120
|
}, e[0] || (e[0] = [
|
|
4670
5121
|
l("span", null, "°C", -1),
|
|
4671
5122
|
l("span", null, "-20", -1),
|
|
@@ -4678,8 +5129,8 @@ function _a(a, e, t, r, i, o) {
|
|
|
4678
5129
|
]), 4)
|
|
4679
5130
|
])) : B("", !0);
|
|
4680
5131
|
}
|
|
4681
|
-
const
|
|
4682
|
-
const
|
|
5132
|
+
const za = /* @__PURE__ */ T(Ca, [["render", Sa], ["__scopeId", "data-v-33206ed4"]]);
|
|
5133
|
+
const Pa = {
|
|
4683
5134
|
name: "IdmArctic",
|
|
4684
5135
|
props: {
|
|
4685
5136
|
factor: {
|
|
@@ -4762,7 +5213,7 @@ const Sa = {
|
|
|
4762
5213
|
// 2m
|
|
4763
5214
|
];
|
|
4764
5215
|
this.rampColor = this.webgl.setup(this.context, a);
|
|
4765
|
-
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context,
|
|
5216
|
+
const { program: e, aPositionBuffer: t } = this.webgl.bind(this.context, W.vertexSchema, W.fragmentSchema);
|
|
4766
5217
|
this.program = e, this.aPositionBuffer = t;
|
|
4767
5218
|
}
|
|
4768
5219
|
},
|
|
@@ -4775,13 +5226,13 @@ const Sa = {
|
|
|
4775
5226
|
this.webgl.draw(this.viewport, this.context, this.program, this.texture, this.rampColor.texture, this.aPositionBuffer), this.viewport.toggle(!0);
|
|
4776
5227
|
}
|
|
4777
5228
|
}
|
|
4778
|
-
},
|
|
4779
|
-
function
|
|
5229
|
+
}, Ta = { key: 0 };
|
|
5230
|
+
function Ra(a, e, t, r, i, o) {
|
|
4780
5231
|
var n;
|
|
4781
|
-
return (n = t.factor) != null && n.active ? (x(), _("div",
|
|
5232
|
+
return (n = t.factor) != null && n.active ? (x(), _("div", Ta, [
|
|
4782
5233
|
l("div", {
|
|
4783
5234
|
class: "legend-bars flex-center",
|
|
4784
|
-
style:
|
|
5235
|
+
style: $([{ position: "absolute" }, { right: i.right + "px", bottom: t.bottom }])
|
|
4785
5236
|
}, e[0] || (e[0] = [
|
|
4786
5237
|
l("span", null, "m", -1),
|
|
4787
5238
|
l("span", null, "0", -1),
|
|
@@ -4792,8 +5243,8 @@ function za(a, e, t, r, i, o) {
|
|
|
4792
5243
|
]), 4)
|
|
4793
5244
|
])) : B("", !0);
|
|
4794
5245
|
}
|
|
4795
|
-
const
|
|
4796
|
-
const
|
|
5246
|
+
const Ea = /* @__PURE__ */ T(Pa, [["render", Ra], ["__scopeId", "data-v-76e7bf8f"]]);
|
|
5247
|
+
const Ia = {
|
|
4797
5248
|
name: "IdmPoint",
|
|
4798
5249
|
emits: ["point", "more"],
|
|
4799
5250
|
props: {
|
|
@@ -4815,7 +5266,7 @@ const Ta = {
|
|
|
4815
5266
|
return {
|
|
4816
5267
|
showMeteo: !1,
|
|
4817
5268
|
meteoMarker: void 0,
|
|
4818
|
-
helper:
|
|
5269
|
+
helper: _e
|
|
4819
5270
|
};
|
|
4820
5271
|
},
|
|
4821
5272
|
watch: {
|
|
@@ -4848,17 +5299,17 @@ const Ta = {
|
|
|
4848
5299
|
},
|
|
4849
5300
|
computeLat() {
|
|
4850
5301
|
return function(a, e = 4) {
|
|
4851
|
-
return
|
|
5302
|
+
return D.lat2pretty(a, e).pretty;
|
|
4852
5303
|
};
|
|
4853
5304
|
},
|
|
4854
5305
|
computeLng() {
|
|
4855
5306
|
return function(a, e = 4) {
|
|
4856
|
-
return
|
|
5307
|
+
return D.lng2pretty(a, e).pretty;
|
|
4857
5308
|
};
|
|
4858
5309
|
},
|
|
4859
5310
|
roundPrecision() {
|
|
4860
5311
|
return function(a, e = 4) {
|
|
4861
|
-
return isNaN(a) ? "-" :
|
|
5312
|
+
return isNaN(a) ? "-" : D.roundPrecision(a, e);
|
|
4862
5313
|
};
|
|
4863
5314
|
}
|
|
4864
5315
|
},
|
|
@@ -4880,67 +5331,67 @@ const Ta = {
|
|
|
4880
5331
|
}
|
|
4881
5332
|
}
|
|
4882
5333
|
}
|
|
4883
|
-
},
|
|
5334
|
+
}, Aa = {
|
|
4884
5335
|
id: "point-meteo",
|
|
4885
5336
|
class: "point-meteo"
|
|
4886
|
-
},
|
|
4887
|
-
function
|
|
4888
|
-
var n, s, c, h,
|
|
4889
|
-
return Se((x(), _("div",
|
|
4890
|
-
l("div",
|
|
4891
|
-
l("div",
|
|
5337
|
+
}, Da = { class: "meteo-box" }, Ma = { class: "header-box" }, ja = { class: "main" }, Ba = { class: "sub" }, Na = { class: "main-box" }, Wa = { class: "flex-space" }, Oa = { class: "flex-space" }, Fa = { class: "flex-space" }, $a = { class: "flex-space" }, Va = { class: "flex-space" }, Ua = { class: "flex-space" }, Za = { class: "flex-space" }, Ha = { class: "flex-space" }, Ga = { class: "flex-space" };
|
|
5338
|
+
function Ja(a, e, t, r, i, o) {
|
|
5339
|
+
var n, s, c, h, p, d, g, u, y, f, m, v, b, L, S, w, A, M, N, O, F, H, re, oe, se, ne, le, ce, he, K, G, J, pe, X, R, V, de, Y, me, ee, te, ae, ge, be, ve, we, Le;
|
|
5340
|
+
return Se((x(), _("div", Aa, [
|
|
5341
|
+
l("div", Da, [
|
|
5342
|
+
l("div", Ma, [
|
|
4892
5343
|
l("div", {
|
|
4893
5344
|
class: "iconfont close",
|
|
4894
|
-
onClick: e[0] || (e[0] = (
|
|
5345
|
+
onClick: e[0] || (e[0] = (Pe) => i.showMeteo = !1)
|
|
4895
5346
|
}, ""),
|
|
4896
|
-
l("div",
|
|
4897
|
-
l("div",
|
|
5347
|
+
l("div", ja, k(o.computeLat((n = t.meteo) == null ? void 0 : n.lat)) + "," + k(o.computeLng((s = t.meteo) == null ? void 0 : s.lng)), 1),
|
|
5348
|
+
l("div", Ba, k(o.computeTime((c = t.meteo) == null ? void 0 : c.utc)), 1)
|
|
4898
5349
|
]),
|
|
4899
|
-
l("div",
|
|
4900
|
-
l("div",
|
|
5350
|
+
l("div", Na, [
|
|
5351
|
+
l("div", Wa, [
|
|
4901
5352
|
e[1] || (e[1] = l("label", null, "Wind", -1)),
|
|
4902
|
-
l("span", null,
|
|
5353
|
+
l("span", null, k(((p = (h = t.meteo) == null ? void 0 : h.wind) == null ? void 0 : p.direction) || "-") + "/" + k(o.roundPrecision((g = (d = t.meteo) == null ? void 0 : d.wind) == null ? void 0 : g.kts, 1)) + "[kts]/" + k((y = (u = t.meteo) == null ? void 0 : u.wind) == null ? void 0 : y.scale) + "[BF]/" + k(o.roundPrecision((m = (f = t.meteo) == null ? void 0 : f.gusts) == null ? void 0 : m.kts, 1)) + "[kts]", 1)
|
|
4903
5354
|
]),
|
|
4904
5355
|
l("div", Oa, [
|
|
4905
5356
|
e[2] || (e[2] = l("label", null, "Wind.Wave", -1)),
|
|
4906
|
-
l("span", null,
|
|
5357
|
+
l("span", null, k(((L = (b = (v = t.meteo) == null ? void 0 : v.wave) == null ? void 0 : b.wd) == null ? void 0 : L.direction) || "-") + "/" + k(o.roundPrecision((A = (w = (S = t.meteo) == null ? void 0 : S.wave) == null ? void 0 : w.wd) == null ? void 0 : A.height, 1)) + "[m]/" + k(o.roundPrecision((O = (N = (M = t.meteo) == null ? void 0 : M.wave) == null ? void 0 : N.wd) == null ? void 0 : O.period, 1)) + "[s]", 1)
|
|
4907
5358
|
]),
|
|
4908
|
-
l("div",
|
|
5359
|
+
l("div", Fa, [
|
|
4909
5360
|
e[3] || (e[3] = l("label", null, "Swell", -1)),
|
|
4910
|
-
l("span", null,
|
|
5361
|
+
l("span", null, k(((re = (H = (F = t.meteo) == null ? void 0 : F.wave) == null ? void 0 : H.swell) == null ? void 0 : re.direction) || "-") + "/" + k(o.roundPrecision((ne = (se = (oe = t.meteo) == null ? void 0 : oe.wave) == null ? void 0 : se.swell) == null ? void 0 : ne.height, 1)) + "[m]/" + k(o.roundPrecision((he = (ce = (le = t.meteo) == null ? void 0 : le.wave) == null ? void 0 : ce.swell) == null ? void 0 : he.period, 1)) + "[s]", 1)
|
|
4911
5362
|
]),
|
|
4912
|
-
l("div",
|
|
5363
|
+
l("div", $a, [
|
|
4913
5364
|
e[4] || (e[4] = l("label", null, "Sig.Wave", -1)),
|
|
4914
|
-
l("span", null,
|
|
5365
|
+
l("span", null, k(((J = (G = (K = t.meteo) == null ? void 0 : K.wave) == null ? void 0 : G.sig) == null ? void 0 : J.direction) || "-") + "/" + k(o.roundPrecision((R = (X = (pe = t.meteo) == null ? void 0 : pe.wave) == null ? void 0 : X.sig) == null ? void 0 : R.height, 1)) + "[m]/" + k(o.roundPrecision((Y = (de = (V = t.meteo) == null ? void 0 : V.wave) == null ? void 0 : de.sig) == null ? void 0 : Y.period, 1)) + "[s]", 1)
|
|
4915
5366
|
]),
|
|
4916
|
-
l("div",
|
|
5367
|
+
l("div", Va, [
|
|
4917
5368
|
e[5] || (e[5] = l("label", null, "Current", -1)),
|
|
4918
|
-
l("span", null,
|
|
5369
|
+
l("span", null, k(((ee = (me = t.meteo) == null ? void 0 : me.current) == null ? void 0 : ee.direction) || "-") + "/" + k(o.roundPrecision((ae = (te = t.meteo) == null ? void 0 : te.current) == null ? void 0 : ae.kts, 2)) + "[kts]", 1)
|
|
4919
5370
|
]),
|
|
4920
|
-
l("div",
|
|
5371
|
+
l("div", Ua, [
|
|
4921
5372
|
e[6] || (e[6] = l("label", null, "Precip", -1)),
|
|
4922
|
-
l("span", null,
|
|
5373
|
+
l("span", null, k(o.roundPrecision((be = (ge = t.meteo) == null ? void 0 : ge.precip) == null ? void 0 : be.inter6h, 2)) + "[mm]", 1)
|
|
4923
5374
|
]),
|
|
4924
|
-
l("div",
|
|
5375
|
+
l("div", Za, [
|
|
4925
5376
|
e[7] || (e[7] = l("label", null, "Visibility", -1)),
|
|
4926
|
-
l("span", null,
|
|
5377
|
+
l("span", null, k(o.roundPrecision(((ve = t.meteo) == null ? void 0 : ve.visibility) / 1852, 0)) + "[nm]", 1)
|
|
4927
5378
|
]),
|
|
4928
|
-
l("div",
|
|
5379
|
+
l("div", Ha, [
|
|
4929
5380
|
e[8] || (e[8] = l("label", null, "Temp", -1)),
|
|
4930
|
-
l("span", null,
|
|
5381
|
+
l("span", null, k(o.roundPrecision((we = t.meteo) == null ? void 0 : we.temp, 0)) + "[°C]", 1)
|
|
4931
5382
|
]),
|
|
4932
|
-
l("div",
|
|
5383
|
+
l("div", Ga, [
|
|
4933
5384
|
e[9] || (e[9] = l("label", null, "Water Temp", -1)),
|
|
4934
|
-
l("span", null,
|
|
5385
|
+
l("span", null, k(o.roundPrecision((Le = t.meteo) == null ? void 0 : Le.waterTemp, 2)) + "[°C]", 1)
|
|
4935
5386
|
])
|
|
4936
5387
|
]),
|
|
4937
5388
|
B("", !0)
|
|
4938
5389
|
])
|
|
4939
5390
|
], 512)), [
|
|
4940
|
-
[
|
|
5391
|
+
[ze, i.showMeteo]
|
|
4941
5392
|
]);
|
|
4942
5393
|
}
|
|
4943
|
-
const
|
|
5394
|
+
const Xa = /* @__PURE__ */ T(Ia, [["render", Ja], ["__scopeId", "data-v-d13117a4"]]), Ya = {
|
|
4944
5395
|
name: "IdmWarZone",
|
|
4945
5396
|
props: {
|
|
4946
5397
|
map: {
|
|
@@ -5030,10 +5481,10 @@ const Ha = /* @__PURE__ */ T(Ta, [["render", Za], ["__scopeId", "data-v-d5a13fce
|
|
|
5030
5481
|
}
|
|
5031
5482
|
}
|
|
5032
5483
|
};
|
|
5033
|
-
function
|
|
5484
|
+
function qa(a, e, t, r, i, o) {
|
|
5034
5485
|
return x(), _("div");
|
|
5035
5486
|
}
|
|
5036
|
-
const
|
|
5487
|
+
const Qa = /* @__PURE__ */ T(Ya, [["render", qa]]), Ka = {
|
|
5037
5488
|
name: "IdmGmdssArea",
|
|
5038
5489
|
props: {
|
|
5039
5490
|
map: {
|
|
@@ -5153,10 +5604,10 @@ const Xa = /* @__PURE__ */ T(Ga, [["render", Ja]]), qa = {
|
|
|
5153
5604
|
}
|
|
5154
5605
|
}
|
|
5155
5606
|
};
|
|
5156
|
-
function
|
|
5607
|
+
function ei(a, e, t, r, i, o) {
|
|
5157
5608
|
return x(), _("div");
|
|
5158
5609
|
}
|
|
5159
|
-
const
|
|
5610
|
+
const ti = /* @__PURE__ */ T(Ka, [["render", ei]]), ai = {
|
|
5160
5611
|
name: "IdmEcaZone",
|
|
5161
5612
|
props: {
|
|
5162
5613
|
map: {
|
|
@@ -5244,11 +5695,11 @@ const Qa = /* @__PURE__ */ T(qa, [["render", Ya]]), Ka = {
|
|
|
5244
5695
|
}
|
|
5245
5696
|
}
|
|
5246
5697
|
};
|
|
5247
|
-
function
|
|
5698
|
+
function ii(a, e, t, r, i, o) {
|
|
5248
5699
|
return x(), _("div");
|
|
5249
5700
|
}
|
|
5250
|
-
const
|
|
5251
|
-
const
|
|
5701
|
+
const ri = /* @__PURE__ */ T(ai, [["render", ii]]);
|
|
5702
|
+
const oi = {
|
|
5252
5703
|
name: "IdmAlertZone",
|
|
5253
5704
|
props: {
|
|
5254
5705
|
map: {
|
|
@@ -5378,10 +5829,10 @@ const ai = {
|
|
|
5378
5829
|
this.map.getLayer(this.polygonLayer) && this.map.removeLayer(this.polygonLayer), this.map.getLayer(this.polygonLayer + "-border") && this.map.removeLayer(this.polygonLayer + "-border"), this.map.getLayer(this.polygonLabelLayer) && this.map.removeLayer(this.polygonLabelLayer), this.map.getLayer(this.lineLayer) && this.map.removeLayer(this.lineLayer), this.map.getLayer(this.lineLabelLayer) && this.map.removeLayer(this.lineLabelLayer), this.map.getLayer(this.pointLayer) && this.map.removeLayer(this.pointLayer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
5379
5830
|
}
|
|
5380
5831
|
}
|
|
5381
|
-
},
|
|
5382
|
-
function
|
|
5832
|
+
}, si = { id: "idm-gl3-zone-info" }, ni = ["innerHTML"];
|
|
5833
|
+
function li(a, e, t, r, i, o) {
|
|
5383
5834
|
var n;
|
|
5384
|
-
return Se((x(), _("div",
|
|
5835
|
+
return Se((x(), _("div", si, [
|
|
5385
5836
|
l("div", {
|
|
5386
5837
|
class: "iconfont close",
|
|
5387
5838
|
onClick: e[0] || (e[0] = (s) => i.showZone = !1)
|
|
@@ -5389,13 +5840,13 @@ function oi(a, e, t, r, i, o) {
|
|
|
5389
5840
|
l("div", {
|
|
5390
5841
|
class: "rich-context",
|
|
5391
5842
|
innerHTML: (n = i.form) == null ? void 0 : n.name
|
|
5392
|
-
}, null, 8,
|
|
5843
|
+
}, null, 8, ni)
|
|
5393
5844
|
], 512)), [
|
|
5394
|
-
[
|
|
5845
|
+
[ze, i.showZone]
|
|
5395
5846
|
]);
|
|
5396
5847
|
}
|
|
5397
|
-
const
|
|
5398
|
-
const
|
|
5848
|
+
const ci = /* @__PURE__ */ T(oi, [["render", li]]);
|
|
5849
|
+
const hi = {
|
|
5399
5850
|
name: "IdmPort",
|
|
5400
5851
|
props: {
|
|
5401
5852
|
map: {
|
|
@@ -5421,12 +5872,12 @@ const ni = {
|
|
|
5421
5872
|
computed: {
|
|
5422
5873
|
computeLat() {
|
|
5423
5874
|
return function(a) {
|
|
5424
|
-
return
|
|
5875
|
+
return D.lat2pretty(a, 4).pretty;
|
|
5425
5876
|
};
|
|
5426
5877
|
},
|
|
5427
5878
|
computeLng() {
|
|
5428
5879
|
return function(a) {
|
|
5429
|
-
return
|
|
5880
|
+
return D.lng2pretty(a, 4).pretty;
|
|
5430
5881
|
};
|
|
5431
5882
|
}
|
|
5432
5883
|
},
|
|
@@ -5487,41 +5938,41 @@ const ni = {
|
|
|
5487
5938
|
this.showPort = !1, this.map.getLayer(this.layer) && this.map.removeLayer(this.layer), this.map.getSource(this.source) && this.map.removeSource(this.source);
|
|
5488
5939
|
}
|
|
5489
5940
|
}
|
|
5490
|
-
},
|
|
5941
|
+
}, pi = { id: "port-info" }, di = { class: "port-box" }, mi = { class: "flex-start" }, ui = { class: "flex-start" }, yi = { class: "flex-start" }, fi = {
|
|
5491
5942
|
class: "flex-start",
|
|
5492
5943
|
style: { "align-items": "flex-start" }
|
|
5493
5944
|
};
|
|
5494
|
-
function
|
|
5495
|
-
return Se((x(), _("div",
|
|
5945
|
+
function gi(a, e, t, r, i, o) {
|
|
5946
|
+
return Se((x(), _("div", pi, [
|
|
5496
5947
|
l("div", {
|
|
5497
5948
|
class: "close iconfont",
|
|
5498
5949
|
onClick: e[0] || (e[0] = (n) => i.showPort = !1)
|
|
5499
5950
|
}, ""),
|
|
5500
|
-
l("div",
|
|
5501
|
-
l("div",
|
|
5951
|
+
l("div", di, [
|
|
5952
|
+
l("div", mi, [
|
|
5502
5953
|
e[2] || (e[2] = l("label", null, "Name : ", -1)),
|
|
5503
5954
|
l("span", {
|
|
5504
5955
|
onClick: e[1] || (e[1] = (...n) => o.handleEmit && o.handleEmit(...n))
|
|
5505
|
-
},
|
|
5956
|
+
}, k(i.form.name), 1)
|
|
5506
5957
|
]),
|
|
5507
|
-
l("div",
|
|
5958
|
+
l("div", ui, [
|
|
5508
5959
|
e[3] || (e[3] = l("label", null, "Position : ", -1)),
|
|
5509
|
-
l("span", null,
|
|
5960
|
+
l("span", null, k(o.computeLat(i.form.lat)) + ", " + k(o.computeLng(i.form.lng)), 1)
|
|
5510
5961
|
]),
|
|
5511
|
-
l("div",
|
|
5962
|
+
l("div", yi, [
|
|
5512
5963
|
e[4] || (e[4] = l("label", null, "LoCode : ", -1)),
|
|
5513
|
-
l("span", null,
|
|
5964
|
+
l("span", null, k(i.form.loCode || "-"), 1)
|
|
5514
5965
|
]),
|
|
5515
|
-
l("div",
|
|
5966
|
+
l("div", fi, [
|
|
5516
5967
|
e[5] || (e[5] = l("label", null, "Region : ", -1)),
|
|
5517
|
-
l("span", null,
|
|
5968
|
+
l("span", null, k(i.form.zoneName || "-"), 1)
|
|
5518
5969
|
])
|
|
5519
5970
|
])
|
|
5520
5971
|
], 512)), [
|
|
5521
|
-
[
|
|
5972
|
+
[ze, i.showPort]
|
|
5522
5973
|
]);
|
|
5523
5974
|
}
|
|
5524
|
-
const
|
|
5975
|
+
const bi = /* @__PURE__ */ T(hi, [["render", gi], ["__scopeId", "data-v-035470f6"]]), vi = {
|
|
5525
5976
|
name: "IdmLoadLine",
|
|
5526
5977
|
props: {
|
|
5527
5978
|
map: {
|
|
@@ -5591,10 +6042,10 @@ const yi = /* @__PURE__ */ T(ni, [["render", ui], ["__scopeId", "data-v-035470f6
|
|
|
5591
6042
|
}
|
|
5592
6043
|
}
|
|
5593
6044
|
};
|
|
5594
|
-
function
|
|
6045
|
+
function wi(a, e, t, r, i, o) {
|
|
5595
6046
|
return x(), _("div");
|
|
5596
6047
|
}
|
|
5597
|
-
const
|
|
6048
|
+
const Li = /* @__PURE__ */ T(vi, [["render", wi]]), xi = {
|
|
5598
6049
|
name: "IdmTimezone",
|
|
5599
6050
|
props: {
|
|
5600
6051
|
map: {
|
|
@@ -5759,10 +6210,10 @@ const bi = /* @__PURE__ */ T(fi, [["render", gi]]), vi = {
|
|
|
5759
6210
|
}
|
|
5760
6211
|
}
|
|
5761
6212
|
};
|
|
5762
|
-
function
|
|
6213
|
+
function _i(a, e, t, r, i, o) {
|
|
5763
6214
|
return x(), _("div");
|
|
5764
6215
|
}
|
|
5765
|
-
const
|
|
6216
|
+
const Ci = /* @__PURE__ */ T(xi, [["render", _i]]), ki = {
|
|
5766
6217
|
name: "IdmVoluntaryReportingArea",
|
|
5767
6218
|
props: {
|
|
5768
6219
|
map: {
|
|
@@ -5850,10 +6301,10 @@ const wi = /* @__PURE__ */ T(vi, [["render", Li]]), xi = {
|
|
|
5850
6301
|
}
|
|
5851
6302
|
}
|
|
5852
6303
|
};
|
|
5853
|
-
function
|
|
6304
|
+
function Si(a, e, t, r, i, o) {
|
|
5854
6305
|
return x(), _("div");
|
|
5855
6306
|
}
|
|
5856
|
-
const
|
|
6307
|
+
const zi = /* @__PURE__ */ T(ki, [["render", Si]]), Pi = {
|
|
5857
6308
|
name: "IdmSpecialArea",
|
|
5858
6309
|
props: {
|
|
5859
6310
|
map: {
|
|
@@ -5883,7 +6334,7 @@ const Ci = /* @__PURE__ */ T(xi, [["render", _i]]), Si = {
|
|
|
5883
6334
|
methods: {
|
|
5884
6335
|
handleRender() {
|
|
5885
6336
|
this.map ? (this.handleClear(), this.area && (this.area.features.forEach((a) => {
|
|
5886
|
-
a.geometry.type === "Polygon" && a.geometry.coordinates.forEach((e) =>
|
|
6337
|
+
a.geometry.type === "Polygon" && a.geometry.coordinates.forEach((e) => D.convertToMonotonicLng2(e));
|
|
5887
6338
|
}), this.map.addSource(this.source, {
|
|
5888
6339
|
type: "geojson",
|
|
5889
6340
|
data: this.area
|
|
@@ -5943,10 +6394,10 @@ const Ci = /* @__PURE__ */ T(xi, [["render", _i]]), Si = {
|
|
|
5943
6394
|
}
|
|
5944
6395
|
}
|
|
5945
6396
|
};
|
|
5946
|
-
function
|
|
6397
|
+
function Ti(a, e, t, r, i, o) {
|
|
5947
6398
|
return x(), _("div");
|
|
5948
6399
|
}
|
|
5949
|
-
const
|
|
6400
|
+
const Ri = /* @__PURE__ */ T(Pi, [["render", Ti]]), Ei = {
|
|
5950
6401
|
name: "IdmTerminator",
|
|
5951
6402
|
props: {
|
|
5952
6403
|
map: {
|
|
@@ -5995,11 +6446,11 @@ const zi = /* @__PURE__ */ T(Si, [["render", ki]]), Pi = {
|
|
|
5995
6446
|
}
|
|
5996
6447
|
}
|
|
5997
6448
|
};
|
|
5998
|
-
function
|
|
6449
|
+
function Ii(a, e, t, r, i, o) {
|
|
5999
6450
|
return x(), _("div");
|
|
6000
6451
|
}
|
|
6001
|
-
const
|
|
6002
|
-
const
|
|
6452
|
+
const Ai = /* @__PURE__ */ T(Ei, [["render", Ii]]);
|
|
6453
|
+
const Di = {
|
|
6003
6454
|
name: "IdmLatLng",
|
|
6004
6455
|
props: {
|
|
6005
6456
|
map: {
|
|
@@ -6057,7 +6508,7 @@ const Ei = {
|
|
|
6057
6508
|
this.show ? ((a = this.map) == null || a.on("zoomend", this.handleZoomEnd), this.handleRender()) : (this.handleClear(), (e = this.map) == null || e.off("zoomend", this.handleZoomEnd));
|
|
6058
6509
|
},
|
|
6059
6510
|
handleMouseMove(a) {
|
|
6060
|
-
const e = a.lngLat, t =
|
|
6511
|
+
const e = a.lngLat, t = D.lng2pretty(e.lng, 2), r = D.lat2pretty(e.lat, 2);
|
|
6061
6512
|
this.lngLat = { lng: t, lat: r };
|
|
6062
6513
|
},
|
|
6063
6514
|
handleComputeLatLngs() {
|
|
@@ -6155,18 +6606,18 @@ const Ei = {
|
|
|
6155
6606
|
}
|
|
6156
6607
|
}
|
|
6157
6608
|
};
|
|
6158
|
-
function
|
|
6609
|
+
function Mi(a, e, t, r, i, o) {
|
|
6159
6610
|
return i.lngLat ? (x(), _("div", {
|
|
6160
6611
|
key: 0,
|
|
6161
6612
|
class: "lat-lng-tip",
|
|
6162
|
-
style:
|
|
6613
|
+
style: $({ right: i.right + "px", bottom: t.bottom })
|
|
6163
6614
|
}, [
|
|
6164
|
-
l("span", null,
|
|
6615
|
+
l("span", null, k(i.lngLat.lat.pretty), 1),
|
|
6165
6616
|
e[0] || (e[0] = l("span", null, ", ", -1)),
|
|
6166
|
-
l("span", null,
|
|
6617
|
+
l("span", null, k(i.lngLat.lng.pretty), 1)
|
|
6167
6618
|
], 4)) : B("", !0);
|
|
6168
6619
|
}
|
|
6169
|
-
const
|
|
6620
|
+
const Fe = /* @__PURE__ */ T(Di, [["render", Mi], ["__scopeId", "data-v-b0d1ad79"]]), ji = {
|
|
6170
6621
|
name: "IdmMeasure",
|
|
6171
6622
|
props: {
|
|
6172
6623
|
map: {
|
|
@@ -6212,8 +6663,8 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6212
6663
|
(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");
|
|
6213
6664
|
else {
|
|
6214
6665
|
(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);
|
|
6215
|
-
for (const
|
|
6216
|
-
this.handleClear(
|
|
6666
|
+
for (const p of this.geojson)
|
|
6667
|
+
this.handleClear(p, !0);
|
|
6217
6668
|
this.geojson = [], this.map && (this.map.getCanvas().style.cursor = "grab");
|
|
6218
6669
|
}
|
|
6219
6670
|
},
|
|
@@ -6225,7 +6676,7 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6225
6676
|
}
|
|
6226
6677
|
},
|
|
6227
6678
|
handleDrag(a) {
|
|
6228
|
-
var t, r, i, o, n, s, c, h,
|
|
6679
|
+
var t, r, i, o, n, s, c, h, p, d;
|
|
6229
6680
|
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6230
6681
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6231
6682
|
const g = this.geojson.filter((m) => m.id === e.split("-")[0])[0];
|
|
@@ -6244,13 +6695,13 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6244
6695
|
this.handleTmpPointUpdate(
|
|
6245
6696
|
g,
|
|
6246
6697
|
f[y - 1],
|
|
6247
|
-
{ lng: (h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (
|
|
6698
|
+
{ lng: (h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, lat: (d = (p = a.target) == null ? void 0 : p._lngLat) == null ? void 0 : d.lat, properties: f[y].properties },
|
|
6248
6699
|
y === f.length - 1 ? void 0 : f[y + 1]
|
|
6249
6700
|
);
|
|
6250
6701
|
}
|
|
6251
6702
|
},
|
|
6252
6703
|
handleDragEnd(a) {
|
|
6253
|
-
var t, r, i, o, n, s, c, h,
|
|
6704
|
+
var t, r, i, o, n, s, c, h, p, d;
|
|
6254
6705
|
const e = (r = (t = a.target) == null ? void 0 : t._element) == null ? void 0 : r.id;
|
|
6255
6706
|
if ((e == null ? void 0 : e.split("-").length) === 2) {
|
|
6256
6707
|
const g = this.geojson.filter((f) => f.id === e.split("-")[0])[0];
|
|
@@ -6259,7 +6710,7 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6259
6710
|
return ((m = f._element) == null ? void 0 : m.id) === e;
|
|
6260
6711
|
})[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]);
|
|
6261
6712
|
const y = g.features.filter((f) => f.geometry.type === "Point" && f.properties.id == e.split("-")[1])[0];
|
|
6262
|
-
y.geometry.coordinates = [(h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (
|
|
6713
|
+
y.geometry.coordinates = [(h = (c = a.target) == null ? void 0 : c._lngLat) == null ? void 0 : h.lng, (d = (p = a.target) == null ? void 0 : p._lngLat) == null ? void 0 : d.lat], g.features = g.features.filter((f) => f.geometry.type === "Point"), this.handlePointUpdate(g);
|
|
6263
6714
|
}
|
|
6264
6715
|
},
|
|
6265
6716
|
handleContextmenu(a) {
|
|
@@ -6306,12 +6757,12 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6306
6757
|
let t = 0;
|
|
6307
6758
|
const r = [];
|
|
6308
6759
|
for (let i = 1; i < e.length; i++) {
|
|
6309
|
-
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] },
|
|
6310
|
-
t =
|
|
6760
|
+
const o = e[i - 1], n = e[i], s = o.properties, c = { lng: o.geometry.coordinates[0], lat: o.geometry.coordinates[1] }, h = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, p = q.calculateDistance(c, h, s.mode === "RL", 2), d = q.calculateBearing(c, h, s.mode === "RL", 2);
|
|
6761
|
+
t = D.roundPrecision(t + p, 2);
|
|
6311
6762
|
let g;
|
|
6312
|
-
s.mode === "RL" ? g =
|
|
6763
|
+
s.mode === "RL" ? g = D.convertToMonotonicLng([c, h]) : g = D.convertToMonotonicLng(q.interpolateCoordinates(c, h, 200));
|
|
6313
6764
|
const u = C.lineString(g.map((y) => [y.lng, y.lat]));
|
|
6314
|
-
u.properties.dist =
|
|
6765
|
+
u.properties.dist = p, u.properties.bearing = d, u.properties.total = t, r.push(u);
|
|
6315
6766
|
}
|
|
6316
6767
|
e.push(...r), a.total = t;
|
|
6317
6768
|
}
|
|
@@ -6321,19 +6772,19 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6321
6772
|
const i = C.featureCollection([]);
|
|
6322
6773
|
let o, n;
|
|
6323
6774
|
if (e) {
|
|
6324
|
-
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] },
|
|
6325
|
-
o =
|
|
6326
|
-
let
|
|
6327
|
-
c.mode === "RL" ?
|
|
6328
|
-
const g = C.lineString(
|
|
6775
|
+
const c = e.properties, h = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, p = { lng: t.lng, lat: t.lat };
|
|
6776
|
+
o = q.calculateDistance(h, p, c.mode === "RL", 2), n = q.calculateBearing(h, p, c.mode === "RL", 2);
|
|
6777
|
+
let d;
|
|
6778
|
+
c.mode === "RL" ? d = D.convertToMonotonicLng([h, p]) : d = D.convertToMonotonicLng(q.interpolateCoordinates(h, p, 200));
|
|
6779
|
+
const g = C.lineString(d.map((u) => [u.lng, u.lat]));
|
|
6329
6780
|
g.properties.dist = o, g.properties.bearing = n, i.features.push(g);
|
|
6330
6781
|
}
|
|
6331
6782
|
if (r) {
|
|
6332
|
-
const c = t.properties, h = t,
|
|
6333
|
-
o =
|
|
6334
|
-
let
|
|
6335
|
-
c.mode === "RL" ?
|
|
6336
|
-
const g = C.lineString(
|
|
6783
|
+
const c = t.properties, h = t, p = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
|
|
6784
|
+
o = q.calculateDistance(h, p, c.mode === "RL", 2), n = q.calculateBearing(h, p, c.mode === "RL", 2);
|
|
6785
|
+
let d;
|
|
6786
|
+
c.mode === "RL" ? d = D.convertToMonotonicLng([h, p]) : d = D.convertToMonotonicLng(q.interpolateCoordinates(h, p, 200));
|
|
6787
|
+
const g = C.lineString(d.map((u) => [u.lng, u.lat]));
|
|
6337
6788
|
g.properties.dist = o, g.properties.bearing = n, i.features.push(g);
|
|
6338
6789
|
}
|
|
6339
6790
|
this.map.getSource(this.tmpSource) ? this.map.getSource(this.tmpSource).setData(i) : this.map.addSource(this.tmpSource, {
|
|
@@ -6374,7 +6825,7 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6374
6825
|
}
|
|
6375
6826
|
});
|
|
6376
6827
|
let s;
|
|
6377
|
-
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${
|
|
6828
|
+
if (r ? s = '<div class="marker-label">Drag and drop</div>' : s = `<div class="marker-label">Tol distance: <b>${D.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)
|
|
6378
6829
|
this.tipMarker._element.innerHTML = s, this.tipMarker.setLngLat([t.lng, t.lat]);
|
|
6379
6830
|
else {
|
|
6380
6831
|
const c = document.createElement("div");
|
|
@@ -6440,25 +6891,25 @@ const We = /* @__PURE__ */ T(Ei, [["render", Ii], ["__scopeId", "data-v-b0d1ad79
|
|
|
6440
6891
|
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];
|
|
6441
6892
|
}
|
|
6442
6893
|
if (a.closed) {
|
|
6443
|
-
const n = o.at(-1), c = a.features.filter((
|
|
6894
|
+
const n = o.at(-1), c = a.features.filter((p) => p.geometry.type === "LineString").at(-1), h = document.createElement("div");
|
|
6444
6895
|
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 Q.Marker(h).setOffset([60, 0]).setLngLat(n.geometry.coordinates).addTo(this.map);
|
|
6445
6896
|
}
|
|
6446
6897
|
}
|
|
6447
6898
|
},
|
|
6448
6899
|
handleClear(a, e = !0) {
|
|
6449
|
-
var o, n, s, c, h,
|
|
6900
|
+
var o, n, s, c, h, p, d, g, u;
|
|
6450
6901
|
const t = `${a.id}-${this.source}`, r = `${a.id}-${this.layer}`, i = `${a.id}-${this.labelLayer}`;
|
|
6451
|
-
(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, (
|
|
6902
|
+
(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, (p = this.pointMarkers[a.id]) == null || p.forEach((y) => {
|
|
6452
6903
|
y == null || y.remove();
|
|
6453
|
-
}), this.pointMarkers[a.id] = [], (
|
|
6904
|
+
}), this.pointMarkers[a.id] = [], (d = this.tipMarker) == null || d.remove(), this.tipMarker = void 0, e && ((g = this.map) != null && g.getSource(t)) && this.map.removeSource(t), e && ((u = this.map) != null && u.getSource(this.tmpSource)) && this.map.removeSource(this.tmpSource);
|
|
6454
6905
|
}
|
|
6455
6906
|
}
|
|
6456
6907
|
};
|
|
6457
|
-
function
|
|
6908
|
+
function Bi(a, e, t, r, i, o) {
|
|
6458
6909
|
return x(), _("div");
|
|
6459
6910
|
}
|
|
6460
|
-
const
|
|
6461
|
-
const
|
|
6911
|
+
const Ni = /* @__PURE__ */ T(ji, [["render", Bi]]);
|
|
6912
|
+
const Wi = {
|
|
6462
6913
|
name: "IdmENC",
|
|
6463
6914
|
props: {
|
|
6464
6915
|
map: {
|
|
@@ -6489,8 +6940,8 @@ const Bi = {
|
|
|
6489
6940
|
emits: ["enc"],
|
|
6490
6941
|
data() {
|
|
6491
6942
|
return {
|
|
6492
|
-
helper:
|
|
6493
|
-
vendor: this.$attrs.permission &
|
|
6943
|
+
helper: _e,
|
|
6944
|
+
vendor: this.$attrs.permission & _e.LEVEL.Supper ? "hi" : "i4",
|
|
6494
6945
|
right: 10
|
|
6495
6946
|
};
|
|
6496
6947
|
},
|
|
@@ -6510,22 +6961,22 @@ const Bi = {
|
|
|
6510
6961
|
}
|
|
6511
6962
|
},
|
|
6512
6963
|
methods: {}
|
|
6513
|
-
}, Oi = { key: 0 },
|
|
6514
|
-
function
|
|
6964
|
+
}, Oi = { key: 0 }, Fi = { class: "bar-item" };
|
|
6965
|
+
function $i(a, e, t, r, i, o) {
|
|
6515
6966
|
return t.enabled && t.permission & i.helper.LEVEL.Supper ? (x(), _("div", Oi, [
|
|
6516
6967
|
l("div", {
|
|
6517
6968
|
class: "menu-bar-box",
|
|
6518
|
-
style:
|
|
6969
|
+
style: $({ position: "absolute", right: i.right + "px", bottom: t.bottom })
|
|
6519
6970
|
}, [
|
|
6520
|
-
l("div",
|
|
6971
|
+
l("div", Fi, [
|
|
6521
6972
|
l("div", {
|
|
6522
|
-
class:
|
|
6973
|
+
class: j(i.vendor === "hi" ? "menu-icon active" : "menu-icon"),
|
|
6523
6974
|
onClick: e[0] || (e[0] = (n) => i.vendor = "hi")
|
|
6524
6975
|
}, e[2] || (e[2] = [
|
|
6525
6976
|
l("span", { class: "iconfont" }, "HI", -1)
|
|
6526
6977
|
]), 2),
|
|
6527
6978
|
l("div", {
|
|
6528
|
-
class:
|
|
6979
|
+
class: j(i.vendor === "i4" ? "menu-icon active" : "menu-icon"),
|
|
6529
6980
|
onClick: e[1] || (e[1] = (n) => i.vendor = "i4")
|
|
6530
6981
|
}, e[3] || (e[3] = [
|
|
6531
6982
|
l("span", { class: "iconfont" }, "I4", -1)
|
|
@@ -6534,40 +6985,40 @@ function ji(a, e, t, r, i, o) {
|
|
|
6534
6985
|
], 4)
|
|
6535
6986
|
])) : B("", !0);
|
|
6536
6987
|
}
|
|
6537
|
-
const
|
|
6538
|
-
const
|
|
6988
|
+
const Vi = /* @__PURE__ */ T(Wi, [["render", $i], ["__scopeId", "data-v-cda8e470"]]);
|
|
6989
|
+
const Ui = {
|
|
6539
6990
|
name: "IdmGLV2",
|
|
6540
6991
|
components: {
|
|
6541
|
-
IdmGlLayer:
|
|
6542
|
-
IdmWindBarb:
|
|
6543
|
-
IdmWindParticle:
|
|
6544
|
-
IdmCurrents:
|
|
6545
|
-
IdmCurrentParticle:
|
|
6546
|
-
IdmSigWave:
|
|
6547
|
-
IdmSwell:
|
|
6548
|
-
IdmPrmsl:
|
|
6992
|
+
IdmGlLayer: pt,
|
|
6993
|
+
IdmWindBarb: vt,
|
|
6994
|
+
IdmWindParticle: Ct,
|
|
6995
|
+
IdmCurrents: It,
|
|
6996
|
+
IdmCurrentParticle: jt,
|
|
6997
|
+
IdmSigWave: Wt,
|
|
6998
|
+
IdmSwell: $t,
|
|
6999
|
+
IdmPrmsl: Zt,
|
|
6549
7000
|
// IdmIceEdge,
|
|
6550
|
-
IdmIceberg:
|
|
6551
|
-
IdmTropicals:
|
|
6552
|
-
IdmPrecip3h:
|
|
6553
|
-
IdmVisibility:
|
|
6554
|
-
IdmWaterTemp:
|
|
6555
|
-
IdmTemp:
|
|
6556
|
-
IdmArctic:
|
|
6557
|
-
IdmWarZone:
|
|
6558
|
-
IdmGmdssArea:
|
|
6559
|
-
IdmEcaZone:
|
|
6560
|
-
IdmAlertZone:
|
|
6561
|
-
IdmPort:
|
|
6562
|
-
IdmLoadLine:
|
|
6563
|
-
IdmTimezone:
|
|
6564
|
-
IdmVRA:
|
|
6565
|
-
IdmSpecialArea:
|
|
6566
|
-
IdmTerminator:
|
|
6567
|
-
IdmLatLng:
|
|
6568
|
-
IdmMeasure:
|
|
6569
|
-
IdmPoint:
|
|
6570
|
-
IdmENC:
|
|
7001
|
+
IdmIceberg: Jt,
|
|
7002
|
+
IdmTropicals: Oe,
|
|
7003
|
+
IdmPrecip3h: ya,
|
|
7004
|
+
IdmVisibility: va,
|
|
7005
|
+
IdmWaterTemp: _a,
|
|
7006
|
+
IdmTemp: za,
|
|
7007
|
+
IdmArctic: Ea,
|
|
7008
|
+
IdmWarZone: Qa,
|
|
7009
|
+
IdmGmdssArea: ti,
|
|
7010
|
+
IdmEcaZone: ri,
|
|
7011
|
+
IdmAlertZone: ci,
|
|
7012
|
+
IdmPort: bi,
|
|
7013
|
+
IdmLoadLine: Li,
|
|
7014
|
+
IdmTimezone: Ci,
|
|
7015
|
+
IdmVRA: zi,
|
|
7016
|
+
IdmSpecialArea: Ri,
|
|
7017
|
+
IdmTerminator: Ai,
|
|
7018
|
+
IdmLatLng: Fe,
|
|
7019
|
+
IdmMeasure: Ni,
|
|
7020
|
+
IdmPoint: Xa,
|
|
7021
|
+
IdmENC: Vi
|
|
6571
7022
|
},
|
|
6572
7023
|
props: {
|
|
6573
7024
|
map: {
|
|
@@ -6614,7 +7065,7 @@ const $i = {
|
|
|
6614
7065
|
enc: "",
|
|
6615
7066
|
// enc: 'i4',
|
|
6616
7067
|
defaultMeteoToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",
|
|
6617
|
-
helper: new
|
|
7068
|
+
helper: new wt()
|
|
6618
7069
|
};
|
|
6619
7070
|
},
|
|
6620
7071
|
watch: {
|
|
@@ -6628,7 +7079,7 @@ const $i = {
|
|
|
6628
7079
|
},
|
|
6629
7080
|
map: {
|
|
6630
7081
|
handler() {
|
|
6631
|
-
this.map && (this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new
|
|
7082
|
+
this.map && (this.map.on("zoomend", this.handleDragEndWithZoom4Json), this.map.on("dragend", this.handleDragEndWithZoom4Json), this.map.on("move", this.handleDragEndWithZoom4Image), this.viewport = new Re(this.map), this.handleRampColorInitial());
|
|
6632
7083
|
},
|
|
6633
7084
|
immediate: !0
|
|
6634
7085
|
},
|
|
@@ -6640,10 +7091,10 @@ const $i = {
|
|
|
6640
7091
|
},
|
|
6641
7092
|
activeWeatherLayers: {
|
|
6642
7093
|
handler() {
|
|
6643
|
-
var a, e, t, r, i, o, n, s, c, h,
|
|
7094
|
+
var a, e, t, r, i, o, n, s, c, h, p, d, g, u, y, f, m, v;
|
|
6644
7095
|
if (!this.map)
|
|
6645
7096
|
return !1;
|
|
6646
|
-
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)), (
|
|
7097
|
+
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)), (p = this.map) != null && p.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) && ((d = this.map) != null && d.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && this.mapProjection === "mercator" && ((u = this.map) == null || u.moveLayer((g = this.viewport) == null ? void 0 : g.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id))) : ((f = (y = this.map) == null ? void 0 : y.getLayer(this.enc)) == null || f.setLayoutProperty("visibility", "visible"), (v = (m = this.map) == null ? void 0 : m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) == null || v.setLayoutProperty("visibility", "none"));
|
|
6647
7098
|
},
|
|
6648
7099
|
immediate: !0
|
|
6649
7100
|
}
|
|
@@ -6690,13 +7141,13 @@ const $i = {
|
|
|
6690
7141
|
},
|
|
6691
7142
|
methods: {
|
|
6692
7143
|
async fetchWeatherLayers(a = { tropicals: !1 }) {
|
|
6693
|
-
var i, o, n, s, c, h,
|
|
7144
|
+
var i, o, n, s, c, h, p, d;
|
|
6694
7145
|
const e = (/* @__PURE__ */ new Date()).valueOf();
|
|
6695
7146
|
let t = 0, r = 0;
|
|
6696
7147
|
if (this.map) {
|
|
6697
7148
|
const g = ((i = this.map) == null ? void 0 : i.getZoom()) + 1, u = (o = this.map) == null ? void 0 : o.getBounds(), y = `${u._sw.lng},${u._sw.lat},${u._ne.lng},${u._ne.lat}`;
|
|
6698
7149
|
if (this.handleRampColorState(), this.particleFactor) {
|
|
6699
|
-
const f =
|
|
7150
|
+
const f = Ce.WEATHER_LAYERS.find((m) => {
|
|
6700
7151
|
var v;
|
|
6701
7152
|
return ((v = m.peer) == null ? void 0 : v.weight) === this.particleFactor.weight;
|
|
6702
7153
|
});
|
|
@@ -6711,26 +7162,26 @@ const $i = {
|
|
|
6711
7162
|
}
|
|
6712
7163
|
});
|
|
6713
7164
|
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) {
|
|
6714
|
-
const b = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data,
|
|
6715
|
-
for (const
|
|
6716
|
-
|
|
6717
|
-
ie.get(b[
|
|
7165
|
+
const b = (s = v == null ? void 0 : v.data) == null ? void 0 : s.data, L = [];
|
|
7166
|
+
for (const w in b)
|
|
7167
|
+
w === "ice-edge" && (b[w] = "https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"), w !== "tropicals" && L.push(
|
|
7168
|
+
ie.get(b[w], {
|
|
6718
7169
|
headers: {
|
|
6719
7170
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6720
|
-
key:
|
|
7171
|
+
key: w
|
|
6721
7172
|
},
|
|
6722
|
-
responseType: /\.(jpg|png)$/.test(b[
|
|
6723
|
-
}).catch((
|
|
6724
|
-
console.log(`[${
|
|
7173
|
+
responseType: /\.(jpg|png)$/.test(b[w]) ? "blob" : "json"
|
|
7174
|
+
}).catch((A) => {
|
|
7175
|
+
console.log(`[${w}] fetch layer error: ${A}`);
|
|
6725
7176
|
})
|
|
6726
7177
|
);
|
|
6727
|
-
const
|
|
6728
|
-
this.weatherLayers = {},
|
|
6729
|
-
var
|
|
6730
|
-
const
|
|
6731
|
-
|
|
6732
|
-
raw:
|
|
6733
|
-
type: ((H =
|
|
7178
|
+
const S = await Promise.all(L);
|
|
7179
|
+
this.weatherLayers = {}, S.map((w) => {
|
|
7180
|
+
var N, O, F, H;
|
|
7181
|
+
const A = ((N = w == null ? void 0 : w.data) == null ? void 0 : N.data) || (w == null ? void 0 : w.data), M = (F = (O = w == null ? void 0 : w.config) == null ? void 0 : O.headers) == null ? void 0 : F.key;
|
|
7182
|
+
M && A && (this.weatherLayers[M] = {
|
|
7183
|
+
raw: A,
|
|
7184
|
+
type: ((H = w == null ? void 0 : w.config) == null ? void 0 : H.responseType) === "blob" ? "image" : "json",
|
|
6734
7185
|
etime: this.ts
|
|
6735
7186
|
});
|
|
6736
7187
|
}), b.tropicals && ie.get(b.tropicals, {
|
|
@@ -6738,11 +7189,11 @@ const $i = {
|
|
|
6738
7189
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6739
7190
|
key: "tropicals"
|
|
6740
7191
|
}
|
|
6741
|
-
}).then((
|
|
6742
|
-
var
|
|
6743
|
-
const
|
|
6744
|
-
this.weatherLayers[
|
|
6745
|
-
data:
|
|
7192
|
+
}).then((w) => {
|
|
7193
|
+
var N, O, F;
|
|
7194
|
+
const A = We.convert2Geojson(((N = w == null ? void 0 : w.data) == null ? void 0 : N.data) || (w == null ? void 0 : w.data)), M = (F = (O = w == null ? void 0 : w.config) == null ? void 0 : O.headers) == null ? void 0 : F.key;
|
|
7195
|
+
this.weatherLayers[M] = {
|
|
7196
|
+
data: A,
|
|
6746
7197
|
active: !0,
|
|
6747
7198
|
cached: !1,
|
|
6748
7199
|
type: "json",
|
|
@@ -6752,20 +7203,20 @@ const $i = {
|
|
|
6752
7203
|
});
|
|
6753
7204
|
}
|
|
6754
7205
|
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"]) {
|
|
6755
|
-
const b = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw,
|
|
7206
|
+
const b = (c = this.weatherLayers["swell-direction"]) == null ? void 0 : c.raw, L = (h = this.weatherLayers["swell-height"]) == null ? void 0 : h.raw;
|
|
6756
7207
|
delete this.weatherLayers["swell-direction"], delete this.weatherLayers["swell-height"], this.weatherLayers.swell = {
|
|
6757
7208
|
type: "json",
|
|
6758
7209
|
direction: b,
|
|
6759
|
-
height: { raw:
|
|
7210
|
+
height: { raw: L },
|
|
6760
7211
|
etime: this.ts
|
|
6761
7212
|
};
|
|
6762
7213
|
}
|
|
6763
7214
|
if (this.weatherLayers["current-direction"] || this.weatherLayers["current-speed"]) {
|
|
6764
|
-
const b = (
|
|
7215
|
+
const b = (p = this.weatherLayers["current-direction"]) == null ? void 0 : p.raw, L = (d = this.weatherLayers["current-speed"]) == null ? void 0 : d.raw;
|
|
6765
7216
|
delete this.weatherLayers["current-direction"], delete this.weatherLayers["current-speed"], this.weatherLayers.current = {
|
|
6766
7217
|
type: "json",
|
|
6767
7218
|
direction: b,
|
|
6768
|
-
speed: { raw:
|
|
7219
|
+
speed: { raw: L },
|
|
6769
7220
|
etime: this.ts
|
|
6770
7221
|
};
|
|
6771
7222
|
}
|
|
@@ -6791,19 +7242,19 @@ const $i = {
|
|
|
6791
7242
|
});
|
|
6792
7243
|
if (((e = s == null ? void 0 : s.data) == null ? void 0 : e.code) === 0) {
|
|
6793
7244
|
const c = (t = s == null ? void 0 : s.data) == null ? void 0 : t.data, h = [];
|
|
6794
|
-
for (const
|
|
7245
|
+
for (const d in c)
|
|
6795
7246
|
h.push(
|
|
6796
|
-
ie.get(c[
|
|
7247
|
+
ie.get(c[d], {
|
|
6797
7248
|
headers: {
|
|
6798
7249
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6799
|
-
key:
|
|
7250
|
+
key: d
|
|
6800
7251
|
}
|
|
6801
7252
|
})
|
|
6802
7253
|
);
|
|
6803
|
-
const
|
|
6804
|
-
this.otherLayers = { enc: n },
|
|
7254
|
+
const p = await Promise.all(h);
|
|
7255
|
+
this.otherLayers = { enc: n }, p.map((d) => {
|
|
6805
7256
|
var y, f, m;
|
|
6806
|
-
const g = ((y =
|
|
7257
|
+
const g = ((y = d == null ? void 0 : d.data) == null ? void 0 : y.data) || (d == null ? void 0 : d.data), u = (m = (f = d == null ? void 0 : d.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6807
7258
|
this.otherLayers[u] = g;
|
|
6808
7259
|
});
|
|
6809
7260
|
}
|
|
@@ -6815,18 +7266,18 @@ const $i = {
|
|
|
6815
7266
|
});
|
|
6816
7267
|
if (((r = s == null ? void 0 : s.data) == null ? void 0 : r.code) === 0) {
|
|
6817
7268
|
const c = (i = s == null ? void 0 : s.data) == null ? void 0 : i.data, h = [];
|
|
6818
|
-
for (const
|
|
7269
|
+
for (const d in c)
|
|
6819
7270
|
h.push(
|
|
6820
|
-
ie.get(c[
|
|
7271
|
+
ie.get(c[d], {
|
|
6821
7272
|
headers: {
|
|
6822
7273
|
Authorization: this.token || this.defaultMeteoToken,
|
|
6823
|
-
key:
|
|
7274
|
+
key: d
|
|
6824
7275
|
}
|
|
6825
7276
|
})
|
|
6826
7277
|
);
|
|
6827
|
-
(await Promise.all(h)).map((
|
|
7278
|
+
(await Promise.all(h)).map((d) => {
|
|
6828
7279
|
var y, f, m;
|
|
6829
|
-
const g = ((y =
|
|
7280
|
+
const g = ((y = d == null ? void 0 : d.data) == null ? void 0 : y.data) || (d == null ? void 0 : d.data), u = (m = (f = d == null ? void 0 : d.config) == null ? void 0 : f.headers) == null ? void 0 : m.key;
|
|
6830
7281
|
this.otherLayers[u] = g;
|
|
6831
7282
|
});
|
|
6832
7283
|
}
|
|
@@ -6848,7 +7299,7 @@ const $i = {
|
|
|
6848
7299
|
this.activeWindLayer = !!this.activeWeatherLayers.find((e) => e.key === "wind"), this.$refs.layer && (this.$refs.layer.activeWeatherLayers = this.activeWeatherLayers);
|
|
6849
7300
|
},
|
|
6850
7301
|
handleRampColorInitial() {
|
|
6851
|
-
var a, e, t, r, i, o, n, s, c, h,
|
|
7302
|
+
var a, e, t, r, i, o, n, s, c, h, p, d;
|
|
6852
7303
|
this.viewport.map.getSource((a = this.viewport) == null ? void 0 : a.rampColorSource) || this.viewport.map.addSource((e = this.viewport) == null ? void 0 : e.rampColorSource, {
|
|
6853
7304
|
type: "canvas",
|
|
6854
7305
|
canvas: (t = this.viewport) == null ? void 0 : t.rampColorCanvas,
|
|
@@ -6872,8 +7323,8 @@ const $i = {
|
|
|
6872
7323
|
}), this.viewport.map.getLayer((h = this.viewport) == null ? void 0 : h.particleLayer) || this.viewport.map.addLayer(
|
|
6873
7324
|
{
|
|
6874
7325
|
type: "raster",
|
|
6875
|
-
id: (
|
|
6876
|
-
source: (
|
|
7326
|
+
id: (p = this.viewport) == null ? void 0 : p.particleLayer,
|
|
7327
|
+
source: (d = this.viewport) == null ? void 0 : d.particleSource,
|
|
6877
7328
|
layout: {
|
|
6878
7329
|
visibility: "none"
|
|
6879
7330
|
}
|
|
@@ -6882,36 +7333,36 @@ const $i = {
|
|
|
6882
7333
|
);
|
|
6883
7334
|
},
|
|
6884
7335
|
handleDragEndWithZoom4Json() {
|
|
6885
|
-
var h,
|
|
7336
|
+
var h, p, d, g;
|
|
6886
7337
|
const a = (/* @__PURE__ */ new Date()).valueOf();
|
|
6887
7338
|
let e = 0, t = 0;
|
|
6888
|
-
const r = (h = this.map) == null ? void 0 : h.getBounds(), i = this.map.getZoom(), o =
|
|
7339
|
+
const r = (h = this.map) == null ? void 0 : h.getBounds(), i = this.map.getZoom(), o = D.convertToStdLng(r._sw.lng), n = D.convertToStdLng(r._ne.lng), s = Math.floor(r._sw.lat), c = Math.ceil(r._ne.lat);
|
|
6889
7340
|
for (const u in this.weatherLayers)
|
|
6890
7341
|
if (this.weatherLayers[u].active && this.weatherLayers[u].type === "json") {
|
|
6891
7342
|
this.weatherLayers[u].active = !1, this.weatherLayers[u].version = Math.random() + 1;
|
|
6892
7343
|
let y = [];
|
|
6893
7344
|
if (["swell", "current"].includes(u)) {
|
|
6894
|
-
const f = ((
|
|
7345
|
+
const f = ((p = this.weatherLayers[u]) == null ? void 0 : p.direction) || {};
|
|
6895
7346
|
for (const m in f)
|
|
6896
7347
|
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6897
7348
|
const v = f[m].lng;
|
|
6898
|
-
o > n ? v.forEach((b,
|
|
6899
|
-
var
|
|
7349
|
+
o > n ? v.forEach((b, L) => {
|
|
7350
|
+
var S;
|
|
6900
7351
|
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6901
|
-
const
|
|
6902
|
-
val: f[m].val[
|
|
6903
|
-
spd: (
|
|
7352
|
+
const w = C.point([b, m], {
|
|
7353
|
+
val: f[m].val[L],
|
|
7354
|
+
spd: (S = f[m].spd) == null ? void 0 : S[L]
|
|
6904
7355
|
});
|
|
6905
|
-
y.push(
|
|
7356
|
+
y.push(w);
|
|
6906
7357
|
}
|
|
6907
|
-
}) : v.forEach((b,
|
|
6908
|
-
var
|
|
7358
|
+
}) : v.forEach((b, L) => {
|
|
7359
|
+
var S;
|
|
6909
7360
|
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6910
|
-
const
|
|
6911
|
-
val: f[m].val[
|
|
6912
|
-
spd: (
|
|
7361
|
+
const w = C.point([b, m], {
|
|
7362
|
+
val: f[m].val[L],
|
|
7363
|
+
spd: (S = f[m].spd) == null ? void 0 : S[L]
|
|
6913
7364
|
});
|
|
6914
|
-
y.push(
|
|
7365
|
+
y.push(w);
|
|
6915
7366
|
}
|
|
6916
7367
|
});
|
|
6917
7368
|
}
|
|
@@ -6920,11 +7371,11 @@ const $i = {
|
|
|
6920
7371
|
if (m) {
|
|
6921
7372
|
if (!m.data) {
|
|
6922
7373
|
const v = [];
|
|
6923
|
-
for (const b in (
|
|
6924
|
-
const
|
|
6925
|
-
for (const
|
|
7374
|
+
for (const b in (d = m.raw) == null ? void 0 : d.LineString) {
|
|
7375
|
+
const L = m.raw.LineString[b];
|
|
7376
|
+
for (const S of L)
|
|
6926
7377
|
v.push(
|
|
6927
|
-
C.lineString(
|
|
7378
|
+
C.lineString(S, {
|
|
6928
7379
|
val: Number(b)
|
|
6929
7380
|
})
|
|
6930
7381
|
);
|
|
@@ -6943,12 +7394,12 @@ const $i = {
|
|
|
6943
7394
|
if (m) {
|
|
6944
7395
|
if (!m.data) {
|
|
6945
7396
|
const b = [];
|
|
6946
|
-
for (const
|
|
6947
|
-
const
|
|
6948
|
-
for (const
|
|
7397
|
+
for (const L in (g = m.raw) == null ? void 0 : g.Polygon) {
|
|
7398
|
+
const S = m.raw.Polygon[L];
|
|
7399
|
+
for (const w of S)
|
|
6949
7400
|
b.push(
|
|
6950
|
-
C.polygon(
|
|
6951
|
-
val: Number(
|
|
7401
|
+
C.polygon(w, {
|
|
7402
|
+
val: Number(L)
|
|
6952
7403
|
})
|
|
6953
7404
|
);
|
|
6954
7405
|
}
|
|
@@ -6963,21 +7414,21 @@ const $i = {
|
|
|
6963
7414
|
for (const m in f)
|
|
6964
7415
|
if (m > s && m < c && (!(i <= this.zoom) || m % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6965
7416
|
const v = f[m].lng;
|
|
6966
|
-
o > n ? v.forEach((b,
|
|
7417
|
+
o > n ? v.forEach((b, L) => {
|
|
6967
7418
|
if ((b >= o && b <= 180 || b >= -180 && b <= n) && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6968
|
-
const
|
|
6969
|
-
val: f[m].val[
|
|
6970
|
-
spd: f[m].spd[
|
|
7419
|
+
const S = C.point([b, m], {
|
|
7420
|
+
val: f[m].val[L],
|
|
7421
|
+
spd: f[m].spd[L]
|
|
6971
7422
|
});
|
|
6972
|
-
y.push(
|
|
7423
|
+
y.push(S);
|
|
6973
7424
|
}
|
|
6974
|
-
}) : v.forEach((b,
|
|
7425
|
+
}) : v.forEach((b, L) => {
|
|
6975
7426
|
if (b >= o && b <= n && (!(i <= this.zoom) || b % (i < this.zoom / 2 ? 5 : 3) === 0)) {
|
|
6976
|
-
const
|
|
6977
|
-
val: f[m].val[
|
|
6978
|
-
spd: f[m].spd[
|
|
7427
|
+
const S = C.point([b, m], {
|
|
7428
|
+
val: f[m].val[L],
|
|
7429
|
+
spd: f[m].spd[L]
|
|
6979
7430
|
});
|
|
6980
|
-
y.push(
|
|
7431
|
+
y.push(S);
|
|
6981
7432
|
}
|
|
6982
7433
|
});
|
|
6983
7434
|
}
|
|
@@ -6991,18 +7442,18 @@ const $i = {
|
|
|
6991
7442
|
const m = [];
|
|
6992
7443
|
for (const v in f.Polygon) {
|
|
6993
7444
|
const b = f.Polygon[v];
|
|
6994
|
-
for (const
|
|
7445
|
+
for (const L of b)
|
|
6995
7446
|
m.push(
|
|
6996
|
-
C.polygon(
|
|
7447
|
+
C.polygon(L, {
|
|
6997
7448
|
val: Number(v)
|
|
6998
7449
|
})
|
|
6999
7450
|
);
|
|
7000
7451
|
}
|
|
7001
7452
|
for (const v in f.Point) {
|
|
7002
7453
|
const b = f.Point[v];
|
|
7003
|
-
for (const
|
|
7454
|
+
for (const L of b)
|
|
7004
7455
|
m.push(
|
|
7005
|
-
...C.points(
|
|
7456
|
+
...C.points(L, {
|
|
7006
7457
|
val: Number(v)
|
|
7007
7458
|
}).features
|
|
7008
7459
|
);
|
|
@@ -7020,19 +7471,19 @@ const $i = {
|
|
|
7020
7471
|
const m = [];
|
|
7021
7472
|
for (const v in f.LineString) {
|
|
7022
7473
|
const b = f.LineString[v];
|
|
7023
|
-
for (const
|
|
7474
|
+
for (const L of b)
|
|
7024
7475
|
m.push(
|
|
7025
|
-
C.lineString(
|
|
7476
|
+
C.lineString(L, {
|
|
7026
7477
|
val: Number(v)
|
|
7027
7478
|
})
|
|
7028
7479
|
);
|
|
7029
7480
|
}
|
|
7030
7481
|
for (const v in f.Point)
|
|
7031
|
-
f.Point[v].lng.forEach((b,
|
|
7032
|
-
b =
|
|
7482
|
+
f.Point[v].lng.forEach((b, L) => {
|
|
7483
|
+
b = D.convertToStdLng(b), m.push(
|
|
7033
7484
|
C.point([b, v], {
|
|
7034
|
-
val: f.Point[v].val[
|
|
7035
|
-
type: f.Point[v].type[
|
|
7485
|
+
val: f.Point[v].val[L],
|
|
7486
|
+
type: f.Point[v].type[L]
|
|
7036
7487
|
})
|
|
7037
7488
|
);
|
|
7038
7489
|
});
|
|
@@ -7049,9 +7500,9 @@ const $i = {
|
|
|
7049
7500
|
const m = [];
|
|
7050
7501
|
for (const v in f.LineString) {
|
|
7051
7502
|
const b = f.LineString[v];
|
|
7052
|
-
for (const
|
|
7503
|
+
for (const L of b)
|
|
7053
7504
|
m.push(
|
|
7054
|
-
C.lineString(
|
|
7505
|
+
C.lineString(L, {
|
|
7055
7506
|
val: Number(v)
|
|
7056
7507
|
})
|
|
7057
7508
|
);
|
|
@@ -7069,7 +7520,7 @@ const $i = {
|
|
|
7069
7520
|
this.weatherLayers[a].active && this.weatherLayers[a].type === "image" && (this.weatherLayers[a].active = !0, this.weatherLayers[a].version = Math.random() + 1);
|
|
7070
7521
|
},
|
|
7071
7522
|
handleBboxClip(a, e) {
|
|
7072
|
-
const t = [], r =
|
|
7523
|
+
const t = [], r = D.convertToStdLng(e._sw.lng), i = D.convertToStdLng(e._ne.lng);
|
|
7073
7524
|
return a.features.forEach((o) => {
|
|
7074
7525
|
if (o.geometry.type !== "Point")
|
|
7075
7526
|
if (r > i) {
|
|
@@ -7094,8 +7545,8 @@ const $i = {
|
|
|
7094
7545
|
this.handleBeforeLayerToggle();
|
|
7095
7546
|
},
|
|
7096
7547
|
handleBeforeLayerToggle() {
|
|
7097
|
-
var a, e, t, r, i, o, n, s, c, h,
|
|
7098
|
-
(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 || (
|
|
7548
|
+
var a, e, t, r, i, o, n, s, c, h, p, d, g;
|
|
7549
|
+
(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 || (p = this.otherLayers) != null && p["voluntary-reporting-area"] || (d = this.otherLayers) != null && d["eca-zones"] || (g = this.otherLayers) != null && g["special-area"]) && this.map.setLayoutProperty(this.beforeLayer, "visibility", "visible");
|
|
7099
7550
|
},
|
|
7100
7551
|
handleDateChange(a = { tropicals: !1 }) {
|
|
7101
7552
|
this.fetchWeatherLayers(a), this.fetchOtherLayers({ dayNight: !0 });
|
|
@@ -7142,8 +7593,8 @@ const $i = {
|
|
|
7142
7593
|
});
|
|
7143
7594
|
},
|
|
7144
7595
|
handle3dToggle(a) {
|
|
7145
|
-
var e, t, r, i, o, n, s, c, h,
|
|
7146
|
-
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)) && ((
|
|
7596
|
+
var e, t, r, i, o, n, s, c, h, p, d, g, u, y, f, m, v, b, L, S;
|
|
7597
|
+
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)) && ((p = this.map) == null || p.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(), (g = this.map) != null && g.getLayer((d = this.viewport) == null ? void 0 : d.rampColorLayer) && ((u = this.map) != null && u.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((f = this.map) == null || f.moveLayer((y = this.viewport) == null ? void 0 : y.rampColorLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)), (v = this.map) != null && v.getLayer((m = this.viewport) == null ? void 0 : m.particleLayer) && ((b = this.map) != null && b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id)) && ((S = this.map) == null || S.moveLayer((L = this.viewport) == null ? void 0 : L.particleLayer, this.helper.mapboxCustomer.layers.countryBoundary.id)));
|
|
7147
7598
|
},
|
|
7148
7599
|
handleParticle(a) {
|
|
7149
7600
|
this.particleFactor = a, this.fetchWeatherLayers({ tropicals: !1 });
|
|
@@ -7152,14 +7603,14 @@ const $i = {
|
|
|
7152
7603
|
this.$emit("toggleVersion", Math.random());
|
|
7153
7604
|
}
|
|
7154
7605
|
}
|
|
7155
|
-
},
|
|
7606
|
+
}, Zi = {
|
|
7156
7607
|
key: 0,
|
|
7157
7608
|
className: "map-gl-home"
|
|
7158
7609
|
};
|
|
7159
|
-
function
|
|
7160
|
-
var K, G, J,
|
|
7161
|
-
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"),
|
|
7162
|
-
return t.map ? (x(), _("div",
|
|
7610
|
+
function Hi(a, e, t, r, i, o) {
|
|
7611
|
+
var K, G, J, pe, X, R, V, de, Y, me, ee, te, ae, ge, be, ve, we, Le, Pe, Ee, Ie, Ae, De, Me, je, Be;
|
|
7612
|
+
const n = z("IdmGlLayer"), s = z("IdmENC"), c = z("IdmSigWave"), h = z("IdmSwell"), p = z("IdmPrmsl"), d = z("IdmIceberg"), g = z("IdmTropicals"), u = z("IdmCurrents"), y = z("IdmCurrentParticle"), f = z("IdmWindBarb"), m = z("IdmWindParticle"), v = z("IdmPrecip3h"), b = z("IdmVisibility"), L = z("IdmWaterTemp"), S = z("IdmTemp"), w = z("IdmArctic"), A = z("IdmWarZone"), M = z("IdmGmdssArea"), N = z("IdmEcaZone"), O = z("IdmAlertZone"), F = z("IdmPort"), H = z("IdmLoadLine"), re = z("IdmTimezone"), oe = z("IdmVRA"), se = z("IdmSpecialArea"), ne = z("IdmTerminator"), le = z("IdmLatLng"), ce = z("IdmMeasure"), he = z("IdmPoint");
|
|
7613
|
+
return t.map ? (x(), _("div", Zi, [
|
|
7163
7614
|
P(n, E({
|
|
7164
7615
|
ref: "layer",
|
|
7165
7616
|
map: t.map,
|
|
@@ -7192,13 +7643,13 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7192
7643
|
swell: (J = i.weatherLayers) == null ? void 0 : J.swell,
|
|
7193
7644
|
"before-layer": t.beforeLayer
|
|
7194
7645
|
}, a.$attrs), null, 16, ["map", "swell", "before-layer"]),
|
|
7195
|
-
P(
|
|
7646
|
+
P(p, E({
|
|
7196
7647
|
map: t.map,
|
|
7197
|
-
prmsl: (
|
|
7648
|
+
prmsl: (pe = i.weatherLayers) == null ? void 0 : pe.prmsl,
|
|
7198
7649
|
"before-layer": t.beforeLayer,
|
|
7199
7650
|
"active-weather-layers": i.activeWeatherLayers
|
|
7200
7651
|
}, a.$attrs), null, 16, ["map", "prmsl", "before-layer", "active-weather-layers"]),
|
|
7201
|
-
P(
|
|
7652
|
+
P(d, E({
|
|
7202
7653
|
map: t.map,
|
|
7203
7654
|
iceberg: (X = i.weatherLayers) == null ? void 0 : X.iceberg,
|
|
7204
7655
|
"before-layer": t.beforeLayer
|
|
@@ -7221,7 +7672,7 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7221
7672
|
}, a.$attrs, { onParticle: o.handleParticle }), null, 16, ["map", "map-projection", "current", "before-layer", "show-particle", "margin-bottom", "toggle-version", "weather-layers", "onParticle"]),
|
|
7222
7673
|
P(y, E({
|
|
7223
7674
|
viewport: i.viewport,
|
|
7224
|
-
factor: (
|
|
7675
|
+
factor: (de = i.weatherLayers) == null ? void 0 : de["current-particle"],
|
|
7225
7676
|
"before-layer": t.beforeLayer,
|
|
7226
7677
|
"toggle-version": t.toggleVersion
|
|
7227
7678
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
@@ -7229,7 +7680,7 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7229
7680
|
ref: "windBarb",
|
|
7230
7681
|
map: t.map,
|
|
7231
7682
|
"map-projection": i.mapProjection,
|
|
7232
|
-
wind: (
|
|
7683
|
+
wind: (Y = i.weatherLayers) == null ? void 0 : Y.wind,
|
|
7233
7684
|
current: (me = i.weatherLayers) == null ? void 0 : me.current,
|
|
7234
7685
|
"before-layer": t.beforeLayer,
|
|
7235
7686
|
"margin-bottom": i.showRampColor ? "56px" : "30px",
|
|
@@ -7257,52 +7708,52 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7257
7708
|
"before-layer": t.beforeLayer,
|
|
7258
7709
|
"toggle-version": t.toggleVersion
|
|
7259
7710
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7260
|
-
P(
|
|
7711
|
+
P(L, E({
|
|
7261
7712
|
viewport: i.viewport,
|
|
7262
|
-
factor: (
|
|
7713
|
+
factor: (ge = i.weatherLayers) == null ? void 0 : ge["water-temp"],
|
|
7263
7714
|
"before-layer": t.beforeLayer,
|
|
7264
7715
|
"toggle-version": t.toggleVersion
|
|
7265
7716
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7266
|
-
P(
|
|
7717
|
+
P(S, E({
|
|
7267
7718
|
viewport: i.viewport,
|
|
7268
|
-
factor: (
|
|
7719
|
+
factor: (be = i.weatherLayers) == null ? void 0 : be.temp,
|
|
7269
7720
|
"before-layer": t.beforeLayer,
|
|
7270
7721
|
"toggle-version": t.toggleVersion
|
|
7271
7722
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7272
|
-
P(
|
|
7723
|
+
P(w, E({
|
|
7273
7724
|
viewport: i.viewport,
|
|
7274
|
-
factor: (
|
|
7725
|
+
factor: (ve = i.weatherLayers) == null ? void 0 : ve.arctic,
|
|
7275
7726
|
"before-layer": t.beforeLayer,
|
|
7276
7727
|
"toggle-version": t.toggleVersion
|
|
7277
7728
|
}, a.$attrs), null, 16, ["viewport", "factor", "before-layer", "toggle-version"]),
|
|
7278
|
-
P(
|
|
7729
|
+
P(A, E({
|
|
7279
7730
|
map: t.map,
|
|
7280
|
-
zone: (
|
|
7731
|
+
zone: (we = i.otherLayers) == null ? void 0 : we["war-zones"],
|
|
7281
7732
|
"before-layer": t.beforeLayer
|
|
7282
7733
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7283
|
-
P(
|
|
7734
|
+
P(M, E({
|
|
7284
7735
|
map: t.map,
|
|
7285
7736
|
area: (Le = i.otherLayers) == null ? void 0 : Le["gmdss-areas"],
|
|
7286
7737
|
"before-layer": t.beforeLayer
|
|
7287
7738
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7288
|
-
P(
|
|
7739
|
+
P(N, E({
|
|
7289
7740
|
map: t.map,
|
|
7290
|
-
zone: (
|
|
7741
|
+
zone: (Pe = i.otherLayers) == null ? void 0 : Pe["eca-zones"],
|
|
7291
7742
|
"before-layer": t.beforeLayer
|
|
7292
7743
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7293
|
-
P(
|
|
7744
|
+
P(O, E({
|
|
7294
7745
|
map: t.map,
|
|
7295
|
-
zone: (
|
|
7746
|
+
zone: (Ee = i.otherLayers) == null ? void 0 : Ee["alert-zones"],
|
|
7296
7747
|
"before-layer": t.beforeLayer
|
|
7297
7748
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7298
|
-
P(
|
|
7749
|
+
P(F, E({
|
|
7299
7750
|
map: t.map,
|
|
7300
|
-
port: (
|
|
7751
|
+
port: (Ie = i.otherLayers) == null ? void 0 : Ie.ports,
|
|
7301
7752
|
"before-layer": t.beforeLayer
|
|
7302
7753
|
}, a.$attrs), null, 16, ["map", "port", "before-layer"]),
|
|
7303
7754
|
P(H, E({
|
|
7304
7755
|
map: t.map,
|
|
7305
|
-
line: (
|
|
7756
|
+
line: (Ae = i.otherLayers) == null ? void 0 : Ae["load-lines"],
|
|
7306
7757
|
"before-layer": t.beforeLayer
|
|
7307
7758
|
}, a.$attrs), null, 16, ["map", "line", "before-layer"]),
|
|
7308
7759
|
P(re, E({
|
|
@@ -7312,12 +7763,12 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7312
7763
|
}, a.$attrs), null, 16, ["map", "zone", "before-layer"]),
|
|
7313
7764
|
P(oe, E({
|
|
7314
7765
|
map: t.map,
|
|
7315
|
-
area: (
|
|
7766
|
+
area: (Me = i.otherLayers) == null ? void 0 : Me["voluntary-reporting-area"],
|
|
7316
7767
|
"before-layer": t.beforeLayer
|
|
7317
7768
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7318
7769
|
P(se, E({
|
|
7319
7770
|
map: t.map,
|
|
7320
|
-
area: (
|
|
7771
|
+
area: (je = i.otherLayers) == null ? void 0 : je["special-area"],
|
|
7321
7772
|
"before-layer": t.beforeLayer
|
|
7322
7773
|
}, a.$attrs), null, 16, ["map", "area", "before-layer"]),
|
|
7323
7774
|
P(ne, E({
|
|
@@ -7340,19 +7791,19 @@ function Vi(a, e, t, r, i, o) {
|
|
|
7340
7791
|
}, a.$attrs, { onPoint: o.handlePointChange }), null, 16, ["map", "show", "meteo", "onPoint"])
|
|
7341
7792
|
])) : B("", !0);
|
|
7342
7793
|
}
|
|
7343
|
-
const
|
|
7794
|
+
const Gi = /* @__PURE__ */ T(Ui, [["render", Hi]]), tr = {
|
|
7344
7795
|
install(a) {
|
|
7345
|
-
a.component("MapboxGL",
|
|
7796
|
+
a.component("MapboxGL", Gi), a.component("TropicalGL", Oe), a.component("LatLngGL", Fe);
|
|
7346
7797
|
}
|
|
7347
7798
|
};
|
|
7348
7799
|
export {
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7800
|
+
Fe as LatLngGL,
|
|
7801
|
+
Gi as MapboxGL,
|
|
7802
|
+
tr as MapboxGLPlugin,
|
|
7803
|
+
wt as MapboxHelper,
|
|
7353
7804
|
U as ParticleSchema,
|
|
7354
|
-
|
|
7355
|
-
|
|
7805
|
+
Oe as TropicalGL,
|
|
7806
|
+
Re as Viewport,
|
|
7356
7807
|
ye as WebGL,
|
|
7357
|
-
|
|
7808
|
+
W as WebGLSchema
|
|
7358
7809
|
};
|