@idmwx/idmui-gl3 6.1.7 → 6.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4909,7 +4909,8 @@ class ht {
4909
4909
  degree: (Y = q.swell_wave_direction_dominant) == null ? void 0 : Y.at(Q),
4910
4910
  period: (ae = q.swell_wave_period_max) == null ? void 0 : ae.at(Q),
4911
4911
  peakPeriod: (Ae = q.swell_wave_peak_period_max) == null ? void 0 : Ae.at(Q),
4912
- bearing: ((pe = q.swell_wave_direction_dominant) == null ? void 0 : pe.at(Q)) !== null ? (((ye = q.swell_wave_direction_dominant) == null ? void 0 : ye.at(Q)) + 180) % 360 : null
4912
+ // bearing: daily.swell_wave_direction_dominant?.at(day) !== null ? (daily.swell_wave_direction_dominant?.at(day) + 180) % 360 : null,
4913
+ bearing: ((pe = q.swell_wave_direction_dominant) == null ? void 0 : pe.at(Q)) !== null ? ((ye = q.swell_wave_direction_dominant) == null ? void 0 : ye.at(Q)) % 360 : null
4913
4914
  },
4914
4915
  wd: {
4915
4916
  height: (Le = q.wind_wave_height_max) == null ? void 0 : Le.at(Q),
@@ -4927,16 +4928,16 @@ class ht {
4927
4928
  }
4928
4929
  static parseWave(e, t) {
4929
4930
  if (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.sig.height === 0) {
4930
- const r = Math.sqrt(Math.pow(e.swell.height || 0, 2) + Math.pow(e.wd.height || 0, 2)), i = 0.28 * Math.pow(this.kts2ms((t == null ? void 0 : t.kts) || 0), 2) / 9.80665;
4931
- e.sig.height = Math.round(Math.max(r, i) * 100) / 100;
4931
+ const r = Math.sqrt(Math.pow(e.swell.height || 0, 2) + Math.pow(e.wd.height || 0, 2));
4932
+ e.sig.height = Math.round(r * 100) / 100;
4932
4933
  }
4933
4934
  if (e.swell.height === 0) {
4934
- const r = Math.sqrt(Math.abs(Math.pow(e.sig.height || 0, 2) - Math.pow(e.wd.height || 0, 2))), i = 0.28 * Math.pow(this.kts2ms((t == null ? void 0 : t.kts) || 0), 2) / 9.80665;
4935
- e.swell.height = Math.round((Math.min(r, i) || i) * 100) / 100;
4935
+ const r = Math.sqrt(Math.abs(Math.pow(e.sig.height || 0, 2) - Math.pow(e.wd.height || 0, 2))), i = 0.28 * Math.pow(this.kts2ms((t == null ? void 0 : t.kts) || 0), 2) / 48.0665;
4936
+ e.swell.height = Math.round(Math.min(r, i) * 100) / 100;
4936
4937
  }
4937
4938
  if (e.wd.height === 0 || e.wd.height > e.sig.height) {
4938
- const r = Math.sqrt(Math.abs(Math.pow(e.sig.height || 0, 2) - Math.pow(e.swell.height || 0, 2))), i = 0.28 * Math.pow(this.kts2ms((t == null ? void 0 : t.kts) || 0), 2) / 9.80665;
4939
- e.wd.height = Math.round((Math.min(r, i) || i) * 100) / 100;
4939
+ const r = Math.sqrt(Math.abs(Math.pow(e.sig.height || 0, 2) - Math.pow(e.swell.height || 0, 2))), i = 0.28 * Math.pow(this.kts2ms((t == null ? void 0 : t.kts) || 0), 2) / 48.0665;
4940
+ e.wd.height = Math.round(Math.min(r, i) * 100) / 100;
4940
4941
  }
4941
4942
  return e.swell.height > e.sig.height && (e.swell.height = Math.round(e.sig.height * 0.76 * 100) / 100), e.sig.period || (e.sig.period = Math.round(5 * Math.sqrt(e.sig.height))), e.swell.period || (e.swell.period = Math.round(5 * Math.sqrt(e.swell.height))), e.wd.period || (e.wd.period = Math.round(5 * Math.sqrt(e.wd.height))), e;
4942
4943
  }
@@ -8709,7 +8710,7 @@ const pt = /* @__PURE__ */ U(Cs, [["render", xs], ["__scopeId", "data-v-ad66a24c
8709
8710
  let t = 0;
8710
8711
  const r = [];
8711
8712
  for (let i = 1; i < e.length; i++) {
8712
- const s = e[i - 1], n = e[i], l = s.properties, c = { lng: s.geometry.coordinates[0], lat: s.geometry.coordinates[1] }, p = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, h = Re.calculateDistance(c, p, l.mode === "RL", 1), d = Re.calculateBearing(c, p, l.mode === "RL", 2);
8713
+ const s = e[i - 1], n = e[i], l = s.properties, c = { lng: s.geometry.coordinates[0], lat: s.geometry.coordinates[1] }, p = { lng: n.geometry.coordinates[0], lat: n.geometry.coordinates[1] }, h = Re.calculateDistance(c, p, l.mode === "RL", 4), d = Re.calculateBearing(c, p, l.mode === "RL", 2);
8713
8714
  t = se.roundPrecision(t + h, 2);
8714
8715
  let A;
8715
8716
  l.mode === "RL" ? A = se.convertToMonotonicLng([c, p]) : A = se.convertToMonotonicLng(Re.interpolateCoordinates(c, p, 200));
@@ -8725,7 +8726,7 @@ const pt = /* @__PURE__ */ U(Cs, [["render", xs], ["__scopeId", "data-v-ad66a24c
8725
8726
  let s, n;
8726
8727
  if (e) {
8727
8728
  const c = e.properties, p = { lng: e.geometry.coordinates[0], lat: e.geometry.coordinates[1] }, h = { lng: t.lng, lat: t.lat };
8728
- s = Re.calculateDistance(p, h, c.mode === "RL", 1), n = Re.calculateBearing(p, h, c.mode === "RL", 2);
8729
+ s = Re.calculateDistance(p, h, c.mode === "RL", 4), n = Re.calculateBearing(p, h, c.mode === "RL", 2);
8729
8730
  let d;
8730
8731
  c.mode === "RL" ? d = se.convertToMonotonicLng([p, h]) : d = se.convertToMonotonicLng(Re.interpolateCoordinates(p, h, 200));
8731
8732
  const A = S.lineString(d.map((v) => [v.lng, v.lat]));
@@ -8733,7 +8734,7 @@ const pt = /* @__PURE__ */ U(Cs, [["render", xs], ["__scopeId", "data-v-ad66a24c
8733
8734
  }
8734
8735
  if (r) {
8735
8736
  const c = t.properties, p = t, h = { lng: r.geometry.coordinates[0], lat: r.geometry.coordinates[1] };
8736
- s = Re.calculateDistance(p, h, c.mode === "RL", 1), n = Re.calculateBearing(p, h, c.mode === "RL", 2);
8737
+ s = Re.calculateDistance(p, h, c.mode === "RL", 4), n = Re.calculateBearing(p, h, c.mode === "RL", 2);
8737
8738
  let d;
8738
8739
  c.mode === "RL" ? d = se.convertToMonotonicLng([p, h]) : d = se.convertToMonotonicLng(Re.interpolateCoordinates(p, h, 200));
8739
8740
  const A = S.lineString(d.map((v) => [v.lng, v.lat]));