@idmui/spot 0.1.1 → 0.1.3
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 +355 -323
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,156 +1,188 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Search as
|
|
4
|
-
import { LngLatHelper as
|
|
5
|
-
import * as
|
|
6
|
-
import { markRaw as
|
|
7
|
-
import
|
|
8
|
-
class
|
|
1
|
+
import K from "moment";
|
|
2
|
+
import X from "moment-timezone";
|
|
3
|
+
import { Search as be } from "@element-plus/icons-vue";
|
|
4
|
+
import { LngLatHelper as re } from "@idm-plugin/geo";
|
|
5
|
+
import * as ge from "echarts";
|
|
6
|
+
import { markRaw as ke, resolveComponent as le, openBlock as n, createElementBlock as o, createElementVNode as i, createVNode as de, withCtx as he, Fragment as f, renderList as y, createBlock as De, toDisplayString as x, createCommentVNode as ce, createTextVNode as _, normalizeClass as b, normalizeStyle as ie } from "vue";
|
|
7
|
+
import ve from "axios";
|
|
8
|
+
class fe {
|
|
9
9
|
static pickHourly(e, t) {
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
let j,
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
code: (z = u.weather_code) == null ? void 0 : z.at(p),
|
|
27
|
-
visibility: this.m2nm((S = u.visibility) == null ? void 0 : S.at(p)),
|
|
28
|
-
wind: {
|
|
29
|
-
speed: (L = u.wind_speed_10m) == null ? void 0 : L.at(p),
|
|
30
|
-
kts: (C = u.wind_speed_10m) == null ? void 0 : C.at(p),
|
|
31
|
-
degree: (P = u.wind_direction_10m) == null ? void 0 : P.at(p),
|
|
32
|
-
bearing: ((a = u.wind_direction_10m) == null ? void 0 : a.at(p)) !== null ? (((r = u.wind_direction_10m) == null ? void 0 : r.at(p)) + 180) % 360 : null,
|
|
33
|
-
gusts: (Z = u.wind_gusts_10m) == null ? void 0 : Z.at(p)
|
|
34
|
-
},
|
|
35
|
-
isDay: (k = u.is_day) == null ? void 0 : k.at(p)
|
|
36
|
-
};
|
|
37
|
-
const { name: fe, url: ye } = this.parseWeatherCode(j.code, j.isDay);
|
|
38
|
-
j.name = fe, j.url = ye, j.wind.scale = this.beaufort(this.kts2ms(j.wind.kts)), j.wind.direction = this.degree2Direction(j.wind.degree);
|
|
39
|
-
}
|
|
40
|
-
for (const se of ge) {
|
|
41
|
-
const u = se.hourly;
|
|
42
|
-
X = {
|
|
43
|
-
wave: {
|
|
44
|
-
sig: {
|
|
45
|
-
height: (R = u.wave_height) == null ? void 0 : R.at(p),
|
|
46
|
-
degree: (A = u.wave_direction) == null ? void 0 : A.at(p),
|
|
47
|
-
bearing: ((E = u.wave_direction) == null ? void 0 : E.at(p)) !== null ? (((G = u.wave_direction) == null ? void 0 : G.at(p)) + 180) % 360 : null,
|
|
48
|
-
period: (F = u.wave_period) == null ? void 0 : F.at(p)
|
|
10
|
+
var d, s, v, M, C, S, L, N, I, P, H, a, r, q, z, T, R, A, E, G, F, B, V, O, U, J, Z, Y, w, D, m, k, W, u, Q, p, $, g, se, ae;
|
|
11
|
+
const ue = typeof t == "string" ? K(t) : t, te = e.weather, pe = e.marine, me = K(te[0].hourly.date).utc(), ne = me.clone().add(te[0].hourly.time.at(0), "h"), ye = me.clone().add(te[0].hourly.time.at(-1), "h"), we = [];
|
|
12
|
+
if (ue.isBetween(ne, ye, "millisecond", "[]")) {
|
|
13
|
+
const h = ue.utc().diff(ne, "h", !1);
|
|
14
|
+
let j, ee;
|
|
15
|
+
if (te)
|
|
16
|
+
for (const oe of te) {
|
|
17
|
+
const c = oe.hourly;
|
|
18
|
+
j = {
|
|
19
|
+
temp: (d = c.temperature_2m) == null ? void 0 : d.at(h),
|
|
20
|
+
apparentTemp: (s = c.apparent_temperature) == null ? void 0 : s.at(h),
|
|
21
|
+
rh: (v = c.relative_humidity_2m) == null ? void 0 : v.at(h),
|
|
22
|
+
dp: (M = c.dew_point_2m) == null ? void 0 : M.at(h),
|
|
23
|
+
precip: {
|
|
24
|
+
probability: (C = c.precipitation_probability) == null ? void 0 : C.at(h),
|
|
25
|
+
sum: (S = c.precipitation) == null ? void 0 : S.at(h)
|
|
49
26
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
pmsl: (L = c.pressure_msl) == null ? void 0 : L.at(h),
|
|
28
|
+
psurf: (N = c.surface_pressure) == null ? void 0 : N.at(h),
|
|
29
|
+
code: (I = c.weather_code) == null ? void 0 : I.at(h),
|
|
30
|
+
visibility: this.m2nm((P = c.visibility) == null ? void 0 : P.at(h)),
|
|
31
|
+
wind: {
|
|
32
|
+
speed: (H = c.wind_speed_10m) == null ? void 0 : H.at(h),
|
|
33
|
+
kts: (a = c.wind_speed_10m) == null ? void 0 : a.at(h),
|
|
34
|
+
degree: (r = c.wind_direction_10m) == null ? void 0 : r.at(h),
|
|
35
|
+
bearing: ((q = c.wind_direction_10m) == null ? void 0 : q.at(h)) !== null ? (((z = c.wind_direction_10m) == null ? void 0 : z.at(h)) + 180) % 360 : null,
|
|
36
|
+
gusts: (T = c.wind_gusts_10m) == null ? void 0 : T.at(h)
|
|
56
37
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
isDay: (R = c.is_day) == null ? void 0 : R.at(h)
|
|
39
|
+
};
|
|
40
|
+
const { name: xe, url: _e } = this.parseWeatherCode(j.code, j.isDay);
|
|
41
|
+
j.name = xe, j.url = _e, j.wind.scale = this.beaufort(this.kts2ms(j.wind.kts)), j.wind.direction = this.degree2Direction(j.wind.degree);
|
|
42
|
+
}
|
|
43
|
+
if (pe)
|
|
44
|
+
for (const oe of pe) {
|
|
45
|
+
const c = oe.hourly;
|
|
46
|
+
ee = {
|
|
47
|
+
wave: {
|
|
48
|
+
sig: {
|
|
49
|
+
height: (A = c.wave_height) == null ? void 0 : A.at(h),
|
|
50
|
+
degree: (E = c.wave_direction) == null ? void 0 : E.at(h),
|
|
51
|
+
bearing: ((G = c.wave_direction) == null ? void 0 : G.at(h)) !== null ? (((F = c.wave_direction) == null ? void 0 : F.at(h)) + 180) % 360 : null,
|
|
52
|
+
period: (B = c.wave_period) == null ? void 0 : B.at(h)
|
|
53
|
+
},
|
|
54
|
+
swell: {
|
|
55
|
+
height: (V = c.swell_wave_height) == null ? void 0 : V.at(h),
|
|
56
|
+
degree: (O = c.swell_wave_direction) == null ? void 0 : O.at(h),
|
|
57
|
+
bearing: ((U = c.swell_wave_direction) == null ? void 0 : U.at(h)) !== null ? (((J = c.swell_wave_direction) == null ? void 0 : J.at(h)) + 180) % 360 : null,
|
|
58
|
+
period: (Z = c.swell_wave_period) == null ? void 0 : Z.at(h),
|
|
59
|
+
peakPeriod: (Y = c.swell_wave_peak_period) == null ? void 0 : Y.at(h)
|
|
60
|
+
},
|
|
61
|
+
wd: {
|
|
62
|
+
height: (w = c.wind_wave_height) == null ? void 0 : w.at(h),
|
|
63
|
+
degree: (D = c.wind_wave_direction) == null ? void 0 : D.at(h),
|
|
64
|
+
bearing: ((m = c.wind_wave_direction) == null ? void 0 : m.at(h)) !== null ? (((k = c.wind_wave_direction) == null ? void 0 : k.at(h)) + 180) % 360 : null,
|
|
65
|
+
period: (W = c.wind_wave_period) == null ? void 0 : W.at(h),
|
|
66
|
+
peakPeriod: (u = c.wind_wave_peak_period) == null ? void 0 : u.at(h)
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
current: {
|
|
70
|
+
speed: (Q = c.ocean_current_velocity) == null ? void 0 : Q.at(h),
|
|
71
|
+
kts: (p = c.ocean_current_velocity) == null ? void 0 : p.at(h),
|
|
72
|
+
degree: ($ = c.ocean_current_direction) == null ? void 0 : $.at(h),
|
|
73
|
+
bearing: ((g = c.ocean_current_direction) == null ? void 0 : g.at(h)) ?? null
|
|
74
|
+
},
|
|
75
|
+
sst: (se = c.sea_surface_temperature) == null ? void 0 : se.at(h),
|
|
76
|
+
height: (ae = c.sea_level_height_msl) == null ? void 0 : ae.at(h)
|
|
77
|
+
}, ee.wave = this.parseWave(ee.wave), ee.current.direction = this.degree2Direction(ee.current.degree);
|
|
78
|
+
}
|
|
79
|
+
we.push({
|
|
80
|
+
utc: ne.add(h, "h").format(),
|
|
77
81
|
weather: { ...j },
|
|
78
|
-
...
|
|
82
|
+
...ee
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
|
-
return
|
|
85
|
+
return we;
|
|
86
|
+
}
|
|
87
|
+
static toLegacy(e) {
|
|
88
|
+
return {
|
|
89
|
+
wind: e.weather.wind,
|
|
90
|
+
visibility: e.weather.visibility,
|
|
91
|
+
temp: e.weather.temp,
|
|
92
|
+
prmsl: e.weather.pmsl,
|
|
93
|
+
gusts: {
|
|
94
|
+
kts: e.weather.wind.gusts
|
|
95
|
+
},
|
|
96
|
+
precip: e.weather.precip,
|
|
97
|
+
code: e.weather.code,
|
|
98
|
+
name: e.weather.name,
|
|
99
|
+
url: e.weather.url,
|
|
100
|
+
wave: e.wave,
|
|
101
|
+
current: e.current,
|
|
102
|
+
sst: e.sst,
|
|
103
|
+
height: e.height,
|
|
104
|
+
utc: e.utc
|
|
105
|
+
};
|
|
82
106
|
}
|
|
83
107
|
static pickDaily(e, t) {
|
|
84
|
-
var
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
let
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
max: (I = d.apparent_temperature_max) == null ? void 0 : I.at(c),
|
|
99
|
-
min: (M = d.apparent_temperature_min) == null ? void 0 : M.at(c)
|
|
100
|
-
},
|
|
101
|
-
precip: {
|
|
102
|
-
sum: (D = d.precipitation_sum) == null ? void 0 : D.at(c),
|
|
103
|
-
hours: (z = d.precipitation_hours) == null ? void 0 : z.at(c),
|
|
104
|
-
probability: (S = d.precipitation_probability_max) == null ? void 0 : S.at(c)
|
|
105
|
-
},
|
|
106
|
-
wind: {
|
|
107
|
-
speed: (L = d.wind_speed_10m_max) == null ? void 0 : L.at(c),
|
|
108
|
-
kts: (C = d.wind_speed_10m_max) == null ? void 0 : C.at(c),
|
|
109
|
-
degree: (P = d.wind_direction_10m_dominant) == null ? void 0 : P.at(c),
|
|
110
|
-
gusts: (a = d.wind_gusts_10m_max) == null ? void 0 : a.at(c)
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const { name: Q, url: K } = this.parseWeatherCode(v.code, !0);
|
|
114
|
-
v.name = Q, v.url = K, v.wind.scale = this.beaufort(this.kts2ms(v.wind.kts)), v.wind.direction = this.degree2Direction(v.wind.degree);
|
|
115
|
-
}
|
|
116
|
-
for (const N of J) {
|
|
117
|
-
const d = N.daily;
|
|
118
|
-
m = {
|
|
119
|
-
wave: {
|
|
120
|
-
sig: {
|
|
121
|
-
height: (r = d.wave_height_max) == null ? void 0 : r.at(c),
|
|
122
|
-
degree: (Z = d.wave_direction_dominant) == null ? void 0 : Z.at(c),
|
|
123
|
-
period: (k = d.wave_period_max) == null ? void 0 : k.at(c)
|
|
108
|
+
var d, s, v, M, C, S, L, N, I, P, H, a, r, q, z, T, R, A, E, G, F, B, V, O, U, J, Z;
|
|
109
|
+
const Y = typeof t == "string" ? K(t) : t, w = e.weather, D = e.marine, m = K(w[0].daily.time.at(0)), k = K(w[0].daily.time.at(-1)), W = [];
|
|
110
|
+
if (Y.isBetween(m, k, "millisecond", "[]")) {
|
|
111
|
+
let u, Q;
|
|
112
|
+
const p = Y.diff(m, "d", !1);
|
|
113
|
+
if (w)
|
|
114
|
+
for (const $ of w) {
|
|
115
|
+
const g = $.daily;
|
|
116
|
+
u = {
|
|
117
|
+
code: (d = g.weather_code) == null ? void 0 : d.at(p),
|
|
118
|
+
temp: {
|
|
119
|
+
max: (s = g.temperature_2m_max) == null ? void 0 : s.at(p),
|
|
120
|
+
min: (v = g.temperature_2m_min) == null ? void 0 : v.at(p),
|
|
121
|
+
mean: (M = g.temperature_2m_mean) == null ? void 0 : M.at(p)
|
|
124
122
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
period: (E = d.swell_wave_period_max) == null ? void 0 : E.at(c),
|
|
129
|
-
peakPeriod: (G = d.swell_wave_peak_period_max) == null ? void 0 : G.at(c)
|
|
123
|
+
apparentTemp: {
|
|
124
|
+
max: (C = g.apparent_temperature_max) == null ? void 0 : C.at(p),
|
|
125
|
+
min: (S = g.apparent_temperature_min) == null ? void 0 : S.at(p)
|
|
130
126
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
precip: {
|
|
128
|
+
sum: (L = g.precipitation_sum) == null ? void 0 : L.at(p),
|
|
129
|
+
hours: (N = g.precipitation_hours) == null ? void 0 : N.at(p),
|
|
130
|
+
probability: (I = g.precipitation_probability_max) == null ? void 0 : I.at(p)
|
|
131
|
+
},
|
|
132
|
+
rh: {
|
|
133
|
+
max: (P = g.relative_humidity_2m_max) == null ? void 0 : P.at(p),
|
|
134
|
+
min: (H = g.relative_humidity_2m_min) == null ? void 0 : H.at(p),
|
|
135
|
+
mean: (a = g.relative_humidity_2m_mean) == null ? void 0 : a.at(p)
|
|
136
|
+
},
|
|
137
|
+
wind: {
|
|
138
|
+
speed: (r = g.wind_speed_10m_max) == null ? void 0 : r.at(p),
|
|
139
|
+
kts: (q = g.wind_speed_10m_max) == null ? void 0 : q.at(p),
|
|
140
|
+
degree: (z = g.wind_direction_10m_dominant) == null ? void 0 : z.at(p),
|
|
141
|
+
gusts: (T = g.wind_gusts_10m_max) == null ? void 0 : T.at(p)
|
|
136
142
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
};
|
|
144
|
+
const { name: se, url: ae } = this.parseWeatherCode(u.code, !0);
|
|
145
|
+
u.name = se, u.url = ae, u.wind.scale = this.beaufort(this.kts2ms(u.wind.kts)), u.wind.direction = this.degree2Direction(u.wind.degree);
|
|
146
|
+
}
|
|
147
|
+
if (D)
|
|
148
|
+
for (const $ of D) {
|
|
149
|
+
const g = $.daily;
|
|
150
|
+
Q = {
|
|
151
|
+
wave: {
|
|
152
|
+
sig: {
|
|
153
|
+
height: (R = g.wave_height_max) == null ? void 0 : R.at(p),
|
|
154
|
+
degree: (A = g.wave_direction_dominant) == null ? void 0 : A.at(p),
|
|
155
|
+
period: (E = g.wave_period_max) == null ? void 0 : E.at(p)
|
|
156
|
+
},
|
|
157
|
+
swell: {
|
|
158
|
+
height: (G = g.swell_wave_height_max) == null ? void 0 : G.at(p),
|
|
159
|
+
degree: (F = g.wave_direction_dominant) == null ? void 0 : F.at(p),
|
|
160
|
+
period: (B = g.swell_wave_period_max) == null ? void 0 : B.at(p),
|
|
161
|
+
peakPeriod: (V = g.swell_wave_peak_period_max) == null ? void 0 : V.at(p)
|
|
162
|
+
},
|
|
163
|
+
wd: {
|
|
164
|
+
height: (O = g.wind_wave_height_max) == null ? void 0 : O.at(p),
|
|
165
|
+
degree: (U = g.wind_wave_direction_dominant) == null ? void 0 : U.at(p),
|
|
166
|
+
period: (J = g.wind_wave_period_max) == null ? void 0 : J.at(p),
|
|
167
|
+
peakPeriod: (Z = g.wind_wave_peak_period_max) == null ? void 0 : Z.at(p)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}, Q.wave = this.parseWave(Q.wave);
|
|
171
|
+
}
|
|
172
|
+
W.push({
|
|
173
|
+
utc: m.add(p, "d").utc().format(),
|
|
174
|
+
weather: { ...u },
|
|
175
|
+
...Q
|
|
144
176
|
});
|
|
145
177
|
}
|
|
146
|
-
return
|
|
178
|
+
return W;
|
|
147
179
|
}
|
|
148
180
|
static parseWave(e) {
|
|
149
181
|
return e.sig.direction = this.degree2Direction(e.sig.degree), e.swell.direction = this.degree2Direction(e.swell.degree), e.wd.direction = this.degree2Direction(e.wd.degree), e.sig.scale = this.douglas(e.sig.height), e.swell.scale = this.douglas(e.swell.height), e.wd.scale = this.douglas(e.wd.height), e;
|
|
150
182
|
}
|
|
151
183
|
static parseWeatherCode(e, t) {
|
|
152
|
-
const
|
|
153
|
-
return t ?
|
|
184
|
+
const d = this.weatherCode(e);
|
|
185
|
+
return (t ? d.day : d.night) || {};
|
|
154
186
|
}
|
|
155
187
|
static weatherCode(e) {
|
|
156
188
|
const t = {
|
|
@@ -413,19 +445,19 @@ class we {
|
|
|
413
445
|
return t;
|
|
414
446
|
}
|
|
415
447
|
static kts2ms(e) {
|
|
416
|
-
return isNaN(e) ? e : Math.round(e * 1852 / 3600 * 1e4) / 1e4;
|
|
448
|
+
return isNaN(e) || e === null ? e : Math.round(e * 1852 / 3600 * 1e4) / 1e4;
|
|
417
449
|
}
|
|
418
450
|
static kts2kmh(e) {
|
|
419
|
-
return isNaN(e) ? e : e * 1.852;
|
|
451
|
+
return isNaN(e) || e === null ? e : e * 1.852;
|
|
420
452
|
}
|
|
421
453
|
static m2nm(e) {
|
|
422
|
-
return isNaN(e) ? e : Math.round(e / 1e3 / 1.852 * 1e4) / 1e4;
|
|
454
|
+
return isNaN(e) || e === null ? e : Math.round(e / 1e3 / 1.852 * 1e4) / 1e4;
|
|
423
455
|
}
|
|
424
456
|
static kmh2kts(e) {
|
|
425
|
-
return isNaN(e) ? e : this.ms2kts(e * 1e3 / 3600);
|
|
457
|
+
return isNaN(e) || e === null ? e : this.ms2kts(e * 1e3 / 3600);
|
|
426
458
|
}
|
|
427
459
|
static ms2kts(e) {
|
|
428
|
-
return isNaN(e) ? e : Math.round(e * 3600 / 1852 * 1e4) / 1e4;
|
|
460
|
+
return isNaN(e) || e === null ? e : Math.round(e * 3600 / 1852 * 1e4) / 1e4;
|
|
429
461
|
}
|
|
430
462
|
/**
|
|
431
463
|
* 角度转为弧度
|
|
@@ -446,9 +478,9 @@ class we {
|
|
|
446
478
|
const t = this.degree2Radian(e);
|
|
447
479
|
if (isNaN(t) || t === null)
|
|
448
480
|
return null;
|
|
449
|
-
let
|
|
481
|
+
let d = "N/A";
|
|
450
482
|
const s = Math.PI / 16;
|
|
451
|
-
return t < s ?
|
|
483
|
+
return t < s ? d = "N" : t >= s && t < 3 * s ? d = "NNE" : t >= 3 * s && t < 5 * s ? d = "NE" : t >= 5 * s && t < 7 * s ? d = "ENE" : t >= 7 * s && t < 9 * s ? d = "E" : t >= 9 * s && t < 11 * s ? d = "ESE" : t >= 11 * s && t < 13 * s ? d = "SE" : t >= 13 * s && t < 15 * s ? d = "SSE" : t >= 15 * s && t < 17 * s ? d = "S" : t >= 17 * s && t < 19 * s ? d = "SSW" : t >= 19 * s && t < 21 * s ? d = "SW" : t >= 21 * s && t < 23 * s ? d = "WSW" : t >= 23 * s && t < 25 * s ? d = "W" : t >= 25 * s && t < 27 * s ? d = "WNW" : t >= 27 * s && t < 29 * s ? d = "NW" : t >= 29 * s && t < 31 * s ? d = "NNW" : t >= 31 * s && t < 32 * s && (d = "N"), d;
|
|
452
484
|
}
|
|
453
485
|
/**
|
|
454
486
|
* 计算风力蒲福等级
|
|
@@ -468,12 +500,12 @@ class we {
|
|
|
468
500
|
return isNaN(e) || e <= 0.1 ? t = "Calm" : e <= 0.5 ? t = "Smooth" : e <= 1.25 ? t = "Slight" : e <= 2.5 ? t = "Moderate" : e <= 4 ? t = "Rough" : e <= 6 ? t = "VeryRough" : e <= 9 ? t = "High" : e <= 14 ? t = "VeryHigh" : t = "Precipitous", t;
|
|
469
501
|
}
|
|
470
502
|
}
|
|
471
|
-
const
|
|
503
|
+
const ze = (l, e) => {
|
|
472
504
|
const t = l.__vccOpts || l;
|
|
473
|
-
for (const [
|
|
474
|
-
t[
|
|
505
|
+
for (const [d, s] of e)
|
|
506
|
+
t[d] = s;
|
|
475
507
|
return t;
|
|
476
|
-
},
|
|
508
|
+
}, Se = {
|
|
477
509
|
name: "SpotReport",
|
|
478
510
|
// components: { Search }, //Download
|
|
479
511
|
props: {
|
|
@@ -483,7 +515,7 @@ const ke = (l, e) => {
|
|
|
483
515
|
},
|
|
484
516
|
ts: {
|
|
485
517
|
type: String,
|
|
486
|
-
default:
|
|
518
|
+
default: K().utc().format()
|
|
487
519
|
},
|
|
488
520
|
timeZone: {
|
|
489
521
|
type: Number,
|
|
@@ -498,7 +530,7 @@ const ke = (l, e) => {
|
|
|
498
530
|
return {
|
|
499
531
|
placeholder: "search for port name or coordinates",
|
|
500
532
|
searchName: void 0,
|
|
501
|
-
rawSearchIcon: be
|
|
533
|
+
rawSearchIcon: ke(be),
|
|
502
534
|
positionGmt: void 0,
|
|
503
535
|
issuedDate: void 0,
|
|
504
536
|
meteoData: {},
|
|
@@ -517,37 +549,37 @@ const ke = (l, e) => {
|
|
|
517
549
|
computed: {
|
|
518
550
|
computeHourL() {
|
|
519
551
|
return function(l) {
|
|
520
|
-
return l ? `${
|
|
552
|
+
return l ? `${X(l).tz(this.positionGmt).format("HH")}` : "-";
|
|
521
553
|
};
|
|
522
554
|
},
|
|
523
555
|
computeHourZ() {
|
|
524
556
|
return function(l) {
|
|
525
|
-
return l ? `${
|
|
557
|
+
return l ? `${K(l).utc().format("HH")}Z` : "-";
|
|
526
558
|
};
|
|
527
559
|
},
|
|
528
560
|
computeWeek() {
|
|
529
561
|
return function(l) {
|
|
530
|
-
return l ? `${
|
|
562
|
+
return l ? `${X(l).tz(this.positionGmt).format("dddd")}` : "-";
|
|
531
563
|
};
|
|
532
564
|
},
|
|
533
565
|
computeMMMDD() {
|
|
534
566
|
return function(l) {
|
|
535
|
-
return l ? `${
|
|
567
|
+
return l ? `${X(l).tz(this.positionGmt).format("MMM-DD")}` : "-";
|
|
536
568
|
};
|
|
537
569
|
},
|
|
538
570
|
computeLat() {
|
|
539
571
|
return function(l, e = 4) {
|
|
540
|
-
return
|
|
572
|
+
return re.lat2pretty(l, e).pretty;
|
|
541
573
|
};
|
|
542
574
|
},
|
|
543
575
|
computeLng() {
|
|
544
576
|
return function(l, e = 4) {
|
|
545
|
-
return
|
|
577
|
+
return re.lng2pretty(l, e).pretty;
|
|
546
578
|
};
|
|
547
579
|
},
|
|
548
580
|
roundPrecision() {
|
|
549
581
|
return function(l, e = 4) {
|
|
550
|
-
return isNaN(l) ? "-" :
|
|
582
|
+
return isNaN(l) ? "-" : re.roundPrecision(l, e);
|
|
551
583
|
};
|
|
552
584
|
}
|
|
553
585
|
},
|
|
@@ -572,13 +604,13 @@ const ke = (l, e) => {
|
|
|
572
604
|
},
|
|
573
605
|
initInfo() {
|
|
574
606
|
var l, e;
|
|
575
|
-
this.loading = !1, this.positionGmt = (e = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : e.timezone, this.issuedDate =
|
|
576
|
-
var
|
|
577
|
-
return t.name === ((
|
|
607
|
+
this.loading = !1, this.positionGmt = (e = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : e.timezone, this.issuedDate = K(this.ts).utc().format("MMM-DD/HHmm[Z], YYYY"), this.activeIndex = X(this.ts).tz(this.positionGmt).hour(), this.pickedDate = X(this.ts).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.collectList = JSON.parse(localStorage.getItem("idmCollectList") || "[]"), this.positionList = JSON.parse(JSON.stringify(this.collectList)), this.isCollected = this.collectList.some((t) => {
|
|
608
|
+
var d;
|
|
609
|
+
return t.name === ((d = this.position) == null ? void 0 : d.name);
|
|
578
610
|
});
|
|
579
611
|
},
|
|
580
612
|
initTableData() {
|
|
581
|
-
var l, e, t,
|
|
613
|
+
var l, e, t, d, s, v, M, C, S, L, N, I, P, H, a, r, q, z, T, R, A, E, G, F, B, V, O, U, J, Z, Y, w, D, m;
|
|
582
614
|
this.tableData = {
|
|
583
615
|
hours: [],
|
|
584
616
|
utcHours: [],
|
|
@@ -605,52 +637,52 @@ const ke = (l, e) => {
|
|
|
605
637
|
seaLevel: [],
|
|
606
638
|
seaTemp: []
|
|
607
639
|
};
|
|
608
|
-
for (let
|
|
609
|
-
const
|
|
610
|
-
this.tableData.hours.push(
|
|
611
|
-
const
|
|
612
|
-
this.tableData.weatherUrls.push((e =
|
|
640
|
+
for (let k = 0; k < 24; k++) {
|
|
641
|
+
const W = K(this.pickedDate).clone().add(k, "h").format();
|
|
642
|
+
this.tableData.hours.push(W);
|
|
643
|
+
const u = ((l = fe.pickHourly(this.meteoData, W)) == null ? void 0 : l[0]) || {};
|
|
644
|
+
this.tableData.weatherUrls.push((e = u.weather) == null ? void 0 : e.url), this.tableData.weatherNames.push(((t = u.weather) == null ? void 0 : t.name) ?? "-"), this.tableData.temp.push(this.roundPrecision((d = u.weather) == null ? void 0 : d.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((v = (s = u.weather) == null ? void 0 : s.precip) == null ? void 0 : v.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((C = (M = u.weather) == null ? void 0 : M.precip) == null ? void 0 : C.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((S = u.weather) == null ? void 0 : S.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((L = u.weather) == null ? void 0 : L.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((I = (N = u.weather) == null ? void 0 : N.wind) == null ? void 0 : I.kts, 1)), this.tableData.windDir.push((H = (P = u.weather) == null ? void 0 : P.wind) == null ? void 0 : H.bearing), this.tableData.windGust.push(this.roundPrecision((r = (a = u.weather) == null ? void 0 : a.wind) == null ? void 0 : r.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((z = (q = u.wave) == null ? void 0 : q.sig) == null ? void 0 : z.height, 1) ?? "-"), this.tableData.sigwaveDir.push((R = (T = u.wave) == null ? void 0 : T.sig) == null ? void 0 : R.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((E = (A = u.wave) == null ? void 0 : A.wd) == null ? void 0 : E.height, 1) ?? "-"), this.tableData.windwaveDir.push((F = (G = u.wave) == null ? void 0 : G.wd) == null ? void 0 : F.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((V = (B = u.wave) == null ? void 0 : B.wd) == null ? void 0 : V.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((U = (O = u.wave) == null ? void 0 : O.swell) == null ? void 0 : U.height, 1) ?? "-"), this.tableData.swellDir.push((Z = (J = u.wave) == null ? void 0 : J.swell) == null ? void 0 : Z.bearing), this.tableData.swellPeriod.push(this.roundPrecision((w = (Y = u.wave) == null ? void 0 : Y.swell) == null ? void 0 : w.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((D = u.current) == null ? void 0 : D.speed, 1) ?? "-"), this.tableData.currentDir.push((m = u.current) == null ? void 0 : m.bearing), this.tableData.seaLevel.push(this.roundPrecision(u.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(u.sst, 0) ?? "-");
|
|
613
645
|
}
|
|
614
646
|
},
|
|
615
647
|
initEchart() {
|
|
616
|
-
var R, A, E, G, F, B, V, O, U,
|
|
617
|
-
const l = [], e = [], t = [],
|
|
648
|
+
var T, R, A, E, G, F, B, V, O, U, J, Z, Y;
|
|
649
|
+
const l = [], e = [], t = [], d = [], s = [], v = [], M = [], C = [], S = [], L = [], N = {};
|
|
618
650
|
for (let w = 0; w < 7; w++) {
|
|
619
|
-
const
|
|
620
|
-
l.push(
|
|
621
|
-
const m = ((
|
|
622
|
-
|
|
651
|
+
const D = K(this.pickedDate).clone().add(w, "d");
|
|
652
|
+
l.push(X(D).tz(this.positionGmt).format("yyyy-MM-DD")), e.push(this.computeMMMDD(D)), t.push(w === 0 ? "Today" : this.computeWeek(D));
|
|
653
|
+
const m = ((T = fe.pickDaily(this.meteoData, D)) == null ? void 0 : T[0]) || {};
|
|
654
|
+
d.push(this.roundPrecision((A = (R = m.weather) == null ? void 0 : R.temp) == null ? void 0 : A.min, 0)), s.push(this.roundPrecision((G = (E = m.weather) == null ? void 0 : E.temp) == null ? void 0 : G.max, 0)), C.push(this.roundPrecision((B = (F = m.weather) == null ? void 0 : F.wind) == null ? void 0 : B.kts, 1) ?? "- kts"), L.push(this.roundPrecision((O = (V = m.weather) == null ? void 0 : V.precip) == null ? void 0 : O.sum, 0) ?? "- mm"), v.push({ symbol: "image://" + ((U = m.weather) == null ? void 0 : U.url) }), M.push((J = m.weather) == null ? void 0 : J.name), S.push((Y = (Z = m.weather) == null ? void 0 : Z.wind) == null ? void 0 : Y.degree);
|
|
623
655
|
}
|
|
624
|
-
const
|
|
656
|
+
const I = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...d.filter((w) => typeof w == "number" && !isNaN(w))), P = Math.min(...d.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * I, H = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * I, a = 4 + 0.5 / l.length * 92 + "%", r = "data:image/svg+xml;base64," + window.btoa(
|
|
625
657
|
unescape(
|
|
626
658
|
encodeURIComponent(
|
|
627
659
|
'<svg t="1740385441519" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10951" width="200" height="200"><path d="M512 804.83593751A276.87183211 276.87183211 0 0 1 235.12816789 527.9641054Q235.12816789 375.21005376 512 13.82031251q276.87183211 361.30792288 276.87183211 514.14379289a276.87183211 276.87183211 0 0 1-276.87183211 276.87183211zM294.4461577 527.9641054a217.47202472 217.47202472 0 0 0 217.5538423 217.55384231 19.79993605 19.79993605 0 1 0 0-39.51805453 177.9539702 177.9539702 0 0 1-177.9539702-178.03578778 19.79993605 19.79993605 0 0 0-39.5998721 0z" fill="#0c73a8" p-id="10952"></path></svg>'
|
|
628
660
|
)
|
|
629
661
|
)
|
|
630
|
-
),
|
|
662
|
+
), q = "data:image/svg+xml;base64," + window.btoa(
|
|
631
663
|
unescape(
|
|
632
664
|
encodeURIComponent(
|
|
633
665
|
'<svg t="1740383449285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10797" width="200" height="200"><path d="M133.8 579l-44.4-44.4c-18.8-18.8-18.8-49.2 0-67.8L478 78c18.8-18.8 49.2-18.8 67.8 0l388.6 388.6c18.8 18.8 18.8 49.2 0 67.8L890 578.8c-19 19-50 18.6-68.6-0.8L592 337.2V912c0 26.6-21.4 48-48 48h-64c-26.6 0-48-21.4-48-48V337.2L202.4 578.2c-18.6 19.6-49.6 20-68.6 0.8z" fill="#ffffff" p-id="10798"></path></svg>'
|
|
634
666
|
)
|
|
635
667
|
)
|
|
636
|
-
),
|
|
637
|
-
|
|
668
|
+
), z = new Image(64, 64);
|
|
669
|
+
z.src = q, z.onload = () => {
|
|
638
670
|
for (let m = 0; m < 7; m++) {
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
const Q =
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
|
|
671
|
+
const k = document.createElement("canvas"), W = k.getContext("2d");
|
|
672
|
+
k.width = z.width, k.height = z.height;
|
|
673
|
+
const Q = S[m] * (Math.PI / 180);
|
|
674
|
+
W.translate(k.width / 2, k.height / 2), W.rotate(Q), W.translate(-z.width / 2, -z.height / 2), W.drawImage(z, 0, 0, 64, 64);
|
|
675
|
+
const p = k.toDataURL();
|
|
676
|
+
N[`WindIcon${m}`] = {
|
|
645
677
|
height: 12,
|
|
646
678
|
width: 12,
|
|
647
679
|
align: "left",
|
|
648
680
|
backgroundColor: {
|
|
649
|
-
image:
|
|
681
|
+
image: p
|
|
650
682
|
}
|
|
651
683
|
};
|
|
652
684
|
}
|
|
653
|
-
const w =
|
|
685
|
+
const w = ge.init(document.getElementById("weather-chart")), D = {
|
|
654
686
|
grid: {
|
|
655
687
|
bottom: 0,
|
|
656
688
|
top: 0,
|
|
@@ -662,7 +694,7 @@ const ke = (l, e) => {
|
|
|
662
694
|
show: !0,
|
|
663
695
|
position: "right",
|
|
664
696
|
formatter: function(m) {
|
|
665
|
-
return m.seriesName === "Weather Icon" ?
|
|
697
|
+
return m.seriesName === "Weather Icon" ? M[m.dataIndex] : !1;
|
|
666
698
|
}
|
|
667
699
|
},
|
|
668
700
|
legend: {
|
|
@@ -813,8 +845,8 @@ const ke = (l, e) => {
|
|
|
813
845
|
type: "value",
|
|
814
846
|
name: "温度(℃)",
|
|
815
847
|
show: !1,
|
|
816
|
-
min:
|
|
817
|
-
max:
|
|
848
|
+
min: P,
|
|
849
|
+
max: H,
|
|
818
850
|
axisLabel: {
|
|
819
851
|
formatter: "{value} °C"
|
|
820
852
|
}
|
|
@@ -850,13 +882,13 @@ const ke = (l, e) => {
|
|
|
850
882
|
singleAxisIndex: 2,
|
|
851
883
|
coordinateSystem: "singleAxis",
|
|
852
884
|
type: "scatter",
|
|
853
|
-
data:
|
|
885
|
+
data: v,
|
|
854
886
|
symbolSize: 36
|
|
855
887
|
},
|
|
856
888
|
{
|
|
857
889
|
name: "温度(℃)",
|
|
858
890
|
type: "line",
|
|
859
|
-
data:
|
|
891
|
+
data: d,
|
|
860
892
|
smooth: !0,
|
|
861
893
|
itemStyle: {
|
|
862
894
|
color: "rgba(255,255,255,0.7)"
|
|
@@ -904,13 +936,13 @@ const ke = (l, e) => {
|
|
|
904
936
|
singleAxisIndex: 3,
|
|
905
937
|
coordinateSystem: "singleAxis",
|
|
906
938
|
type: "scatter",
|
|
907
|
-
data:
|
|
939
|
+
data: C,
|
|
908
940
|
label: {
|
|
909
941
|
show: !0,
|
|
910
942
|
color: "#fff",
|
|
911
943
|
// formatter: '{c}'
|
|
912
944
|
rich: {
|
|
913
|
-
...
|
|
945
|
+
...N,
|
|
914
946
|
title: {
|
|
915
947
|
align: "center",
|
|
916
948
|
vertical: "center"
|
|
@@ -926,7 +958,7 @@ const ke = (l, e) => {
|
|
|
926
958
|
singleAxisIndex: 4,
|
|
927
959
|
coordinateSystem: "singleAxis",
|
|
928
960
|
type: "scatter",
|
|
929
|
-
data:
|
|
961
|
+
data: L,
|
|
930
962
|
label: {
|
|
931
963
|
show: !0,
|
|
932
964
|
color: "#fff",
|
|
@@ -953,23 +985,23 @@ const ke = (l, e) => {
|
|
|
953
985
|
}
|
|
954
986
|
]
|
|
955
987
|
};
|
|
956
|
-
w.setOption(
|
|
957
|
-
const
|
|
958
|
-
this.pickedDate =
|
|
988
|
+
w.setOption(D), w.on("click", (m) => {
|
|
989
|
+
const k = m.dataIndex;
|
|
990
|
+
this.pickedDate = X(l[k]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = k === 0 ? "Today" : this.computeWeek(this.pickedDate), this.activeIndex = k === 0 ? X(this.ts).tz(this.positionGmt).hour() : void 0, this.initTableData(), D.series[3].markArea = {
|
|
959
991
|
itemStyle: {
|
|
960
992
|
color: "rgb(71,143,206)"
|
|
961
993
|
},
|
|
962
994
|
data: [
|
|
963
995
|
[
|
|
964
996
|
{
|
|
965
|
-
x: 4 +
|
|
997
|
+
x: 4 + k / l.length * 92 + "%"
|
|
966
998
|
},
|
|
967
999
|
{
|
|
968
|
-
x: 4 + (
|
|
1000
|
+
x: 4 + (k + 1) / l.length * 92 + "%"
|
|
969
1001
|
}
|
|
970
1002
|
]
|
|
971
1003
|
]
|
|
972
|
-
}, w.setOption(
|
|
1004
|
+
}, w.setOption(D);
|
|
973
1005
|
});
|
|
974
1006
|
};
|
|
975
1007
|
},
|
|
@@ -977,34 +1009,34 @@ const ke = (l, e) => {
|
|
|
977
1009
|
this.isCollected = !this.isCollected, this.isCollected ? this.collectList.push({ name: this.position.name, lat: this.position.lat, lng: this.position.lng }) : this.collectList = this.collectList.filter((l) => l.name !== this.position.name), localStorage.setItem("idmCollectList", JSON.stringify(this.collectList));
|
|
978
1010
|
},
|
|
979
1011
|
async fetchSuggestPosition(l) {
|
|
980
|
-
var
|
|
1012
|
+
var d;
|
|
981
1013
|
const e = l.replaceAll(",", ",");
|
|
982
1014
|
if (!e)
|
|
983
1015
|
return this.positionList = this.collectList, !1;
|
|
984
|
-
const t = await
|
|
1016
|
+
const t = await ve.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${e}`, {
|
|
985
1017
|
headers: {
|
|
986
1018
|
Authorization: this.token
|
|
987
1019
|
}
|
|
988
1020
|
});
|
|
989
|
-
(t == null ? void 0 : t.data.code) === 0 && (this.positionList = (
|
|
1021
|
+
(t == null ? void 0 : t.data.code) === 0 && (this.positionList = (d = t == null ? void 0 : t.data.data) == null ? void 0 : d.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
|
|
990
1022
|
},
|
|
991
1023
|
async handleFetchMeteo() {
|
|
992
|
-
var t,
|
|
1024
|
+
var t, d, s;
|
|
993
1025
|
if (!this.searchName)
|
|
994
1026
|
return !1;
|
|
995
1027
|
this.position = {
|
|
996
|
-
portId: (t = this.positionList.find((
|
|
997
|
-
lat: (
|
|
998
|
-
lng: (s = this.positionList.find((
|
|
1028
|
+
portId: (t = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : t.id,
|
|
1029
|
+
lat: (d = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : d.lat,
|
|
1030
|
+
lng: (s = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : s.lng,
|
|
999
1031
|
name: this.searchName
|
|
1000
1032
|
}, this.handleClear();
|
|
1001
1033
|
const l = {
|
|
1002
1034
|
lat: this.position.lat,
|
|
1003
1035
|
lng: this.position.lng,
|
|
1004
|
-
datetime: this.ts ?
|
|
1036
|
+
// datetime: this.ts ? moment(this.ts).utc().add(-1,'d').format() : moment().add(-1,'d').utc().format(),
|
|
1005
1037
|
forecastDays: 8,
|
|
1006
1038
|
selfHosted: !1
|
|
1007
|
-
}, e = await
|
|
1039
|
+
}, e = await ve.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
|
|
1008
1040
|
headers: {
|
|
1009
1041
|
Authorization: this.token
|
|
1010
1042
|
}
|
|
@@ -1014,36 +1046,36 @@ const ke = (l, e) => {
|
|
|
1014
1046
|
}), this.handleRender();
|
|
1015
1047
|
},
|
|
1016
1048
|
handleClear() {
|
|
1017
|
-
this.loading = !0, this.meteoData = {}, this.isCollected = !1,
|
|
1049
|
+
this.loading = !0, this.meteoData = {}, this.isCollected = !1, ge.dispose(document.getElementById("weather-chart"));
|
|
1018
1050
|
}
|
|
1019
1051
|
}
|
|
1020
|
-
},
|
|
1052
|
+
}, Le = { class: "spot-report" }, Ne = { class: "header-box flex-between" }, Ie = { class: "bg" }, Me = { class: "search-box flex-start" }, Ce = { class: "content-box" }, Pe = { class: "title-box flex-between" }, He = { class: "main-title" }, We = { class: "sub-title" }, Te = { class: "flex-end" }, Re = {
|
|
1021
1053
|
key: 0,
|
|
1022
1054
|
id: "weather-chart"
|
|
1023
|
-
},
|
|
1055
|
+
}, Ae = {
|
|
1024
1056
|
key: 1,
|
|
1025
1057
|
class: "weather-chart flex-center"
|
|
1026
|
-
},
|
|
1058
|
+
}, Ee = {
|
|
1027
1059
|
key: 2,
|
|
1028
1060
|
class: "weather-chart flex-center"
|
|
1029
|
-
},
|
|
1061
|
+
}, Ge = {
|
|
1030
1062
|
key: 3,
|
|
1031
1063
|
class: "card-box"
|
|
1032
|
-
},
|
|
1064
|
+
}, Fe = { class: "date" }, Be = { class: "basic-table" }, Ve = { class: "day" }, Oe = { class: "hour" }, Ue = { class: "icon" }, Je = ["src"], Ze = { class: "text" }, Ye = { class: "text" }, qe = { class: "text" }, je = { class: "text" }, Ke = { class: "text" }, Qe = { class: "text" }, Xe = { key: 1 }, $e = { class: "text" }, et = { class: "text" }, tt = { class: "wave-current-table" }, st = { class: "text" }, at = { class: "text" }, it = { key: 1 }, nt = { class: "text" }, ot = { class: "text" }, rt = { class: "text" }, lt = { key: 1 }, dt = { class: "text" }, ht = { class: "text" }, ct = { class: "text" }, ut = { key: 1 }, pt = { class: "text" }, mt = { class: "sea-table" }, wt = { class: "text" }, gt = { class: "text" }, vt = {
|
|
1033
1065
|
key: 4,
|
|
1034
1066
|
class: "card-box flex-center"
|
|
1035
|
-
},
|
|
1067
|
+
}, ft = {
|
|
1036
1068
|
key: 5,
|
|
1037
1069
|
class: "card-box flex-center"
|
|
1038
1070
|
};
|
|
1039
|
-
function
|
|
1040
|
-
var
|
|
1041
|
-
const
|
|
1042
|
-
return n(), o("div",
|
|
1043
|
-
i("div",
|
|
1044
|
-
i("div",
|
|
1045
|
-
i("div",
|
|
1046
|
-
|
|
1071
|
+
function yt(l, e, t, d, s, v) {
|
|
1072
|
+
var L, N, I, P, H;
|
|
1073
|
+
const M = le("ElOption"), C = le("ElSelect"), S = le("ElTooltip");
|
|
1074
|
+
return n(), o("div", Le, [
|
|
1075
|
+
i("div", Ne, [
|
|
1076
|
+
i("div", Ie, [
|
|
1077
|
+
i("div", Me, [
|
|
1078
|
+
de(C, {
|
|
1047
1079
|
modelValue: s.searchName,
|
|
1048
1080
|
"onUpdate:modelValue": e[0] || (e[0] = (a) => s.searchName = a),
|
|
1049
1081
|
filterable: "",
|
|
@@ -1055,11 +1087,11 @@ function vt(l, e, t, h, s, g) {
|
|
|
1055
1087
|
"remote-show-suffix": "",
|
|
1056
1088
|
onFocus: e[1] || (e[1] = (a) => s.placeholder = ""),
|
|
1057
1089
|
onBlur: e[2] || (e[2] = (a) => s.placeholder = "search for port name or coordinates"),
|
|
1058
|
-
"remote-method":
|
|
1059
|
-
onChange:
|
|
1090
|
+
"remote-method": v.fetchSuggestPosition,
|
|
1091
|
+
onChange: v.handleFetchMeteo
|
|
1060
1092
|
}, {
|
|
1061
|
-
default:
|
|
1062
|
-
(n(!0), o(f, null, y(s.positionList, (a) => (n(),
|
|
1093
|
+
default: he(() => [
|
|
1094
|
+
(n(!0), o(f, null, y(s.positionList, (a) => (n(), De(M, {
|
|
1063
1095
|
key: a.name,
|
|
1064
1096
|
label: a.name,
|
|
1065
1097
|
value: a.name
|
|
@@ -1070,447 +1102,447 @@ function vt(l, e, t, h, s, g) {
|
|
|
1070
1102
|
])
|
|
1071
1103
|
])
|
|
1072
1104
|
]),
|
|
1073
|
-
i("div",
|
|
1074
|
-
i("div",
|
|
1105
|
+
i("div", Ce, [
|
|
1106
|
+
i("div", Pe, [
|
|
1075
1107
|
i("div", null, [
|
|
1076
|
-
i("div",
|
|
1077
|
-
i("div",
|
|
1108
|
+
i("div", He, "Weather forecast for " + x(((L = s.position) == null ? void 0 : L.name) || "-") + " ( " + x(s.positionGmt) + " )", 1),
|
|
1109
|
+
i("div", We, "At " + x((N = s.position) != null && N.portId ? "port" : "coordinates") + ", issued " + x(s.issuedDate), 1)
|
|
1078
1110
|
]),
|
|
1079
|
-
i("div",
|
|
1080
|
-
|
|
1111
|
+
i("div", Te, [
|
|
1112
|
+
de(S, {
|
|
1081
1113
|
placement: "left",
|
|
1082
1114
|
effect: "light",
|
|
1083
1115
|
content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
|
|
1084
1116
|
"show-after": 1e3
|
|
1085
1117
|
}, {
|
|
1086
|
-
default:
|
|
1118
|
+
default: he(() => [
|
|
1087
1119
|
s.isCollected ? (n(), o("span", {
|
|
1088
1120
|
key: 0,
|
|
1089
1121
|
class: "iconfont icon active",
|
|
1090
|
-
onClick: e[3] || (e[3] = (...a) =>
|
|
1122
|
+
onClick: e[3] || (e[3] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1091
1123
|
}, "")) : (n(), o("span", {
|
|
1092
1124
|
key: 1,
|
|
1093
1125
|
class: "iconfont icon",
|
|
1094
|
-
onClick: e[4] || (e[4] = (...a) =>
|
|
1126
|
+
onClick: e[4] || (e[4] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1095
1127
|
}, ""))
|
|
1096
1128
|
]),
|
|
1097
1129
|
_: 1
|
|
1098
1130
|
}, 8, ["content"])
|
|
1099
1131
|
])
|
|
1100
1132
|
]),
|
|
1101
|
-
(
|
|
1102
|
-
(
|
|
1103
|
-
i("div",
|
|
1104
|
-
i("table",
|
|
1105
|
-
i("tr",
|
|
1133
|
+
(I = s.position) != null && I.name && !s.loading ? (n(), o("div", Re)) : s.loading ? (n(), o("div", Ae, "Loading....")) : s.position.name ? ce("", !0) : (n(), o("div", Ee, "No Data")),
|
|
1134
|
+
(P = s.position) != null && P.name && !s.loading ? (n(), o("div", Ge, [
|
|
1135
|
+
i("div", Fe, x(s.pickedWeek) + " " + x(v.computeMMMDD(s.pickedDate)), 1),
|
|
1136
|
+
i("table", Be, [
|
|
1137
|
+
i("tr", Ve, [
|
|
1106
1138
|
e[5] || (e[5] = i("th", {
|
|
1107
1139
|
rowspan: "1",
|
|
1108
1140
|
colspan: "1",
|
|
1109
1141
|
class: "tr-title"
|
|
1110
1142
|
}, [
|
|
1111
|
-
|
|
1143
|
+
_("Local time"),
|
|
1112
1144
|
i("span", { class: "unit" }, "(LT)")
|
|
1113
1145
|
], -1)),
|
|
1114
1146
|
(n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
|
|
1115
1147
|
rowspan: "1",
|
|
1116
1148
|
colspan: "1",
|
|
1117
|
-
class:
|
|
1149
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1118
1150
|
key: Math.random() + "local"
|
|
1119
|
-
}, x(
|
|
1151
|
+
}, x(v.computeHourL(a)), 3))), 128))
|
|
1120
1152
|
]),
|
|
1121
|
-
i("tr",
|
|
1153
|
+
i("tr", Oe, [
|
|
1122
1154
|
e[6] || (e[6] = i("th", {
|
|
1123
1155
|
rowspan: "1",
|
|
1124
1156
|
colspan: "1",
|
|
1125
1157
|
class: "tr-title"
|
|
1126
1158
|
}, [
|
|
1127
|
-
|
|
1159
|
+
_("UTC"),
|
|
1128
1160
|
i("span", { class: "unit" })
|
|
1129
1161
|
], -1)),
|
|
1130
1162
|
(n(!0), o(f, null, y(s.tableData.hours, (a, r) => (n(), o("th", {
|
|
1131
1163
|
rowspan: "1",
|
|
1132
1164
|
colspan: "1",
|
|
1133
|
-
class:
|
|
1165
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1134
1166
|
key: Math.random() + "z"
|
|
1135
|
-
}, x(
|
|
1167
|
+
}, x(v.computeHourZ(a)), 3))), 128))
|
|
1136
1168
|
]),
|
|
1137
|
-
i("tr",
|
|
1169
|
+
i("tr", Ue, [
|
|
1138
1170
|
e[7] || (e[7] = i("td", {
|
|
1139
1171
|
rowspan: "1",
|
|
1140
1172
|
colspan: "1",
|
|
1141
1173
|
class: "tr-title"
|
|
1142
1174
|
}, [
|
|
1143
|
-
|
|
1175
|
+
_("Weather"),
|
|
1144
1176
|
i("span", { class: "unit" })
|
|
1145
1177
|
], -1)),
|
|
1146
1178
|
(n(!0), o(f, null, y(s.tableData.weatherUrls, (a, r) => (n(), o("td", {
|
|
1147
1179
|
rowspan: "1",
|
|
1148
1180
|
colspan: "1",
|
|
1149
|
-
class:
|
|
1181
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1150
1182
|
key: Math.random() + "url"
|
|
1151
1183
|
}, [
|
|
1152
|
-
|
|
1184
|
+
de(S, {
|
|
1153
1185
|
placement: "top",
|
|
1154
1186
|
effect: "light",
|
|
1155
1187
|
content: s.tableData.weatherNames[r],
|
|
1156
1188
|
"show-after": 500
|
|
1157
1189
|
}, {
|
|
1158
|
-
default:
|
|
1190
|
+
default: he(() => [
|
|
1159
1191
|
a ? (n(), o("img", {
|
|
1160
1192
|
key: 0,
|
|
1161
1193
|
class: "iconfont weather-icon",
|
|
1162
1194
|
src: a
|
|
1163
|
-
}, null, 8,
|
|
1195
|
+
}, null, 8, Je)) : ce("", !0)
|
|
1164
1196
|
]),
|
|
1165
1197
|
_: 2
|
|
1166
1198
|
}, 1032, ["content"])
|
|
1167
1199
|
], 2))), 128))
|
|
1168
1200
|
]),
|
|
1169
|
-
i("tr",
|
|
1201
|
+
i("tr", Ze, [
|
|
1170
1202
|
e[8] || (e[8] = i("td", {
|
|
1171
1203
|
rowspan: "1",
|
|
1172
1204
|
colspan: "1",
|
|
1173
1205
|
class: "tr-title"
|
|
1174
1206
|
}, [
|
|
1175
|
-
|
|
1207
|
+
_("Temperature"),
|
|
1176
1208
|
i("span", { class: "unit" }, "°C")
|
|
1177
1209
|
], -1)),
|
|
1178
1210
|
(n(!0), o(f, null, y(s.tableData.temp, (a, r) => (n(), o("td", {
|
|
1179
1211
|
rowspan: "1",
|
|
1180
1212
|
colspan: "1",
|
|
1181
|
-
class:
|
|
1213
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1182
1214
|
key: Math.random() + a
|
|
1183
1215
|
}, x(a), 3))), 128))
|
|
1184
1216
|
]),
|
|
1185
|
-
i("tr",
|
|
1217
|
+
i("tr", Ye, [
|
|
1186
1218
|
e[9] || (e[9] = i("td", {
|
|
1187
1219
|
rowspan: "1",
|
|
1188
1220
|
colspan: "1",
|
|
1189
1221
|
class: "tr-title"
|
|
1190
1222
|
}, [
|
|
1191
|
-
|
|
1223
|
+
_("Precipitation Probability"),
|
|
1192
1224
|
i("span", { class: "unit" }, "%")
|
|
1193
1225
|
], -1)),
|
|
1194
1226
|
(n(!0), o(f, null, y(s.tableData.precipProbability, (a, r) => (n(), o("td", {
|
|
1195
1227
|
rowspan: "1",
|
|
1196
1228
|
colspan: "1",
|
|
1197
|
-
class:
|
|
1229
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1198
1230
|
key: Math.random() + a
|
|
1199
1231
|
}, x(a), 3))), 128))
|
|
1200
1232
|
]),
|
|
1201
|
-
i("tr",
|
|
1233
|
+
i("tr", qe, [
|
|
1202
1234
|
e[10] || (e[10] = i("td", {
|
|
1203
1235
|
rowspan: "1",
|
|
1204
1236
|
colspan: "1",
|
|
1205
1237
|
class: "tr-title"
|
|
1206
1238
|
}, [
|
|
1207
|
-
|
|
1239
|
+
_("Precipitation 1h"),
|
|
1208
1240
|
i("span", { class: "unit" }, "mm")
|
|
1209
1241
|
], -1)),
|
|
1210
1242
|
(n(!0), o(f, null, y(s.tableData.precip1h, (a, r) => (n(), o("td", {
|
|
1211
1243
|
rowspan: "1",
|
|
1212
1244
|
colspan: "1",
|
|
1213
|
-
class:
|
|
1245
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1214
1246
|
key: Math.random() + a
|
|
1215
1247
|
}, x(a), 3))), 128))
|
|
1216
1248
|
]),
|
|
1217
|
-
i("tr",
|
|
1249
|
+
i("tr", je, [
|
|
1218
1250
|
e[11] || (e[11] = i("td", {
|
|
1219
1251
|
rowspan: "1",
|
|
1220
1252
|
colspan: "1",
|
|
1221
1253
|
class: "tr-title"
|
|
1222
1254
|
}, [
|
|
1223
|
-
|
|
1255
|
+
_("Visibility"),
|
|
1224
1256
|
i("span", { class: "unit" }, "nm")
|
|
1225
1257
|
], -1)),
|
|
1226
1258
|
(n(!0), o(f, null, y(s.tableData.visibility, (a, r) => (n(), o("td", {
|
|
1227
1259
|
rowspan: "1",
|
|
1228
1260
|
colspan: "1",
|
|
1229
|
-
class:
|
|
1261
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1230
1262
|
key: Math.random() + a
|
|
1231
1263
|
}, x(a), 3))), 128))
|
|
1232
1264
|
]),
|
|
1233
|
-
i("tr",
|
|
1265
|
+
i("tr", Ke, [
|
|
1234
1266
|
e[12] || (e[12] = i("td", {
|
|
1235
1267
|
rowspan: "1",
|
|
1236
1268
|
colspan: "1",
|
|
1237
1269
|
class: "tr-title"
|
|
1238
1270
|
}, [
|
|
1239
|
-
|
|
1271
|
+
_("Relative Humidity"),
|
|
1240
1272
|
i("span", { class: "unit" }, "%")
|
|
1241
1273
|
], -1)),
|
|
1242
1274
|
(n(!0), o(f, null, y(s.tableData.humidity, (a, r) => (n(), o("td", {
|
|
1243
1275
|
rowspan: "1",
|
|
1244
1276
|
colspan: "1",
|
|
1245
|
-
class:
|
|
1277
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1246
1278
|
key: Math.random() + a
|
|
1247
1279
|
}, x(a), 3))), 128))
|
|
1248
1280
|
]),
|
|
1249
|
-
i("tr",
|
|
1281
|
+
i("tr", Qe, [
|
|
1250
1282
|
e[13] || (e[13] = i("td", {
|
|
1251
1283
|
rowspan: "1",
|
|
1252
1284
|
colspan: "1",
|
|
1253
1285
|
class: "tr-title"
|
|
1254
1286
|
}, [
|
|
1255
|
-
|
|
1287
|
+
_("Wind direction"),
|
|
1256
1288
|
i("span", { class: "unit" })
|
|
1257
1289
|
], -1)),
|
|
1258
1290
|
(n(!0), o(f, null, y(s.tableData.windDir, (a, r) => (n(), o("td", {
|
|
1259
1291
|
rowspan: "1",
|
|
1260
1292
|
colspan: "1",
|
|
1261
|
-
class:
|
|
1293
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1262
1294
|
key: Math.random() + a
|
|
1263
1295
|
}, [
|
|
1264
|
-
isNaN(a) ? (n(), o("span",
|
|
1296
|
+
isNaN(a) ? (n(), o("span", Xe, "-")) : (n(), o("span", {
|
|
1265
1297
|
key: 0,
|
|
1266
1298
|
class: "iconfont icon",
|
|
1267
|
-
style:
|
|
1299
|
+
style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1268
1300
|
}, "", 4))
|
|
1269
1301
|
], 2))), 128))
|
|
1270
1302
|
]),
|
|
1271
|
-
i("tr",
|
|
1303
|
+
i("tr", $e, [
|
|
1272
1304
|
e[14] || (e[14] = i("td", {
|
|
1273
1305
|
rowspan: "1",
|
|
1274
1306
|
colspan: "1",
|
|
1275
1307
|
class: "tr-title"
|
|
1276
1308
|
}, [
|
|
1277
|
-
|
|
1309
|
+
_("Wind speed"),
|
|
1278
1310
|
i("span", { class: "unit" }, "kts")
|
|
1279
1311
|
], -1)),
|
|
1280
1312
|
(n(!0), o(f, null, y(s.tableData.windSpeed, (a, r) => (n(), o("td", {
|
|
1281
1313
|
rowspan: "1",
|
|
1282
1314
|
colspan: "1",
|
|
1283
|
-
class:
|
|
1315
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1284
1316
|
key: Math.random() + a
|
|
1285
1317
|
}, x(a), 3))), 128))
|
|
1286
1318
|
]),
|
|
1287
|
-
i("tr",
|
|
1319
|
+
i("tr", et, [
|
|
1288
1320
|
e[15] || (e[15] = i("td", {
|
|
1289
1321
|
rowspan: "1",
|
|
1290
1322
|
colspan: "1",
|
|
1291
1323
|
class: "tr-title"
|
|
1292
1324
|
}, [
|
|
1293
|
-
|
|
1325
|
+
_("Wind gust"),
|
|
1294
1326
|
i("span", { class: "unit" }, "kts")
|
|
1295
1327
|
], -1)),
|
|
1296
1328
|
(n(!0), o(f, null, y(s.tableData.windGust, (a, r) => (n(), o("td", {
|
|
1297
1329
|
rowspan: "1",
|
|
1298
1330
|
colspan: "1",
|
|
1299
|
-
class:
|
|
1331
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1300
1332
|
key: Math.random() + a
|
|
1301
1333
|
}, x(a), 3))), 128))
|
|
1302
1334
|
])
|
|
1303
1335
|
]),
|
|
1304
1336
|
e[27] || (e[27] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1305
|
-
i("table",
|
|
1306
|
-
i("tr",
|
|
1337
|
+
i("table", tt, [
|
|
1338
|
+
i("tr", st, [
|
|
1307
1339
|
e[16] || (e[16] = i("td", {
|
|
1308
1340
|
rowspan: "1",
|
|
1309
1341
|
colspan: "1",
|
|
1310
1342
|
class: "tr-title"
|
|
1311
1343
|
}, [
|
|
1312
|
-
|
|
1344
|
+
_("Wind wave height"),
|
|
1313
1345
|
i("span", { class: "unit" }, "m")
|
|
1314
1346
|
], -1)),
|
|
1315
1347
|
(n(!0), o(f, null, y(s.tableData.windwaveHeight, (a, r) => (n(), o("td", {
|
|
1316
1348
|
rowspan: "1",
|
|
1317
1349
|
colspan: "1",
|
|
1318
|
-
class:
|
|
1350
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1319
1351
|
key: Math.random() + a
|
|
1320
1352
|
}, x(a), 3))), 128))
|
|
1321
1353
|
]),
|
|
1322
|
-
i("tr",
|
|
1354
|
+
i("tr", at, [
|
|
1323
1355
|
e[17] || (e[17] = i("td", {
|
|
1324
1356
|
rowspan: "1",
|
|
1325
1357
|
colspan: "1",
|
|
1326
1358
|
class: "tr-title"
|
|
1327
1359
|
}, [
|
|
1328
|
-
|
|
1360
|
+
_("Wind wave direction"),
|
|
1329
1361
|
i("span", { class: "unit" })
|
|
1330
1362
|
], -1)),
|
|
1331
1363
|
(n(!0), o(f, null, y(s.tableData.windwaveDir, (a, r) => (n(), o("td", {
|
|
1332
1364
|
rowspan: "1",
|
|
1333
1365
|
colspan: "1",
|
|
1334
|
-
class:
|
|
1366
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1335
1367
|
key: Math.random() + a
|
|
1336
1368
|
}, [
|
|
1337
|
-
isNaN(a) ? (n(), o("span",
|
|
1369
|
+
isNaN(a) ? (n(), o("span", it, "-")) : (n(), o("span", {
|
|
1338
1370
|
key: 0,
|
|
1339
1371
|
class: "iconfont icon",
|
|
1340
|
-
style:
|
|
1372
|
+
style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1341
1373
|
}, "", 4))
|
|
1342
1374
|
], 2))), 128))
|
|
1343
1375
|
]),
|
|
1344
|
-
i("tr",
|
|
1376
|
+
i("tr", nt, [
|
|
1345
1377
|
e[18] || (e[18] = i("td", {
|
|
1346
1378
|
rowspan: "1",
|
|
1347
1379
|
colspan: "1",
|
|
1348
1380
|
class: "tr-title"
|
|
1349
1381
|
}, [
|
|
1350
|
-
|
|
1382
|
+
_("Wind wave period"),
|
|
1351
1383
|
i("span", { class: "unit" }, "s")
|
|
1352
1384
|
], -1)),
|
|
1353
1385
|
(n(!0), o(f, null, y(s.tableData.windwavePeriod, (a, r) => (n(), o("td", {
|
|
1354
1386
|
rowspan: "1",
|
|
1355
1387
|
colspan: "1",
|
|
1356
|
-
class:
|
|
1388
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1357
1389
|
key: Math.random() + a
|
|
1358
1390
|
}, x(a), 3))), 128))
|
|
1359
1391
|
]),
|
|
1360
|
-
i("tr",
|
|
1392
|
+
i("tr", ot, [
|
|
1361
1393
|
e[19] || (e[19] = i("td", {
|
|
1362
1394
|
rowspan: "1",
|
|
1363
1395
|
colspan: "1",
|
|
1364
1396
|
class: "tr-title"
|
|
1365
1397
|
}, [
|
|
1366
|
-
|
|
1398
|
+
_("Swell height"),
|
|
1367
1399
|
i("span", { class: "unit" }, "m")
|
|
1368
1400
|
], -1)),
|
|
1369
1401
|
(n(!0), o(f, null, y(s.tableData.swellHeight, (a, r) => (n(), o("td", {
|
|
1370
1402
|
rowspan: "1",
|
|
1371
1403
|
colspan: "1",
|
|
1372
|
-
class:
|
|
1404
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1373
1405
|
key: Math.random() + a
|
|
1374
1406
|
}, x(a), 3))), 128))
|
|
1375
1407
|
]),
|
|
1376
|
-
i("tr",
|
|
1408
|
+
i("tr", rt, [
|
|
1377
1409
|
e[20] || (e[20] = i("td", {
|
|
1378
1410
|
rowspan: "1",
|
|
1379
1411
|
colspan: "1",
|
|
1380
1412
|
class: "tr-title"
|
|
1381
1413
|
}, [
|
|
1382
|
-
|
|
1414
|
+
_("Swell direction"),
|
|
1383
1415
|
i("span", { class: "unit" })
|
|
1384
1416
|
], -1)),
|
|
1385
1417
|
(n(!0), o(f, null, y(s.tableData.swellDir, (a, r) => (n(), o("td", {
|
|
1386
1418
|
rowspan: "1",
|
|
1387
1419
|
colspan: "1",
|
|
1388
|
-
class:
|
|
1420
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1389
1421
|
key: Math.random() + a
|
|
1390
1422
|
}, [
|
|
1391
|
-
isNaN(a) ? (n(), o("span",
|
|
1423
|
+
isNaN(a) ? (n(), o("span", lt, "-")) : (n(), o("span", {
|
|
1392
1424
|
key: 0,
|
|
1393
1425
|
class: "iconfont icon",
|
|
1394
|
-
style:
|
|
1426
|
+
style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1395
1427
|
}, "", 4))
|
|
1396
1428
|
], 2))), 128))
|
|
1397
1429
|
]),
|
|
1398
|
-
i("tr",
|
|
1430
|
+
i("tr", dt, [
|
|
1399
1431
|
e[21] || (e[21] = i("td", {
|
|
1400
1432
|
rowspan: "1",
|
|
1401
1433
|
colspan: "1",
|
|
1402
1434
|
class: "tr-title"
|
|
1403
1435
|
}, [
|
|
1404
|
-
|
|
1436
|
+
_("Swell period"),
|
|
1405
1437
|
i("span", { class: "unit" }, "s")
|
|
1406
1438
|
], -1)),
|
|
1407
1439
|
(n(!0), o(f, null, y(s.tableData.swellPeriod, (a, r) => (n(), o("td", {
|
|
1408
1440
|
rowspan: "1",
|
|
1409
1441
|
colspan: "1",
|
|
1410
|
-
class:
|
|
1442
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1411
1443
|
key: Math.random() + a
|
|
1412
1444
|
}, x(a), 3))), 128))
|
|
1413
1445
|
]),
|
|
1414
|
-
i("tr",
|
|
1446
|
+
i("tr", ht, [
|
|
1415
1447
|
e[22] || (e[22] = i("td", {
|
|
1416
1448
|
rowspan: "1",
|
|
1417
1449
|
colspan: "1",
|
|
1418
1450
|
class: "tr-title"
|
|
1419
1451
|
}, [
|
|
1420
|
-
|
|
1452
|
+
_("Sig wave height"),
|
|
1421
1453
|
i("span", { class: "unit" }, "m")
|
|
1422
1454
|
], -1)),
|
|
1423
1455
|
(n(!0), o(f, null, y(s.tableData.sigwaveHeight, (a, r) => (n(), o("td", {
|
|
1424
1456
|
rowspan: "1",
|
|
1425
1457
|
colspan: "1",
|
|
1426
|
-
class:
|
|
1458
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1427
1459
|
key: Math.random() + a
|
|
1428
1460
|
}, x(a), 3))), 128))
|
|
1429
1461
|
]),
|
|
1430
|
-
i("tr",
|
|
1462
|
+
i("tr", ct, [
|
|
1431
1463
|
e[23] || (e[23] = i("td", {
|
|
1432
1464
|
rowspan: "1",
|
|
1433
1465
|
colspan: "1",
|
|
1434
1466
|
class: "tr-title"
|
|
1435
1467
|
}, [
|
|
1436
|
-
|
|
1468
|
+
_("Current direction"),
|
|
1437
1469
|
i("span", { class: "unit" })
|
|
1438
1470
|
], -1)),
|
|
1439
1471
|
(n(!0), o(f, null, y(s.tableData.currentDir, (a, r) => (n(), o("td", {
|
|
1440
1472
|
rowspan: "1",
|
|
1441
1473
|
colspan: "1",
|
|
1442
|
-
class:
|
|
1474
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1443
1475
|
key: Math.random() + a
|
|
1444
1476
|
}, [
|
|
1445
|
-
isNaN(a) ? (n(), o("span",
|
|
1477
|
+
isNaN(a) ? (n(), o("span", ut, "-")) : (n(), o("span", {
|
|
1446
1478
|
key: 0,
|
|
1447
1479
|
class: "iconfont icon",
|
|
1448
|
-
style:
|
|
1480
|
+
style: ie({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1449
1481
|
}, "", 4))
|
|
1450
1482
|
], 2))), 128))
|
|
1451
1483
|
]),
|
|
1452
|
-
i("tr",
|
|
1484
|
+
i("tr", pt, [
|
|
1453
1485
|
e[24] || (e[24] = i("td", {
|
|
1454
1486
|
rowspan: "1",
|
|
1455
1487
|
colspan: "1",
|
|
1456
1488
|
class: "tr-title"
|
|
1457
1489
|
}, [
|
|
1458
|
-
|
|
1490
|
+
_("Current speed"),
|
|
1459
1491
|
i("span", { class: "unit" }, "kts")
|
|
1460
1492
|
], -1)),
|
|
1461
1493
|
(n(!0), o(f, null, y(s.tableData.currentSpeed, (a, r) => (n(), o("td", {
|
|
1462
1494
|
rowspan: "1",
|
|
1463
1495
|
colspan: "1",
|
|
1464
|
-
class:
|
|
1496
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1465
1497
|
key: Math.random() + a
|
|
1466
1498
|
}, x(a), 3))), 128))
|
|
1467
1499
|
])
|
|
1468
1500
|
]),
|
|
1469
1501
|
e[28] || (e[28] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1470
|
-
i("table",
|
|
1471
|
-
i("tr",
|
|
1502
|
+
i("table", mt, [
|
|
1503
|
+
i("tr", wt, [
|
|
1472
1504
|
e[25] || (e[25] = i("td", {
|
|
1473
1505
|
rowspan: "1",
|
|
1474
1506
|
colspan: "1",
|
|
1475
1507
|
class: "tr-title"
|
|
1476
1508
|
}, [
|
|
1477
|
-
|
|
1509
|
+
_("Sea level height"),
|
|
1478
1510
|
i("span", { class: "unit" }, "m")
|
|
1479
1511
|
], -1)),
|
|
1480
1512
|
(n(!0), o(f, null, y(s.tableData.seaLevel, (a, r) => (n(), o("td", {
|
|
1481
1513
|
rowspan: "1",
|
|
1482
1514
|
colspan: "1",
|
|
1483
|
-
class:
|
|
1515
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1484
1516
|
key: Math.random() + a
|
|
1485
1517
|
}, x(a), 3))), 128))
|
|
1486
1518
|
]),
|
|
1487
|
-
i("tr",
|
|
1519
|
+
i("tr", gt, [
|
|
1488
1520
|
e[26] || (e[26] = i("td", {
|
|
1489
1521
|
rowspan: "1",
|
|
1490
1522
|
colspan: "1",
|
|
1491
1523
|
class: "tr-title"
|
|
1492
1524
|
}, [
|
|
1493
|
-
|
|
1525
|
+
_("Sea surface temperature"),
|
|
1494
1526
|
i("span", { class: "unit" }, "°C")
|
|
1495
1527
|
], -1)),
|
|
1496
1528
|
(n(!0), o(f, null, y(s.tableData.seaTemp, (a, r) => (n(), o("td", {
|
|
1497
1529
|
rowspan: "1",
|
|
1498
1530
|
colspan: "1",
|
|
1499
|
-
class:
|
|
1531
|
+
class: b(s.activeIndex === r ? "active" : ""),
|
|
1500
1532
|
key: Math.random() + a
|
|
1501
1533
|
}, x(a), 3))), 128))
|
|
1502
1534
|
])
|
|
1503
1535
|
])
|
|
1504
|
-
])) : s.loading ? (n(), o("div",
|
|
1536
|
+
])) : s.loading ? (n(), o("div", vt, "Loading....")) : (H = s.position) != null && H.name ? ce("", !0) : (n(), o("div", ft, "No Data"))
|
|
1505
1537
|
])
|
|
1506
1538
|
]);
|
|
1507
1539
|
}
|
|
1508
|
-
const
|
|
1540
|
+
const xt = /* @__PURE__ */ ze(Se, [["render", yt], ["__scopeId", "data-v-4a0bd795"]]), Lt = {
|
|
1509
1541
|
install(l) {
|
|
1510
|
-
l.component("SpotReport",
|
|
1542
|
+
l.component("SpotReport", xt);
|
|
1511
1543
|
}
|
|
1512
1544
|
};
|
|
1513
1545
|
export {
|
|
1514
|
-
|
|
1515
|
-
|
|
1546
|
+
xt as SpotReport,
|
|
1547
|
+
Lt as SpotReportPlugin
|
|
1516
1548
|
};
|