@idmui/spot 0.1.6 → 0.1.8
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/Spot/src/index.vue.d.ts +11 -7
- package/dist/index.js +428 -424
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
import X from "moment";
|
|
2
|
-
import
|
|
3
|
-
import { Search as
|
|
4
|
-
import { LngLatHelper as
|
|
5
|
-
import * as
|
|
6
|
-
import { markRaw as
|
|
7
|
-
import
|
|
8
|
-
class
|
|
9
|
-
static pickHourly(
|
|
10
|
-
var h, s, v, M, C, S, L, N, I, P,
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
const d =
|
|
14
|
-
let
|
|
2
|
+
import tt from "moment-timezone";
|
|
3
|
+
import { Search as Mt } from "@element-plus/icons-vue";
|
|
4
|
+
import { LngLatHelper as ut } from "@idm-plugin/geo";
|
|
5
|
+
import * as wt from "echarts";
|
|
6
|
+
import { markRaw as Ct, resolveComponent as gt, openBlock as o, createElementBlock as r, createElementVNode as i, createVNode as vt, withCtx as bt, Fragment as b, renderList as x, createBlock as Pt, toDisplayString as f, createTextVNode as _, normalizeClass as z, createCommentVNode as Ht, normalizeStyle as ct } from "vue";
|
|
7
|
+
import kt from "axios";
|
|
8
|
+
class Dt {
|
|
9
|
+
static pickHourly(t, e) {
|
|
10
|
+
var h, s, v, M, C, S, L, N, I, P, a, n, Q, K, D, T, R, E, A, G, F, O, B, V, U, Z, J, Y, w, k, p, y, H, g, j, et, at, rt, ot, W, st, m, it, u, lt, ht, dt, xt;
|
|
11
|
+
const ft = typeof e == "string" ? X(e) : e, $ = t == null ? void 0 : t.weather, yt = t == null ? void 0 : t.marine, _t = X((s = (h = $ == null ? void 0 : $[0]) == null ? void 0 : h.hourly) == null ? void 0 : s.date).utc(), pt = _t.clone().add((C = (M = (v = $ == null ? void 0 : $[0]) == null ? void 0 : v.hourly) == null ? void 0 : M.time) == null ? void 0 : C.at(0), "h"), St = _t.clone().add((N = (L = (S = $ == null ? void 0 : $[0]) == null ? void 0 : S.hourly) == null ? void 0 : L.time) == null ? void 0 : N.at(-1), "h"), zt = [];
|
|
12
|
+
if (ft.isBetween(pt, St, "millisecond", "[]")) {
|
|
13
|
+
const d = ft.utc().diff(pt, "h", !1);
|
|
14
|
+
let q, nt;
|
|
15
15
|
if ($)
|
|
16
|
-
for (const
|
|
17
|
-
const c =
|
|
18
|
-
|
|
16
|
+
for (const mt of $) {
|
|
17
|
+
const c = mt.hourly;
|
|
18
|
+
q = {
|
|
19
19
|
temp: (I = c.temperature_2m) == null ? void 0 : I.at(d),
|
|
20
20
|
apparentTemp: (P = c.apparent_temperature) == null ? void 0 : P.at(d),
|
|
21
|
-
rh: (
|
|
22
|
-
dp: (
|
|
21
|
+
rh: (a = c.relative_humidity_2m) == null ? void 0 : a.at(d),
|
|
22
|
+
dp: (n = c.dew_point_2m) == null ? void 0 : n.at(d),
|
|
23
23
|
precip: {
|
|
24
|
-
probability: (
|
|
24
|
+
probability: (Q = c.precipitation_probability) == null ? void 0 : Q.at(d),
|
|
25
25
|
sum: (K = c.precipitation) == null ? void 0 : K.at(d)
|
|
26
26
|
},
|
|
27
27
|
pmsl: (D = c.pressure_msl) == null ? void 0 : D.at(d),
|
|
28
|
-
psurf: (
|
|
29
|
-
code: (
|
|
28
|
+
psurf: (T = c.surface_pressure) == null ? void 0 : T.at(d),
|
|
29
|
+
code: (R = c.weather_code) == null ? void 0 : R.at(d),
|
|
30
30
|
visibility: this.m2nm((E = c.visibility) == null ? void 0 : E.at(d)),
|
|
31
31
|
wind: {
|
|
32
|
-
speed: (
|
|
33
|
-
kts: (
|
|
34
|
-
degree: (
|
|
35
|
-
bearing: ((O = c.wind_direction_10m) == null ? void 0 : O.at(d)) !== null ? (((
|
|
36
|
-
gusts: (
|
|
32
|
+
speed: (A = c.wind_speed_10m) == null ? void 0 : A.at(d),
|
|
33
|
+
kts: (G = c.wind_speed_10m) == null ? void 0 : G.at(d),
|
|
34
|
+
degree: (F = c.wind_direction_10m) == null ? void 0 : F.at(d),
|
|
35
|
+
bearing: ((O = c.wind_direction_10m) == null ? void 0 : O.at(d)) !== null ? (((B = c.wind_direction_10m) == null ? void 0 : B.at(d)) + 180) % 360 : null,
|
|
36
|
+
gusts: (V = c.wind_gusts_10m) == null ? void 0 : V.at(d)
|
|
37
37
|
},
|
|
38
|
-
isDay: (
|
|
38
|
+
isDay: (U = c.is_day) == null ? void 0 : U.at(d)
|
|
39
39
|
};
|
|
40
|
-
const { name:
|
|
41
|
-
|
|
40
|
+
const { name: Lt, url: Nt, bg: It } = this.parseWeatherCode(q.code, q.isDay);
|
|
41
|
+
q.name = Lt, q.url = Nt, q.bg = It, q.wind.scale = this.beaufort(this.kts2ms(q.wind.kts)), q.wind.direction = this.degree2Direction(q.wind.degree);
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
44
|
-
for (const
|
|
45
|
-
const c =
|
|
46
|
-
|
|
43
|
+
if (yt)
|
|
44
|
+
for (const mt of yt) {
|
|
45
|
+
const c = mt.hourly;
|
|
46
|
+
nt = {
|
|
47
47
|
wave: {
|
|
48
48
|
sig: {
|
|
49
|
-
height: (
|
|
50
|
-
degree: (
|
|
51
|
-
bearing: ((
|
|
49
|
+
height: (Z = c.wave_height) == null ? void 0 : Z.at(d),
|
|
50
|
+
degree: (J = c.wave_direction) == null ? void 0 : J.at(d),
|
|
51
|
+
bearing: ((Y = c.wave_direction) == null ? void 0 : Y.at(d)) !== null ? (((w = c.wave_direction) == null ? void 0 : w.at(d)) + 180) % 360 : null,
|
|
52
52
|
period: (k = c.wave_period) == null ? void 0 : k.at(d)
|
|
53
53
|
},
|
|
54
54
|
swell: {
|
|
55
55
|
height: (p = c.swell_wave_height) == null ? void 0 : p.at(d),
|
|
56
56
|
degree: (y = c.swell_wave_direction) == null ? void 0 : y.at(d),
|
|
57
|
-
bearing: ((
|
|
58
|
-
period: (
|
|
59
|
-
peakPeriod: (
|
|
57
|
+
bearing: ((H = c.swell_wave_direction) == null ? void 0 : H.at(d)) !== null ? (((g = c.swell_wave_direction) == null ? void 0 : g.at(d)) + 180) % 360 : null,
|
|
58
|
+
period: (j = c.swell_wave_period) == null ? void 0 : j.at(d),
|
|
59
|
+
peakPeriod: (et = c.swell_wave_peak_period) == null ? void 0 : et.at(d)
|
|
60
60
|
},
|
|
61
61
|
wd: {
|
|
62
|
-
height: (
|
|
63
|
-
degree: (
|
|
64
|
-
bearing: ((
|
|
65
|
-
period: (
|
|
62
|
+
height: (at = c.wind_wave_height) == null ? void 0 : at.at(d),
|
|
63
|
+
degree: (rt = c.wind_wave_direction) == null ? void 0 : rt.at(d),
|
|
64
|
+
bearing: ((ot = c.wind_wave_direction) == null ? void 0 : ot.at(d)) !== null ? (((W = c.wind_wave_direction) == null ? void 0 : W.at(d)) + 180) % 360 : null,
|
|
65
|
+
period: (st = c.wind_wave_period) == null ? void 0 : st.at(d),
|
|
66
66
|
peakPeriod: (m = c.wind_wave_peak_period) == null ? void 0 : m.at(d)
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
current: {
|
|
70
|
-
speed: (
|
|
70
|
+
speed: (it = c.ocean_current_velocity) == null ? void 0 : it.at(d),
|
|
71
71
|
kts: (u = c.ocean_current_velocity) == null ? void 0 : u.at(d),
|
|
72
|
-
degree: (
|
|
73
|
-
bearing: ((
|
|
72
|
+
degree: (lt = c.ocean_current_direction) == null ? void 0 : lt.at(d),
|
|
73
|
+
bearing: ((ht = c.ocean_current_direction) == null ? void 0 : ht.at(d)) ?? null
|
|
74
74
|
},
|
|
75
|
-
sst: (
|
|
76
|
-
height: (
|
|
77
|
-
},
|
|
75
|
+
sst: (dt = c.sea_surface_temperature) == null ? void 0 : dt.at(d),
|
|
76
|
+
height: (xt = c.sea_level_height_msl) == null ? void 0 : xt.at(d)
|
|
77
|
+
}, nt.wave = this.parseWave(nt.wave), nt.current.direction = this.degree2Direction(nt.current.degree);
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
utc:
|
|
81
|
-
weather: { ...
|
|
82
|
-
...
|
|
79
|
+
zt.push({
|
|
80
|
+
utc: pt.add(d, "h").format(),
|
|
81
|
+
weather: { ...q },
|
|
82
|
+
...nt
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return zt;
|
|
86
86
|
}
|
|
87
|
-
static toLegacy(
|
|
87
|
+
static toLegacy(t) {
|
|
88
88
|
return {
|
|
89
|
-
wind:
|
|
90
|
-
visibility:
|
|
91
|
-
temp:
|
|
92
|
-
prmsl:
|
|
89
|
+
wind: t.weather.wind,
|
|
90
|
+
visibility: t.weather.visibility,
|
|
91
|
+
temp: t.weather.temp,
|
|
92
|
+
prmsl: t.weather.pmsl,
|
|
93
93
|
gusts: {
|
|
94
|
-
kts:
|
|
94
|
+
kts: t.weather.wind.gusts
|
|
95
95
|
},
|
|
96
|
-
precip:
|
|
97
|
-
code:
|
|
98
|
-
name:
|
|
99
|
-
url:
|
|
100
|
-
wave:
|
|
101
|
-
current:
|
|
102
|
-
sst:
|
|
103
|
-
height:
|
|
104
|
-
utc:
|
|
96
|
+
precip: t.weather.precip,
|
|
97
|
+
code: t.weather.code,
|
|
98
|
+
name: t.weather.name,
|
|
99
|
+
url: t.weather.url,
|
|
100
|
+
wave: t.wave,
|
|
101
|
+
current: t.current,
|
|
102
|
+
sst: t.sst,
|
|
103
|
+
height: t.height,
|
|
104
|
+
utc: t.utc
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
static pickDaily(
|
|
108
|
-
var h, s, v, M, C, S, L, N, I, P,
|
|
109
|
-
const g = typeof
|
|
110
|
-
if (g.isBetween(
|
|
111
|
-
let
|
|
112
|
-
const m = g.diff(
|
|
113
|
-
if (
|
|
114
|
-
for (const
|
|
115
|
-
const u =
|
|
116
|
-
|
|
107
|
+
static pickDaily(t, e) {
|
|
108
|
+
var h, s, v, M, C, S, L, N, I, P, a, n, Q, K, D, T, R, E, A, G, F, O, B, V, U, Z, J, Y, w, k, p, y, H;
|
|
109
|
+
const g = typeof e == "string" ? X(e) : e, j = t == null ? void 0 : t.weather, et = t == null ? void 0 : t.marine, at = X((v = (s = (h = j == null ? void 0 : j[0]) == null ? void 0 : h.daily) == null ? void 0 : s.time) == null ? void 0 : v.at(0)), rt = X((S = (C = (M = j == null ? void 0 : j[0]) == null ? void 0 : M.daily) == null ? void 0 : C.time) == null ? void 0 : S.at(-1)), ot = [];
|
|
110
|
+
if (g.isBetween(at, rt, "millisecond", "[]")) {
|
|
111
|
+
let W, st;
|
|
112
|
+
const m = g.diff(at, "d", !1);
|
|
113
|
+
if (j)
|
|
114
|
+
for (const it of j) {
|
|
115
|
+
const u = it.daily;
|
|
116
|
+
W = {
|
|
117
117
|
code: (L = u.weather_code) == null ? void 0 : L.at(m),
|
|
118
118
|
temp: {
|
|
119
119
|
max: (N = u.temperature_2m_max) == null ? void 0 : N.at(m),
|
|
@@ -121,447 +121,447 @@ class Se {
|
|
|
121
121
|
mean: (P = u.temperature_2m_mean) == null ? void 0 : P.at(m)
|
|
122
122
|
},
|
|
123
123
|
apparentTemp: {
|
|
124
|
-
max: (
|
|
125
|
-
min: (
|
|
124
|
+
max: (a = u.apparent_temperature_max) == null ? void 0 : a.at(m),
|
|
125
|
+
min: (n = u.apparent_temperature_min) == null ? void 0 : n.at(m)
|
|
126
126
|
},
|
|
127
127
|
precip: {
|
|
128
|
-
sum: (
|
|
128
|
+
sum: (Q = u.precipitation_sum) == null ? void 0 : Q.at(m),
|
|
129
129
|
hours: (K = u.precipitation_hours) == null ? void 0 : K.at(m),
|
|
130
130
|
probability: (D = u.precipitation_probability_max) == null ? void 0 : D.at(m)
|
|
131
131
|
},
|
|
132
132
|
rh: {
|
|
133
|
-
max: (
|
|
134
|
-
min: (
|
|
133
|
+
max: (T = u.relative_humidity_2m_max) == null ? void 0 : T.at(m),
|
|
134
|
+
min: (R = u.relative_humidity_2m_min) == null ? void 0 : R.at(m),
|
|
135
135
|
mean: (E = u.relative_humidity_2m_mean) == null ? void 0 : E.at(m)
|
|
136
136
|
},
|
|
137
137
|
wind: {
|
|
138
|
-
speed: (
|
|
139
|
-
kts: (
|
|
140
|
-
degree: (
|
|
138
|
+
speed: (A = u.wind_speed_10m_max) == null ? void 0 : A.at(m),
|
|
139
|
+
kts: (G = u.wind_speed_10m_max) == null ? void 0 : G.at(m),
|
|
140
|
+
degree: (F = u.wind_direction_10m_dominant) == null ? void 0 : F.at(m),
|
|
141
141
|
gusts: (O = u.wind_gusts_10m_max) == null ? void 0 : O.at(m)
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
|
-
const { name:
|
|
145
|
-
|
|
144
|
+
const { name: lt, url: ht, bg: dt } = this.parseWeatherCode(W.code, !0);
|
|
145
|
+
W.name = lt, W.url = ht, W.bg = dt, W.wind.scale = this.beaufort(this.kts2ms(W.wind.kts)), W.wind.direction = this.degree2Direction(W.wind.degree);
|
|
146
146
|
}
|
|
147
|
-
if (
|
|
148
|
-
for (const
|
|
149
|
-
const u =
|
|
150
|
-
|
|
147
|
+
if (et)
|
|
148
|
+
for (const it of et) {
|
|
149
|
+
const u = it.daily;
|
|
150
|
+
st = {
|
|
151
151
|
wave: {
|
|
152
152
|
sig: {
|
|
153
|
-
height: (
|
|
154
|
-
degree: (
|
|
155
|
-
period: (
|
|
153
|
+
height: (B = u.wave_height_max) == null ? void 0 : B.at(m),
|
|
154
|
+
degree: (V = u.wave_direction_dominant) == null ? void 0 : V.at(m),
|
|
155
|
+
period: (U = u.wave_period_max) == null ? void 0 : U.at(m)
|
|
156
156
|
},
|
|
157
157
|
swell: {
|
|
158
|
-
height: (
|
|
159
|
-
degree: (
|
|
160
|
-
period: (
|
|
158
|
+
height: (Z = u.swell_wave_height_max) == null ? void 0 : Z.at(m),
|
|
159
|
+
degree: (J = u.wave_direction_dominant) == null ? void 0 : J.at(m),
|
|
160
|
+
period: (Y = u.swell_wave_period_max) == null ? void 0 : Y.at(m),
|
|
161
161
|
peakPeriod: (w = u.swell_wave_peak_period_max) == null ? void 0 : w.at(m)
|
|
162
162
|
},
|
|
163
163
|
wd: {
|
|
164
164
|
height: (k = u.wind_wave_height_max) == null ? void 0 : k.at(m),
|
|
165
165
|
degree: (p = u.wind_wave_direction_dominant) == null ? void 0 : p.at(m),
|
|
166
166
|
period: (y = u.wind_wave_period_max) == null ? void 0 : y.at(m),
|
|
167
|
-
peakPeriod: (
|
|
167
|
+
peakPeriod: (H = u.wind_wave_peak_period_max) == null ? void 0 : H.at(m)
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
},
|
|
170
|
+
}, st.wave = this.parseWave(st.wave);
|
|
171
171
|
}
|
|
172
|
-
|
|
173
|
-
utc:
|
|
174
|
-
weather: { ...
|
|
175
|
-
...
|
|
172
|
+
ot.push({
|
|
173
|
+
utc: at.add(m, "d").utc().format(),
|
|
174
|
+
weather: { ...W },
|
|
175
|
+
...st
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return ot;
|
|
179
179
|
}
|
|
180
|
-
static parseWave(
|
|
181
|
-
return
|
|
180
|
+
static parseWave(t) {
|
|
181
|
+
return t.sig.direction = this.degree2Direction(t.sig.degree), t.swell.direction = this.degree2Direction(t.swell.degree), t.wd.direction = this.degree2Direction(t.wd.degree), t.sig.scale = this.douglas(t.sig.height), t.swell.scale = this.douglas(t.swell.height), t.wd.scale = this.douglas(t.wd.height), t;
|
|
182
182
|
}
|
|
183
|
-
static parseWeatherCode(
|
|
184
|
-
const h = this.weatherCode(
|
|
185
|
-
return (
|
|
183
|
+
static parseWeatherCode(t, e) {
|
|
184
|
+
const h = this.weatherCode(t);
|
|
185
|
+
return (e ? h.day : h.night) || {};
|
|
186
186
|
}
|
|
187
|
-
static weatherCode(
|
|
188
|
-
const
|
|
189
|
-
code:
|
|
187
|
+
static weatherCode(t) {
|
|
188
|
+
const e = {
|
|
189
|
+
code: t
|
|
190
190
|
};
|
|
191
|
-
switch (
|
|
191
|
+
switch (t) {
|
|
192
192
|
case 0:
|
|
193
|
-
|
|
193
|
+
e.day = {
|
|
194
194
|
name: "Sunny",
|
|
195
195
|
url: "https://osshz.idmwx.com/asset/weather/01d.svg",
|
|
196
196
|
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
197
|
-
},
|
|
197
|
+
}, e.night = {
|
|
198
198
|
name: "Clear",
|
|
199
199
|
url: "https://osshz.idmwx.com/asset/weather/01n.svg",
|
|
200
200
|
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
201
201
|
};
|
|
202
202
|
break;
|
|
203
203
|
case 1:
|
|
204
|
-
|
|
204
|
+
e.day = {
|
|
205
205
|
name: "Mainly Sunny",
|
|
206
206
|
url: "https://osshz.idmwx.com/asset/weather/01d.svg",
|
|
207
207
|
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
208
|
-
},
|
|
208
|
+
}, e.night = {
|
|
209
209
|
name: "Mainly Clear",
|
|
210
210
|
url: "https://osshz.idmwx.com/asset/weather/01n.svg",
|
|
211
211
|
bg: "https://osshz.idmwx.com/asset/weather/bg1.png"
|
|
212
212
|
};
|
|
213
213
|
break;
|
|
214
214
|
case 2:
|
|
215
|
-
|
|
215
|
+
e.day = {
|
|
216
216
|
name: "Partly Cloudy",
|
|
217
217
|
url: "https://osshz.idmwx.com/asset/weather/02d.svg",
|
|
218
218
|
bg: "https://osshz.idmwx.com/asset/weather/bg2.png"
|
|
219
|
-
},
|
|
219
|
+
}, e.night = {
|
|
220
220
|
name: "Partly Cloudy",
|
|
221
221
|
url: "https://osshz.idmwx.com/asset/weather/02n.svg",
|
|
222
222
|
bg: "https://osshz.idmwx.com/asset/weather/bg2.png"
|
|
223
223
|
};
|
|
224
224
|
break;
|
|
225
225
|
case 3:
|
|
226
|
-
|
|
226
|
+
e.day = {
|
|
227
227
|
name: "Overcast",
|
|
228
228
|
url: "https://osshz.idmwx.com/asset/weather/04d.svg",
|
|
229
229
|
bg: "https://osshz.idmwx.com/asset/weather/bg3.png"
|
|
230
|
-
},
|
|
230
|
+
}, e.night = {
|
|
231
231
|
name: "Overcast",
|
|
232
232
|
url: "https://osshz.idmwx.com/asset/weather/04n.svg",
|
|
233
233
|
bg: "https://osshz.idmwx.com/asset/weather/bg3.png"
|
|
234
234
|
};
|
|
235
235
|
break;
|
|
236
236
|
case 45:
|
|
237
|
-
|
|
237
|
+
e.day = {
|
|
238
238
|
name: "Foggy",
|
|
239
239
|
url: "https://osshz.idmwx.com/asset/weather/50d.svg",
|
|
240
240
|
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
241
|
-
},
|
|
241
|
+
}, e.night = {
|
|
242
242
|
name: "Foggy",
|
|
243
243
|
url: "https://osshz.idmwx.com/asset/weather/50n.svg",
|
|
244
244
|
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
245
245
|
};
|
|
246
246
|
break;
|
|
247
247
|
case 48:
|
|
248
|
-
|
|
248
|
+
e.day = {
|
|
249
249
|
name: "Rime Fog",
|
|
250
250
|
url: "https://osshz.idmwx.com/asset/weather/50d.svg",
|
|
251
251
|
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
252
|
-
},
|
|
252
|
+
}, e.night = {
|
|
253
253
|
name: "Rime Fog",
|
|
254
254
|
url: "https://osshz.idmwx.com/asset/weather/50n.svg",
|
|
255
255
|
bg: "https://osshz.idmwx.com/asset/weather/bg4.png"
|
|
256
256
|
};
|
|
257
257
|
break;
|
|
258
258
|
case 51:
|
|
259
|
-
|
|
259
|
+
e.day = {
|
|
260
260
|
name: "Light Drizzle",
|
|
261
261
|
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
262
262
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
263
|
-
},
|
|
263
|
+
}, e.night = {
|
|
264
264
|
name: "Light Drizzle",
|
|
265
265
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
266
266
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
267
267
|
};
|
|
268
268
|
break;
|
|
269
269
|
case 53:
|
|
270
|
-
|
|
270
|
+
e.day = {
|
|
271
271
|
name: "Drizzle",
|
|
272
272
|
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
273
273
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
274
|
-
},
|
|
274
|
+
}, e.night = {
|
|
275
275
|
name: "Drizzle",
|
|
276
276
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
277
277
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
278
278
|
};
|
|
279
279
|
break;
|
|
280
280
|
case 55:
|
|
281
|
-
|
|
281
|
+
e.day = {
|
|
282
282
|
name: "Heavy Drizzle",
|
|
283
283
|
url: "https://osshz.idmwx.com/asset/weather/15d.svg",
|
|
284
284
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
285
|
-
},
|
|
285
|
+
}, e.night = {
|
|
286
286
|
name: "Heavy Drizzle",
|
|
287
287
|
url: "https://osshz.idmwx.com/asset/weather/15n.svg",
|
|
288
288
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
289
289
|
};
|
|
290
290
|
break;
|
|
291
291
|
case 56:
|
|
292
|
-
|
|
292
|
+
e.day = {
|
|
293
293
|
name: "Light Freezing Drizzle",
|
|
294
294
|
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
295
295
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
296
|
-
},
|
|
296
|
+
}, e.night = {
|
|
297
297
|
name: "Light Freezing Drizzle",
|
|
298
298
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
299
299
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
300
300
|
};
|
|
301
301
|
break;
|
|
302
302
|
case 57:
|
|
303
|
-
|
|
303
|
+
e.day = {
|
|
304
304
|
name: "Freezing Drizzle",
|
|
305
305
|
url: "https://osshz.idmwx.com/asset/weather/14d.svg",
|
|
306
306
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
307
|
-
},
|
|
307
|
+
}, e.night = {
|
|
308
308
|
name: "Freezing Drizzle",
|
|
309
309
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
310
310
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
311
311
|
};
|
|
312
312
|
break;
|
|
313
313
|
case 61:
|
|
314
|
-
|
|
314
|
+
e.day = {
|
|
315
315
|
name: "Light Rain",
|
|
316
316
|
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
317
317
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
318
|
-
},
|
|
318
|
+
}, e.night = {
|
|
319
319
|
name: "Light Rain",
|
|
320
320
|
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
321
321
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
322
322
|
};
|
|
323
323
|
break;
|
|
324
324
|
case 63:
|
|
325
|
-
|
|
325
|
+
e.day = {
|
|
326
326
|
name: "Rain",
|
|
327
327
|
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
328
328
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
329
|
-
},
|
|
329
|
+
}, e.night = {
|
|
330
330
|
name: "Rain",
|
|
331
331
|
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
332
332
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
333
333
|
};
|
|
334
334
|
break;
|
|
335
335
|
case 65:
|
|
336
|
-
|
|
336
|
+
e.day = {
|
|
337
337
|
name: "Heavy Rain",
|
|
338
338
|
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
339
339
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
340
|
-
},
|
|
340
|
+
}, e.night = {
|
|
341
341
|
name: "Heavy Rain",
|
|
342
342
|
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
343
343
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
344
344
|
};
|
|
345
345
|
break;
|
|
346
346
|
case 66:
|
|
347
|
-
|
|
347
|
+
e.day = {
|
|
348
348
|
name: "Light Freezing Rain",
|
|
349
349
|
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
350
350
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
351
|
-
},
|
|
351
|
+
}, e.night = {
|
|
352
352
|
name: "Light Freezing Rain",
|
|
353
353
|
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
354
354
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
355
355
|
};
|
|
356
356
|
break;
|
|
357
357
|
case 67:
|
|
358
|
-
|
|
358
|
+
e.day = {
|
|
359
359
|
name: "Freezing Rain",
|
|
360
360
|
url: "https://osshz.idmwx.com/asset/weather/16d.svg",
|
|
361
361
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
362
|
-
},
|
|
362
|
+
}, e.night = {
|
|
363
363
|
name: "Freezing Rain",
|
|
364
364
|
url: "https://osshz.idmwx.com/asset/weather/10n.svg",
|
|
365
365
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
366
366
|
};
|
|
367
367
|
break;
|
|
368
368
|
case 71:
|
|
369
|
-
|
|
369
|
+
e.day = {
|
|
370
370
|
name: "Light Snow",
|
|
371
371
|
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
372
372
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
373
|
-
},
|
|
373
|
+
}, e.night = {
|
|
374
374
|
name: "Light Snow",
|
|
375
375
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
376
376
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
377
377
|
};
|
|
378
378
|
break;
|
|
379
379
|
case 73:
|
|
380
|
-
|
|
380
|
+
e.day = {
|
|
381
381
|
name: "Snow",
|
|
382
382
|
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
383
383
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
384
|
-
},
|
|
384
|
+
}, e.night = {
|
|
385
385
|
name: "Snow",
|
|
386
386
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
387
387
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
388
388
|
};
|
|
389
389
|
break;
|
|
390
390
|
case 75:
|
|
391
|
-
|
|
391
|
+
e.day = {
|
|
392
392
|
name: "Heavy Snow",
|
|
393
393
|
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
394
394
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
395
|
-
},
|
|
395
|
+
}, e.night = {
|
|
396
396
|
name: "Heavy Snow",
|
|
397
397
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
398
398
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
399
399
|
};
|
|
400
400
|
break;
|
|
401
401
|
case 77:
|
|
402
|
-
|
|
402
|
+
e.day = {
|
|
403
403
|
name: "Snow Grains",
|
|
404
404
|
url: "https://osshz.idmwx.com/asset/weather/17d.svg",
|
|
405
405
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
406
|
-
},
|
|
406
|
+
}, e.night = {
|
|
407
407
|
name: "Snow Grains",
|
|
408
408
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
409
409
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
410
410
|
};
|
|
411
411
|
break;
|
|
412
412
|
case 80:
|
|
413
|
-
|
|
413
|
+
e.day = {
|
|
414
414
|
name: "Light Showers",
|
|
415
415
|
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
416
416
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
417
|
-
},
|
|
417
|
+
}, e.night = {
|
|
418
418
|
name: "Light Showers",
|
|
419
419
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
420
420
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
421
421
|
};
|
|
422
422
|
break;
|
|
423
423
|
case 81:
|
|
424
|
-
|
|
424
|
+
e.day = {
|
|
425
425
|
name: "Showers",
|
|
426
426
|
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
427
427
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
428
|
-
},
|
|
428
|
+
}, e.night = {
|
|
429
429
|
name: "Showers",
|
|
430
430
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
431
431
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
432
432
|
};
|
|
433
433
|
break;
|
|
434
434
|
case 82:
|
|
435
|
-
|
|
435
|
+
e.day = {
|
|
436
436
|
name: "Heavy Showers",
|
|
437
437
|
url: "https://osshz.idmwx.com/asset/weather/09d.svg",
|
|
438
438
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
439
|
-
},
|
|
439
|
+
}, e.night = {
|
|
440
440
|
name: "Heavy Showers",
|
|
441
441
|
url: "https://osshz.idmwx.com/asset/weather/09n.svg",
|
|
442
442
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
443
443
|
};
|
|
444
444
|
break;
|
|
445
445
|
case 85:
|
|
446
|
-
|
|
446
|
+
e.day = {
|
|
447
447
|
name: "Light Snow Showers",
|
|
448
448
|
url: "https://osshz.idmwx.com/asset/weather/13d.svg",
|
|
449
449
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
450
|
-
},
|
|
450
|
+
}, e.night = {
|
|
451
451
|
name: "Light Snow Showers",
|
|
452
452
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
453
453
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
454
454
|
};
|
|
455
455
|
break;
|
|
456
456
|
case 86:
|
|
457
|
-
|
|
457
|
+
e.day = {
|
|
458
458
|
name: "Snow Showers",
|
|
459
459
|
url: "https://osshz.idmwx.com/asset/weather/13d.svg",
|
|
460
460
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
461
|
-
},
|
|
461
|
+
}, e.night = {
|
|
462
462
|
name: "Snow Showers",
|
|
463
463
|
url: "https://osshz.idmwx.com/asset/weather/13n.svg",
|
|
464
464
|
bg: "https://osshz.idmwx.com/asset/weather/bg6.png"
|
|
465
465
|
};
|
|
466
466
|
break;
|
|
467
467
|
case 95:
|
|
468
|
-
|
|
468
|
+
e.day = {
|
|
469
469
|
name: "Thunderstorm",
|
|
470
470
|
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
471
471
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
472
|
-
},
|
|
472
|
+
}, e.night = {
|
|
473
473
|
name: "Thunderstorm",
|
|
474
474
|
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
475
475
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
476
476
|
};
|
|
477
477
|
break;
|
|
478
478
|
case 96:
|
|
479
|
-
|
|
479
|
+
e.day = {
|
|
480
480
|
name: "Light Thunderstorms With Hail",
|
|
481
481
|
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
482
482
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
483
|
-
},
|
|
483
|
+
}, e.night = {
|
|
484
484
|
name: "Light Thunderstorms With Hail",
|
|
485
485
|
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
486
486
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
487
487
|
};
|
|
488
488
|
break;
|
|
489
489
|
case 99:
|
|
490
|
-
|
|
490
|
+
e.day = {
|
|
491
491
|
name: "Thunderstorms With Hail",
|
|
492
492
|
url: "https://osshz.idmwx.com/asset/weather/11d.svg",
|
|
493
493
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
494
|
-
},
|
|
494
|
+
}, e.night = {
|
|
495
495
|
name: "Thunderstorms With Hail",
|
|
496
496
|
url: "https://osshz.idmwx.com/asset/weather/11n.svg",
|
|
497
497
|
bg: "https://osshz.idmwx.com/asset/weather/bg5.png"
|
|
498
498
|
};
|
|
499
499
|
break;
|
|
500
500
|
}
|
|
501
|
-
return
|
|
501
|
+
return e;
|
|
502
502
|
}
|
|
503
|
-
static kts2ms(
|
|
504
|
-
return isNaN(
|
|
503
|
+
static kts2ms(t) {
|
|
504
|
+
return isNaN(t) || t === null ? t : Math.round(t * 1852 / 3600 * 1e4) / 1e4;
|
|
505
505
|
}
|
|
506
|
-
static kts2kmh(
|
|
507
|
-
return isNaN(
|
|
506
|
+
static kts2kmh(t) {
|
|
507
|
+
return isNaN(t) || t === null ? t : t * 1.852;
|
|
508
508
|
}
|
|
509
|
-
static m2nm(
|
|
510
|
-
return isNaN(
|
|
509
|
+
static m2nm(t) {
|
|
510
|
+
return isNaN(t) || t === null ? t : Math.round(t / 1e3 / 1.852 * 1e4) / 1e4;
|
|
511
511
|
}
|
|
512
|
-
static kmh2kts(
|
|
513
|
-
return isNaN(
|
|
512
|
+
static kmh2kts(t) {
|
|
513
|
+
return isNaN(t) || t === null ? t : this.ms2kts(t * 1e3 / 3600);
|
|
514
514
|
}
|
|
515
|
-
static ms2kts(
|
|
516
|
-
return isNaN(
|
|
515
|
+
static ms2kts(t) {
|
|
516
|
+
return isNaN(t) || t === null ? t : Math.round(t * 3600 / 1852 * 1e4) / 1e4;
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
* 角度转为弧度
|
|
520
520
|
* @param degree
|
|
521
521
|
*/
|
|
522
|
-
static degree2Radian(
|
|
523
|
-
if (isNaN(
|
|
524
|
-
return
|
|
525
|
-
let
|
|
526
|
-
return
|
|
522
|
+
static degree2Radian(t) {
|
|
523
|
+
if (isNaN(t) || t === null)
|
|
524
|
+
return t;
|
|
525
|
+
let e = t % 360 / 360 * 2 * Math.PI;
|
|
526
|
+
return e = e < 0 ? e + 2 * Math.PI : e, e;
|
|
527
527
|
}
|
|
528
528
|
/**
|
|
529
529
|
* 将方位角转换为方向
|
|
530
530
|
* @param degree 角度[-360,360]
|
|
531
531
|
* @return {string}
|
|
532
532
|
*/
|
|
533
|
-
static degree2Direction(
|
|
534
|
-
const
|
|
535
|
-
if (isNaN(
|
|
533
|
+
static degree2Direction(t) {
|
|
534
|
+
const e = this.degree2Radian(t);
|
|
535
|
+
if (isNaN(e) || e === null)
|
|
536
536
|
return null;
|
|
537
537
|
let h = "N/A";
|
|
538
538
|
const s = Math.PI / 16;
|
|
539
|
-
return
|
|
539
|
+
return e < s ? h = "N" : e >= s && e < 3 * s ? h = "NNE" : e >= 3 * s && e < 5 * s ? h = "NE" : e >= 5 * s && e < 7 * s ? h = "ENE" : e >= 7 * s && e < 9 * s ? h = "E" : e >= 9 * s && e < 11 * s ? h = "ESE" : e >= 11 * s && e < 13 * s ? h = "SE" : e >= 13 * s && e < 15 * s ? h = "SSE" : e >= 15 * s && e < 17 * s ? h = "S" : e >= 17 * s && e < 19 * s ? h = "SSW" : e >= 19 * s && e < 21 * s ? h = "SW" : e >= 21 * s && e < 23 * s ? h = "WSW" : e >= 23 * s && e < 25 * s ? h = "W" : e >= 25 * s && e < 27 * s ? h = "WNW" : e >= 27 * s && e < 29 * s ? h = "NW" : e >= 29 * s && e < 31 * s ? h = "NNW" : e >= 31 * s && e < 32 * s && (h = "N"), h;
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
* 计算风力蒲福等级
|
|
543
543
|
* @param speed m/s
|
|
544
544
|
* @returns {number}
|
|
545
545
|
*/
|
|
546
|
-
static beaufort(
|
|
547
|
-
let
|
|
548
|
-
return isNaN(
|
|
546
|
+
static beaufort(t) {
|
|
547
|
+
let e = 0;
|
|
548
|
+
return isNaN(t) || (t = Math.round(t * 10) / 10, t <= 0.2 ? e = 0 : t <= 1.5 ? e = 1 : t <= 3.3 ? e = 2 : t <= 5.4 ? e = 3 : t <= 7.9 ? e = 4 : t <= 10.7 ? e = 5 : t <= 13.8 ? e = 6 : t <= 17.1 ? e = 7 : t <= 20.7 ? e = 8 : t <= 22.4 ? e = 9 : t <= 28.4 ? e = 10 : t <= 32.6 ? e = 11 : t > 32.6 && (e = 12)), e;
|
|
549
549
|
}
|
|
550
550
|
/**
|
|
551
551
|
* 计算海浪等级
|
|
552
552
|
* @param height 高度 m
|
|
553
553
|
*/
|
|
554
|
-
static douglas(
|
|
555
|
-
let
|
|
556
|
-
return isNaN(
|
|
554
|
+
static douglas(t) {
|
|
555
|
+
let e = "Calm";
|
|
556
|
+
return isNaN(t) || t <= 0.1 ? e = "Calm" : t <= 0.5 ? e = "Smooth" : t <= 1.25 ? e = "Slight" : t <= 2.5 ? e = "Moderate" : t <= 4 ? e = "Rough" : t <= 6 ? e = "VeryRough" : t <= 9 ? e = "High" : t <= 14 ? e = "VeryHigh" : e = "Precipitous", e;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
for (const [h, s] of
|
|
562
|
-
|
|
563
|
-
return
|
|
564
|
-
},
|
|
559
|
+
const Wt = (l, t) => {
|
|
560
|
+
const e = l.__vccOpts || l;
|
|
561
|
+
for (const [h, s] of t)
|
|
562
|
+
e[h] = s;
|
|
563
|
+
return e;
|
|
564
|
+
}, Tt = {
|
|
565
565
|
name: "SpotReport",
|
|
566
566
|
props: {
|
|
567
567
|
token: {
|
|
@@ -576,7 +576,7 @@ const We = (l, e) => {
|
|
|
576
576
|
type: Number,
|
|
577
577
|
default: 8
|
|
578
578
|
},
|
|
579
|
-
|
|
579
|
+
point: {
|
|
580
580
|
type: Object,
|
|
581
581
|
default: () => ({})
|
|
582
582
|
}
|
|
@@ -586,14 +586,14 @@ const We = (l, e) => {
|
|
|
586
586
|
return {
|
|
587
587
|
placeholder: "search for port name or coordinates",
|
|
588
588
|
searchName: void 0,
|
|
589
|
-
rawSearchIcon:
|
|
589
|
+
rawSearchIcon: Ct(Mt),
|
|
590
|
+
positionOffset: void 0,
|
|
590
591
|
positionGmt: void 0,
|
|
591
592
|
issuedDate: void 0,
|
|
592
593
|
meteoData: {},
|
|
593
|
-
a: void 0,
|
|
594
594
|
positionList: [],
|
|
595
595
|
position: void 0,
|
|
596
|
-
loading: !
|
|
596
|
+
loading: !1,
|
|
597
597
|
activeIndex: void 0,
|
|
598
598
|
tableData: {},
|
|
599
599
|
pickedDate: void 0,
|
|
@@ -605,7 +605,7 @@ const We = (l, e) => {
|
|
|
605
605
|
computed: {
|
|
606
606
|
computeHourL() {
|
|
607
607
|
return function(l) {
|
|
608
|
-
return l ? `${
|
|
608
|
+
return l ? `${tt(l).tz(this.positionGmt).format("HH")}` : "-";
|
|
609
609
|
};
|
|
610
610
|
},
|
|
611
611
|
computeHourZ() {
|
|
@@ -615,41 +615,43 @@ const We = (l, e) => {
|
|
|
615
615
|
},
|
|
616
616
|
computeWeek() {
|
|
617
617
|
return function(l) {
|
|
618
|
-
return l ? `${
|
|
618
|
+
return l ? `${tt(l).tz(this.positionGmt).format("dddd")}` : "-";
|
|
619
619
|
};
|
|
620
620
|
},
|
|
621
621
|
computeMMMDD() {
|
|
622
622
|
return function(l) {
|
|
623
|
-
return l ? `${
|
|
623
|
+
return l ? `${tt(l).tz(this.positionGmt).format("MMM-DD")}` : "-";
|
|
624
624
|
};
|
|
625
625
|
},
|
|
626
626
|
computeLat() {
|
|
627
|
-
return function(l,
|
|
628
|
-
return
|
|
627
|
+
return function(l, t = 4) {
|
|
628
|
+
return ut.lat2pretty(l, t).pretty;
|
|
629
629
|
};
|
|
630
630
|
},
|
|
631
631
|
computeLng() {
|
|
632
|
-
return function(l,
|
|
633
|
-
return
|
|
632
|
+
return function(l, t = 4) {
|
|
633
|
+
return ut.lng2pretty(l, t).pretty;
|
|
634
634
|
};
|
|
635
635
|
},
|
|
636
636
|
roundPrecision() {
|
|
637
|
-
return function(l,
|
|
638
|
-
return isNaN(l) ? "-" :
|
|
637
|
+
return function(l, t = 4) {
|
|
638
|
+
return isNaN(l) ? "-" : ut.roundPrecision(l, t);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
},
|
|
642
642
|
watch: {
|
|
643
|
-
|
|
643
|
+
point: {
|
|
644
644
|
handler() {
|
|
645
|
-
var l,
|
|
646
|
-
this.
|
|
647
|
-
id: this.report.portId,
|
|
648
|
-
lat: (l = this.
|
|
649
|
-
lng: (
|
|
650
|
-
name:
|
|
651
|
-
}, this.
|
|
652
|
-
}
|
|
645
|
+
var l, t;
|
|
646
|
+
this.point && (this.position = {
|
|
647
|
+
// id: this.report.portId,
|
|
648
|
+
lat: (l = this.point) == null ? void 0 : l.lat,
|
|
649
|
+
lng: (t = this.point) == null ? void 0 : t.lng,
|
|
650
|
+
name: this.computeLat(this.point.lat) + "," + this.computeLng(this.point.lng)
|
|
651
|
+
}, this.handleFetchMeteo());
|
|
652
|
+
},
|
|
653
|
+
deep: !0,
|
|
654
|
+
immediate: !0
|
|
653
655
|
}
|
|
654
656
|
},
|
|
655
657
|
methods: {
|
|
@@ -659,14 +661,14 @@ const We = (l, e) => {
|
|
|
659
661
|
});
|
|
660
662
|
},
|
|
661
663
|
initInfo() {
|
|
662
|
-
var l, e;
|
|
663
|
-
this.loading = !1, this.positionGmt = (
|
|
664
|
-
var
|
|
665
|
-
return
|
|
664
|
+
var l, t, e, h;
|
|
665
|
+
this.loading = !1, this.positionGmt = (t = (l = this.meteoData.weather) == null ? void 0 : l[0]) == null ? void 0 : t.timezone, this.positionOffset = (h = (e = this.meteoData.weather) == null ? void 0 : e[0]) == null ? void 0 : h.offset, this.issuedDate = X(this.ts).utc().format("MMM-DD/HHmm[Z], YYYY"), this.activeIndex = tt(this.ts).tz(this.positionGmt).hour(), this.pickedDate = tt(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((s) => {
|
|
666
|
+
var v;
|
|
667
|
+
return s.name === ((v = this.position) == null ? void 0 : v.name);
|
|
666
668
|
});
|
|
667
669
|
},
|
|
668
670
|
initTableData() {
|
|
669
|
-
var l,
|
|
671
|
+
var l, t, e, h, s, v, M, C, S, L, N, I, P, a, n, Q, K, D, T, R, E, A, G, F, O, B, V, U, Z, J, Y, w, k, p;
|
|
670
672
|
this.tableData = {
|
|
671
673
|
hours: [],
|
|
672
674
|
utcHours: [],
|
|
@@ -694,22 +696,22 @@ const We = (l, e) => {
|
|
|
694
696
|
seaTemp: []
|
|
695
697
|
};
|
|
696
698
|
for (let y = 0; y < 24; y++) {
|
|
697
|
-
const
|
|
698
|
-
this.tableData.hours.push(
|
|
699
|
-
const g = ((l =
|
|
700
|
-
this.tableData.weatherUrls.push((
|
|
699
|
+
const H = X(this.pickedDate).clone().add(y, "h").format();
|
|
700
|
+
this.tableData.hours.push(H);
|
|
701
|
+
const g = ((l = Dt.pickHourly(this.meteoData, H)) == null ? void 0 : l[0]) || {};
|
|
702
|
+
this.tableData.weatherUrls.push((t = g.weather) == null ? void 0 : t.url), this.tableData.weatherNames.push(((e = g.weather) == null ? void 0 : e.name) ?? "-"), this.tableData.temp.push(this.roundPrecision((h = g.weather) == null ? void 0 : h.temp, 0) ?? "-"), this.tableData.precipProbability.push(this.roundPrecision((v = (s = g.weather) == null ? void 0 : s.precip) == null ? void 0 : v.probability, 0) ?? "-"), this.tableData.precip1h.push(this.roundPrecision((C = (M = g.weather) == null ? void 0 : M.precip) == null ? void 0 : C.sum, 0) ?? "-"), this.tableData.visibility.push(this.roundPrecision((S = g.weather) == null ? void 0 : S.visibility, 0) ?? "-"), this.tableData.humidity.push(this.roundPrecision((L = g.weather) == null ? void 0 : L.rh, 0) ?? "-"), this.tableData.windSpeed.push(this.roundPrecision((I = (N = g.weather) == null ? void 0 : N.wind) == null ? void 0 : I.kts, 1)), this.tableData.windDir.push((a = (P = g.weather) == null ? void 0 : P.wind) == null ? void 0 : a.bearing), this.tableData.windGust.push(this.roundPrecision((Q = (n = g.weather) == null ? void 0 : n.wind) == null ? void 0 : Q.gusts, 1) ?? "-"), this.tableData.sigwaveHeight.push(this.roundPrecision((D = (K = g.wave) == null ? void 0 : K.sig) == null ? void 0 : D.height, 1) ?? "-"), this.tableData.sigwaveDir.push((R = (T = g.wave) == null ? void 0 : T.sig) == null ? void 0 : R.bearing), this.tableData.windwaveHeight.push(this.roundPrecision((A = (E = g.wave) == null ? void 0 : E.wd) == null ? void 0 : A.height, 1) ?? "-"), this.tableData.windwaveDir.push((F = (G = g.wave) == null ? void 0 : G.wd) == null ? void 0 : F.bearing), this.tableData.windwavePeriod.push(this.roundPrecision((B = (O = g.wave) == null ? void 0 : O.wd) == null ? void 0 : B.period, 1) ?? "-"), this.tableData.swellHeight.push(this.roundPrecision((U = (V = g.wave) == null ? void 0 : V.swell) == null ? void 0 : U.height, 1) ?? "-"), this.tableData.swellDir.push((J = (Z = g.wave) == null ? void 0 : Z.swell) == null ? void 0 : J.bearing), this.tableData.swellPeriod.push(this.roundPrecision((w = (Y = g.wave) == null ? void 0 : Y.swell) == null ? void 0 : w.period, 1) ?? "-"), this.tableData.currentSpeed.push(this.roundPrecision((k = g.current) == null ? void 0 : k.speed, 1) ?? "-"), this.tableData.currentDir.push((p = g.current) == null ? void 0 : p.bearing), this.tableData.seaLevel.push(this.roundPrecision(g.height, 1) ?? "-"), this.tableData.seaTemp.push(this.roundPrecision(g.sst, 0) ?? "-");
|
|
701
703
|
}
|
|
702
704
|
},
|
|
703
705
|
initEchart() {
|
|
704
|
-
var
|
|
705
|
-
const l = [],
|
|
706
|
+
var T, R, E, A, G, F, O, B, V, U, Z, J, Y;
|
|
707
|
+
const l = [], t = [], e = [], h = [], s = [], v = [], M = [], C = [], S = [], L = [], N = {};
|
|
706
708
|
for (let w = 0; w < 7; w++) {
|
|
707
709
|
const k = X(this.pickedDate).clone().add(w, "d");
|
|
708
|
-
l.push(
|
|
709
|
-
const p = ((
|
|
710
|
-
h.push(this.roundPrecision((E = (
|
|
710
|
+
l.push(tt(k).tz(this.positionGmt).format("yyyy-MM-DD")), t.push(this.computeMMMDD(k)), e.push(w === 0 ? "Today" : this.computeWeek(k));
|
|
711
|
+
const p = ((T = Dt.pickDaily(this.meteoData, k)) == null ? void 0 : T[0]) || {};
|
|
712
|
+
h.push(this.roundPrecision((E = (R = p.weather) == null ? void 0 : R.temp) == null ? void 0 : E.min, 0)), s.push(this.roundPrecision((G = (A = p.weather) == null ? void 0 : A.temp) == null ? void 0 : G.max, 0)), C.push(this.roundPrecision((O = (F = p.weather) == null ? void 0 : F.wind) == null ? void 0 : O.kts, 1) ?? "- kts"), L.push(this.roundPrecision((V = (B = p.weather) == null ? void 0 : B.precip) == null ? void 0 : V.sum, 0) ?? "- mm"), v.push({ symbol: "image://" + ((U = p.weather) == null ? void 0 : U.url) }), M.push((Z = p.weather) == null ? void 0 : Z.name), S.push((Y = (J = p.weather) == null ? void 0 : J.wind) == null ? void 0 : Y.degree);
|
|
711
713
|
}
|
|
712
|
-
const I = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))), P = Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * I,
|
|
714
|
+
const I = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) - Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))), P = Math.min(...h.filter((w) => typeof w == "number" && !isNaN(w))) - 1.5 * I, a = Math.max(...s.filter((w) => typeof w == "number" && !isNaN(w))) + 2 * I, n = 4 + 0.5 / l.length * 92 + "%", Q = "data:image/svg+xml;base64," + window.btoa(
|
|
713
715
|
unescape(
|
|
714
716
|
encodeURIComponent(
|
|
715
717
|
'<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>'
|
|
@@ -724,21 +726,21 @@ const We = (l, e) => {
|
|
|
724
726
|
), D = new Image(64, 64);
|
|
725
727
|
D.src = K, D.onload = () => {
|
|
726
728
|
for (let p = 0; p < 7; p++) {
|
|
727
|
-
const y = document.createElement("canvas"),
|
|
729
|
+
const y = document.createElement("canvas"), H = y.getContext("2d");
|
|
728
730
|
y.width = D.width, y.height = D.height;
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
const
|
|
731
|
+
const j = S[p] * (Math.PI / 180);
|
|
732
|
+
H.translate(y.width / 2, y.height / 2), H.rotate(j), H.translate(-D.width / 2, -D.height / 2), H.drawImage(D, 0, 0, 64, 64);
|
|
733
|
+
const et = y.toDataURL();
|
|
732
734
|
N[`WindIcon${p}`] = {
|
|
733
735
|
height: 12,
|
|
734
736
|
width: 12,
|
|
735
737
|
align: "left",
|
|
736
738
|
backgroundColor: {
|
|
737
|
-
image:
|
|
739
|
+
image: et
|
|
738
740
|
}
|
|
739
741
|
};
|
|
740
742
|
}
|
|
741
|
-
const w =
|
|
743
|
+
const w = wt.init(document.getElementById("weather-chart")), k = {
|
|
742
744
|
grid: {
|
|
743
745
|
bottom: 0,
|
|
744
746
|
top: 0,
|
|
@@ -767,8 +769,8 @@ const We = (l, e) => {
|
|
|
767
769
|
},
|
|
768
770
|
singleAxis: [
|
|
769
771
|
{
|
|
770
|
-
left:
|
|
771
|
-
right:
|
|
772
|
+
left: n,
|
|
773
|
+
right: n,
|
|
772
774
|
type: "category",
|
|
773
775
|
show: !1,
|
|
774
776
|
axisLine: {
|
|
@@ -793,8 +795,8 @@ const We = (l, e) => {
|
|
|
793
795
|
height: "2%"
|
|
794
796
|
},
|
|
795
797
|
{
|
|
796
|
-
left:
|
|
797
|
-
right:
|
|
798
|
+
left: n,
|
|
799
|
+
right: n,
|
|
798
800
|
type: "category",
|
|
799
801
|
show: !1,
|
|
800
802
|
axisLine: {
|
|
@@ -819,8 +821,8 @@ const We = (l, e) => {
|
|
|
819
821
|
height: "2%"
|
|
820
822
|
},
|
|
821
823
|
{
|
|
822
|
-
left:
|
|
823
|
-
right:
|
|
824
|
+
left: n,
|
|
825
|
+
right: n,
|
|
824
826
|
type: "category",
|
|
825
827
|
show: !1,
|
|
826
828
|
axisLine: {
|
|
@@ -845,8 +847,8 @@ const We = (l, e) => {
|
|
|
845
847
|
height: "2%"
|
|
846
848
|
},
|
|
847
849
|
{
|
|
848
|
-
left:
|
|
849
|
-
right:
|
|
850
|
+
left: n,
|
|
851
|
+
right: n,
|
|
850
852
|
type: "category",
|
|
851
853
|
show: !1,
|
|
852
854
|
axisLine: {
|
|
@@ -871,8 +873,8 @@ const We = (l, e) => {
|
|
|
871
873
|
height: "2%"
|
|
872
874
|
},
|
|
873
875
|
{
|
|
874
|
-
left:
|
|
875
|
-
right:
|
|
876
|
+
left: n,
|
|
877
|
+
right: n,
|
|
876
878
|
type: "category",
|
|
877
879
|
show: !1,
|
|
878
880
|
axisLine: {
|
|
@@ -902,7 +904,7 @@ const We = (l, e) => {
|
|
|
902
904
|
name: "温度(℃)",
|
|
903
905
|
show: !1,
|
|
904
906
|
min: P,
|
|
905
|
-
max:
|
|
907
|
+
max: a,
|
|
906
908
|
axisLabel: {
|
|
907
909
|
formatter: "{value} °C"
|
|
908
910
|
}
|
|
@@ -912,7 +914,7 @@ const We = (l, e) => {
|
|
|
912
914
|
singleAxisIndex: 0,
|
|
913
915
|
coordinateSystem: "singleAxis",
|
|
914
916
|
type: "scatter",
|
|
915
|
-
data:
|
|
917
|
+
data: e,
|
|
916
918
|
label: {
|
|
917
919
|
show: !0,
|
|
918
920
|
color: "#fff",
|
|
@@ -925,7 +927,7 @@ const We = (l, e) => {
|
|
|
925
927
|
singleAxisIndex: 1,
|
|
926
928
|
coordinateSystem: "singleAxis",
|
|
927
929
|
type: "scatter",
|
|
928
|
-
data:
|
|
930
|
+
data: t,
|
|
929
931
|
label: {
|
|
930
932
|
show: !0,
|
|
931
933
|
color: "#fff",
|
|
@@ -1025,7 +1027,7 @@ const We = (l, e) => {
|
|
|
1025
1027
|
width: 16,
|
|
1026
1028
|
align: "left",
|
|
1027
1029
|
backgroundColor: {
|
|
1028
|
-
image:
|
|
1030
|
+
image: Q
|
|
1029
1031
|
}
|
|
1030
1032
|
},
|
|
1031
1033
|
title: {
|
|
@@ -1043,7 +1045,7 @@ const We = (l, e) => {
|
|
|
1043
1045
|
};
|
|
1044
1046
|
w.setOption(k), w.on("click", (p) => {
|
|
1045
1047
|
const y = p.dataIndex;
|
|
1046
|
-
this.pickedDate =
|
|
1048
|
+
this.pickedDate = tt(l[y]).tz(this.positionGmt).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format(), this.pickedWeek = y === 0 ? "Today" : this.computeWeek(this.pickedDate), this.activeIndex = y === 0 ? tt(this.ts).tz(this.positionGmt).hour() : void 0, this.initTableData(), k.series[3].markArea = {
|
|
1047
1049
|
itemStyle: {
|
|
1048
1050
|
color: "rgb(71,143,206)"
|
|
1049
1051
|
},
|
|
@@ -1066,74 +1068,76 @@ const We = (l, e) => {
|
|
|
1066
1068
|
},
|
|
1067
1069
|
async fetchSuggestPosition(l) {
|
|
1068
1070
|
var h;
|
|
1069
|
-
const
|
|
1070
|
-
if (!
|
|
1071
|
+
const t = l.replaceAll(",", ",");
|
|
1072
|
+
if (!t)
|
|
1071
1073
|
return this.positionList = this.collectList, !1;
|
|
1072
|
-
const
|
|
1074
|
+
const e = await kt.get(`https://cbe.idmwx.com/api/arc/ports/suggest?n=${t}`, {
|
|
1073
1075
|
headers: {
|
|
1074
1076
|
Authorization: this.token
|
|
1075
1077
|
}
|
|
1076
1078
|
});
|
|
1077
|
-
(
|
|
1079
|
+
(e == null ? void 0 : e.data.code) === 0 && (this.positionList = (h = e == null ? void 0 : e.data.data) == null ? void 0 : h.map((s) => (s.name = s.id ? s.name : this.computeLat(s.lat) + ", " + this.computeLng(s.lng), s)));
|
|
1080
|
+
},
|
|
1081
|
+
handleSearch() {
|
|
1082
|
+
var l, t, e;
|
|
1083
|
+
this.searchName && (this.handleClear(), this.position = {
|
|
1084
|
+
portId: (l = this.positionList.find((h) => h.name === this.searchName)) == null ? void 0 : l.id,
|
|
1085
|
+
lat: (t = this.positionList.find((h) => h.name === this.searchName)) == null ? void 0 : t.lat,
|
|
1086
|
+
lng: (e = this.positionList.find((h) => h.name === this.searchName)) == null ? void 0 : e.lng,
|
|
1087
|
+
name: this.searchName
|
|
1088
|
+
}, this.$emit("url", this.position), this.handleFetchMeteo());
|
|
1078
1089
|
},
|
|
1079
1090
|
async handleFetchMeteo() {
|
|
1080
|
-
|
|
1081
|
-
if (!this.searchName)
|
|
1091
|
+
if (!this.token)
|
|
1082
1092
|
return !1;
|
|
1083
|
-
this.
|
|
1084
|
-
portId: (t = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : t.id,
|
|
1085
|
-
lat: (h = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : h.lat,
|
|
1086
|
-
lng: (s = this.positionList.find((v) => v.name === this.searchName)) == null ? void 0 : s.lng,
|
|
1087
|
-
name: this.searchName
|
|
1088
|
-
}, this.$emit("url", this.position), this.handleClear();
|
|
1093
|
+
this.loading = !0;
|
|
1089
1094
|
const l = {
|
|
1090
1095
|
lat: this.position.lat,
|
|
1091
1096
|
lng: this.position.lng,
|
|
1092
|
-
// datetime: this.ts ? moment(this.ts).utc().add(-1,'d').format() : moment().add(-1,'d').utc().format(),
|
|
1093
1097
|
forecastDays: 8,
|
|
1094
1098
|
selfHosted: !1
|
|
1095
|
-
},
|
|
1099
|
+
}, t = await kt.post("https://cbe.idmwx.com/api/arc/meteo2/spot/forecast", l, {
|
|
1096
1100
|
headers: {
|
|
1097
1101
|
Authorization: this.token
|
|
1098
1102
|
}
|
|
1099
1103
|
});
|
|
1100
|
-
(
|
|
1101
|
-
...
|
|
1102
|
-
}), this.handleRender();
|
|
1104
|
+
(t == null ? void 0 : t.data.code) === 0 && (this.meteoData = {
|
|
1105
|
+
...t == null ? void 0 : t.data.data
|
|
1106
|
+
}), this.loading = !1, this.handleRender();
|
|
1103
1107
|
},
|
|
1104
1108
|
handleClear() {
|
|
1105
|
-
this.
|
|
1109
|
+
this.position = {}, this.meteoData = {}, this.isCollected = !1, wt && document.getElementById("weather-chart") && wt.dispose(document.getElementById("weather-chart"));
|
|
1106
1110
|
}
|
|
1107
1111
|
}
|
|
1108
|
-
},
|
|
1112
|
+
}, Rt = { class: "spot-report" }, Et = { class: "header-box flex-between" }, At = { class: "bg" }, Gt = { class: "search-box flex-start" }, Ft = { class: "content-box" }, Ot = { class: "title-box flex-between" }, Bt = { class: "main-title" }, Vt = { class: "sub-title" }, Ut = { class: "flex-end" }, Zt = {
|
|
1109
1113
|
key: 0,
|
|
1110
1114
|
id: "weather-chart"
|
|
1111
|
-
},
|
|
1115
|
+
}, Jt = {
|
|
1112
1116
|
key: 1,
|
|
1113
1117
|
class: "weather-chart flex-center"
|
|
1114
|
-
},
|
|
1118
|
+
}, Yt = {
|
|
1115
1119
|
key: 2,
|
|
1116
1120
|
class: "weather-chart flex-center"
|
|
1117
|
-
},
|
|
1121
|
+
}, jt = {
|
|
1118
1122
|
key: 3,
|
|
1119
1123
|
class: "card-box"
|
|
1120
|
-
},
|
|
1124
|
+
}, qt = { class: "date" }, Qt = { class: "basic-table" }, Kt = { class: "day" }, Xt = { class: "hour" }, $t = { class: "icon" }, te = ["src"], ee = { class: "text" }, se = { class: "text" }, ae = { class: "text" }, ie = { class: "text" }, ne = { class: "text" }, oe = { class: "text" }, re = { key: 1 }, le = { class: "text" }, he = { class: "text" }, de = { class: "wave-current-table" }, ce = { class: "text" }, pe = { class: "text" }, me = { key: 1 }, ue = { class: "text" }, we = { class: "text" }, ge = { class: "text" }, ve = { key: 1 }, be = { class: "text" }, xe = { class: "text" }, fe = { class: "text" }, ye = { key: 1 }, _e = { class: "text" }, ze = { class: "sea-table" }, ke = { class: "text" }, De = { class: "text" }, Se = {
|
|
1121
1125
|
key: 4,
|
|
1122
1126
|
class: "card-box flex-center"
|
|
1123
|
-
},
|
|
1127
|
+
}, Le = {
|
|
1124
1128
|
key: 5,
|
|
1125
1129
|
class: "card-box flex-center"
|
|
1126
1130
|
};
|
|
1127
|
-
function
|
|
1128
|
-
var L, N, I, P
|
|
1129
|
-
const M =
|
|
1130
|
-
return
|
|
1131
|
-
i("div",
|
|
1132
|
-
i("div",
|
|
1133
|
-
i("div",
|
|
1134
|
-
|
|
1131
|
+
function Ne(l, t, e, h, s, v) {
|
|
1132
|
+
var L, N, I, P;
|
|
1133
|
+
const M = gt("ElOption"), C = gt("ElSelect"), S = gt("ElTooltip");
|
|
1134
|
+
return o(), r("div", Rt, [
|
|
1135
|
+
i("div", Et, [
|
|
1136
|
+
i("div", At, [
|
|
1137
|
+
i("div", Gt, [
|
|
1138
|
+
vt(C, {
|
|
1135
1139
|
modelValue: s.searchName,
|
|
1136
|
-
"onUpdate:modelValue":
|
|
1140
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => s.searchName = a),
|
|
1137
1141
|
filterable: "",
|
|
1138
1142
|
class: "input",
|
|
1139
1143
|
clearable: "",
|
|
@@ -1141,13 +1145,13 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1141
1145
|
placeholder: s.placeholder,
|
|
1142
1146
|
autocomplete: "",
|
|
1143
1147
|
"remote-show-suffix": "",
|
|
1144
|
-
onFocus:
|
|
1145
|
-
onBlur:
|
|
1148
|
+
onFocus: t[1] || (t[1] = (a) => s.placeholder = ""),
|
|
1149
|
+
onBlur: t[2] || (t[2] = (a) => s.placeholder = "search for port name or coordinates"),
|
|
1146
1150
|
"remote-method": v.fetchSuggestPosition,
|
|
1147
|
-
onChange: v.
|
|
1151
|
+
onChange: v.handleSearch
|
|
1148
1152
|
}, {
|
|
1149
|
-
default:
|
|
1150
|
-
(
|
|
1153
|
+
default: bt(() => [
|
|
1154
|
+
(o(!0), r(b, null, x(s.positionList, (a) => (o(), Pt(M, {
|
|
1151
1155
|
key: a.name,
|
|
1152
1156
|
label: a.name,
|
|
1153
1157
|
value: a.name
|
|
@@ -1158,40 +1162,40 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1158
1162
|
])
|
|
1159
1163
|
])
|
|
1160
1164
|
]),
|
|
1161
|
-
i("div",
|
|
1162
|
-
i("div",
|
|
1165
|
+
i("div", Ft, [
|
|
1166
|
+
i("div", Ot, [
|
|
1163
1167
|
i("div", null, [
|
|
1164
|
-
i("div",
|
|
1165
|
-
i("div",
|
|
1168
|
+
i("div", Bt, "Weather forecast for " + f(((L = s.position) == null ? void 0 : L.name) || "-") + " ( " + f(s.positionOffset) + " )", 1),
|
|
1169
|
+
i("div", Vt, "At " + f((N = s.position) != null && N.portId ? "port" : "coordinates") + ", issued " + f(s.issuedDate), 1)
|
|
1166
1170
|
]),
|
|
1167
|
-
i("div",
|
|
1168
|
-
|
|
1171
|
+
i("div", Ut, [
|
|
1172
|
+
vt(S, {
|
|
1169
1173
|
placement: "left",
|
|
1170
1174
|
effect: "light",
|
|
1171
1175
|
content: s.isCollected ? "remove the port/coordinate from the search list" : "add the port/coordinate to the search list",
|
|
1172
1176
|
"show-after": 1e3
|
|
1173
1177
|
}, {
|
|
1174
|
-
default:
|
|
1175
|
-
s.isCollected ? (
|
|
1178
|
+
default: bt(() => [
|
|
1179
|
+
s.isCollected ? (o(), r("span", {
|
|
1176
1180
|
key: 0,
|
|
1177
1181
|
class: "iconfont icon active",
|
|
1178
|
-
onClick:
|
|
1179
|
-
}, "")) : (
|
|
1182
|
+
onClick: t[3] || (t[3] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1183
|
+
}, "")) : (o(), r("span", {
|
|
1180
1184
|
key: 1,
|
|
1181
1185
|
class: "iconfont icon",
|
|
1182
|
-
onClick:
|
|
1186
|
+
onClick: t[4] || (t[4] = (...a) => v.handleCollect && v.handleCollect(...a))
|
|
1183
1187
|
}, ""))
|
|
1184
1188
|
]),
|
|
1185
1189
|
_: 1
|
|
1186
1190
|
}, 8, ["content"])
|
|
1187
1191
|
])
|
|
1188
1192
|
]),
|
|
1189
|
-
(I = s.position) != null && I.name && !s.loading ? (
|
|
1190
|
-
(P = s.position) != null && P.name && !s.loading ? (
|
|
1191
|
-
i("div",
|
|
1192
|
-
i("table",
|
|
1193
|
-
i("tr",
|
|
1194
|
-
|
|
1193
|
+
(I = s.position) != null && I.name && e.token && !s.loading ? (o(), r("div", Zt)) : s.loading ? (o(), r("div", Jt, "Loading....")) : (o(), r("div", Yt, "No Data")),
|
|
1194
|
+
(P = s.position) != null && P.name && e.token && !s.loading ? (o(), r("div", jt, [
|
|
1195
|
+
i("div", qt, f(s.pickedWeek) + " " + f(v.computeMMMDD(s.pickedDate)), 1),
|
|
1196
|
+
i("table", Qt, [
|
|
1197
|
+
i("tr", Kt, [
|
|
1198
|
+
t[5] || (t[5] = i("th", {
|
|
1195
1199
|
rowspan: "1",
|
|
1196
1200
|
colspan: "1",
|
|
1197
1201
|
class: "tr-title"
|
|
@@ -1199,15 +1203,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1199
1203
|
_("Local time"),
|
|
1200
1204
|
i("span", { class: "unit" }, "(LT)")
|
|
1201
1205
|
], -1)),
|
|
1202
|
-
(
|
|
1206
|
+
(o(!0), r(b, null, x(s.tableData.hours, (a, n) => (o(), r("th", {
|
|
1203
1207
|
rowspan: "1",
|
|
1204
1208
|
colspan: "1",
|
|
1205
|
-
class: z(s.activeIndex ===
|
|
1209
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1206
1210
|
key: Math.random() + "local"
|
|
1207
1211
|
}, f(v.computeHourL(a)), 3))), 128))
|
|
1208
1212
|
]),
|
|
1209
|
-
i("tr",
|
|
1210
|
-
|
|
1213
|
+
i("tr", Xt, [
|
|
1214
|
+
t[6] || (t[6] = i("th", {
|
|
1211
1215
|
rowspan: "1",
|
|
1212
1216
|
colspan: "1",
|
|
1213
1217
|
class: "tr-title"
|
|
@@ -1215,15 +1219,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1215
1219
|
_("UTC"),
|
|
1216
1220
|
i("span", { class: "unit" })
|
|
1217
1221
|
], -1)),
|
|
1218
|
-
(
|
|
1222
|
+
(o(!0), r(b, null, x(s.tableData.hours, (a, n) => (o(), r("th", {
|
|
1219
1223
|
rowspan: "1",
|
|
1220
1224
|
colspan: "1",
|
|
1221
|
-
class: z(s.activeIndex ===
|
|
1225
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1222
1226
|
key: Math.random() + "z"
|
|
1223
1227
|
}, f(v.computeHourZ(a)), 3))), 128))
|
|
1224
1228
|
]),
|
|
1225
|
-
i("tr", $
|
|
1226
|
-
|
|
1229
|
+
i("tr", $t, [
|
|
1230
|
+
t[7] || (t[7] = i("td", {
|
|
1227
1231
|
rowspan: "1",
|
|
1228
1232
|
colspan: "1",
|
|
1229
1233
|
class: "tr-title"
|
|
@@ -1231,31 +1235,31 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1231
1235
|
_("Weather"),
|
|
1232
1236
|
i("span", { class: "unit" })
|
|
1233
1237
|
], -1)),
|
|
1234
|
-
(
|
|
1238
|
+
(o(!0), r(b, null, x(s.tableData.weatherUrls, (a, n) => (o(), r("td", {
|
|
1235
1239
|
rowspan: "1",
|
|
1236
1240
|
colspan: "1",
|
|
1237
|
-
class: z(s.activeIndex ===
|
|
1241
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1238
1242
|
key: Math.random() + "url"
|
|
1239
1243
|
}, [
|
|
1240
|
-
|
|
1244
|
+
vt(S, {
|
|
1241
1245
|
placement: "top",
|
|
1242
1246
|
effect: "light",
|
|
1243
|
-
content: s.tableData.weatherNames[
|
|
1247
|
+
content: s.tableData.weatherNames[n],
|
|
1244
1248
|
"show-after": 500
|
|
1245
1249
|
}, {
|
|
1246
|
-
default:
|
|
1247
|
-
a ? (
|
|
1250
|
+
default: bt(() => [
|
|
1251
|
+
a ? (o(), r("img", {
|
|
1248
1252
|
key: 0,
|
|
1249
1253
|
class: "iconfont weather-icon",
|
|
1250
1254
|
src: a
|
|
1251
|
-
}, null, 8,
|
|
1255
|
+
}, null, 8, te)) : Ht("", !0)
|
|
1252
1256
|
]),
|
|
1253
1257
|
_: 2
|
|
1254
1258
|
}, 1032, ["content"])
|
|
1255
1259
|
], 2))), 128))
|
|
1256
1260
|
]),
|
|
1257
|
-
i("tr",
|
|
1258
|
-
|
|
1261
|
+
i("tr", ee, [
|
|
1262
|
+
t[8] || (t[8] = i("td", {
|
|
1259
1263
|
rowspan: "1",
|
|
1260
1264
|
colspan: "1",
|
|
1261
1265
|
class: "tr-title"
|
|
@@ -1263,15 +1267,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1263
1267
|
_("Temperature"),
|
|
1264
1268
|
i("span", { class: "unit" }, "°C")
|
|
1265
1269
|
], -1)),
|
|
1266
|
-
(
|
|
1270
|
+
(o(!0), r(b, null, x(s.tableData.temp, (a, n) => (o(), r("td", {
|
|
1267
1271
|
rowspan: "1",
|
|
1268
1272
|
colspan: "1",
|
|
1269
|
-
class: z(s.activeIndex ===
|
|
1273
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1270
1274
|
key: Math.random() + a
|
|
1271
1275
|
}, f(a), 3))), 128))
|
|
1272
1276
|
]),
|
|
1273
|
-
i("tr",
|
|
1274
|
-
|
|
1277
|
+
i("tr", se, [
|
|
1278
|
+
t[9] || (t[9] = i("td", {
|
|
1275
1279
|
rowspan: "1",
|
|
1276
1280
|
colspan: "1",
|
|
1277
1281
|
class: "tr-title"
|
|
@@ -1279,15 +1283,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1279
1283
|
_("Precipitation Probability"),
|
|
1280
1284
|
i("span", { class: "unit" }, "%")
|
|
1281
1285
|
], -1)),
|
|
1282
|
-
(
|
|
1286
|
+
(o(!0), r(b, null, x(s.tableData.precipProbability, (a, n) => (o(), r("td", {
|
|
1283
1287
|
rowspan: "1",
|
|
1284
1288
|
colspan: "1",
|
|
1285
|
-
class: z(s.activeIndex ===
|
|
1289
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1286
1290
|
key: Math.random() + a
|
|
1287
1291
|
}, f(a), 3))), 128))
|
|
1288
1292
|
]),
|
|
1289
|
-
i("tr",
|
|
1290
|
-
|
|
1293
|
+
i("tr", ae, [
|
|
1294
|
+
t[10] || (t[10] = i("td", {
|
|
1291
1295
|
rowspan: "1",
|
|
1292
1296
|
colspan: "1",
|
|
1293
1297
|
class: "tr-title"
|
|
@@ -1295,15 +1299,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1295
1299
|
_("Precipitation 1h"),
|
|
1296
1300
|
i("span", { class: "unit" }, "mm")
|
|
1297
1301
|
], -1)),
|
|
1298
|
-
(
|
|
1302
|
+
(o(!0), r(b, null, x(s.tableData.precip1h, (a, n) => (o(), r("td", {
|
|
1299
1303
|
rowspan: "1",
|
|
1300
1304
|
colspan: "1",
|
|
1301
|
-
class: z(s.activeIndex ===
|
|
1305
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1302
1306
|
key: Math.random() + a
|
|
1303
1307
|
}, f(a), 3))), 128))
|
|
1304
1308
|
]),
|
|
1305
|
-
i("tr",
|
|
1306
|
-
|
|
1309
|
+
i("tr", ie, [
|
|
1310
|
+
t[11] || (t[11] = i("td", {
|
|
1307
1311
|
rowspan: "1",
|
|
1308
1312
|
colspan: "1",
|
|
1309
1313
|
class: "tr-title"
|
|
@@ -1311,15 +1315,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1311
1315
|
_("Visibility"),
|
|
1312
1316
|
i("span", { class: "unit" }, "nm")
|
|
1313
1317
|
], -1)),
|
|
1314
|
-
(
|
|
1318
|
+
(o(!0), r(b, null, x(s.tableData.visibility, (a, n) => (o(), r("td", {
|
|
1315
1319
|
rowspan: "1",
|
|
1316
1320
|
colspan: "1",
|
|
1317
|
-
class: z(s.activeIndex ===
|
|
1321
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1318
1322
|
key: Math.random() + a
|
|
1319
1323
|
}, f(a), 3))), 128))
|
|
1320
1324
|
]),
|
|
1321
|
-
i("tr",
|
|
1322
|
-
|
|
1325
|
+
i("tr", ne, [
|
|
1326
|
+
t[12] || (t[12] = i("td", {
|
|
1323
1327
|
rowspan: "1",
|
|
1324
1328
|
colspan: "1",
|
|
1325
1329
|
class: "tr-title"
|
|
@@ -1327,15 +1331,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1327
1331
|
_("Relative Humidity"),
|
|
1328
1332
|
i("span", { class: "unit" }, "%")
|
|
1329
1333
|
], -1)),
|
|
1330
|
-
(
|
|
1334
|
+
(o(!0), r(b, null, x(s.tableData.humidity, (a, n) => (o(), r("td", {
|
|
1331
1335
|
rowspan: "1",
|
|
1332
1336
|
colspan: "1",
|
|
1333
|
-
class: z(s.activeIndex ===
|
|
1337
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1334
1338
|
key: Math.random() + a
|
|
1335
1339
|
}, f(a), 3))), 128))
|
|
1336
1340
|
]),
|
|
1337
|
-
i("tr",
|
|
1338
|
-
|
|
1341
|
+
i("tr", oe, [
|
|
1342
|
+
t[13] || (t[13] = i("td", {
|
|
1339
1343
|
rowspan: "1",
|
|
1340
1344
|
colspan: "1",
|
|
1341
1345
|
class: "tr-title"
|
|
@@ -1343,21 +1347,21 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1343
1347
|
_("Wind direction"),
|
|
1344
1348
|
i("span", { class: "unit" })
|
|
1345
1349
|
], -1)),
|
|
1346
|
-
(
|
|
1350
|
+
(o(!0), r(b, null, x(s.tableData.windDir, (a, n) => (o(), r("td", {
|
|
1347
1351
|
rowspan: "1",
|
|
1348
1352
|
colspan: "1",
|
|
1349
|
-
class: z(s.activeIndex ===
|
|
1353
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1350
1354
|
key: Math.random() + a
|
|
1351
1355
|
}, [
|
|
1352
|
-
isNaN(a) ? (
|
|
1356
|
+
isNaN(a) ? (o(), r("span", re, "-")) : (o(), r("span", {
|
|
1353
1357
|
key: 0,
|
|
1354
1358
|
class: "iconfont icon",
|
|
1355
|
-
style:
|
|
1359
|
+
style: ct({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1356
1360
|
}, "", 4))
|
|
1357
1361
|
], 2))), 128))
|
|
1358
1362
|
]),
|
|
1359
|
-
i("tr",
|
|
1360
|
-
|
|
1363
|
+
i("tr", le, [
|
|
1364
|
+
t[14] || (t[14] = i("td", {
|
|
1361
1365
|
rowspan: "1",
|
|
1362
1366
|
colspan: "1",
|
|
1363
1367
|
class: "tr-title"
|
|
@@ -1365,15 +1369,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1365
1369
|
_("Wind speed"),
|
|
1366
1370
|
i("span", { class: "unit" }, "kts")
|
|
1367
1371
|
], -1)),
|
|
1368
|
-
(
|
|
1372
|
+
(o(!0), r(b, null, x(s.tableData.windSpeed, (a, n) => (o(), r("td", {
|
|
1369
1373
|
rowspan: "1",
|
|
1370
1374
|
colspan: "1",
|
|
1371
|
-
class: z(s.activeIndex ===
|
|
1375
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1372
1376
|
key: Math.random() + a
|
|
1373
1377
|
}, f(a), 3))), 128))
|
|
1374
1378
|
]),
|
|
1375
|
-
i("tr",
|
|
1376
|
-
|
|
1379
|
+
i("tr", he, [
|
|
1380
|
+
t[15] || (t[15] = i("td", {
|
|
1377
1381
|
rowspan: "1",
|
|
1378
1382
|
colspan: "1",
|
|
1379
1383
|
class: "tr-title"
|
|
@@ -1381,18 +1385,18 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1381
1385
|
_("Wind gust"),
|
|
1382
1386
|
i("span", { class: "unit" }, "kts")
|
|
1383
1387
|
], -1)),
|
|
1384
|
-
(
|
|
1388
|
+
(o(!0), r(b, null, x(s.tableData.windGust, (a, n) => (o(), r("td", {
|
|
1385
1389
|
rowspan: "1",
|
|
1386
1390
|
colspan: "1",
|
|
1387
|
-
class: z(s.activeIndex ===
|
|
1391
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1388
1392
|
key: Math.random() + a
|
|
1389
1393
|
}, f(a), 3))), 128))
|
|
1390
1394
|
])
|
|
1391
1395
|
]),
|
|
1392
|
-
|
|
1393
|
-
i("table",
|
|
1394
|
-
i("tr",
|
|
1395
|
-
|
|
1396
|
+
t[27] || (t[27] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1397
|
+
i("table", de, [
|
|
1398
|
+
i("tr", ce, [
|
|
1399
|
+
t[16] || (t[16] = i("td", {
|
|
1396
1400
|
rowspan: "1",
|
|
1397
1401
|
colspan: "1",
|
|
1398
1402
|
class: "tr-title"
|
|
@@ -1400,15 +1404,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1400
1404
|
_("Wind wave height"),
|
|
1401
1405
|
i("span", { class: "unit" }, "m")
|
|
1402
1406
|
], -1)),
|
|
1403
|
-
(
|
|
1407
|
+
(o(!0), r(b, null, x(s.tableData.windwaveHeight, (a, n) => (o(), r("td", {
|
|
1404
1408
|
rowspan: "1",
|
|
1405
1409
|
colspan: "1",
|
|
1406
|
-
class: z(s.activeIndex ===
|
|
1410
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1407
1411
|
key: Math.random() + a
|
|
1408
1412
|
}, f(a), 3))), 128))
|
|
1409
1413
|
]),
|
|
1410
|
-
i("tr",
|
|
1411
|
-
|
|
1414
|
+
i("tr", pe, [
|
|
1415
|
+
t[17] || (t[17] = i("td", {
|
|
1412
1416
|
rowspan: "1",
|
|
1413
1417
|
colspan: "1",
|
|
1414
1418
|
class: "tr-title"
|
|
@@ -1416,21 +1420,21 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1416
1420
|
_("Wind wave direction"),
|
|
1417
1421
|
i("span", { class: "unit" })
|
|
1418
1422
|
], -1)),
|
|
1419
|
-
(
|
|
1423
|
+
(o(!0), r(b, null, x(s.tableData.windwaveDir, (a, n) => (o(), r("td", {
|
|
1420
1424
|
rowspan: "1",
|
|
1421
1425
|
colspan: "1",
|
|
1422
|
-
class: z(s.activeIndex ===
|
|
1426
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1423
1427
|
key: Math.random() + a
|
|
1424
1428
|
}, [
|
|
1425
|
-
isNaN(a) ? (
|
|
1429
|
+
isNaN(a) ? (o(), r("span", me, "-")) : (o(), r("span", {
|
|
1426
1430
|
key: 0,
|
|
1427
1431
|
class: "iconfont icon",
|
|
1428
|
-
style:
|
|
1432
|
+
style: ct({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1429
1433
|
}, "", 4))
|
|
1430
1434
|
], 2))), 128))
|
|
1431
1435
|
]),
|
|
1432
|
-
i("tr",
|
|
1433
|
-
|
|
1436
|
+
i("tr", ue, [
|
|
1437
|
+
t[18] || (t[18] = i("td", {
|
|
1434
1438
|
rowspan: "1",
|
|
1435
1439
|
colspan: "1",
|
|
1436
1440
|
class: "tr-title"
|
|
@@ -1438,15 +1442,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1438
1442
|
_("Wind wave period"),
|
|
1439
1443
|
i("span", { class: "unit" }, "s")
|
|
1440
1444
|
], -1)),
|
|
1441
|
-
(
|
|
1445
|
+
(o(!0), r(b, null, x(s.tableData.windwavePeriod, (a, n) => (o(), r("td", {
|
|
1442
1446
|
rowspan: "1",
|
|
1443
1447
|
colspan: "1",
|
|
1444
|
-
class: z(s.activeIndex ===
|
|
1448
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1445
1449
|
key: Math.random() + a
|
|
1446
1450
|
}, f(a), 3))), 128))
|
|
1447
1451
|
]),
|
|
1448
|
-
i("tr",
|
|
1449
|
-
|
|
1452
|
+
i("tr", we, [
|
|
1453
|
+
t[19] || (t[19] = i("td", {
|
|
1450
1454
|
rowspan: "1",
|
|
1451
1455
|
colspan: "1",
|
|
1452
1456
|
class: "tr-title"
|
|
@@ -1454,15 +1458,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1454
1458
|
_("Swell height"),
|
|
1455
1459
|
i("span", { class: "unit" }, "m")
|
|
1456
1460
|
], -1)),
|
|
1457
|
-
(
|
|
1461
|
+
(o(!0), r(b, null, x(s.tableData.swellHeight, (a, n) => (o(), r("td", {
|
|
1458
1462
|
rowspan: "1",
|
|
1459
1463
|
colspan: "1",
|
|
1460
|
-
class: z(s.activeIndex ===
|
|
1464
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1461
1465
|
key: Math.random() + a
|
|
1462
1466
|
}, f(a), 3))), 128))
|
|
1463
1467
|
]),
|
|
1464
|
-
i("tr",
|
|
1465
|
-
|
|
1468
|
+
i("tr", ge, [
|
|
1469
|
+
t[20] || (t[20] = i("td", {
|
|
1466
1470
|
rowspan: "1",
|
|
1467
1471
|
colspan: "1",
|
|
1468
1472
|
class: "tr-title"
|
|
@@ -1470,21 +1474,21 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1470
1474
|
_("Swell direction"),
|
|
1471
1475
|
i("span", { class: "unit" })
|
|
1472
1476
|
], -1)),
|
|
1473
|
-
(
|
|
1477
|
+
(o(!0), r(b, null, x(s.tableData.swellDir, (a, n) => (o(), r("td", {
|
|
1474
1478
|
rowspan: "1",
|
|
1475
1479
|
colspan: "1",
|
|
1476
|
-
class: z(s.activeIndex ===
|
|
1480
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1477
1481
|
key: Math.random() + a
|
|
1478
1482
|
}, [
|
|
1479
|
-
isNaN(a) ? (
|
|
1483
|
+
isNaN(a) ? (o(), r("span", ve, "-")) : (o(), r("span", {
|
|
1480
1484
|
key: 0,
|
|
1481
1485
|
class: "iconfont icon",
|
|
1482
|
-
style:
|
|
1486
|
+
style: ct({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1483
1487
|
}, "", 4))
|
|
1484
1488
|
], 2))), 128))
|
|
1485
1489
|
]),
|
|
1486
|
-
i("tr",
|
|
1487
|
-
|
|
1490
|
+
i("tr", be, [
|
|
1491
|
+
t[21] || (t[21] = i("td", {
|
|
1488
1492
|
rowspan: "1",
|
|
1489
1493
|
colspan: "1",
|
|
1490
1494
|
class: "tr-title"
|
|
@@ -1492,15 +1496,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1492
1496
|
_("Swell period"),
|
|
1493
1497
|
i("span", { class: "unit" }, "s")
|
|
1494
1498
|
], -1)),
|
|
1495
|
-
(
|
|
1499
|
+
(o(!0), r(b, null, x(s.tableData.swellPeriod, (a, n) => (o(), r("td", {
|
|
1496
1500
|
rowspan: "1",
|
|
1497
1501
|
colspan: "1",
|
|
1498
|
-
class: z(s.activeIndex ===
|
|
1502
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1499
1503
|
key: Math.random() + a
|
|
1500
1504
|
}, f(a), 3))), 128))
|
|
1501
1505
|
]),
|
|
1502
|
-
i("tr",
|
|
1503
|
-
|
|
1506
|
+
i("tr", xe, [
|
|
1507
|
+
t[22] || (t[22] = i("td", {
|
|
1504
1508
|
rowspan: "1",
|
|
1505
1509
|
colspan: "1",
|
|
1506
1510
|
class: "tr-title"
|
|
@@ -1508,15 +1512,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1508
1512
|
_("Sig wave height"),
|
|
1509
1513
|
i("span", { class: "unit" }, "m")
|
|
1510
1514
|
], -1)),
|
|
1511
|
-
(
|
|
1515
|
+
(o(!0), r(b, null, x(s.tableData.sigwaveHeight, (a, n) => (o(), r("td", {
|
|
1512
1516
|
rowspan: "1",
|
|
1513
1517
|
colspan: "1",
|
|
1514
|
-
class: z(s.activeIndex ===
|
|
1518
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1515
1519
|
key: Math.random() + a
|
|
1516
1520
|
}, f(a), 3))), 128))
|
|
1517
1521
|
]),
|
|
1518
|
-
i("tr",
|
|
1519
|
-
|
|
1522
|
+
i("tr", fe, [
|
|
1523
|
+
t[23] || (t[23] = i("td", {
|
|
1520
1524
|
rowspan: "1",
|
|
1521
1525
|
colspan: "1",
|
|
1522
1526
|
class: "tr-title"
|
|
@@ -1524,21 +1528,21 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1524
1528
|
_("Current direction"),
|
|
1525
1529
|
i("span", { class: "unit" })
|
|
1526
1530
|
], -1)),
|
|
1527
|
-
(
|
|
1531
|
+
(o(!0), r(b, null, x(s.tableData.currentDir, (a, n) => (o(), r("td", {
|
|
1528
1532
|
rowspan: "1",
|
|
1529
1533
|
colspan: "1",
|
|
1530
|
-
class: z(s.activeIndex ===
|
|
1534
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1531
1535
|
key: Math.random() + a
|
|
1532
1536
|
}, [
|
|
1533
|
-
isNaN(a) ? (
|
|
1537
|
+
isNaN(a) ? (o(), r("span", ye, "-")) : (o(), r("span", {
|
|
1534
1538
|
key: 0,
|
|
1535
1539
|
class: "iconfont icon",
|
|
1536
|
-
style:
|
|
1540
|
+
style: ct({ display: "inline-block", transform: `rotate(${a}deg)` })
|
|
1537
1541
|
}, "", 4))
|
|
1538
1542
|
], 2))), 128))
|
|
1539
1543
|
]),
|
|
1540
|
-
i("tr",
|
|
1541
|
-
|
|
1544
|
+
i("tr", _e, [
|
|
1545
|
+
t[24] || (t[24] = i("td", {
|
|
1542
1546
|
rowspan: "1",
|
|
1543
1547
|
colspan: "1",
|
|
1544
1548
|
class: "tr-title"
|
|
@@ -1546,18 +1550,18 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1546
1550
|
_("Current speed"),
|
|
1547
1551
|
i("span", { class: "unit" }, "kts")
|
|
1548
1552
|
], -1)),
|
|
1549
|
-
(
|
|
1553
|
+
(o(!0), r(b, null, x(s.tableData.currentSpeed, (a, n) => (o(), r("td", {
|
|
1550
1554
|
rowspan: "1",
|
|
1551
1555
|
colspan: "1",
|
|
1552
|
-
class: z(s.activeIndex ===
|
|
1556
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1553
1557
|
key: Math.random() + a
|
|
1554
1558
|
}, f(a), 3))), 128))
|
|
1555
1559
|
])
|
|
1556
1560
|
]),
|
|
1557
|
-
|
|
1558
|
-
i("table",
|
|
1559
|
-
i("tr",
|
|
1560
|
-
|
|
1561
|
+
t[28] || (t[28] = i("div", { style: { "text-align": "center", padding: "3px" } }, null, -1)),
|
|
1562
|
+
i("table", ze, [
|
|
1563
|
+
i("tr", ke, [
|
|
1564
|
+
t[25] || (t[25] = i("td", {
|
|
1561
1565
|
rowspan: "1",
|
|
1562
1566
|
colspan: "1",
|
|
1563
1567
|
class: "tr-title"
|
|
@@ -1565,15 +1569,15 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1565
1569
|
_("Sea level height"),
|
|
1566
1570
|
i("span", { class: "unit" }, "m")
|
|
1567
1571
|
], -1)),
|
|
1568
|
-
(
|
|
1572
|
+
(o(!0), r(b, null, x(s.tableData.seaLevel, (a, n) => (o(), r("td", {
|
|
1569
1573
|
rowspan: "1",
|
|
1570
1574
|
colspan: "1",
|
|
1571
|
-
class: z(s.activeIndex ===
|
|
1575
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1572
1576
|
key: Math.random() + a
|
|
1573
1577
|
}, f(a), 3))), 128))
|
|
1574
1578
|
]),
|
|
1575
|
-
i("tr",
|
|
1576
|
-
|
|
1579
|
+
i("tr", De, [
|
|
1580
|
+
t[26] || (t[26] = i("td", {
|
|
1577
1581
|
rowspan: "1",
|
|
1578
1582
|
colspan: "1",
|
|
1579
1583
|
class: "tr-title"
|
|
@@ -1581,24 +1585,24 @@ function Nt(l, e, t, h, s, v) {
|
|
|
1581
1585
|
_("Sea surface temperature"),
|
|
1582
1586
|
i("span", { class: "unit" }, "°C")
|
|
1583
1587
|
], -1)),
|
|
1584
|
-
(
|
|
1588
|
+
(o(!0), r(b, null, x(s.tableData.seaTemp, (a, n) => (o(), r("td", {
|
|
1585
1589
|
rowspan: "1",
|
|
1586
1590
|
colspan: "1",
|
|
1587
|
-
class: z(s.activeIndex ===
|
|
1591
|
+
class: z(s.activeIndex === n ? "active" : ""),
|
|
1588
1592
|
key: Math.random() + a
|
|
1589
1593
|
}, f(a), 3))), 128))
|
|
1590
1594
|
])
|
|
1591
1595
|
])
|
|
1592
|
-
])) : s.loading ? (
|
|
1596
|
+
])) : s.loading ? (o(), r("div", Se, "Loading....")) : (o(), r("div", Le, "No Data"))
|
|
1593
1597
|
])
|
|
1594
1598
|
]);
|
|
1595
1599
|
}
|
|
1596
|
-
const
|
|
1600
|
+
const Ie = /* @__PURE__ */ Wt(Tt, [["render", Ne], ["__scopeId", "data-v-fa64778b"]]), Re = {
|
|
1597
1601
|
install(l) {
|
|
1598
|
-
l.component("SpotReport",
|
|
1602
|
+
l.component("SpotReport", Ie);
|
|
1599
1603
|
}
|
|
1600
1604
|
};
|
|
1601
1605
|
export {
|
|
1602
|
-
|
|
1603
|
-
|
|
1606
|
+
Ie as SpotReport,
|
|
1607
|
+
Re as SpotReportPlugin
|
|
1604
1608
|
};
|