@openglobus/openglobus-react 0.3.0 → 0.3.1

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
@@ -4,14 +4,14 @@ const En = Cn({
4
4
  globe: null,
5
5
  setGlobe: () => {
6
6
  }
7
- }), vd = ({ children: a }) => {
7
+ }), xd = ({ children: a }) => {
8
8
  const [e, t] = ut(null);
9
9
  return /* @__PURE__ */ Ne.createElement(En.Provider, { value: { globe: e, setGlobe: t } }, a);
10
10
  }, vt = () => Tn(En), ji = 2 * Math.PI, An = Math.PI / 2, rl = Number.MAX_VALUE || 17976931348623157e292, ys = Math.log(2), Lt = 2147483647, be = 549755748352, Ee = -549755748352, j = Math.PI / 180, ee = 180 / Math.PI, jr = 2 * ee, at = 0.5 * j, Ln = Math.sqrt(0.5), Pn = 1e-5, rt = 1e-10, wr = 1e-12, Cr = 1e-14;
11
11
  function Yi(a, e, t) {
12
12
  return Math.max(e, Math.min(a, t));
13
13
  }
14
- function Wi(a) {
14
+ function qi(a) {
15
15
  return !(a & a - 1);
16
16
  }
17
17
  function Yt(a, e = 4096) {
@@ -60,7 +60,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, ARCSECONDS_TO_RADIANS: 48
60
60
  return Math.pow(2, a);
61
61
  }, frac: ri, getAngleBetweenAzimuths: function(a, e) {
62
62
  return (((a = Vt(a)) - (e = Vt(e))) % 360 + 360 + 180) % 360 - 180;
63
- }, isPowerOfTwo: Wi, lerp: Rn, log: function(a, e) {
63
+ }, isPowerOfTwo: qi, lerp: Rn, log: function(a, e) {
64
64
  return Math.log(a) / Math.log(e);
65
65
  }, log2: function(a) {
66
66
  return Math.log(a) / ys;
@@ -142,7 +142,7 @@ class A {
142
142
  return e.height ? this.lon === e.lon && this.lat === e.lat && this.height === e.height : this.lon === e.lon && this.lat === e.lat;
143
143
  }
144
144
  }
145
- const Le = 2003750834e-2, qi = 2 * Le, Yr = Math.PI / Le, jt = Le / Math.PI, al = 0.5 * Math.PI, zi = Le / 180, Bn = 180 / Le, kn = Math.PI / 360, xs = Math.PI / 180, ll = 180 / Math.PI, In = 2 * Le, si = 1 / In;
145
+ const Le = 2003750834e-2, Wi = 2 * Le, Yr = Math.PI / Le, jt = Le / Math.PI, al = 0.5 * Math.PI, zi = Le / 180, Bn = 180 / Le, kn = Math.PI / 360, xs = Math.PI / 180, ll = 180 / Math.PI, In = 2 * Le, si = 1 / In;
146
146
  function $i(a) {
147
147
  return new A(a.lon * Le / 180, Math.log(Math.tan((90 + a.lat) * kn)) * jt, a.height);
148
148
  }
@@ -155,16 +155,16 @@ function oi(a) {
155
155
  function zn(a) {
156
156
  return ll * (2 * Math.atan(Math.exp(a * Yr)) - al);
157
157
  }
158
- function qt(a, e, t) {
159
- let i = qi / (1 << t), r = new A(a * i - 2003750834e-2, Le - e * i - i);
158
+ function Wt(a, e, t) {
159
+ let i = Wi / (1 << t), r = new A(a * i - 2003750834e-2, Le - e * i - i);
160
160
  return new G(r, new A(r.lon + i, r.lat + i));
161
161
  }
162
- const ue = zn(Le), Ve = -ue;
163
- Object.freeze(Object.defineProperty({ __proto__: null, INV_POLE_BY_180: Bn, MAX_LAT: ue, MIN_LAT: Ve, ONE_BY_POLE_DOUBLE: si, PI_BY_POLE: Yr, POLE: Le, POLE2: qi, POLE_BY_180: zi, POLE_BY_PI: jt, POLE_DOUBLE: In, forward: $i, forwardArray: function(a) {
162
+ const _e = zn(Le), Ve = -_e;
163
+ Object.freeze(Object.defineProperty({ __proto__: null, INV_POLE_BY_180: Bn, MAX_LAT: _e, MIN_LAT: Ve, ONE_BY_POLE_DOUBLE: si, PI_BY_POLE: Yr, POLE: Le, POLE2: Wi, POLE_BY_180: zi, POLE_BY_PI: jt, POLE_DOUBLE: In, forward: $i, forwardArray: function(a) {
164
164
  let e = [];
165
165
  for (let t = 0; t < a.length; t++) e.push(a[t].forwardMercator());
166
166
  return e;
167
- }, forward_lat: oi, forward_lon: ni, getTileExtent: qt, getTileX: function(a, e) {
167
+ }, forward_lat: oi, forward_lon: ni, getTileExtent: Wt, getTileX: function(a, e) {
168
168
  return Math.floor((a + 180) / 360 * Math.pow(2, e));
169
169
  }, getTileY: function(a, e) {
170
170
  return Math.floor(0.5 * (1 - Math.log(Math.tan(a * xs) + 1 / Math.cos(a * xs)) / Math.PI) * Math.pow(2, e));
@@ -1174,7 +1174,7 @@ class N {
1174
1174
  }
1175
1175
  }
1176
1176
  const Dn = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000000", blanchedalmond: "#ffebcd", blue: "#0000ff", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#ff00ff", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520", gray: "#808080", green: "#008000", greenyellow: "#adff2f", honeydew: "#f0fff0", hotpink: "#ff69b4", "indianred ": "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgrey: "#d3d3d3", lightgreen: "#90ee90", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#778899", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#00ff00", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#ff00ff", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370d8", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#d87093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", rebeccapurple: "#663399", red: "#ff0000", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#ffffff", whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32" };
1177
- class Wr {
1177
+ class qr {
1178
1178
  constructor(e = 1, t = 1) {
1179
1179
  this._a = e, this._b = t, this._flattening = (e - t) / e, this._f = 1 / this._flattening, this._a2 = e * e, this._b2 = t * t;
1180
1180
  const i = Math.sqrt(this._a2 - this._b2);
@@ -1319,7 +1319,7 @@ class Wr {
1319
1319
  return h = o > 0 ? Math.sqrt((n + o) ** 2 - n ** 2) : n, h > l.length() && (!i || i.dot(l.normalize()) > 0);
1320
1320
  }
1321
1321
  }
1322
- const Fn = new Wr(6378137, 6356752314245179e-9);
1322
+ const Fn = new qr(6378137, 6356752314245179e-9);
1323
1323
  function Di(a, e) {
1324
1324
  return a ?? e;
1325
1325
  }
@@ -1330,7 +1330,7 @@ function bs(a) {
1330
1330
  return a === void 0;
1331
1331
  }
1332
1332
  let hl = 0;
1333
- function qr(a) {
1333
+ function Wr(a) {
1334
1334
  let e = a._openglobus_id;
1335
1335
  return e || (e = a._openglobus_id = ++hl), e;
1336
1336
  }
@@ -1400,7 +1400,7 @@ function Nn(a) {
1400
1400
  function Hn(a, e = "") {
1401
1401
  return a ? a.trim() : e;
1402
1402
  }
1403
- function qe(a, e) {
1403
+ function We(a, e) {
1404
1404
  if (a) {
1405
1405
  if (Nn(a)) return new v(a, a, a);
1406
1406
  if (a instanceof v) return a.clone();
@@ -1460,7 +1460,7 @@ function Rt(a, e, t) {
1460
1460
  }
1461
1461
  return -i - 1;
1462
1462
  }
1463
- function Kr(a, e, t) {
1463
+ function Qr(a, e, t) {
1464
1464
  let i = Rt(a, e, t);
1465
1465
  return i < 0 && (i = ~i), a.splice(i, 0, e), i;
1466
1466
  }
@@ -1541,7 +1541,7 @@ function ce(a, e, t, i) {
1541
1541
  const r = a.length - t, s = new a.constructor(r);
1542
1542
  return s.set(a.subarray(0, e)), s.set(a.subarray(e + t), e), i && (i.result = a.subarray(e, e + t)), s;
1543
1543
  }
1544
- function Qr(a, e, t, i, r) {
1544
+ function Kr(a, e, t, i, r) {
1545
1545
  const s = r + 1, n = t + s, o = i + s;
1546
1546
  let l = new Float64Array(s * s * 3), h = 0;
1547
1547
  for (let c = t; c < n; c++) for (let d = i; d < o; d++) {
@@ -1597,11 +1597,11 @@ function Pr(a, e = -1) {
1597
1597
  const Oi = Object.freeze(Object.defineProperty({ __proto__: null, base64StringToBlog: function(a) {
1598
1598
  let e = a.split(";"), t = e[0].split(":")[1];
1599
1599
  return ws(e[1].split(",")[1], t);
1600
- }, base64toBlob: ws, binaryInsert: Kr, binarySearch: Rt, binarySearchFast: Zr, blerp: function(a, e, t, i, r, s, n = 0, o = 1, l = 0, h = 1) {
1600
+ }, base64toBlob: ws, binaryInsert: Qr, binarySearch: Rt, binarySearchFast: Zr, blerp: function(a, e, t, i, r, s, n = 0, o = 1, l = 0, h = 1) {
1601
1601
  return (t * (o - a) * (h - e) + i * (a - n) * (h - e) + r * (o - a) * (e - l) + s * (a - n) * (e - l)) / ((o - n) * (h - l));
1602
1602
  }, blerp2: function(a, e, t, i, r, s) {
1603
1603
  return t * (1 - a) * (1 - e) + i * a * (1 - e) + r * (1 - a) * e + s * a * e;
1604
- }, castType: cl, cloneArray: Jr, concatArrays: we, concatTypedArrays: le, createColorRGB: Ye, createColorRGBA: lt, createExtent: Xr, createLonLat: Zi, createVector3: qe, createVector4: function(a, e) {
1604
+ }, castType: cl, cloneArray: Jr, concatArrays: we, concatTypedArrays: le, createColorRGB: Ye, createColorRGBA: lt, createExtent: Xr, createLonLat: Zi, createVector3: We, createVector4: function(a, e) {
1605
1605
  if (a) {
1606
1606
  if (a instanceof te) return a.clone();
1607
1607
  if (a instanceof Array) return te.fromVec(a);
@@ -1645,12 +1645,12 @@ const Oi = Object.freeze(Object.defineProperty({ __proto__: null, base64StringTo
1645
1645
  if (r && (g * f > 0 || p * _ > 0)) return;
1646
1646
  let m = g / (g - f);
1647
1647
  return new N(a.x + m * s.x, a.y + m * s.y);
1648
- }, getLinesIntersectionLonLat: Vn, getMatrixSubArray32: Un, getMatrixSubArray64: Qr, getMatrixSubArrayBoundsExt: Ar, getTileImageResolution: function(a, e, t, i = 256, r = Fn) {
1649
- let s = qt(a, e, t), n = s.getSouthWest().inverseMercator(), o = s.getNorthEast().inverseMercator();
1648
+ }, getLinesIntersectionLonLat: Vn, getMatrixSubArray32: Un, getMatrixSubArray64: Kr, getMatrixSubArrayBoundsExt: Ar, getTileImageResolution: function(a, e, t, i = 256, r = Fn) {
1649
+ let s = Wt(a, e, t), n = s.getSouthWest().inverseMercator(), o = s.getNorthEast().inverseMercator();
1650
1650
  return [r.getGreatCircleDistance(n, new A(o.lon, n.lat)) / i, r.getGreatCircleDistance(n, new A(n.lon, o.lat)) / i];
1651
1651
  }, getUrlParam: Gn, htmlColorToFloat32Array: mt, htmlColorToRgb: Xi, htmlColorToRgba: ht, isEmpty: je, isImageLoaded: Lr, isNumber: Nn, isString: ir, isUndef: bs, isUndefExt: function(a, e) {
1652
1652
  return bs(a) ? e : a;
1653
- }, loadImage: Fi, makeArray: Nt, makeArrayTyped: se, parseHTML: $r, print2d: On, rgbToStringHTML: Er, spliceArray: Ae, spliceTypedArray: ce, stamp: qr, stringTemplate: Ge, stringTemplate2: di, throttle: vi, toFixedMax: Pr, xmlToJson: function a(e) {
1653
+ }, loadImage: Fi, makeArray: Nt, makeArrayTyped: se, parseHTML: $r, print2d: On, rgbToStringHTML: Er, spliceArray: Ae, spliceTypedArray: ce, stamp: Wr, stringTemplate: Ge, stringTemplate2: di, throttle: vi, toFixedMax: Pr, xmlToJson: function a(e) {
1654
1654
  let t = {};
1655
1655
  if (e.nodeType === 1) {
1656
1656
  if (e.attributes.length > 0) {
@@ -1673,12 +1673,12 @@ const Oi = Object.freeze(Object.defineProperty({ __proto__: null, base64StringTo
1673
1673
  }
1674
1674
  }
1675
1675
  return t;
1676
- } }, Symbol.toStringTag, { value: "Module" })), Ni = 1e3, Sr = 1 / 60, Cs = 1 / 24, yi = 3600, Rr = 1 / yi, es = 43200, Hi = 1440, dl = 1 / Hi, Je = 86400, ul = 864e5, ts = 11574074074074074e-24, nt = 1 / Je, Ki = 2451545;
1676
+ } }, Symbol.toStringTag, { value: "Module" })), Ni = 1e3, Sr = 1 / 60, Cs = 1 / 24, yi = 3600, Rr = 1 / yi, es = 43200, Hi = 1440, dl = 1 / Hi, Je = 86400, ul = 864e5, ts = 11574074074074074e-24, nt = 1 / Je, Qi = 2451545;
1677
1677
  function jn(a, e, t) {
1678
1678
  let i = (e - 14) / 12 | 0, r = a + 4800 + i;
1679
1679
  return (1461 * r / 4 | 0) + (367 * (e - 2 - 12 * i) / 12 | 0) - (3 * ((r + 100) / 100 | 0) / 4 | 0) + t - 32075;
1680
1680
  }
1681
- function Qi(a) {
1681
+ function Ki(a) {
1682
1682
  let e = jn(a.getUTCFullYear(), a.getUTCMonth() + 1, a.getUTCDate()), t = a.getUTCHours() - 12;
1683
1683
  t < 0 && (t += 24);
1684
1684
  let i = a.getUTCSeconds() + t * yi + 60 * a.getUTCMinutes() + 1e-3 * a.getUTCMilliseconds();
@@ -1687,7 +1687,7 @@ function Qi(a) {
1687
1687
  return e += r, i -= Je * r, i < 0 && (e--, i += Je), e + i * nt;
1688
1688
  }
1689
1689
  function Mr(a) {
1690
- let e = Wn, t = Rt(e, a, function(r, s) {
1690
+ let e = qn, t = Rt(e, a, function(r, s) {
1691
1691
  return r - s.jd;
1692
1692
  });
1693
1693
  t < 0 && (t = ~t), t >= e.length && (t = e.length - 1);
@@ -1695,7 +1695,7 @@ function Mr(a) {
1695
1695
  return t !== 0 && (e[t].jd - a) * Je > i && (i = e[t - 1].leapSeconds), a + i * nt;
1696
1696
  }
1697
1697
  function or(a) {
1698
- let e = Wn, t = Rt(e, a, function(r, s) {
1698
+ let e = qn, t = Rt(e, a, function(r, s) {
1699
1699
  return r - s.jd;
1700
1700
  });
1701
1701
  if (t < 0 && (t = ~t), t >= e.length) return a - e[t - 1].leapSeconds * nt;
@@ -1726,11 +1726,11 @@ function Ts(a, e) {
1726
1726
  function re(a, e) {
1727
1727
  return { jd: a, leapSeconds: e };
1728
1728
  }
1729
- const Wn = [re(24413175e-1, 10), re(24414995e-1, 11), re(24416835e-1, 12), re(24420485e-1, 13), re(24424135e-1, 14), re(24427785e-1, 15), re(24431445e-1, 16), re(24435095e-1, 17), re(24438745e-1, 18), re(24442395e-1, 19), re(24447865e-1, 20), re(24451515e-1, 21), re(24455165e-1, 22), re(24462475e-1, 23), re(24471615e-1, 24), re(24478925e-1, 25), re(24482575e-1, 26), re(24488045e-1, 27), re(24491695e-1, 28), re(24495345e-1, 29), re(24500835e-1, 30), re(24506305e-1, 31), re(24511795e-1, 32), re(24537365e-1, 33), re(24548325e-1, 34), re(24561095e-1, 35), re(24572045e-1, 36)], _l = Mr(Ki);
1729
+ const qn = [re(24413175e-1, 10), re(24414995e-1, 11), re(24416835e-1, 12), re(24420485e-1, 13), re(24424135e-1, 14), re(24427785e-1, 15), re(24431445e-1, 16), re(24435095e-1, 17), re(24438745e-1, 18), re(24442395e-1, 19), re(24447865e-1, 20), re(24451515e-1, 21), re(24455165e-1, 22), re(24462475e-1, 23), re(24471615e-1, 24), re(24478925e-1, 25), re(24482575e-1, 26), re(24488045e-1, 27), re(24491695e-1, 28), re(24495345e-1, 29), re(24500835e-1, 30), re(24506305e-1, 31), re(24511795e-1, 32), re(24537365e-1, 33), re(24548325e-1, 34), re(24561095e-1, 35), re(24572045e-1, 36)], _l = Mr(Qi);
1730
1730
  Object.freeze(Object.defineProperty({ __proto__: null, DAYS_PER_JULIAN_CENTURY: 36525, DAYS_PER_JULIAN_YEAR: 365.25, DateToTAI: function(a) {
1731
- return Mr(Qi(a));
1732
- }, DateToUTC: Qi, HOURS_PER_DAY: 24, J2000: Ki, J2000TAI: _l, MILLISECONDS_PER_DAY: ul, MILLISECONDS_PER_SECOND: Ni, MINUTES_PER_DAY: Hi, MINUTES_PER_HOUR: 60, MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1, ONE_BY_HOURS_PER_DAY: Cs, ONE_BY_MILLISECONDS_PER_DAY: ts, ONE_BY_MINUTES_PER_DAY: dl, ONE_BY_SECONDS_PER_DAY: nt, ONE_BY_SECONDS_PER_HOUR: Rr, ONE_BY_SECONDS_PER_MINUTE: Sr, PICOSECOND: 1e-9, SECONDS_PER_12_HOURS: es, SECONDS_PER_DAY: Je, SECONDS_PER_HOUR: yi, SECONDS_PER_MILLISECOND: 1e-3, SECONDS_PER_MINUTE: 60, T: function(a) {
1733
- return (a - Ki) / 36525;
1731
+ return Mr(Ki(a));
1732
+ }, DateToUTC: Ki, HOURS_PER_DAY: 24, J2000: Qi, J2000TAI: _l, MILLISECONDS_PER_DAY: ul, MILLISECONDS_PER_SECOND: Ni, MINUTES_PER_DAY: Hi, MINUTES_PER_HOUR: 60, MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1, ONE_BY_HOURS_PER_DAY: Cs, ONE_BY_MILLISECONDS_PER_DAY: ts, ONE_BY_MINUTES_PER_DAY: dl, ONE_BY_SECONDS_PER_DAY: nt, ONE_BY_SECONDS_PER_HOUR: Rr, ONE_BY_SECONDS_PER_MINUTE: Sr, PICOSECOND: 1e-9, SECONDS_PER_12_HOURS: es, SECONDS_PER_DAY: Je, SECONDS_PER_HOUR: yi, SECONDS_PER_MILLISECOND: 1e-3, SECONDS_PER_MINUTE: 60, T: function(a) {
1733
+ return (a - Qi) / 36525;
1734
1734
  }, TAItoDate: function(a) {
1735
1735
  let e = or(a);
1736
1736
  return e || (e = or(Ts(a, -1)), console.trace(`TAItoDate - can't convert ${a.toString()} to utc.`)), Br(e);
@@ -1759,7 +1759,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, DAYS_PER_JULIAN_CENTURY:
1759
1759
  }, secondsToDays: function(a) {
1760
1760
  return a * nt;
1761
1761
  } }, Symbol.toStringTag, { value: "Module" }));
1762
- class qn {
1762
+ class Wn {
1763
1763
  constructor(e) {
1764
1764
  this.vertices = [new v(), new v(), new v(), new v(), new v(), new v(), new v(), new v()], e && this.setFromBoundsArr(e);
1765
1765
  }
@@ -1786,8 +1786,8 @@ class He {
1786
1786
  this.setFromBounds(t.getCartesianBounds(e));
1787
1787
  }
1788
1788
  }
1789
- Object.freeze(Object.defineProperty({ __proto__: null, Box: qn, Sphere: He }, Symbol.toStringTag, { value: "Module" }));
1790
- function ge(a, e) {
1789
+ Object.freeze(Object.defineProperty({ __proto__: null, Box: Wn, Sphere: He }, Symbol.toStringTag, { value: "Module" }));
1790
+ function de(a, e) {
1791
1791
  return new is(a, e);
1792
1792
  }
1793
1793
  const $n = class Xn {
@@ -1805,13 +1805,13 @@ const $n = class Xn {
1805
1805
  return `${e}_${t}_${i}`;
1806
1806
  }
1807
1807
  _stamp(e, t) {
1808
- let i = qr(t), r = this._getStamp(e, this.__id, i);
1808
+ let i = Wr(t), r = this._getStamp(e, this.__id, i);
1809
1809
  return !this._stampCache[r] && (this._stampCache[r] = i, !0);
1810
1810
  }
1811
1811
  on(e, t, i, r = 0) {
1812
1812
  if (this._stamp(e, t) && this[e]) {
1813
1813
  let s = t.bind(i || this._sender);
1814
- s._openglobus_id = t._openglobus_id, s._openglobus_priority = r, Kr(this[e].handlers, s, (n, o) => (o._openglobus_priority || 0) - (n._openglobus_priority || 0));
1814
+ s._openglobus_id = t._openglobus_id, s._openglobus_priority = r, Qr(this[e].handlers, s, (n, o) => (o._openglobus_priority || 0) - (n._openglobus_priority || 0));
1815
1815
  }
1816
1816
  }
1817
1817
  off(e, t) {
@@ -1850,7 +1850,7 @@ $n.__counter__ = 0;
1850
1850
  let is = $n;
1851
1851
  const fl = ["render"], Zn = class Ze {
1852
1852
  constructor(e = {}) {
1853
- this.__id = Ze.__counter__++, this.events = ge(fl), this.model = e.model || null, this.template = e.template || "", this.parent = e.parent || null, this._classList = e.classList || [], this.el = null, e.initRender && this.render();
1853
+ this.__id = Ze.__counter__++, this.events = de(fl), this.model = e.model || null, this.template = e.template || "", this.parent = e.parent || null, this._classList = e.classList || [], this.el = null, e.initRender && this.render();
1854
1854
  }
1855
1855
  on(e, t, i, r) {
1856
1856
  this.events.on(e, t, i, r);
@@ -1959,9 +1959,9 @@ class ct extends Ce {
1959
1959
  this.el && this.el.removeEventListener("click", this._onMouseClick);
1960
1960
  }
1961
1961
  }
1962
- const Kn = class Qn {
1962
+ const Qn = class Kn {
1963
1963
  constructor(e = {}) {
1964
- this.__id = Qn.__counter__++, this._name = e.name || `_control_${this.__id.toString()}`, this.planet = null, this._initialized = !1, this.renderer = null, this.autoActivate = e.autoActivate || !1, this._active = !1, this._deferredActive = !0;
1964
+ this.__id = Kn.__counter__++, this._name = e.name || `_control_${this.__id.toString()}`, this.planet = null, this._initialized = !1, this.renderer = null, this.autoActivate = e.autoActivate || !1, this._active = !1, this._deferredActive = !0;
1965
1965
  }
1966
1966
  get name() {
1967
1967
  return this._name;
@@ -1999,8 +1999,8 @@ const Kn = class Qn {
1999
1999
  return e.__id === this.__id;
2000
2000
  }
2001
2001
  };
2002
- Kn.__counter__ = 0;
2003
- let J = Kn;
2002
+ Qn.__counter__ = 0;
2003
+ let J = Qn;
2004
2004
  class Jn extends J {
2005
2005
  constructor(e = {}) {
2006
2006
  super(e), this._heading = 0, this._svg = null;
@@ -2184,7 +2184,7 @@ const pl = `<svg className="svg-icon" style="width: 1em; height: 1em;vertical-al
2184
2184
  eo.__zIndex__ = 0;
2185
2185
  let st = eo;
2186
2186
  const vl = ["change"];
2187
- class _e extends ct {
2187
+ class fe extends ct {
2188
2188
  constructor(e) {
2189
2189
  super({ ...e }), this._onMouseClick = (t) => {
2190
2190
  this.preventClick || (this._mouseClickHandler(t), this.setActive(!this.isActive));
@@ -2229,7 +2229,7 @@ class io {
2229
2229
  }
2230
2230
  const ro = class so {
2231
2231
  constructor(e, t = {}) {
2232
- if (this.isVector = !1, this.__id = so.__counter__++, this._iconSrc = t.iconSrc || null, this.events = ge(no, this), this.name = e || "noname", this.properties = t.properties || {}, this.hideInLayerSwitcher = t.hideInLayerSwitcher || !1, this._hasImageryTiles = !0, this._opacity = t.opacity != null ? t.opacity : 1, this.minZoom = t.minZoom || 0, this.maxZoom = t.maxZoom != null ? t.maxZoom : 50, this._planet = null, this.isVector = !1, this._attribution = t.attribution || "", this._zIndex = t.zIndex || 0, this._isBaseLayer = t.isBaseLayer || !1, this._defaultTextures = t.defaultTextures || [null, null], this._visibility = t.visibility === void 0 || t.visibility, this._fading = t.fading || !1, this._fadingFactor = this._opacity / 30, this._fading ? this._fadingOpacity = 0 : this._fadingOpacity = this._opacity, this._height = t.height || 0, this._extent = new G(), this.createTexture = null, this._textureFilter = t.textureFilter ? t.textureFilter.trim().toUpperCase() : "MIPMAP", this._isSRGB = t.isSRGB != null && t.isSRGB, this._internalFormat = null, this._extentMerc = new G(), this.setExtent(Xr(t.extent, new G(new A(-180, -90), new A(180, 90)))), this._pickingColor = new v(), this._pickingEnabled = t.pickingEnabled === void 0 || t.pickingEnabled, this._isPreloadDone = !1, this._preLoadZoomLevels = t.preLoadZoomLevels || [0, 1], this._ambient = null, this._diffuse = null, this._specular = null, t.ambient) {
2232
+ if (this.isVector = !1, this.__id = so.__counter__++, this._iconSrc = t.iconSrc || null, this.events = de(no, this), this.name = e || "noname", this.properties = t.properties || {}, this.hideInLayerSwitcher = t.hideInLayerSwitcher || !1, this._hasImageryTiles = !0, this._opacity = t.opacity != null ? t.opacity : 1, this.minZoom = t.minZoom || 0, this.maxZoom = t.maxZoom != null ? t.maxZoom : 50, this._planet = null, this.isVector = !1, this._attribution = t.attribution || "", this._zIndex = t.zIndex || 0, this._isBaseLayer = t.isBaseLayer || !1, this._defaultTextures = t.defaultTextures || [null, null], this._visibility = t.visibility === void 0 || t.visibility, this._fading = t.fading || !1, this._fadingFactor = this._opacity / 30, this._fading ? this._fadingOpacity = 0 : this._fadingOpacity = this._opacity, this._height = t.height || 0, this._extent = new G(), this.createTexture = null, this._textureFilter = t.textureFilter ? t.textureFilter.trim().toUpperCase() : "MIPMAP", this._isSRGB = t.isSRGB != null && t.isSRGB, this._internalFormat = null, this._extentMerc = new G(), this.setExtent(Xr(t.extent, new G(new A(-180, -90), new A(180, 90)))), this._pickingColor = new v(), this._pickingEnabled = t.pickingEnabled === void 0 || t.pickingEnabled, this._isPreloadDone = !1, this._preLoadZoomLevels = t.preLoadZoomLevels || [0, 1], this._ambient = null, this._diffuse = null, this._specular = null, t.ambient) {
2233
2233
  let i = Ye(t.ambient, new v(0.2, 0.2, 0.2));
2234
2234
  this._ambient = new Float32Array([i.x, i.y, i.z]);
2235
2235
  }
@@ -2392,7 +2392,7 @@ const ro = class so {
2392
2392
  }
2393
2393
  setExtent(e) {
2394
2394
  let t = e.southWest.clone(), i = e.northEast.clone();
2395
- t.lat < Ve && (t.lat = Ve), i.lat > ue && (i.lat = ue), this._extent = e.clone(), this._extentMerc = new G(t.forwardMercator(), i.forwardMercator()), this._correctFullExtent();
2395
+ t.lat < Ve && (t.lat = Ve), i.lat > _e && (i.lat = _e), this._extent = e.clone(), this._extentMerc = new G(t.forwardMercator(), i.forwardMercator()), this._correctFullExtent();
2396
2396
  }
2397
2397
  getExtent() {
2398
2398
  return this._extent;
@@ -2552,7 +2552,7 @@ class ao {
2552
2552
  }
2553
2553
  this.events.dispatch(this.events.change, i);
2554
2554
  }
2555
- }, this.events = ge(wl), this._buttons = e.buttons || [];
2555
+ }, this.events = de(wl), this._buttons = e.buttons || [];
2556
2556
  for (let t = 0; t < this._buttons.length; t++) this._bindButton(this._buttons[t]);
2557
2557
  }
2558
2558
  _bindButton(e) {
@@ -2643,7 +2643,7 @@ class Tl extends rs {
2643
2643
  }
2644
2644
  const ho = class co {
2645
2645
  constructor(e = {}) {
2646
- this.__id = co.__counter__++, this._position = qe(e.position), this._positionHigh = new v(), this._positionLow = new v(), v.doubleToTwoFloats(this._position, this._positionHigh, this._positionLow), this._rotation = e.rotation || 0, this._color = lt(e.color), this._alignedAxis = qe(e.alignedAxis), this._offset = qe(e.offset), this._visibility = e.visibility == null || e.visibility, this._entity = null, this._handler = null, this._handlerIndex = -1, this._isReady = !1, this._lockId = -1;
2646
+ this.__id = co.__counter__++, this._position = We(e.position), this._positionHigh = new v(), this._positionLow = new v(), v.doubleToTwoFloats(this._position, this._positionHigh, this._positionLow), this._rotation = e.rotation || 0, this._color = lt(e.color), this._alignedAxis = We(e.alignedAxis), this._offset = We(e.offset), this._visibility = e.visibility == null || e.visibility, this._entity = null, this._handler = null, this._handlerIndex = -1, this._isReady = !1, this._lockId = -1;
2647
2647
  }
2648
2648
  setPosition(e, t, i) {
2649
2649
  this._position.x = e, this._position.y = t, this._position.z = i, v.doubleToTwoFloats(this._position, this._positionHigh, this._positionLow), this._isReady && this._handler ? this._handler.setPositionArr(this._handlerIndex, this._positionHigh, this._positionLow) : this._lockId !== -1 && (this._lockId = -2);
@@ -2885,7 +2885,7 @@ const El = { POINT: 1, LINESTRING: 2, POLYGON: 3, MULTIPOLYGON: 4, MULTILINESTRI
2885
2885
  };
2886
2886
  fo.__counter__ = 0;
2887
2887
  let go = fo;
2888
- class Ke {
2888
+ class Qe {
2889
2889
  constructor(e, t) {
2890
2890
  this.p0 = e || new v(), this.p1 = t || new v();
2891
2891
  }
@@ -3339,7 +3339,7 @@ class Z {
3339
3339
  const Al = new v(0, 0, -1), po = class mo {
3340
3340
  constructor(e) {
3341
3341
  var t, i;
3342
- this._handlerIndex = -1, this._tag = e.tag || "tag_" + mo.__counter__++, this._entity = null, this._position = qe(e.position), this._rtcPositionHigh = new v(), this._rtcPositionLow = new v(), this._scale = qe(e.scale, new v(1, 1, 1)), this._translate = qe(e.translate, new v()), this._localPosition = new v(), this._color = lt(e.color, (t = e.object3d) != null && t.color ? new te(...Array.from(e.object3d.color)) : new te(0.15, 0.15, 0.15, 1)), this._handler = null, this._handlerIndex = -1, this._tagData = null, this._tagDataIndex = -1;
3342
+ this._handlerIndex = -1, this._tag = e.tag || "tag_" + mo.__counter__++, this._entity = null, this._position = We(e.position), this._rtcPositionHigh = new v(), this._rtcPositionLow = new v(), this._scale = We(e.scale, new v(1, 1, 1)), this._translate = We(e.translate, new v()), this._localPosition = new v(), this._color = lt(e.color, (t = e.object3d) != null && t.color ? new te(...Array.from(e.object3d.color)) : new te(0.15, 0.15, 0.15, 1)), this._handler = null, this._handlerIndex = -1, this._tagData = null, this._tagDataIndex = -1;
3343
3343
  let r = e.object3d;
3344
3344
  e.object3d && ((i = e.object3d) == null ? void 0 : i.vertices.length) !== 0 || (r = new Z()), e.objSrc && (this.setObjectSrc(e.objSrc), this._objectSrc = e.objSrc), this._object3d = r, this._visibility = e.visibility == null || e.visibility, this._children = [], this._direction = new v(), this._qFrame = new F(), this._qRot = F.IDENTITY;
3345
3345
  }
@@ -3626,7 +3626,7 @@ let Ll = xo;
3626
3626
  const wo = class Ir {
3627
3627
  constructor(e = {}) {
3628
3628
  this.__id = Ir.__counter__++, this.__doubleToTwoFloats = v.doubleToTwoFloats, this.altitude = e.altitude || 0, this.thickness = e.thickness || 1.5, this._opacity = e.opacity != null ? e.opacity : 1, this._defaultColor = mt(e.color || "#0000FF", e.opacity), this.visibility = e.visibility == null || e.visibility, this._closedLine = e.isClosed || !1, this._path3v = [], this._pathLengths = [], this._pathLonLat = [], this._pathLonLatMerc = [], this._pathColors = e.pathColors ? Jr(e.pathColors) : [], this._extent = new G(), this._verticesHigh = [], this._verticesLow = [], this._orders = [], this._indexes = [], this._colors = [], this._verticesHighBuffer = null, this._verticesLowBuffer = null, this._ordersBuffer = null, this._indexesBuffer = null, this._colorsBuffer = null, this._pickingColor = [0, 0, 0], this._renderNode = null, this._entity = null, this._handler = null, this._handlerIndex = -1, this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[0] = this._createVerticesBuffer, this._buffersUpdateCallbacks[1] = this._createIndexBuffer, this._buffersUpdateCallbacks[2] = this._createColorsBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
3629
- let t = qe(e.visibleSpherePosition).toArray(), i = e.visibleSphereRadius || 0;
3629
+ let t = We(e.visibleSpherePosition).toArray(), i = e.visibleSphereRadius || 0;
3630
3630
  this._visibleSphere = new Float32Array([...t, i]), e.pathLonLat ? this.setPathLonLat(e.pathLonLat) : e.path3v && this.setPath3v(e.path3v), this._refresh();
3631
3631
  }
3632
3632
  __appendLineData3v(e, t, i, r, s, n, o, l, h, c, d, u, g, f) {
@@ -4031,7 +4031,7 @@ wo.__counter__ = 0;
4031
4031
  let Co = wo;
4032
4032
  const To = class Eo {
4033
4033
  constructor(e = {}) {
4034
- this.__id = Eo.__counter__++, this._thickness = e.thickness || 2, this._startPosition = qe(e.startPosition), this._startPositionHigh = new v(), this._startPositionLow = new v(), v.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow), this._endPosition = qe(e.endPosition), this._endPositionHigh = new v(), this._endPositionLow = new v(), v.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow), this._startColor = lt(e.startColor), this._endColor = lt(e.endColor), this._visibility = e.visibility == null || e.visibility, this._entity = null, this._handler = null, this._handlerIndex = -1;
4034
+ this.__id = Eo.__counter__++, this._thickness = e.thickness || 2, this._startPosition = We(e.startPosition), this._startPositionHigh = new v(), this._startPositionLow = new v(), v.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow), this._endPosition = We(e.endPosition), this._endPositionHigh = new v(), this._endPositionLow = new v(), v.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow), this._startColor = lt(e.startColor), this._endColor = lt(e.endColor), this._visibility = e.visibility == null || e.visibility, this._entity = null, this._handler = null, this._handlerIndex = -1;
4035
4035
  }
4036
4036
  setStartPosition(e, t, i) {
4037
4037
  this._startPosition.x = e, this._startPosition.y = t, this._startPosition.z = i, v.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow), this._handler && this._handler.setStartPositionArr(this._handlerIndex, this._startPositionHigh, this._startPositionLow);
@@ -4152,7 +4152,7 @@ const Ao = class Lo {
4152
4152
  let p = f / l, _ = r.lerp(e, p), m = s.lerp(t, p);
4153
4153
  for (let y = 0; y < h; y++) {
4154
4154
  let x = y / l, w = r.lerp(s, x), b = e.lerp(t, x);
4155
- g !== 1 ? new Ke(_, m).intersects(new Ke(w, b), c) : c = b, u = d + f * h + y, v.doubleToTwoFloats(c, pe, me);
4155
+ g !== 1 ? new Qe(_, m).intersects(new Qe(w, b), c) : c = b, u = d + f * h + y, v.doubleToTwoFloats(c, pe, me);
4156
4156
  let E = 3 * u;
4157
4157
  n[E] = pe.x, n[E + 1] = pe.y, n[E + 2] = pe.z, o[E] = me.x, o[E + 1] = me.y, o[E + 2] = me.z, f < l && this._indexes.push(u, u + h);
4158
4158
  }
@@ -4171,7 +4171,7 @@ const Ao = class Lo {
4171
4171
  let _ = p / r, m = c.lerp(e, _), y = d.lerp(t, _);
4172
4172
  for (let x = 0; x < s; x++) {
4173
4173
  let w = x / r, b = c.lerp(d, w), E = e.lerp(t, w);
4174
- f !== 1 ? new Ke(m, y).intersects(new Ke(b, E), o) : o = E, g = u + p * s + x, v.doubleToTwoFloats(o, pe, me);
4174
+ f !== 1 ? new Qe(m, y).intersects(new Qe(b, E), o) : o = E, g = u + p * s + x, v.doubleToTwoFloats(o, pe, me);
4175
4175
  let C = 3 * g;
4176
4176
  l[C] = pe.x, l[C + 1] = pe.y, l[C + 2] = pe.z, h[C] = me.x, h[C + 1] = me.y, h[C + 2] = me.z;
4177
4177
  }
@@ -4183,7 +4183,7 @@ const Ao = class Lo {
4183
4183
  let f = g / r, p = d.lerp(e, f), _ = u.lerp(t, f);
4184
4184
  for (let m = 0; m < s; m++) {
4185
4185
  let y = m / r, x = d.lerp(u, y), w = e.lerp(t, y);
4186
- new Ke(p, _).intersects(new Ke(x, w), o), c = g * s + m, v.doubleToTwoFloats(o, pe, me);
4186
+ new Qe(p, _).intersects(new Qe(x, w), o), c = g * s + m, v.doubleToTwoFloats(o, pe, me);
4187
4187
  let b = 3 * c;
4188
4188
  l[b] = pe.x, l[b + 1] = pe.y, l[b + 2] = pe.z, h[b] = me.x, h[b + 1] = me.y, h[b + 2] = me.z;
4189
4189
  }
@@ -4194,13 +4194,13 @@ const Ao = class Lo {
4194
4194
  let y = m / r, x = c.lerp(e, y), w = t.lerp(g, y), b = e.lerp(u, y), E = d.lerp(t, y);
4195
4195
  for (let C = 0; C < s; C++) {
4196
4196
  let T = C / r, L = c.lerp(d, T), S = e.lerp(t, T);
4197
- new Ke(x, E).intersects(new Ke(L, S), o);
4197
+ new Qe(x, E).intersects(new Qe(L, S), o);
4198
4198
  let R = m * s + C;
4199
4199
  _ = p + R, v.doubleToTwoFloats(o, pe, me);
4200
4200
  let I = 3 * _;
4201
4201
  l[I] = pe.x, l[I + 1] = pe.y, l[I + 2] = pe.z, h[I] = me.x, h[I + 1] = me.y, h[I + 2] = me.z;
4202
4202
  let D = u.lerp(g, T);
4203
- S = e.lerp(t, T), new Ke(b, w).intersects(new Ke(S, D), o), _ = f + R, v.doubleToTwoFloats(o, pe, me), I = 3 * _, l[I] = pe.x, l[I + 1] = pe.y, l[I + 2] = pe.z, h[I] = me.x, h[I + 1] = me.y, h[I + 2] = me.z;
4203
+ S = e.lerp(t, T), new Qe(b, w).intersects(new Qe(S, D), o), _ = f + R, v.doubleToTwoFloats(o, pe, me), I = 3 * _, l[I] = pe.x, l[I + 1] = pe.y, l[I + 2] = pe.z, h[I] = me.x, h[I + 1] = me.y, h[I + 2] = me.z;
4204
4204
  }
4205
4205
  }
4206
4206
  }
@@ -4236,7 +4236,7 @@ Ao.__counter__ = 0;
4236
4236
  let Po = Ao;
4237
4237
  const So = class Ro {
4238
4238
  constructor(e = {}) {
4239
- e.properties = e.properties || {}, this.__id = Ro.__counter__++, this.properties = e.properties || {}, this.properties.name = this.properties.name != null ? this.properties.name : "", this.childEntities = [], this.parent = null, this.forceGlobalPosition = e.forceGlobalPosition || !1, this.forceGlobalRotation = e.forceGlobalRotation || !1, this.forceGlobalScale = e.forceGlobalScale || !1, this._cartesian = qe(e.cartesian), this._rootCartesian = new v(), this._localPosition = qe(e.localPosition), this._absoluteLocalPosition = new v(), this._lonLat = Zi(e.lonlat), this._lonLatMerc = new A(), this._altitude = e.altitude || 0, this._visibility = e.visibility == null || e.visibility, this._entityCollection = null, this._entityCollectionIndex = -1, this._layer = null, this._layerIndex = -1, this._pickingColor = new v(0, 0, 0), this._independentPicking = e.independentPicking || !1, this._relativePosition = e.relativePosition || !1, this._pitchRad = e.pitch || 0, this._yawRad = e.yaw || 0, this._rollRad = e.roll || 0, this._scale = qe(e.scale, new v(1, 1, 1)), this._absoluteScale = new v(), this._qFrame = F.IDENTITY, this._qRot = F.IDENTITY, this._absoluteQRot = F.IDENTITY, this._featureConstructorArray = { billboard: [_o, this.setBillboard], label: [yo, this.setLabel], polyline: [Co, this.setPolyline], pointCloud: [Ll, this.setPointCloud], geometry: [go, this.setGeometry], geoObject: [vo, this.setGeoObject], strip: [Po, this.setStrip], ray: [Pl, this.setRay] }, this.billboard = this._createOptionFeature("billboard", e.billboard), this.label = this._createOptionFeature("label", e.label), this.polyline = this._createOptionFeature("polyline", e.polyline), this.ray = this._createOptionFeature("ray", e.ray), this.pointCloud = this._createOptionFeature("pointCloud", e.pointCloud), this.geometry = this._createOptionFeature("geometry", e.geometry), this.geoObject = this._createOptionFeature("geoObject", e.geoObject), this.strip = this._createOptionFeature("strip", e.strip);
4239
+ e.properties = e.properties || {}, this.__id = Ro.__counter__++, this.properties = e.properties || {}, this.properties.name = this.properties.name != null ? this.properties.name : "", this.childEntities = [], this.parent = null, this.forceGlobalPosition = e.forceGlobalPosition || !1, this.forceGlobalRotation = e.forceGlobalRotation || !1, this.forceGlobalScale = e.forceGlobalScale || !1, this._cartesian = We(e.cartesian), this._rootCartesian = new v(), this._localPosition = We(e.localPosition), this._absoluteLocalPosition = new v(), this._lonLat = Zi(e.lonlat), this._lonLatMerc = new A(), this._altitude = e.altitude || 0, this._visibility = e.visibility == null || e.visibility, this._entityCollection = null, this._entityCollectionIndex = -1, this._layer = null, this._layerIndex = -1, this._pickingColor = new v(0, 0, 0), this._independentPicking = e.independentPicking || !1, this._relativePosition = e.relativePosition || !1, this._pitchRad = e.pitch || 0, this._yawRad = e.yaw || 0, this._rollRad = e.roll || 0, this._scale = We(e.scale, new v(1, 1, 1)), this._absoluteScale = new v(), this._qFrame = F.IDENTITY, this._qRot = F.IDENTITY, this._absoluteQRot = F.IDENTITY, this._useDirectQuaternion = !1, this._featureConstructorArray = { billboard: [_o, this.setBillboard], label: [yo, this.setLabel], polyline: [Co, this.setPolyline], pointCloud: [Ll, this.setPointCloud], geometry: [go, this.setGeometry], geoObject: [vo, this.setGeoObject], strip: [Po, this.setStrip], ray: [Pl, this.setRay] }, this.billboard = this._createOptionFeature("billboard", e.billboard), this.label = this._createOptionFeature("label", e.label), this.polyline = this._createOptionFeature("polyline", e.polyline), this.ray = this._createOptionFeature("ray", e.ray), this.pointCloud = this._createOptionFeature("pointCloud", e.pointCloud), this.geometry = this._createOptionFeature("geometry", e.geometry), this.geoObject = this._createOptionFeature("geoObject", e.geoObject), this.strip = this._createOptionFeature("strip", e.strip);
4240
4240
  }
4241
4241
  get isEmpty() {
4242
4242
  return !(this.strip || this.polyline || this.ray || this.geoObject || this.geometry || this.billboard || this.label || this.pointCloud);
@@ -4336,16 +4336,19 @@ const So = class Ro {
4336
4336
  this._absoluteQRot.copy(e), this._updatePitchYawRoll();
4337
4337
  }
4338
4338
  setRotation(e) {
4339
- this._pitchRad = e.getPitch(), this._yawRad = e.getYaw(), this._rollRad = e.getRoll(), this._updateAbsolutePosition();
4339
+ this._useDirectQuaternion = !1, this._pitchRad = e.getPitch(), this._yawRad = e.getYaw(), this._rollRad = e.getRoll(), this._updateAbsolutePosition();
4340
+ }
4341
+ setDirectQuaternionRotation(e) {
4342
+ this._qRot.copy(e), this._useDirectQuaternion = !0, this._pitchRad = this._qRot.getPitch(), this._yawRad = this._qRot.getYaw(), this._rollRad = this._qRot.getRoll(), this._updateAbsolutePosition();
4340
4343
  }
4341
4344
  setPitch(e) {
4342
- this._pitchRad = e, this._updateAbsolutePosition();
4345
+ this._useDirectQuaternion = !1, this._pitchRad = e, this._updateAbsolutePosition();
4343
4346
  }
4344
4347
  setYaw(e) {
4345
- this._yawRad = e, this._updateAbsolutePosition();
4348
+ this._useDirectQuaternion = !1, this._yawRad = e, this._updateAbsolutePosition();
4346
4349
  }
4347
4350
  setRoll(e) {
4348
- this._rollRad = e, this._updateAbsolutePosition();
4351
+ this._useDirectQuaternion = !1, this._rollRad = e, this._updateAbsolutePosition();
4349
4352
  }
4350
4353
  getPitch() {
4351
4354
  return this._pitchRad;
@@ -4417,10 +4420,10 @@ const So = class Ro {
4417
4420
  _updateAbsolutePosition() {
4418
4421
  let e = this.parent;
4419
4422
  if (e && this._relativePosition) {
4420
- this._scale.mulRes(e._absoluteScale, this._absoluteScale), this._qFrame.copy(e._qFrame), this._rootCartesian.copy(e._rootCartesian), this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad), e._absoluteQRot.mulRes(this._qRot, this._absoluteQRot);
4423
+ this._scale.mulRes(e._absoluteScale, this._absoluteScale), this._qFrame.copy(e._qFrame), this._rootCartesian.copy(e._rootCartesian), this._useDirectQuaternion || this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad), e._absoluteQRot.mulRes(this._qRot, this._absoluteQRot);
4421
4424
  let t = e._absoluteQRot.mulVec3(this._cartesian.add(this._localPosition)).mulA(e._absoluteScale);
4422
4425
  e._absoluteLocalPosition.addRes(t, this._absoluteLocalPosition);
4423
- } else this._qFrame = F.IDENTITY, this._entityCollection && this._entityCollection.renderNode && (this._qFrame = this._entityCollection.renderNode.getFrameRotation(this._cartesian)), e && this.forceGlobalRotation ? this._qRot.setPitchYawRoll(e._pitchRad, e._yawRad, e._rollRad, this._qFrame) : this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad, this._qFrame), this._absoluteScale.copy(this._scale), this._absoluteQRot.copy(this._qRot), this._rootCartesian.copy(this._cartesian), this._absoluteLocalPosition.copy(this._localPosition);
4426
+ } else this._qFrame = F.IDENTITY, this._entityCollection && this._entityCollection.renderNode && (this._qFrame = this._entityCollection.renderNode.getFrameRotation(this._cartesian)), this._useDirectQuaternion ? this._qFrame.isEqual(F.IDENTITY) || (this._qRot = this._qRot.mul(this._qFrame)) : e && this.forceGlobalRotation ? this._qRot.setPitchYawRoll(e._pitchRad, e._yawRad, e._rollRad, this._qFrame) : this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad, this._qFrame), this._absoluteScale.copy(this._scale), this._absoluteQRot.copy(this._qRot), this._rootCartesian.copy(this._cartesian), this._absoluteLocalPosition.copy(this._localPosition);
4424
4427
  this.geoObject && (this.geoObject.setScale3v(this._absoluteScale), this.geoObject.setRotation(this._absoluteQRot), this.geoObject.setPosition3v(this._rootCartesian), this.geoObject.setLocalPosition3v(this._absoluteLocalPosition)), this.billboard && this.billboard.setPosition3v(this._rootCartesian), this.label && this.label.setPosition3v(this._rootCartesian);
4425
4428
  for (let t = 0, i = this.childEntities.length; t < i; t++) this.childEntities[t]._updateAbsolutePosition();
4426
4429
  this._updateLonLat();
@@ -4432,7 +4435,7 @@ const So = class Ro {
4432
4435
  }
4433
4436
  _updateLonLat() {
4434
4437
  let e = this._entityCollection;
4435
- e && e.renderNode && e.renderNode.ellipsoid && (this._lonLat = e.renderNode.ellipsoid.cartesianToLonLat(this.getAbsoluteCartesian()), Math.abs(this._lonLat.lat) < ue ? this._lonLatMerc = this._lonLat.forwardMercator() : this._lonLatMerc.lon = this._lonLatMerc.lat = 0);
4438
+ e && e.renderNode && e.renderNode.ellipsoid && (this._lonLat = e.renderNode.ellipsoid.cartesianToLonLat(this.getAbsoluteCartesian()), Math.abs(this._lonLat.lat) < _e ? this._lonLatMerc = this._lonLat.forwardMercator() : this._lonLatMerc.lon = this._lonLatMerc.lat = 0);
4436
4439
  }
4437
4440
  getLonLat() {
4438
4441
  return this._lonLat.clone();
@@ -4442,7 +4445,7 @@ const So = class Ro {
4442
4445
  t.lon = e.lon, t.lat = e.lat, t.height = e.height;
4443
4446
  let i = this._entityCollection;
4444
4447
  if (i && i.renderNode && i.renderNode.ellipsoid) {
4445
- Math.abs(t.lat) < ue && (this._lonLatMerc = t.forwardMercator());
4448
+ Math.abs(t.lat) < _e && (this._lonLatMerc = t.forwardMercator());
4446
4449
  let r = new v();
4447
4450
  i.renderNode.ellipsoid.lonLatToCartesianRes(t, r), this.setAbsoluteCartesian3v(r);
4448
4451
  }
@@ -4452,7 +4455,7 @@ const So = class Ro {
4452
4455
  r.lon = e, r.lat = t, r.height = i ?? r.height;
4453
4456
  let s = this._entityCollection;
4454
4457
  if (s && s.renderNode && s.renderNode.ellipsoid) {
4455
- Math.abs(r.lat) < ue ? this._lonLatMerc = r.forwardMercator() : this._lonLatMerc.lon = this._lonLatMerc.lat = this._lonLatMerc.height = 0;
4458
+ Math.abs(r.lat) < _e ? this._lonLatMerc = r.forwardMercator() : this._lonLatMerc.lon = this._lonLatMerc.lat = this._lonLatMerc.height = 0;
4456
4459
  let n = new v();
4457
4460
  s.renderNode.ellipsoid.lonLatToCartesianRes(r, n), this.setAbsoluteCartesian3v(n);
4458
4461
  }
@@ -4683,44 +4686,44 @@ const et = new class {
4683
4686
  }
4684
4687
  }();
4685
4688
  let fi = ["FLOAT", "DOUBLE", "BOOL", "INT", "UINT", "VEC2", "VEC3", "VEC4", "DVEC2", "DVEC3", "DVEC4", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "UVEC2", "UVEC3", "UVEC4", "MAT2", "DMAT2", "MAT3", "DMAT3", "MAT4", "DMAT4", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X4", "MAT4X2", "MAT4X3", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X4", "DMAT4X2", "DMAT4X3", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", "SAMPLER2DSHADOW", "SAMPLER2DARRAY", "INTXX", "FLOATXX"];
4686
- const de = {};
4687
- for (let a = 0; a < fi.length; a++) de[fi[a]] = a;
4689
+ const ue = {};
4690
+ for (let a = 0; a < fi.length; a++) ue[fi[a]] = a;
4688
4691
  const zr = {};
4689
- for (let a = 0; a < fi.length; a++) zr[fi[a].toLowerCase()] = de[fi[a]];
4692
+ for (let a = 0; a < fi.length; a++) zr[fi[a].toLowerCase()] = ue[fi[a]];
4690
4693
  const Me = { u: [], a: [] };
4691
- Me.u[de.MAT4] = function(a, e) {
4694
+ Me.u[ue.MAT4] = function(a, e) {
4692
4695
  a.gl.uniformMatrix4fv(e._pName, !1, e.value);
4693
- }, Me.u[de.MAT3] = function(a, e) {
4696
+ }, Me.u[ue.MAT3] = function(a, e) {
4694
4697
  a.gl.uniformMatrix3fv(e._pName, !1, e.value);
4695
- }, Me.u[de.FLOAT] = function(a, e) {
4698
+ }, Me.u[ue.FLOAT] = function(a, e) {
4696
4699
  a.gl.uniform1f(e._pName, e.value);
4697
- }, Me.u[de.INT] = function(a, e) {
4700
+ }, Me.u[ue.INT] = function(a, e) {
4698
4701
  a.gl.uniform1i(e._pName, e.value);
4699
- }, Me.u[de.VEC2] = function(a, e) {
4702
+ }, Me.u[ue.VEC2] = function(a, e) {
4700
4703
  a.gl.uniform2fv(e._pName, e.value);
4701
- }, Me.u[de.VEC3] = function(a, e) {
4704
+ }, Me.u[ue.VEC3] = function(a, e) {
4702
4705
  a.gl.uniform3fv(e._pName, e.value);
4703
- }, Me.u[de.VEC4] = function(a, e) {
4706
+ }, Me.u[ue.VEC4] = function(a, e) {
4704
4707
  a.gl.uniform4fv(e._pName, e.value);
4705
- }, Me.u[de.SAMPLER2D] = function(a, e) {
4708
+ }, Me.u[ue.SAMPLER2D] = function(a, e) {
4706
4709
  let t = a.gl;
4707
4710
  t.activeTexture(t.TEXTURE0 + a._textureID), t.bindTexture(t.TEXTURE_2D, e.value), t.uniform1i(e._pName, a._textureID), a._textureID++;
4708
- }, Me.u[de.SAMPLERCUBE] = function(a, e) {
4711
+ }, Me.u[ue.SAMPLERCUBE] = function(a, e) {
4709
4712
  let t = a.gl;
4710
4713
  t.activeTexture(t.TEXTURE0 + a._textureID), t.bindTexture(t.TEXTURE_CUBE_MAP, e.value), t.uniform1i(e._pName, a._textureID), a._textureID++;
4711
- }, Me.u[de.SAMPLER2DARRAY] = function(a, e) {
4714
+ }, Me.u[ue.SAMPLER2DARRAY] = function(a, e) {
4712
4715
  let t = e.value, i = a.gl, r = t.length, s = new Int32Array(r);
4713
4716
  for (let n = 0; n < r; n++) i.activeTexture(i.TEXTURE0 + a._textureID + n), i.bindTexture(i.TEXTURE_2D, t[n]), s[n] = n;
4714
4717
  i.uniform1iv(e._pName, s);
4715
- }, Me.u[de.INTXX] = function(a, e) {
4718
+ }, Me.u[ue.INTXX] = function(a, e) {
4716
4719
  a.gl.uniform1iv(e._pName, e.value);
4717
- }, Me.u[de.FLOATXX] = function(a, e) {
4720
+ }, Me.u[ue.FLOATXX] = function(a, e) {
4718
4721
  a.gl.uniform1fv(e._pName, e.value);
4719
- }, Me.a[de.FLOAT] = function(a, e) {
4722
+ }, Me.a[ue.FLOAT] = function(a, e) {
4720
4723
  a.gl.vertexAttrib1f(e._pName, e.value);
4721
- }, Me.a[de.VEC2] = function(a, e) {
4724
+ }, Me.a[ue.VEC2] = function(a, e) {
4722
4725
  a.gl.vertexAttrib2fv(e._pName, e.value);
4723
- }, Me.a[de.VEC3] = function(a, e) {
4726
+ }, Me.a[ue.VEC3] = function(a, e) {
4724
4727
  a.gl.vertexAttrib3fv(e._pName, e.value);
4725
4728
  };
4726
4729
  const Rl = ["BYTE", "SHORT", "UNSIGNED_BYTE", "UNSIGNED_SHORT", "FLOAT", "HALF_FLOAT"];
@@ -4810,7 +4813,7 @@ class X {
4810
4813
  let o = this._attributes[r].type;
4811
4814
  typeof o == "string" && (o = zr[o.trim().toLowerCase()]);
4812
4815
  let l = this._attributes[r].divisor;
4813
- if (o === de.MAT4) {
4816
+ if (o === ue.MAT4) {
4814
4817
  let h = this._p[r];
4815
4818
  this._attribArrays.push(h, h + 1, h + 2, h + 3), this._attribDivisor.push(l, l, l, l);
4816
4819
  } else this._attribArrays.push(this._p[r]), this._attribDivisor.push(l);
@@ -5021,7 +5024,7 @@ class Ml extends zo {
5021
5024
  }
5022
5025
  class Bl {
5023
5026
  constructor(e) {
5024
- this.isFree = !0, this._geoObjectHandler = e, this.geoObjects = [], this.numInstances = 0, this._colorTexture = null, this._colorTextureSrc = null, this._colorTextureImage = null, this._normalTexture = null, this._normalTextureSrc = null, this._normalTextureImage = null, this._metallicRoughnessTexture = null, this._metallicRoughnessTextureSrc = null, this._metallicRoughnessTextureImage = null, this._sizeArr = [], this._translateArr = [], this._vertexArr = [], this._rtcPositionHighArr = [], this._rtcPositionLowArr = [], this._qRotArr = [], this._rgbaArr = [], this._normalsArr = [], this._indicesArr = [], this._pickingColorArr = [], this._visibleArr = [], this._texCoordArr = [], this._localPositionArr = [], this._sizeBuffer = null, this._translateBuffer = null, this._vertexBuffer = null, this._rtcPositionHighBuffer = null, this._rtcPositionLowBuffer = null, this._qRotBuffer = null, this._rgbaBuffer = null, this._normalsBuffer = null, this._indicesBuffer = null, this._pickingColorBuffer = null, this._visibleBuffer = null, this._texCoordBuffer = null, this._localPositionBuffer = null, this._materialParams = new Float32Array(9), this._materialShininess = 0, this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[Go] = this.createPickingColorBuffer, this._buffersUpdateCallbacks[No] = this.createNormalsBuffer, this._buffersUpdateCallbacks[Oo] = this.createRgbaBuffer, this._buffersUpdateCallbacks[Ho] = this.createIndicesBuffer, this._buffersUpdateCallbacks[Do] = this.createVertexBuffer, this._buffersUpdateCallbacks[Uo] = this.createSizeBuffer, this._buffersUpdateCallbacks[jo] = this.createVisibleBuffer, this._buffersUpdateCallbacks[Yo] = this.createTexCoordBuffer, this._buffersUpdateCallbacks[Vo] = this.createQRotBuffer, this._buffersUpdateCallbacks[Wo] = this.createTranslateBuffer, this._buffersUpdateCallbacks[Fo] = this.createRTCPositionBuffer, this._buffersUpdateCallbacks[qo] = this.createLocalPositionBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
5027
+ this.isFree = !0, this._geoObjectHandler = e, this.geoObjects = [], this.numInstances = 0, this._colorTexture = null, this._colorTextureSrc = null, this._colorTextureImage = null, this._normalTexture = null, this._normalTextureSrc = null, this._normalTextureImage = null, this._metallicRoughnessTexture = null, this._metallicRoughnessTextureSrc = null, this._metallicRoughnessTextureImage = null, this._sizeArr = [], this._translateArr = [], this._vertexArr = [], this._rtcPositionHighArr = [], this._rtcPositionLowArr = [], this._qRotArr = [], this._rgbaArr = [], this._normalsArr = [], this._indicesArr = [], this._pickingColorArr = [], this._visibleArr = [], this._texCoordArr = [], this._localPositionArr = [], this._sizeBuffer = null, this._translateBuffer = null, this._vertexBuffer = null, this._rtcPositionHighBuffer = null, this._rtcPositionLowBuffer = null, this._qRotBuffer = null, this._rgbaBuffer = null, this._normalsBuffer = null, this._indicesBuffer = null, this._pickingColorBuffer = null, this._visibleBuffer = null, this._texCoordBuffer = null, this._localPositionBuffer = null, this._materialParams = new Float32Array(9), this._materialShininess = 0, this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[Go] = this.createPickingColorBuffer, this._buffersUpdateCallbacks[No] = this.createNormalsBuffer, this._buffersUpdateCallbacks[Oo] = this.createRgbaBuffer, this._buffersUpdateCallbacks[Ho] = this.createIndicesBuffer, this._buffersUpdateCallbacks[Do] = this.createVertexBuffer, this._buffersUpdateCallbacks[Uo] = this.createSizeBuffer, this._buffersUpdateCallbacks[jo] = this.createVisibleBuffer, this._buffersUpdateCallbacks[Yo] = this.createTexCoordBuffer, this._buffersUpdateCallbacks[Vo] = this.createQRotBuffer, this._buffersUpdateCallbacks[qo] = this.createTranslateBuffer, this._buffersUpdateCallbacks[Fo] = this.createRTCPositionBuffer, this._buffersUpdateCallbacks[Wo] = this.createLocalPositionBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
5025
5028
  }
5026
5029
  setMaterialAmbient(e, t, i) {
5027
5030
  this._materialParams[0] = e, this._materialParams[1] = t, this._materialParams[2] = i;
@@ -5165,7 +5168,7 @@ class Bl {
5165
5168
  }
5166
5169
  }
5167
5170
  }
5168
- const Do = 0, Fo = 1, Oo = 2, No = 3, Ho = 4, Vo = 5, Uo = 6, Go = 7, jo = 8, Yo = 9, Wo = 10, qo = 11;
5171
+ const Do = 0, Fo = 1, Oo = 2, No = 3, Ho = 4, Vo = 5, Uo = 6, Go = 7, jo = 8, Yo = 9, qo = 10, Wo = 11;
5169
5172
  function Te(a, e = 0, t = 0, i = 1, ...r) {
5170
5173
  const s = e * t;
5171
5174
  for (let n = s, o = s + t; n < o; n++) a[n] = r[n % i];
@@ -5278,10 +5281,10 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
5278
5281
  Te(e._sizeArr, t, 3, 3, i.x, i.y, i.z), e._changedBuffers[Uo] = !0, this._updateTag(e);
5279
5282
  }
5280
5283
  setTranslateArr(e, t, i) {
5281
- Te(e._translateArr, t, 3, 3, i.x, i.y, i.z), e._changedBuffers[Wo] = !0, this._updateTag(e);
5284
+ Te(e._translateArr, t, 3, 3, i.x, i.y, i.z), e._changedBuffers[qo] = !0, this._updateTag(e);
5282
5285
  }
5283
5286
  setLocalPositionArr(e, t, i) {
5284
- Te(e._localPositionArr, t, 3, 3, i.x, i.y, i.z), e._changedBuffers[qo] = !0, this._updateTag(e);
5287
+ Te(e._localPositionArr, t, 3, 3, i.x, i.y, i.z), e._changedBuffers[Wo] = !0, this._updateTag(e);
5285
5288
  }
5286
5289
  _updateTag(e) {
5287
5290
  e.isFree && (e.isFree = !1, this._dataTagUpdateQueue.push(e));
@@ -5555,9 +5558,9 @@ vec2 project(vec4 p,vec2 viewport){return(0.5*p.xyz/p.w+0.5).xy*viewport;}mat2 r
5555
5558
  this._maxLetters = e;
5556
5559
  }
5557
5560
  }
5558
- const Zo = class Ko {
5561
+ const Zo = class Qo {
5559
5562
  constructor(e) {
5560
- this.pickingEnabled = !0, this.__id = Ko.__counter__++, this.pickingEnabled = !0, this._entityCollection = e, this._renderer = null, this._pointClouds = [];
5563
+ this.pickingEnabled = !0, this.__id = Qo.__counter__++, this.pickingEnabled = !0, this._entityCollection = e, this._renderer = null, this._pointClouds = [];
5561
5564
  }
5562
5565
  _initProgram() {
5563
5566
  this._renderer && this._renderer.handler && (this._renderer.handler.programs.pointCloud || this._renderer.handler.addProgram(new X("pointCloud", { uniforms: { projectionViewMatrix: "mat4", opacity: "float", pointSize: "float" }, attributes: { coordinates: "vec3", colors: "vec3" }, vertexShader: `attribute vec3 coordinates;
@@ -5610,7 +5613,7 @@ const Zo = class Ko {
5610
5613
  };
5611
5614
  Zo.__counter__ = 0;
5612
5615
  let zl = Zo;
5613
- const Qo = class Jo {
5616
+ const Ko = class Jo {
5614
5617
  constructor(e) {
5615
5618
  this.__id = Jo.__counter__++, this._entityCollection = e, this._renderer = null, this._polylines = [], this.pickingEnabled = !0, this._relativeCenter = new v(), this._rtcEyePositionHigh = new Float32Array([0, 0, 0]), this._rtcEyePositionLow = new Float32Array([0, 0, 0]);
5616
5619
  }
@@ -5664,8 +5667,8 @@ const Qo = class Jo {
5664
5667
  }
5665
5668
  }
5666
5669
  };
5667
- Qo.__counter__ = 0;
5668
- let Dl = Qo;
5670
+ Ko.__counter__ = 0;
5671
+ let Dl = Ko;
5669
5672
  const ea = class ta {
5670
5673
  constructor(e) {
5671
5674
  this.__id = ta.__counter__++, this.pickingEnabled = !0, this._entityCollection = e, this._renderer = null, this._rays = [], this._vertexBuffer = null, this._startPositionHighBuffer = null, this._startPositionLowBuffer = null, this._endPositionHighBuffer = null, this._endPositionLowBuffer = null, this._thicknessBuffer = null, this._rgbaBuffer = null, this._pickingColorBuffer = null, this._vertexArr = [], this._startPositionHighArr = [], this._startPositionLowArr = [], this._endPositionHighArr = [], this._endPositionLowArr = [], this._thicknessArr = [], this._rgbaArr = [], this._pickingColorArr = [], this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[5] = this.createVertexBuffer, this._buffersUpdateCallbacks[1] = this.createStartPositionBuffer, this._buffersUpdateCallbacks[2] = this.createEndPositionBuffer, this._buffersUpdateCallbacks[4] = this.createThicknessBuffer, this._buffersUpdateCallbacks[3] = this.createRgbaBuffer, this._buffersUpdateCallbacks[0] = this.createPickingColorBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
@@ -5864,7 +5867,7 @@ const sa = class na {
5864
5867
  this.geoObjectHandler.setRelativeCenter(i), this.polylineHandler.setRelativeCenter(i);
5865
5868
  }, this.__id = na.__counter__++, this.renderNode = null, this._visibility = e.visibility == null || e.visibility, this.polygonOffsetUnits = e.polygonOffsetUnits != null ? e.polygonOffsetUnits : 0, this.billboardHandler = new Ml(this), this.labelHandler = new Il(this, e.labelMaxLetters), this.polylineHandler = new Dl(this), this.rayHandler = new Fl(this), this.pointCloudHandler = new zl(this), this.stripHandler = new Ol(this), this.geoObjectHandler = new kl(this), e.pickingEnabled != null && this.setPickingEnabled(e.pickingEnabled), this._entities = [], this.scaleByDistance = e.scaleByDistance || [1, 1, 1];
5866
5869
  let t = new Float32Array([1, 1, 1]);
5867
- e.pickingScale !== void 0 && (e.pickingScale instanceof Array ? (t[0] = e.pickingScale[0] || t[0], t[1] = e.pickingScale[1] || t[1], t[2] = e.pickingScale[2] || t[2]) : typeof e.pickingScale == "number" && (t[0] = e.pickingScale, t[1] = e.pickingScale, t[2] = e.pickingScale)), this._depthOrder = e.depthOrder || 0, this.pickingScale = t, this._opacity = e.opacity == null ? 1 : e.opacity, this._fadingOpacity = this._opacity, this.events = this.rendererEvents = ge(Nl, this), this._useLighting = e.useLighting != null ? e.useLighting ? 1 : 0 : 1, e.entities && this.addEntities(e.entities);
5870
+ e.pickingScale !== void 0 && (e.pickingScale instanceof Array ? (t[0] = e.pickingScale[0] || t[0], t[1] = e.pickingScale[1] || t[1], t[2] = e.pickingScale[2] || t[2]) : typeof e.pickingScale == "number" && (t[0] = e.pickingScale, t[1] = e.pickingScale, t[2] = e.pickingScale)), this._depthOrder = e.depthOrder || 0, this.pickingScale = t, this._opacity = e.opacity == null ? 1 : e.opacity, this._fadingOpacity = this._opacity, this.events = this.rendererEvents = de(Nl, this), this._useLighting = e.useLighting != null ? e.useLighting ? 1 : 0 : 1, e.entities && this.addEntities(e.entities);
5868
5871
  }
5869
5872
  get depthOrder() {
5870
5873
  return this._depthOrder;
@@ -6024,7 +6027,7 @@ function Rs(a, e, t) {
6024
6027
  if (!u) return g;
6025
6028
  if (c && (u = function(f, p, _, m) {
6026
6029
  var y, x, w, b = [];
6027
- for (y = 0, x = p.length; y < x; y++) (w = Ms(f, p[y] * m, y < x - 1 ? p[y + 1] * m : f.length, m, !1)) === w.next && (w.steiner = !0), b.push(Wl(w));
6030
+ for (y = 0, x = p.length; y < x; y++) (w = Ms(f, p[y] * m, y < x - 1 ? p[y + 1] * m : f.length, m, !1)) === w.next && (w.steiner = !0), b.push(ql(w));
6028
6031
  for (b.sort(jl), y = 0; y < b.length; y++) Yl(b[y], _), _ = xi(_, _.next);
6029
6032
  return _;
6030
6033
  }(a, e, u, t)), a.length > 80 * t) {
@@ -6117,7 +6120,7 @@ function Gl(a, e, t, i, r, s) {
6117
6120
  var n = a;
6118
6121
  do {
6119
6122
  for (var o = n.next.next; o !== n.prev; ) {
6120
- if (n.i !== o.i && ql(n, o)) {
6123
+ if (n.i !== o.i && Wl(n, o)) {
6121
6124
  var l = aa(n, o);
6122
6125
  return n = xi(n, n.next), l = xi(l, l.next), bi(n, e, t, i, r, s), void bi(l, e, t, i, r, s);
6123
6126
  }
@@ -6158,7 +6161,7 @@ function Yl(a, e) {
6158
6161
  function Dr(a, e, t, i, r) {
6159
6162
  return (a = 1431655765 & ((a = 858993459 & ((a = 252645135 & ((a = 16711935 & ((a = 32767 * (a - t) / r) | a << 8)) | a << 4)) | a << 2)) | a << 1)) | (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = 32767 * (e - i) / r) | e << 8)) | e << 4)) | e << 2)) | e << 1)) << 1;
6160
6163
  }
6161
- function Wl(a) {
6164
+ function ql(a) {
6162
6165
  var e = a, t = a;
6163
6166
  do
6164
6167
  e.x < t.x && (t = e), e = e.next;
@@ -6168,7 +6171,7 @@ function Wl(a) {
6168
6171
  function Ji(a, e, t, i, r, s, n, o) {
6169
6172
  return (r - n) * (e - o) - (a - n) * (s - o) >= 0 && (a - n) * (i - o) - (t - n) * (e - o) >= 0 && (t - n) * (s - o) - (r - n) * (i - o) >= 0;
6170
6173
  }
6171
- function ql(a, e) {
6174
+ function Wl(a, e) {
6172
6175
  return a.next.i !== e.i && a.prev.i !== e.i && !function(t, i) {
6173
6176
  var r = t;
6174
6177
  do {
@@ -6235,7 +6238,7 @@ function lr(a, e, t) {
6235
6238
  e.y = Math.fround(-s), t.y = Math.fround(r + s);
6236
6239
  }
6237
6240
  }
6238
- let Y = new N(), W = new N(), It = new N();
6241
+ let Y = new N(), q = new N(), It = new N();
6239
6242
  const la = class Ht {
6240
6243
  constructor(e) {
6241
6244
  this.__id = Ht.__counter__++, this._layer = e, this._handler = null, this._geometries = [], this._updatedGeometryArr = [], this._updatedGeometry = {}, this._removeGeometryExtentArr = [], this._removeGeometryExtents = {}, this._polyVerticesHighMerc = [], this._polyVerticesLowMerc = [], this._polyColors = [], this._polyPickingColors = [], this._polyIndexes = [], this._lineVerticesHighMerc = [], this._lineVerticesLowMerc = [], this._lineOrders = [], this._lineIndexes = [], this._lineColors = [], this._linePickingColors = [], this._lineThickness = [], this._lineStrokes = [], this._lineStrokeColors = [], this._polyVerticesHighBufferMerc = null, this._polyVerticesLowBufferMerc = null, this._polyColorsBuffer = null, this._polyPickingColorsBuffer = null, this._polyIndexesBuffer = null, this._lineVerticesHighBufferMerc = null, this._lineVerticesLowBufferMerc = null, this._lineColorsBuffer = null, this._linePickingColorsBuffer = null, this._lineThicknessBuffer = null, this._lineStrokesBuffer = null, this._lineStrokeColorsBuffer = null, this._lineOrdersBuffer = null, this._lineIndexesBuffer = null, this._buffersUpdateCallbacks = [], this._buffersUpdateCallbacks[0] = this.createPolyVerticesBuffer, this._buffersUpdateCallbacks[1] = this.createPolyIndexesBuffer, this._buffersUpdateCallbacks[2] = this.createPolyColorsBuffer, this._buffersUpdateCallbacks[3] = this.createLineVerticesBuffer, this._buffersUpdateCallbacks[4] = this.createLineIndexesBuffer, this._buffersUpdateCallbacks[5] = this.createLineOrdersBuffer, this._buffersUpdateCallbacks[6] = this.createLineColorsBuffer, this._buffersUpdateCallbacks[7] = this.createLineThicknessBuffer, this._buffersUpdateCallbacks[8] = this.createLineStrokesBuffer, this._buffersUpdateCallbacks[9] = this.createLineStrokeColorsBuffer, this._buffersUpdateCallbacks[10] = this.createPolyPickingColorsBuffer, this._buffersUpdateCallbacks[11] = this.createLinePickingColorsBuffer, this._changedBuffers = new Array(this._buffersUpdateCallbacks.length);
@@ -6253,14 +6256,14 @@ const la = class Ht {
6253
6256
  let P = L[0], z = L[1];
6254
6257
  z || (z = P), R = [P[0] + P[0] - z[0], P[1] + P[1] - z[1]];
6255
6258
  }
6256
- lr(R, Y, W), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]);
6257
- for (let P = 0; P < L.length; P++) lr(L[P], Y, W), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]), d.push(x++, x++, x++, x++);
6259
+ lr(R, Y, q), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]);
6260
+ for (let P = 0; P < L.length; P++) lr(L[P], Y, q), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]), d.push(x++, x++, x++, x++);
6258
6261
  if (t) I = L[0], d.push(D, D + 1, D + 1, D + 1);
6259
6262
  else {
6260
6263
  let P = L[L.length - 1], z = L[L.length - 2];
6261
6264
  z || (z = P), I = [P[0] + P[0] - z[0], P[1] + P[1] - z[1]], d.push(x - 1, x - 1, x - 1, x - 1);
6262
6265
  }
6263
- lr(I, Y, W), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(W.x, W.y, W.x, W.y, W.x, W.y, W.x, W.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]), S < e.length - 1 && (x += 8, d.push(x, x));
6266
+ lr(I, Y, q), l.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), h.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), m.push(Y.x, Y.y, Y.x, Y.y, Y.x, Y.y, Y.x, Y.y), y.push(q.x, q.y, q.x, q.y, q.x, q.y, q.x, q.y), c.push(1, -1, 2, -2), f.push(w, w, w, w), _.push(E, E, E, E), u.push(b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3], b[0], b[1], b[2], b[3]), p.push(C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3], C[0], C[1], C[2], C[3]), g.push(T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3], T[0], T[1], T[2], T[3]), S < e.length - 1 && (x += 8, d.push(x, x));
6264
6267
  }
6265
6268
  }
6266
6269
  assignHandler(e) {
@@ -6485,7 +6488,7 @@ const la = class Ht {
6485
6488
  };
6486
6489
  la.__counter__ = 0;
6487
6490
  let $l = la;
6488
- class fe extends $e {
6491
+ class ge extends $e {
6489
6492
  constructor(e, t = {}) {
6490
6493
  super(e, t), this.events = this.events.registerNames(Xl), this.isVector = !0, this._hasImageryTiles = !1, this.scaleByDistance = t.scaleByDistance || [Lt, Lt, Lt], this._useLighting = t.useLighting === void 0 || t.useLighting;
6491
6494
  let i = new Float32Array([1, 1, 1]);
@@ -6542,7 +6545,7 @@ class fe extends $e {
6542
6545
  _proceedEntity(e, t = !1) {
6543
6546
  var i;
6544
6547
  let r = this._hasImageryTiles;
6545
- e.strip && this._stripEntityCollection.add(e), (e.polyline || e.ray) && this._polylineEntityCollection.add(e), (e.geoObject || e.isEmpty) && this._geoObjectEntityCollection.add(e), e.geometry && (this._hasImageryTiles = !0, this._planet && (this._planet.renderer.assignPickingColor(e), this._geometryHandler.add(e.geometry))), this._planet && ((e.billboard || e.label || e.geoObject || e.isEmpty) && (e._cartesian.isZero() && !e._lonLat.isZero() ? e._setCartesian3vSilent(this._planet.ellipsoid.lonLatToCartesian(e._lonLat)) : (e._lonLat = this._planet.ellipsoid.cartesianToLonLat(e._cartesian), Math.abs(e._lonLat.lat) < ue ? e._lonLatMerc = e._lonLat.forwardMercator() : e._lonLatMerc.lon = e._lonLatMerc.lat = e._lonLatMerc.height = 0)), (e.billboard || e.label) && ((i = this._entityCollectionsTreeStrategy) == null || i.insertEntity(e))), this._planet && this._hasImageryTiles !== r && this._planet.updateVisibleLayers(), this.events.dispatch(this.events.entityadd, e);
6548
+ e.strip && this._stripEntityCollection.add(e), (e.polyline || e.ray) && this._polylineEntityCollection.add(e), (e.geoObject || e.isEmpty) && this._geoObjectEntityCollection.add(e), e.geometry && (this._hasImageryTiles = !0, this._planet && (this._planet.renderer.assignPickingColor(e), this._geometryHandler.add(e.geometry))), this._planet && ((e.billboard || e.label || e.geoObject || e.isEmpty) && (e._cartesian.isZero() && !e._lonLat.isZero() ? e._setCartesian3vSilent(this._planet.ellipsoid.lonLatToCartesian(e._lonLat)) : (e._lonLat = this._planet.ellipsoid.cartesianToLonLat(e._cartesian), Math.abs(e._lonLat.lat) < _e ? e._lonLatMerc = e._lonLat.forwardMercator() : e._lonLatMerc.lon = e._lonLatMerc.lat = e._lonLatMerc.height = 0)), (e.billboard || e.label) && ((i = this._entityCollectionsTreeStrategy) == null || i.insertEntity(e))), this._planet && this._hasImageryTiles !== r && this._planet.updateVisibleLayers(), this.events.dispatch(this.events.entityadd, e);
6546
6549
  }
6547
6550
  addEntities(e, t = !1) {
6548
6551
  let i = e.length;
@@ -6786,7 +6789,7 @@ class ha extends dt {
6786
6789
  if (!this._showGhostPointer) return;
6787
6790
  let i = this._planet.getCartesianFromPixelTerrain(t);
6788
6791
  i && (this._addNew(i), !this._isStartPoint && this._cornerLayer.getEntities().length > 2 && (this._isStartPoint = !0, this.events.dispatch(this.events.startpoint, this)), this.events.dispatch(this.events.change, this));
6789
- }, this.events = ge(Zl), this._planet = null, this._initCoordinates = e.coordinates || [], this._pickedCorner = null, this._pickedCenter = null, this._startPos = null, this._startClick = new N(), this._geometryLayer = new fe(), this._cornerStyle = { scale: 0.5, tag: "corners", color: "rgb(350, 350, 0)", object3d: Is, ...e.cornerStyle || {} }, this._centerStyle = { scale: 0.4, tag: "centers", color: "rgb(0, 350, 50)", object3d: Is, ...e.centerStyle || {} }, this._outlineStyle = { thickness: 3.5, color: "rgb(0, 350, 50)", ...e.outlineStyle || {} }, this._fillStyle = { fillColor: "rgba(0,146,247,0.2)", ...e.fillStyle || {} }, this._cornerLayer = new fe("corners", { pickingScale: 3, pickingEnabled: !0, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1] }), this._centerLayer = new fe("centers", { pickingScale: 3, pickingEnabled: !0, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1] }), this._outlineLayer = new fe("outline", { entities: [new V({ polyline: { path3v: [], isClosed: !1, ...this._outlineStyle } })], pickingEnabled: !1, polygonOffsetUnits: -5, relativeToGround: !0 }), this._outlineLayer.getEntities()[0].polyline.altitude = gi, this._ghostCorner = new V({ geoObject: this._cornerStyle }), this._ghostOutlineLayer = new fe("ghost-pointer", { pickingEnabled: !1, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1], opacity: 0.5 }), this._showGhostPointer = !1, this._isStartPoint = !1, this._insertCornerIndex = -1;
6792
+ }, this.events = de(Zl), this._planet = null, this._initCoordinates = e.coordinates || [], this._pickedCorner = null, this._pickedCenter = null, this._startPos = null, this._startClick = new N(), this._geometryLayer = new ge(), this._cornerStyle = { scale: 0.5, tag: "corners", color: "rgb(350, 350, 0)", object3d: Is, ...e.cornerStyle || {} }, this._centerStyle = { scale: 0.4, tag: "centers", color: "rgb(0, 350, 50)", object3d: Is, ...e.centerStyle || {} }, this._outlineStyle = { thickness: 3.5, color: "rgb(0, 350, 50)", ...e.outlineStyle || {} }, this._fillStyle = { fillColor: "rgba(0,146,247,0.2)", ...e.fillStyle || {} }, this._cornerLayer = new ge("corners", { pickingScale: 3, pickingEnabled: !0, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1] }), this._centerLayer = new ge("centers", { pickingScale: 3, pickingEnabled: !0, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1] }), this._outlineLayer = new ge("outline", { entities: [new V({ polyline: { path3v: [], isClosed: !1, ...this._outlineStyle } })], pickingEnabled: !1, polygonOffsetUnits: -5, relativeToGround: !0 }), this._outlineLayer.getEntities()[0].polyline.altitude = gi, this._ghostCorner = new V({ geoObject: this._cornerStyle }), this._ghostOutlineLayer = new ge("ghost-pointer", { pickingEnabled: !1, polygonOffsetUnits: -5, relativeToGround: !0, scaleByDistance: [100, 4e6, 1], opacity: 0.5 }), this._showGhostPointer = !1, this._isStartPoint = !1, this._insertCornerIndex = -1;
6790
6793
  }
6791
6794
  get geometryType() {
6792
6795
  return "POLYGON";
@@ -6948,7 +6951,7 @@ class ha extends dt {
6948
6951
  let n = t[r].getCartesian(), o = t[(r + 1) % i].getCartesian(), l = t[r === 0 ? i - 1 : r - 1].getCartesian().sub(n).normalize(), h = o.sub(n).normalize(), c = e.sub(n).normalize(), d = l.add(h).normalize(), u = c.cross(d), g = l.cross(h);
6949
6952
  u.dot(g) > 0 && (r--, r < 0 && (r = i - 1));
6950
6953
  let f = new v();
6951
- for (let S = 0; S < i; S++) if (new Ke(t[S].getCartesian(), t[(S + 1) % i].getCartesian()).getNearestDistancePoint(e, f)) {
6954
+ for (let S = 0; S < i; S++) if (new Qe(t[S].getCartesian(), t[(S + 1) % i].getCartesian()).getNearestDistancePoint(e, f)) {
6952
6955
  let R = f.distance(e);
6953
6956
  R < s && (s = R, r = S);
6954
6957
  }
@@ -7069,7 +7072,7 @@ class Ds extends J {
7069
7072
  this.renderer && this.renderer.removeNode(this._drawingScene);
7070
7073
  }
7071
7074
  }
7072
- const li = { ell: 0, msl: 1, gnd: 2 }, ss = 0.3048, Kl = 1 / ss, Ql = 1 / 3.6, ca = 1e-3 * ss, Jl = 1 / ca, eh = ["m", "km", "ft", "s", "h", "m/s", "km/h", "ft/s"], da = [0, 2, 0, 0, 0, 0, 0, 0];
7075
+ const li = { ell: 0, msl: 1, gnd: 2 }, ss = 0.3048, Ql = 1 / ss, Kl = 1 / 3.6, ca = 1e-3 * ss, Jl = 1 / ca, eh = ["m", "km", "ft", "s", "h", "m/s", "km/h", "ft/s"], da = [0, 2, 0, 0, 0, 0, 0, 0];
7073
7076
  let ve = [];
7074
7077
  function ua(a, e, t) {
7075
7078
  return ve[a][e](t);
@@ -7080,7 +7083,7 @@ function Or(a, e, t, i, r) {
7080
7083
  function _a(a) {
7081
7084
  return eh[a];
7082
7085
  }
7083
- ve[0] = [], ve[0][0] = (a) => a, ve[0][1] = (a) => 1e-3 * a, ve[0][2] = (a) => a * Kl, ve[2] = [], ve[2][0] = (a) => a * ss, ve[2][1] = (a) => a * ca, ve[2][2] = (a) => a, ve[1] = [], ve[1][0] = (a) => 1e3 * a, ve[1][1] = (a) => a, ve[1][2] = (a) => a * Jl, ve[5] = [], ve[5][5] = (a) => a, ve[5][6] = (a) => 3.6 * a, ve[5][7] = (a) => 3.28084 * a, ve[6] = [], ve[6][5] = (a) => a * Ql, ve[6][6] = (a) => a;
7086
+ ve[0] = [], ve[0][0] = (a) => a, ve[0][1] = (a) => 1e-3 * a, ve[0][2] = (a) => a * Ql, ve[2] = [], ve[2][0] = (a) => a * ss, ve[2][1] = (a) => a * ca, ve[2][2] = (a) => a, ve[1] = [], ve[1][0] = (a) => 1e3 * a, ve[1][1] = (a) => a, ve[1][2] = (a) => a * Jl, ve[5] = [], ve[5][5] = (a) => a, ve[5][6] = (a) => 3.6 * a, ve[5][7] = (a) => 3.28084 * a, ve[6] = [], ve[6][5] = (a) => a * Kl, ve[6][6] = (a) => a;
7084
7087
  const Fs = Object.freeze(Object.defineProperty({ __proto__: null, ELL: 0, GND: 2, MSL: 1, _tenth: da, convert: ua, convertExt: Or, ft: 2, fts: 7, h: 4, heightMode: li, km: 1, kmh: 6, m: 0, ms: 5, s: 3, toString: _a }, Symbol.toStringTag, { value: "Module" })), th = [`<div class="og-lat-side"></div><div class="og-lat-val"></div>
7085
7088
  <div class="og-lon-side"></div><div class="og-lon-val"></div>
7086
7089
  <div class="og-height"></div>
@@ -7170,7 +7173,7 @@ class Ti extends $e {
7170
7173
  for (let i = 0; i < this._cornersWgs84.length; i++) this._cornersWgs84[i].lat >= 89.9 && (this._cornersWgs84[i].lat = 89.9), this._cornersWgs84[i].lat <= -89.9 && (this._cornersWgs84[i].lat = -89.9);
7171
7174
  this._extent.setByCoordinates(this._cornersWgs84);
7172
7175
  let t = this._extent;
7173
- t.southWest.lat > ue || t.northEast.lat < Ve ? (this._projType = 0, this.rendering = this._renderingProjType0) : (this._projType = 1, this.rendering = this._renderingProjType1), this._ready && !this._creationProceeding && this._planet._geoImageCreator.add(this);
7176
+ t.southWest.lat > _e || t.northEast.lat < Ve ? (this._projType = 0, this.rendering = this._renderingProjType0) : (this._projType = 1, this.rendering = this._renderingProjType1), this._ready && !this._creationProceeding && this._planet._geoImageCreator.add(this);
7174
7177
  }
7175
7178
  _createFrame() {
7176
7179
  this._extentWgs84 = this._extent.clone(), this._cornersMerc = [this._cornersWgs84[0].forwardMercatorEPS01(), this._cornersWgs84[1].forwardMercatorEPS01(), this._cornersWgs84[2].forwardMercatorEPS01(), this._cornersWgs84[3].forwardMercatorEPS01()], this._extentMerc = new G(this._extentWgs84.southWest.forwardMercatorEPS01(), this._extentWgs84.northEast.forwardMercatorEPS01());
@@ -7230,7 +7233,7 @@ class Ti extends $e {
7230
7233
  i.disable(i.CULL_FACE), s.bindOutputTexture(this._materialTexture), i.clearColor(0, 0, 0, 0), i.clear(i.COLOR_BUFFER_BIT), i.bindBuffer(i.ARRAY_BUFFER, r._texCoordsBuffer), i.vertexAttribPointer(o.texCoords, 2, i.UNSIGNED_SHORT, !0, 0, 0), i.bindBuffer(i.ARRAY_BUFFER, this._gridBufferHigh), i.vertexAttribPointer(o.cornersHigh, this._gridBufferHigh.itemSize, i.FLOAT, !1, 0, 0), i.bindBuffer(i.ARRAY_BUFFER, this._gridBufferLow), i.vertexAttribPointer(o.cornersLow, this._gridBufferLow.itemSize, i.FLOAT, !1, 0, 0), i.uniform4fv(l.extentParamsHigh, this._extentWgs84ParamsHigh), i.uniform4fv(l.extentParamsLow, this._extentWgs84ParamsLow), i.activeTexture(i.TEXTURE0), i.bindTexture(i.TEXTURE_2D, this._sourceTexture), i.uniform1i(l.sourceTexture, 0), i.bindBuffer(i.ELEMENT_ARRAY_BUFFER, r._indexBuffer), i.drawElements(i.TRIANGLE_STRIP, r._indexBuffer.numItems, i.UNSIGNED_INT, 0), s.deactivate(), i.enable(i.CULL_FACE), this._ready = !0, this._creationProceeding = !1;
7231
7234
  }
7232
7235
  }
7233
- const q = { MB_LEFT: 0, MB_RIGHT: 2, MB_MIDDLE: 1, KEY_CTRL: 17, KEY_ALT: 18, KEY_SHIFT: 16, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_PRINTSCREEN: 44, KEY_A: 65, KEY_D: 68, KEY_E: 69, KEY_Q: 81, KEY_S: 83, KEY_W: 87, KEY_X: 88, KEY_APOSTROPHE: 192 }, rh = ["change", "idle", "play", "pause", "stop"];
7236
+ const W = { MB_LEFT: 0, MB_RIGHT: 2, MB_MIDDLE: 1, KEY_CTRL: 17, KEY_ALT: 18, KEY_SHIFT: 16, KEY_LEFT: 37, KEY_UP: 38, KEY_RIGHT: 39, KEY_DOWN: 40, KEY_PRINTSCREEN: 44, KEY_A: 65, KEY_D: 68, KEY_E: 69, KEY_Q: 81, KEY_S: 83, KEY_W: 87, KEY_X: 88, KEY_APOSTROPHE: 192 }, rh = ["change", "idle", "play", "pause", "stop"];
7234
7237
  class sh extends Ce {
7235
7238
  constructor(e) {
7236
7239
  super({ template: Ge('<button title={title} class="og-layerSwitcher__layerButton">{icon}<div class="og-layerSwitcher__name">{name}</div></button>', { title: e.model.name, name: e.model.name, icon: e.model.iconSrc ? `<img src="${e.model.iconSrc}" />` : "" }), ...e }), this._onVisibilityChange = (t) => {
@@ -7249,7 +7252,7 @@ class sh extends Ce {
7249
7252
  }
7250
7253
  }
7251
7254
  const nh = ["change"];
7252
- class K extends Ce {
7255
+ class Q extends Ce {
7253
7256
  constructor(e = {}) {
7254
7257
  super({ template: Ge(`<div class="og-slider">
7255
7258
  <div class="og-slider-label">{label}</div>
@@ -7405,7 +7408,7 @@ class ns extends J {
7405
7408
  }
7406
7409
  onMouseEnter(e) {
7407
7410
  const t = this.renderer.events;
7408
- t.isKeyPressed(q.KEY_ALT) && t.releaseKeys(), t.updateButtonsStates(e.sys.buttons), t.mouseState.leftButtonDown ? this.renderer.handler.canvas.classList.add("ogGrabbingPoiner") : this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7411
+ t.isKeyPressed(W.KEY_ALT) && t.releaseKeys(), t.updateButtonsStates(e.sys.buttons), t.mouseState.leftButtonDown ? this.renderer.handler.canvas.classList.add("ogGrabbingPoiner") : this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7409
7412
  }
7410
7413
  onMouseLeave() {
7411
7414
  this.renderer.events.mouseState.leftButtonDown && (this.scaleRot = 0), this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
@@ -7414,7 +7417,7 @@ class ns extends J {
7414
7417
  this.stepIndex || (this.planet.stopFlying(), this.stopRotation(), this._deactivate = !0, this.lockPlanet(!0), this.stepsForward = ns.getMovePointsFromPixelTerrain(this.planet.camera, this.planet, this.stepsCount, this.distDiff, e.pos, e.wheelDelta > 0, e.direction) || null, this._wheelDirection = e.wheelDelta, this.stepsForward && (this.stepIndex = this.stepsCount));
7415
7418
  }
7416
7419
  oninit() {
7417
- this.activate(), this.renderer && (this.renderer.events.on("keyfree", q.KEY_ALT, this.onShiftFree, this), this.renderer.events.on("keyfree", q.KEY_PRINTSCREEN, this.onShiftFree, this));
7420
+ this.activate(), this.renderer && (this.renderer.events.on("keyfree", W.KEY_ALT, this.onShiftFree, this), this.renderer.events.on("keyfree", W.KEY_PRINTSCREEN, this.onShiftFree, this));
7418
7421
  }
7419
7422
  onMouseLeftButtonDoubleClick(e) {
7420
7423
  this.planet.stopFlying(), this.stopRotation();
@@ -7424,7 +7427,7 @@ class ns extends J {
7424
7427
  let r = i.maxAltitude + this.planet.ellipsoid.polarSize, s = i.minAltitude + this.planet.ellipsoid.polarSize;
7425
7428
  const n = i.eye.length(), o = this.planet.ellipsoid.cartesianToLonLat(t);
7426
7429
  if (n > r || n < s) return void this.planet.flyLonLat(new A(o.lon, o.lat));
7427
- this.renderer.events.isKeyPressed(q.KEY_ALT) ? this.planet.flyLonLat(new A(o.lon, o.lat, 2 * i.eye.distance(t))) : this.planet.flyLonLat(new A(o.lon, o.lat, 0.57 * i.eye.distance(t)));
7430
+ this.renderer.events.isKeyPressed(W.KEY_ALT) ? this.planet.flyLonLat(new A(o.lon, o.lat, 2 * i.eye.distance(t))) : this.planet.flyLonLat(new A(o.lon, o.lat, 0.57 * i.eye.distance(t)));
7428
7431
  }
7429
7432
  }
7430
7433
  onMouseLeftButtonClick() {
@@ -7470,7 +7473,7 @@ class ns extends J {
7470
7473
  this._shiftBusy = !1;
7471
7474
  }
7472
7475
  onMouseMove(e) {
7473
- this._active && this.renderer.events.isKeyPressed(q.KEY_ALT) && (this._shiftBusy || (this._shiftBusy = !0, this.onMouseRightButtonClick(e)), this.onMouseRightButtonDown(e));
7476
+ this._active && this.renderer.events.isKeyPressed(W.KEY_ALT) && (this._shiftBusy || (this._shiftBusy = !0, this.onMouseRightButtonClick(e)), this.onMouseRightButtonDown(e));
7474
7477
  }
7475
7478
  onDraw() {
7476
7479
  if (this._active) {
@@ -7498,18 +7501,18 @@ class ns extends J {
7498
7501
  this.planet.layerLock.free(this._keyLock), this.planet.terrainLock.free(this._keyLock), this.planet._normalMapCreator.free(this._keyLock);
7499
7502
  }
7500
7503
  }
7501
- const Ri = 0.96;
7504
+ const lh = ["drag", "zoom", "rotate"], Ri = 0.96;
7502
7505
  class ma extends J {
7503
7506
  constructor(e = {}) {
7504
- super({ name: "mouseNavigation", autoActivate: !0, ...e }), this._shiftBusy = !1, this._hold = !1, this._prevVel = new v(), this._screenPosIsChanged = !0, this._dragInertia = 170, this._onShiftFree = () => {
7507
+ super({ name: "mouseNavigation", autoActivate: !0, ...e }), this._shiftBusy = !1, this._hold = !1, this._prevVel = new v(), this._screenPosIsChanged = !0, this._onShiftFree = () => {
7505
7508
  this._shiftBusy = !1;
7506
7509
  }, this._onCameraFly = () => {
7507
7510
  this.stop();
7508
7511
  }, this._onMouseMove = (t) => {
7509
- this._active && this.renderer.events.isKeyPressed(q.KEY_ALT) && (this._shiftBusy || (this._shiftBusy = !0, this._onRHold(t)), this._onRDown(t));
7512
+ this._active && this.renderer.events.isKeyPressed(W.KEY_ALT) && (this._shiftBusy || (this._shiftBusy = !0, this._onRHold(t)), this._onRDown(t));
7510
7513
  }, this._onMouseEnter = (t) => {
7511
7514
  const i = this.renderer.events;
7512
- i.isKeyPressed(q.KEY_ALT) && i.releaseKeys(), i.updateButtonsStates(t.sys.buttons), i.mouseState.leftButtonDown ? this.renderer.handler.canvas.classList.add("ogGrabbingPoiner") : this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7515
+ i.isKeyPressed(W.KEY_ALT) && i.releaseKeys(), i.updateButtonsStates(t.sys.buttons), i.mouseState.leftButtonDown ? this.renderer.handler.canvas.classList.add("ogGrabbingPoiner") : this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7513
7516
  }, this._onMouseLeave = () => {
7514
7517
  this.renderer.events.mouseState.leftButtonDown && this.vel.scale(0), this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7515
7518
  }, this._onRHold = (t) => {
@@ -7530,7 +7533,7 @@ class ma extends J {
7530
7533
  let n = this._targetZoomPoint.sub(r.eye);
7531
7534
  n.length() > 6e3 && this._wheelDirection > 0 && r.eye.getNormal().negate().dot(n.normalize()) < 0.3 && (this.fixedUp = !1, s = 4.3);
7532
7535
  let o = this.planet.camera.eye.distance(this._targetZoomPoint) * s;
7533
- this.force = t.direction.scale(this._wheelDirection).normalize().scale(this._wheelDirection < 0 ? 1.3 * o : o), this.vel.set(0, 0, 0), this.force_roll = this._curRoll;
7536
+ this.force = t.direction.scale(this._wheelDirection).normalize().scale(this._wheelDirection < 0 ? 1.3 * o : o).scale(this.zoomSpeed), this.vel.set(0, 0, 0), this.force_roll = this._curRoll;
7534
7537
  }
7535
7538
  }, this._onLDown = (t) => {
7536
7539
  this.stop(), this._targetRotationPoint = null, this._targetZoomPoint = null, this.planet && (this.planet.stopFlying(), this._grabbedPoint = this._getTargetPoint(t.pos), this._grabbedPoint && (this.renderer.handler.canvas.classList.add("ogGrabbingPoiner"), this._grabbedSphere.radius = this._grabbedPoint.length(), this._eye0 = this.planet.camera.eye.clone(), this._grabbedCameraHeight = this._eye0.length(), this._curPitch = this.planet.camera.getPitch(), this._curYaw = this.planet.camera.getYaw(), this._curRoll = this.planet.camera.getRoll(), this._currScreenPos.copy(t.pos), this.planet.camera.getUp().dot(new v(0, 0, 1)) > 0.3 && (this.fixedUp = !0)));
@@ -7542,21 +7545,21 @@ class ma extends J {
7542
7545
  if (!r) return;
7543
7546
  this._targetDragPoint = r;
7544
7547
  let s = new v(), n = F.getRotationBetweenVectors(this._targetDragPoint.getNormal(), this._grabbedPoint.getNormal());
7545
- s.copy(n.mulVec3(i.eye)), this.force = s.sub(i.eye).scale(this._dragInertia);
7548
+ s.copy(n.mulVec3(i.eye)), this.force = s.sub(i.eye).scale(this.dragInertia);
7546
7549
  } else {
7547
7550
  let r = this._grabbedPoint, s = v.add(r, i.getRight()), n = v.add(r, r.getNormal()), o = new v();
7548
7551
  new U(i.eye, t.direction).hitPlaneRes(ke.fromPoints(r, s, n), o);
7549
7552
  let l = i.eye.add(o.subA(r).negate());
7550
- this.force = l.sub(i.eye).scale(this._dragInertia), this._targetDragPoint = o;
7553
+ this.force = l.sub(i.eye).scale(this.dragInertia), this._targetDragPoint = o;
7551
7554
  }
7552
7555
  this.vel.set(0, 0, 0), this._currScreenPos.equal(t.pos) || (this._screenPosIsChanged = !0, this._currScreenPos.copy(t.pos)), this._hold = !0;
7553
7556
  }
7554
7557
  }, this._onLUp = (t) => {
7555
7558
  this._hold = !1, this.renderer.handler.canvas.classList.remove("ogGrabbingPoiner");
7556
- }, this.speed = e.speed || 1, this.force = new v(), this.force_h = 0, this.force_v = 0, this.vel = new v(), this.vel_h = 0, this.vel_v = 0, this.vel_roll = 0, this.force_roll = 0, this.mass = 1, this._velInertia = Ri, this._lookPos = void 0, this._grabbedPoint = null, this._targetZoomPoint = null, this._targetDragPoint = null, this._targetRotationPoint = null, this._tUp = new v(), this._tRad = 0, this._rotHDir = 0, this._rotVDir = 0, this._wheelDirection = 1, this._currScreenPos = new N(), this._grabbedSphere = new He(), this.fixedUp = e.fixedUp == null || e.fixedUp, this._rot = new F(), this._curPitch = 0, this._curYaw = 0, this._curRoll = 0, this._eye0 = new v(), this._newEye = new v(), this._grabbedCameraHeight = 0, this._isTouchPad = !1;
7559
+ }, this.events = de(lh, this), this.force = new v(), this.force_h = 0, this.force_v = 0, this.vel = new v(), this.vel_h = 0, this.vel_v = 0, this.vel_roll = 0, this.force_roll = 0, this.mass = e.mass != null ? e.mass : 1, this.inertia = e.inertia != null ? e.inertia : 1, this._velInertia = Ri, this.minSlope = e.minSlope != null ? e.minSlope : 0.35, this.dragInertia = e.dragInertia != null ? e.dragInertia : 170, this.zoomSpeed = e.zoomSpeed != null ? e.zoomSpeed : 1, this._lookPos = void 0, this._grabbedPoint = null, this._targetZoomPoint = null, this._targetDragPoint = null, this._targetRotationPoint = null, this._tUp = new v(), this._tRad = 0, this._rotHDir = 0, this._rotVDir = 0, this._wheelDirection = 1, this._currScreenPos = new N(), this._grabbedSphere = new He(), this.fixedUp = e.fixedUp == null || e.fixedUp, this._rot = new F(), this._curPitch = 0, this._curYaw = 0, this._curRoll = 0, this._eye0 = new v(), this._newEye = new v(), this._grabbedCameraHeight = 0, this._isTouchPad = !1;
7557
7560
  }
7558
7561
  oninit() {
7559
- this.renderer && (this.renderer.events.on("keyfree", q.KEY_ALT, this._onShiftFree), this.renderer.events.on("keyfree", q.KEY_PRINTSCREEN, this._onShiftFree));
7562
+ this.renderer && (this.renderer.events.on("keyfree", W.KEY_ALT, this._onShiftFree), this.renderer.events.on("keyfree", W.KEY_PRINTSCREEN, this._onShiftFree));
7560
7563
  }
7561
7564
  onadd() {
7562
7565
  var e;
@@ -7581,18 +7584,20 @@ class ma extends J {
7581
7584
  }
7582
7585
  _handleRotation() {
7583
7586
  if (this.planet && this._targetRotationPoint) {
7584
- let e = this.planet.camera, t = this.vel_h * this.dt, i = this.vel_v * this.dt;
7585
- e.rotateHorizontal(t, !1, this._targetRotationPoint, this._tUp), e.rotateVertical(i, this._targetRotationPoint, 0.1), this._curPitch = e.getPitch(), this._curYaw = e.getYaw(), this._curRoll = e.getRoll(), this._velInertia = Ri;
7587
+ let e = this.planet.camera;
7588
+ if (this.vel_h === 0 && this.vel_v === 0) return;
7589
+ let t = this.vel_h * this.dt, i = this.vel_v * this.dt;
7590
+ e.rotateHorizontal(t, !1, this._targetRotationPoint, this._tUp), e.rotateVertical(i, this._targetRotationPoint, 0.1), this.events.dispatch(this.events.rotate, this), this._curPitch = e.getPitch(), this._curYaw = e.getYaw(), this._curRoll = e.getRoll(), this._velInertia = Ri;
7586
7591
  }
7587
7592
  }
7588
7593
  _getTargetPoint(e) {
7589
7594
  return this.planet ? this.planet.camera.getAltitude() > 8e4 ? this.planet.getCartesianFromPixelEllipsoid(e) || null : this.planet.getCartesianFromPixelTerrain(e) || null : null;
7590
7595
  }
7591
7596
  _handleDrag() {
7592
- if (this.planet && this._targetDragPoint && this._grabbedPoint && this.vel.length() > 0) {
7597
+ if (this.planet && this._targetDragPoint && this._grabbedPoint && this.vel.length() > 0.1) {
7593
7598
  this._velInertia = Ri;
7594
7599
  let e = this.planet.camera;
7595
- if (Math.abs(e.eyeNorm.dot(v.NORTH)) > 0.9 && (this.fixedUp = !1), this._screenPosIsChanged || this.vel.length() > this._prevVel.length() && (this.fixedUp = !1), this._screenPosIsChanged = !1, this._prevVel.copy(this.vel), e.slope > 0.35) {
7600
+ if (Math.abs(e.eyeNorm.dot(v.NORTH)) > 0.9 && (this.fixedUp = !1), this._screenPosIsChanged || this.vel.length() > this._prevVel.length() && (this.fixedUp = !1), this._screenPosIsChanged = !1, this._prevVel.copy(this.vel), e.slope > this.minSlope) {
7596
7601
  let t = this.vel.scaleTo(this.dt), i = v.proj_b_to_plane(t, e.eyeNorm), r = e.eye.add(i).normalize().scale(this._grabbedCameraHeight);
7597
7602
  if (this.fixedUp) e.eye.copy(r), this._corrRoll(), e.setPitchYawRoll(this._curPitch, this._curYaw, this._curRoll);
7598
7603
  else {
@@ -7603,17 +7608,18 @@ class ma extends J {
7603
7608
  let t = this.vel.scaleTo(this.dt), i = e.eye.add(t);
7604
7609
  e.eye.copy(i), e.checkTerrainCollision();
7605
7610
  }
7611
+ this.events.dispatch(this.events.drag, this);
7606
7612
  }
7607
7613
  }
7608
7614
  _corrRoll() {
7609
7615
  this.planet.camera.slope < 0.5 && (this._curRoll -= this.vel_roll * this.dt, this._curRoll < 0.01 * Math.PI / 180 && (this._curRoll = 0.01 * Math.PI / 180));
7610
7616
  }
7611
7617
  _handleZoom() {
7612
- if (this._targetZoomPoint && this.vel.length() > 0) {
7618
+ if (this._targetZoomPoint && this.vel.length() > 0.1) {
7613
7619
  let e = this.planet.camera, t = this._targetZoomPoint, i = e.eye.clone(), r = t.sub(e.eye).normalize(), s = this.vel.getNormal(), n = Math.sign(s.dot(e.getForward())), o = this.vel.scaleTo(this.dt);
7614
7620
  this._grabbedSphere.radius > i.length() && (n *= -1);
7615
7621
  let l = e.getForward().scaleTo(n * o.length());
7616
- i.addA(l);
7622
+ i.addA(l), this.events.dispatch(this.events.zoom, this);
7617
7623
  let h = e.maxAltitude + this.planet.ellipsoid.getEquatorialSize();
7618
7624
  if (i.length() > h) return void i.copy(i.getNormal().scale(h));
7619
7625
  let c = new U(i, r).hitSphere(this._grabbedSphere);
@@ -7631,30 +7637,33 @@ class ma extends J {
7631
7637
  }
7632
7638
  _updateVel() {
7633
7639
  let e = this.force.scale(1 / this.mass);
7634
- this.vel.addA(e), this.vel.scale(this._velInertia), this.vel.length() < 1e-3 && this.vel.set(0, 0, 0), this.force.set(0, 0, 0), this._updateVel_h(), this._updateVel_v(), this._updateVel_roll();
7640
+ this.vel.addA(e), this.vel.scale(this.velocityInertia), this.vel.length() < 1e-3 && this.vel.set(0, 0, 0), this.force.set(0, 0, 0), this._updateVel_h(), this._updateVel_v(), this._updateVel_roll();
7635
7641
  }
7636
7642
  _updateVel_h() {
7637
7643
  let e = this.force_h / this.mass;
7638
- this.vel_h += e, this.vel_h *= this._velInertia, this.force_h = 0;
7644
+ this.vel_h += e, this.vel_h *= this.velocityInertia, Math.abs(this.vel_h) < 1e-3 && (this.vel_h = 0), this.force_h = 0;
7639
7645
  }
7640
7646
  _updateVel_v() {
7641
7647
  let e = this.force_v / this.mass;
7642
- this.vel_v += e, this.vel_v *= this._velInertia, this.force_v = 0;
7648
+ this.vel_v += e, this.vel_v *= this.velocityInertia, Math.abs(this.vel_v) < 1e-3 && (this.vel_v = 0), this.force_v = 0;
7643
7649
  }
7644
7650
  _updateVel_roll() {
7645
7651
  let e = this.force_roll / this.mass;
7646
- this.vel_roll += e, this.vel_roll *= this._velInertia, this.force_roll = 0;
7652
+ this.vel_roll += e, this.vel_roll *= this.velocityInertia, this.force_roll = 0;
7647
7653
  }
7648
7654
  get dt() {
7649
7655
  return 1e-3 * this.renderer.handler.deltaTime;
7650
7656
  }
7657
+ get velocityInertia() {
7658
+ return this._velInertia * this.inertia;
7659
+ }
7651
7660
  stop() {
7652
7661
  this.vel.set(0, 0, 0), this.vel_h = 0, this.vel_v = 0, this._velInertia = Ri, this._targetZoomPoint = null, this._grabbedPoint = null, this._targetRotationPoint = null, this._targetDragPoint = null;
7653
7662
  }
7654
7663
  }
7655
7664
  const Ns = (a) => a > 1e3 ? `${(a / 1e3).toFixed(1)} km` : a > 9 ? `${Math.round(a)} m` : `${a.toFixed(1)} m`;
7656
- let lh = Z.createCylinder(1.1, 0, 2.7, 20, 1, !0, !1, 0, 0, 0);
7657
- const hh = { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 20, 0] }, Hs = { scale: 1, instanced: !0, tag: "ruler", color: "rgb(0,305,0)", object3d: lh };
7665
+ let hh = Z.createCylinder(1.1, 0, 2.7, 20, 1, !0, !1, 0, 0, 0);
7666
+ const ch = { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 20, 0] }, Hs = { scale: 1, instanced: !0, tag: "ruler", color: "rgb(0,305,0)", object3d: hh };
7658
7667
  class va extends dt {
7659
7668
  constructor(e = {}) {
7660
7669
  super(e.name), this._onCornerLdown = (t) => {
@@ -7690,7 +7699,7 @@ class va extends dt {
7690
7699
  let i = this._planet.getLonLatFromPixelTerrain(t.pos);
7691
7700
  i && (this._pickedCorner.properties.name === "start" ? this._drawLine(i, this._anchorLonLat) : this._drawLine(this._anchorLonLat, i));
7692
7701
  }
7693
- }, this.events = ge(ch), this._ignoreTerrain = e.ignoreTerrain == null || e.ignoreTerrain, this._planet = e.planet || null, this._startLonLat = null, this._preventClick = !1, this._stopDrawing = !1, this._pickedCorner = null, this._startPos = null, this._startClick = new N(), this._anchorLonLat = null, this._heading = 0, this._trackLayer = new fe("track", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._labelLayer = new fe("ruler-label", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -100, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._cornersLayer = new fe("corners", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [100, 4e6, 1], pickingScale: 2 }), this._propsLabel = new V({ name: "propsLabel", label: hh }), this._trackEntity = new V({ polyline: { path3v: [], thickness: 4.8, color: "rgb(255,131,0)", isClosed: !1 } }), this._trackEntity.polyline.altitude = 0.01, this._cornerEntity = [new V({ geoObject: Hs, properties: { name: "start" } }), new V({ geoObject: Hs, properties: { name: "end" } })];
7702
+ }, this.events = de(dh), this._ignoreTerrain = e.ignoreTerrain == null || e.ignoreTerrain, this._planet = e.planet || null, this._startLonLat = null, this._preventClick = !1, this._stopDrawing = !1, this._pickedCorner = null, this._startPos = null, this._startClick = new N(), this._anchorLonLat = null, this._heading = 0, this._trackLayer = new ge("track", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._labelLayer = new ge("ruler-label", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -100, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._cornersLayer = new ge("corners", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [100, 4e6, 1], pickingScale: 2 }), this._propsLabel = new V({ name: "propsLabel", label: ch }), this._trackEntity = new V({ polyline: { path3v: [], thickness: 4.8, color: "rgb(255,131,0)", isClosed: !1 } }), this._trackEntity.polyline.altitude = 0.01, this._cornerEntity = [new V({ geoObject: Hs, properties: { name: "start" } }), new V({ geoObject: Hs, properties: { name: "end" } })];
7694
7703
  }
7695
7704
  set ignoreTerrain(e) {
7696
7705
  this._ignoreTerrain = e;
@@ -7754,7 +7763,7 @@ class va extends dt {
7754
7763
  return this._planet ? this._planet.ellipsoid : null;
7755
7764
  }
7756
7765
  }
7757
- const ch = ["add", "remove", "mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter"];
7766
+ const dh = ["add", "remove", "mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter"];
7758
7767
  class ya extends J {
7759
7768
  constructor(e = {}) {
7760
7769
  super(e), this._rulerScene = new va({ name: `rulerScene:${this.__id}`, ignoreTerrain: e.ignoreTerrain });
@@ -7772,11 +7781,11 @@ class ya extends J {
7772
7781
  this.renderer && this.renderer.removeNode(this._rulerScene);
7773
7782
  }
7774
7783
  }
7775
- let dh = Z.createCylinder(1.1, 0, 2, 6, 1, !0, !0, 0, 0, 0);
7776
- const Vs = { startColor: "rgb(255,131,0)", endColor: "rgb(255,131,0)", thickness: 5 }, hr = { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 18, 0] }, Us = { scale: 1, instanced: !0, tag: "height-ruler", color: "rgb(255,131,0)", object3d: dh };
7777
- class uh extends va {
7784
+ let uh = Z.createCylinder(1.1, 0, 2, 6, 1, !0, !0, 0, 0, 0);
7785
+ const Vs = { startColor: "rgb(255,131,0)", endColor: "rgb(255,131,0)", thickness: 5 }, hr = { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 18, 0] }, Us = { scale: 1, instanced: !0, tag: "height-ruler", color: "rgb(255,131,0)", object3d: uh };
7786
+ class _h extends va {
7778
7787
  constructor(e = {}) {
7779
- super(e), this._geoRulerLayer = new fe("rayHeightRuler", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -2, relativeToGround: !1, hideInLayerSwitcher: !0 }), this._rayV = new V({ name: "verticalRay", ray: Vs }), this._rayH = new V({ name: "heightRay", ray: Vs }), this._heightLabels = [new V({ name: "startCornerLabel", label: { ...hr } }), new V({ name: "endCornerLabel", label: { ...hr } }), new V({ name: "deltaLabel", label: { ...hr } })];
7788
+ super(e), this._geoRulerLayer = new ge("rayHeightRuler", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -2, relativeToGround: !1, hideInLayerSwitcher: !0 }), this._rayV = new V({ name: "verticalRay", ray: Vs }), this._rayH = new V({ name: "heightRay", ray: Vs }), this._heightLabels = [new V({ name: "startCornerLabel", label: { ...hr } }), new V({ name: "endCornerLabel", label: { ...hr } }), new V({ name: "deltaLabel", label: { ...hr } })];
7780
7789
  }
7781
7790
  setVisibility(e) {
7782
7791
  super.setVisibility(e), this._geoRulerLayer.setVisibility(e);
@@ -7844,7 +7853,7 @@ class uh extends va {
7844
7853
  }
7845
7854
  class Gs extends ya {
7846
7855
  constructor(e = {}) {
7847
- super(e), this._rulerScene = new uh({ name: `heightRulerScene:${this.__id}`, ignoreTerrain: !1 });
7856
+ super(e), this._rulerScene = new _h({ name: `heightRulerScene:${this.__id}`, ignoreTerrain: !1 });
7848
7857
  }
7849
7858
  }
7850
7859
  const cr = [1e-3, 5e-3, 0.01, 0.05, 0.1, 0.2, 0.5, 1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500, 1e3, 2e3, 3e3, 5e3, 1e4, 2e4, 3e4, 5e4, 1e5, 2e5, 3e5, 5e5, 1e6, 2e6, 3e6, 5e6, 1e7];
@@ -8023,10 +8032,10 @@ class ba extends J {
8023
8032
  }
8024
8033
  const dr = 14959787e4;
8025
8034
  function ur(a) {
8026
- var e = a - Ki, t = 282.9404 + 470935e-10 * e, i = 0.016709 - 1151e-12 * e, r = Tr(356.047 + 0.9856002585 * e), s = 23.4392911 - 3563e-10 * e, n = r + ee * i * Math.sin(r * j) * (1 + i * Math.cos(r * j)), o = Math.cos(n * j) - i, l = Math.sin(n * j) * Math.sqrt(1 - i * i), h = Math.sqrt(o * o + l * l), c = Tr(Math.atan2(l, o) * ee + t), d = o = h * Math.cos(c * j), u = (l = h * Math.sin(c * j)) * Math.cos(s * j), g = l * Math.sin(s * j), f = ji * (24 * e / 23.9344694 - 259.853 / 360);
8035
+ var e = a - Qi, t = 282.9404 + 470935e-10 * e, i = 0.016709 - 1151e-12 * e, r = Tr(356.047 + 0.9856002585 * e), s = 23.4392911 - 3563e-10 * e, n = r + ee * i * Math.sin(r * j) * (1 + i * Math.cos(r * j)), o = Math.cos(n * j) - i, l = Math.sin(n * j) * Math.sqrt(1 - i * i), h = Math.sqrt(o * o + l * l), c = Tr(Math.atan2(l, o) * ee + t), d = o = h * Math.cos(c * j), u = (l = h * Math.sin(c * j)) * Math.cos(s * j), g = l * Math.sin(s * j), f = ji * (24 * e / 23.9344694 - 259.853 / 360);
8027
8036
  return F.zRotation(-f).mulVec3(new v(-d * dr, -u * dr, g * dr));
8028
8037
  }
8029
- class _h {
8038
+ class fh {
8030
8039
  constructor(e) {
8031
8040
  this._renderNode = null, this._position = e.position || new v(), this._ambient = e.ambient || new v(), this._diffuse = e.diffuse || new v(0.8, 0.8, 0.8), this._specular = e.specular || new v(0.18, 0.18, 0.18), this._shininess = e.shininess != null ? e.shininess : 3.3, this._active = !0, this._tempAmbient = this._ambient.clone(), this._tempDiffuse = this._diffuse.clone(), this._tempSpecular = this._specular.clone(), this._tempShininess = this._shininess;
8032
8041
  }
@@ -8077,7 +8086,7 @@ class _h {
8077
8086
  }
8078
8087
  class Hr extends J {
8079
8088
  constructor(e = {}) {
8080
- super({ autoActivate: !0, ...e }), this._name = "sun", this.activationHeight = e.activationHeight || 12079e3, this.offsetVertical = e.offsetVertical || -5e6, this.offsetHorizontal = e.offsetHorizontal || 5e6, this.sunlight = new _h({ ambient: new v(0.15, 0.15, 0.25), diffuse: new v(0.9, 0.9, 0.8), specular: new v(0.1, 0.1, 0.06), shininess: 110 }), this._currDate = 0, this._prevDate = 0, this._clockPtr = null, this._lightOn = !1, this._f = 0, this._k = 0, this._stopped = e.stopped || !1;
8089
+ super({ autoActivate: !0, ...e }), this._name = "sun", this.activationHeight = e.activationHeight || 12079e3, this.offsetVertical = e.offsetVertical || -5e6, this.offsetHorizontal = e.offsetHorizontal || 5e6, this.sunlight = new fh({ ambient: new v(0.15, 0.15, 0.25), diffuse: new v(0.9, 0.9, 0.8), specular: new v(0.1, 0.1, 0.06), shininess: 110 }), this._currDate = 0, this._prevDate = 0, this._clockPtr = null, this._lightOn = !1, this._f = 0, this._k = 0, this._stopped = e.stopped || !1;
8081
8090
  }
8082
8091
  oninit() {
8083
8092
  this.planet.lightEnabled = !0, this.sunlight.addTo(this.planet), this.renderer.events.on("draw", this._draw, this), this._clockPtr || (this._clockPtr = this.renderer.handler.defaultClock);
@@ -8116,6 +8125,7 @@ class Hr extends J {
8116
8125
  }
8117
8126
  }
8118
8127
  }
8128
+ const gh = ["inertiamove", "drag", "doubletapzoom"];
8119
8129
  class js {
8120
8130
  constructor() {
8121
8131
  this.x = 0, this.y = 0, this.prev_x = 0, this.prev_y = 0, this.grabbedPoint = null, this.grabbedSpheroid = new He(), this._vec = new N(), this._vecPrev = new N();
@@ -8137,7 +8147,7 @@ class wa extends J {
8137
8147
  constructor(e = {}) {
8138
8148
  super(e), this._onCameraFly = () => {
8139
8149
  this.stopRotation();
8140
- }, this._name = "touchNavigation", this.grabbedPoint = new v(), this.inertia = 7e-3, this.grabbedSpheroid = new He(), this.planet = null, this.qRot = new F(), this.scaleRot = 0, this.rot = 1, this._eye0 = new v(), this.pointOnEarth = null, this.earthUp = null, this.touches = [new js(), new js()], this._keyLock = new Li(), this._touching = !1;
8150
+ }, this._name = "touchNavigation", this.events = de(gh, this), this.grabbedPoint = new v(), this.inertia = e.inertia != null ? e.inertia : 7e-3, this.grabbedSpheroid = new He(), this.planet = null, this.qRot = new F(), this.scaleRot = 0, this.rot = 1, this._eye0 = new v(), this.pointOnEarth = null, this.earthUp = null, this.touches = [new js(), new js()], this._keyLock = new Li(), this._touching = !1;
8141
8151
  }
8142
8152
  oninit() {
8143
8153
  this.renderer && (this.renderer.events.on("touchstart", this.onTouchStart, this), this.renderer.events.on("touchend", this.onTouchEnd, this), this.renderer.events.on("doubletouch", this.onDoubleTouch, this), this.renderer.events.on("touchcancel", this.onTouchCancel, this), this.renderer.events.on("touchmove", this.onTouchMove, this), this.renderer.events.on("draw", this.onDraw, this));
@@ -8169,7 +8179,7 @@ class wa extends J {
8169
8179
  const t = this.planet.getCartesianFromPixelTerrain(e);
8170
8180
  if (t) {
8171
8181
  const i = this.planet.ellipsoid.cartesianToLonLat(t);
8172
- this.planet.flyLonLat(new A(i.lon, i.lat, 0.57 * this.planet.camera.eye.distance(t)));
8182
+ this.planet.flyLonLat(new A(i.lon, i.lat, 0.57 * this.planet.camera.eye.distance(t))), this.events.dispatch(this.events.doubletapzoom, this);
8173
8183
  }
8174
8184
  }
8175
8185
  onTouchEnd(e) {
@@ -8193,7 +8203,7 @@ class wa extends J {
8193
8203
  t.eye.addA(t.getForward().scale(f)), t.rotateAround(-c, !1, this.pointOnEarth, this.earthUp);
8194
8204
  const p = s.vec.add(n.vec).scale(0.5), _ = s.vecPrev.add(n.vecPrev).scale(0.5), m = p.sub(_).scale(-1);
8195
8205
  var r = 0.5 / d * t._lonLat.height * j;
8196
- r > 3e-3 && (r = 3e-3), t.rotateHorizontal(r * -m.x, !1, this.pointOnEarth, this.earthUp), t.rotateVertical(r * -m.y, this.pointOnEarth), t.checkTerrainCollision(), t.update();
8206
+ r > 3e-3 && (r = 3e-3), t.rotateHorizontal(r * -m.x, !1, this.pointOnEarth, this.earthUp), t.rotateVertical(r * -m.y, this.pointOnEarth), t.checkTerrainCollision(), t.update(), this.events.dispatch(this.events.drag, this);
8197
8207
  }
8198
8208
  this.scaleRot = 0;
8199
8209
  } else if (e.sys.touches.length === 1) {
@@ -8204,10 +8214,10 @@ class wa extends J {
8204
8214
  if (o) if (t.slope > 0.2) {
8205
8215
  this.qRot = F.getRotationBetweenVectors(o.normal(), s.grabbedPoint.normal());
8206
8216
  let l = this.qRot;
8207
- t.eye = l.mulVec3(t.eye), t.rotate(l), t.checkTerrainCollision(), t.update(), this.scaleRot = 1;
8217
+ t.eye = l.mulVec3(t.eye), t.rotate(l), t.checkTerrainCollision(), t.update(), this.events.dispatch(this.events.drag, this), this.scaleRot = 1;
8208
8218
  } else {
8209
8219
  let l = s.grabbedPoint, h = v.add(l, t.getUp()), c = v.add(l, l.getNormal()), d = t.unproject(s.x, s.y), u = new v();
8210
- new U(t.eye, d).hitPlaneRes(ke.fromPoints(l, h, c), u) === U.INSIDE && (t.eye = this._eye0.addA(u.subA(l).negate()), t.checkTerrainCollision(), t.update(), this.scaleRot = 0);
8220
+ new U(t.eye, d).hitPlaneRes(ke.fromPoints(l, h, c), u) === U.INSIDE && (t.eye = this._eye0.addA(u.subA(l).negate()), t.checkTerrainCollision(), t.update(), this.events.dispatch(this.events.drag, this), this.scaleRot = 0);
8211
8221
  }
8212
8222
  }
8213
8223
  }
@@ -8220,7 +8230,7 @@ class wa extends J {
8220
8230
  else {
8221
8231
  e.controlsBag.scaleRot = this.scaleRot;
8222
8232
  let r = this.qRot.slerp(F.IDENTITY, 1 - this.scaleRot * this.scaleRot * this.scaleRot).normalize();
8223
- r.x || r.y || r.z || (this.scaleRot = 0), t.eye = r.mulVec3(t.eye), t.rotate(r), t.checkTerrainCollision(), t.update();
8233
+ r.x || r.y || r.z || (this.scaleRot = 0), t.eye = r.mulVec3(t.eye), t.rotate(r), t.checkTerrainCollision(), t.update(), this.events.dispatch(this.events.inertiamove, this);
8224
8234
  }
8225
8235
  t.eye.distance(i) / t.getAltitude() > 0.01 ? (this.planet.layerLock.lock(this._keyLock), this.planet.terrainLock.lock(this._keyLock), this.planet._normalMapCreator.lock(this._keyLock)) : (this.planet.layerLock.free(this._keyLock), this.planet.terrainLock.free(this._keyLock), this.planet._normalMapCreator.free(this._keyLock));
8226
8236
  }
@@ -8256,12 +8266,12 @@ class Ca extends J {
8256
8266
  }
8257
8267
  }
8258
8268
  }
8259
- class fh extends dt {
8269
+ class ph extends dt {
8260
8270
  constructor(e = {}) {
8261
8271
  var t, i;
8262
- super(e.name), this._ignoreTerrain = !1, this.events = new is(gh), this._ignoreTerrain = e.ignoreTerrain == null || e.ignoreTerrain, this._onSelect = e.onSelect || null, this._autoSelectionHide = e.autoSelectionHide || !1, this._planet = e.planet || null, this._startLonLat = null, this._heading = 0, this._propsLabel = new V({ name: "propsLabel", label: { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 18] } }), (i = (t = this._propsLabel) == null ? void 0 : t.label) == null || i.setVisibility(!1), this._trackEntity = new V({ polyline: { path3v: [], thickness: 3.8, color: "rgb(455,455,455)", isClosed: !1 } }), this._trackEntity.polyline.altitude = 0.01;
8272
+ super(e.name), this._ignoreTerrain = !1, this.events = new is(mh), this._ignoreTerrain = e.ignoreTerrain == null || e.ignoreTerrain, this._onSelect = e.onSelect || null, this._autoSelectionHide = e.autoSelectionHide || !1, this._planet = e.planet || null, this._startLonLat = null, this._heading = 0, this._propsLabel = new V({ name: "propsLabel", label: { text: "", size: 11, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "center", offset: [0, 18] } }), (i = (t = this._propsLabel) == null ? void 0 : t.label) == null || i.setVisibility(!1), this._trackEntity = new V({ polyline: { path3v: [], thickness: 3.8, color: "rgb(455,455,455)", isClosed: !1 } }), this._trackEntity.polyline.altitude = 0.01;
8263
8273
  let r = Z.createCylinder(1.1, 0, 2.7, 20, 1, !0, !1, 0, 0, 0);
8264
- this._cornerEntity = [new V({ geoObject: { scale: 1, instanced: !0, tag: "selection", color: "rgb(0,305,0)", object3d: r }, properties: { name: "start" } }), new V({ geoObject: { scale: 1, instanced: !0, tag: "selection", color: "rgb(455,0,0)", object3d: r }, properties: { name: "end" } })], this._trackLayer = new fe("track", { entities: [this._trackEntity, this._propsLabel], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !1 }), this._cornersLayer = new fe("corners", { entities: [this._cornerEntity[0], this._cornerEntity[1]], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 4e6, 0.01], pickingScale: 2 });
8274
+ this._cornerEntity = [new V({ geoObject: { scale: 1, instanced: !0, tag: "selection", color: "rgb(0,305,0)", object3d: r }, properties: { name: "start" } }), new V({ geoObject: { scale: 1, instanced: !0, tag: "selection", color: "rgb(455,0,0)", object3d: r }, properties: { name: "end" } })], this._trackLayer = new ge("track", { entities: [this._trackEntity, this._propsLabel], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !1 }), this._cornersLayer = new ge("corners", { entities: [this._cornerEntity[0], this._cornerEntity[1]], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 4e6, 0.01], pickingScale: 2 });
8265
8275
  }
8266
8276
  set ignoreTerrain(e) {
8267
8277
  this._ignoreTerrain = e;
@@ -8349,12 +8359,12 @@ class fh extends dt {
8349
8359
  return this._planet ? this._planet.ellipsoid : null;
8350
8360
  }
8351
8361
  }
8352
- const gh = ["add", "remove", "mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter"];
8353
- function Qe(a, e) {
8362
+ const mh = ["add", "remove", "mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter"];
8363
+ function Ke(a, e) {
8354
8364
  return new Date(+a + 1e3 * e);
8355
8365
  }
8356
- function ph(a, e = !0, t = !1) {
8357
- let i = vh[a.getMonth()], r = a.getUTCDate(), s = a.getUTCFullYear();
8366
+ function vh(a, e = !0, t = !1) {
8367
+ let i = xh[a.getMonth()], r = a.getUTCDate(), s = a.getUTCFullYear();
8358
8368
  if (e) {
8359
8369
  let n = a.getUTCHours().toString().padStart(2, "0"), o = a.getUTCMinutes().toString().padStart(2, "0"), l = a.getUTCSeconds().toString().padStart(2, "0");
8360
8370
  return t ? `${i} ${r} ${s} ${n}:${o}:${l}.${a.getUTCMilliseconds().toString().padStart(3, "0")}` : `${i} ${r} ${s} ${n}:${o}:${l}`;
@@ -8364,13 +8374,13 @@ function ph(a, e = !0, t = !1) {
8364
8374
  function Ys(a, e = 0, t = 10, i = 2, r = "white") {
8365
8375
  a.lineWidth = i, a.strokeStyle = r, a.beginPath(), a.moveTo(e, 0), a.lineTo(e, t), a.stroke();
8366
8376
  }
8367
- function mh(a, e, t, i, r = "12px Arial", s = "black", n = "left", o = "bottom", l = 0) {
8377
+ function yh(a, e, t, i, r = "12px Arial", s = "black", n = "left", o = "bottom", l = 0) {
8368
8378
  a.save(), a.translate(t, i), a.rotate(l * j), a.fillStyle = s, a.textBaseline = o, a.font = r, a.textAlign = n, a.fillText(e, 0, 0), a.restore();
8369
8379
  }
8370
- const _r = [[1e-3, 10], [2e-3, 10], [5e-3, 10], [0.01, 10], [0.02, 10], [0.05, 10], [0.1, 10], [0.25, 10], [0.5, 5], [1, 10], [2, 10], [5, 5], [10, 10], [15, 15], [30, 6], [60, 12], [120, 12], [300, 5], [600, 10], [900, 15], [1800, 6], [3600, 12], [7200, 10], [14400, 4], [21600, 6], [43200, 12], [86400, 24], [172800, 2], [345600, 4], [604800, 7], [1296e3, 15], [2592e3, 5], [5184e3, 6], [7776e3, 9], [15552e3, 18], [31536e3, 12], [63072e3, 2], [126144e3, 4], [15768e4, 5], [31536e4, 10], [63072e4, 2], [126144e4, 4], [15768e5, 5], [31536e5, 10], [63072e5, 2], [126144e5, 4], [15768e6, 5], [31536e6, 10]], vh = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], yh = ["change", "current"];
8371
- class xh {
8380
+ const _r = [[1e-3, 10], [2e-3, 10], [5e-3, 10], [0.01, 10], [0.02, 10], [0.05, 10], [0.1, 10], [0.25, 10], [0.5, 5], [1, 10], [2, 10], [5, 5], [10, 10], [15, 15], [30, 6], [60, 12], [120, 12], [300, 5], [600, 10], [900, 15], [1800, 6], [3600, 12], [7200, 10], [14400, 4], [21600, 6], [43200, 12], [86400, 24], [172800, 2], [345600, 4], [604800, 7], [1296e3, 15], [2592e3, 5], [5184e3, 6], [7776e3, 9], [15552e3, 18], [31536e3, 12], [63072e3, 2], [126144e3, 4], [15768e4, 5], [31536e4, 10], [63072e4, 2], [126144e4, 4], [15768e5, 5], [31536e5, 10], [63072e5, 2], [126144e5, 4], [15768e6, 5], [31536e6, 10]], xh = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], bh = ["change", "current"];
8381
+ class wh {
8372
8382
  constructor(e = {}) {
8373
- this.events = ge(yh), this._current = e.current || /* @__PURE__ */ new Date(), this._rangeStart = e.rangeStart || /* @__PURE__ */ new Date(), this._rangeEnd = e.rangeEnd || Qe(this._rangeStart, 3600), this._range = this._rangeEnd.getTime() - this._rangeStart.getTime(), this._minDate = e.minDate || null, this._maxDate = e.maxDate || null, this.multiplier = e.multiplier != null ? e.multiplier : 1, this._requestAnimationFrameId = 0, this._prevNow = 0, this.dt = 0;
8383
+ this.events = de(bh), this._current = e.current || /* @__PURE__ */ new Date(), this._rangeStart = e.rangeStart || /* @__PURE__ */ new Date(), this._rangeEnd = e.rangeEnd || Ke(this._rangeStart, 3600), this._range = this._rangeEnd.getTime() - this._rangeStart.getTime(), this._minDate = e.minDate || null, this._maxDate = e.maxDate || null, this.multiplier = e.multiplier != null ? e.multiplier : 1, this._requestAnimationFrameId = 0, this._prevNow = 0, this.dt = 0;
8374
8384
  }
8375
8385
  play() {
8376
8386
  this._requestAnimationFrameId || (this._prevNow = window.performance.now(), this._animationFrameCallback());
@@ -8424,8 +8434,8 @@ class xh {
8424
8434
  e !== this._rangeEnd && (this._rangeEnd = e, this._range = this._rangeEnd.getTime() - this._rangeStart.getTime(), this.events.dispatch(this.events.change, e));
8425
8435
  }
8426
8436
  }
8427
- const zt = 1e-3, bh = ["startdrag", "stopdrag", "startdragcurrent", "stopdragcurrent", "setcurrent", "reset", "play", "playback", "pause", "visibility"], Ws = "#bfbfbf";
8428
- class wh extends Ce {
8437
+ const zt = 1e-3, Ch = ["startdrag", "stopdrag", "startdragcurrent", "stopdragcurrent", "setcurrent", "reset", "play", "playback", "pause", "visibility"], qs = "#bfbfbf";
8438
+ class Th extends Ce {
8429
8439
  constructor(e = {}) {
8430
8440
  super({ template: `<div class="og-timeline">
8431
8441
 
@@ -8446,7 +8456,7 @@ class wh extends Ce {
8446
8456
  </div>
8447
8457
  </div>
8448
8458
 
8449
- </div>`, model: new xh({ rangeStart: e.rangeStart, rangeEnd: e.rangeEnd, current: e.currentDate, minDate: e.minDate, maxDate: e.maxDate }) }), this._onMouseWheel = (t) => {
8459
+ </div>`, model: new wh({ rangeStart: e.rangeStart, rangeEnd: e.rangeEnd, current: e.currentDate, minDate: e.minDate, maxDate: e.maxDate }) }), this._onMouseWheel = (t) => {
8450
8460
  if (this._isMouseOver) {
8451
8461
  let i = this._canvasEl.getBoundingClientRect(), r = t.clientX - i.left, s = -(r - 0.5 * this.clientWidth), n = this.model.rangeStartTime + this._millisecondsInPixel * r;
8452
8462
  this._zoom(n, s, Math.sign(t.wheelDelta));
@@ -8475,12 +8485,12 @@ class wh extends Ce {
8475
8485
  }, this._onMouseMove = (t) => {
8476
8486
  if (this._isDragging) {
8477
8487
  let i = (this._clickPosX - t.clientX) * this._millisecondsInPixel * zt;
8478
- this.model.set(Qe(this._clickRangeStart, i), Qe(this._clickRangeEnd, i));
8488
+ this.model.set(Ke(this._clickRangeStart, i), Ke(this._clickRangeEnd, i));
8479
8489
  } else if (this._isCurrentDragging) {
8480
- let i = (this._clickPosX - t.clientX) * this._millisecondsInPixel * zt, r = Qe(this._clickCurrentDate, -i);
8481
- r >= this.model.rangeStart && r <= this.model.rangeEnd && (this.model.current = Qe(this._clickCurrentDate, -i));
8490
+ let i = (this._clickPosX - t.clientX) * this._millisecondsInPixel * zt, r = Ke(this._clickCurrentDate, -i);
8491
+ r >= this.model.rangeStart && r <= this.model.rangeEnd && (this.model.current = Ke(this._clickCurrentDate, -i));
8482
8492
  }
8483
- }, this.events = this.events.registerNames(bh), this.fillStyle = e.fillStyle || "rgba(64, 59, 59, 1.0)", this.$controls = null, this._frameEl = null, this._currentEl = null, this._canvasEl = document.createElement("canvas"), this._ctx = this._canvasEl.getContext("2d"), this._isMouseOver = !1, this._isDragging = !1, this._isCurrentDragging = !1, this._isCurrentMouseOver = !1, this._minWidth = 330, this._canvasScale = 2, this._millisecondsInPixel = 0, this._clickPosX = 0, this._clickRangeStart = /* @__PURE__ */ new Date(), this._clickRangeEnd = /* @__PURE__ */ new Date(), this._clickCurrentDate = /* @__PURE__ */ new Date(), this._clickTime = 0, this._clickDelay = 450, this._onResizeObserver_ = this._onResizeObserver.bind(this), this._resizeObserver = new ResizeObserver(this._onResizeObserver_), this._pauseBtn = new _e({ classList: ["og-timeline-control_button"], icon: `<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 512 512" height="512px" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Layer_6"><rect fill="#252525" height="320" width="60" x="153" y="96"/><rect fill="#252525" height="320" width="60" x="299" y="96"/></g></svg>`, name: "pause" }), this._playBtn = new _e({ classList: ["og-timeline-control_button"], icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8 5v14l11-7z" style="fill: black;"/></svg>', name: "play" }), this._buttons = new ao({ buttons: [this._pauseBtn, this._playBtn] }), this._visibility = !1;
8493
+ }, this.events = this.events.registerNames(Ch), this.fillStyle = e.fillStyle || "rgba(64, 59, 59, 1.0)", this.$controls = null, this._frameEl = null, this._currentEl = null, this._canvasEl = document.createElement("canvas"), this._ctx = this._canvasEl.getContext("2d"), this._isMouseOver = !1, this._isDragging = !1, this._isCurrentDragging = !1, this._isCurrentMouseOver = !1, this._minWidth = 330, this._canvasScale = 2, this._millisecondsInPixel = 0, this._clickPosX = 0, this._clickRangeStart = /* @__PURE__ */ new Date(), this._clickRangeEnd = /* @__PURE__ */ new Date(), this._clickCurrentDate = /* @__PURE__ */ new Date(), this._clickTime = 0, this._clickDelay = 450, this._onResizeObserver_ = this._onResizeObserver.bind(this), this._resizeObserver = new ResizeObserver(this._onResizeObserver_), this._pauseBtn = new fe({ classList: ["og-timeline-control_button"], icon: `<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 512 512" height="512px" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Layer_6"><rect fill="#252525" height="320" width="60" x="153" y="96"/><rect fill="#252525" height="320" width="60" x="299" y="96"/></g></svg>`, name: "pause" }), this._playBtn = new fe({ classList: ["og-timeline-control_button"], icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8 5v14l11-7z" style="fill: black;"/></svg>', name: "play" }), this._buttons = new ao({ buttons: [this._pauseBtn, this._playBtn] }), this._visibility = !1;
8484
8494
  }
8485
8495
  _onResizeObserver() {
8486
8496
  this.resize();
@@ -8528,10 +8538,10 @@ class wh extends Ce {
8528
8538
  this.model.multiplier = -1 * Math.abs(this.model.multiplier), this.model.play(), this.events.dispatch(this.events.playback, this.model);
8529
8539
  }
8530
8540
  _zoom(e, t, i) {
8531
- let r = (e - (this.model.rangeStartTime + 0.5 * this.model.range)) * zt, s = Qe(this.model.rangeStart, r), n = Qe(this.model.rangeEnd, r), o = (n.getTime() - s.getTime()) / 20 * zt, l = Qe(s, o * i), h = Qe(n, -o * i), c = (h.getTime() - l.getTime()) / this.clientWidth;
8541
+ let r = (e - (this.model.rangeStartTime + 0.5 * this.model.range)) * zt, s = Ke(this.model.rangeStart, r), n = Ke(this.model.rangeEnd, r), o = (n.getTime() - s.getTime()) / 20 * zt, l = Ke(s, o * i), h = Ke(n, -o * i), c = (h.getTime() - l.getTime()) / this.clientWidth;
8532
8542
  if (c < 31536e6 && c > 0.1) {
8533
8543
  let d = c * t * zt;
8534
- this.model.set(Qe(l, d), Qe(h, d));
8544
+ this.model.set(Ke(l, d), Ke(h, d));
8535
8545
  }
8536
8546
  }
8537
8547
  get clientWidth() {
@@ -8566,19 +8576,19 @@ class wh extends Ce {
8566
8576
  let i = 1e3 * e[0], r = i / this._millisecondsInPixel, s = e[1], n = (t = this.model.rangeStartTime) - t % i, o = e[0] < 1, l = e[0] < 86400;
8567
8577
  for (let h = n, c = this.model.rangeEndTime + i; h < c; h += i) {
8568
8578
  let d = this.getOffsetByTime(h);
8569
- d >= 0 && d <= this.clientWidth * this._canvasScale && Ys(this._ctx, d * this._canvasScale, 10 * this._canvasScale, 2 * this._canvasScale, Ws);
8579
+ d >= 0 && d <= this.clientWidth * this._canvasScale && Ys(this._ctx, d * this._canvasScale, 10 * this._canvasScale, 2 * this._canvasScale, qs);
8570
8580
  for (let u = 1; u < s; u++) {
8571
8581
  let g = d + u * (r / s);
8572
- g >= 0 && g <= this.clientWidth * this._canvasScale && Ys(this._ctx, g * this._canvasScale, 5 * this._canvasScale, 1 * this._canvasScale, Ws);
8582
+ g >= 0 && g <= this.clientWidth * this._canvasScale && Ys(this._ctx, g * this._canvasScale, 5 * this._canvasScale, 1 * this._canvasScale, qs);
8573
8583
  }
8574
- mh(this._ctx, ph(new Date(h), l, o), d * this._canvasScale, 26 * this._canvasScale, "24px monospace", "#bfbfbf", "center");
8584
+ yh(this._ctx, vh(new Date(h), l, o), d * this._canvasScale, 26 * this._canvasScale, "24px monospace", "#bfbfbf", "center");
8575
8585
  }
8576
8586
  this._drawCurrent();
8577
8587
  }
8578
8588
  var t;
8579
8589
  }
8580
8590
  }
8581
- function qs(a, e) {
8591
+ function Ws(a, e) {
8582
8592
  const t = new Date(a);
8583
8593
  return t.setHours(t.getHours() + e), t;
8584
8594
  }
@@ -8591,10 +8601,10 @@ class pi {
8591
8601
  }), Object.freeze(this);
8592
8602
  }
8593
8603
  }
8594
- const Ch = ["startcollecting", "profilecollected", "clear"];
8595
- class Th {
8604
+ const Eh = ["startcollecting", "profilecollected", "clear"];
8605
+ class Ah {
8596
8606
  constructor(e = {}) {
8597
- this.events = ge(Ch), this.planet = e.planet || null, this._warningHeightLevel = 5, this._pointsReady = !1, this._isWarning = !1, this._minX = 0, this._planeDistance = this._maxX = 1e3, this._minY = 0, this._maxY = 200, this._drawData = [[], []], this._promiseArr = [], this._promiseCounter = 0, this._pMaxY = 0, this._pMinY = 0, this._pDist = 0, this._pTrackCoords = [], this._pGroundCoords = [], this._pIndex = 0;
8607
+ this.events = de(Eh), this.planet = e.planet || null, this._warningHeightLevel = 5, this._pointsReady = !1, this._isWarning = !1, this._minX = 0, this._planeDistance = this._maxX = 1e3, this._minY = 0, this._maxY = 200, this._drawData = [[], []], this._promiseArr = [], this._promiseCounter = 0, this._pMaxY = 0, this._pMinY = 0, this._pDist = 0, this._pTrackCoords = [], this._pGroundCoords = [], this._pIndex = 0;
8598
8608
  }
8599
8609
  bindPlanet(e) {
8600
8610
  this.planet = e;
@@ -8690,8 +8700,8 @@ class Th {
8690
8700
  this._promiseCounter = 0, this._pointsReady = !1, this._isWarning = !1, this._drawData = [[], []], this._pMaxY = 0, this._pMinY = 0, this._pDist = 0, this._pTrackCoords = [], this._pGroundCoords = [], this._pIndex = 0, this.events.dispatch(this.events.clear, this._drawData, this);
8691
8701
  }
8692
8702
  }
8693
- const Ta = "rgb(198, 198, 198)", $s = [Ta, "rgb(255, 255, 0)", "rgb(255, 0, 0)"], Eh = ["startdrag", "stopdrag", "pointer", "mouseenter", "mouseleave", "dblclick", "tracklength", "groundlength", "warninglength", "collisionlength"];
8694
- class Ah extends Ce {
8703
+ const Ta = "rgb(198, 198, 198)", $s = [Ta, "rgb(255, 255, 0)", "rgb(255, 0, 0)"], Lh = ["startdrag", "stopdrag", "pointer", "mouseenter", "mouseleave", "dblclick", "tracklength", "groundlength", "warninglength", "collisionlength"];
8704
+ class Ph extends Ce {
8695
8705
  constructor(e = {}) {
8696
8706
  super({ template: `<div class="og-elevationprofile">
8697
8707
  <div class="og-elevationprofile-loading" style="display: none;">
@@ -8704,7 +8714,7 @@ class Ah extends Ce {
8704
8714
  </div>
8705
8715
  </div>
8706
8716
  </div>
8707
- </div>`, model: new Th() }), this._onMouseDblClick = (t) => {
8717
+ </div>`, model: new Ah() }), this._onMouseDblClick = (t) => {
8708
8718
  let i, r = this.$canvas.getBoundingClientRect(), s = t.clientX - r.left, n = this._leftDistance + (this._rightDistance - this._leftDistance) * s / this.clientWidth, o = this.model.drawData[1], l = this.model.drawData[0];
8709
8719
  n < 0 ? (i = 1, n = 0, s = (0 - this._leftDistance) * this.clientWidth / (this._rightDistance - this._leftDistance)) : n > this.model.planeDistance ? (i = o.length - 1, n = this.model.planeDistance, s = (n - this._leftDistance) * this.clientWidth / (this._rightDistance - this._leftDistance)) : i = -1 - Rt(o, n, (m, y) => m - y[0]);
8710
8720
  let h = o[i - 1], c = o[i], d = (n - h[0]) / (c[0] - h[0]), u = h[1] + d * (c[1] - h[1]), g = h[4], f = l[g], p = l[g + 1];
@@ -8739,7 +8749,7 @@ class Ah extends Ce {
8739
8749
  let i = Math.sign(t.wheelDelta) * (this._rightDistance - this._leftDistance) / 20, r = this.$canvas.getBoundingClientRect(), s = t.clientX - r.left, n = s - 0.5 * this.$canvas.clientWidth, o = n * this._canvasScale / this._pixelsInMeter_x, l = o + this._leftDistance + i, h = o + this._rightDistance - i;
8740
8750
  o = -n * (h - l) / this.clientWidth, this.setFrame(l + o, h + o), this.redrawPointerCanvas(s);
8741
8751
  }
8742
- }, this.events = this.events.registerNames(Eh), this.fillStyle = e.fillStyle || "rgb(63, 63, 63)", this._customFrame = !1, this._leftDistance = 0, this._rightDistance = 0, this._pixelsInMeter_x = 0, this._pixelsInMeter_y = 0, this._canvasScale = 2, this.$canvas = document.createElement("canvas"), this.$canvas.style.position = "absolute", this._ctx = this.$canvas.getContext("2d"), this.$pointerCanvas = document.createElement("canvas"), this.$pointerCanvas.style.pointerEvents = "none", this.$pointerCanvas.style.position = "absolute", this._pointerCtx = this.$pointerCanvas.getContext("2d"), this.$loading = null, this._isMouseOver = !1, this._isDragging = !1, this._clickPosX = 0, this._clickLeftDistance = 0, this._clickRightDistance = 0, this._timeStartHandler = 0, this._onResizeObserver_ = this._onResizeObserver.bind(this), this._resizeObserver = new ResizeObserver(this._onResizeObserver_);
8752
+ }, this.events = this.events.registerNames(Lh), this.fillStyle = e.fillStyle || "rgb(63, 63, 63)", this._customFrame = !1, this._leftDistance = 0, this._rightDistance = 0, this._pixelsInMeter_x = 0, this._pixelsInMeter_y = 0, this._canvasScale = 2, this.$canvas = document.createElement("canvas"), this.$canvas.style.position = "absolute", this._ctx = this.$canvas.getContext("2d"), this.$pointerCanvas = document.createElement("canvas"), this.$pointerCanvas.style.pointerEvents = "none", this.$pointerCanvas.style.position = "absolute", this._pointerCtx = this.$pointerCanvas.getContext("2d"), this.$loading = null, this._isMouseOver = !1, this._isDragging = !1, this._clickPosX = 0, this._clickLeftDistance = 0, this._clickRightDistance = 0, this._timeStartHandler = 0, this._onResizeObserver_ = this._onResizeObserver.bind(this), this._resizeObserver = new ResizeObserver(this._onResizeObserver_);
8743
8753
  }
8744
8754
  _onResizeObserver() {
8745
8755
  this.resize();
@@ -8883,9 +8893,9 @@ class Ah extends Ce {
8883
8893
  }
8884
8894
  }
8885
8895
  }
8886
- let Lh = Z.createCylinder(0.33, 0, 1, 20, 1, !0, !1, 0, 0, 0), Ph = Z.createCylinder(0.33, 0.33, 1.1, 20, 1, !0, !0, 0, -0.55, 0);
8887
- const Sh = { startPosition: new v(), endPosition: new v(), startColor: "rgba(255,131,0,0.2)", endColor: "rgba(255,131,0,1.0)", thickness: 2.7 }, Rh = { src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNBNAaMQAAAiLSURBVHhe7Z0r0BxFEMcjIhAIRERERAQCgUAgEBEIBAIRiUAgIiIQiAgEIlUREQgEIgIREYFAIBCIiAgEIiIiAoGIoHimqPAKz5CP/t23/8vcbe89d/dmZ/pf9avLdZK72e6+ee3M7Imjo6Opc8o4b7xn3DIeGEOJz+Y7+C6+k+/2yjQZXOMEOGdcNe4anv4wvjV+m73bT3wGn8VneqIMlIUyeWXNGteYKTj4feNrI9W/xi/HfxxVfCffnYqyUcbJJINrzIjTxjvGV0aqn43fj/+YhSgLZUpFmd81uAbv2rLANWbAC8ZHxp+GxC8ufZ+rKGNaI1FLcC1ck3etB8U1HhCqzk8N6T/jENV7X6LsXIN008iqeXCNB+B54zND+tt4ePzHIsS1cE0SicA1e74YFdc4IgyjrhvqTP3TvJas9Bq59oP2EVzjCJw03jI0TCMBcurUDS1qBCU9PnjbwCeerwbFNQ4MVd9tQ5pyG7+v0mvHJ6N3FF3jgFwy1JPvmlipUfIFvmHY6/luEFzjANDO0fGRfm1eQ0+UzlriqzOG58tecY0985LxnYH+al5D3ZKP8Bm+83zaG66xRy4a6uzU3NZvK/nqkUEH0fNtL7jGHqBH+4EhTWEGL2ddMwYZJbjGPaGgHxuIDA7tJ/mQGdLek8A17sHTxucGiva+P6kGxbf42PP9TrjGHUmDH1V+/xokCVzjDkTwx1HvSeAat4R2SWP8CP7wko9ZmrZ3n8A1bok6fBH88SRf4/u9ksA1bgFr4ZDG+qHxpLuKLFD1YrMRrnFDLhjocfMaGl8aIjLh5sVoLa5xA140+lhxG+pHNAk7TRu7xjXQ+9TK3Jru4ecqxYB7B88YXsw6cY1rUKcv7ujlI907YLbQi1knrnEFavej05ef1ClkpZUXOxfX2AH3p6Pdz1/E6FnDi2EL19iBVu3Gbd18pdgwU+jFsIVrdHjDQHGDJ39pkojm2ovlAq5xCXqWWtETmo7uG2t3L7vGJTTbF73+6UhNARtVvZjOcY0JZ42Y45+uGK2t7BC6xoQbBoqO3/SkGpt5Gy+2M1xjw3MGGZRubgxNS5qv6dxw4hob9OuPsf90pWnizlrANRpM+sSvvwypFqBGb8W6ZWjgHjOKtn/6Ug3OMv1WrFsG4ykjqv3yxGiudbdw4U2DbvjEuL8cqSZv7TJaeNOg1b2h8nTHWIj3whuDSQOUHmcSKkPagr5wNE0afLhioOj8lSc16QvTw2nwYfk8vlB5YjnfPOZp8FX9x8kd5Uqju3kzkCYAPUQU1X+5UjPACaatBEiPcAmVrfmKIQU/Jn/qEpNCs82lSgCOL0U/Na+hcvVD8/qKMU8AjiZDsdGjfCnGl415AnyCJVSVZptIlAD3sISqEgt9ZwnAHSIU07/1SMv7T5EA7CpFPzavofKljuA5EkCbPmICqB4p1m+SAPQGQ3XqMgnAQwtCdeo6CRBTwPXqJgnAKpFQnbpDAsQcQL26RwLEzt96dZ8ECFWsSIDKFQlQuSIBKlckQOUiAThLJlSnZqOAmAeoV7N5gJgJrFd3SQCePBGqU7dIgLgbWK9mdwO1ITRUn66QADoQIlYE1SPF+gIJEGsC69PCmkDOk0WxKrgeaQf4aRIA9AiYUD2a7wuA2BlUn1gKOE8A9ouj2BtYvh42r4z+5gnATlEUHcHy9X3z+poxT4A4H6Aecfxv63wAiOXh9ah1QgioHxAnhJYr1fKz9h/SBOA0aRSnhJUrJQCP/m0lAMQ5geWr85xA0I2haAbKk4b4K08KVTMQ08LlSU37vPqHNPgiVgiVK5r4hXgvvGm4aKC4PVyOFMuNnhfABEFMCpWnjZ8YAjxfBkUiTF/q/LH0rxXrlqFBJ4friVOh6Uod+oUHRYiWIYFnzaG4QzhdqefPo/+9GK9MAJ42SQ0QtcB0pV//wtAvxTUmqBaIiaHpSff9Z0fCduEaE+gLxBNEpyliRuzctl+4xiU0Ioh5gelIsfrQ8GI6xzUuwdjxgRGalojZacOL6RzX6KDNI0wmhPKWev6tWT8P19jBFwaKDmG+0pD9tnHS8OK4gGvsgDuFUQPkr7UdvxTXuAI9Wk7nzYfykX6clwwvdi6ucQ3MKqEYFeQjxYKFvRtV/cI1roG9hDpdNNYPHl6KAWc9re31L+MaN4DHzMUUcT4iFi8bXqxW4ho3RP2Bx81raHw9al557J8Xo7W4xi24ZqAYHYwv+XztbN8qXOMW0OFQpzBuG48n+XrrTt8yrnFLWELGViMUSTC85GN8Ptvftw+ucQcYGTD7hCIJhpN8y8rtrXv8Hq5xR7hpdNdAkQT9Sz7Fx70EH1zjHlAl6Z5BdAz7k3xJLdta2bsPrnFP0j5BzBXsL/mwlzZ/GdfYA/RMbxgo5gl2l3yHL/fq7XfhGnskfSpp3DvYXKmvZs/5HwrX2DOcP6QVRVqoGOqWfMSmnFcNz6e94RoH4IyhziGLFeMmUlv4RItv8RU+83zZK65xIGjDOH9AnZoYKj6RfIFvrhqDtPcernFg2KTwpSHVvMQsvXa2bnNus+ezwXCNI6DaQOPbGoeLumZ8gC9G+9WnuMYRYeOJdh+hGiaP0mvkiF584PlmFFzjAWAxgzqJqMRESK+Ja91pAUffuMYDwvGlaSJQTU65j0DZ0+aNaztveNd+EFxjBjB3QPWYOm9Kh1WkZeUa2KDJNXnXelBcY0bQPnKs2fIj7nOsFZbLRJkp+0Hb+HW4xgzhMGuqTubEl2sC9igcYpqZ71zeH0HZKCNlpczetWSFa8wcJQO7lrtONiUQ3xh9TDbxGXxWVxNEGSjLZIKe4honxlnjdYMFqnSyhhxB8Nl8B9/Fd/LdXpkmg2ssANpdfpEsXacdZq6BJ6Tya+VZyWnnUsLG3/Fv+Lf8H/4vn8FnZd2W78bRif8BxMOwtJg5Ph4AAAAASUVORK5CYII=", color: "rgb(255,131,0)", size: [8, 8] }, Mh = { text: "", face: "arial", size: 10.5, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "left", offset: [5, 15, -5] }, Xs = { face: "arial", text: "", size: 10.5, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "right", offset: [-47, 25, 0] }, Bh = { instanced: !0, tag: "ground-pointer", color: "rgb(0,305,0)", object3d: Lh }, kh = { instanced: !0, tag: "head-pointer", color: "rgb(305,305,0)", object3d: Ph };
8888
- class Ih extends dt {
8896
+ let Sh = Z.createCylinder(0.33, 0, 1, 20, 1, !0, !1, 0, 0, 0), Rh = Z.createCylinder(0.33, 0.33, 1.1, 20, 1, !0, !0, 0, -0.55, 0);
8897
+ const Mh = { startPosition: new v(), endPosition: new v(), startColor: "rgba(255,131,0,0.2)", endColor: "rgba(255,131,0,1.0)", thickness: 2.7 }, Bh = { src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNBNAaMQAAAiLSURBVHhe7Z0r0BxFEMcjIhAIRERERAQCgUAgEBEIBAIRiUAgIiIQiAgEIlUREQgEIgIREYFAIBCIiAgEIiIiAoGIoHimqPAKz5CP/t23/8vcbe89d/dmZ/pf9avLdZK72e6+ee3M7Imjo6Opc8o4b7xn3DIeGEOJz+Y7+C6+k+/2yjQZXOMEOGdcNe4anv4wvjV+m73bT3wGn8VneqIMlIUyeWXNGteYKTj4feNrI9W/xi/HfxxVfCffnYqyUcbJJINrzIjTxjvGV0aqn43fj/+YhSgLZUpFmd81uAbv2rLANWbAC8ZHxp+GxC8ufZ+rKGNaI1FLcC1ck3etB8U1HhCqzk8N6T/jENV7X6LsXIN008iqeXCNB+B54zND+tt4ePzHIsS1cE0SicA1e74YFdc4IgyjrhvqTP3TvJas9Bq59oP2EVzjCJw03jI0TCMBcurUDS1qBCU9PnjbwCeerwbFNQ4MVd9tQ5pyG7+v0mvHJ6N3FF3jgFwy1JPvmlipUfIFvmHY6/luEFzjANDO0fGRfm1eQ0+UzlriqzOG58tecY0985LxnYH+al5D3ZKP8Bm+83zaG66xRy4a6uzU3NZvK/nqkUEH0fNtL7jGHqBH+4EhTWEGL2ddMwYZJbjGPaGgHxuIDA7tJ/mQGdLek8A17sHTxucGiva+P6kGxbf42PP9TrjGHUmDH1V+/xokCVzjDkTwx1HvSeAat4R2SWP8CP7wko9ZmrZ3n8A1bok6fBH88SRf4/u9ksA1bgFr4ZDG+qHxpLuKLFD1YrMRrnFDLhjocfMaGl8aIjLh5sVoLa5xA140+lhxG+pHNAk7TRu7xjXQ+9TK3Jru4ecqxYB7B88YXsw6cY1rUKcv7ujlI907YLbQi1knrnEFavej05ef1ClkpZUXOxfX2AH3p6Pdz1/E6FnDi2EL19iBVu3Gbd18pdgwU+jFsIVrdHjDQHGDJ39pkojm2ovlAq5xCXqWWtETmo7uG2t3L7vGJTTbF73+6UhNARtVvZjOcY0JZ42Y45+uGK2t7BC6xoQbBoqO3/SkGpt5Gy+2M1xjw3MGGZRubgxNS5qv6dxw4hob9OuPsf90pWnizlrANRpM+sSvvwypFqBGb8W6ZWjgHjOKtn/6Ug3OMv1WrFsG4ykjqv3yxGiudbdw4U2DbvjEuL8cqSZv7TJaeNOg1b2h8nTHWIj3whuDSQOUHmcSKkPagr5wNE0afLhioOj8lSc16QvTw2nwYfk8vlB5YjnfPOZp8FX9x8kd5Uqju3kzkCYAPUQU1X+5UjPACaatBEiPcAmVrfmKIQU/Jn/qEpNCs82lSgCOL0U/Na+hcvVD8/qKMU8AjiZDsdGjfCnGl415AnyCJVSVZptIlAD3sISqEgt9ZwnAHSIU07/1SMv7T5EA7CpFPzavofKljuA5EkCbPmICqB4p1m+SAPQGQ3XqMgnAQwtCdeo6CRBTwPXqJgnAKpFQnbpDAsQcQL26RwLEzt96dZ8ECFWsSIDKFQlQuSIBKlckQOUiAThLJlSnZqOAmAeoV7N5gJgJrFd3SQCePBGqU7dIgLgbWK9mdwO1ITRUn66QADoQIlYE1SPF+gIJEGsC69PCmkDOk0WxKrgeaQf4aRIA9AiYUD2a7wuA2BlUn1gKOE8A9ouj2BtYvh42r4z+5gnATlEUHcHy9X3z+poxT4A4H6Aecfxv63wAiOXh9ah1QgioHxAnhJYr1fKz9h/SBOA0aRSnhJUrJQCP/m0lAMQ5geWr85xA0I2haAbKk4b4K08KVTMQ08LlSU37vPqHNPgiVgiVK5r4hXgvvGm4aKC4PVyOFMuNnhfABEFMCpWnjZ8YAjxfBkUiTF/q/LH0rxXrlqFBJ4friVOh6Uod+oUHRYiWIYFnzaG4QzhdqefPo/+9GK9MAJ42SQ0QtcB0pV//wtAvxTUmqBaIiaHpSff9Z0fCduEaE+gLxBNEpyliRuzctl+4xiU0Ioh5gelIsfrQ8GI6xzUuwdjxgRGalojZacOL6RzX6KDNI0wmhPKWev6tWT8P19jBFwaKDmG+0pD9tnHS8OK4gGvsgDuFUQPkr7UdvxTXuAI9Wk7nzYfykX6clwwvdi6ucQ3MKqEYFeQjxYKFvRtV/cI1roG9hDpdNNYPHl6KAWc9re31L+MaN4DHzMUUcT4iFi8bXqxW4ho3RP2Bx81raHw9al557J8Xo7W4xi24ZqAYHYwv+XztbN8qXOMW0OFQpzBuG48n+XrrTt8yrnFLWELGViMUSTC85GN8Ptvftw+ucQcYGTD7hCIJhpN8y8rtrXv8Hq5xR7hpdNdAkQT9Sz7Fx70EH1zjHlAl6Z5BdAz7k3xJLdta2bsPrnFP0j5BzBXsL/mwlzZ/GdfYA/RMbxgo5gl2l3yHL/fq7XfhGnskfSpp3DvYXKmvZs/5HwrX2DOcP6QVRVqoGOqWfMSmnFcNz6e94RoH4IyhziGLFeMmUlv4RItv8RU+83zZK65xIGjDOH9AnZoYKj6RfIFvrhqDtPcernFg2KTwpSHVvMQsvXa2bnNus+ezwXCNI6DaQOPbGoeLumZ8gC9G+9WnuMYRYeOJdh+hGiaP0mvkiF584PlmFFzjAWAxgzqJqMRESK+Ja91pAUffuMYDwvGlaSJQTU65j0DZ0+aNaztveNd+EFxjBjB3QPWYOm9Kh1WkZeUa2KDJNXnXelBcY0bQPnKs2fIj7nOsFZbLRJkp+0Hb+HW4xgzhMGuqTubEl2sC9igcYpqZ71zeH0HZKCNlpczetWSFa8wcJQO7lrtONiUQ3xh9TDbxGXxWVxNEGSjLZIKe4honxlnjdYMFqnSyhhxB8Nl8B9/Fd/LdXpkmg2ssANpdfpEsXacdZq6BJ6Tya+VZyWnnUsLG3/Fv+Lf8H/4vn8FnZd2W78bRif8BxMOwtJg5Ph4AAAAASUVORK5CYII=", color: "rgb(255,131,0)", size: [8, 8] }, kh = { text: "", face: "arial", size: 10.5, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "left", offset: [5, 15, -5] }, Xs = { face: "arial", text: "", size: 10.5, color: "rgba(455,455,455,1.0)", outlineColor: "rgba(0,0,0,0.34)", outline: 0.23, align: "right", offset: [-47, 25, 0] }, Ih = { instanced: !0, tag: "ground-pointer", color: "rgb(0,305,0)", object3d: Sh }, zh = { instanced: !0, tag: "head-pointer", color: "rgb(305,305,0)", object3d: Rh };
8898
+ class Dh extends dt {
8889
8899
  constructor(e = {}) {
8890
8900
  super("ElevationProfileScene"), this._onLClick = (t) => {
8891
8901
  let i = this._planet.getCartesianFromPixelTerrain(t.pos);
@@ -8920,7 +8930,7 @@ class Ih extends dt {
8920
8930
  this.renderer.controls.mouseNavigation.deactivate(), this._pickedHeadEntity = t.pickingObject;
8921
8931
  }, this._onHeadPointerLUp = (t) => {
8922
8932
  this.renderer.controls.mouseNavigation.activate(), this._pickedHeadEntity = null;
8923
- }, this.events = ge(zh), this._planet = e.planet || null, this._pickedGroundEntity = null, this._pickedHeadEntity = null, this._startClickPos = new N(), this._startEntityPos = new N(), this._clampToGround = !0, this._trackLayer = new fe("track", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._groundPointersLayer = new fe("ground-pointers", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 5e3, 0.02], pickingScale: 1.5 }), this._headPointersLayer = new fe("head-pointers", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 1e4, 0.02], pickingScale: 1 }), this._columnPointersLayer = new fe("column-pointers", { entities: [], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._trackEntity = new V({ polyline: { path3v: [], thickness: 3.8, color: "rgba(0,305,0,0.8)", isClosed: !1 } }), this._trackLayer = new fe("column-pointers", { entities: [this._trackEntity], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._heightsLayer = new fe("heights-labels", { entities: [], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._pointerHeadEntity = new V({ cartesian: new v(), billboard: Rh }), this._pointerLabelEntity = new V({ cartesian: new v(), label: Mh }), this._pointerRayEntity = new V({ cartesian: new v(), ray: Sh }), this._pointerLayer = new fe("pointer", { entities: [this._pointerHeadEntity, this._pointerLabelEntity, this._pointerRayEntity], pickingEnabled: !1, hideInLayerSwitcher: !0 });
8933
+ }, this.events = de(Fh), this._planet = e.planet || null, this._pickedGroundEntity = null, this._pickedHeadEntity = null, this._startClickPos = new N(), this._startEntityPos = new N(), this._clampToGround = !0, this._trackLayer = new ge("track", { entities: [], pickingEnabled: !1, polygonOffsetUnits: -1, relativeToGround: !0, hideInLayerSwitcher: !0 }), this._groundPointersLayer = new ge("ground-pointers", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 5e3, 0.02], pickingScale: 1.5 }), this._headPointersLayer = new ge("head-pointers", { entities: [], pickingEnabled: !0, hideInLayerSwitcher: !0, scaleByDistance: [1, 1e4, 0.02], pickingScale: 1 }), this._columnPointersLayer = new ge("column-pointers", { entities: [], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._trackEntity = new V({ polyline: { path3v: [], thickness: 3.8, color: "rgba(0,305,0,0.8)", isClosed: !1 } }), this._trackLayer = new ge("column-pointers", { entities: [this._trackEntity], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._heightsLayer = new ge("heights-labels", { entities: [], pickingEnabled: !1, hideInLayerSwitcher: !0 }), this._pointerHeadEntity = new V({ cartesian: new v(), billboard: Bh }), this._pointerLabelEntity = new V({ cartesian: new v(), label: kh }), this._pointerRayEntity = new V({ cartesian: new v(), ray: Mh }), this._pointerLayer = new ge("pointer", { entities: [this._pointerHeadEntity, this._pointerLabelEntity, this._pointerRayEntity], pickingEnabled: !1, hideInLayerSwitcher: !0 });
8924
8934
  }
8925
8935
  flyExtent() {
8926
8936
  let e = this._headPointersLayer.getEntities(), t = 180, i = 180, r = -180, s = -180, n = -1e6;
@@ -8936,7 +8946,7 @@ class Ih extends dt {
8936
8946
  return this._planet;
8937
8947
  }
8938
8948
  _createGroundPointer(e, t = 10) {
8939
- let i = this.ellipsoid.getSurfaceNormal3v(e), r = e.add(i.scale(t)), s = new V({ ray: { startPosition: e, endPosition: r, startColor: "rgba(255,255,255,0.2)", endColor: "rgba(355,355,355,1.0)", thickness: 3.2 } }), n = new V({ cartesian: e, geoObject: Bh }), o = new V({ cartesian: r, geoObject: kh, properties: {} }), l = new V({ cartesian: r, label: Xs });
8949
+ let i = this.ellipsoid.getSurfaceNormal3v(e), r = e.add(i.scale(t)), s = new V({ ray: { startPosition: e, endPosition: r, startColor: "rgba(255,255,255,0.2)", endColor: "rgba(355,355,355,1.0)", thickness: 3.2 } }), n = new V({ cartesian: e, geoObject: Ih }), o = new V({ cartesian: r, geoObject: zh, properties: {} }), l = new V({ cartesian: r, label: Xs });
8940
8950
  l.appendChild(new V({ cartesian: r, label: { ...Xs, offset: [-47, 45, 0] } }));
8941
8951
  const h = this._groundPointersLayer.getEntities().length;
8942
8952
  return s.properties = n.properties = o.properties = { index: h, altitude: t, lonLatEll: new A(), headEntity: o, groundEntity: n, columnEntity: s, heightLabelEntity: l }, { headEntity: o, groundEntity: n, columnEntity: s, heightLabelEntity: l };
@@ -9077,10 +9087,10 @@ class Ih extends dt {
9077
9087
  return this._planet ? this._planet.ellipsoid : null;
9078
9088
  }
9079
9089
  }
9080
- const zh = ["change", "addpoint"], Dh = ["reset", "list", "location"];
9081
- class Fh extends Ce {
9090
+ const Fh = ["change", "addpoint"], Oh = ["reset", "list", "location"];
9091
+ class Nh extends Ce {
9082
9092
  constructor(e = {}) {
9083
- super({ ...e, template: '<div class="og-elevationprofile-buttons"></div>' }), this.events = this.events.registerNames(Dh), this.pointListBtn = new _e({ classList: ["og-elevationprofile-button"], icon: '<?xml version="1.0" encoding="utf-8"?><svg width="800px" height="800px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><title>list</title><rect x="10" y="6" width="18" height="2"/><rect x="10" y="24" width="18" height="2"/><rect x="10" y="15" width="18" height="2"/><rect x="4" y="15" width="2" height="2"/><rect x="4" y="6" width="2" height="2"/><rect x="4" y="24" width="2" height="2"/></svg>', title: "Point List" }), this.pointListBtn.events.on("change", (t) => {
9093
+ super({ ...e, template: '<div class="og-elevationprofile-buttons"></div>' }), this.events = this.events.registerNames(Oh), this.pointListBtn = new fe({ classList: ["og-elevationprofile-button"], icon: '<?xml version="1.0" encoding="utf-8"?><svg width="800px" height="800px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><title>list</title><rect x="10" y="6" width="18" height="2"/><rect x="10" y="24" width="18" height="2"/><rect x="10" y="15" width="18" height="2"/><rect x="4" y="15" width="2" height="2"/><rect x="4" y="6" width="2" height="2"/><rect x="4" y="24" width="2" height="2"/></svg>', title: "Point List" }), this.pointListBtn.events.on("change", (t) => {
9084
9094
  this.events.dispatch(this.events.list, t);
9085
9095
  });
9086
9096
  }
@@ -9107,7 +9117,7 @@ class Fh extends Ce {
9107
9117
  }), this;
9108
9118
  }
9109
9119
  }
9110
- class Oh extends st {
9120
+ class Hh extends st {
9111
9121
  constructor(e) {
9112
9122
  super({ title: "Points List", visible: !1, resizable: !0, useHide: !0, top: 150, left: 200, width: 400, height: 300, minHeight: 100, minWidth: 100, ...e }), this._onApplyClick = () => {
9113
9123
  try {
@@ -9134,7 +9144,7 @@ class Oh extends st {
9134
9144
  return i.appendTo(t.select(".og-elevationprofile-list-buttons")), i.events.on("click", this._onApplyClick), this.$textarea = t.select("textarea"), this;
9135
9145
  }
9136
9146
  }
9137
- class Nh extends Ce {
9147
+ class Vh extends Ce {
9138
9148
  constructor(e = {}) {
9139
9149
  super({ ...e, template: `<div class="og-elevationprofile-legend">
9140
9150
  <div class="og-elevationprofile-legend__row og-elevationprofile-legend__track">
@@ -9182,10 +9192,10 @@ class Nh extends Ce {
9182
9192
  this.$collisionValue.innerText = t[0], this.$collisionUnits.innerText = t[1];
9183
9193
  }
9184
9194
  }
9185
- const Wt = "rgb(253,77,77)", os = "rgb(248,115,115)", er = "rgb(73,73,239)", as = "rgb(90,90,253)", tr = "rgb(26,122,26)", ls = "rgb(55,191,55)", Zs = "rgba(255,255,255,0.8)", Vi = 0.1, Ea = new v(Vi, Vi, Vi), Aa = 0.17, Ks = 95e-4, Hh = Z.createCylinder(Ks, Ks, 0.83).scale(Ea), Vh = Z.createCylinder(0, 0.04, Aa, 16, 16, !1, !0, 0, -0.17).scale(Ea);
9195
+ const qt = "rgb(253,77,77)", os = "rgb(248,115,115)", er = "rgb(73,73,239)", as = "rgb(90,90,253)", tr = "rgb(26,122,26)", ls = "rgb(55,191,55)", Zs = "rgba(255,255,255,0.8)", Vi = 0.1, Ea = new v(Vi, Vi, Vi), Aa = 0.17, Qs = 95e-4, Uh = Z.createCylinder(Qs, Qs, 0.83).scale(Ea), Gh = Z.createCylinder(0, 0.04, Aa, 16, 16, !1, !0, 0, -0.17).scale(Ea);
9186
9196
  class fr extends V {
9187
9197
  constructor(e = {}) {
9188
- super({ independentPicking: !0, yaw: e.yaw || 0, pitch: e.pitch || 0, roll: e.roll || 0, forceGlobalPosition: !0, geoObject: { color: e.color || Wt, scale: 1, tag: "line", object3d: Hh }, properties: e.properties }), this._size = e.size != null ? e.size : 1, this.appendChild(new V({ yaw: e.yaw || 0, pitch: e.pitch || 0, roll: e.roll || 0, forceGlobalPosition: !0, geoObject: { color: e.color || Wt, scale: 1, tag: "tip", object3d: Vh }, properties: e.properties }));
9198
+ super({ independentPicking: !0, yaw: e.yaw || 0, pitch: e.pitch || 0, roll: e.roll || 0, forceGlobalPosition: !0, geoObject: { color: e.color || qt, scale: 1, tag: "line", object3d: Uh }, properties: e.properties }), this._size = e.size != null ? e.size : 1, this.appendChild(new V({ yaw: e.yaw || 0, pitch: e.pitch || 0, roll: e.roll || 0, forceGlobalPosition: !0, geoObject: { color: e.color || qt, scale: 1, tag: "tip", object3d: Gh }, properties: e.properties }));
9189
9199
  }
9190
9200
  setSize(e) {
9191
9201
  this._size = e;
@@ -9198,12 +9208,12 @@ class fr extends V {
9198
9208
  this.geoObject.setColorHTML(e), t.geoObject.setColorHTML(e);
9199
9209
  }
9200
9210
  }
9201
- class Uh extends V {
9211
+ class jh extends V {
9202
9212
  constructor(e = {}) {
9203
9213
  super(e), this._size = e.size != null ? e.size : 1, this.childEntities = [], this._init();
9204
9214
  }
9205
9215
  _init() {
9206
- let e = new fr({ color: Wt, yaw: 0, pitch: 0, roll: 90 * j, properties: { opName: "move_x", noEdit: !0, style: { color: Wt, selectColor: os } } }), t = new fr({ color: er, yaw: 0, pitch: 0, roll: 0, properties: { opName: "move_y", noEdit: !0, style: { color: er, selectColor: as } } }), i = new fr({ color: tr, yaw: 0, pitch: 90 * j, roll: 0, properties: { opName: "move_z", noEdit: !0, style: { color: tr, selectColor: ls } } });
9216
+ let e = new fr({ color: qt, yaw: 0, pitch: 0, roll: 90 * j, properties: { opName: "move_x", noEdit: !0, style: { color: qt, selectColor: os } } }), t = new fr({ color: er, yaw: 0, pitch: 0, roll: 0, properties: { opName: "move_y", noEdit: !0, style: { color: er, selectColor: as } } }), i = new fr({ color: tr, yaw: 0, pitch: 90 * j, roll: 0, properties: { opName: "move_z", noEdit: !0, style: { color: tr, selectColor: ls } } });
9207
9217
  this.appendChild(e), this.appendChild(t), this.appendChild(i), this.setSize(this._size);
9208
9218
  }
9209
9219
  setSize(e) {
@@ -9225,24 +9235,24 @@ class Uh extends V {
9225
9235
  return this.childEntities[1].getAbsoluteRotation().mulVec3(v.UP).normalize();
9226
9236
  }
9227
9237
  }
9228
- const Gh = Z.createPlane(1, 1, -0.5, 0, 0.5);
9229
- class jh extends V {
9238
+ const Yh = Z.createPlane(1, 1, -0.5, 0, 0.5);
9239
+ class qh extends V {
9230
9240
  constructor(e = {}) {
9231
9241
  super(e), this._init();
9232
9242
  }
9233
9243
  _init() {
9234
- let e = new V({ independentPicking: !0, scale: 0.025, forceGlobalPosition: !0, geoObject: { color: Zs, tag: "plane", object3d: Gh }, properties: { opName: "move_xz", noEdit: !0, style: { color: Zs, selectColor: "rgba(255,255,255,1.0)" } } });
9244
+ let e = new V({ independentPicking: !0, scale: 0.025, forceGlobalPosition: !0, geoObject: { color: Zs, tag: "plane", object3d: Yh }, properties: { opName: "move_xz", noEdit: !0, style: { color: Zs, selectColor: "rgba(255,255,255,1.0)" } } });
9235
9245
  this.appendChild(e);
9236
9246
  }
9237
9247
  }
9238
- const Ei = 360, gr = 0.95, Qs = new Array(Ei), Js = new Array(Ei), en = new Array(Ei);
9239
- class Yh extends V {
9248
+ const Ei = 360, gr = 0.95, Ks = new Array(Ei), Js = new Array(Ei), en = new Array(Ei);
9249
+ class Wh extends V {
9240
9250
  constructor(e = {}) {
9241
9251
  super(e), this._init();
9242
9252
  }
9243
9253
  _init() {
9244
9254
  const e = Ei;
9245
- let t = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 3.1, color: Wt, isClosed: !0 }, properties: { opName: "rotate_pitch", noEdit: !0, style: { color: Wt, selectColor: os } } }), i = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 2.5, color: er, isClosed: !0 }, properties: { opName: "rotate_yaw", noEdit: !0, style: { color: er, selectColor: as } } }), r = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 2.5, color: tr, isClosed: !0 }, properties: { opName: "rotate_roll", noEdit: !0, style: { color: tr, selectColor: ls } } });
9255
+ let t = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 3.1, color: qt, isClosed: !0 }, properties: { opName: "rotate_pitch", noEdit: !0, style: { color: qt, selectColor: os } } }), i = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 2.5, color: er, isClosed: !0 }, properties: { opName: "rotate_yaw", noEdit: !0, style: { color: er, selectColor: as } } }), r = new V({ independentPicking: !0, polyline: { path3v: [Array.from({ length: e }, (s, n) => new v())], thickness: 2.5, color: tr, isClosed: !0 }, properties: { opName: "rotate_roll", noEdit: !0, style: { color: tr, selectColor: ls } } });
9246
9256
  this.appendChild(t), this.appendChild(i), this.appendChild(r);
9247
9257
  }
9248
9258
  setCartesian3v(e, t = 0) {
@@ -9250,15 +9260,15 @@ class Yh extends V {
9250
9260
  let i = this._entityCollection.renderNode, r = i.renderer.activeCamera, s = i.getFrameRotation(e).conjugate(), n = 0.15 * r.eye.distance(e), o = F.xRotation(0), l = F.yRotation(t), h = F.zRotation(0).mul(o).mul(l).mul(i.getFrameRotation(e)).conjugate();
9251
9261
  for (let g = 0, f = 0, p = 1; g < Ei; g += p, f++) {
9252
9262
  let _ = g * j, m = Math.cos(_), y = Math.sin(_), x = h.mulVec3(new v(0, y, m)).normalize().scale(n).add(e), w = s.mulVec3(new v(m, 0, y)).normalize().scale(n).add(e), b = h.mulVec3(new v(m, y, 0)).normalize().scale(n).add(e);
9253
- Qs[f] = x, Js[f] = w, en[f] = b;
9263
+ Ks[f] = x, Js[f] = w, en[f] = b;
9254
9264
  }
9255
- this.childEntities[0].polyline.setPath3v([Qs], void 0, !0), this.childEntities[1].polyline.setPath3v([Js], void 0, !0), this.childEntities[2].polyline.setPath3v([en], void 0, !0);
9265
+ this.childEntities[0].polyline.setPath3v([Ks], void 0, !0), this.childEntities[1].polyline.setPath3v([Js], void 0, !0), this.childEntities[2].polyline.setPath3v([en], void 0, !0);
9256
9266
  let c = h.mulVec3(new v(1, 0, 0)).normalize(), d = s.mulVec3(new v(0, 1, 0)).normalize(), u = h.mulVec3(new v(0, 0, 1)).normalize();
9257
9267
  this.childEntities[0].polyline.setVisibleSphere(e, Math.abs(c.dot(r.getForward())) > gr ? 0 : n), this.childEntities[1].polyline.setVisibleSphere(e, Math.abs(d.dot(r.getForward())) > gr ? 0 : n), this.childEntities[2].polyline.setVisibleSphere(e, Math.abs(u.dot(r.getForward())) > gr ? 0 : n);
9258
9268
  }
9259
9269
  }
9260
9270
  }
9261
- class Wh extends V {
9271
+ class $h extends V {
9262
9272
  constructor(e = {}) {
9263
9273
  super({ ...e, forceGlobalPosition: !0 }), this._init();
9264
9274
  }
@@ -9303,7 +9313,7 @@ function tn(a, e, t, i, r, s) {
9303
9313
  }
9304
9314
  }
9305
9315
  }
9306
- class qh extends dt {
9316
+ class Xh extends dt {
9307
9317
  constructor(e = {}) {
9308
9318
  super(e.name || "GeoObjectEditorScene"), this._onAxisLayerMouseEnter = (t) => {
9309
9319
  this.renderer.handler.canvas.style.cursor = "pointer", t.pickingObject.setColorHTML(t.pickingObject.properties.style.selectColor);
@@ -9419,7 +9429,7 @@ class qh extends dt {
9419
9429
  }, this._scaleX = (t) => {
9420
9430
  }, this._scaleY = (t) => {
9421
9431
  }, this._scaleZ = (t) => {
9422
- }, this.events = ge($h), this._planet = e.planet || null, this._startPos = null, this._startClick = new N(), this._axisEntity = new Uh(), this._planeEntity = new jh(), this._rotateEntity = new Yh(), this._axisTrackEntity = new Wh(), this._moveLayer = new _t({ scaleByDistance: [0.1, Lt, 0.1], useLighting: !1, pickingScale: [5, 1.1, 5], visibility: !1, depthOrder: 1e3 }), this._planeLayer = new _t({ scaleByDistance: [0.1, Lt, 0.1], useLighting: !1, visibility: !1, depthOrder: 1e3 }), this._rotateLayer = new _t({ useLighting: !1, visibility: !1, depthOrder: 1e3, pickingScale: 5 }), this._selectedEntity = null, this._clickPos = new N(), this._selectedEntityCart = new v(), this._selectedEntityPitch = 0, this._selectedEntityYaw = 0, this._selectedEntityRoll = 0, this._selectedMove = null, this._axisTrackVisibility = !1, this._axisTrackLayer = new _t({ useLighting: !1, visibility: !1, pickingScale: 5, pickingEnabled: !1, opacity: 0.6 }), this._ops = { move_x: this._moveX, move_y: this._moveY, move_z: this._moveZ, move_xz: this._moveXZ, move_xy: this._moveXY, move_zy: this._moveZY, rotate_pitch: this._rotatePitch, rotate_yaw: this._rotateYaw, rotate_roll: this._rotateRoll, scale: this._scale, scale_x: this._scaleX, scale_y: this._scaleY, scale_z: this._scaleZ };
9432
+ }, this.events = de(Zh), this._planet = e.planet || null, this._startPos = null, this._startClick = new N(), this._axisEntity = new jh(), this._planeEntity = new qh(), this._rotateEntity = new Wh(), this._axisTrackEntity = new $h(), this._moveLayer = new _t({ scaleByDistance: [0.1, Lt, 0.1], useLighting: !1, pickingScale: [5, 1.1, 5], visibility: !1, depthOrder: 1e3 }), this._planeLayer = new _t({ scaleByDistance: [0.1, Lt, 0.1], useLighting: !1, visibility: !1, depthOrder: 1e3 }), this._rotateLayer = new _t({ useLighting: !1, visibility: !1, depthOrder: 1e3, pickingScale: 5 }), this._selectedEntity = null, this._clickPos = new N(), this._selectedEntityCart = new v(), this._selectedEntityPitch = 0, this._selectedEntityYaw = 0, this._selectedEntityRoll = 0, this._selectedMove = null, this._axisTrackVisibility = !1, this._axisTrackLayer = new _t({ useLighting: !1, visibility: !1, pickingScale: 5, pickingEnabled: !1, opacity: 0.6 }), this._ops = { move_x: this._moveX, move_y: this._moveY, move_z: this._moveZ, move_xz: this._moveXZ, move_xy: this._moveXY, move_zy: this._moveZY, rotate_pitch: this._rotatePitch, rotate_yaw: this._rotateYaw, rotate_roll: this._rotateRoll, scale: this._scale, scale_x: this._scaleX, scale_y: this._scaleY, scale_z: this._scaleZ };
9423
9433
  }
9424
9434
  get ellipsoid() {
9425
9435
  if (this._planet) return this._planet.ellipsoid;
@@ -9496,7 +9506,7 @@ class qh extends dt {
9496
9506
  }
9497
9507
  }
9498
9508
  }
9499
- const $h = ["mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter", "select", "unselect", "change", "position", "pitch", "yaw", "roll", "scale"], Xh = ["change"];
9509
+ const Zh = ["mousemove", "mouseenter", "mouseleave", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchmove", "touchstart", "touchend", "doubletouch", "touchleave", "touchenter", "select", "unselect", "change", "position", "pitch", "yaw", "roll", "scale"], Qh = ["change"];
9500
9510
  class xe extends Ce {
9501
9511
  constructor(e = {}) {
9502
9512
  super({ template: Ge(`<div class="og-input">
@@ -9509,7 +9519,7 @@ class xe extends Ce {
9509
9519
  this._onMouseWheel(t);
9510
9520
  }, this._onInput = (t) => {
9511
9521
  (t = t || window.event).preventDefault(), t.stopPropagation(), this._setValue(t.target.value);
9512
- }, this.events = this.events.registerNames(Xh), this._value = e.value || "", this._maxFixed = e.maxFixed != null ? e.maxFixed : -1, this.$label = null, this.$input = null;
9522
+ }, this.events = this.events.registerNames(Qh), this._value = e.value || "", this._maxFixed = e.maxFixed != null ? e.maxFixed : -1, this.$label = null, this.$input = null;
9513
9523
  }
9514
9524
  render(e) {
9515
9525
  return super.render(e), this.$label = this.select(".og-input-label"), this.$label.innerHTML === "" && (this.$label.style.display = "none"), this.$input = this.select("input"), this._initEvents(), this;
@@ -9536,8 +9546,8 @@ class xe extends Ce {
9536
9546
  this.el && (this.el.style.display = e ? "" : "none");
9537
9547
  }
9538
9548
  }
9539
- const Zh = ["change"];
9540
- class Kh extends Ce {
9549
+ const Kh = ["change"];
9550
+ class Jh extends Ce {
9541
9551
  constructor(e = {}) {
9542
9552
  super({ template: Ge(`<div class="og-checkbox">
9543
9553
  <div class="og-input-label">{label}</div>
@@ -9551,7 +9561,7 @@ class Kh extends Ce {
9551
9561
  this._onMouseWheel(t);
9552
9562
  }, this._onClick = (t) => {
9553
9563
  (t = t || window.event).stopPropagation(), this.checked = !this._checked;
9554
- }, this._checked = e.checked || !1, this._disabled = e.disabled || !1, this.events = this.events.registerNames(Zh), this.$label = null, this.$input = null;
9564
+ }, this._checked = e.checked || !1, this._disabled = e.disabled || !1, this.events = this.events.registerNames(Kh), this.$label = null, this.$input = null;
9555
9565
  }
9556
9566
  set disabled(e) {
9557
9567
  this._disabled = e, this._updateDisabled();
@@ -9584,7 +9594,7 @@ class Kh extends Ce {
9584
9594
  this.el && (this.el.style.display = e ? "" : "none");
9585
9595
  }
9586
9596
  }
9587
- class Qh extends st {
9597
+ class ec extends st {
9588
9598
  constructor(e) {
9589
9599
  super({ title: "GeoObject Properties", visible: !1, resizable: !0, useHide: !0, top: 25, right: 85, width: 252, height: 480, minHeight: 100, minWidth: 100, model: e.model }), this._onVisibility = (t) => {
9590
9600
  this.model.setVisibility(t);
@@ -9704,14 +9714,14 @@ class Qh extends st {
9704
9714
  t && this.model.planet && (this.model.planet.terrain ? this.model.planet.terrain.getHeightAsync(t.getLonLat(), (i) => {
9705
9715
  this._heightView.value = i;
9706
9716
  }) : this._heightView.value = 0);
9707
- }, this._relativePositionView = new Kh({ label: "Relative position" }), this._lonView = new xe({ label: "Lon", type: "number", min: -180, max: 180, maxFixed: 10 }), this._latView = new xe({ label: "Lat", type: "number", min: -90, max: 90, maxFixed: 10 }), this._heightView = new xe({ label: "Height", type: "number", maxFixed: 4 }), this._xView = new xe({ label: "X", type: "number", maxFixed: 10 }), this._yView = new xe({ label: "Y", type: "number" }), this._zView = new xe({ label: "Z", type: "number" }), this._absXView = new xe({ label: "Absolute X", type: "number", maxFixed: 10 }), this._absYView = new xe({ label: "Absolute Y", type: "number" }), this._absZView = new xe({ label: "Absolute Z", type: "number" }), this._pitchView = new xe({ label: "Pitch", type: "number", maxFixed: 2 }), this._yawView = new xe({ label: "Yaw", type: "number", maxFixed: 2 }), this._rollView = new xe({ label: "Roll", type: "number", maxFixed: 2 }), this._absolutePitchView = new xe({ label: "Absolute pitch", type: "number", maxFixed: 2 }), this._absoluteYawView = new xe({ label: "Absolute yaw", type: "number", maxFixed: 2 }), this._absoluteRollView = new xe({ label: "Absolute roll", type: "number", maxFixed: 2 }), this._scaleView = new xe({ label: "Scale", type: "number", maxFixed: 2 }), this._scaleXView = new xe({ label: "Scale X", type: "number", maxFixed: 2 }), this._scaleYView = new xe({ label: "Scale Y", type: "number", maxFixed: 2 }), this._scaleZView = new xe({ label: "Scale Z", type: "number", maxFixed: 2 }), this._groundBtn = new ct({ text: "Ground", title: "Put on the ground", name: "ground", classList: ["og-editor-ground_button"] });
9717
+ }, this._relativePositionView = new Jh({ label: "Relative position" }), this._lonView = new xe({ label: "Lon", type: "number", min: -180, max: 180, maxFixed: 10 }), this._latView = new xe({ label: "Lat", type: "number", min: -90, max: 90, maxFixed: 10 }), this._heightView = new xe({ label: "Height", type: "number", maxFixed: 4 }), this._xView = new xe({ label: "X", type: "number", maxFixed: 10 }), this._yView = new xe({ label: "Y", type: "number" }), this._zView = new xe({ label: "Z", type: "number" }), this._absXView = new xe({ label: "Absolute X", type: "number", maxFixed: 10 }), this._absYView = new xe({ label: "Absolute Y", type: "number" }), this._absZView = new xe({ label: "Absolute Z", type: "number" }), this._pitchView = new xe({ label: "Pitch", type: "number", maxFixed: 2 }), this._yawView = new xe({ label: "Yaw", type: "number", maxFixed: 2 }), this._rollView = new xe({ label: "Roll", type: "number", maxFixed: 2 }), this._absolutePitchView = new xe({ label: "Absolute pitch", type: "number", maxFixed: 2 }), this._absoluteYawView = new xe({ label: "Absolute yaw", type: "number", maxFixed: 2 }), this._absoluteRollView = new xe({ label: "Absolute roll", type: "number", maxFixed: 2 }), this._scaleView = new xe({ label: "Scale", type: "number", maxFixed: 2 }), this._scaleXView = new xe({ label: "Scale X", type: "number", maxFixed: 2 }), this._scaleYView = new xe({ label: "Scale Y", type: "number", maxFixed: 2 }), this._scaleZView = new xe({ label: "Scale Z", type: "number", maxFixed: 2 }), this._groundBtn = new ct({ text: "Ground", title: "Put on the ground", name: "ground", classList: ["og-editor-ground_button"] });
9708
9718
  }
9709
9719
  render(e) {
9710
9720
  var t;
9711
9721
  super.render(e), this._initSceneEvents();
9712
9722
  let i = document.createElement("div");
9713
9723
  i.classList.add("og-editor_toolbar"), (t = this.container) == null || t.appendChild(i);
9714
- let r = new _e({ classList: ["og-editor_toolbar-button"], icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" id="filter-center-focus">
9724
+ let r = new fe({ classList: ["og-editor_toolbar-button"], icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" id="filter-center-focus">
9715
9725
  <path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
9716
9726
  </svg>`, title: "Lock/Unlock camera view" });
9717
9727
  return r.appendTo(i), r.events.on("change", (s) => {
@@ -9742,7 +9752,7 @@ class Qh extends st {
9742
9752
  super.hide(), this.model.events.stopPropagation(), this.model.unselect();
9743
9753
  }
9744
9754
  }
9745
- const Jh = ["lockview", "unlockview"];
9755
+ const tc = ["lockview", "unlockview"];
9746
9756
  class rn extends J {
9747
9757
  constructor(e = {}) {
9748
9758
  super(e), this._onLockViewDraw = () => {
@@ -9753,11 +9763,11 @@ class rn extends J {
9753
9763
  this._lockDistance -= 0.33 * i * Math.sign(t.wheelDelta), this._lockDistance < 1e-3 && (this._lockDistance = 1e-3), this.renderer.activeCamera.viewDistance(this._lockEntity.getAbsoluteCartesian(), this._lockDistance);
9754
9764
  }
9755
9765
  }, this._onMouseMove = (t) => {
9756
- if (this._lockEntity && this.renderer && (t.rightButtonDown || this.renderer.events.isKeyPressed(q.KEY_ALT))) {
9766
+ if (this._lockEntity && this.renderer && (t.rightButtonDown || this.renderer.events.isKeyPressed(W.KEY_ALT))) {
9757
9767
  let i = this._lockEntity.getAbsoluteCartesian(), r = this.renderer.activeCamera, s = 0.5 / j;
9758
9768
  s > 7e-3 && (s = 7e-3), this.planet ? r.rotateHorizontal(s * (t.x - t.prev_x), !1, i, i.isZero() ? v.UP : i.normal()) : r.rotateHorizontal(s * (t.x - t.prev_x), !1, i, v.UP), r.rotateVertical(s * (t.y - t.prev_y), i), this._viewDir = i.sub(r.eye).normalize();
9759
9769
  }
9760
- }, this.events = ge(Jh), this._name = "CameraLock", this.planet = e.planet || null, this._lockDistance = 0, this._isFromTheBack = !1, this._lockEntity = null, this._viewDir = new v(0, 0, 0);
9770
+ }, this.events = de(tc), this._name = "CameraLock", this.planet = e.planet || null, this._lockDistance = 0, this._isFromTheBack = !1, this._lockEntity = null, this._viewDir = new v(0, 0, 0);
9761
9771
  }
9762
9772
  onactivate() {
9763
9773
  this.renderer;
@@ -9822,12 +9832,12 @@ class rn extends J {
9822
9832
  this.renderer && (this.renderer.events.off("mousewheel", this._onMouseWheel), this.renderer.events.off("mousemove", this._onMouseMove), this._lockEntity && this.renderer.events.off("draw", this._onLockViewDraw));
9823
9833
  }
9824
9834
  }
9825
- const ec = ["click"];
9826
- class tc extends Ce {
9835
+ const ic = ["click"];
9836
+ class rc extends Ce {
9827
9837
  constructor(e) {
9828
9838
  super({ template: Ge(`<button class="og-object3d-collection__item">
9829
9839
  <div class="og-object3d-collection__item_name">{name}</div>
9830
- </button>`, { name: e.model.name }), ...e }), this.events = ge(ec);
9840
+ </button>`, { name: e.model.name }), ...e }), this.events = de(ic);
9831
9841
  }
9832
9842
  render(e) {
9833
9843
  var t;
@@ -9836,15 +9846,15 @@ class tc extends Ce {
9836
9846
  }), this;
9837
9847
  }
9838
9848
  }
9839
- const ic = ["select"];
9840
- class rc extends Ce {
9849
+ const sc = ["select"];
9850
+ class nc extends Ce {
9841
9851
  constructor(e) {
9842
9852
  super({ template: '<div class="og-object3d-collection"></div>', model: e.model, ...e }), this._onAdd = (t) => {
9843
9853
  this._addItem(t);
9844
- }, this.events = ge(ic), this._activeView = null;
9854
+ }, this.events = de(sc), this._activeView = null;
9845
9855
  }
9846
9856
  _addItem(e) {
9847
- let t = new tc({ model: e });
9857
+ let t = new rc({ model: e });
9848
9858
  t.appendTo(this.el), t.events.on("click", (i) => {
9849
9859
  var r, s;
9850
9860
  this._activeView && ((r = this._activeView.el) == null || r.classList.remove("active")), this._activeView = t, (s = this._activeView.el) == null || s.classList.add("active"), this.events.dispatch(this.events.select, i, t);
@@ -9860,8 +9870,8 @@ class rc extends Ce {
9860
9870
  this.model.events.on("add", this._onAdd);
9861
9871
  }
9862
9872
  }
9863
- const sc = ["select"];
9864
- class nc extends st {
9873
+ const oc = ["select"];
9874
+ class ac extends st {
9865
9875
  constructor(e) {
9866
9876
  super({ classList: ["og-object3d-manager"], title: "Object3D Collection", visible: !1, resizable: !0, useHide: !0, top: 25, right: 85, width: 252, height: 480, minHeight: 100, minWidth: 100 }), this._onLoadClick = () => {
9867
9877
  let t = new Ce({ initRender: !0, template: '<input type="file" accept=".obj,.mtl" multiple />' });
@@ -9876,7 +9886,7 @@ class nc extends st {
9876
9886
  }), t.el.click());
9877
9887
  }, this._addObject = (t) => {
9878
9888
  this._object3dCollectionView.model.addItem(t);
9879
- }, this.events = ge(sc), this._object3dCollectionView = new rc({ model: e.model });
9889
+ }, this.events = de(oc), this._object3dCollectionView = new nc({ model: e.model });
9880
9890
  }
9881
9891
  render(e) {
9882
9892
  var t;
@@ -9889,10 +9899,10 @@ class nc extends st {
9889
9899
  }), this;
9890
9900
  }
9891
9901
  }
9892
- const oc = ["add", "remove"];
9902
+ const lc = ["add", "remove"];
9893
9903
  class hs {
9894
9904
  constructor(e = {}) {
9895
- this.events = ge(oc, this), this._items = hs.createItemsMap(e.collection || []);
9905
+ this.events = de(lc, this), this._items = hs.createItemsMap(e.collection || []);
9896
9906
  }
9897
9907
  static createItemsMap(e) {
9898
9908
  let t = /* @__PURE__ */ new Map();
@@ -9931,10 +9941,10 @@ class Vr extends J {
9931
9941
  super.deactivate(), this.renderer && (this.renderer.events.off("postdraw", this._onPostdraw), this.renderer.removeNode(this._cameraScene));
9932
9942
  }
9933
9943
  }
9934
- let ac = Z.createFrustum();
9944
+ let hc = Z.createFrustum();
9935
9945
  class sn {
9936
9946
  constructor(e) {
9937
- this.camera = e.camera, this.frameBuffer = e.frameBuffer, this.frameHandler = e.frameHandler || null, this._composer = null, this._composerIndex = -1, this.showFrustum = e.showFrustum == null || e.showFrustum, this.cameraEntity = new V({ visibility: !0, scale: this.frustumScale, geoObject: { tag: "frustum", color: "rgba(0,255,0,0.20)", object3d: ac } }), this.frameBuffer.init();
9947
+ this.camera = e.camera, this.frameBuffer = e.frameBuffer, this.frameHandler = e.frameHandler || null, this._composer = null, this._composerIndex = -1, this.showFrustum = e.showFrustum == null || e.showFrustum, this.cameraEntity = new V({ visibility: !0, scale: this.frustumScale, geoObject: { tag: "frustum", color: "rgba(0,255,0,0.20)", object3d: hc } }), this.frameBuffer.init();
9938
9948
  }
9939
9949
  get frustumScale() {
9940
9950
  return Z.getFrustumScaleByCameraAspectRatio(1e3, this.camera.getViewAngle(), this.camera.getAspectRatio());
@@ -10032,9 +10042,9 @@ class nn {
10032
10042
  return r;
10033
10043
  }
10034
10044
  }
10035
- const lc = ["viewchange", "moveend"], La = class Pa {
10045
+ const cc = ["viewchange", "moveend"], La = class Pa {
10036
10046
  constructor(e = {}) {
10037
- if (this.__id = Pa.__counter__++, this.events = ge(lc, this), this._width = e.width || 1, this._height = e.height || 1, this.eye = e.eye || new v(), this.eyeHigh = new Float32Array(3), this.eyeLow = new Float32Array(3), this._viewAngle = e.viewAngle || 47, this._horizontalViewAngle = 0, this._viewMatrix = new ae(), this._viewMatrixRTE = new ae(), this._normalMatrix = new St(), this._r = new v(1, 0, 0), this._u = new v(0, 1, 0), this._b = new v(0, 0, 1), this._f = this._b.negateTo(), this._pr = this._r.clone(), this._pu = this._u.clone(), this._pb = this._b.clone(), this._peye = this.eye.clone(), this.isMoving = !1, this._tanViewAngle_hrad = 0, this._tanViewAngle_hradOneByHeight = 0, this.frustums = [], this.frustumColors = [], e.frustums) for (let t = 0, i = e.frustums.length; t < i; t++) {
10047
+ if (this.__id = Pa.__counter__++, this.events = de(cc, this), this._width = e.width || 1, this._height = e.height || 1, this.eye = e.eye || new v(), this.eyeHigh = new Float32Array(3), this.eyeLow = new Float32Array(3), this._viewAngle = e.viewAngle || 47, this._horizontalViewAngle = 0, this._viewMatrix = new ae(), this._viewMatrixRTE = new ae(), this._normalMatrix = new St(), this._r = new v(1, 0, 0), this._u = new v(0, 1, 0), this._b = new v(0, 0, 1), this._f = this._b.negateTo(), this._pr = this._r.clone(), this._pu = this._u.clone(), this._pb = this._b.clone(), this._peye = this.eye.clone(), this.isMoving = !1, this._tanViewAngle_hrad = 0, this._tanViewAngle_hradOneByHeight = 0, this.frustums = [], this.frustumColors = [], e.frustums) for (let t = 0, i = e.frustums.length; t < i; t++) {
10038
10048
  let r = e.frustums[t], s = new nn({ fov: this._viewAngle, aspect: this.getAspectRatio(), near: r[0], far: r[1] });
10039
10049
  s.cameraFrustumIndex = this.frustums.length, this.frustums.push(s), this.frustumColors.push(s._pickingColorU[0], s._pickingColorU[1], s._pickingColorU[2]);
10040
10050
  }
@@ -10247,26 +10257,26 @@ const lc = ["viewchange", "moveend"], La = class Pa {
10247
10257
  };
10248
10258
  La.__counter__ = 0;
10249
10259
  let cs = La;
10250
- const Q = class {
10260
+ const K = class {
10251
10261
  };
10252
- Q.Linear = (a) => a, Q.QuadIn = (a) => a * a, Q.QuadOut = (a) => 1 - (1 - a) * (1 - a), Q.QuadInOut = (a) => a < 0.5 ? 2 * a * a : 1 - Math.pow(-2 * a + 2, 2) / 2, Q.CubicIn = (a) => a * a * a, Q.CubicOut = (a) => 1 - Math.pow(1 - a, 3), Q.CubicInOut = (a) => a < 0.5 ? 4 * a * a * a : 1 - Math.pow(-2 * a + 2, 3) / 2, Q.QuartIn = (a) => a * a * a * a, Q.QuartOut = (a) => 1 - Math.pow(1 - a, 4), Q.QuartInOut = (a) => a < 0.5 ? 8 * a * a * a * a : 1 - Math.pow(-2 * a + 2, 4) / 2, Q.QuintIn = (a) => a * a * a * a * a, Q.QuintOut = (a) => 1 - Math.pow(1 - a, 5), Q.QuintInOut = (a) => a < 0.5 ? 16 * a * a * a * a * a : 1 - Math.pow(-2 * a + 2, 5) / 2, Q.SineIn = (a) => 1 - Math.cos(a * Math.PI / 2), Q.SineOut = (a) => Math.sin(a * Math.PI / 2), Q.SineInOut = (a) => -(Math.cos(Math.PI * a) - 1) / 2, Q.ExpoIn = (a) => a === 0 ? 0 : Math.pow(2, 10 * a - 10), Q.ExpoOut = (a) => a === 1 ? 1 : 1 - Math.pow(2, -10 * a), Q.ExpoInOut = (a) => a === 0 ? 0 : a === 1 ? 1 : a < 0.5 ? Math.pow(2, 20 * a - 10) / 2 : (2 - Math.pow(2, -20 * a + 10)) / 2, Q.CircIn = (a) => 1 - Math.sqrt(1 - Math.pow(a, 2)), Q.CircOut = (a) => Math.sqrt(1 - Math.pow(a - 1, 2)), Q.CircInOut = (a) => a < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * a, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * a + 2, 2)) + 1) / 2, Q.BackIn = (a) => 2.70158 * a * a * a - 1.70158 * a * a, Q.BackOut = (a) => 1 + 2.70158 * Math.pow(a - 1, 3) + 1.70158 * Math.pow(a - 1, 2), Q.BackInOut = (a) => {
10262
+ K.Linear = (a) => a, K.QuadIn = (a) => a * a, K.QuadOut = (a) => 1 - (1 - a) * (1 - a), K.QuadInOut = (a) => a < 0.5 ? 2 * a * a : 1 - Math.pow(-2 * a + 2, 2) / 2, K.CubicIn = (a) => a * a * a, K.CubicOut = (a) => 1 - Math.pow(1 - a, 3), K.CubicInOut = (a) => a < 0.5 ? 4 * a * a * a : 1 - Math.pow(-2 * a + 2, 3) / 2, K.QuartIn = (a) => a * a * a * a, K.QuartOut = (a) => 1 - Math.pow(1 - a, 4), K.QuartInOut = (a) => a < 0.5 ? 8 * a * a * a * a : 1 - Math.pow(-2 * a + 2, 4) / 2, K.QuintIn = (a) => a * a * a * a * a, K.QuintOut = (a) => 1 - Math.pow(1 - a, 5), K.QuintInOut = (a) => a < 0.5 ? 16 * a * a * a * a * a : 1 - Math.pow(-2 * a + 2, 5) / 2, K.SineIn = (a) => 1 - Math.cos(a * Math.PI / 2), K.SineOut = (a) => Math.sin(a * Math.PI / 2), K.SineInOut = (a) => -(Math.cos(Math.PI * a) - 1) / 2, K.ExpoIn = (a) => a === 0 ? 0 : Math.pow(2, 10 * a - 10), K.ExpoOut = (a) => a === 1 ? 1 : 1 - Math.pow(2, -10 * a), K.ExpoInOut = (a) => a === 0 ? 0 : a === 1 ? 1 : a < 0.5 ? Math.pow(2, 20 * a - 10) / 2 : (2 - Math.pow(2, -20 * a + 10)) / 2, K.CircIn = (a) => 1 - Math.sqrt(1 - Math.pow(a, 2)), K.CircOut = (a) => Math.sqrt(1 - Math.pow(a - 1, 2)), K.CircInOut = (a) => a < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * a, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * a + 2, 2)) + 1) / 2, K.BackIn = (a) => 2.70158 * a * a * a - 1.70158 * a * a, K.BackOut = (a) => 1 + 2.70158 * Math.pow(a - 1, 3) + 1.70158 * Math.pow(a - 1, 2), K.BackInOut = (a) => {
10253
10263
  const e = 2.5949095;
10254
10264
  return a < 0.5 ? Math.pow(2 * a, 2) * (7.189819 * a - e) / 2 : (Math.pow(2 * a - 2, 2) * ((e + 1) * (2 * a - 2) + e) + 2) / 2;
10255
- }, Q.ElasticIn = (a) => {
10265
+ }, K.ElasticIn = (a) => {
10256
10266
  const e = 2 * Math.PI / 3;
10257
10267
  return a === 0 ? 0 : a === 1 ? 1 : -Math.pow(2, 10 * a - 10) * Math.sin((10 * a - 10.75) * e);
10258
- }, Q.ElasticOut = (a) => {
10268
+ }, K.ElasticOut = (a) => {
10259
10269
  const e = 2 * Math.PI / 3;
10260
10270
  return a === 0 ? 0 : a === 1 ? 1 : Math.pow(2, -10 * a) * Math.sin((10 * a - 0.75) * e) + 1;
10261
- }, Q.ElasticInOut = (a) => {
10271
+ }, K.ElasticInOut = (a) => {
10262
10272
  const e = 2 * Math.PI / 4.5;
10263
10273
  return a === 0 ? 0 : a === 1 ? 1 : a < 0.5 ? -Math.pow(2, 20 * a - 10) * Math.sin((20 * a - 11.125) * e) / 2 : Math.pow(2, -20 * a + 10) * Math.sin((20 * a - 11.125) * e) / 2 + 1;
10264
- }, Q.BounceOut = (a) => a < 1 / 2.75 ? 7.5625 * a * a : a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375 : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375, Q.BounceIn = (a) => 1 - Q.BounceOut(1 - a), Q.BounceInOut = (a) => a < 0.5 ? 0.5 * (1 - Q.BounceOut(1 - 2 * a)) : 0.5 * (Q.BounceOut(2 * a - 1) + 1);
10265
- let hc = Q;
10266
- const cc = ["flystart", "flyend", "flystop"], Tt = hc.CubicInOut;
10274
+ }, K.BounceOut = (a) => a < 1 / 2.75 ? 7.5625 * a * a : a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375 : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375, K.BounceIn = (a) => 1 - K.BounceOut(1 - a), K.BounceInOut = (a) => a < 0.5 ? 0.5 * (1 - K.BounceOut(1 - 2 * a)) : 0.5 * (K.BounceOut(2 * a - 1) + 1);
10275
+ let dc = K;
10276
+ const uc = ["flystart", "flyend", "flystop"], Tt = dc.CubicInOut;
10267
10277
  class Sa extends cs {
10268
10278
  constructor(e, t = {}) {
10269
- super({ ...t, frustums: t.frustums || [[1, 100.075], [100, 1000.075], [1e3, 101e4], [1e6, 1e9]] }), this.events = this.events.registerNames(cc), this.planet = e, this.minAltitude = t.minAltitude || 1, this.maxAltitude = t.maxAltitude || 2e7, this._lonLat = this.planet.ellipsoid.cartesianToLonLat(this.eye), this._lonLatMerc = this._lonLat.forwardMercator(), this._terrainAltitude = this._lonLat.height, this._terrainPoint = new v(), this._insideSegment = null, this.slope = 0, this._keyLock = new Li(), this._flight = null, this._completeCallback = null, this._frameCallback = null, this._flying = !1, this._checkTerrainCollision = !0, this.eyeNorm = this.eye.getNormal();
10279
+ super({ ...t, frustums: t.frustums || [[1, 100.075], [100, 1000.075], [1e3, 101e4], [1e6, 1e9]] }), this.events = this.events.registerNames(uc), this.planet = e, this.minAltitude = t.minAltitude || 1, this.maxAltitude = t.maxAltitude || 2e7, this._lonLat = this.planet.ellipsoid.cartesianToLonLat(this.eye), this._lonLatMerc = this._lonLat.forwardMercator(), this._terrainAltitude = this._lonLat.height, this._terrainPoint = new v(), this._insideSegment = null, this.slope = 0, this._keyLock = new Li(), this._flight = null, this._completeCallback = null, this._frameCallback = null, this._flying = !1, this._checkTerrainCollision = !0, this.eyeNorm = this.eye.getNormal();
10270
10280
  }
10271
10281
  setTerrainCollisionActivity(e) {
10272
10282
  this._checkTerrainCollision = e;
@@ -10277,7 +10287,7 @@ class Sa extends cs {
10277
10287
  this.eye.length() > e && this.eye.copy(this.eye.getNormal().scale(e)), super.update(), this.updateGeodeticPosition(), this.eyeNorm = this.eye.getNormal(), this.slope = this._b.dot(this.eyeNorm), this.events.dispatch(this.events.viewchange, this);
10278
10288
  }
10279
10289
  updateGeodeticPosition() {
10280
- this.planet.ellipsoid.cartesianToLonLatRes(this.eye, this._lonLat), Math.abs(this._lonLat.lat) <= ue && A.forwardMercatorRes(this._lonLat, this._lonLatMerc);
10290
+ this.planet.ellipsoid.cartesianToLonLatRes(this.eye, this._lonLat), Math.abs(this._lonLat.lat) <= _e && A.forwardMercatorRes(this._lonLat, this._lonLatMerc);
10281
10291
  }
10282
10292
  setAltitude(e) {
10283
10293
  let t = this._terrainPoint, i = this.planet.ellipsoid.getSurfaceNormal3v(this.eye);
@@ -10638,10 +10648,10 @@ class Ie extends Ba {
10638
10648
  h && (i[0] = h[l], i[1] = h[l + 1], i[2] = h[l + 2], i[3] = h[l + 3]);
10639
10649
  }
10640
10650
  }
10641
- const dc = ["tick", "end", "start", "stop"], ka = class Ia {
10651
+ const _c = ["tick", "end", "start", "stop"], ka = class Ia {
10642
10652
  constructor(e = {}) {
10643
- this.__handler = null, this.active = !0, this.__id = Ia.__counter__++, this.events = ge(dc, this), this.name = e.name || "", this.startDate = e.startDate || 0, this.endDate = e.endDate || 0;
10644
- let t = e.currentDate || Qi(/* @__PURE__ */ new Date());
10653
+ this.__handler = null, this.active = !0, this.__id = Ia.__counter__++, this.events = de(_c, this), this.name = e.name || "", this.startDate = e.startDate || 0, this.endDate = e.endDate || 0;
10654
+ let t = e.currentDate || Ki(/* @__PURE__ */ new Date());
10645
10655
  e.startDate && t < e.startDate && (t = e.startDate), e.endDate && t > e.endDate && (t = e.endDate), this.currentDate = t, this._multiplier = e.multiplier !== void 0 ? e.multiplier : 1, this._running = 1, this.deltaTicks = 0, this.active = !0, this._intervalDelay = 0, this._intervalStart = 0, this._intervalCallback = null;
10646
10656
  }
10647
10657
  clearInterval() {
@@ -10651,7 +10661,7 @@ const dc = ["tick", "end", "start", "stop"], ka = class Ia {
10651
10661
  this._intervalStart = this.currentDate, this._intervalDelay = e * ts, this._intervalCallback = t;
10652
10662
  }
10653
10663
  setDate(e) {
10654
- let t = Qi(e);
10664
+ let t = Ki(e);
10655
10665
  this.startDate && t < this.startDate && (t = this.startDate), this.endDate && t > this.endDate && (t = this.endDate), this.currentDate = t;
10656
10666
  }
10657
10667
  getDate() {
@@ -10684,8 +10694,8 @@ const dc = ["tick", "end", "start", "stop"], ka = class Ia {
10684
10694
  }
10685
10695
  };
10686
10696
  ka.__counter__ = 0;
10687
- let uc = ka;
10688
- class _c {
10697
+ let fc = ka;
10698
+ class gc {
10689
10699
  constructor(e, t) {
10690
10700
  t._programController = this, this._program = t, this._handler = e, this._activated = !1;
10691
10701
  }
@@ -10760,7 +10770,7 @@ class Mt {
10760
10770
  for (let n = 0; n < this._clocks.length; n++) this._clocks[n].tick(this.deltaTime);
10761
10771
  let s = this.canvas;
10762
10772
  Math.floor(s.clientWidth * this._params.pixelRatio) === s.width && Math.floor(s.clientHeight * this._params.pixelRatio) === s.height || (s.clientWidth === 0 || s.clientHeight === 0 ? this.stop() : document.hidden || (this.start(), this.setSize(s.clientWidth, s.clientHeight))), this._frameCallback();
10763
- }, this.events = ge(["visibilitychange", "resize"]), this._throttledDrawFrame = this.drawFrame, this.defaultClock = new uc(), this._clocks = [], this.prevDeltaTime = 0, this.deltaTime = 0, this.canvas = null, this.gl = null, this.programs = {}, this.activeProgram = null, this._canvasSize = [0, 0], this._params = { anisotropy: t.anisotropy || 4, width: t.width || 256, height: t.height || 256, pixelRatio: Gn("og_dpi") || t.pixelRatio || 1, extensions: t.extensions || [], context: t.context || {} }, this.extensions = {}, this._canvasTarget = e, this._lastAnimationFrameTime = 0, this._initialized = !1, this._frameCallback = function() {
10773
+ }, this.events = de(["visibilitychange", "resize"]), this._throttledDrawFrame = this.drawFrame, this.defaultClock = new fc(), this._clocks = [], this.prevDeltaTime = 0, this.deltaTime = 0, this.canvas = null, this.gl = null, this.programs = {}, this.activeProgram = null, this._canvasSize = [0, 0], this._params = { anisotropy: t.anisotropy || 4, width: t.width || 256, height: t.height || 256, pixelRatio: Gn("og_dpi") || t.pixelRatio || 1, extensions: t.extensions || [], context: t.context || {} }, this.extensions = {}, this._canvasTarget = e, this._lastAnimationFrameTime = 0, this._initialized = !1, this._frameCallback = function() {
10764
10774
  }, this.transparentTexture = null, this.defaultTexture = null, this.framebufferStack = new pr(), this.createTexture_n = this.createTexture_n_webgl2.bind(this), this.createTexture_l = this.createTexture_l_webgl2.bind(this), this.createTexture_mm = this.createTexture_mm_webgl2.bind(this), this.createTexture_a = this.createTexture_a_webgl2.bind(this), this.createTexture = { NEAREST: this.createTexture_n, LINEAR: this.createTexture_l, MIPMAP: this.createTexture_mm, ANISOTROPIC: this.createTexture_a }, this.createTextureDefault = this.createTexture_n, this.ONCANVASRESIZE = null, this._createCanvas(), (t.autoActivate || je(t.autoActivate)) && this.initialize();
10765
10775
  }
10766
10776
  set frameDelay(e) {
@@ -10861,7 +10871,7 @@ class Mt {
10861
10871
  addProgram(e, t = !1) {
10862
10872
  if (this.programs[e.name]) console.warn(`Shader program: "${e.name}" already exists.`);
10863
10873
  else {
10864
- let i = new _c(this, e);
10874
+ let i = new gc(this, e);
10865
10875
  this.programs[e.name] = i, this._initProgramController(i), t && (i._activated = !1);
10866
10876
  }
10867
10877
  return e;
@@ -11048,7 +11058,7 @@ class za extends Ba {
11048
11058
  i.bindFramebuffer(i.READ_FRAMEBUFFER, this._fbo), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, e._fbo), i.readBuffer(i.COLOR_ATTACHMENT0 + t), i.clearBufferfv(i.COLOR, 0, [0, 0, 0, 1]), i.blitFramebuffer(0, 0, this._width, this._height, 0, 0, e._width, e._height, i.COLOR_BUFFER_BIT, this._glFilter), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null);
11049
11059
  }
11050
11060
  }
11051
- Object.freeze(Object.defineProperty({ __proto__: null, Framebuffer: Ie, Handler: Mt, Multisample: za, Program: X, types: de }, Symbol.toStringTag, { value: "Module" }));
11061
+ Object.freeze(Object.defineProperty({ __proto__: null, Framebuffer: Ie, Handler: Mt, Multisample: za, Program: X, types: ue }, Symbol.toStringTag, { value: "Module" }));
11052
11062
  class ds extends Ti {
11053
11063
  constructor(e, t = {}) {
11054
11064
  super(e, t), this._image = t.image || null, this._src = t.src || null, this._onLoad_ = null;
@@ -11083,7 +11093,7 @@ class ds extends Ti {
11083
11093
  }
11084
11094
  Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class extends J {
11085
11095
  constructor(a = {}) {
11086
- super(a), this.$maxOpacity = null, this.$minOpacity = null, this.$rayleight = null, this.$mie = null, this.$height = null, this.$bottomRadius = null, this.$mieScatteringCoefficient = null, this.$mieExtinctionCoefficient = null, this.$rayleighScatteringCoefficientA = null, this.$rayleighScatteringCoefficientB = null, this.$rayleighScatteringCoefficientC = null, this.$ozoneAbsorptionCoefficientA = null, this.$ozoneAbsorptionCoefficientB = null, this.$ozoneAbsorptionCoefficientC = null, this.$sunAngularRadius = null, this.$sunIntensity = null, this.$groundAlbedo = null, this.$ozoneDensityHeight = null, this.$ozoneDensityWide = null, this._toggleBtn = new _e({ classList: ["og-map-button", "og-atmosphere_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11096
+ super(a), this.$maxOpacity = null, this.$minOpacity = null, this.$rayleight = null, this.$mie = null, this.$height = null, this.$bottomRadius = null, this.$mieScatteringCoefficient = null, this.$mieExtinctionCoefficient = null, this.$rayleighScatteringCoefficientA = null, this.$rayleighScatteringCoefficientB = null, this.$rayleighScatteringCoefficientC = null, this.$ozoneAbsorptionCoefficientA = null, this.$ozoneAbsorptionCoefficientB = null, this.$ozoneAbsorptionCoefficientC = null, this.$sunAngularRadius = null, this.$sunIntensity = null, this.$groundAlbedo = null, this.$ozoneDensityHeight = null, this.$ozoneDensityWide = null, this._toggleBtn = new fe({ classList: ["og-map-button", "og-atmosphere_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11087
11097
  <svg width="800px" height="800px" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M135.688 18.5c-6.798 74.842-23.842 85.39-107.907 59.656 84.85 52.022 73.57 64.954-6.843 96.938 87.743-10.27 103.29 4.89 70.75 87.594 17.805-27.56 32.5-44.498 46.282-54.47-11.813 28.26-18.345 59.274-18.345 91.813 0 84.184 43.71 157.96 109.656 200.376-41.624-43.834-67.686-102.7-67.686-167.875 0-134.923 109.45-244.405 244.375-244.405 30.92 0 60.76 5.762 88 16.25-38.584-26.87-85.517-42.625-136.064-42.625-55.257 0-106.14 18.802-146.562 50.375 4.627-18.783 17.39-38.073 41.03-60.906C190.18 90.942 153.53 95.634 135.69 18.5zm10.03 77.188c5.67.002 11.428 1.247 16.876 3.874 14.506 6.998 22.72 21.81 22 36.938-10.26 10.87-19.507 22.696-27.594 35.344-9.035 2.753-19.075 2.27-28.25-2.156-19.37-9.343-27.5-32.6-18.156-51.97 6.715-13.92 20.638-22.036 35.125-22.03z"/></svg>` }), this._dialog = new st({ title: "Atmosphere Parameters", visible: !1, useHide: !0, top: 60, left: 60, width: 720 }), this._dialog.events.on("visibility", (e) => {
11088
11098
  this._toggleBtn.setActive(e);
11089
11099
  }), this._panel = new Ce({ template: `<div class="og-atmosphere og-options-container">
@@ -11129,7 +11139,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11129
11139
  <div class="og-option og-atmosphere-sunIntensity"></div>
11130
11140
  <div class="og-option og-atmosphere-earthAlbedo"></div>
11131
11141
 
11132
- </div>` }), this._maxOpacity = new K({ label: "Max.opacity", max: 5 }), this._minOpacity = new K({ label: "Min.opacity", max: 5 }), this._rayleight = new K({ label: "Rayleight Scale", min: -10, max: 10 }), this._mie = new K({ label: "Mie Scale", min: -10, max: 10 }), this._height = new K({ label: "Height", max: 1e6 }), this._bottomRadius = new K({ label: "Planet Radius", max: 31783761571225896e-9 }), this._mieScatteringCoefficient = new K({ label: "Mie Scattering Coefficient e-6", min: -39.96, max: 39.96 }), this._mieExtinctionCoefficient = new K({ label: "Mie Extinction Coef.e-6", min: 4.44 * -10, max: 10 * 4.44 }), this._rayleighScatteringCoefficientA = new K({ label: "Rayleight Scattering Coef A.e-6", min: 5.802 * -10, max: 10 * 5.802 }), this._rayleighScatteringCoefficientB = new K({ label: "Rayleight Scattering Coef B.e-6", min: 13.558 * -10, max: 10 * 13.558 }), this._rayleighScatteringCoefficientC = new K({ label: "Rayleight Scattering Coef C.e-6", min: -331, max: 331 }), this._ozoneAbsorptionCoefficientA = new K({ label: "Ozone absorbtion Coef A.e-6", min: -6.5, max: 6.5 }), this._ozoneAbsorptionCoefficientB = new K({ label: "Ozone absorbtion Coef B.e-6", min: -6.5, max: 18.81 }), this._ozoneAbsorptionCoefficientC = new K({ label: "Ozone absorbtion Coef C.e-6", min: 0.085 * -10, max: 10 * 0.085 }), this._ozoneDensityHeight = new K({ label: "Ozone Density Height", max: 25e5 }), this._ozoneDensityWide = new K({ label: "Ozone Density Wide", max: 25e5 }), this._sunAngularRadius = new K({ label: "Sun Angular Radius", max: 4.685 }), this._sunIntensity = new K({ label: "Sun Intensity", max: 10 }), this._groundAlbedo = new K({ label: "Earth Albedo", max: 0.5 }), this._parameters = { ATMOS_HEIGHT: 0, RAYLEIGH_SCALE: 0, MIE_SCALE: 0, GROUND_ALBEDO: 0, BOTTOM_RADIUS: 0, rayleighScatteringCoefficient_0: 0, rayleighScatteringCoefficient_1: 0, rayleighScatteringCoefficient_2: 0, mieScatteringCoefficient: 0, mieExtinctionCoefficient: 0, ozoneAbsorptionCoefficient_0: 0, ozoneAbsorptionCoefficient_1: 0, ozoneAbsorptionCoefficient_2: 0, SUN_ANGULAR_RADIUS: 0, SUN_INTENSITY: 0, ozoneDensityHeight: 0, ozoneDensityWide: 0 };
11142
+ </div>` }), this._maxOpacity = new Q({ label: "Max.opacity", max: 5 }), this._minOpacity = new Q({ label: "Min.opacity", max: 5 }), this._rayleight = new Q({ label: "Rayleight Scale", min: -10, max: 10 }), this._mie = new Q({ label: "Mie Scale", min: -10, max: 10 }), this._height = new Q({ label: "Height", max: 1e6 }), this._bottomRadius = new Q({ label: "Planet Radius", max: 31783761571225896e-9 }), this._mieScatteringCoefficient = new Q({ label: "Mie Scattering Coefficient e-6", min: -39.96, max: 39.96 }), this._mieExtinctionCoefficient = new Q({ label: "Mie Extinction Coef.e-6", min: 4.44 * -10, max: 10 * 4.44 }), this._rayleighScatteringCoefficientA = new Q({ label: "Rayleight Scattering Coef A.e-6", min: 5.802 * -10, max: 10 * 5.802 }), this._rayleighScatteringCoefficientB = new Q({ label: "Rayleight Scattering Coef B.e-6", min: 13.558 * -10, max: 10 * 13.558 }), this._rayleighScatteringCoefficientC = new Q({ label: "Rayleight Scattering Coef C.e-6", min: -331, max: 331 }), this._ozoneAbsorptionCoefficientA = new Q({ label: "Ozone absorbtion Coef A.e-6", min: -6.5, max: 6.5 }), this._ozoneAbsorptionCoefficientB = new Q({ label: "Ozone absorbtion Coef B.e-6", min: -6.5, max: 18.81 }), this._ozoneAbsorptionCoefficientC = new Q({ label: "Ozone absorbtion Coef C.e-6", min: 0.085 * -10, max: 10 * 0.085 }), this._ozoneDensityHeight = new Q({ label: "Ozone Density Height", max: 25e5 }), this._ozoneDensityWide = new Q({ label: "Ozone Density Wide", max: 25e5 }), this._sunAngularRadius = new Q({ label: "Sun Angular Radius", max: 4.685 }), this._sunIntensity = new Q({ label: "Sun Intensity", max: 10 }), this._groundAlbedo = new Q({ label: "Earth Albedo", max: 0.5 }), this._parameters = { ATMOS_HEIGHT: 0, RAYLEIGH_SCALE: 0, MIE_SCALE: 0, GROUND_ALBEDO: 0, BOTTOM_RADIUS: 0, rayleighScatteringCoefficient_0: 0, rayleighScatteringCoefficient_1: 0, rayleighScatteringCoefficient_2: 0, mieScatteringCoefficient: 0, mieExtinctionCoefficient: 0, ozoneAbsorptionCoefficient_0: 0, ozoneAbsorptionCoefficient_1: 0, ozoneAbsorptionCoefficient_2: 0, SUN_ANGULAR_RADIUS: 0, SUN_INTENSITY: 0, ozoneDensityHeight: 0, ozoneDensityWide: 0 };
11133
11143
  }
11134
11144
  oninit() {
11135
11145
  this._toggleBtn.appendTo(this.renderer.div), this._dialog.appendTo(this.renderer.div), this._panel.appendTo(this._dialog.container), this._panel.el && (this.$height = this._panel.el.querySelector(".og-option.og-atmosphere-height"), this.$maxOpacity = this._panel.el.querySelector(".og-option.og-atmosphere-maxOpacity"), this.$minOpacity = this._panel.el.querySelector(".og-option.og-atmosphere-minOpacity"), this.$rayleight = this._panel.el.querySelector(".og-option.og-atmosphere-rayleight"), this.$mie = this._panel.el.querySelector(".og-option.og-atmosphere-mie"), this.$bottomRadius = this._panel.el.querySelector(".og-option.og-atmosphere-bottomRadius"), this.$mieScatteringCoefficient = this._panel.el.querySelector(".og-option.og-atmosphere-mieScatteringCoefficient"), this.$mieExtinctionCoefficient = this._panel.el.querySelector(".og-option.og-atmosphere-mieExtinctionCoefficient"), this.$rayleighScatteringCoefficientA = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientA"), this.$rayleighScatteringCoefficientB = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientB"), this.$rayleighScatteringCoefficientC = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientC"), this.$ozoneAbsorptionCoefficientA = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientA"), this.$ozoneAbsorptionCoefficientB = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientB"), this.$ozoneAbsorptionCoefficientC = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientC"), this.$sunAngularRadius = this._panel.el.querySelector(".og-option.og-atmosphere-sunAngularRadius"), this.$sunIntensity = this._panel.el.querySelector(".og-option.og-atmosphere-sunIntensity"), this.$groundAlbedo = this._panel.el.querySelector(".og-option.og-atmosphere-earthAlbedo"), this.$ozoneDensityHeight = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneDensityHeight"), this.$ozoneDensityWide = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneDensityWide")), this._toggleBtn.events.on("change", (a) => {
@@ -11274,7 +11284,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11274
11284
  }
11275
11285
  }, CameraFrameComposer: Vr, CameraFrameHandler: sn, CameraLock: rn, CompassButton: Jn, Control: J, DebugInfo: class extends J {
11276
11286
  constructor(a = {}) {
11277
- a.name && a.name !== "" || (a.name = "DebugInfo"), super(a), this.el = null, this._watch = a.watch || [], this._toggleBtn = new _e({ classList: ["og-map-button", "og-debuginfo_button"], icon: `<?xml version="1.0" encoding="iso-8859-1"?>
11287
+ a.name && a.name !== "" || (a.name = "DebugInfo"), super(a), this.el = null, this._watch = a.watch || [], this._toggleBtn = new fe({ classList: ["og-map-button", "og-debuginfo_button"], icon: `<?xml version="1.0" encoding="iso-8859-1"?>
11278
11288
  <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11279
11289
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
11280
11290
  <svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -11348,7 +11358,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11348
11358
  </div> <div style="float: left">
11349
11359
  ${Math.round(1e3 / i.renderer.handler.deltaTime)}
11350
11360
  </div></div>` }, { label: "-------------------------" }, { label: "Pitch, deg", frame: () => (i.camera.getPitch() * ee).toFixed(2) }, { label: "Yaw, deg", frame: () => (i.camera.getYaw() * ee).toFixed(2) }, { label: "Roll, deg", frame: () => (i.camera.getRoll() * ee).toFixed(2) }, { label: "Lon, Lat", frame: () => `<div style="width:190px">${i.camera._lonLat.lon.toFixed(7)}, ${i.camera._lonLat.lon.toFixed(7)}</div>` }, { label: "height/alt, m", frame: () => `<div style="width:190px">${i.camera._lonLat.height.toFixed(2) + " / " + i.camera.getAltitude().toFixed(2)}</div>` }, { label: "cam.slope", frame: () => i.camera.slope.toFixed(3) }, { label: "-------------------------" }, { label: "_renderCompleted / renderCompletedActivated", frame: () => `${i._renderCompleted} / ${i._renderCompletedActivated}` }, { label: "_terrainCompleted / terrainCompletedActivated", frame: () => `${i._terrainCompleted} / ${i._terrainCompletedActivated}` }, { label: "PlainWorker", frame: () => i._plainSegmentWorker.pendingQueue.length }, { label: "TileLoader", frame: () => `${i._tileLoader.loading} ${i._tileLoader.queue.length}` }, { label: "TerrainLoader", frame: () => i.terrain && !i.terrain.isEmpty ? `${i.terrain.loader.loading} ${i.terrain.loader.queue.length}` : "" }, { label: "TerrainWorker", frame: () => i._terrainWorker.pendingQueue.length }, { label: "NormalMapCreator", frame: () => i._normalMapCreator.queueSize }, { label: "VectorTileCreator", frame: () => i._vectorTileCreator.queueSize }]);
11351
- let r = new _e({ classList: ["og-debuginfo_controls-button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11361
+ let r = new fe({ classList: ["og-debuginfo_controls-button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11352
11362
  <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11353
11363
  <svg fill="#000000" width="800px" height="800px" viewBox="-7.5 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
11354
11364
  <title>lock</title>
@@ -11357,7 +11367,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11357
11367
  r.appendTo(e), r.events.on("change", (n) => {
11358
11368
  n ? i.lockQuadTree() : i.unlockQuadTree();
11359
11369
  });
11360
- let s = new _e({ classList: ["og-debuginfo_controls-button"], icon: `<?xml version="1.0"?>
11370
+ let s = new fe({ classList: ["og-debuginfo_controls-button"], icon: `<?xml version="1.0"?>
11361
11371
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
11362
11372
  <path d="M 4 4 L 4 8 L 8 8 L 8 4 L 4 4 z M 10 4 L 10 8 L 14 8 L 14 4 L 10 4 z M 16 4 L 16 8 L 20 8 L 20 4 L 16 4 z M 4 10 L 4 14 L 8 14 L 8 10 L 4 10 z M 10 10 L 10 14 L 14 14 L 14 10 L 10 10 z M 16 10 L 16 14 L 20 14 L 20 10 L 16 10 z M 4 16 L 4 20 L 8 20 L 8 16 L 4 16 z M 10 16 L 10 20 L 14 20 L 14 16 L 10 16 z M 16 16 L 16 20 L 20 20 L 20 16 L 16 16 z"/>
11363
11373
  </svg>`, title: "Show/Hide grid" });
@@ -11384,7 +11394,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11384
11394
  this.drawingControl.deactivate();
11385
11395
  }
11386
11396
  _createMenu() {
11387
- let a = new _e({ classList: ["og-map-button", "og-drawing-default_button"], icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 0l16 12.279-6.951 1.17 4.325 8.817-3.596 1.734-4.35-8.879-5.428 4.702z"/></svg>', name: "default", isActive: !0 }), e = new _e({ classList: ["og-map-button", "og-drawing-polygon_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11397
+ let a = new fe({ classList: ["og-map-button", "og-drawing-default_button"], icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 0l16 12.279-6.951 1.17 4.325 8.817-3.596 1.734-4.35-8.879-5.428 4.702z"/></svg>', name: "default", isActive: !0 }), e = new fe({ classList: ["og-map-button", "og-drawing-polygon_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11388
11398
  <!-- Generator: Adobe Illustrator 24.1.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
11389
11399
  <svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
11390
11400
  viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
@@ -11411,7 +11421,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11411
11421
  c-5.1,3.18-11.07,5.1-17.52,5.1c-6.08,0-11.71-1.76-16.62-4.61c-9.71-5.64-16.33-15.94-16.64-27.89c-0.01-0.29-0.09-0.56-0.09-0.85
11412
11422
  c0-11.75,6.14-22.05,15.36-28c5.2-3.35,11.35-5.35,17.99-5.35C944.41,385.78,959.36,400.75,959.36,419.13z"/>
11413
11423
  </g>
11414
- </svg>`, name: "polygon" }), t = new _e({ classList: ["og-map-button", "og-drawing-linestring_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- License: MIT. Made by Esri: https://github.com/Esri/calcite-ui-icons -->
11424
+ </svg>`, name: "polygon" }), t = new fe({ classList: ["og-map-button", "og-drawing-linestring_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- License: MIT. Made by Esri: https://github.com/Esri/calcite-ui-icons -->
11415
11425
  <svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 6h.046l-5.25 9h-.944L10 9.455V7H7v2.926L1.862 18H0v3h3v-2.926L8.138 10h1.01L14 15.545V18h3v-3h-.046l5.25-9H24V3h-3zM8 8h1v1H8zM2 20H1v-1h1zm14-3h-1v-1h1zm7-13v1h-1V4z"/></svg>`, name: "linestring" });
11416
11426
  new ao({ buttons: [a, e, t] }).events.on("change", (i) => {
11417
11427
  switch (this.drawingControl.deactivate(), i.name) {
@@ -11436,10 +11446,10 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11436
11446
  }, this._onElevationProfileMouseEnter = () => {
11437
11447
  this._elevationProfileView.model.pointsReady && this._elevationProfileScene.setPointerVisibility(!0);
11438
11448
  }, this._onElevationProfileMouseLeave = () => {
11439
- }, this._elevationProfileScene = new Ih(), this._elevationProfileView = new Ah(), this._elevationProfileLegend = new Nh(), this._elevationProfileButtonsView = new Fh({ model: this._elevationProfileView.model }), this._elevationProfileView.events.on("pointer", this._onElevationProfilePointer), this._elevationProfileView.events.on("dblclick", this._onElevationProfileDblClick), this._elevationProfileView.events.on("mouseenter", this._onElevationProfileMouseEnter), this._elevationProfileView.events.on("mouseleave", this._onElevationProfileMouseLeave), this._dialog = new st({ title: "Elevation Profile", visible: !1, resizable: !0, useHide: !0, top: 175, left: 65, width: 400, height: 200, minHeight: 100, minWidth: 100 }), this._graphView = new Ce({ template: `<div class="og-elevationprofile__container">
11449
+ }, this._elevationProfileScene = new Dh(), this._elevationProfileView = new Ph(), this._elevationProfileLegend = new Vh(), this._elevationProfileButtonsView = new Nh({ model: this._elevationProfileView.model }), this._elevationProfileView.events.on("pointer", this._onElevationProfilePointer), this._elevationProfileView.events.on("dblclick", this._onElevationProfileDblClick), this._elevationProfileView.events.on("mouseenter", this._onElevationProfileMouseEnter), this._elevationProfileView.events.on("mouseleave", this._onElevationProfileMouseLeave), this._dialog = new st({ title: "Elevation Profile", visible: !1, resizable: !0, useHide: !0, top: 175, left: 65, width: 400, height: 200, minHeight: 100, minWidth: 100 }), this._graphView = new Ce({ template: `<div class="og-elevationprofile__container">
11440
11450
  <div class="og-elevationprofile__menu"></div>
11441
11451
  <div class="og-elevationprofile__graph"></div>
11442
- </div>` }), this._poiListDialog = new Oh({ model: this._elevationProfileScene }), this._toggleBtn = new _e({ classList: ["og-map-button", "og-elevationprofile_button"], icon: '<svg style="width: 2em; height: 2em;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M128 896v-158.293333l331.946667-191.573334 160.853333 93.866667L896 480V896H128M896 381.44l-275.2 159.146667-160.853333-92.586667L128 640v-94.293333l331.946667-191.573334 160.853333 93.866667L896 288v93.44z" fill="" /></svg>' }), this._collectProfileThrottled = vi(() => {
11452
+ </div>` }), this._poiListDialog = new Hh({ model: this._elevationProfileScene }), this._toggleBtn = new fe({ classList: ["og-map-button", "og-elevationprofile_button"], icon: '<svg style="width: 2em; height: 2em;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M128 896v-158.293333l331.946667-191.573334 160.853333 93.866667L896 480V896H128M896 381.44l-275.2 159.146667-160.853333-92.586667L128 640v-94.293333l331.946667-191.573334 160.853333 93.866667L896 288v93.44z" fill="" /></svg>' }), this._collectProfileThrottled = vi(() => {
11443
11453
  let e = this._elevationProfileScene.getPointsLonLat();
11444
11454
  this._elevationProfileView.model.collectProfile(e);
11445
11455
  }, 250);
@@ -11546,7 +11556,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11546
11556
  }
11547
11557
  }, GeoImageDragControl: class extends J {
11548
11558
  constructor(a = {}) {
11549
- super(a), this._cornerIndex = -1, this._catchCorner = !1, this._toggleBtn = new _e({ classList: ["og-map-button", "og-geoimagegrag_button"], icon: '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z" fill="#000"/></svg>' });
11559
+ super(a), this._cornerIndex = -1, this._catchCorner = !1, this._toggleBtn = new fe({ classList: ["og-map-button", "og-geoimagegrag_button"], icon: '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M16 13l6.964 4.062-2.973.85 2.125 3.681-1.732 1-2.125-3.68-2.223 2.15L16 13zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5V6zM4 14v2H2v-2h2zm0-4v2H2v-2h2zm0-4v2H2V6h2zm0-4v2H2V2h2zm4 0v2H6V2h2zm4 0v2h-2V2h2zm4 0v2h-2V2h2z" fill="#000"/></svg>' });
11550
11560
  }
11551
11561
  oninit() {
11552
11562
  this._toggleBtn.appendTo(this.renderer.div), this.planet.events.on("layeradd", (a) => {
@@ -11600,7 +11610,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11600
11610
  }
11601
11611
  }, GeoObjectEditor: class extends J {
11602
11612
  constructor(a = {}) {
11603
- super(a), this._geoObjectEditopScene = new qh({ name: `geoObjectEditorScene:${this.__id}` }), this._dialog = new Qh({ model: this._geoObjectEditopScene });
11613
+ super(a), this._geoObjectEditopScene = new Xh({ name: `geoObjectEditorScene:${this.__id}` }), this._dialog = new ec({ model: this._geoObjectEditopScene });
11604
11614
  }
11605
11615
  oninit() {
11606
11616
  this.renderer && (this.renderer.addControl(new rn({ planet: this.planet })), this._geoObjectEditopScene.bindPlanet(this.planet), this._dialog.appendTo(this.renderer.div || document.body), this.activate());
@@ -11632,7 +11642,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11632
11642
  }
11633
11643
  onactivate() {
11634
11644
  let a = this.renderer;
11635
- a.events.on("keypress", q.KEY_S, this.onCameraMoveBackward, this), a.events.on("keypress", q.KEY_W, this.onCameraMoveForward, this), a.events.on("keypress", q.KEY_UP, this.onCameraPitchUp, this), a.events.on("keypress", q.KEY_DOWN, this.onCameraPitchDown, this), a.events.on("keypress", q.KEY_LEFT, this.onCameraYawLeft, this), a.events.on("keypress", q.KEY_RIGHT, this.onCameraYawRight, this), a.events.on("draw", this.onDraw, this, -1e3);
11645
+ a.events.on("keypress", W.KEY_S, this.onCameraMoveBackward, this), a.events.on("keypress", W.KEY_W, this.onCameraMoveForward, this), a.events.on("keypress", W.KEY_UP, this.onCameraPitchUp, this), a.events.on("keypress", W.KEY_DOWN, this.onCameraPitchDown, this), a.events.on("keypress", W.KEY_LEFT, this.onCameraYawLeft, this), a.events.on("keypress", W.KEY_RIGHT, this.onCameraYawRight, this), a.events.on("draw", this.onDraw, this, -1e3);
11636
11646
  }
11637
11647
  ondeactivate() {
11638
11648
  this.renderer;
@@ -11674,7 +11684,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11674
11684
  }
11675
11685
  this.events.dispatch(this.events.idle, t);
11676
11686
  }
11677
- }, this.events = ge(rh), this._name = a.name || `layerAnimation-${this.__id}`, this._layersArr = a.layers ? [].concat(a.layers) : [], this._currentIndex = -1, this._playInterval = a.playInterval || 120, this._playIntervalHandler = -1, this._playIndex = 0, this._frameSize = a.frameSize || 50, this.repeat = a.repeat == null || a.repeat, this.skipTimeout = a.skipTimeout || 5e3, this._timeoutStart = 0;
11687
+ }, this.events = de(rh), this._name = a.name || `layerAnimation-${this.__id}`, this._layersArr = a.layers ? [].concat(a.layers) : [], this._currentIndex = -1, this._playInterval = a.playInterval || 120, this._playIntervalHandler = -1, this._playIndex = 0, this._frameSize = a.frameSize || 50, this.repeat = a.repeat == null || a.repeat, this.skipTimeout = a.skipTimeout || 5e3, this._timeoutStart = 0;
11678
11688
  }
11679
11689
  _getFramesNum() {
11680
11690
  return Math.ceil(this._layersArr.length / this._frameSize);
@@ -11804,7 +11814,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11804
11814
  <div class="og-layerSwitcher__title">Overlays</div>
11805
11815
  <div class="og-layerSwitcher__list og-layerSwitcher__overlays"></div>
11806
11816
 
11807
- </div>` }), this._toggleBtn = new _e({ classList: ["og-map-button", "og-layerSwitcher_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11817
+ </div>` }), this._toggleBtn = new fe({ classList: ["og-map-button", "og-layerSwitcher_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
11808
11818
  <!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
11809
11819
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
11810
11820
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
@@ -11833,7 +11843,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11833
11843
  }
11834
11844
  }, Lighting: class extends J {
11835
11845
  constructor(a = {}) {
11836
- super(a), this._selectedLayer = null, this._toggleBtn = new _e({ classList: ["og-map-button", "og-lighting_button"], icon: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="256" height="256" viewBox="0 0 256 256" xml:space="preserve">
11846
+ super(a), this._selectedLayer = null, this._toggleBtn = new fe({ classList: ["og-map-button", "og-lighting_button"], icon: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="256" height="256" viewBox="0 0 256 256" xml:space="preserve">
11837
11847
 
11838
11848
  <defs>
11839
11849
  </defs>
@@ -11893,7 +11903,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11893
11903
  <div class="og-option og-specular">
11894
11904
  </div>
11895
11905
 
11896
- </div>` }), this.$gamma = null, this.$exposure = null, this.$night = null, this.$opacity = null, this.$diffuse = null, this.$ambient = null, this.$specular = null, this.$atmosphereOpacity = null, this.$simpleSkyBackground = null, this._atmosphereMaxOpacity = new K({ label: "Max.opacity", max: 5 }), this._atmosphereMinOpacity = new K({ label: "Min.opacity", max: 5 }), this._simpleSkyBackgroundColorOne = new Os({ label: "Color One" }), this._simpleSkyBackgroundColorTwo = new Os({ label: "Color Two" }), this._gamma = new K({ label: "Gamma", max: 5 }), this._exposure = new K({ label: "Exposure", max: 5 }), this._night = new K({ label: "Nightlight", max: 5 }), this._opacity = new K({ label: "Opacity", max: 1 }), this._diffuse_r = new K({ label: "Diffuse R", max: 5 }), this._diffuse_g = new K({ label: "Diffuse G", max: 5 }), this._diffuse_b = new K({ label: "Diffuse B", max: 5 }), this._ambient_r = new K({ label: "Ambient R", max: 5 }), this._ambient_g = new K({ label: "Ambient G", max: 5 }), this._ambient_b = new K({ label: "Ambient B", max: 5 }), this._specular_r = new K({ label: "Specular R", max: 0.2 }), this._specular_g = new K({ label: "Specular G", max: 0.2 }), this._specular_b = new K({ label: "Specular B", max: 0.2 }), this._shininess = new K({ label: "Shininess", max: 100 });
11906
+ </div>` }), this.$gamma = null, this.$exposure = null, this.$night = null, this.$opacity = null, this.$diffuse = null, this.$ambient = null, this.$specular = null, this.$atmosphereOpacity = null, this.$simpleSkyBackground = null, this._atmosphereMaxOpacity = new Q({ label: "Max.opacity", max: 5 }), this._atmosphereMinOpacity = new Q({ label: "Min.opacity", max: 5 }), this._simpleSkyBackgroundColorOne = new Os({ label: "Color One" }), this._simpleSkyBackgroundColorTwo = new Os({ label: "Color Two" }), this._gamma = new Q({ label: "Gamma", max: 5 }), this._exposure = new Q({ label: "Exposure", max: 5 }), this._night = new Q({ label: "Nightlight", max: 5 }), this._opacity = new Q({ label: "Opacity", max: 1 }), this._diffuse_r = new Q({ label: "Diffuse R", max: 5 }), this._diffuse_g = new Q({ label: "Diffuse G", max: 5 }), this._diffuse_b = new Q({ label: "Diffuse B", max: 5 }), this._ambient_r = new Q({ label: "Ambient R", max: 5 }), this._ambient_g = new Q({ label: "Ambient G", max: 5 }), this._ambient_b = new Q({ label: "Ambient B", max: 5 }), this._specular_r = new Q({ label: "Specular R", max: 0.2 }), this._specular_g = new Q({ label: "Specular G", max: 0.2 }), this._specular_b = new Q({ label: "Specular B", max: 0.2 }), this._shininess = new Q({ label: "Shininess", max: 100 });
11897
11907
  }
11898
11908
  bindLayer(a) {
11899
11909
  this._selectedLayer = a, this._opacity.value = a.opacity, this._update();
@@ -11902,9 +11912,9 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11902
11912
  this._toggleBtn.appendTo(this.renderer.div), this._dialog.appendTo(this.renderer.div), this._panel.appendTo(this._dialog.container), this._panel.el && (this.$atmosphereOpacity = this._panel.el.querySelector(".og-atmosphere-opacity"), this.$simpleSkyBackground = this._panel.el.querySelector(".og-simpleskybackground"), this.$gamma = this._panel.el.querySelector(".og-option.og-gamma"), this.$exposure = this._panel.el.querySelector(".og-option.og-exposure"), this.$opacity = this._panel.el.querySelector(".og-option.og-opacity"), this.$diffuse = this._panel.el.querySelector(".og-option.og-diffuse"), this.$ambient = this._panel.el.querySelector(".og-option.og-ambient"), this.$specular = this._panel.el.querySelector(".og-option.og-specular"), this.$night = this._panel.el.querySelector(".og-option.og-night")), this._toggleBtn.events.on("change", (n) => {
11903
11913
  this._dialog.setVisibility(n);
11904
11914
  });
11905
- let a = this._dialog.select(".og-suncontrol"), e = new _e({ classList: ["og-suncontrol-button"], isActive: !0, icon: '<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 70.41" style="enable-background:new 0 0 122.88 70.41" xml:space="preserve"><g><path d="M60.91,19.12c6.95,0,13.24,2.95,17.8,7.72c4.55,4.77,7.37,11.37,7.37,18.64c0,1.94-0.2,3.83-0.58,5.65h31.61 c2.1,0,2.62,1.16,2.62,2.59c0,1.43-0.52,2.59-2.62,2.59H7.09c-2.1,0-2.62-1.16-2.62-2.59c0-1.43,0.52-2.59,2.62-2.59h29.23 c-0.38-1.82-0.58-3.71-0.58-5.65c0-7.28,2.82-13.87,7.37-18.64C47.67,22.08,53.96,19.12,60.91,19.12L60.91,19.12L60.91,19.12z M63.4,70.41c-2.1,0-2.62-1.16-2.62-2.59s0.52-2.59,2.62-2.59h56.86c2.1,0,2.62,1.16,2.62,2.59s-0.52,2.59-2.62,2.59H63.4 L63.4,70.41z M2.62,70.41c-2.1,0-2.62-1.16-2.62-2.59s0.52-2.59,2.62-2.59h29.51c2.1,0,2.62,1.16,2.62,2.59s-0.52,2.59-2.62,2.59 H2.62L2.62,70.41z M38.39,9.46c-0.78-1.35-0.32-3.07,1.03-3.85c1.35-0.78,3.07-0.32,3.85,1.03l3.62,6.27 c0.78,1.35,0.32,3.07-1.03,3.85c-1.35,0.78-3.07,0.32-3.85-1.03L38.39,9.46L38.39,9.46L38.39,9.46z M58.67,2.83 c0-1.56,1.27-2.83,2.83-2.83c1.56,0,2.83,1.27,2.83,2.83v7.24c0,1.56-1.27,2.83-2.83,2.83c-1.56,0-2.83-1.26-2.83-2.83V2.83 L58.67,2.83L58.67,2.83z M79.56,7.23c0.77-1.35,2.49-1.81,3.84-1.04c1.35,0.77,1.81,2.49,1.04,3.84l-3.62,6.27 c-0.77,1.35-2.49,1.81-3.84,1.04c-1.35-0.77-1.81-2.49-1.04-3.84L79.56,7.23L79.56,7.23L79.56,7.23z M95.45,21.48 c1.35-0.78,3.07-0.32,3.85,1.03c0.78,1.35,0.32,3.07-1.03,3.85L92,29.98c-1.35,0.78-3.07,0.32-3.85-1.03 c-0.78-1.35-0.32-3.07,1.03-3.85L95.45,21.48L95.45,21.48L95.45,21.48z M102.08,41.76c1.56,0,2.83,1.27,2.83,2.83 c0,1.56-1.27,2.83-2.83,2.83h-7.24c-1.56,0-2.83-1.26-2.83-2.83s1.26-2.83,2.83-2.83H102.08L102.08,41.76L102.08,41.76z M19.74,46.25c-1.56,0-2.83-1.27-2.83-2.83c0-1.56,1.27-2.83,2.83-2.83h7.24c1.56,0,2.83,1.26,2.83,2.83s-1.27,2.83-2.83,2.83 H19.74L19.74,46.25L19.74,46.25z M24.14,25.35c-1.35-0.77-1.81-2.49-1.04-3.84c0.77-1.35,2.49-1.81,3.84-1.04l6.27,3.62 c1.35,0.77,1.81,2.49,1.04,3.84c-0.77,1.35-2.49,1.81-3.84,1.04L24.14,25.35L24.14,25.35L24.14,25.35z"/></g></svg>', title: "Star/stop the Sun from following the camera" });
11915
+ let a = this._dialog.select(".og-suncontrol"), e = new fe({ classList: ["og-suncontrol-button"], isActive: !0, icon: '<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 70.41" style="enable-background:new 0 0 122.88 70.41" xml:space="preserve"><g><path d="M60.91,19.12c6.95,0,13.24,2.95,17.8,7.72c4.55,4.77,7.37,11.37,7.37,18.64c0,1.94-0.2,3.83-0.58,5.65h31.61 c2.1,0,2.62,1.16,2.62,2.59c0,1.43-0.52,2.59-2.62,2.59H7.09c-2.1,0-2.62-1.16-2.62-2.59c0-1.43,0.52-2.59,2.62-2.59h29.23 c-0.38-1.82-0.58-3.71-0.58-5.65c0-7.28,2.82-13.87,7.37-18.64C47.67,22.08,53.96,19.12,60.91,19.12L60.91,19.12L60.91,19.12z M63.4,70.41c-2.1,0-2.62-1.16-2.62-2.59s0.52-2.59,2.62-2.59h56.86c2.1,0,2.62,1.16,2.62,2.59s-0.52,2.59-2.62,2.59H63.4 L63.4,70.41z M2.62,70.41c-2.1,0-2.62-1.16-2.62-2.59s0.52-2.59,2.62-2.59h29.51c2.1,0,2.62,1.16,2.62,2.59s-0.52,2.59-2.62,2.59 H2.62L2.62,70.41z M38.39,9.46c-0.78-1.35-0.32-3.07,1.03-3.85c1.35-0.78,3.07-0.32,3.85,1.03l3.62,6.27 c0.78,1.35,0.32,3.07-1.03,3.85c-1.35,0.78-3.07,0.32-3.85-1.03L38.39,9.46L38.39,9.46L38.39,9.46z M58.67,2.83 c0-1.56,1.27-2.83,2.83-2.83c1.56,0,2.83,1.27,2.83,2.83v7.24c0,1.56-1.27,2.83-2.83,2.83c-1.56,0-2.83-1.26-2.83-2.83V2.83 L58.67,2.83L58.67,2.83z M79.56,7.23c0.77-1.35,2.49-1.81,3.84-1.04c1.35,0.77,1.81,2.49,1.04,3.84l-3.62,6.27 c-0.77,1.35-2.49,1.81-3.84,1.04c-1.35-0.77-1.81-2.49-1.04-3.84L79.56,7.23L79.56,7.23L79.56,7.23z M95.45,21.48 c1.35-0.78,3.07-0.32,3.85,1.03c0.78,1.35,0.32,3.07-1.03,3.85L92,29.98c-1.35,0.78-3.07,0.32-3.85-1.03 c-0.78-1.35-0.32-3.07,1.03-3.85L95.45,21.48L95.45,21.48L95.45,21.48z M102.08,41.76c1.56,0,2.83,1.27,2.83,2.83 c0,1.56-1.27,2.83-2.83,2.83h-7.24c-1.56,0-2.83-1.26-2.83-2.83s1.26-2.83,2.83-2.83H102.08L102.08,41.76L102.08,41.76z M19.74,46.25c-1.56,0-2.83-1.27-2.83-2.83c0-1.56,1.27-2.83,2.83-2.83h7.24c1.56,0,2.83,1.26,2.83,2.83s-1.27,2.83-2.83,2.83 H19.74L19.74,46.25L19.74,46.25z M24.14,25.35c-1.35-0.77-1.81-2.49-1.04-3.84c0.77-1.35,2.49-1.81,3.84-1.04l6.27,3.62 c1.35,0.77,1.81,2.49,1.04,3.84c-0.77,1.35-2.49,1.81-3.84,1.04L24.14,25.35L24.14,25.35L24.14,25.35z"/></g></svg>', title: "Star/stop the Sun from following the camera" });
11906
11916
  e.appendTo(a);
11907
- let t = new _e({ classList: ["og-suncontrol-button"], isActive: !0, icon: `<?xml version="1.0"?>
11917
+ let t = new fe({ classList: ["og-suncontrol-button"], isActive: !0, icon: `<?xml version="1.0"?>
11908
11918
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
11909
11919
  <path style="text-indent:0;text-align:start;line-height:normal;text-transform:none;block-progression:tb;-inkscape-font-specification:Sans" d="M 16 4 C 9.3844277 4 4 9.3844277 4 16 C 4 22.615572 9.3844277 28 16 28 C 22.615572 28 28 22.615572 28 16 C 28 9.3844277 22.615572 4 16 4 z M 16 6 C 16.389823 6 16.778223 6.0506339 17.15625 6.09375 C 18.631659 7.6568432 21 10.9245 21 16 C 21 21.0755 18.631659 24.343157 17.15625 25.90625 C 16.778223 25.949366 16.389823 26 16 26 C 10.465308 26 6 21.534692 6 16 C 6 10.465308 10.465308 6 16 6 z" overflow="visible" font-family="Sans"/>
11910
11920
  </svg>
@@ -11916,7 +11926,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11916
11926
  const o = this.planet.renderer.controls.sun;
11917
11927
  n ? o.activate() : o.deactivate();
11918
11928
  });
11919
- let i = new _e({ classList: ["og-suncontrol-button"], isActive: this.planet.lightEnabled, icon: `<?xml version="1.0" encoding="utf-8"?>
11929
+ let i = new fe({ classList: ["og-suncontrol-button"], isActive: this.planet.lightEnabled, icon: `<?xml version="1.0" encoding="utf-8"?>
11920
11930
  <!-- Generated by IcoMoon.io -->
11921
11931
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
11922
11932
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" viewBox="0 0 512 512">
@@ -11935,7 +11945,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
11935
11945
  i.appendTo(a), i.events.on("change", (n) => {
11936
11946
  this.planet.lightEnabled = n;
11937
11947
  });
11938
- let r = new _e({ classList: ["og-suncontrol-button"], isActive: this.planet.atmosphereEnabled, icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11948
+ let r = new fe({ classList: ["og-suncontrol-button"], isActive: this.planet.atmosphereEnabled, icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
11939
11949
  <svg width="800px" height="800px" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M135.688 18.5c-6.798 74.842-23.842 85.39-107.907 59.656 84.85 52.022 73.57 64.954-6.843 96.938 87.743-10.27 103.29 4.89 70.75 87.594 17.805-27.56 32.5-44.498 46.282-54.47-11.813 28.26-18.345 59.274-18.345 91.813 0 84.184 43.71 157.96 109.656 200.376-41.624-43.834-67.686-102.7-67.686-167.875 0-134.923 109.45-244.405 244.375-244.405 30.92 0 60.76 5.762 88 16.25-38.584-26.87-85.517-42.625-136.064-42.625-55.257 0-106.14 18.802-146.562 50.375 4.627-18.783 17.39-38.073 41.03-60.906C190.18 90.942 153.53 95.634 135.69 18.5zm10.03 77.188c5.67.002 11.428 1.247 16.876 3.874 14.506 6.998 22.72 21.81 22 36.938-10.26 10.87-19.507 22.696-27.594 35.344-9.035 2.753-19.075 2.27-28.25-2.156-19.37-9.343-27.5-32.6-18.156-51.97 6.715-13.92 20.638-22.036 35.125-22.03z"/></svg>`, title: "Enable/disable atmosphere scattering" });
11940
11950
  r.appendTo(a), this.planet.atmosphereEnabled ? (this.$atmosphereOpacity.style.display = "block", this.$simpleSkyBackground.style.display = "none") : (this.$atmosphereOpacity.style.display = "none", this.$simpleSkyBackground.style.display = "flex"), r.events.on("change", (n) => {
11941
11951
  this.planet.atmosphereEnabled = n, this.planet.atmosphereEnabled ? (this.$atmosphereOpacity.style.display = "block", this.$simpleSkyBackground.style.display = "none") : (this.$atmosphereOpacity.style.display = "none", this.$simpleSkyBackground.style.display = "flex");
@@ -12011,11 +12021,11 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12011
12021
  }, this._onClick = (e) => {
12012
12022
  if (!this.planet || !this._layer || !this._currentItem) return;
12013
12023
  let t = this.planet.getLonLatFromPixelTerrain(e.pos);
12014
- if (t && (this.renderer.setRelativeCenter(this.planet.camera.eye), this.renderer.events.isKeyPressed(q.KEY_CTRL))) {
12024
+ if (t && (this.renderer.setRelativeCenter(this.planet.camera.eye), this.renderer.events.isKeyPressed(W.KEY_CTRL))) {
12015
12025
  let i = this._createEntity(this._currentItem, t);
12016
12026
  this._layer.add(i);
12017
12027
  }
12018
- }, this._layer = a.layer || null, this._currentItem = null, this._collection = new hs({ collection: a.collection }), this._dialog = new nc({ model: this._collection });
12028
+ }, this._layer = a.layer || null, this._currentItem = null, this._collection = new hs({ collection: a.collection }), this._dialog = new ac({ model: this._collection });
12019
12029
  }
12020
12030
  oninit() {
12021
12031
  this.renderer && (this._dialog.appendTo(this.renderer.div || document.body), this._dialog.events.on("select", this._onSelect), this.activate());
@@ -12057,7 +12067,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12057
12067
  this.ruler.deactivate();
12058
12068
  }
12059
12069
  _createMenuBtn() {
12060
- let a = new _e({ classList: ["og-map-button", "og-ruler_button"], icon: `<?xml version="1.0" encoding="iso-8859-1"?>
12070
+ let a = new fe({ classList: ["og-map-button", "og-ruler_button"], icon: `<?xml version="1.0" encoding="iso-8859-1"?>
12061
12071
  <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
12062
12072
  <svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
12063
12073
  viewBox="0 0 512 512" xml:space="preserve">
@@ -12078,7 +12088,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12078
12088
  }
12079
12089
  }, ScaleControl: xa, Selection: class extends J {
12080
12090
  constructor(a = {}) {
12081
- super(a), this._selectorScene = new fh({ name: `selectionScene:${this.__id}`, ignoreTerrain: a.ignoreTerrain, onSelect: a.onSelect, autoSelectionHide: a.autoSelectionHide }), this._toggleBtn = new _e({ classList: ["og-map-button", "og-selection_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
12091
+ super(a), this._selectorScene = new ph({ name: `selectionScene:${this.__id}`, ignoreTerrain: a.ignoreTerrain, onSelect: a.onSelect, autoSelectionHide: a.autoSelectionHide }), this._toggleBtn = new fe({ classList: ["og-map-button", "og-selection_button"], icon: `<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
12082
12092
  <svg width="800px" height="800px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--gis" preserveAspectRatio="xMidYMid meet"><path d="M2.1 0v1.914H0v6h3V3h5.1V0h-6zm9 0v3h6V0h-6zm9 0v3h6V0h-6zm9 0v3h6V0h-6zm9 0v3h6V0h-6zm9 0v3h6V0h-6zm9 0v3h6V0h-6zm9 0v3h1.8v1.2h3V0h-4.8zm1.8 7.2v6h3v-6h-3zM0 10.913v6h3v-6H0zM66.9 16.2v6h3v-6h-3zM0 19.914v6h3v-6H0zM66.9 25.2v6h3v-6h-3zM0 28.914v6h3v-6H0zM66.9 34.2v6h3v-6h-3zM0 37.914v6h3v-6H0zM66.9 43.2v6h3v-6h-3zM0 46.914v6h3v-6H0zM66.9 52.2v6h3v-6h-3zM0 55.914v5.191h3.809v-3H3v-2.19H0zm6.809 2.191v3h6v-3h-6zm9 0v3h6v-3h-6zm9 0v3h6v-3h-6zm9 0v3h6v-3h-6zm9 0v3h6v-3h-6zm9 0v3h6v-3h-6zm9 0v3h6v-3h-6zm9.648 1.899a2.076 2.076 0 0 0-2.19 2.324l3.137 33.676c.2 1.635 2.135 2.399 3.397 1.34l6.623-5.371l2.969 5.142c1.707 2.958 4.417 3.684 7.375 1.977c2.957-1.708 3.684-4.417 1.976-7.375l-2.959-5.125l7.848-3.008c1.548-.564 1.855-2.62.539-3.611L71.576 60.416a2.073 2.073 0 0 0-1.119-.412z" fill="#000000"></path></svg>` });
12083
12093
  }
12084
12094
  set ignoreTerrain(a) {
@@ -12169,12 +12179,12 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12169
12179
  onactivate() {
12170
12180
  super.onactivate();
12171
12181
  let a = this.renderer;
12172
- a.events.on("mousewheel", this._onMouseWheel), a.events.on("keypress", q.KEY_W, this.onCameraMoveForward, this), a.events.on("keypress", q.KEY_S, this.onCameraMoveBackward, this), a.events.on("keypress", q.KEY_A, this.onCameraStrifeLeft, this), a.events.on("keypress", q.KEY_D, this.onCameraStrifeRight, this), a.events.on("keypress", q.KEY_UP, this.onCameraLookUp, this), a.events.on("keypress", q.KEY_DOWN, this.onCameraLookDown, this), a.events.on("keypress", q.KEY_LEFT, this.onCameraTurnLeft, this), a.events.on("keypress", q.KEY_RIGHT, this.onCameraTurnRight, this), a.events.on("keypress", q.KEY_Q, this.onCameraRollLeft, this), a.events.on("keypress", q.KEY_E, this.onCameraRollRight, this), a.events.on("rhold", this._onRHold, this), a.events.on("rdown", this._onRDown, this), a.events.on("lhold", this._onMouseLeftButtonDown), a.events.on("ldown", this._onMouseLeftButtonClick), a.events.on("lup", this._onMouseLeftButtonUp), a.events.on("draw", this.onDraw, this, -1e3);
12182
+ a.events.on("mousewheel", this._onMouseWheel), a.events.on("keypress", W.KEY_W, this.onCameraMoveForward, this), a.events.on("keypress", W.KEY_S, this.onCameraMoveBackward, this), a.events.on("keypress", W.KEY_A, this.onCameraStrifeLeft, this), a.events.on("keypress", W.KEY_D, this.onCameraStrifeRight, this), a.events.on("keypress", W.KEY_UP, this.onCameraLookUp, this), a.events.on("keypress", W.KEY_DOWN, this.onCameraLookDown, this), a.events.on("keypress", W.KEY_LEFT, this.onCameraTurnLeft, this), a.events.on("keypress", W.KEY_RIGHT, this.onCameraTurnRight, this), a.events.on("keypress", W.KEY_Q, this.onCameraRollLeft, this), a.events.on("keypress", W.KEY_E, this.onCameraRollRight, this), a.events.on("rhold", this._onRHold, this), a.events.on("rdown", this._onRDown, this), a.events.on("lhold", this._onMouseLeftButtonDown), a.events.on("ldown", this._onMouseLeftButtonClick), a.events.on("lup", this._onMouseLeftButtonUp), a.events.on("draw", this.onDraw, this, -1e3);
12173
12183
  }
12174
12184
  ondeactivate() {
12175
12185
  super.ondeactivate();
12176
12186
  let a = this.renderer;
12177
- a.events.off("mousewheel", this._onMouseWheel), a.events.off("keypress", q.KEY_W, this.onCameraMoveForward), a.events.off("keypress", q.KEY_S, this.onCameraMoveBackward), a.events.off("keypress", q.KEY_A, this.onCameraStrifeLeft), a.events.off("keypress", q.KEY_D, this.onCameraStrifeRight), a.events.off("keypress", q.KEY_UP, this.onCameraLookUp), a.events.off("keypress", q.KEY_DOWN, this.onCameraLookDown), a.events.off("keypress", q.KEY_LEFT, this.onCameraTurnLeft), a.events.off("keypress", q.KEY_RIGHT, this.onCameraTurnRight), a.events.off("keypress", q.KEY_Q, this.onCameraRollLeft), a.events.off("keypress", q.KEY_E, this.onCameraRollRight), a.events.off("rhold", this._onRHold), a.events.off("rdown", this._onRDown), a.events.off("lhold", this._onMouseLeftButtonDown), a.events.off("ldown", this._onMouseLeftButtonClick), a.events.off("lup", this._onMouseLeftButtonUp), a.events.off("draw", this.onDraw);
12187
+ a.events.off("mousewheel", this._onMouseWheel), a.events.off("keypress", W.KEY_W, this.onCameraMoveForward), a.events.off("keypress", W.KEY_S, this.onCameraMoveBackward), a.events.off("keypress", W.KEY_A, this.onCameraStrifeLeft), a.events.off("keypress", W.KEY_D, this.onCameraStrifeRight), a.events.off("keypress", W.KEY_UP, this.onCameraLookUp), a.events.off("keypress", W.KEY_DOWN, this.onCameraLookDown), a.events.off("keypress", W.KEY_LEFT, this.onCameraTurnLeft), a.events.off("keypress", W.KEY_RIGHT, this.onCameraTurnRight), a.events.off("keypress", W.KEY_Q, this.onCameraRollLeft), a.events.off("keypress", W.KEY_E, this.onCameraRollRight), a.events.off("rhold", this._onRHold), a.events.off("rdown", this._onRDown), a.events.off("lhold", this._onMouseLeftButtonDown), a.events.off("ldown", this._onMouseLeftButtonClick), a.events.off("lup", this._onMouseLeftButtonUp), a.events.off("draw", this.onDraw);
12178
12188
  }
12179
12189
  get dt() {
12180
12190
  return 1e-3 * this.renderer.handler.deltaTime;
@@ -12190,8 +12200,8 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12190
12200
  }, SimpleSkyBackground: ba, Sun: Hr, TimelineControl: class extends J {
12191
12201
  constructor(a = {}) {
12192
12202
  super({ name: "timeline", ...a });
12193
- let e = a.current || /* @__PURE__ */ new Date(), t = a.rangeStart || qs(e, -12), i = a.rangeEnd || qs(e, 12);
12194
- this._timelineView = new wh({ rangeStart: t, rangeEnd: i, currentDate: e }), this._toggleBtn = new _e({ classList: ["og-map-button", "og-timeline_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
12203
+ let e = a.current || /* @__PURE__ */ new Date(), t = a.rangeStart || Ws(e, -12), i = a.rangeEnd || Ws(e, 12);
12204
+ this._timelineView = new Th({ rangeStart: t, rangeEnd: i, currentDate: e }), this._toggleBtn = new fe({ classList: ["og-map-button", "og-timeline_button"], icon: `<?xml version="1.0" encoding="utf-8"?>
12195
12205
  <!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
12196
12206
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
12197
12207
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
@@ -12226,13 +12236,13 @@ Object.freeze(Object.defineProperty({ __proto__: null, AtmosphereConfig: class e
12226
12236
  }, this._isActive = a.isActive || !1;
12227
12237
  }
12228
12238
  oninit() {
12229
- this.renderer.events.on("charkeypress", q.KEY_X, this.toogleWireframe, this), this._isActive && this.planet.setDrawMode(this.renderer.handler.gl.LINE_STRIP);
12239
+ this.renderer.events.on("charkeypress", W.KEY_X, this.toogleWireframe, this), this._isActive && this.planet.setDrawMode(this.renderer.handler.gl.LINE_STRIP);
12230
12240
  }
12231
12241
  }, TouchNavigation: wa, ZoomControl: Ca }, Symbol.toStringTag, { value: "Module" }));
12232
12242
  function $t(a) {
12233
12243
  return new Uint32Array(a);
12234
12244
  }
12235
- function fc(a) {
12245
+ function pc(a) {
12236
12246
  let e = [], t = 0, i = 0, r = 0;
12237
12247
  for (let s = 1; s < a - 1 - 1; s++) {
12238
12248
  for (let n = 1; n < a - 1; n++) t = s * a + n, r = (s + 1) * a, i = r + n, e.push(t, i);
@@ -12240,7 +12250,7 @@ function fc(a) {
12240
12250
  }
12241
12251
  return e.push(e[e.length - 1], a * a - a), $t(e);
12242
12252
  }
12243
- function gc(a, e) {
12253
+ function mc(a, e) {
12244
12254
  let t = [];
12245
12255
  const i = (a - 1) / e, r = a * a - a;
12246
12256
  let s = 0;
@@ -12251,7 +12261,7 @@ function gc(a, e) {
12251
12261
  }
12252
12262
  return e === a - 1 && (t.push(a), t.push(0)), $t(t);
12253
12263
  }
12254
- function pc(a, e) {
12264
+ function vc(a, e) {
12255
12265
  let t = [];
12256
12266
  const i = (a - 1) / e;
12257
12267
  let r = 0;
@@ -12262,7 +12272,7 @@ function pc(a, e) {
12262
12272
  }
12263
12273
  return e === a - 1 && (t.push(a - 2), t.push(a - 1)), $t(t);
12264
12274
  }
12265
- function mc(a, e) {
12275
+ function yc(a, e) {
12266
12276
  let t = [];
12267
12277
  const i = (a - 1) / e;
12268
12278
  let r = 0;
@@ -12273,7 +12283,7 @@ function mc(a, e) {
12273
12283
  }
12274
12284
  return e === a - 1 && (t.push(a * (a - 1) - 1), t.push(a * a - 1)), $t(t);
12275
12285
  }
12276
- function vc(a, e) {
12286
+ function xc(a, e) {
12277
12287
  let t = [];
12278
12288
  const i = (a - 1) / e;
12279
12289
  let r = 0;
@@ -12292,7 +12302,7 @@ function hn(a) {
12292
12302
  e[0][t] = [], e[3][t] = [], e[2][t] = [], e[1][t] = [];
12293
12303
  for (let r = 0; r <= a; r++) {
12294
12304
  let s = Math.pow(2, r);
12295
- e[3][t][r] = gc(i, s), e[0][t][r] = pc(i, s), e[1][t][r] = mc(i, s), e[2][t][r] = vc(i, s);
12305
+ e[3][t][r] = mc(i, s), e[0][t][r] = vc(i, s), e[1][t][r] = yc(i, s), e[2][t][r] = xc(i, s);
12296
12306
  }
12297
12307
  }
12298
12308
  return e;
@@ -12301,16 +12311,16 @@ function cn(a) {
12301
12311
  let e = [];
12302
12312
  for (let t = 0; t <= a; t++) {
12303
12313
  const i = Math.pow(2, t);
12304
- e[t] = fc(i + 1);
12314
+ e[t] = pc(i + 1);
12305
12315
  }
12306
12316
  return e;
12307
12317
  }
12308
- function yc(a) {
12318
+ function bc(a) {
12309
12319
  let e = new Uint16Array((a + 1) * (a + 1) * 2), t = 0;
12310
12320
  for (let i = 0; i <= a; i++) for (let r = 0; r <= a; r++) e[t++] = r / a * 65535, e[t++] = i / a * 65535;
12311
12321
  return e;
12312
12322
  }
12313
- let xc = new class {
12323
+ let wc = new class {
12314
12324
  constructor(a = 0) {
12315
12325
  this._maxGridSize = a, this.centerIndexesTable = cn(this._maxGridSize), this.skirtsIndexesTable = hn(this._maxGridSize);
12316
12326
  }
@@ -12335,13 +12345,13 @@ let xc = new class {
12335
12345
  let e = [];
12336
12346
  for (let t = 0; t <= a; t++) {
12337
12347
  const i = Math.pow(2, t);
12338
- e[t] = yc(i);
12348
+ e[t] = bc(i);
12339
12349
  }
12340
12350
  return e;
12341
12351
  }
12342
12352
  }();
12343
12353
  function Ui() {
12344
- return xc;
12354
+ return wc;
12345
12355
  }
12346
12356
  function dn() {
12347
12357
  return new X("drawnode_screen_wl", { uniforms: { projectionMatrix: "mat4", viewMatrix: "mat4", eyePositionHigh: "vec3", eyePositionLow: "vec3", height: "float", uGlobalTextureCoord: "vec4", uNormalMapBias: "vec3", samplerCount: "int", tileOffsetArr: "vec4", layerOpacityArr: "float", samplerArr: "sampler2darray", defaultTexture: "sampler2d", uNormalMap: "sampler2d", nightTexture: "sampler2d", specularTexture: "sampler2d", lightPosition: "vec3", diffuse: "vec3", ambient: "vec3", specular: "vec4", camHeight: "float", nightTextureCoefficient: "float" }, attributes: { aVertexPositionHigh: "vec3", aVertexPositionLow: "vec3", aTextureCoord: "vec2" }, vertexShader: "attribute vec3 aVertexPositionHigh;attribute vec3 aVertexPositionLow;attribute vec2 aTextureCoord;uniform mat4 projectionMatrix;uniform mat4 viewMatrix;uniform vec4 uGlobalTextureCoord;uniform vec3 uNormalMapBias;uniform vec3 eyePositionHigh;uniform vec3 eyePositionLow;uniform float height;varying vec4 vTextureCoord;varying vec3 v_vertex;varying vec3 cameraPosition;varying vec2 vGlobalTextureCoord;varying float v_height;void main(void){vec3 aVertexPosition=aVertexPositionHigh+aVertexPositionLow;vec3 nh=height*normalize(aVertexPosition);vTextureCoord.xy=aTextureCoord;vGlobalTextureCoord=uGlobalTextureCoord.xy+(uGlobalTextureCoord.zw-uGlobalTextureCoord.xy)*aTextureCoord;vTextureCoord.zw=uNormalMapBias.z*(aTextureCoord+uNormalMapBias.xy);cameraPosition=eyePositionHigh+eyePositionLow;vec3 highDiff=aVertexPositionHigh-eyePositionHigh;vec3 lowDiff=aVertexPositionLow-eyePositionLow+nh;mat4 viewMatrixRTE=viewMatrix;viewMatrixRTE[3]=vec4(0.0,0.0,0.0,1.0);v_height=height;v_vertex=aVertexPosition+nh;gl_Position=projectionMatrix*viewMatrixRTE*vec4(highDiff*step(1.0,length(highDiff))+lowDiff,1.0);}", fragmentShader: `precision highp float;float getLerpValue(in float min,in float max,in float between){return(clamp(between,min,max)-min)/(max-min);}vec3 aces(vec3 color){float a=2.51;float b=0.03;float c=2.43;float d=0.59;float e=0.14;return clamp((color*(a*color+b))/(color*(c*color+d)+e),0.0,1.0);}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t1,inout float t2){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t1=-b-sqrt(d);t2=-b+sqrt(d);return true;}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t=-b-sqrt(d);return true;}float intersectSphere(vec3 ro,vec3 rd,vec4 sph){vec3 oc=ro-sph.xyz;float b=dot(oc,rd);float c=dot(oc,oc)-sph.w*sph.w;float h=b*b-c;if(h<0.0)return-1.0;h=sqrt(h);return-b-h;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}t=(-b-sqrt(h))/a;return true;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t1,inout float t2){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}h=sqrt(h);t1=(-b-h)/a;t2=(-b+h)/a;return true;}vec3 normalEllipsoid(in vec3 pos,in vec3 ra){return normalize(pos/(ra*ra));}
@@ -12359,8 +12369,8 @@ function un(a) {
12359
12369
  return new X("drawnode_screen_wl", { uniforms: { projectionMatrix: "mat4", viewMatrix: "mat4", eyePositionHigh: "vec3", eyePositionLow: "vec3", height: "float", uGlobalTextureCoord: "vec4", uNormalMapBias: "vec3", samplerCount: "int", tileOffsetArr: "vec4", layerOpacityArr: "float", samplerArr: "sampler2darray", defaultTexture: "sampler2d", uNormalMap: "sampler2d", nightTexture: "sampler2d", specularTexture: "sampler2d", lightPosition: "vec3", diffuse: "vec3", ambient: "vec3", specular: "vec4", transmittanceTexture: "sampler2D", scatteringTexture: "sampler2D", camHeight: "float", nightTextureCoefficient: "float", maxMinOpacity: "vec2", transitionOpacity: "float" }, attributes: { aVertexPositionHigh: "vec3", aVertexPositionLow: "vec3", aTextureCoord: "vec2" }, vertexShader: `#version 300 es
12360
12370
  precision highp float;in vec3 aVertexPositionHigh;in vec3 aVertexPositionLow;in vec2 aTextureCoord;uniform mat4 projectionMatrix;uniform mat4 viewMatrix;uniform vec4 uGlobalTextureCoord;uniform vec3 uNormalMapBias;uniform vec3 eyePositionHigh;uniform vec3 eyePositionLow;uniform float height;out vec4 vTextureCoord;out vec3 v_vertex;out vec3 cameraPosition;out vec2 vGlobalTextureCoord;out float v_height;void main(void){vec3 aVertexPosition=aVertexPositionHigh+aVertexPositionLow;vec3 nh=height*normalize(aVertexPosition);vTextureCoord.xy=aTextureCoord;vGlobalTextureCoord=uGlobalTextureCoord.xy+(uGlobalTextureCoord.zw-uGlobalTextureCoord.xy)*aTextureCoord;vTextureCoord.zw=uNormalMapBias.z*(aTextureCoord+uNormalMapBias.xy);cameraPosition=eyePositionHigh+eyePositionLow;vec3 highDiff=aVertexPositionHigh-eyePositionHigh;vec3 lowDiff=aVertexPositionLow-eyePositionLow+nh;mat4 viewMatrixRTE=viewMatrix;viewMatrixRTE[3]=vec4(0.0,0.0,0.0,1.0);v_height=height;v_vertex=aVertexPosition+nh;gl_Position=projectionMatrix*viewMatrixRTE*vec4(highDiff*step(1.0,length(highDiff))+lowDiff,1.0);}`, fragmentShader: di("#version 300 es\nprecision highp float;\n#ifdef WEBGL2\n#define TEXTURE_FUNC texture\n#else\n#define TEXTURE_FUNC texture2D\n#endif\n#define SLICE_SIZE 5\n#define blend(DEST, SAMPLER, OFFSET, OPACITY) src = TEXTURE_FUNC(SAMPLER, OFFSET.xy + vTextureCoord.xy * OFFSET.zw); DEST = DEST * (1.0 - src.a * OPACITY) + src * OPACITY;\n#define blendPicking(DEST, OFFSET, SAMPLER, MASK, COLOR, OPACITY) tc = OFFSET.xy + vTextureCoord.xy * OFFSET.zw; t = TEXTURE_FUNC(SAMPLER, tc); p = TEXTURE_FUNC(MASK, tc); DEST = mix(DEST, vec4(max(COLOR.rgb, p.rgb), OPACITY), (t.a == 0.0 ? 0.0: 1.0) * COLOR.a);\nconst vec3 nightStep=10.0*vec3(0.58,0.48,0.25);float getLerpValue(in float min,in float max,in float between){return(clamp(between,min,max)-min)/(max-min);}vec3 aces(vec3 color){float a=2.51;float b=0.03;float c=2.43;float d=0.59;float e=0.14;return clamp((color*(a*color+b))/(color*(c*color+d)+e),0.0,1.0);}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t1,inout float t2){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t1=-b-sqrt(d);t2=-b+sqrt(d);return true;}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t=-b-sqrt(d);return true;}float intersectSphere(vec3 ro,vec3 rd,vec4 sph){vec3 oc=ro-sph.xyz;float b=dot(oc,rd);float c=dot(oc,oc)-sph.w*sph.w;float h=b*b-c;if(h<0.0)return-1.0;h=sqrt(h);return-b-h;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}t=(-b-sqrt(h))/a;return true;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t1,inout float t2){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}h=sqrt(h);t1=(-b-h)/a;t2=(-b+h)/a;return true;}vec3 normalEllipsoid(in vec3 pos,in vec3 ra){return normalize(pos/(ra*ra));}\n#define PI 3.1415926538\n#define ATMOS_HEIGHT float(${ATMOS_HEIGHT})\n#define RAYLEIGH_SCALE float(${RAYLEIGH_SCALE})\n#define MIE_SCALE float(${MIE_SCALE})\n#define SAMPLE_COUNT 16\n#define SQRT_SAMPLE_COUNT 4\nconst float GROUND_ALBEDO=float(${GROUND_ALBEDO})/PI;const float BOTTOM_RADIUS=float(${BOTTOM_RADIUS});const float TOP_RADIUS=BOTTOM_RADIUS+ATMOS_HEIGHT;const float EQUATORIAL_RADIUS=6378137.0;const vec3 bottomRadii=vec3(EQUATORIAL_RADIUS,EQUATORIAL_RADIUS,BOTTOM_RADIUS);const vec3 topRadii=bottomRadii+ATMOS_HEIGHT;const vec3 SPHERE_TO_ELLIPSOID_SCALE=vec3(BOTTOM_RADIUS)/bottomRadii;const vec2 rayleighMieHeights=vec2(RAYLEIGH_SCALE,MIE_SCALE)*ATMOS_HEIGHT;const vec3 rayleighScatteringCoefficient=vec3(float(${rayleighScatteringCoefficient_0}),float(${rayleighScatteringCoefficient_1}),float(${rayleighScatteringCoefficient_2}))*1e-6;const float mieScatteringCoefficient=float(${mieScatteringCoefficient})*1e-6;const float mieExtinctionCoefficient=float(${mieExtinctionCoefficient})*1e-6;const vec3 ozoneAbsorptionCoefficient=vec3(float(${ozoneAbsorptionCoefficient_0}),float(${ozoneAbsorptionCoefficient_1}),float(${ozoneAbsorptionCoefficient_2}))*1e-6;const float SUN_ANGULAR_RADIUS=float(${SUN_ANGULAR_RADIUS});const float SUN_INTENSITY=float(${SUN_INTENSITY});const float ozoneDensityHeight=float(${ozoneDensityHeight});const float ozoneDensityWide=float(${ozoneDensityWide});vec3 sunWithBloom(vec3 rayDir,vec3 sunDir){float minSunCosTheta=cos(SUN_ANGULAR_RADIUS);float cosTheta=dot(rayDir,sunDir);if(cosTheta>=minSunCosTheta)return vec3(1.0);float offset=minSunCosTheta-cosTheta;float gaussianBloom=exp(-offset*15000.0)*0.7;float invBloom=1.0/(0.09+offset*200.0)*0.01;return vec3(gaussianBloom+invBloom);}float rayleighPhase(float angle){return 3.0/(16.0*PI)*(1.0+(angle*angle));}float miePhase(float angle){float g=0.8;return 3.0/(8.0*PI)*((1.0-g*g)*(1.0+angle*angle))/((2.0+g*g)*pow(1.0+g*g-2.0*g*angle,1.5));}vec3 opticalDepth(float height,float angle){vec3 rayOrigin=vec3(0.0,BOTTOM_RADIUS+height,0.0);vec3 rayDirection=vec3(sqrt(1.0-angle*angle),angle,0.0);float t1,t2;intersectSphere(rayOrigin,rayDirection,TOP_RADIUS,t1,t2);float segmentLength=t2/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 opticalDepth=vec3(0.0);for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;opticalDepth.xy+=exp(-height/rayleighMieHeights)*segmentLength;opticalDepth.z+=(1.0-min(abs(height-ozoneDensityHeight)/ozoneDensityWide,1.0))*segmentLength;t+=segmentLength;}return opticalDepth;}vec3 transmittance(float height,float angle){vec3 opticalDepth=opticalDepth(height,angle);return exp(-(rayleighScatteringCoefficient*opticalDepth.x+mieExtinctionCoefficient*opticalDepth.y+ozoneAbsorptionCoefficient*opticalDepth.z));}uniform vec4 specular;uniform vec3 diffuse;uniform vec3 ambient;uniform vec3 lightPosition;uniform sampler2D uNormalMap;uniform sampler2D nightTexture;uniform sampler2D specularTexture;uniform sampler2D transmittanceTexture;uniform sampler2D scatteringTexture;uniform sampler2D defaultTexture;uniform sampler2D samplerArr[SLICE_SIZE];uniform vec4 tileOffsetArr[SLICE_SIZE];uniform float layerOpacityArr[SLICE_SIZE];uniform int samplerCount;uniform float nightTextureCoefficient;uniform vec2 maxMinOpacity;uniform float camHeight;uniform float transitionOpacity;in vec4 vTextureCoord;in vec3 v_vertex;in vec3 cameraPosition;in vec2 vGlobalTextureCoord;in float v_height;vec3 sunPos;layout(location=0)out vec4 diffuseColor;vec3 transmittanceFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture(transmittanceTexture,vec2(u,v)).xyz;}vec3 multipleScatteringContributionFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture(scatteringTexture,vec2(u,v)).xyz;}void getSunIlluminance(in vec3 point,in vec3 lightDir,out vec3 sunIlluminance){float mu_s=dot(normalize(point),lightDir);float height=length(point)-BOTTOM_RADIUS;sunIlluminance=SUN_INTENSITY*transmittanceFromTexture(height,mu_s);}void atmosGroundColor(out vec4 fragColor,in vec3 normal){vec3 cameraPosition=cameraPosition;if(length(cameraPosition*SPHERE_TO_ELLIPSOID_SCALE)<BOTTOM_RADIUS+1.0){cameraPosition=normalize(cameraPosition*SPHERE_TO_ELLIPSOID_SCALE)*(BOTTOM_RADIUS+1.0)/SPHERE_TO_ELLIPSOID_SCALE;}vec3 rayDirection=normalize(v_vertex-cameraPosition);vec3 lightDir=normalize(sunPos);rayDirection=normalize(rayDirection*SPHERE_TO_ELLIPSOID_SCALE);vec3 camPos=cameraPosition*SPHERE_TO_ELLIPSOID_SCALE;lightDir=normalize(lightDir*SPHERE_TO_ELLIPSOID_SCALE);vec3 light=vec3(0.0);vec3 transmittanceFromCameraToSpace=vec3(1.0);float offset=0.0;float distanceToSpace=0.0;intersectSphere(camPos,rayDirection,TOP_RADIUS,offset,distanceToSpace);vec3 rayOrigin=camPos;if(offset>0.0){rayOrigin+=rayDirection*offset;}float height=length(rayOrigin)-BOTTOM_RADIUS;float rayAngle=dot(rayOrigin,rayDirection)/length(rayOrigin);bool cameraBelow=rayAngle<0.0;transmittanceFromCameraToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);float phaseAngle=dot(lightDir,rayDirection);float rayleighPhase=rayleighPhase(phaseAngle);float miePhase=miePhase(phaseAngle);float distanceToGround=0.0;bool hitGround=intersectSphere(camPos,rayDirection,BOTTOM_RADIUS,distanceToGround)&&distanceToGround>0.0;if(length(v_vertex*SPHERE_TO_ELLIPSOID_SCALE)>BOTTOM_RADIUS){distanceToGround=distance(camPos,v_vertex*SPHERE_TO_ELLIPSOID_SCALE);}float segmentLength=(distanceToGround-max(offset,0.0))/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 transmittanceCamera;vec3 transmittanceLight;for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;vec3 up=position/length(position);float rayAngle=dot(up,rayDirection);float lightAngle=dot(up,lightDir);vec3 transmittanceToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);transmittanceCamera=cameraBelow ?(transmittanceToSpace/transmittanceFromCameraToSpace):(transmittanceFromCameraToSpace/transmittanceToSpace);transmittanceLight=transmittanceFromTexture(height,lightAngle);vec2 opticalDensity=exp(-height/rayleighMieHeights);vec3 scatteredLight=transmittanceLight*(rayleighScatteringCoefficient*opticalDensity.x*rayleighPhase+mieScatteringCoefficient*opticalDensity.y*miePhase);scatteredLight+=multipleScatteringContributionFromTexture(height,lightAngle)*(rayleighScatteringCoefficient*opticalDensity.x+mieScatteringCoefficient*opticalDensity.y);light+=transmittanceCamera*scatteredLight*segmentLength;t+=segmentLength;}light*=SUN_INTENSITY;vec3 hitPoint=camPos+rayDirection*distanceToGround;vec3 up=normalize(hitPoint);float diffuseAngle=max(dot(up,lightDir),0.0);float lightAngle=dot(normal,lightDir);vec3 tA=transmittanceCamera*GROUND_ALBEDO*SUN_INTENSITY;vec3 scatteringLight=multipleScatteringContributionFromTexture(height,lightAngle);vec3 diffuseTransmittanceLight=transmittanceLight*diffuseAngle;light+=tA*(scatteringLight+diffuseTransmittanceLight);fragColor=vec4(pow(light*8.0,vec3(1.0/2.2)),1.0);}void getAtmosFadingOpacity(out float opacity){float c=length(cameraPosition);float maxDist=sqrt(c*c-BOTTOM_RADIUS*BOTTOM_RADIUS);float minDist=c-BOTTOM_RADIUS;float vertDist=distance(cameraPosition,v_vertex);opacity=clamp(maxMinOpacity.y+(maxMinOpacity.x-maxMinOpacity.y)*getLerpValue(minDist,maxDist,vertDist),0.0,1.0);}void main(void){sunPos=lightPosition;vec3 texNormal=texture(uNormalMap,vTextureCoord.zw).rgb;vec3 normal=normalize((texNormal-0.5)*2.0);float minH=1200000.0;float maxH=minH*3.0;float nightCoef=getLerpValue(minH,maxH,camHeight)*nightTextureCoefficient;vec3 lightDir=normalize(sunPos);vec3 viewDir=normalize(cameraPosition-v_vertex);vec4 atmosColor;atmosGroundColor(atmosColor,normal);vec3 sunIlluminance;getSunIlluminance(v_vertex*SPHERE_TO_ELLIPSOID_SCALE,lightDir*SPHERE_TO_ELLIPSOID_SCALE,sunIlluminance);float overGround=1.0-step(0.1,v_height);float shininess=texture(specularTexture,vGlobalTextureCoord.st).r*255.0*overGround;vec3 reflectionDirection=reflect(-lightDir,normal);float reflection=max(dot(reflectionDirection,viewDir),0.0);vec3 spec=sunIlluminance*specular.rgb*pow(reflection,specular.w)*shininess;float diffuseLightWeighting=max(dot(normal,lightDir),0.0);vec4 nightImageColor=texture(nightTexture,vGlobalTextureCoord.st);vec3 night=nightStep*(.18-diffuseLightWeighting*3.0)*nightImageColor.rgb*nightCoef;night*=overGround*step(0.0,night);vec4 lightWeighting=vec4(ambient+sunIlluminance*diffuse*diffuseLightWeighting+night,1.0);float fadingOpacity;getAtmosFadingOpacity(fadingOpacity);getSunIlluminance(cameraPosition,viewDir*SPHERE_TO_ELLIPSOID_SCALE,sunIlluminance);spec*=sunIlluminance;diffuseColor=texture(defaultTexture,vTextureCoord.xy);if(samplerCount==0){diffuseColor=mix(diffuseColor*lightWeighting,atmosColor,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;return;}vec4 src;blend(diffuseColor,samplerArr[0],tileOffsetArr[0],layerOpacityArr[0]);if(samplerCount==1){diffuseColor=mix(diffuseColor*lightWeighting,atmosColor*diffuseColor.a,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;return;}blend(diffuseColor,samplerArr[1],tileOffsetArr[1],layerOpacityArr[1]);if(samplerCount==2){diffuseColor=mix(diffuseColor*lightWeighting,atmosColor*diffuseColor.a,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;return;}blend(diffuseColor,samplerArr[2],tileOffsetArr[2],layerOpacityArr[2]);if(samplerCount==3){diffuseColor=mix(diffuseColor*lightWeighting,atmosColor*diffuseColor.a,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;return;}blend(diffuseColor,samplerArr[3],tileOffsetArr[3],layerOpacityArr[3]);if(samplerCount==4){diffuseColor=mix(diffuseColor*lightWeighting,atmosColor*diffuseColor.a,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;return;}blend(diffuseColor,samplerArr[4],tileOffsetArr[4],layerOpacityArr[4]);diffuseColor=mix(diffuseColor*lightWeighting,atmosColor*diffuseColor.a,fadingOpacity)+vec4(spec,0.0);diffuseColor*=transitionOpacity;}", a) });
12361
12371
  }
12362
- var bc = "attribute vec2 corners;void main(void){gl_Position=vec4(corners,0.0,1.0);}", wc = "precision lowp float;float getLerpValue(in float min,in float max,in float between){return(clamp(between,min,max)-min)/(max-min);}vec3 aces(vec3 color){float a=2.51;float b=0.03;float c=2.43;float d=0.59;float e=0.14;return clamp((color*(a*color+b))/(color*(c*color+d)+e),0.0,1.0);}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t1,inout float t2){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t1=-b-sqrt(d);t2=-b+sqrt(d);return true;}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t=-b-sqrt(d);return true;}float intersectSphere(vec3 ro,vec3 rd,vec4 sph){vec3 oc=ro-sph.xyz;float b=dot(oc,rd);float c=dot(oc,oc)-sph.w*sph.w;float h=b*b-c;if(h<0.0)return-1.0;h=sqrt(h);return-b-h;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}t=(-b-sqrt(h))/a;return true;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t1,inout float t2){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}h=sqrt(h);t1=(-b-h)/a;t2=(-b+h)/a;return true;}vec3 normalEllipsoid(in vec3 pos,in vec3 ra){return normalize(pos/(ra*ra));}\n#define PI 3.1415926538\n#define ATMOS_HEIGHT float(${ATMOS_HEIGHT})\n#define RAYLEIGH_SCALE float(${RAYLEIGH_SCALE})\n#define MIE_SCALE float(${MIE_SCALE})\n#define SAMPLE_COUNT 16\n#define SQRT_SAMPLE_COUNT 4\nconst float GROUND_ALBEDO=float(${GROUND_ALBEDO})/PI;const float BOTTOM_RADIUS=float(${BOTTOM_RADIUS});const float TOP_RADIUS=BOTTOM_RADIUS+ATMOS_HEIGHT;const float EQUATORIAL_RADIUS=6378137.0;const vec3 bottomRadii=vec3(EQUATORIAL_RADIUS,EQUATORIAL_RADIUS,BOTTOM_RADIUS);const vec3 topRadii=bottomRadii+ATMOS_HEIGHT;const vec3 SPHERE_TO_ELLIPSOID_SCALE=vec3(BOTTOM_RADIUS)/bottomRadii;const vec2 rayleighMieHeights=vec2(RAYLEIGH_SCALE,MIE_SCALE)*ATMOS_HEIGHT;const vec3 rayleighScatteringCoefficient=vec3(float(${rayleighScatteringCoefficient_0}),float(${rayleighScatteringCoefficient_1}),float(${rayleighScatteringCoefficient_2}))*1e-6;const float mieScatteringCoefficient=float(${mieScatteringCoefficient})*1e-6;const float mieExtinctionCoefficient=float(${mieExtinctionCoefficient})*1e-6;const vec3 ozoneAbsorptionCoefficient=vec3(float(${ozoneAbsorptionCoefficient_0}),float(${ozoneAbsorptionCoefficient_1}),float(${ozoneAbsorptionCoefficient_2}))*1e-6;const float SUN_ANGULAR_RADIUS=float(${SUN_ANGULAR_RADIUS});const float SUN_INTENSITY=float(${SUN_INTENSITY});const float ozoneDensityHeight=float(${ozoneDensityHeight});const float ozoneDensityWide=float(${ozoneDensityWide});vec3 sunWithBloom(vec3 rayDir,vec3 sunDir){float minSunCosTheta=cos(SUN_ANGULAR_RADIUS);float cosTheta=dot(rayDir,sunDir);if(cosTheta>=minSunCosTheta)return vec3(1.0);float offset=minSunCosTheta-cosTheta;float gaussianBloom=exp(-offset*15000.0)*0.7;float invBloom=1.0/(0.09+offset*200.0)*0.01;return vec3(gaussianBloom+invBloom);}float rayleighPhase(float angle){return 3.0/(16.0*PI)*(1.0+(angle*angle));}float miePhase(float angle){float g=0.8;return 3.0/(8.0*PI)*((1.0-g*g)*(1.0+angle*angle))/((2.0+g*g)*pow(1.0+g*g-2.0*g*angle,1.5));}vec3 opticalDepth(float height,float angle){vec3 rayOrigin=vec3(0.0,BOTTOM_RADIUS+height,0.0);vec3 rayDirection=vec3(sqrt(1.0-angle*angle),angle,0.0);float t1,t2;intersectSphere(rayOrigin,rayDirection,TOP_RADIUS,t1,t2);float segmentLength=t2/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 opticalDepth=vec3(0.0);for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;opticalDepth.xy+=exp(-height/rayleighMieHeights)*segmentLength;opticalDepth.z+=(1.0-min(abs(height-ozoneDensityHeight)/ozoneDensityWide,1.0))*segmentLength;t+=segmentLength;}return opticalDepth;}vec3 transmittance(float height,float angle){vec3 opticalDepth=opticalDepth(height,angle);return exp(-(rayleighScatteringCoefficient*opticalDepth.x+mieExtinctionCoefficient*opticalDepth.y+ozoneAbsorptionCoefficient*opticalDepth.z));}uniform mat4 viewMatrix;uniform vec3 sunPos;uniform vec3 camPos;uniform vec2 iResolution;uniform float fov;uniform float opacity;uniform sampler2D transmittanceTexture;uniform sampler2D scatteringTexture;vec3 transmittanceFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture2D(transmittanceTexture,vec2(u,v)).xyz;}vec3 multipleScatteringContributionFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture2D(scatteringTexture,vec2(u,v)).xyz;}bool intersectEllipsoidToSphere(in vec3 ro,in vec3 rd,in vec3 ellRadii,in float sphereRadius,out float t1,out float t2){float offset=0.0,distanceToSpace=0.0;if(intersectEllipsoid(ro,rd,ellRadii,offset,distanceToSpace)){vec3 hitEll=ro+rd*offset;vec3 nEll=normalEllipsoid(hitEll,ellRadii);float t=0.0;bool intersectsSphere=intersectSphere(hitEll,nEll,sphereRadius,t);vec3 hitSphere=hitEll+nEll*t;t1=length(hitSphere-ro);hitEll=ro+rd*distanceToSpace;nEll=normalEllipsoid(hitEll,ellRadii);t=0.0;intersectsSphere=intersectSphere(hitEll,nEll,sphereRadius,t);hitSphere=hitEll+nEll*t;t2=length(hitSphere-ro);return true;}return false;}mat4 transpose(in mat4 m){vec4 i0=m[0];vec4 i1=m[1];vec4 i2=m[2];vec4 i3=m[3];mat4 outMatrix=mat4(vec4(i0.x,i1.x,i2.x,i3.x),vec4(i0.y,i1.y,i2.y,i3.y),vec4(i0.z,i1.z,i2.z,i3.z),vec4(i0.w,i1.w,i2.w,i3.w));return outMatrix;}void mainImage(out vec4 fragColor){vec3 cameraPosition=camPos;vec3 lightDirection=normalize(sunPos);vec2 uv=(2.0*gl_FragCoord.xy-iResolution.xy)/iResolution.y;float fieldOfView=fov;float z=1.0/tan(fieldOfView*0.5*PI/180.0);vec3 rayDirection=normalize(vec3(uv,-z));vec4 rd=transpose(viewMatrix)*vec4(rayDirection,1.0);rayDirection=rd.xyz;vec3 light=vec3(0.0);vec3 transmittanceFromCameraToSpace=vec3(1.0);float offset=0.0;float distanceToSpace=0.0;rayDirection=normalize(rayDirection*SPHERE_TO_ELLIPSOID_SCALE);cameraPosition*=SPHERE_TO_ELLIPSOID_SCALE;lightDirection=normalize(lightDirection*SPHERE_TO_ELLIPSOID_SCALE);if(length(cameraPosition)<BOTTOM_RADIUS+100.0){cameraPosition=normalize(cameraPosition)*(BOTTOM_RADIUS+100.0);}if(intersectSphere(cameraPosition,rayDirection,TOP_RADIUS,offset,distanceToSpace)){vec3 rayOrigin=cameraPosition;if(offset>0.0){rayOrigin=cameraPosition+rayDirection*offset;}float height=length(rayOrigin)-BOTTOM_RADIUS;float rayAngle=dot(rayOrigin,rayDirection)/length(rayOrigin);bool cameraBelow=rayAngle<0.0;transmittanceFromCameraToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);float phaseAngle=dot(lightDirection,rayDirection);float rayleighPhase=rayleighPhase(phaseAngle);float miePhase=miePhase(phaseAngle);float distanceToGround=0.0;bool hitGround=intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS,distanceToGround)&&distanceToGround>0.0;if(intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS-100000.0,distanceToGround)&&hitGround){discard;}float segmentLength=((hitGround ? distanceToGround : distanceToSpace)-max(offset,0.0))/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 transmittanceCamera;vec3 transmittanceLight;for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;vec3 up=position/length(position);float rayAngle=dot(up,rayDirection);float lightAngle=dot(up,lightDirection);vec3 transmittanceToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);transmittanceCamera=cameraBelow ?(transmittanceToSpace/transmittanceFromCameraToSpace):(transmittanceFromCameraToSpace/transmittanceToSpace);transmittanceLight=transmittanceFromTexture(height,lightAngle);vec2 opticalDensity=exp(-height/rayleighMieHeights);vec3 scatteredLight=transmittanceLight*(rayleighScatteringCoefficient*opticalDensity.x*rayleighPhase+mieScatteringCoefficient*opticalDensity.y*miePhase);scatteredLight+=multipleScatteringContributionFromTexture(height,lightAngle)*(rayleighScatteringCoefficient*opticalDensity.x+mieScatteringCoefficient*opticalDensity.y);light+=transmittanceCamera*scatteredLight*segmentLength;t+=segmentLength;}light*=SUN_INTENSITY;if(hitGround){vec3 hitPoint=cameraPosition+rayDirection*distanceToGround;vec3 up=hitPoint/length(hitPoint);float diffuseAngle=max(dot(up,lightDirection),0.0);float lightAngle=dot(up,lightDirection);light+=transmittanceCamera*GROUND_ALBEDO*multipleScatteringContributionFromTexture(height,lightAngle)*SUN_INTENSITY;light+=transmittanceCamera*transmittanceLight*GROUND_ALBEDO*diffuseAngle*SUN_INTENSITY;}}float distanceToGround=0.0;bool hitGround=intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS,distanceToGround)&&distanceToGround>0.0;if(!hitGround){vec3 sunLum=sunWithBloom(rayDirection,lightDirection)*vec3(1.0,1.0,0.8);sunLum=smoothstep(0.002,1.0,sunLum);light+=sunLum*SUN_INTENSITY*transmittanceFromCameraToSpace;}fragColor=vec4(pow(light*8.0,vec3(1.0/2.2)),clamp(opacity,0.0,1.0));}void main(void){mainImage(gl_FragColor);}";
12363
- class Cc extends J {
12372
+ var Cc = "attribute vec2 corners;void main(void){gl_Position=vec4(corners,0.0,1.0);}", Tc = "precision lowp float;float getLerpValue(in float min,in float max,in float between){return(clamp(between,min,max)-min)/(max-min);}vec3 aces(vec3 color){float a=2.51;float b=0.03;float c=2.43;float d=0.59;float e=0.14;return clamp((color*(a*color+b))/(color*(c*color+d)+e),0.0,1.0);}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t1,inout float t2){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t1=-b-sqrt(d);t2=-b+sqrt(d);return true;}bool intersectSphere(vec3 rayOrigin,vec3 rayDirection,float radius,inout float t){float b=dot(rayDirection,rayOrigin);float c=dot(rayOrigin,rayOrigin)-radius*radius;float d=b*b-c;if(d<0.0){return false;}t=-b-sqrt(d);return true;}float intersectSphere(vec3 ro,vec3 rd,vec4 sph){vec3 oc=ro-sph.xyz;float b=dot(oc,rd);float c=dot(oc,oc)-sph.w*sph.w;float h=b*b-c;if(h<0.0)return-1.0;h=sqrt(h);return-b-h;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}t=(-b-sqrt(h))/a;return true;}bool intersectEllipsoid(in vec3 ro,in vec3 rd,in vec3 ra,inout float t1,inout float t2){vec3 ocn=ro/ra;vec3 rdn=rd/ra;float a=dot(rdn,rdn);float b=dot(ocn,rdn);float c=dot(ocn,ocn);float h=b*b-a*(c-1.0);if(h<0.0){return false;}h=sqrt(h);t1=(-b-h)/a;t2=(-b+h)/a;return true;}vec3 normalEllipsoid(in vec3 pos,in vec3 ra){return normalize(pos/(ra*ra));}\n#define PI 3.1415926538\n#define ATMOS_HEIGHT float(${ATMOS_HEIGHT})\n#define RAYLEIGH_SCALE float(${RAYLEIGH_SCALE})\n#define MIE_SCALE float(${MIE_SCALE})\n#define SAMPLE_COUNT 16\n#define SQRT_SAMPLE_COUNT 4\nconst float GROUND_ALBEDO=float(${GROUND_ALBEDO})/PI;const float BOTTOM_RADIUS=float(${BOTTOM_RADIUS});const float TOP_RADIUS=BOTTOM_RADIUS+ATMOS_HEIGHT;const float EQUATORIAL_RADIUS=6378137.0;const vec3 bottomRadii=vec3(EQUATORIAL_RADIUS,EQUATORIAL_RADIUS,BOTTOM_RADIUS);const vec3 topRadii=bottomRadii+ATMOS_HEIGHT;const vec3 SPHERE_TO_ELLIPSOID_SCALE=vec3(BOTTOM_RADIUS)/bottomRadii;const vec2 rayleighMieHeights=vec2(RAYLEIGH_SCALE,MIE_SCALE)*ATMOS_HEIGHT;const vec3 rayleighScatteringCoefficient=vec3(float(${rayleighScatteringCoefficient_0}),float(${rayleighScatteringCoefficient_1}),float(${rayleighScatteringCoefficient_2}))*1e-6;const float mieScatteringCoefficient=float(${mieScatteringCoefficient})*1e-6;const float mieExtinctionCoefficient=float(${mieExtinctionCoefficient})*1e-6;const vec3 ozoneAbsorptionCoefficient=vec3(float(${ozoneAbsorptionCoefficient_0}),float(${ozoneAbsorptionCoefficient_1}),float(${ozoneAbsorptionCoefficient_2}))*1e-6;const float SUN_ANGULAR_RADIUS=float(${SUN_ANGULAR_RADIUS});const float SUN_INTENSITY=float(${SUN_INTENSITY});const float ozoneDensityHeight=float(${ozoneDensityHeight});const float ozoneDensityWide=float(${ozoneDensityWide});vec3 sunWithBloom(vec3 rayDir,vec3 sunDir){float minSunCosTheta=cos(SUN_ANGULAR_RADIUS);float cosTheta=dot(rayDir,sunDir);if(cosTheta>=minSunCosTheta)return vec3(1.0);float offset=minSunCosTheta-cosTheta;float gaussianBloom=exp(-offset*15000.0)*0.7;float invBloom=1.0/(0.09+offset*200.0)*0.01;return vec3(gaussianBloom+invBloom);}float rayleighPhase(float angle){return 3.0/(16.0*PI)*(1.0+(angle*angle));}float miePhase(float angle){float g=0.8;return 3.0/(8.0*PI)*((1.0-g*g)*(1.0+angle*angle))/((2.0+g*g)*pow(1.0+g*g-2.0*g*angle,1.5));}vec3 opticalDepth(float height,float angle){vec3 rayOrigin=vec3(0.0,BOTTOM_RADIUS+height,0.0);vec3 rayDirection=vec3(sqrt(1.0-angle*angle),angle,0.0);float t1,t2;intersectSphere(rayOrigin,rayDirection,TOP_RADIUS,t1,t2);float segmentLength=t2/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 opticalDepth=vec3(0.0);for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;opticalDepth.xy+=exp(-height/rayleighMieHeights)*segmentLength;opticalDepth.z+=(1.0-min(abs(height-ozoneDensityHeight)/ozoneDensityWide,1.0))*segmentLength;t+=segmentLength;}return opticalDepth;}vec3 transmittance(float height,float angle){vec3 opticalDepth=opticalDepth(height,angle);return exp(-(rayleighScatteringCoefficient*opticalDepth.x+mieExtinctionCoefficient*opticalDepth.y+ozoneAbsorptionCoefficient*opticalDepth.z));}uniform mat4 viewMatrix;uniform vec3 sunPos;uniform vec3 camPos;uniform vec2 iResolution;uniform float fov;uniform float opacity;uniform sampler2D transmittanceTexture;uniform sampler2D scatteringTexture;vec3 transmittanceFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture2D(transmittanceTexture,vec2(u,v)).xyz;}vec3 multipleScatteringContributionFromTexture(float height,float angle){float u=(angle+1.0)*0.5;float v=height/ATMOS_HEIGHT;return texture2D(scatteringTexture,vec2(u,v)).xyz;}bool intersectEllipsoidToSphere(in vec3 ro,in vec3 rd,in vec3 ellRadii,in float sphereRadius,out float t1,out float t2){float offset=0.0,distanceToSpace=0.0;if(intersectEllipsoid(ro,rd,ellRadii,offset,distanceToSpace)){vec3 hitEll=ro+rd*offset;vec3 nEll=normalEllipsoid(hitEll,ellRadii);float t=0.0;bool intersectsSphere=intersectSphere(hitEll,nEll,sphereRadius,t);vec3 hitSphere=hitEll+nEll*t;t1=length(hitSphere-ro);hitEll=ro+rd*distanceToSpace;nEll=normalEllipsoid(hitEll,ellRadii);t=0.0;intersectsSphere=intersectSphere(hitEll,nEll,sphereRadius,t);hitSphere=hitEll+nEll*t;t2=length(hitSphere-ro);return true;}return false;}mat4 transpose(in mat4 m){vec4 i0=m[0];vec4 i1=m[1];vec4 i2=m[2];vec4 i3=m[3];mat4 outMatrix=mat4(vec4(i0.x,i1.x,i2.x,i3.x),vec4(i0.y,i1.y,i2.y,i3.y),vec4(i0.z,i1.z,i2.z,i3.z),vec4(i0.w,i1.w,i2.w,i3.w));return outMatrix;}void mainImage(out vec4 fragColor){vec3 cameraPosition=camPos;vec3 lightDirection=normalize(sunPos);vec2 uv=(2.0*gl_FragCoord.xy-iResolution.xy)/iResolution.y;float fieldOfView=fov;float z=1.0/tan(fieldOfView*0.5*PI/180.0);vec3 rayDirection=normalize(vec3(uv,-z));vec4 rd=transpose(viewMatrix)*vec4(rayDirection,1.0);rayDirection=rd.xyz;vec3 light=vec3(0.0);vec3 transmittanceFromCameraToSpace=vec3(1.0);float offset=0.0;float distanceToSpace=0.0;rayDirection=normalize(rayDirection*SPHERE_TO_ELLIPSOID_SCALE);cameraPosition*=SPHERE_TO_ELLIPSOID_SCALE;lightDirection=normalize(lightDirection*SPHERE_TO_ELLIPSOID_SCALE);if(length(cameraPosition)<BOTTOM_RADIUS+100.0){cameraPosition=normalize(cameraPosition)*(BOTTOM_RADIUS+100.0);}if(intersectSphere(cameraPosition,rayDirection,TOP_RADIUS,offset,distanceToSpace)){vec3 rayOrigin=cameraPosition;if(offset>0.0){rayOrigin=cameraPosition+rayDirection*offset;}float height=length(rayOrigin)-BOTTOM_RADIUS;float rayAngle=dot(rayOrigin,rayDirection)/length(rayOrigin);bool cameraBelow=rayAngle<0.0;transmittanceFromCameraToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);float phaseAngle=dot(lightDirection,rayDirection);float rayleighPhase=rayleighPhase(phaseAngle);float miePhase=miePhase(phaseAngle);float distanceToGround=0.0;bool hitGround=intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS,distanceToGround)&&distanceToGround>0.0;if(intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS-100000.0,distanceToGround)&&hitGround){discard;}float segmentLength=((hitGround ? distanceToGround : distanceToSpace)-max(offset,0.0))/float(SAMPLE_COUNT);float t=segmentLength*0.5;vec3 transmittanceCamera;vec3 transmittanceLight;for(int i=0;i<SAMPLE_COUNT;i++){vec3 position=rayOrigin+t*rayDirection;float height=length(position)-BOTTOM_RADIUS;vec3 up=position/length(position);float rayAngle=dot(up,rayDirection);float lightAngle=dot(up,lightDirection);vec3 transmittanceToSpace=transmittanceFromTexture(height,cameraBelow ?-rayAngle : rayAngle);transmittanceCamera=cameraBelow ?(transmittanceToSpace/transmittanceFromCameraToSpace):(transmittanceFromCameraToSpace/transmittanceToSpace);transmittanceLight=transmittanceFromTexture(height,lightAngle);vec2 opticalDensity=exp(-height/rayleighMieHeights);vec3 scatteredLight=transmittanceLight*(rayleighScatteringCoefficient*opticalDensity.x*rayleighPhase+mieScatteringCoefficient*opticalDensity.y*miePhase);scatteredLight+=multipleScatteringContributionFromTexture(height,lightAngle)*(rayleighScatteringCoefficient*opticalDensity.x+mieScatteringCoefficient*opticalDensity.y);light+=transmittanceCamera*scatteredLight*segmentLength;t+=segmentLength;}light*=SUN_INTENSITY;if(hitGround){vec3 hitPoint=cameraPosition+rayDirection*distanceToGround;vec3 up=hitPoint/length(hitPoint);float diffuseAngle=max(dot(up,lightDirection),0.0);float lightAngle=dot(up,lightDirection);light+=transmittanceCamera*GROUND_ALBEDO*multipleScatteringContributionFromTexture(height,lightAngle)*SUN_INTENSITY;light+=transmittanceCamera*transmittanceLight*GROUND_ALBEDO*diffuseAngle*SUN_INTENSITY;}}float distanceToGround=0.0;bool hitGround=intersectSphere(cameraPosition,rayDirection,BOTTOM_RADIUS,distanceToGround)&&distanceToGround>0.0;if(!hitGround){vec3 sunLum=sunWithBloom(rayDirection,lightDirection)*vec3(1.0,1.0,0.8);sunLum=smoothstep(0.002,1.0,sunLum);light+=sunLum*SUN_INTENSITY*transmittanceFromCameraToSpace;}fragColor=vec4(pow(light*8.0,vec3(1.0/2.2)),clamp(opacity,0.0,1.0));}void main(void){mainImage(gl_FragColor);}";
12373
+ class Ec extends J {
12364
12374
  constructor(e = {}) {
12365
12375
  super({ name: "Atmosphere", ...e }), this._transmittanceBuffer = null, this._scatteringBuffer = null, this.opacity = 1, this._parameters = { ATMOS_HEIGHT: e.height || 1e5, RAYLEIGH_SCALE: e.rayleighScale || 0.08, MIE_SCALE: e.mieScale || 0.012, GROUND_ALBEDO: e.groundAlbedo || 0.05, BOTTOM_RADIUS: e.bottomRadius || 6356752314245179e-9, rayleighScatteringCoefficient_0: e.rayleighScatteringCoefficient_0 || 5.802, rayleighScatteringCoefficient_1: e.rayleighScatteringCoefficient_1 || 13.558, rayleighScatteringCoefficient_2: e.rayleighScatteringCoefficient_2 || 33.1, mieScatteringCoefficient: e.mieScatteringCoefficient || 3.996, mieExtinctionCoefficient: e.mieExtinctionCoefficient || 4.44, ozoneAbsorptionCoefficient_0: e.ozoneAbsorptionCoefficient_0 || 0.65, ozoneAbsorptionCoefficient_1: e.ozoneAbsorptionCoefficient_1 || 1.881, ozoneAbsorptionCoefficient_2: e.ozoneAbsorptionCoefficient_2 || 0.085, SUN_ANGULAR_RADIUS: e.sunAngularRadius || 4685e-6, SUN_INTENSITY: e.sunIntensity || 1, ozoneDensityHeight: e.ozoneDensityHeight || 25e3, ozoneDensityWide: e.ozoneDensityWide || 15e3 };
12366
12376
  }
@@ -12383,7 +12393,7 @@ class Cc extends J {
12383
12393
  }
12384
12394
  initBackgroundShader() {
12385
12395
  var e;
12386
- this.renderer && this.renderer.handler.addProgram((e = this._parameters, new X("atmosphereBackground", { uniforms: { iResolution: "vec2", fov: "float", camPos: "vec3", viewMatrix: "mat4", transmittanceTexture: "sampler2D", scatteringTexture: "sampler2D", sunPos: "vec3", opacity: "float" }, attributes: { corners: "vec3" }, vertexShader: bc, fragmentShader: di(wc, e) })), !0);
12396
+ this.renderer && this.renderer.handler.addProgram((e = this._parameters, new X("atmosphereBackground", { uniforms: { iResolution: "vec2", fov: "float", camPos: "vec3", viewMatrix: "mat4", transmittanceTexture: "sampler2D", scatteringTexture: "sampler2D", sunPos: "vec3", opacity: "float" }, attributes: { corners: "vec3" }, vertexShader: Cc, fragmentShader: di(Tc, e) })), !0);
12387
12397
  }
12388
12398
  removeBackgroundShader() {
12389
12399
  this.renderer && this.renderer.handler.removeProgram("atmosphereBackground");
@@ -12428,18 +12438,18 @@ class Cc extends J {
12428
12438
  s.uniform3fv(r.sunPos, [l.x, l.y, l.z]), s.uniform3fv(r.camPos, [o.eye.x, o.eye.y, o.eye.z]), s.uniform2fv(r.iResolution, [n.sceneFramebuffer.width, n.sceneFramebuffer.height]), s.uniform1f(r.fov, o.getViewAngle()), s.uniform1f(r.opacity, this.opacity), s.drawArrays(s.TRIANGLE_STRIP, 0, 4), s.enable(s.DEPTH_TEST);
12429
12439
  }
12430
12440
  }
12431
- const Da = "degrees", Tc = "m";
12432
- let Ec = 0;
12441
+ const Da = "degrees", Ac = "m";
12442
+ let Lc = 0;
12433
12443
  class us {
12434
12444
  constructor(e) {
12435
- this.id = Ec++, this.code = e.code, this.units = e.units;
12445
+ this.id = Lc++, this.code = e.code, this.units = e.units;
12436
12446
  }
12437
12447
  equal(e) {
12438
12448
  return e.id === this.id;
12439
12449
  }
12440
12450
  }
12441
- const _s = new us({ code: "epsg:3857", units: Tc });
12442
- class Ac {
12451
+ const _s = new us({ code: "epsg:3857", units: Ac });
12452
+ class Pc {
12443
12453
  constructor(e) {
12444
12454
  this.segment = e, this.layers = [], this.tileOffsetArr = new Float32Array(e.planet.SLICE_SIZE_4), this.layerOpacityArr = new Float32Array(e.planet.SLICE_SIZE);
12445
12455
  }
@@ -12453,22 +12463,22 @@ class Ac {
12453
12463
  this.tileOffsetArr[r] = s[0], this.tileOffsetArr[r + 1] = s[1], this.tileOffsetArr[r + 2] = s[2], this.tileOffsetArr[r + 3] = s[3];
12454
12464
  }
12455
12465
  }
12456
- function We(a, e, t) {
12466
+ function qe(a, e, t) {
12457
12467
  return Math.floor(Math.abs(t - a) / e);
12458
12468
  }
12459
12469
  function Ur(a, e, t, i) {
12460
12470
  let r = 1 / (1 << t), s = i.getWidth() * r, n = i.getHeight() * r, o = i.southWest.lon + a * s, l = i.northEast.lat - e * n;
12461
12471
  return new G(new A(o, l - n), new A(o + s, l));
12462
12472
  }
12463
- const Lc = 20, Pt = 300;
12464
- let yt = new v(), xt = new v(), vr = new v(), Qt = new v(), Jt = new v(), yr = new v(), ei = new U(), Mi = new U();
12473
+ const Sc = 20, Pt = 300;
12474
+ let yt = new v(), xt = new v(), vr = new v(), Kt = new v(), Jt = new v(), yr = new v(), ei = new U(), Mi = new U();
12465
12475
  const hi = new Array(4);
12466
12476
  hi[0] = 0, hi[1] = 1, hi[2] = 1, hi[3] = 0;
12467
12477
  const ci = new Array(4);
12468
12478
  ci[0] = !1, ci[1] = !0, ci[2] = !1, ci[3] = !0;
12469
12479
  class Fa {
12470
12480
  constructor(e, t, i, r) {
12471
- this.isPole = !1, this._tileGroup = 0, this._projection = _s, this.node = e, this.planet = t, this.handler = t.renderer.handler, this.bsphere = new He(), this._plainRadius = 0, this.bbox = new qn(), this._sw = new v(), this._nw = new v(), this._se = new v(), this._ne = new v(), this.centerNormal = new v(), this._extent = this._extentMerc = r, this._extentLonLat = new G(), this.gridSize = t.terrain.gridSizeByZoom[i], this.fileGridSize = 0, this.tileZoom = i, this.powTileZoom = 1 << i, this.tileX = 0, this.tileXE = 0, this.tileXW = 0, this.tileYN = 0, this.tileYS = 0, this.tileY = 0, this.tileIndex = "", this.elevationData = null, this._assignTileIndexes(), this.materials = [], this.plainReady = !1, this.initialized = !1, this.normalMapReady = !1, this.terrainReady = !1, this.terrainIsLoading = !1, this.terrainExists = !1, this.passReady = !1, this.plainVertices = null, this.plainVerticesHigh = null, this.plainVerticesLow = null, this.plainNormals = null, this.terrainVertices = null, this.terrainVerticesHigh = null, this.terrainVerticesLow = null, this.noDataVertices = null, this.tempVertices = null, this.tempVerticesHigh = null, this.tempVerticesLow = null, this.normalMapTexture = null, this.normalMapTextureBias = new Float32Array(3), this.normalMapVertices = null, this.normalMapVerticesHigh = null, this.normalMapVerticesLow = null, this.normalMapNormals = null, this.vertexNormalBuffer = null, this.vertexPositionBuffer = null, this.vertexPositionBufferHigh = null, this.vertexPositionBufferLow = null, this.vertexTextureCoordBuffer = null, this._globalTextureCoordinates = new Float32Array(4), this._inTheQueue = !1, this._appliedNeighborsZoom = [0, 0, 0, 0], this._slices = [], this._indexBuffer = null, this.readyToEngage = !1, this.plainProcessing = !1, this.normalMapTexturePtr = null, this._transitionOpacity = 1, this._transitionTimestamp = 0;
12481
+ this.isPole = !1, this._tileGroup = 0, this._projection = _s, this.node = e, this.planet = t, this.handler = t.renderer.handler, this.bsphere = new He(), this._plainRadius = 0, this.bbox = new Wn(), this._sw = new v(), this._nw = new v(), this._se = new v(), this._ne = new v(), this.centerNormal = new v(), this._extent = this._extentMerc = r, this._extentLonLat = new G(), this.gridSize = t.terrain.gridSizeByZoom[i], this.fileGridSize = 0, this.tileZoom = i, this.powTileZoom = 1 << i, this.tileX = 0, this.tileXE = 0, this.tileXW = 0, this.tileYN = 0, this.tileYS = 0, this.tileY = 0, this.tileIndex = "", this.elevationData = null, this._assignTileIndexes(), this.materials = [], this.plainReady = !1, this.initialized = !1, this.normalMapReady = !1, this.terrainReady = !1, this.terrainIsLoading = !1, this.terrainExists = !1, this.passReady = !1, this.plainVertices = null, this.plainVerticesHigh = null, this.plainVerticesLow = null, this.plainNormals = null, this.terrainVertices = null, this.terrainVerticesHigh = null, this.terrainVerticesLow = null, this.noDataVertices = null, this.tempVertices = null, this.tempVerticesHigh = null, this.tempVerticesLow = null, this.normalMapTexture = null, this.normalMapTextureBias = new Float32Array(3), this.normalMapVertices = null, this.normalMapVerticesHigh = null, this.normalMapVerticesLow = null, this.normalMapNormals = null, this.vertexNormalBuffer = null, this.vertexPositionBuffer = null, this.vertexPositionBufferHigh = null, this.vertexPositionBufferLow = null, this.vertexTextureCoordBuffer = null, this._globalTextureCoordinates = new Float32Array(4), this._inTheQueue = !1, this._appliedNeighborsZoom = [0, 0, 0, 0], this._slices = [], this._indexBuffer = null, this.readyToEngage = !1, this.plainProcessing = !1, this.normalMapTexturePtr = null, this._transitionOpacity = 1, this._transitionTimestamp = 0;
12472
12482
  }
12473
12483
  checkZoom() {
12474
12484
  return this.tileZoom < this.planet.terrain._maxNodeZoom;
@@ -12488,9 +12498,9 @@ class Fa {
12488
12498
  let s = this.planet.ellipsoid.getSurfaceNormal3v(e);
12489
12499
  ei.set(e, s.negateTo());
12490
12500
  let n = this._extent.northEast, o = this._extent.southWest, l = Math.sqrt(r.length / 3) - 1, h = n.lon, c = n.lat, d = o.lon, u = o.lat, g = (h - d) / l, f = (c - u) / l, p = t.lon - d, _ = t.lat - u, m = Math.floor(p / g), y = Math.floor(l - _ / f), x = 3 * ((l + 1) * y + m), w = 3 * ((l + 1) * (y + 1) + m);
12491
- vr.set(r[x], r[x + 1], r[x + 2]), Qt.set(r[x + 3], r[x + 4], r[x + 5]), Jt.set(r[w], r[w + 1], r[w + 2]);
12492
- let b = ei.hitTriangleRes(vr, Qt, Jt, i);
12493
- return b === U.INSIDE ? e.distance(i) : b === U.AWAY && (Mi.set(e, s), Mi.hitTriangleRes(vr, Qt, Jt, i) === U.INSIDE) ? -e.distance(i) : (yr.set(r[w + 3], r[w + 4], r[w + 5]), b = ei.hitTriangleRes(Qt, yr, Jt, i), b === U.INSIDE ? e.distance(i) : b === U.AWAY && (Mi.set(e, s), Mi.hitTriangleRes(Qt, yr, Jt, i) === U.INSIDE) || b === U.AWAY ? -e.distance(i) : e.distance(i));
12501
+ vr.set(r[x], r[x + 1], r[x + 2]), Kt.set(r[x + 3], r[x + 4], r[x + 5]), Jt.set(r[w], r[w + 1], r[w + 2]);
12502
+ let b = ei.hitTriangleRes(vr, Kt, Jt, i);
12503
+ return b === U.INSIDE ? e.distance(i) : b === U.AWAY && (Mi.set(e, s), Mi.hitTriangleRes(vr, Kt, Jt, i) === U.INSIDE) ? -e.distance(i) : (yr.set(r[w + 3], r[w + 4], r[w + 5]), b = ei.hitTriangleRes(Kt, yr, Jt, i), b === U.INSIDE ? e.distance(i) : b === U.AWAY && (Mi.set(e, s), Mi.hitTriangleRes(Kt, yr, Jt, i) === U.INSIDE) || b === U.AWAY ? -e.distance(i) : e.distance(i));
12494
12504
  }
12495
12505
  return e.distance(this.planet.ellipsoid.hitRay(ei.origin, ei.direction));
12496
12506
  }
@@ -12652,7 +12662,7 @@ class Fa {
12652
12662
  this._sw.copy(f), this._nw.copy(_), this._ne.copy(p), this._se.copy(m);
12653
12663
  } else {
12654
12664
  let n, o = e.segment, l = Math.floor(s * r), h = Math.floor(s * i), c = 1 / s, d = r - c * l, u = i - c * h;
12655
- n = o.gridSize === 1 ? o.tempVertices : Qr(o.tempVertices, o.gridSize, l, h, 1);
12665
+ n = o.gridSize === 1 ? o.tempVertices : Kr(o.tempVertices, o.gridSize, l, h, 1);
12656
12666
  let g, f, p = new v(n[0], n[1], n[2]), _ = new v(n[9], n[10], n[11]), m = new v(n[3] - n[0], n[4] - n[1], n[5] - n[2]), y = new v(n[6] - n[0], n[7] - n[1], n[8] - n[2]), x = new v(n[3] - n[9], n[4] - n[10], n[5] - n[11]), w = new v(n[6] - n[9], n[7] - n[10], n[8] - n[11]), b = d, E = u;
12657
12667
  g = b + E < c ? v.add(m.scaleTo(E / c), y.scaleTo(b / c)).addA(p) : v.add(w.scaleTo(1 - E / c), x.scaleTo(1 - b / c)).addA(_), b = d + 1, E = u + 1, f = b + E < c ? v.add(m.scaleTo(E / c), y.scaleTo(b / c)).addA(p) : v.add(w.scaleTo(1 - E / c), x.scaleTo(1 - b / c)).addA(_), this._createExtentNormals(), this.setBoundingVolume3v(g, f);
12658
12668
  }
@@ -12688,7 +12698,7 @@ class Fa {
12688
12698
  _assignTileIndexes() {
12689
12699
  this._tileGroup = 0;
12690
12700
  const e = this.tileZoom, t = this._extent, i = Le;
12691
- this.tileX = We(t.getCenter().lon, t.getWidth(), -2003750834e-2), this.tileY = We(t.getCenter().lat, t.getHeight(), i);
12701
+ this.tileX = qe(t.getCenter().lon, t.getWidth(), -2003750834e-2), this.tileY = qe(t.getCenter().lat, t.getHeight(), i);
12692
12702
  const r = this.powTileZoom;
12693
12703
  this.tileXE = (this.tileX + 1) % r, this.tileXW = (r + this.tileX - 1) % r, this.tileYN = this.tileY - 1, this.tileYS = this.tileY + 1, this.tileIndex = $e.getTileIndex(this.tileX, this.tileY, e, this._tileGroup);
12694
12704
  }
@@ -12737,7 +12747,7 @@ class Fa {
12737
12747
  }
12738
12748
  initSlice(e) {
12739
12749
  let t = this._slices[e];
12740
- return t ? t.layers = [] : t = this._slices[e] = new Ac(this), t;
12750
+ return t ? t.layers = [] : t = this._slices[e] = new Pc(this), t;
12741
12751
  }
12742
12752
  screenRendering(e, t, i, r, s = !1, n) {
12743
12753
  const o = this.handler.gl, l = e.attributes, h = e.uniforms, c = this.materials, d = this.planet;
@@ -12827,11 +12837,11 @@ class Fa {
12827
12837
  }
12828
12838
  }
12829
12839
  let Bi = new v(), ki = new v();
12830
- const wt = [new N(0, 0), new N(1, 0), new N(0, 1), new N(1, 1)], Pc = Math.sqrt(wt.length) - 1;
12831
- let ne = { xmin: 0, ymin: 0, zmin: 0, xmax: 0, ymax: 0, zmax: 0 }, Sc = 0;
12840
+ const wt = [new N(0, 0), new N(1, 0), new N(0, 1), new N(1, 1)], Rc = Math.sqrt(wt.length) - 1;
12841
+ let ne = { xmin: 0, ymin: 0, zmin: 0, xmax: 0, ymax: 0, zmax: 0 }, Mc = 0;
12832
12842
  class gt {
12833
12843
  constructor(e, t, i, r, s, n) {
12834
- t._createdNodesCount++, this.__id = Sc++, this.SegmentPrototype = e, this.planet = t, this.parentNode = r, this.partId = i, this.nodeId = i + (r ? 4 * r.nodeId + 1 : 0), this.state = null, this.prevState = null, this.appliedTerrainNodeId = -1, this.sideSizeLog2 = [0, 0, 0, 0], this.ready = !1, this.neighbors = [[], [], [], []], this.equalizedSideWithNodeId = [this.nodeId, this.nodeId, this.nodeId, this.nodeId], this.nodes = [], this.segment = new e(this, t, s, n), this._cameraInside = !1, this.inFrustum = 0, this._fadingNodes = [], this.createBounds();
12844
+ t._createdNodesCount++, this.__id = Mc++, this.SegmentPrototype = e, this.planet = t, this.parentNode = r, this.partId = i, this.nodeId = i + (r ? 4 * r.nodeId + 1 : 0), this.state = null, this.prevState = null, this.appliedTerrainNodeId = -1, this.sideSizeLog2 = [0, 0, 0, 0], this.ready = !1, this.neighbors = [[], [], [], []], this.equalizedSideWithNodeId = [this.nodeId, this.nodeId, this.nodeId, this.nodeId], this.nodes = [], this.segment = new e(this, t, s, n), this._cameraInside = !1, this.inFrustum = 0, this._fadingNodes = [], this.createBounds();
12835
12845
  }
12836
12846
  createChildNodes() {
12837
12847
  this.ready = !0;
@@ -12938,7 +12948,7 @@ class gt {
12938
12948
  addToRender(e) {
12939
12949
  this.state = 1;
12940
12950
  let t = this.planet._renderedNodes;
12941
- this.planet._transitionOpacityEnabled ? Kr(t, this, (s, n) => s.segment.tileZoom - n.segment.tileZoom) : (this.getRenderedNodesNeighbors(t), t.push(this)), this.segment.terrainReady || (this.planet._renderCompleted = !1, this.planet._terrainCompleted = !1);
12951
+ this.planet._transitionOpacityEnabled ? Qr(t, this, (s, n) => s.segment.tileZoom - n.segment.tileZoom) : (this.getRenderedNodesNeighbors(t), t.push(this)), this.segment.terrainReady || (this.planet._renderCompleted = !1, this.planet._terrainCompleted = !1);
12942
12952
  let i = 0, r = this.planet._renderedNodesInFrustum;
12943
12953
  for (; e; ) 1 & e && r[i].push(this), i++, e >>= 1;
12944
12954
  }
@@ -13006,9 +13016,9 @@ class gt {
13006
13016
  let f = (g + 1) * (g + 1) * 3;
13007
13017
  l = new Float64Array(f), h = new Float32Array(f), c = new Float32Array(f), o.noDataVertices && (d = new Uint8Array(f / 3)), Ar(o.normalMapVertices, o.normalMapVerticesHigh, o.normalMapVerticesLow, o.noDataVertices, i.segment.fileGridSize, g * n, g * s, g, l, h, c, ne, d);
13008
13018
  } else {
13009
- t.gridSize = Pc;
13019
+ t.gridSize = Rc;
13010
13020
  let f, p = Math.floor(u * n), _ = Math.floor(u * s);
13011
- f = o.gridSize === 1 ? o.terrainVertices : Qr(o.terrainVertices, o.gridSize, p, _, 1);
13021
+ f = o.gridSize === 1 ? o.terrainVertices : Kr(o.terrainVertices, o.gridSize, p, _, 1);
13012
13022
  let m = 1 / u, y = n - m * p, x = s - m * _, w = new v(f[0], f[1], f[2]), b = new v(f[9], f[10], f[11]), E = new v(f[3] - f[0], f[4] - f[1], f[5] - f[2]), C = new v(f[6] - f[0], f[7] - f[1], f[8] - f[2]), T = new v(f[3] - f[9], f[4] - f[10], f[5] - f[11]), L = new v(f[6] - f[9], f[7] - f[10], f[8] - f[11]), S = new v();
13013
13023
  l = new Float64Array(3 * wt.length), h = new Float32Array(3 * wt.length), c = new Float32Array(3 * wt.length);
13014
13024
  for (let R = 0; R < wt.length; R++) {
@@ -13122,7 +13132,7 @@ class Oa {
13122
13132
  });
13123
13133
  }
13124
13134
  }
13125
- class Rc {
13135
+ class Bc {
13126
13136
  constructor(e, t = "", i = _s) {
13127
13137
  this.name = t, this.projection = i, this._planet = e, this._quadTreeList = [], this._visibleNodes = {};
13128
13138
  }
@@ -13173,7 +13183,7 @@ class Rc {
13173
13183
  }
13174
13184
  getTileXY(e, t) {
13175
13185
  let i = t, r = -1, s = -1, n = 1 << i;
13176
- return r = We(e.lon, 360 / n, -180), s = We(e.lat, 180 / n, 90), [r, s, i, 0];
13186
+ return r = qe(e.lon, 360 / n, -180), s = qe(e.lat, 180 / n, 90), [r, s, i, 0];
13177
13187
  }
13178
13188
  getLonLatTileOffset(e, t, i, r, s) {
13179
13189
  let n = e, o = new G();
@@ -13185,7 +13195,7 @@ class Rc {
13185
13195
  this._visibleNodes[e.nodeId] = e;
13186
13196
  }
13187
13197
  }
13188
- const Na = new us({ code: "epsg:4326", units: Da }), _n = (90 - ue) / Math.pow(2, 7);
13198
+ const Na = new us({ code: "epsg:4326", units: Da }), _n = (90 - _e) / Math.pow(2, 7);
13189
13199
  class fn extends Fa {
13190
13200
  constructor(e, t, i, r) {
13191
13201
  super(e, t, i, r), this._projection = Na, this._extentLonLat = this._extent, this._extentMerc = new G(r.southWest.forwardMercatorEPS01(), r.northEast.forwardMercatorEPS01()), this._isNorth = this._extent.northEast.lat > 0, this.isPole = !0;
@@ -13217,13 +13227,13 @@ class fn extends Fa {
13217
13227
  this._assignTileXIndexes(this._extent), this._assignTileYIndexes(this._extent), this.tileIndex = $e.getTileIndex(this.tileX, this.tileY, this.tileZoom, this._tileGroup);
13218
13228
  }
13219
13229
  _assignTileXIndexes(e) {
13220
- this.tileX = We(e.getCenter().lon, e.getWidth(), -180);
13230
+ this.tileX = qe(e.getCenter().lon, e.getWidth(), -180);
13221
13231
  let t = 1 << this.tileZoom;
13222
13232
  this.tileXE = (this.tileX + 1) % t, this.tileXW = (t + this.tileX - 1) % t;
13223
13233
  }
13224
13234
  _assignTileYIndexes(e) {
13225
13235
  const t = e.getCenter().lat;
13226
- t > 0 ? (this._tileGroup = 20, this.tileY = We(t, e.getHeight(), 90)) : (this._tileGroup = Pt, this.tileY = We(t, e.getHeight(), Ve)), this.tileYN = this.tileY - 1, this.tileYS = this.tileY + 1;
13236
+ t > 0 ? (this._tileGroup = 20, this.tileY = qe(t, e.getHeight(), 90)) : (this._tileGroup = Pt, this.tileY = qe(t, e.getHeight(), Ve)), this.tileYN = this.tileY - 1, this.tileYS = this.tileY + 1;
13227
13237
  }
13228
13238
  _projToDeg(e, t) {
13229
13239
  return new A(e, t);
@@ -13264,7 +13274,7 @@ class Et {
13264
13274
  this.nodeId ? this.bsphere.setFromExtent(this.layer._planet.ellipsoid, this.extent.inverseMercator()) : (this.bsphere.radius = this.layer._planet.ellipsoid.equatorialSize, this.bsphere.center = new v());
13265
13275
  }
13266
13276
  __setLonLat__(e) {
13267
- return e._lonLat.isZero() && !e._cartesian.isZero() && (e._lonLat = this.layer._planet.ellipsoid.cartesianToLonLat(e._cartesian)), Math.abs(e._lonLat.lat) < ue ? e._lonLatMerc = e._lonLat.forwardMercator() : e._lonLatMerc = new A(), e._lonLatMerc;
13277
+ return e._lonLat.isZero() && !e._cartesian.isZero() && (e._lonLat = this.layer._planet.ellipsoid.cartesianToLonLat(e._cartesian)), Math.abs(e._lonLat.lat) < _e ? e._lonLatMerc = e._lonLat.forwardMercator() : e._lonLatMerc = new A(), e._lonLatMerc;
13268
13278
  }
13269
13279
  buildTree(e, t = !1) {
13270
13280
  if (this.count += e.length, e.length > this.layer._nodeCapacity) {
@@ -13372,14 +13382,14 @@ class At extends Et {
13372
13382
  r._fadingOpacity = this.layer._fadingOpacity, r.scaleByDistance = this.layer.scaleByDistance, r.pickingScale = this.layer.pickingScale, r.isEmpty() || e.push(r);
13373
13383
  }
13374
13384
  }
13375
- class Mc extends Oa {
13385
+ class kc extends Oa {
13376
13386
  constructor(e, t) {
13377
13387
  super(e, t);
13378
13388
  let i = e._planet;
13379
- this._entityCollectionsTree = new Et(this, 0, null, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2]), i, 0), this._entityCollectionsTreeNorth = new At(this, 0, null, G.createFromArray([-180, ue, 180, 90]), i, 0), this._entityCollectionsTreeSouth = new At(this, 0, null, G.createFromArray([-180, -90, 180, Ve]), i, 0), this._renderingNodes = {}, this._renderingNodesNorth = {}, this._renderingNodesSouth = {};
13389
+ this._entityCollectionsTree = new Et(this, 0, null, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2]), i, 0), this._entityCollectionsTreeNorth = new At(this, 0, null, G.createFromArray([-180, _e, 180, 90]), i, 0), this._entityCollectionsTreeSouth = new At(this, 0, null, G.createFromArray([-180, -90, 180, Ve]), i, 0), this._renderingNodes = {}, this._renderingNodesNorth = {}, this._renderingNodesSouth = {};
13380
13390
  }
13381
13391
  insertEntity(e, t = !1) {
13382
- e._lonLat.lat > ue ? (this._entityCollectionsTreeNorth.__setLonLat__(e), this._entityCollectionsTreeNorth.insertEntity(e, t)) : e._lonLat.lat < Ve ? (this._entityCollectionsTreeSouth.__setLonLat__(e), this._entityCollectionsTreeSouth.insertEntity(e, t)) : (this._entityCollectionsTree.__setLonLat__(e), this._entityCollectionsTree.insertEntity(e, t));
13392
+ e._lonLat.lat > _e ? (this._entityCollectionsTreeNorth.__setLonLat__(e), this._entityCollectionsTreeNorth.insertEntity(e, t)) : e._lonLat.lat < Ve ? (this._entityCollectionsTreeSouth.__setLonLat__(e), this._entityCollectionsTreeSouth.insertEntity(e, t)) : (this._entityCollectionsTree.__setLonLat__(e), this._entityCollectionsTree.insertEntity(e, t));
13383
13393
  }
13384
13394
  setPickingEnabled(e) {
13385
13395
  this._entityCollectionsTree && this._entityCollectionsTree.traverseTree((t) => {
@@ -13397,7 +13407,7 @@ class Mc extends Oa {
13397
13407
  let t = [], i = [], r = [];
13398
13408
  for (let s = 0, n = e.length; s < n; s++) {
13399
13409
  let o = e[s];
13400
- o._lonLat.lat > ue ? (t.push(o), this._entityCollectionsTreeNorth.__setLonLat__(o)) : o._lonLat.lat < Ve ? (i.push(o), this._entityCollectionsTreeSouth.__setLonLat__(o)) : (r.push(o), this._entityCollectionsTree.__setLonLat__(o));
13410
+ o._lonLat.lat > _e ? (t.push(o), this._entityCollectionsTreeNorth.__setLonLat__(o)) : o._lonLat.lat < Ve ? (i.push(o), this._entityCollectionsTreeSouth.__setLonLat__(o)) : (r.push(o), this._entityCollectionsTree.__setLonLat__(o));
13401
13411
  }
13402
13412
  this._entityCollectionsTree.buildTree(r), this._entityCollectionsTreeNorth.buildTree(t), this._entityCollectionsTreeSouth.buildTree(i);
13403
13413
  }
@@ -13411,7 +13421,7 @@ class Mc extends Oa {
13411
13421
  for (this._secondPASS = [], this._entityCollectionsTreeSouth.collectRenderCollectionsPASS1(t._visibleNodesSouth, e), i = this._secondPASS.length; i--; ) this._secondPASS[i].collectRenderCollectionsPASS2(t._visibleNodesSouth, e, this._secondPASS[i].nodeId);
13412
13422
  }
13413
13423
  }
13414
- class Bc extends Rc {
13424
+ class Ic extends Bc {
13415
13425
  constructor(e) {
13416
13426
  super(e, "Earth"), this._visibleNodesNorth = {}, this._visibleNodesSouth = {};
13417
13427
  }
@@ -13423,26 +13433,26 @@ class Bc extends Rc {
13423
13433
  super._clearVisibleNodes(), this._visibleNodesNorth = {}, this._visibleNodesSouth = {};
13424
13434
  }
13425
13435
  createEntitiCollectionsTreeStrategy(e, t) {
13426
- return new Mc(e, t);
13436
+ return new kc(e, t);
13427
13437
  }
13428
13438
  init() {
13429
- this._quadTreeList = [new gt(Fa, this.planet, 0, null, 0, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2])), new gt(fn, this.planet, 0, null, 0, G.createFromArray([-180, ue, 180, 90])), new gt(fn, this.planet, 0, null, 0, G.createFromArray([-180, -90, 180, Ve]))];
13439
+ this._quadTreeList = [new gt(Fa, this.planet, 0, null, 0, G.createFromArray([-2003750834e-2, -2003750834e-2, 2003750834e-2, 2003750834e-2])), new gt(fn, this.planet, 0, null, 0, G.createFromArray([-180, _e, 180, 90])), new gt(fn, this.planet, 0, null, 0, G.createFromArray([-180, -90, 180, Ve]))];
13430
13440
  }
13431
13441
  getTileXY(e, t) {
13432
- let i = function(l, h = ue) {
13442
+ let i = function(l, h = _e) {
13433
13443
  return l > h ? 20 : l < -h ? Pt : 0;
13434
- }(e.lat, ue), r = t, s = -1, n = -1, o = 1 << r;
13435
- if (i === 20) s = We(e.lon, 360 / o, -180), n = We(e.lat, (90 - ue) / o, 90);
13436
- else if (i === Pt) s = We(e.lon, 360 / o, -180), n = We(e.lat, (90 - ue) / o, Ve);
13444
+ }(e.lat, _e), r = t, s = -1, n = -1, o = 1 << r;
13445
+ if (i === 20) s = qe(e.lon, 360 / o, -180), n = qe(e.lat, (90 - _e) / o, 90);
13446
+ else if (i === Pt) s = qe(e.lon, 360 / o, -180), n = qe(e.lat, (90 - _e) / o, Ve);
13437
13447
  else {
13438
13448
  let l = $i(e);
13439
- s = We(l.lon, qi / o, -2003750834e-2), n = We(l.lat, qi / o, Le);
13449
+ s = qe(l.lon, Wi / o, -2003750834e-2), n = qe(l.lat, Wi / o, Le);
13440
13450
  }
13441
13451
  return [s, n, r, i];
13442
13452
  }
13443
13453
  getLonLatTileOffset(e, t, i, r, s) {
13444
13454
  let n = e, o = new G();
13445
- e.lat > ue ? o = Ur(t, i, r, G.createFromArray([-180, ue, 180, 90])) : e.lat < Ve ? o = Ur(t, i, r, G.createFromArray([-180, -90, 180, Ve])) : (n = $i(e), o = qt(t, i, r));
13455
+ e.lat > _e ? o = Ur(t, i, r, G.createFromArray([-180, _e, 180, 90])) : e.lat < Ve ? o = Ur(t, i, r, G.createFromArray([-180, -90, 180, Ve])) : (n = $i(e), o = Wt(t, i, r));
13446
13456
  let l = o.getWidth() / (s - 1), h = o.getHeight() / (s - 1);
13447
13457
  return [s - Math.ceil((n.lat - o.southWest.lat) / h) - 1, Math.floor((n.lon - o.southWest.lon) / l)];
13448
13458
  }
@@ -13509,7 +13519,7 @@ class Ha {
13509
13519
  return i.offset + i.scale * l;
13510
13520
  }
13511
13521
  }
13512
- class kc {
13522
+ class zc {
13513
13523
  constructor(e, t = 5) {
13514
13524
  this.MAX_FRAMES = t, this._gridSize = 64, this._planet = e, this._framebuffer = null, this._framebufferMercProj = null, this._texCoordsBuffer = null, this._indexBuffer = null, this._currentFrame = 0, this._queue = [], this._animate = [], this._quadTexCoordsBuffer = null, this._quadVertexBuffer = null;
13515
13525
  }
@@ -13582,10 +13592,10 @@ class kc {
13582
13592
  }` }));
13583
13593
  }
13584
13594
  }
13585
- const Ic = ["loadend", "layerloadend"];
13595
+ const Dc = ["loadend", "layerloadend"];
13586
13596
  class Va {
13587
13597
  constructor(e = 24) {
13588
- this.MAX_REQUESTS = e, this.events = ge(Ic), this._loading = 0, this._queue = [], this._senderRequestCounter = [], this._promises = { json: (t) => t.json(), blob: (t) => t.blob(), arrayBuffer: (t) => t.arrayBuffer(), imageBitmap: (t) => t.blob().then((i) => createImageBitmap(i, { premultiplyAlpha: "premultiply" })), text: (t) => t.text() };
13598
+ this.MAX_REQUESTS = e, this.events = de(Dc), this._loading = 0, this._queue = [], this._senderRequestCounter = [], this._promises = { json: (t) => t.json(), blob: (t) => t.blob(), arrayBuffer: (t) => t.arrayBuffer(), imageBitmap: (t) => t.blob().then((i) => createImageBitmap(i, { premultiplyAlpha: "premultiply" })), text: (t) => t.text() };
13589
13599
  }
13590
13600
  load(e, t) {
13591
13601
  e.sender && (this._senderRequestCounter[e.sender.__id] || (this._senderRequestCounter[e.sender.__id] = { sender: e.sender, counter: 0, __requestCounterFrame__: 0 }), this._senderRequestCounter[e.sender.__id].counter++), this._queue.push({ params: e, callback: t }), this._exec();
@@ -13662,7 +13672,7 @@ class Va {
13662
13672
  return this._queue;
13663
13673
  }
13664
13674
  }
13665
- class zc {
13675
+ class Fc {
13666
13676
  constructor(e, t = {}) {
13667
13677
  this._minTabelSize = t.minTableSize || 1, this._maxTableSize = t.maxTableSize || 8, this._planet = e, this._handler = null, this._verticesBufferArray = [], this._indexBufferArray = [], this._positionBuffer = null, this._framebuffer = null, this._normalMapVerticesTexture = null, this._width = t.width || 128, this._height = t.height || 128, this._queue = new fs(1024), this._lock = new Nr();
13668
13678
  }
@@ -13808,10 +13818,10 @@ class zc {
13808
13818
  this._lock.free(e);
13809
13819
  }
13810
13820
  }
13811
- const Dc = new us({ code: "equi", units: Da }), Ua = `(function(){"use strict";let l=null,K=null,O=null,Q=null,S=null,T=null,U=null;function P(a,t){t<0?(t=-t,a+=l.width/2):t>=l.height&&(t=2*(l.height-1)-t,a+=l.width/2),a<0?a+=l.width:a>=l.width&&(a-=l.width);var n=2*(t*l.width+a)+l.i;return l.rawfile[n]<<8|l.rawfile[n+1]}const sa=.5*Math.PI,W=2003750834e-2,ia=Math.PI/W,ua=180/W,X=180/Math.PI,Ma=X*sa,Y=Math.PI/180,da=2*X;let k=0,Z=0,_=null;const B=function(a,t,n){this.x=a,this.y=t,this.z=n};var $=function(a,t,n,o){let f=function(c,C){if(!l)return 0;c<0&&(c+=360);var w=(90-C)*l.rlatres,M=c*l.rlonres,u=Math.floor(w),d=Math.floor(M);M-=d,w-=u,u===l.height-1&&u--,K===d&&O===u||(K=d,O=u,Q=P(d,u),S=P(d+1,u),T=P(d,u+1),U=P(d+1,u+1));let L=null;return L=(1-w)*((1-M)*Q+M*S)+w*((1-M)*T+M*U),l.offset+l.scale*L}(a,t)*n,h=Y*t,r=Y*a,m=Math.sin(h),x=Z/Math.sqrt(1-k*m*m),H=(x+f)*Math.cos(h);o.x=H*Math.cos(r),o.y=H*Math.sin(r),o.z=(x*(1-k)+f)*m},ma=function(a,t,n,o){$(a*ua,da*Math.atan(Math.exp(t*ia))-Ma,n,o)},e=new B(0,0,0),p=new B(0,0,0),y=new B(0,0,0),pa=function(a,t,n){let o=a.x,f=a.y,h=a.z;var r;o>=0?(r=65536*Math.floor(o/65536),t.x=Math.fround(r),n.x=Math.fround(o-r)):(r=65536*Math.floor(-o/65536),t.x=Math.fround(-r),n.x=Math.fround(o+r)),f>=0?(r=65536*Math.floor(f/65536),t.y=Math.fround(r),n.y=Math.fround(f-r)):(r=65536*Math.floor(-f/65536),t.y=Math.fround(-r),n.y=Math.fround(f+r)),h>=0?(r=65536*Math.floor(h/65536),t.z=Math.fround(r),n.z=Math.fround(h-r)):(r=65536*Math.floor(-h/65536),t.z=Math.fround(-r),n.z=Math.fround(h+r))};self.onmessage=function(a){if(a.data.model)l=a.data.model,l.rawfile=a.data.rawfile;else if(a.data.params){let t=549755748352,n=-549755748352,o=549755748352,f=-549755748352,h=549755748352,r=-549755748352;k=a.data.params[8],Z=a.data.params[9];let m=a.data.params[2],x=a.data.params[3],H=a.data.params[10],c=a.data.params[11],C=a.data.params[12],w=a.data.params[13];_=a.data.params[1]===0?ma:$;let M=Math.max(x,m),u=(a.data.params[6]-a.data.params[4])/M,d=(a.data.params[7]-a.data.params[5])/M,L=a.data.params[4],ya=a.data.params[7],aa=Math.max(x/m,1),N=M+1;const z=N*N,R=(m+1)*(m+1)*3;let b=new Float32Array(R),A=new Float64Array(R),F=new Float32Array(R),g=new Float32Array(R),V=new Float32Array(3*z),q=new Float64Array(3*z),v=new Float32Array(3*z),I=new Float32Array(3*z),s=0,i=0;for(let j=0;j<z;j++){let la=j%N,na=~~(j/N);_(L+la*u,ya-na*d,w,e);let D=e.x*H,E=e.y*c,G=e.z*C,J=1/Math.sqrt(D*D+E*E+G*G),oa=D*J,fa=E*J,ha=G*J;pa(e,p,y),q[i]=e.x,v[i]=p.x,I[i]=y.x,V[i++]=oa,q[i]=e.y,v[i]=p.y,I[i]=y.y,V[i++]=fa,q[i]=e.z,v[i]=p.z,I[i]=y.z,V[i++]=ha,na%aa==0&&la%aa==0&&(A[s]=e.x,F[s]=p.x,g[s]=y.x,b[s++]=oa,A[s]=e.y,F[s]=p.y,g[s]=y.y,b[s++]=fa,A[s]=e.z,F[s]=p.z,g[s]=y.z,b[s++]=ha,e.x<t&&(t=e.x),e.x>n&&(n=e.x),e.y<o&&(o=e.y),e.y>f&&(f=e.y),e.z<h&&(h=e.z),e.z>r&&(r=e.z))}let ta=.5*(n-t),ra=.5*(f-o),ea=.5*(r-h),wa=Math.sqrt(ta*ta+ra*ra+ea*ea);self.postMessage({id:a.data.params[0],plainVertices:A,plainVerticesHigh:F,plainVerticesLow:g,plainNormals:b,normalMapNormals:V,normalMapVertices:q,normalMapVerticesHigh:v,normalMapVerticesLow:I,plainRadius:wa},[A.buffer,F.buffer,g.buffer,b.buffer,V.buffer,q.buffer,v.buffer,I.buffer])}}})();
13821
+ const Oc = new us({ code: "equi", units: Da }), Ua = `(function(){"use strict";let l=null,K=null,O=null,Q=null,S=null,T=null,U=null;function P(a,t){t<0?(t=-t,a+=l.width/2):t>=l.height&&(t=2*(l.height-1)-t,a+=l.width/2),a<0?a+=l.width:a>=l.width&&(a-=l.width);var n=2*(t*l.width+a)+l.i;return l.rawfile[n]<<8|l.rawfile[n+1]}const sa=.5*Math.PI,W=2003750834e-2,ia=Math.PI/W,ua=180/W,X=180/Math.PI,Ma=X*sa,Y=Math.PI/180,da=2*X;let k=0,Z=0,_=null;const B=function(a,t,n){this.x=a,this.y=t,this.z=n};var $=function(a,t,n,o){let f=function(c,C){if(!l)return 0;c<0&&(c+=360);var w=(90-C)*l.rlatres,M=c*l.rlonres,u=Math.floor(w),d=Math.floor(M);M-=d,w-=u,u===l.height-1&&u--,K===d&&O===u||(K=d,O=u,Q=P(d,u),S=P(d+1,u),T=P(d,u+1),U=P(d+1,u+1));let L=null;return L=(1-w)*((1-M)*Q+M*S)+w*((1-M)*T+M*U),l.offset+l.scale*L}(a,t)*n,h=Y*t,r=Y*a,m=Math.sin(h),x=Z/Math.sqrt(1-k*m*m),H=(x+f)*Math.cos(h);o.x=H*Math.cos(r),o.y=H*Math.sin(r),o.z=(x*(1-k)+f)*m},ma=function(a,t,n,o){$(a*ua,da*Math.atan(Math.exp(t*ia))-Ma,n,o)},e=new B(0,0,0),p=new B(0,0,0),y=new B(0,0,0),pa=function(a,t,n){let o=a.x,f=a.y,h=a.z;var r;o>=0?(r=65536*Math.floor(o/65536),t.x=Math.fround(r),n.x=Math.fround(o-r)):(r=65536*Math.floor(-o/65536),t.x=Math.fround(-r),n.x=Math.fround(o+r)),f>=0?(r=65536*Math.floor(f/65536),t.y=Math.fround(r),n.y=Math.fround(f-r)):(r=65536*Math.floor(-f/65536),t.y=Math.fround(-r),n.y=Math.fround(f+r)),h>=0?(r=65536*Math.floor(h/65536),t.z=Math.fround(r),n.z=Math.fround(h-r)):(r=65536*Math.floor(-h/65536),t.z=Math.fround(-r),n.z=Math.fround(h+r))};self.onmessage=function(a){if(a.data.model)l=a.data.model,l.rawfile=a.data.rawfile;else if(a.data.params){let t=549755748352,n=-549755748352,o=549755748352,f=-549755748352,h=549755748352,r=-549755748352;k=a.data.params[8],Z=a.data.params[9];let m=a.data.params[2],x=a.data.params[3],H=a.data.params[10],c=a.data.params[11],C=a.data.params[12],w=a.data.params[13];_=a.data.params[1]===0?ma:$;let M=Math.max(x,m),u=(a.data.params[6]-a.data.params[4])/M,d=(a.data.params[7]-a.data.params[5])/M,L=a.data.params[4],ya=a.data.params[7],aa=Math.max(x/m,1),N=M+1;const z=N*N,R=(m+1)*(m+1)*3;let b=new Float32Array(R),A=new Float64Array(R),F=new Float32Array(R),g=new Float32Array(R),V=new Float32Array(3*z),q=new Float64Array(3*z),v=new Float32Array(3*z),I=new Float32Array(3*z),s=0,i=0;for(let j=0;j<z;j++){let la=j%N,na=~~(j/N);_(L+la*u,ya-na*d,w,e);let D=e.x*H,E=e.y*c,G=e.z*C,J=1/Math.sqrt(D*D+E*E+G*G),oa=D*J,fa=E*J,ha=G*J;pa(e,p,y),q[i]=e.x,v[i]=p.x,I[i]=y.x,V[i++]=oa,q[i]=e.y,v[i]=p.y,I[i]=y.y,V[i++]=fa,q[i]=e.z,v[i]=p.z,I[i]=y.z,V[i++]=ha,na%aa==0&&la%aa==0&&(A[s]=e.x,F[s]=p.x,g[s]=y.x,b[s++]=oa,A[s]=e.y,F[s]=p.y,g[s]=y.y,b[s++]=fa,A[s]=e.z,F[s]=p.z,g[s]=y.z,b[s++]=ha,e.x<t&&(t=e.x),e.x>n&&(n=e.x),e.y<o&&(o=e.y),e.y>f&&(f=e.y),e.z<h&&(h=e.z),e.z>r&&(r=e.z))}let ta=.5*(n-t),ra=.5*(f-o),ea=.5*(r-h),wa=Math.sqrt(ta*ta+ra*ra+ea*ea);self.postMessage({id:a.data.params[0],plainVertices:A,plainVerticesHigh:F,plainVerticesLow:g,plainNormals:b,normalMapNormals:V,normalMapVertices:q,normalMapVerticesHigh:v,normalMapVerticesLow:I,plainRadius:wa},[A.buffer,F.buffer,g.buffer,b.buffer,V.buffer,q.buffer,v.buffer,I.buffer])}}})();
13812
13822
  //# sourceMappingURL=PlainSegmentWorker.worker-CT1cj8jj.js.map
13813
13823
  `, gn = typeof self < "u" && self.Blob && new Blob([Ua], { type: "text/javascript;charset=utf-8" });
13814
- function Fc(a) {
13824
+ function Nc(a) {
13815
13825
  let e;
13816
13826
  try {
13817
13827
  if (e = gn && (self.URL || self.webkitURL).createObjectURL(gn), !e) throw "";
@@ -13825,9 +13835,9 @@ function Fc(a) {
13825
13835
  e && (self.URL || self.webkitURL).revokeObjectURL(e);
13826
13836
  }
13827
13837
  }
13828
- class Oc extends rs {
13838
+ class Hc extends rs {
13829
13839
  constructor(e = 2) {
13830
- super(e, Fc);
13840
+ super(e, Nc);
13831
13841
  }
13832
13842
  _onMessage(e) {
13833
13843
  this._source.get(e.data.id)._plainSegmentWorkerCallback(e.data), e.data.plainVertices = null, e.data.plainVerticesHigh = null, e.data.plainVerticesLow = null, e.data.plainNormals = null, e.data.normalMapNormals = null, e.data.normalMapVertices = null, e.data.normalMapVerticesHigh = null, e.data.normalMapVerticesLow = null, this._source.delete(e.data.id);
@@ -13847,7 +13857,7 @@ class Oc extends rs {
13847
13857
  if (e.initialized) if (this._workerQueue.length) {
13848
13858
  let t = this._workerQueue.pop();
13849
13859
  this._source.set(this._sourceId, e);
13850
- let i = e._projection.id === Na.id || e._projection.id === Dc.id ? 1 : 0, r = new Float64Array([this._sourceId, i, e.planet.terrain.gridSizeByZoom[e.tileZoom], e.planet.terrain.plainGridSize, e._extent.southWest.lon, e._extent.southWest.lat, e._extent.northEast.lon, e._extent.northEast.lat, e.planet.ellipsoid._e2, e.planet.ellipsoid.equatorialSize, e.planet.ellipsoid._invRadii2.x, e.planet.ellipsoid._invRadii2.y, e.planet.ellipsoid._invRadii2.z, e.planet._heightFactor]);
13860
+ let i = e._projection.id === Na.id || e._projection.id === Oc.id ? 1 : 0, r = new Float64Array([this._sourceId, i, e.planet.terrain.gridSizeByZoom[e.tileZoom], e.planet.terrain.plainGridSize, e._extent.southWest.lon, e._extent.southWest.lat, e._extent.northEast.lon, e._extent.northEast.lat, e.planet.ellipsoid._e2, e.planet.ellipsoid.equatorialSize, e.planet.ellipsoid._invRadii2.x, e.planet.ellipsoid._invRadii2.y, e.planet.ellipsoid._invRadii2.z, e.planet._heightFactor]);
13851
13861
  this._sourceId++, t.postMessage({ params: r }, [r.buffer]);
13852
13862
  } else this._pendingQueue.push(e);
13853
13863
  else this.check();
@@ -13856,7 +13866,7 @@ class Oc extends rs {
13856
13866
  const Ga = `(function(){"use strict";function H(r,e){return function(z,b){let v=0,N=z.length-1;for(;v<=N;){let n=Math.floor(.5*(v+N));if(Math.abs(z[n]-b)<.001)return n;z[n]<b?v=n+1:N=n-1}return-1}(r,e)!==-1}var y=function(r,e,z){this.x=r,this.y=e,this.z=z},Y=function(r,e,z){let b=r.x,v=r.y,N=r.z;var n;b>=0?(n=65536*Math.floor(b/65536),e.x=Math.fround(n),z.x=Math.fround(b-n)):(n=65536*Math.floor(-b/65536),e.x=Math.fround(-n),z.x=Math.fround(b+n)),v>=0?(n=65536*Math.floor(v/65536),e.y=Math.fround(n),z.y=Math.fround(v-n)):(n=65536*Math.floor(-v/65536),e.y=Math.fround(-n),z.y=Math.fround(v+n)),N>=0?(n=65536*Math.floor(N/65536),e.z=Math.fround(n),z.z=Math.fround(N-n)):(n=65536*Math.floor(-N/65536),e.z=Math.fround(-n),z.z=Math.fround(N+n))};y.prototype.sub=function(r){return new y(this.x-r.x,this.y-r.y,this.z-r.z)},y.prototype.add=function(r){return new y(this.x+r.x,this.y+r.y,this.z+r.z)},y.prototype.cross=function(r){return new y(this.y*r.z-this.z*r.y,this.z*r.x-this.x*r.z,this.x*r.y-this.y*r.x)},y.prototype.normalize=function(r){var e=this.x,z=this.y,b=this.z,v=1/Math.sqrt(e*e+z*z+b*b);return this.x=e*v,this.y=z*v,this.z=b*v,this},y.prototype.distance=function(r){return this.sub(r).length()},y.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};var x=new y(0,0,0),i=new y(0,0,0),t=new y(0,0,0);self.onmessage=function(r){var e=r.data.elevations,z=r.data.this_plainVertices,b=r.data.this_plainNormals,v=r.data.this_normalMapVertices,N=r.data.this_normalMapNormals,n=r.data.heightFactor,Dr=r.data.gridSize,D=r.data.noDataValues,Hr=r.data.id,Q=549755748352,W=-549755748352,T=549755748352,$=-549755748352,Z=549755748352,X=-549755748352;const J=Math.sqrt(e.length)-1,K=J+1,R=K*K,C=Dr,vr=J/C,L=C+1,tr=n;var a,d,p,m,yr,sr,S=0,xr=0,U=L*L*3,h=new Float64Array(U),j=new Float32Array(U),k=new Float32Array(U),lr=new Uint8Array(L*L),u=v,g=N;if(J>=C){a=new Float32Array(3*R),d=new Float64Array(3*R),p=new Float32Array(3*R),m=new Float32Array(3*R);for(let f=0;f<R;f++){var Ar=f%K,Fr=~~(f/K),ur=f,o=3*ur,rr=e[ur];H(D,rr)&&(rr=0);var Mr=tr*rr,s=new y(u[o]+Mr*g[o],u[o+1]+Mr*g[o+1],u[o+2]+Mr*g[o+2]);if(Y(s,i,t),d[o]=s.x,d[o+1]=s.y,d[o+2]=s.z,p[o]=i.x,p[o+1]=i.y,p[o+2]=i.z,m[o]=t.x,m[o+1]=t.y,m[o+2]=t.z,Fr%vr==0&&Ar%vr==0){let A=new y(u[o],u[o+1],u[o+2]),V=new y(u[o+3],u[o+4],u[o+5]),F=e[ur+1];H(D,F)&&(F=0);let q=!1;if(D.length===0){let _=A.distance(V);q=Math.abs(rr-F)/_>10||rr<-5e3}q?lr[xr]=1:(lr[xr]=0,s.x<Q&&(Q=s.x),s.x>W&&(W=s.x),s.y<T&&(T=s.y),s.y>$&&($=s.y),s.z<Z&&(Z=s.z),s.z>X&&(X=s.z)),j[S]=i.x,k[S]=t.x,h[S++]=s.x,j[S]=i.y,k[S]=t.y,h[S++]=s.y,j[S]=i.z,k[S]=t.z,h[S++]=s.z,xr++}if(Fr!==J&&Ar!==J){var gr=f+1,M=3*gr,B=e[gr];H(D,B)&&(B=0);var cr=tr*B,ar=new y(u[M]+cr*g[M],u[M+1]+cr*g[M+1],u[M+2]+cr*g[M+2]);Y(ar,i,t),d[M]=ar.x,d[M+1]=ar.y,d[M+2]=ar.z,p[M]=i.x,p[M+1]=i.y,p[M+2]=i.z,m[M]=t.x,m[M+1]=t.y,m[M+2]=t.z;var Vr=f+K,c=3*Vr;H(D,B=e[Vr])&&(B=0);var wr=tr*B,nr=new y(u[c]+wr*g[c],u[c+1]+wr*g[c+1],u[c+2]+wr*g[c+2]);Y(nr,i,t),d[c]=nr.x,d[c+1]=nr.y,d[c+2]=nr.z,p[c]=i.x,p[c+1]=i.y,p[c+2]=i.z,m[c]=t.x,m[c+1]=t.y,m[c+2]=t.z;var qr=f+K+1,w=3*qr;H(D,B=e[qr])&&(B=0);var dr=tr*B,er=new y(u[w]+dr*g[w],u[w+1]+dr*g[w+1],u[w+2]+dr*g[w+2]);Y(er,i,t),d[w]=er.x,d[w+1]=er.y,d[w+2]=er.z,p[w]=i.x,p[w+1]=i.y,p[w+2]=i.z,m[w]=t.x,m[w+1]=t.y,m[w+2]=t.z;var Lr=ar.sub(s),Sr=nr.sub(s),Nr=er.sub(s),hr=Sr.cross(Nr).normalize(),zr=Nr.cross(Lr).normalize(),O=zr.add(hr).normalize();a[o]+=O.x,a[o+1]+=O.y,a[o+2]+=O.z,a[M]+=zr.x,a[M+1]+=zr.y,a[M+2]+=zr.z,a[c]+=hr.x,a[c+1]+=hr.y,a[c+2]+=hr.z,a[w]+=O.x,a[w+1]+=O.y,a[w+2]+=O.z}}}else{a=new Float32Array(U),d=new Float64Array(U),p=new Float32Array(U),m=new Float32Array(U),a=new Float32Array(U);var E=C/J,_r=U/3,pr=J+1;for(let f=0;f<_r;f++){let A=Math.floor(f/L),V=f%L,F=A%E,q=V%E,_=Math.floor(A/E)*pr+Math.floor(V/E);V===C&&(_-=1,q=E),A===C&&(_-=pr,F=E);let mr=_+1,fr=_+pr,br=fr+1,or=e[_],ir=e[mr],P=e[fr],G=e[br];H(D,or)&&(or=0),H(D,ir)&&(ir=0),H(D,P)&&(P=0),H(D,G)&&(G=0);let I=or*(1-(yr=q/E))*(1-(sr=F/E))+ir*yr*(1-sr)+P*(1-yr)*sr+G*yr*sr,l=3*f;x.x=z[l]+I*b[l],x.y=z[l+1]+I*b[l+1],x.z=z[l+2]+I*b[l+2],Y(x,i,t),h[l]=x.x,h[l+1]=x.y,h[l+2]=x.z,j[l]=i.x,j[l+1]=i.y,j[l+2]=i.z,k[l]=t.x,k[l+1]=t.y,k[l+2]=t.z,x.x<Q&&(Q=x.x),x.x>W&&(W=x.x),x.y<T&&(T=x.y),x.y>$&&($=x.y),x.z<Z&&(Z=x.z),x.z>X&&(X=x.z)}d.set(h),p.set(j),m.set(k);for(let f=0;f<_r;f++)if(~~(f/L)!==C&&f%L!==C){let A=3*f,V=A+3,F=A+3*L,q=F+3,_=new y(h[A],h[A+1],h[A+2]),mr=new y(h[V],h[V+1],h[V+2]),fr=new y(h[F],h[F+1],h[F+2]),br=new y(h[q],h[q+1],h[q+2]),or=mr.sub(_).normalize(),ir=fr.sub(_).normalize(),P=br.sub(_).normalize(),G=ir.cross(P).normalize(),I=P.cross(or).normalize(),l=I.add(G).normalize();a[A]+=l.x,a[A+1]+=l.y,a[A+2]+=l.z,a[V]+=I.x,a[V+1]+=I.y,a[V+2]+=I.z,a[F]+=G.x,a[F+1]+=G.y,a[F+2]+=G.z,a[q]+=l.x,a[q+1]+=l.y,a[q+2]+=l.z}}self.postMessage({id:Hr,normalMapNormals:a,normalMapVertices:d,normalMapVerticesHigh:p,normalMapVerticesLow:m,terrainVertices:h,terrainVerticesHigh:j,terrainVerticesLow:k,noDataVertices:lr,bounds:[Q,T,Z,W,$,X]},[a.buffer,d.buffer,p.buffer,m.buffer,h.buffer,j.buffer,k.buffer,lr.buffer])}})();
13857
13867
  //# sourceMappingURL=TerrainWorker.worker-DmikdfB2.js.map
13858
13868
  `, pn = typeof self < "u" && self.Blob && new Blob([Ga], { type: "text/javascript;charset=utf-8" });
13859
- function Nc(a) {
13869
+ function Vc(a) {
13860
13870
  let e;
13861
13871
  try {
13862
13872
  if (e = pn && (self.URL || self.webkitURL).createObjectURL(pn), !e) throw "";
@@ -13870,9 +13880,9 @@ function Nc(a) {
13870
13880
  e && (self.URL || self.webkitURL).revokeObjectURL(e);
13871
13881
  }
13872
13882
  }
13873
- class Hc extends rs {
13883
+ class Uc extends rs {
13874
13884
  constructor(e = 2) {
13875
- super(e, Nc);
13885
+ super(e, Vc);
13876
13886
  }
13877
13887
  _onMessage(e) {
13878
13888
  this._source.get(e.data.id).segment._terrainWorkerCallback(e.data), this._source.delete(e.data.id), e.data.normalMapNormals = null, e.data.normalMapVertices = null, e.data.normalMapVerticesHigh = null, e.data.normalMapVerticesLow = null, e.data.terrainVertices = null, e.data.terrainVerticesHigh = null, e.data.terrainVerticesLow = null;
@@ -13888,7 +13898,7 @@ class Hc extends rs {
13888
13898
  }
13889
13899
  }
13890
13900
  let Ft = new Float32Array(2);
13891
- class Vc {
13901
+ class Gc {
13892
13902
  constructor(e, t = 256, i = 256) {
13893
13903
  this._width = t, this._height = i, this._planet = e, this._framebuffer = null, this._queue = [], this._handler = null;
13894
13904
  }
@@ -14051,9 +14061,9 @@ class ja extends dt {
14051
14061
  this._fadingNodes.has(l._fadingNodes[0].__id) && !n.has(m.node.__id) && (n.set(m.node.__id, !0), u ? (g && m.equalize(), m.readyToEngage && m.engage(), m.screenRendering(o, h, c), d.push(m)) : m.screenRendering(o, h, c, this.transparentTexture, !0));
14052
14062
  }
14053
14063
  f.enable(f.DEPTH_TEST);
14054
- }, this._atmosphere = new Cc(e.atmosphereParameters), this.transitionTime = 580, this.ellipsoid = e.ellipsoid || Fn, this.lightEnabled = !0, this._planetRadius2 = (this.ellipsoid.getPolarSize() - 1e4) * (this.ellipsoid.getPolarSize() - 1e4), this._layers = [], this._updateLayers = !1, this.visibleTileLayers = [], this.visibleVectorLayers = [], this._visibleVectorLayersByDepthOrder = [], this._visibleTileLayerSlices = [], this._visibleEntityCollections = [[]], this.baseLayer = null, this.terrain = null, this.camera = new Sa(this, { frustums: e.frustums, eye: new v(25e6, 0, 0), look: v.ZERO, up: v.NORTH, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude }), this.maxEqualZoomAltitude = e.maxEqualZoomAltitude || 15e6, this.minEqualZoomAltitude = e.minEqualZoomAltitude || 1e4, this.minEqualZoomCameraSlope = e.minEqualZoomCameraSlope || 0.8, this.mousePositionOnEarth = new v(), this.emptyTexture = null, this.transparentTexture = null, this.defaultTexture = null, this.minCurrZoom = be, this.maxCurrZoom = Ee, this._viewExtent = new G(new A(180, 180), new A(-180, -180)), this._skipPreRender = !1, this._initialViewExtent = null, this._createdNodesCount = 0, this._renderedNodes = [], this._renderedNodesInFrustum = [], this._fadingNodes = /* @__PURE__ */ new Map(), this._fadingNodesInFrustum = [], this._fadingOpaqueSegments = [], this.layerLock = new Nr(), this.terrainLock = new Nr(), this._heightFactor = 1, this._indexesCache = [], this._indexesCacheToRemove = [], this._indexesCacheToRemoveCounter = 0, this._textureCoordsBufferCache = [], this.quadTreeStrategy = e.quadTreeStrategyPrototype ? new e.quadTreeStrategyPrototype(this) : new Bc(this), this._nightTexture = null, this._specularTexture = null;
14064
+ }, this._atmosphere = new Ec(e.atmosphereParameters), this.transitionTime = 580, this.ellipsoid = e.ellipsoid || Fn, this.lightEnabled = !0, this._planetRadius2 = (this.ellipsoid.getPolarSize() - 1e4) * (this.ellipsoid.getPolarSize() - 1e4), this._layers = [], this._updateLayers = !1, this.visibleTileLayers = [], this.visibleVectorLayers = [], this._visibleVectorLayersByDepthOrder = [], this._visibleTileLayerSlices = [], this._visibleEntityCollections = [[]], this.baseLayer = null, this.terrain = null, this.camera = new Sa(this, { frustums: e.frustums, eye: new v(25e6, 0, 0), look: v.ZERO, up: v.NORTH, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude }), this.maxEqualZoomAltitude = e.maxEqualZoomAltitude || 15e6, this.minEqualZoomAltitude = e.minEqualZoomAltitude || 1e4, this.minEqualZoomCameraSlope = e.minEqualZoomCameraSlope || 0.8, this.mousePositionOnEarth = new v(), this.emptyTexture = null, this.transparentTexture = null, this.defaultTexture = null, this.minCurrZoom = be, this.maxCurrZoom = Ee, this._viewExtent = new G(new A(180, 180), new A(-180, -180)), this._skipPreRender = !1, this._initialViewExtent = null, this._createdNodesCount = 0, this._renderedNodes = [], this._renderedNodesInFrustum = [], this._fadingNodes = /* @__PURE__ */ new Map(), this._fadingNodesInFrustum = [], this._fadingOpaqueSegments = [], this.layerLock = new Nr(), this.terrainLock = new Nr(), this._heightFactor = 1, this._indexesCache = [], this._indexesCacheToRemove = [], this._indexesCacheToRemoveCounter = 0, this._textureCoordsBufferCache = [], this.quadTreeStrategy = e.quadTreeStrategyPrototype ? new e.quadTreeStrategyPrototype(this) : new Ic(this), this._nightTexture = null, this._specularTexture = null;
14055
14065
  let t = Ye(e.ambient, new v(0.2, 0.2, 0.3)), i = Ye(e.diffuse, new v(1, 1, 1)), r = Ye(e.specular, new v(63e-5, 55e-5, 32e-5)), s = e.shininess || 18;
14056
- this._ambient = new Float32Array([t.x, t.y, t.z]), this._diffuse = new Float32Array([i.x, i.y, i.z]), this._specular = new Float32Array([r.x, r.y, r.z, s]), this._maxGridSize = Math.log2(e.maxGridSize || 256), this.SLICE_SIZE = 4, this.SLICE_SIZE_4 = 4 * this.SLICE_SIZE, this.SLICE_SIZE_3 = 3 * this.SLICE_SIZE, this._lodSize = 256, this._curLodSize = 256, this._minLodSize = 512, this._maxLodSize = 256, this._maxNodes = e.maxNodesCount || 200, this._pickingColorArr = new Float32Array(this.SLICE_SIZE_4), this._samplerArr = new Int32Array(this.SLICE_SIZE), this._pickingMaskArr = new Int32Array(this.SLICE_SIZE), this._geoImageCreator = new kc(this), this._vectorTileCreator = new Vc(this, e.vectorTileSize, e.vectorTileSize), this._normalMapCreator = new zc(this), this._terrainWorker = new Hc(3), this._plainSegmentWorker = new Oc(3), this._tileLoader = new Va(e.maxLoadingRequests || 12), this._memKey = new Li(), this.events = ge(Uc), this._distBeforeMemClear = 0, this._prevCamEye = new v(), this._initialized = !1, this._renderCompleted = !1, this._renderCompletedActivated = !1, this._terrainCompleted = !1, this._terrainCompletedActivated = !1, this._collectRenderNodesIsActive = !0, this.nightTextureCoefficient = 2, this._renderScreenNodesPASS = this._renderScreenNodesPASSNoAtmos, this._renderScreenNodesWithHeightPASS = this._renderScreenNodesWithHeightPASSNoAtmos, this._atmosphereEnabled = e.atmosphereEnabled || !1, this._atmosphereMaxMinOpacity = new Float32Array([0.95, 0.28]), this.solidTextureOne = null, this.solidTextureTwo = null, this._nightTextureSrc = e.nightTextureSrc || null, this._specularTextureSrc = e.specularTextureSrc || null, this._transitionOpacityEnabled = e.transitionOpacityEnabled == null || e.transitionOpacityEnabled;
14066
+ this._ambient = new Float32Array([t.x, t.y, t.z]), this._diffuse = new Float32Array([i.x, i.y, i.z]), this._specular = new Float32Array([r.x, r.y, r.z, s]), this._maxGridSize = Math.log2(e.maxGridSize || 256), this.SLICE_SIZE = 4, this.SLICE_SIZE_4 = 4 * this.SLICE_SIZE, this.SLICE_SIZE_3 = 3 * this.SLICE_SIZE, this._lodSize = 256, this._curLodSize = 256, this._minLodSize = 512, this._maxLodSize = 256, this._maxNodes = e.maxNodesCount || 200, this._pickingColorArr = new Float32Array(this.SLICE_SIZE_4), this._samplerArr = new Int32Array(this.SLICE_SIZE), this._pickingMaskArr = new Int32Array(this.SLICE_SIZE), this._geoImageCreator = new zc(this), this._vectorTileCreator = new Gc(this, e.vectorTileSize, e.vectorTileSize), this._normalMapCreator = new Fc(this), this._terrainWorker = new Uc(3), this._plainSegmentWorker = new Hc(3), this._tileLoader = new Va(e.maxLoadingRequests || 12), this._memKey = new Li(), this.events = de(jc), this._distBeforeMemClear = 0, this._prevCamEye = new v(), this._initialized = !1, this._renderCompleted = !1, this._renderCompletedActivated = !1, this._terrainCompleted = !1, this._terrainCompletedActivated = !1, this._collectRenderNodesIsActive = !0, this.nightTextureCoefficient = 2, this._renderScreenNodesPASS = this._renderScreenNodesPASSNoAtmos, this._renderScreenNodesWithHeightPASS = this._renderScreenNodesWithHeightPASSNoAtmos, this._atmosphereEnabled = e.atmosphereEnabled || !1, this._atmosphereMaxMinOpacity = new Float32Array([0.95, 0.28]), this.solidTextureOne = null, this.solidTextureTwo = null, this._nightTextureSrc = e.nightTextureSrc || null, this._specularTextureSrc = e.specularTextureSrc || null, this._transitionOpacityEnabled = e.transitionOpacityEnabled == null || e.transitionOpacityEnabled;
14057
14067
  }
14058
14068
  get terrainReady() {
14059
14069
  return this._terrainCompleted && this._terrainCompletedActivated;
@@ -14568,7 +14578,7 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
14568
14578
  let e = {};
14569
14579
  for (let t = 0; t < this._layers.length; t++) {
14570
14580
  let i = this._layers[t];
14571
- i instanceof fe && i.each(function(r) {
14581
+ i instanceof ge && i.each(function(r) {
14572
14582
  r._entityCollection && !e[r._entityCollection.id] && (r._entityCollection.billboardHandler.refreshTexCoordsArr(), e[r._entityCollection.id] = !0);
14573
14583
  });
14574
14584
  }
@@ -14595,7 +14605,7 @@ precision highp float;uniform float frustumPickingColor;layout(location=0)out ve
14595
14605
  this.memClear(), this.quadTreeStrategy.destroyBranches(), this._renderedNodes = [];
14596
14606
  }
14597
14607
  }
14598
- const Uc = ["draw", "layeradd", "baselayerchange", "layerremove", "layervisibilitychange", "rendercompleted", "terraincompleted", "layerloadend"];
14608
+ const jc = ["draw", "layeradd", "baselayerchange", "layerremove", "layervisibilitychange", "rendercompleted", "terraincompleted", "layerloadend"];
14599
14609
  class gs extends dt {
14600
14610
  constructor(e) {
14601
14611
  super("skybox"), this.params = e, this.vertexPositionBuffer = null, this.texture = null;
@@ -14604,7 +14614,7 @@ class gs extends dt {
14604
14614
  return new gs({ nx: e + "skybox/gal/_nx.jpg", px: e + "skybox/gal/_px.jpg", py: e + "skybox/gal/_py.jpg", ny: e + "skybox/gal/_ny.jpg", pz: e + "skybox/gal/_pz.jpg", nz: e + "skybox/gal/_nz.jpg" });
14605
14615
  }
14606
14616
  init() {
14607
- this.renderer.handler.addProgram(new X("skybox", { uniforms: { projectionViewMatrix: { type: de.MAT4 }, uSampler: { type: de.SAMPLERCUBE }, pos: { type: de.VEC3 } }, attributes: { aVertexPosition: { type: de.VEC3, enableArray: !0 } }, vertexShader: `attribute vec3 aVertexPosition;
14617
+ this.renderer.handler.addProgram(new X("skybox", { uniforms: { projectionViewMatrix: { type: ue.MAT4 }, uSampler: { type: ue.SAMPLERCUBE }, pos: { type: ue.VEC3 } }, attributes: { aVertexPosition: { type: ue.VEC3, enableArray: !0 } }, vertexShader: `attribute vec3 aVertexPosition;
14608
14618
  uniform mat4 projectionViewMatrix;
14609
14619
  uniform vec3 pos;
14610
14620
  varying vec3 vTextureCoord;
@@ -14657,9 +14667,9 @@ Object.freeze(Object.defineProperty({ __proto__: null, Axes: class extends dt {
14657
14667
  this.axesBuffer = this.renderer.handler.createArrayBuffer(new Float32Array(e), 3, 6), this.axesColorBuffer = this.renderer.handler.createArrayBuffer(new Float32Array([1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1]), 4, 6);
14658
14668
  }
14659
14669
  }, Planet: ja, RenderNode: dt, SkyBox: gs }, Symbol.toStringTag, { value: "Module" }));
14660
- const Ya = class Wa {
14670
+ const Ya = class qa {
14661
14671
  constructor(e = {}) {
14662
- this.__id = Wa.__counter__++, this.equalizeVertices = e.equalizeVertices || !1, this.equalizeNormals = !1, this.isEmpty = !0, this.name = e.name || "empty", this.minZoom = e.minZoom || 2, this.maxZoom = e.maxZoom || 19, this.maxNativeZoom = e.maxNativeZoom || this.maxZoom, this.gridSizeByZoom = e.gridSizeByZoom || [64, 32, 16, 8, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], this._maxNodeZoom = this.gridSizeByZoom.length - 1, this.plainGridSize = 2, this.noDataValues = [], this._planet = null, this._geoid = e.geoid || new Ha({ src: e.geoidSrc || null }), this._isReady = !1;
14672
+ this.__id = qa.__counter__++, this.equalizeVertices = e.equalizeVertices || !1, this.equalizeNormals = !1, this.isEmpty = !0, this.name = e.name || "empty", this.minZoom = e.minZoom || 2, this.maxZoom = e.maxZoom || 19, this.maxNativeZoom = e.maxNativeZoom || this.maxZoom, this.gridSizeByZoom = e.gridSizeByZoom || [64, 32, 16, 8, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], this._maxNodeZoom = this.gridSizeByZoom.length - 1, this.plainGridSize = 2, this.noDataValues = [], this._planet = null, this._geoid = e.geoid || new Ha({ src: e.geoidSrc || null }), this._isReady = !1;
14663
14673
  }
14664
14674
  setUrlRewriteCallback(e) {
14665
14675
  }
@@ -14710,7 +14720,7 @@ Ya.__counter__ = 0;
14710
14720
  let ps = Ya;
14711
14721
  class ms extends ps {
14712
14722
  constructor(e = "", t = {}) {
14713
- super({ geoidSrc: "https://openglobus.org/geoid/egm84-30.pgm", maxNativeZoom: t.maxNativeZoom || 14, ...t }), this._s = t.subdomains || ["a", "b", "c"], this.events = ge(Gc, this), this._requestCount = 0, this._requestsPeerSubdomain = 4, this.isEmpty = !1, this.equalizeNormals = !0, this.name = e || "openglobus", this.url = t.url || "https://{s}.srtm3.openglobus.org/{z}/{y}/{x}.ddm", this.gridSizeByZoom = t.gridSizeByZoom || [64, 32, 32, 16, 16, 8, 8, 8, 16, 16, 16, 32, 32, 32, 32, 16, 8, 4, 2, 2, 2, 2, 2, 2], this._heightFactor = t.heightFactor != null ? t.heightFactor : 1, this.noDataValues = t.noDataValues || [];
14723
+ super({ geoidSrc: "https://openglobus.org/geoid/egm84-30.pgm", maxNativeZoom: t.maxNativeZoom || 14, ...t }), this._s = t.subdomains || ["a", "b", "c"], this.events = de(Yc, this), this._requestCount = 0, this._requestsPeerSubdomain = 4, this.isEmpty = !1, this.equalizeNormals = !0, this.name = e || "openglobus", this.url = t.url || "https://{s}.srtm3.openglobus.org/{z}/{y}/{x}.ddm", this.gridSizeByZoom = t.gridSizeByZoom || [64, 32, 32, 16, 16, 8, 8, 8, 16, 16, 16, 32, 32, 32, 32, 16, 8, 4, 2, 2, 2, 2, 2, 2], this._heightFactor = t.heightFactor != null ? t.heightFactor : 1, this.noDataValues = t.noDataValues || [];
14714
14724
  for (let i = 0; i < this.noDataValues.length; i++) this.noDataValues[i] *= this._heightFactor;
14715
14725
  this.plainGridSize = t.plainGridSize || 32, this._extent = Xr(t.extent, new G(new A(-180, -90), new A(180, 90))), this._dataType = "arrayBuffer", this._maxNodeZoom = this.gridSizeByZoom.length - 1, this._elevationCache = {}, this._fetchCache = {}, this._cache = t.cache || "default", this._loader = new Va(), this._urlRewriteCallback = t.urlRewrite || null;
14716
14726
  }
@@ -14733,7 +14743,7 @@ class ms extends ps {
14733
14743
  return this._elevationCache[e];
14734
14744
  }
14735
14745
  getHeightAsync(e, t, i, r) {
14736
- if (!e || e.lat > ue || e.lat < Ve) return t(0), !0;
14746
+ if (!e || e.lat > _e || e.lat < Ve) return t(0), !0;
14737
14747
  r = r == null || r;
14738
14748
  const [s, n, o, l] = this._planet.quadTreeStrategy.getTileXY(e, i || this.maxZoom);
14739
14749
  let h = $e.getTileIndex(s, n, o, l), c = this.getElevationCache(h), d = $i(e);
@@ -14741,7 +14751,7 @@ class ms extends ps {
14741
14751
  {
14742
14752
  let u = this._fetchCache[h];
14743
14753
  u || (u = this._loader.fetch({ src: this._urlRewriteCallback && this._urlRewriteCallback(s, n, o, l) || this.buildURL(s, n, o, l), type: this._dataType, options: { cache: this._cache } }), this._fetchCache[h] = u), u.then((g) => {
14744
- let f = qt(s, n, o);
14754
+ let f = Wt(s, n, o);
14745
14755
  if (g.status === "ready") {
14746
14756
  let p = { heights: this._createHeights(g.data, null, l, s, n, o, f), extent: f };
14747
14757
  this.setElevationCache(h, p), t(this._getGroundHeightMerc(d, p));
@@ -14812,10 +14822,10 @@ class ms extends ps {
14812
14822
  }
14813
14823
  }
14814
14824
  }
14815
- const Gc = ["load", "loadend"];
14825
+ const Yc = ["load", "loadend"];
14816
14826
  class Pi extends $e {
14817
14827
  constructor(e, t = {}) {
14818
- super(e, t), this.events = this.events.registerNames(jc), this.url = t.url || "", this._s = t.subdomains || ["a", "b", "c"], this.minNativeZoom = t.minNativeZoom || 0, this.maxNativeZoom = t.maxNativeZoom || 19, this._urlRewriteCallback = t.urlRewrite || null, this._requestsPeerSubdomains = 4, this._requestCount = 0, this._cache = t.cache || "default";
14828
+ super(e, t), this.events = this.events.registerNames(qc), this.url = t.url || "", this._s = t.subdomains || ["a", "b", "c"], this.minNativeZoom = t.minNativeZoom || 0, this.maxNativeZoom = t.maxNativeZoom || 19, this._urlRewriteCallback = t.urlRewrite || null, this._requestsPeerSubdomains = 4, this._requestCount = 0, this._cache = t.cache || "default";
14819
14829
  }
14820
14830
  get isIdle() {
14821
14831
  return super.isIdle && this._planet._tileLoader.getRequestCounter(this) === 0;
@@ -14897,7 +14907,7 @@ class Pi extends $e {
14897
14907
  e.northEast.lat === 90 && (t.northEast.lat = 2008750834e-2), e.northEast.lon === 180 && (t.northEast.lon = 2008750834e-2), e.southWest.lat === -90 && (t.southWest.lat = -2008750834e-2), e.southWest.lon === -180 && (t.southWest.lon = -2008750834e-2);
14898
14908
  }
14899
14909
  }
14900
- const jc = ["load", "loadend"];
14910
+ const qc = ["load", "loadend"];
14901
14911
  class pt extends Pi {
14902
14912
  constructor(e, t) {
14903
14913
  super(e, t), this._extra = new URLSearchParams(t.extra).toString(), t.extent || this.setExtent(new G(new A(-180, -90), new A(180, 90))), this.layers = t.layers, this.imageWidth = t.imageWidth || 256, this.imageHeight = t.imageHeight || 256, this._getBbox = pt.get_bbox_v1_1_1, this._version = "", this.setVersion(t.version);
@@ -14930,7 +14940,7 @@ class pt extends Pi {
14930
14940
  }
14931
14941
  class Gt extends ms {
14932
14942
  constructor(e = {}) {
14933
- super("BilTerrain", e), this.equalizeVertices = !0, this.equalizeNormals = !0, this.minZoom = e.minZoom || 2, this.maxZoom = e.maxZoom || 14, this.noDataValues = e.noDataValues || [-9999, 32767], this.url = e.url || "", this._format = "application/bil16", this._layers = e.layers || "", this._imageSize = e.imageSize || 256, this.plainGridSize = e.plainGridSize != null ? e.plainGridSize : Wi(this._imageSize) ? this._imageSize / 2 : Yt(this._imageSize) / 2, this._dataType = "arrayBuffer";
14943
+ super("BilTerrain", e), this.equalizeVertices = !0, this.equalizeNormals = !0, this.minZoom = e.minZoom || 2, this.maxZoom = e.maxZoom || 14, this.noDataValues = e.noDataValues || [-9999, 32767], this.url = e.url || "", this._format = "application/bil16", this._layers = e.layers || "", this._imageSize = e.imageSize || 256, this.plainGridSize = e.plainGridSize != null ? e.plainGridSize : qi(this._imageSize) ? this._imageSize / 2 : Yt(this._imageSize) / 2, this._dataType = "arrayBuffer";
14934
14944
  }
14935
14945
  isBlur(e) {
14936
14946
  return e.tileZoom >= 18;
@@ -14940,7 +14950,7 @@ class Gt extends ms {
14940
14950
  }
14941
14951
  _createHeights(e, t, i, r, s, n, o, l) {
14942
14952
  let h = new Int16Array(e);
14943
- if (!Wi(this._imageSize)) {
14953
+ if (!qi(this._imageSize)) {
14944
14954
  let p = new Float32Array(h.length);
14945
14955
  return function(_, m) {
14946
14956
  for (let y = 0, x = m.length; y < x; y++) m[y] = _[y];
@@ -14977,8 +14987,8 @@ class Gt extends ms {
14977
14987
  y[H][M + 1][Xt] = ze;
14978
14988
  let Zt = x;
14979
14989
  y[H + 1][M][Zt] = ze;
14980
- let Kt = 0;
14981
- y[H + 1][M + 1][Kt] = ze;
14990
+ let Qt = 0;
14991
+ y[H + 1][M + 1][Qt] = ze;
14982
14992
  }
14983
14993
  }
14984
14994
  })(h, this.noDataValues, u, d);
@@ -14987,7 +14997,7 @@ class Gt extends ms {
14987
14997
  let f = this._imageSize / this.plainGridSize;
14988
14998
  for (let p = 0; p < f; p++) for (let _ = 0; _ < f; _++) {
14989
14999
  let m = 2 * r + _, y = 2 * s + p, x = n + 1, w = $e.getTileIndex(m, y, x, i);
14990
- this.setElevationCache(w, { heights: d[p][_], extent: qt(m, y, x) });
15000
+ this.setElevationCache(w, { heights: d[p][_], extent: Wt(m, y, x) });
14991
15001
  }
14992
15002
  return u;
14993
15003
  }
@@ -15019,7 +15029,7 @@ class Be extends ms {
15019
15029
  for (; b && !b.segment.terrainExists; ) b = b.parentNode;
15020
15030
  b && (d = b.segment.tileX, u = b.segment.tileY, g = b.segment.tileZoom, f = b.segment.elevationData, p = g <= 8);
15021
15031
  }
15022
- if (!Wi(this._imageSize) && c === this._imageSize) {
15032
+ if (!qi(this._imageSize) && c === this._imageSize) {
15023
15033
  let b = new Float32Array(c * c);
15024
15034
  return this.extractElevationTilesRgbNonPowerOfTwo(h, b, this._heightFactor), b;
15025
15035
  }
@@ -15037,7 +15047,7 @@ class Be extends ms {
15037
15047
  this.extractElevationTilesRgb(h, this._heightFactor, this.noDataValues, f, d, u, g, t ? t.tileX : 0, t ? t.tileY : 0, t ? t.tileZoom : 0, p, y, x);
15038
15048
  for (let b = 0; b < m; b++) for (let E = 0; E < m; E++) {
15039
15049
  let [C, T, L] = [2 * r + E, 2 * s + b, n + 1], S = $e.getTileIndex(C, T, L, i);
15040
- this.setElevationCache(S, { heights: x[b][E], extent: qt(C, T, L) });
15050
+ this.setElevationCache(S, { heights: x[b][E], extent: Wt(C, T, L) });
15041
15051
  }
15042
15052
  }
15043
15053
  let w = $e.getTileIndex(r, s, n, i);
@@ -15116,8 +15126,8 @@ class Be extends ms {
15116
15126
  g[H][M + 1][Xt] = ze;
15117
15127
  let Zt = f;
15118
15128
  g[H + 1][M][Zt] = ze;
15119
- let Kt = 0;
15120
- g[H + 1][M + 1][Kt] = ze;
15129
+ let Qt = 0;
15130
+ g[H + 1][M + 1][Qt] = ze;
15121
15131
  }
15122
15132
  }
15123
15133
  }
@@ -15154,20 +15164,20 @@ function Xe(a, e, t, i, r, s, n) {
15154
15164
  let o = Math.sqrt(i.length), l = i[Math.floor(t * a * o + r * a) * o + Math.floor(e * a * o + s * a)];
15155
15165
  return n && l > 0 ? 0 : l;
15156
15166
  }
15157
- const Yc = { [Lc]: "north", [Pt]: "south" }, Wc = (a, e, t, i) => {
15158
- let r = Yc[i];
15167
+ const Wc = { [Sc]: "north", [Pt]: "south" }, $c = (a, e, t, i) => {
15168
+ let r = Wc[i];
15159
15169
  if (r) return `https://terrain.openglobus.org/poles/${r}/${t}/${a}/${e}.png`;
15160
15170
  };
15161
- class qa extends Be {
15171
+ class Wa extends Be {
15162
15172
  constructor(e, t) {
15163
- super(e || "GlobusEarthRgb", { maxNativeZoom: 6, maxZoom: 17, url: "https://{s}.terrain.openglobus.org/all/{z}/{x}/{y}.png", urlRewrite: Wc, ...t });
15173
+ super(e || "GlobusEarthRgb", { maxNativeZoom: 6, maxZoom: 17, url: "https://{s}.terrain.openglobus.org/all/{z}/{x}/{y}.png", urlRewrite: $c, ...t });
15164
15174
  }
15165
15175
  isReadyToLoad(e) {
15166
15176
  return this._extent.overlaps(e.getExtentLonLat());
15167
15177
  }
15168
15178
  }
15169
- Object.freeze(Object.defineProperty({ __proto__: null, BilTerrain: Gt, EmptyTerrain: ps, GlobusRgbTerrain: qa, GlobusTerrain: ms, RgbTerrain: Be }, Symbol.toStringTag, { value: "Module" }));
15170
- class qc extends Ti {
15179
+ Object.freeze(Object.defineProperty({ __proto__: null, BilTerrain: Gt, EmptyTerrain: ps, GlobusRgbTerrain: Wa, GlobusTerrain: ms, RgbTerrain: Be }, Symbol.toStringTag, { value: "Module" }));
15180
+ class Xc extends Ti {
15171
15181
  constructor(e, t = {}) {
15172
15182
  super(e, t), this._sourceTexture = t.texture || null, t.texture && (this._sourceReady = !0, this._sourceCreated = !0), this._frameWidth = t.frameWidth != null ? Yt(t.frameWidth) : 256, this._frameHeight = t.frameHeight != null ? Yt(t.frameHeight) : 256, this._animate = !0;
15173
15183
  }
@@ -15253,7 +15263,7 @@ class $a extends Ti {
15253
15263
  this._video && (this._video.src = ""), this._creationProceeding = !1, e.isLoading = !1, e.isReady = !1;
15254
15264
  }
15255
15265
  }
15256
- class $c extends fe {
15266
+ class Zc extends ge {
15257
15267
  constructor(e, t = {}) {
15258
15268
  super(e, t), this._billboard = t.billboard || { src: "https://openglobus.org/examples/billboards/carrot.png" }, this._color = t.color || "#6689db";
15259
15269
  }
@@ -15379,7 +15389,7 @@ class Xa extends Pi {
15379
15389
  super(e || "OpenStreetMap", { iconSrc: "https://tile.openstreetmap.org/8/138/95.png", url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", attribution: "Data @ OpenStreetMap contributors, ODbL", isBaseLayer: !0, maxNativeZoom: 19, defaultTextures: [{ color: "#AAD3DF" }, { color: "#F2EFE9" }], isSRGB: !1, shininess: 18, specular: [63e-5, 55e-5, 32e-5], ambient: [0.2, 0.2, 0.3], diffuse: [0.9, 0.9, 0.7], ...t });
15380
15390
  }
15381
15391
  }
15382
- function Xc(a, e, t) {
15392
+ function Qc(a, e, t) {
15383
15393
  var i = "";
15384
15394
  for (let n = t; n > 0; n--) {
15385
15395
  var r = 0, s = 1 << n - 1;
@@ -15389,14 +15399,14 @@ function Xc(a, e, t) {
15389
15399
  }
15390
15400
  class Za extends Pi {
15391
15401
  constructor(e, t = {}) {
15392
- super(e || "Bing", { iconSrc: "https://ecn.t0.tiles.virtualearth.net/tiles/a120.jpeg?n=z&g=7146", subdomains: ["t0", "t1", "t2", "t3"], url: "https://ecn.{s}.tiles.virtualearth.net/tiles/a{quad}.jpeg?n=z&g=7146", isBaseLayer: !0, textureFilter: "LINEAR", maxNativeZoom: 17, defaultTextures: [{ color: "#001522" }, { color: "#E4E6F3" }], attribution: '<div style="transform: scale(0.8); margin-top:-2px;"><a href="https://www.bing.com" target="_blank"><img style="position: relative; top: 2px;" title="Bing Imagery" src="https://sandcastle.cesium.com/CesiumUnminified/Assets/Images/bing_maps_credit.png"></a> © 2021 Microsoft Corporation</div>', urlRewrite: (i, r) => Ge(r, { s: this._getSubdomain(), quad: Xc(i.tileX, i.tileY, i.tileZoom) }), specular: [63e-5, 55e-5, 32e-5], ambient: [0.35, 0.35, 0.35], diffuse: [1.5, 1.5, 1.5], shininess: 20, nightTextureCoefficient: 2.7, ...t });
15402
+ super(e || "Bing", { iconSrc: "https://ecn.t0.tiles.virtualearth.net/tiles/a120.jpeg?n=z&g=7146", subdomains: ["t0", "t1", "t2", "t3"], url: "https://ecn.{s}.tiles.virtualearth.net/tiles/a{quad}.jpeg?n=z&g=7146", isBaseLayer: !0, textureFilter: "LINEAR", maxNativeZoom: 17, defaultTextures: [{ color: "#001522" }, { color: "#E4E6F3" }], attribution: '<div style="transform: scale(0.8); margin-top:-2px;"><a href="https://www.bing.com" target="_blank"><img style="position: relative; top: 2px;" title="Bing Imagery" src="https://sandcastle.cesium.com/CesiumUnminified/Assets/Images/bing_maps_credit.png"></a> © 2021 Microsoft Corporation</div>', urlRewrite: (i, r) => Ge(r, { s: this._getSubdomain(), quad: Qc(i.tileX, i.tileY, i.tileZoom) }), specular: [63e-5, 55e-5, 32e-5], ambient: [0.35, 0.35, 0.35], diffuse: [1.5, 1.5, 1.5], shininess: 20, nightTextureCoefficient: 2.7, ...t });
15393
15403
  }
15394
15404
  }
15395
- Object.freeze(Object.defineProperty({ __proto__: null, Bing: Za, CanvasTiles: oo, GeoImage: ds, GeoTexture2d: qc, GeoVideo: $a, KML: $c, LAYER_EVENTS: no, Layer: $e, Material: io, OpenStreetMap: Xa, Vector: fe, WMS: pt, XYZ: Pi }, Symbol.toStringTag, { value: "Module" }));
15405
+ Object.freeze(Object.defineProperty({ __proto__: null, Bing: Za, CanvasTiles: oo, GeoImage: ds, GeoTexture2d: Xc, GeoVideo: $a, KML: Zc, LAYER_EVENTS: no, Layer: $e, Material: io, OpenStreetMap: Xa, Vector: ge, WMS: pt, XYZ: Pi }, Symbol.toStringTag, { value: "Module" }));
15396
15406
  const br = function(a, e) {
15397
15407
  return +(a.priority < e.priority);
15398
15408
  };
15399
- class Zc {
15409
+ class Kc {
15400
15410
  constructor() {
15401
15411
  this._currentlyPressedKeys = {}, this._pressedKeysCallbacks = {}, this._unpressedKeysCallbacks = {}, this._charkeysCallbacks = {}, this._anykeyCallback = null, this._event = null, this._active = !0, this._stampCache = {}, document.onkeydown = (e) => {
15402
15412
  this._event = e, this._active && this.handleKeyDown();
@@ -15427,7 +15437,7 @@ class Zc {
15427
15437
  return `${e}_${t}_${i}`;
15428
15438
  }
15429
15439
  _stamp(e, t, i) {
15430
- const r = qr(i), s = this._getStamp(e, t, r);
15440
+ const r = Wr(i), s = this._getStamp(e, t, r);
15431
15441
  return !this._stampCache[s] && (this._stampCache[s] = r, !0);
15432
15442
  }
15433
15443
  setActivity(e) {
@@ -15457,11 +15467,11 @@ class Zc {
15457
15467
  let t = this._charkeysCallbacks[e];
15458
15468
  for (let i = 0; i < t.length; i++) t[i].callback.call(t[i].sender, this._event);
15459
15469
  }
15460
- this._event.keyCode != q.KEY_ALT && this._event.keyCode != q.KEY_SHIFT || this._event.preventDefault();
15470
+ this._event.keyCode != W.KEY_ALT && this._event.keyCode != W.KEY_SHIFT || this._event.preventDefault();
15461
15471
  }
15462
15472
  handleKeyUp() {
15463
- if (this._currentlyPressedKeys[this._event.keyCode] || this._event.keyCode === q.KEY_PRINTSCREEN) {
15464
- for (let e in this._unpressedKeysCallbacks) if (this._currentlyPressedKeys[e] || this._event.keyCode === q.KEY_PRINTSCREEN && Number(e) === q.KEY_PRINTSCREEN) {
15473
+ if (this._currentlyPressedKeys[this._event.keyCode] || this._event.keyCode === W.KEY_PRINTSCREEN) {
15474
+ for (let e in this._unpressedKeysCallbacks) if (this._currentlyPressedKeys[e] || this._event.keyCode === W.KEY_PRINTSCREEN && Number(e) === W.KEY_PRINTSCREEN) {
15465
15475
  let t = this._unpressedKeysCallbacks[e];
15466
15476
  for (let i = 0; i < t.length; i++) t[i].callback.call(t[i].sender, this._event);
15467
15477
  }
@@ -15475,7 +15485,7 @@ class Zc {
15475
15485
  }
15476
15486
  }
15477
15487
  }
15478
- class Kc {
15488
+ class Jc {
15479
15489
  constructor(e) {
15480
15490
  this._htmlObject = e;
15481
15491
  }
@@ -15530,7 +15540,7 @@ class Kc {
15530
15540
  }
15531
15541
  }
15532
15542
  }
15533
- class Qc {
15543
+ class ed {
15534
15544
  constructor(e) {
15535
15545
  this._htmlObject = e;
15536
15546
  }
@@ -15567,9 +15577,9 @@ class Qc {
15567
15577
  }
15568
15578
  }
15569
15579
  let ft = new Uint8Array(4), ti = new Uint8Array(4), ii = new Uint8Array(4);
15570
- class Jc extends is {
15580
+ class td extends is {
15571
15581
  constructor(e) {
15572
- super(ed), this.renderer = e, this._touchHandler = new Qc(e.handler.canvas), this._mouseHandler = new Kc(e.handler.canvas), this._keyboardHandler = new Zc(), this._active = !0, this.clickRadius = 15, this.mouseState = { clientX: 0, clientY: 0, pos: new N(), x: 0, y: 0, nx: 0, ny: 0, prev_x: 0, prev_y: 0, direction: new v(), leftButtonUp: !1, rightButtonUp: !1, middleButtonUp: !1, leftButtonDown: !1, rightButtonDown: !1, middleButtonDown: !1, leftButtonHold: !1, rightButtonHold: !1, middleButtonHold: !1, leftButtonDoubleClick: !1, rightButtonDoubleClick: !1, middleButtonDoubleClick: !1, leftButtonClick: !1, rightButtonClick: !1, middleButtonClick: !1, moving: !1, justStopped: !1, doubleClickDelay: 500, clickDelay: 200, wheelDelta: 0, sys: null, pickingObject: null, renderer: e, isTouchPad: !1 }, this.touchState = { touching: !1, moving: !1, touchEnd: !1, touchStart: !1, touchCancel: !1, doubleTouch: !1, doubleTouchDelay: 550, doubleTouchRadius: 10, clientX: 0, clientY: 0, pos: new N(), x: 0, y: 0, nx: 0, ny: 0, prev_x: 0, prev_y: 0, direction: new v(), sys: null, pickingObject: null, renderer: e }, this._isMouseInside = !0, this._entityPickingEventsActive = !0, this._dblTchCoords = new N(), this._oneTouchStart = !1, this._dblTchBegins = 0, this._mousestopThread = null, this._ldblClkBegins = 0, this._rdblClkBegins = 0, this._mdblClkBegins = 0, this._lClkBegins = 0, this._rClkBegins = 0, this._mClkBegins = 0, this._lclickX = 0, this._lclickY = 0, this._rclickX = 0, this._rclickY = 0, this._mclickX = 0, this._mclickY = 0;
15582
+ super(id), this.renderer = e, this._touchHandler = new ed(e.handler.canvas), this._mouseHandler = new Jc(e.handler.canvas), this._keyboardHandler = new Kc(), this._active = !0, this.clickRadius = 15, this.mouseState = { clientX: 0, clientY: 0, pos: new N(), x: 0, y: 0, nx: 0, ny: 0, prev_x: 0, prev_y: 0, direction: new v(), leftButtonUp: !1, rightButtonUp: !1, middleButtonUp: !1, leftButtonDown: !1, rightButtonDown: !1, middleButtonDown: !1, leftButtonHold: !1, rightButtonHold: !1, middleButtonHold: !1, leftButtonDoubleClick: !1, rightButtonDoubleClick: !1, middleButtonDoubleClick: !1, leftButtonClick: !1, rightButtonClick: !1, middleButtonClick: !1, moving: !1, justStopped: !1, doubleClickDelay: 500, clickDelay: 200, wheelDelta: 0, sys: null, pickingObject: null, renderer: e, isTouchPad: !1 }, this.touchState = { touching: !1, moving: !1, touchEnd: !1, touchStart: !1, touchCancel: !1, doubleTouch: !1, doubleTouchDelay: 550, doubleTouchRadius: 10, clientX: 0, clientY: 0, pos: new N(), x: 0, y: 0, nx: 0, ny: 0, prev_x: 0, prev_y: 0, direction: new v(), sys: null, pickingObject: null, renderer: e }, this._isMouseInside = !0, this._entityPickingEventsActive = !0, this._dblTchCoords = new N(), this._oneTouchStart = !1, this._dblTchBegins = 0, this._mousestopThread = null, this._ldblClkBegins = 0, this._rdblClkBegins = 0, this._mdblClkBegins = 0, this._lClkBegins = 0, this._rClkBegins = 0, this._mClkBegins = 0, this._lclickX = 0, this._lclickY = 0, this._rclickX = 0, this._rclickY = 0, this._mclickX = 0, this._mclickY = 0;
15573
15583
  }
15574
15584
  pointerEvent() {
15575
15585
  let e = this.mouseState, t = this.touchState;
@@ -15624,13 +15634,13 @@ class Jc extends is {
15624
15634
  this._isMouseInside = !0, this.mouseState.sys = e, this.dispatch(this.mouseenter, this.mouseState);
15625
15635
  }
15626
15636
  onMouseDown(e, t) {
15627
- t.button === q.MB_LEFT ? (this._lClkBegins = window.performance.now(), this._lclickX = t.clientX, this._lclickY = t.clientY, this.mouseState.sys = e, this.mouseState.leftButtonDown = !0) : t.button === q.MB_RIGHT ? (this._rClkBegins = window.performance.now(), this._rclickX = t.clientX, this._rclickY = t.clientY, this.mouseState.sys = e, this.mouseState.rightButtonDown = !0) : t.button === q.MB_MIDDLE && (this._mClkBegins = window.performance.now(), this._mclickX = t.clientX, this._mclickY = t.clientY, this.mouseState.sys = e, this.mouseState.middleButtonDown = !0);
15637
+ t.button === W.MB_LEFT ? (this._lClkBegins = window.performance.now(), this._lclickX = t.clientX, this._lclickY = t.clientY, this.mouseState.sys = e, this.mouseState.leftButtonDown = !0) : t.button === W.MB_RIGHT ? (this._rClkBegins = window.performance.now(), this._rclickX = t.clientX, this._rclickY = t.clientY, this.mouseState.sys = e, this.mouseState.rightButtonDown = !0) : t.button === W.MB_MIDDLE && (this._mClkBegins = window.performance.now(), this._mclickX = t.clientX, this._mclickY = t.clientY, this.mouseState.sys = e, this.mouseState.middleButtonDown = !0);
15628
15638
  }
15629
15639
  onMouseUp(e, t) {
15630
15640
  let i = this.mouseState;
15631
15641
  i.sys = e;
15632
15642
  let r = window.performance.now();
15633
- t.button === q.MB_LEFT ? (i.leftButtonDown = !1, i.leftButtonUp = !0, Math.abs(this._lclickX - t.clientX) < this.clickRadius && Math.abs(this._lclickY - t.clientY) < this.clickRadius && r - this._lClkBegins <= i.clickDelay && (this._ldblClkBegins ? (window.performance.now() - this._ldblClkBegins <= i.doubleClickDelay && (i.leftButtonDoubleClick = !0), this._ldblClkBegins = 0) : this._ldblClkBegins = window.performance.now(), i.leftButtonClick = !0, this._lClkBegins = 0)) : t.button === q.MB_RIGHT ? (i.rightButtonDown = !1, i.rightButtonUp = !0, Math.abs(this._rclickX - t.clientX) < this.clickRadius && Math.abs(this._rclickY - t.clientY) < this.clickRadius && r - this._rClkBegins <= i.clickDelay && (this._rdblClkBegins ? (window.performance.now() - this._rdblClkBegins <= i.doubleClickDelay && (i.rightButtonDoubleClick = !0), this._rdblClkBegins = 0) : this._rdblClkBegins = window.performance.now(), i.rightButtonClick = !0, this._rClkBegins = 0)) : t.button === q.MB_MIDDLE && (i.middleButtonDown = !1, i.middleButtonUp = !0, Math.abs(this._mclickX - t.clientX) < this.clickRadius && Math.abs(this._mclickY - t.clientY) < this.clickRadius && r - this._mClkBegins <= i.clickDelay) && (this._mdblClkBegins ? (window.performance.now() - this._mdblClkBegins <= i.doubleClickDelay && (i.middleButtonDoubleClick = !0), this._mdblClkBegins = 0) : this._mdblClkBegins = window.performance.now(), i.middleButtonClick = !0, this._mClkBegins = 0);
15643
+ t.button === W.MB_LEFT ? (i.leftButtonDown = !1, i.leftButtonUp = !0, Math.abs(this._lclickX - t.clientX) < this.clickRadius && Math.abs(this._lclickY - t.clientY) < this.clickRadius && r - this._lClkBegins <= i.clickDelay && (this._ldblClkBegins ? (window.performance.now() - this._ldblClkBegins <= i.doubleClickDelay && (i.leftButtonDoubleClick = !0), this._ldblClkBegins = 0) : this._ldblClkBegins = window.performance.now(), i.leftButtonClick = !0, this._lClkBegins = 0)) : t.button === W.MB_RIGHT ? (i.rightButtonDown = !1, i.rightButtonUp = !0, Math.abs(this._rclickX - t.clientX) < this.clickRadius && Math.abs(this._rclickY - t.clientY) < this.clickRadius && r - this._rClkBegins <= i.clickDelay && (this._rdblClkBegins ? (window.performance.now() - this._rdblClkBegins <= i.doubleClickDelay && (i.rightButtonDoubleClick = !0), this._rdblClkBegins = 0) : this._rdblClkBegins = window.performance.now(), i.rightButtonClick = !0, this._rClkBegins = 0)) : t.button === W.MB_MIDDLE && (i.middleButtonDown = !1, i.middleButtonUp = !0, Math.abs(this._mclickX - t.clientX) < this.clickRadius && Math.abs(this._mclickY - t.clientY) < this.clickRadius && r - this._mClkBegins <= i.clickDelay) && (this._mdblClkBegins ? (window.performance.now() - this._mdblClkBegins <= i.doubleClickDelay && (i.middleButtonDoubleClick = !0), this._mdblClkBegins = 0) : this._mdblClkBegins = window.performance.now(), i.middleButtonClick = !0, this._mClkBegins = 0);
15634
15644
  }
15635
15645
  onTouchStart(e) {
15636
15646
  let t = this.touchState;
@@ -15705,7 +15715,7 @@ class Jc extends is {
15705
15715
  t.doubleTouch && (i && (r = i.rendererEvents, r && r.dispatch(r.doubletouch, t)), this.dispatch(e.doubletouch, t), t.doubleTouch = !1), t.touchEnd && (i && (r = i.rendererEvents, r && r.dispatch(r.touchend, t)), this.dispatch(e.touchend, t), t.x = 0, t.y = 0, t.touchEnd = !1, t.touching = !1), t.moving && (i && (r = i.rendererEvents, r && r.dispatch(r.touchmove, t)), this.dispatch(e.touchmove, t), t.prev_x = t.x, t.prev_y = t.y);
15706
15716
  }
15707
15717
  }
15708
- const ed = ["changerelativecenter", "draw", "drawtransparent", "postdraw", "resize", "resizeend", "mouseenter", "mouseleave", "mousemove", "mousestop", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchstart", "touchend", "touchcancel", "touchmove", "doubletouch", "touchleave", "touchenter"];
15718
+ const id = ["changerelativecenter", "draw", "drawtransparent", "postdraw", "resize", "resizeend", "mouseenter", "mouseleave", "mousemove", "mousestop", "lclick", "rclick", "mclick", "ldblclick", "rdblclick", "mdblclick", "lup", "rup", "mup", "ldown", "rdown", "mdown", "lhold", "rhold", "mhold", "mousewheel", "touchstart", "touchend", "touchcancel", "touchmove", "doubletouch", "touchleave", "touchenter"];
15709
15719
  class Si {
15710
15720
  constructor(e = 0, t = 0, i = 0, r = 0) {
15711
15721
  this.left = e, this.right = i, this.top = t, this.bottom = r;
@@ -15736,7 +15746,7 @@ class Si {
15736
15746
  return e >= this.left && e <= this.right && t >= this.top && t <= this.bottom;
15737
15747
  }
15738
15748
  }
15739
- class td {
15749
+ class rd {
15740
15750
  constructor() {
15741
15751
  this.imagesCache = {}, this._counter = 0, this._pendingsQueue = new fs(), this._imageIndexCounter = 0;
15742
15752
  }
@@ -15772,7 +15782,7 @@ class td {
15772
15782
  }
15773
15783
  class Gr {
15774
15784
  constructor(e = 1024, t = 1024) {
15775
- this.nodes = /* @__PURE__ */ new Map(), this.texture = null, this.canvas = new mi(e, t), this.clearCanvas(), this._handler = null, this._images = [], this._btree = null, this._imagesCacheManager = new td(), this.borderSize = 4;
15785
+ this.nodes = /* @__PURE__ */ new Map(), this.texture = null, this.canvas = new mi(e, t), this.clearCanvas(), this._handler = null, this._images = [], this._btree = null, this._imagesCacheManager = new rd(), this.borderSize = 4;
15776
15786
  }
15777
15787
  getImage() {
15778
15788
  return this.canvas.getImage();
@@ -15856,12 +15866,12 @@ class mn extends Gr {
15856
15866
  return this.nodes.get(e);
15857
15867
  }
15858
15868
  }
15859
- class id extends Ai {
15869
+ class sd extends Ai {
15860
15870
  constructor(e, t) {
15861
15871
  super(e, t), this.emptySize = 1, this.metrics = { id: 0, char: "", width: 0, height: 0, x: 0, y: 0, chnl: 0, index: 0, page: 0, xadvance: 0, xoffset: 0, yoffset: 0, nChar: "", nCode: 0, nWidth: 0, nHeight: 0, nAdvance: 0, nXOffset: 0, nYOffset: 0 };
15862
15872
  }
15863
15873
  }
15864
- class rd {
15874
+ class nd {
15865
15875
  constructor(e) {
15866
15876
  this.atlasesArr = [], this.atlasIndexes = {}, this.atlasIndexesDeferred = {}, this.tokenImageSize = 64, this.samplerArr = new Uint32Array(11), this.sdfParamsArr = new Float32Array(44), this._handler = null, this.catalogSrc = e || "./";
15867
15877
  }
@@ -15886,7 +15896,7 @@ class rd {
15886
15896
  l[c.id] = d;
15887
15897
  let u = new Si(c.x, c.y, c.x + c.width, c.y + c.height), g = new Array(12);
15888
15898
  g[0] = u.left / s, g[1] = u.top / n, g[2] = u.left / s, g[3] = u.bottom / n, g[4] = u.right / s, g[5] = u.bottom / n, g[6] = u.right / s, g[7] = u.bottom / n, g[8] = u.right / s, g[9] = u.top / n, g[10] = u.left / s, g[11] = u.top / n;
15889
- let f = new id(u, g), p = c.char.normalize("NFKC"), _ = p.charCodeAt(0), m = f.metrics;
15899
+ let f = new sd(u, g), p = c.char.normalize("NFKC"), _ = p.charCodeAt(0), m = f.metrics;
15890
15900
  m.id = c.id, m.char = c.char, m.width = c.width, m.height = c.height, m.x = c.x, m.y = c.y, m.chnl = c.chnl, m.index = c.index, m.page = c.page, m.xadvance = c.xadvance, m.xoffset = c.xoffset, m.yoffset = c.yoffset, m.nChar = p, m.nCode = _, m.nWidth = f.metrics.width / o, m.nHeight = f.metrics.height / o, m.nAdvance = f.metrics.xadvance / o, m.nXOffset = f.metrics.xoffset / o, m.nYOffset = 1 - f.metrics.yoffset / o, f.emptySize = 1, e.nodes.set(p.charCodeAt(0), f);
15891
15901
  }
15892
15902
  e.kernings = {};
@@ -15928,14 +15938,14 @@ class rd {
15928
15938
  }).catch((l) => (n.reject(), { status: "error", msg: l.toString() }));
15929
15939
  }
15930
15940
  }
15931
- let sd = 0, nd = 0, Ot = new Float32Array(2);
15932
- class od {
15941
+ let od = 0, ad = 0, Ot = new Float32Array(2);
15942
+ class ld {
15933
15943
  constructor(e, t = {}) {
15934
15944
  var i, r;
15935
- if (this.div = null, this.handler = e instanceof Mt ? e : new Mt(e, { pixelRatio: t.dpi || window.devicePixelRatio + 0.15, autoActivate: !0 }), this.exposure = t.exposure || 3.01, this.gamma = t.gamma || 0.47, this.whitepoint = 1, this.brightThreshold = 0.9, this._renderNodesArr = [], this.renderNodes = {}, this.activeCamera = new cs({ width: (i = this.handler.canvas) == null ? void 0 : i.width, height: (r = this.handler.canvas) == null ? void 0 : r.height, eye: new v(0, 0, 0), look: new v(0, 0, -1), up: new v(0, 1, 0) }), this.events = new Jc(this), this.controls = {}, t.controls) for (let o in t.controls) this.controls[t.controls[o].name] = t.controls[o];
15945
+ if (this.div = null, this.handler = e instanceof Mt ? e : new Mt(e, { pixelRatio: t.dpi || window.devicePixelRatio + 0.15, autoActivate: !0 }), this.exposure = t.exposure || 3.01, this.gamma = t.gamma || 0.47, this.whitepoint = 1, this.brightThreshold = 0.9, this._renderNodesArr = [], this.renderNodes = {}, this.activeCamera = new cs({ width: (i = this.handler.canvas) == null ? void 0 : i.width, height: (r = this.handler.canvas) == null ? void 0 : r.height, eye: new v(0, 0, 0), look: new v(0, 0, -1), up: new v(0, 1, 0) }), this.events = new td(this), this.controls = {}, t.controls) for (let o in t.controls) this.controls[t.controls[o].name] = t.controls[o];
15936
15946
  this.controlsBag = {}, this.colorObjects = /* @__PURE__ */ new Map(), this._pickingCallbacks = [], this.pickingFramebuffer = null, this._depthCallbacks = [], this.depthFramebuffer = null;
15937
15947
  let s = new URLSearchParams(location.search), n = s.get("og_msaa");
15938
- this._msaa = n ? Number(s.get("og_msaa")) : t.msaa != null ? t.msaa : 0, this._internalFormat = "RGBA16F", this._format = "RGBA", this._type = "FLOAT", this.sceneFramebuffer = null, this.blitFramebuffer = null, this.toneMappingFramebuffer = null, this._initialized = !1, this.billboardsTextureAtlas = new Gr(), this.geoObjectsTextureAtlas = new Gr(), this.fontAtlas = new rd(t.fontsSrc), this._entityCollections = [[]], this._currentOutput = "screen", this._fnScreenFrame = null, this.labelWorker = new Tl(4), this.screenDepthFramebuffer = null, this.screenFramePositionBuffer = null, this.screenTexture = {}, this.outputTexture = null, this._readPickingBuffer = this._readPickingBuffer_webgl2, (t.autoActivate || je(t.autoActivate)) && this.start();
15948
+ this._msaa = n ? Number(s.get("og_msaa")) : t.msaa != null ? t.msaa : 0, this._internalFormat = "RGBA16F", this._format = "RGBA", this._type = "FLOAT", this.sceneFramebuffer = null, this.blitFramebuffer = null, this.toneMappingFramebuffer = null, this._initialized = !1, this.billboardsTextureAtlas = new Gr(), this.geoObjectsTextureAtlas = new Gr(), this.fontAtlas = new nd(t.fontsSrc), this._entityCollections = [[]], this._currentOutput = "screen", this._fnScreenFrame = null, this.labelWorker = new Tl(4), this.screenDepthFramebuffer = null, this.screenFramePositionBuffer = null, this.screenTexture = {}, this.outputTexture = null, this._readPickingBuffer = this._readPickingBuffer_webgl2, (t.autoActivate || je(t.autoActivate)) && this.start();
15939
15949
  }
15940
15950
  enableBlendOneSrcAlpha() {
15941
15951
  let e = this.handler.gl;
@@ -15952,7 +15962,7 @@ class od {
15952
15962
  this.events.active = e;
15953
15963
  }
15954
15964
  addDepthCallback(e, t) {
15955
- let i = nd++;
15965
+ let i = ad++;
15956
15966
  return this._depthCallbacks.push({ id: i, callback: t, sender: e }), i;
15957
15967
  }
15958
15968
  removeDepthCallback(e) {
@@ -15962,7 +15972,7 @@ class od {
15962
15972
  }
15963
15973
  }
15964
15974
  addPickingCallback(e, t) {
15965
- let i = sd++;
15975
+ let i = od++;
15966
15976
  return this._pickingCallbacks.push({ id: i, callback: t, sender: e }), i;
15967
15977
  }
15968
15978
  removePickingCallback(e) {
@@ -16023,7 +16033,7 @@ class od {
16023
16033
  if (!this._initialized) {
16024
16034
  if (this._initialized = !0, this.handler.initialize(), this.billboardsTextureAtlas.assignHandler(this.handler), this.geoObjectsTextureAtlas.assignHandler(this.handler), this.fontAtlas.assignHandler(this.handler), this.handler.setFrameCallback(() => {
16025
16035
  this.draw();
16026
- }), this.events.initialize(), this.events.on("charkeypress", q.KEY_APOSTROPHE, function() {
16036
+ }), this.events.initialize(), this.events.on("charkeypress", W.KEY_APOSTROPHE, function() {
16027
16037
  et.setVisibility(!et.getVisibility());
16028
16038
  }), this.handler.addProgram(new X("screenFrame", { uniforms: { texture: "sampler2d" }, attributes: { corners: "vec3" }, vertexShader: `attribute vec2 corners;
16029
16039
 
@@ -16280,7 +16290,7 @@ vec3 Uncharted2ToneMapping(vec3 color){color*=exposure;return saturate(Uncharted
16280
16290
  this.div = null, this._renderNodesArr = [], this.renderNodes = {}, this.activeCamera = null, this.controls = {}, this.controlsBag = {}, this.colorObjects.clear(), this.colorObjects = null, this._pickingCallbacks = [], this.pickingFramebuffer = null, this._tempPickingPix_ = null, this._depthCallbacks = [], this.depthFramebuffer = null, this.sceneFramebuffer = null, this.blitFramebuffer = null, this.toneMappingFramebuffer = null, this._entityCollections = [[]], this.handler.ONCANVASRESIZE = null, this.handler.destroy(), this.handler = null, this._initialized = !1;
16281
16291
  }
16282
16292
  }
16283
- const vn = "/res", Ka = class Gi {
16293
+ const vn = "/res", Qa = class Gi {
16284
16294
  constructor(e) {
16285
16295
  this.$target = null, this._instanceID = `__globus${Gi.__counter__++ ? Gi.__counter__ : ""}__`, window[this._instanceID] = this, this._canvas = document.createElement("canvas"), this._canvas.id = `canvas${this._instanceID}`, this._canvas.style.width = "100%", this._canvas.style.height = "100%", this._canvas.style.display = "block", this._canvas.style.opacity = "0.0", this._canvas.style.transition = "opacity 150ms", this.$inner = document.createElement("div"), this.$inner.classList.add("og-inner"), this.$inner.appendChild(this._canvas), this.$inner.attributions = document.createElement("div"), e.attributionContainer ? e.attributionContainer.appendChild(this.$inner.attributions) : (this.$inner.attributions.classList.add("og-attribution"), this.$inner.appendChild(this.$inner.attributions)), e.target && this.attachTo(e.target);
16286
16296
  const t = (n) => {
@@ -16290,7 +16300,7 @@ const vn = "/res", Ka = class Gi {
16290
16300
  document.addEventListener("mousewheel", t, { capture: !1, passive: !1 });
16291
16301
  }, this._canvas.onmouseleave = function() {
16292
16302
  document.removeEventListener("mousewheel", t);
16293
- }, this.renderer = new od(new Mt(this._canvas, { autoActivate: !1, pixelRatio: e.dpi || window.devicePixelRatio + 0.15, context: { antialias: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !1 } }), { autoActivate: !1, msaa: e.msaa, fontsSrc: e.fontsSrc, gamma: e.gamma, exposure: e.exposure }), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : "globus_planet_" + Gi.__counter__, this.planet = new ja({ name: this._planetName, frustums: e.frustums, ellipsoid: e.ellipsoid, maxGridSize: e.maxGridSize, nightTextureSrc: e.nightTextureSrc === null ? null : e.nightTextureSrc || `${e.resourcesSrc || vn}/night.png`, specularTextureSrc: e.specularTextureSrc === null ? null : e.specularTextureSrc || `${e.resourcesSrc || vn}/spec.png`, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude || 15e6, maxEqualZoomAltitude: e.maxEqualZoomAltitude, minEqualZoomAltitude: e.minEqualZoomAltitude, minEqualZoomCameraSlope: e.minEqualZoomCameraSlope, quadTreeStrategyPrototype: e.quadTreeStrategyPrototype, maxLoadingRequests: e.maxLoadingRequests, atmosphereEnabled: e.atmosphereEnabled, transitionOpacityEnabled: e.transitionOpacityEnabled, atmosphereParameters: e.atmosphereParameters, minDistanceBeforeMemClear: e.minDistanceBeforeMemClear, vectorTileSize: e.vectorTileSize, maxNodesCount: e.maxNodesCount }), e.terrain ? Array.isArray(e.terrain) ? this.planet.setTerrain(e.terrain[0]) : this.planet.setTerrain(e.terrain) : this.planet.setTerrain(new ps()), this.renderer.addNode(this.planet), e.controls ? this.planet.addControls(e.controls) : this.planet.addControls([new Ca(), new ma(), new wa(), new fa(), new xa(), new Jn(), new Vr()]);
16303
+ }, this.renderer = new ld(new Mt(this._canvas, { autoActivate: !1, pixelRatio: e.dpi || window.devicePixelRatio + 0.15, context: { antialias: !1, premultipliedAlpha: !1, preserveDrawingBuffer: !1 } }), { autoActivate: !1, msaa: e.msaa, fontsSrc: e.fontsSrc, gamma: e.gamma, exposure: e.exposure }), this.renderer.div = this.$inner, e.skybox && this.renderer.addNode(e.skybox), this._planetName = e.name ? e.name : "globus_planet_" + Gi.__counter__, this.planet = new ja({ name: this._planetName, frustums: e.frustums, ellipsoid: e.ellipsoid, maxGridSize: e.maxGridSize, nightTextureSrc: e.nightTextureSrc === null ? null : e.nightTextureSrc || `${e.resourcesSrc || vn}/night.png`, specularTextureSrc: e.specularTextureSrc === null ? null : e.specularTextureSrc || `${e.resourcesSrc || vn}/spec.png`, minAltitude: e.minAltitude, maxAltitude: e.maxAltitude || 15e6, maxEqualZoomAltitude: e.maxEqualZoomAltitude, minEqualZoomAltitude: e.minEqualZoomAltitude, minEqualZoomCameraSlope: e.minEqualZoomCameraSlope, quadTreeStrategyPrototype: e.quadTreeStrategyPrototype, maxLoadingRequests: e.maxLoadingRequests, atmosphereEnabled: e.atmosphereEnabled, transitionOpacityEnabled: e.transitionOpacityEnabled, atmosphereParameters: e.atmosphereParameters, minDistanceBeforeMemClear: e.minDistanceBeforeMemClear, vectorTileSize: e.vectorTileSize, maxNodesCount: e.maxNodesCount }), e.terrain ? Array.isArray(e.terrain) ? this.planet.setTerrain(e.terrain[0]) : this.planet.setTerrain(e.terrain) : this.planet.setTerrain(new ps()), this.renderer.addNode(this.planet), e.controls ? this.planet.addControls(e.controls) : this.planet.addControls([new Ca(), new ma(), new wa(), new fa(), new xa(), new Jn(), new Vr()]);
16294
16304
  const i = this.renderer.controls;
16295
16305
  let r;
16296
16306
  for (let n in i) if (i[n] instanceof Hr) {
@@ -16321,12 +16331,12 @@ const vn = "/res", Ka = class Gi {
16321
16331
  this.detach(), this.planet.layers.forEach((e) => e.remove()), this.planet.destroy(), this.renderer.destroy(), window[this._instanceID] = null;
16322
16332
  }
16323
16333
  };
16324
- Ka.__counter__ = 0;
16325
- let ad = Ka;
16326
- new Wr(3396200, 3389508);
16327
- new Wr(1737400, 1737400);
16328
- var ld = ((a) => (a[a.byte = 5120] = "byte", a[a.ubyte = 5121] = "ubyte", a[a.short = 5122] = "short", a[a.ushort = 5123] = "ushort", a[a.uint = 5125] = "uint", a[a.float = 5126] = "float", a))(ld || {}), hd = ((a) => (a.scalar = "SCALAR", a.vec2 = "VEC2", a.vec3 = "VEC3", a.vec4 = "VEC4", a.mat2 = "MAT2", a.mat3 = "MAT3", a.mat4 = "MAT4", a))(hd || {}), cd = ((a) => (a[a.points = 0] = "points", a[a.lines = 1] = "lines", a[a.lineLoop = 2] = "lineLoop", a[a.lineStrip = 3] = "lineStrip", a[a.triangles = 4] = "triangles", a[a.triangleStrip = 5] = "triangleStrip", a[a.triangleFan = 6] = "triangleFan", a))(cd || {});
16329
- const yd = ({ children: a, onDraw: e, ...t }) => {
16334
+ Qa.__counter__ = 0;
16335
+ let hd = Qa;
16336
+ new qr(3396200, 3389508);
16337
+ new qr(1737400, 1737400);
16338
+ var cd = ((a) => (a[a.byte = 5120] = "byte", a[a.ubyte = 5121] = "ubyte", a[a.short = 5122] = "short", a[a.ushort = 5123] = "ushort", a[a.uint = 5125] = "uint", a[a.float = 5126] = "float", a))(cd || {}), dd = ((a) => (a.scalar = "SCALAR", a.vec2 = "VEC2", a.vec3 = "VEC3", a.vec4 = "VEC4", a.mat2 = "MAT2", a.mat3 = "MAT3", a.mat4 = "MAT4", a))(dd || {}), ud = ((a) => (a[a.points = 0] = "points", a[a.lines = 1] = "lines", a[a.lineLoop = 2] = "lineLoop", a[a.lineStrip = 3] = "lineStrip", a[a.triangles = 4] = "triangles", a[a.triangleStrip = 5] = "triangleStrip", a[a.triangleFan = 6] = "triangleFan", a))(ud || {});
16339
+ const bd = ({ children: a, onDraw: e, ...t }) => {
16330
16340
  const i = Ue(null), { setGlobe: r } = vt(), [s, n] = ut(t), o = Ue(null);
16331
16341
  return O(() => {
16332
16342
  if (o && o.current && t.viewExtent !== void 0) {
@@ -16346,10 +16356,10 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16346
16356
  i.current = o.current.$target;
16347
16357
  else {
16348
16358
  const l = new Xa("OSM"), h = new Za("Microsoft Bing");
16349
- o.current = new ad({
16359
+ o.current = new hd({
16350
16360
  target: i.current,
16351
16361
  name: "Earth",
16352
- terrain: new qa(),
16362
+ terrain: new Wa(),
16353
16363
  layers: [l, h],
16354
16364
  autoActivate: !0,
16355
16365
  atmosphereEnabled: !0,
@@ -16363,7 +16373,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16363
16373
  width: "100%",
16364
16374
  height: "100%"
16365
16375
  }, ref: i }, a);
16366
- }, xd = ({ name: a, ...e }) => {
16376
+ }, wd = ({ name: a, ...e }) => {
16367
16377
  const { globe: t } = vt(), i = Ue(null);
16368
16378
  return O(() => {
16369
16379
  var r;
@@ -16374,7 +16384,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16374
16384
  i.current && t.planet.removeLayer(i.current);
16375
16385
  };
16376
16386
  }, [t]), null;
16377
- }, bd = ({ name: a, ...e }) => {
16387
+ }, Cd = ({ name: a, ...e }) => {
16378
16388
  const { globe: t } = vt(), i = Ue(null);
16379
16389
  return O(() => {
16380
16390
  var r;
@@ -16385,7 +16395,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16385
16395
  i.current && t.planet.removeLayer(i.current);
16386
16396
  };
16387
16397
  }, [t]), null;
16388
- }, wd = ({ name: a, ...e }) => {
16398
+ }, Td = ({ name: a, ...e }) => {
16389
16399
  const { globe: t } = vt(), i = Ue(null);
16390
16400
  return O(() => {
16391
16401
  var r;
@@ -16395,8 +16405,8 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16395
16405
  return i.current = new Pi(a, { ...e }), t.planet.addLayer(i.current), () => {
16396
16406
  i.current && t.planet.removeLayer(i.current);
16397
16407
  };
16398
- }, [t]), /* @__PURE__ */ Ne.createElement(Qa, { layerRef: i, name: a, ...e });
16399
- }, Qa = ({ opacity: a, children: e, name: t, layerRef: i, ...r }) => {
16408
+ }, [t]), /* @__PURE__ */ Ne.createElement(Ka, { layerRef: i, name: a, ...e });
16409
+ }, Ka = ({ opacity: a, children: e, name: t, layerRef: i, ...r }) => {
16400
16410
  const [s, n] = Ne.useState(!1);
16401
16411
  return O(() => {
16402
16412
  i && i.current && typeof a == "number" && s && (i.current.opacity = a);
@@ -16436,14 +16446,14 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16436
16446
  },
16437
16447
  removeStrip: () => {
16438
16448
  }
16439
- }), Cd = ({ visibility: a, children: e, name: t, ...i }) => {
16449
+ }), Ed = ({ visibility: a, children: e, name: t, ...i }) => {
16440
16450
  const { globe: r } = vt(), s = Ue(null), [n, o] = ut([]), l = Ue(/* @__PURE__ */ new Set());
16441
16451
  O(() => {
16442
16452
  typeof a == "boolean" && s.current && s.current.setVisibility(a);
16443
16453
  }, [a]), O(() => {
16444
16454
  var C, T;
16445
16455
  if (r)
16446
- return s.current = new fe(t, i), r.planet.addLayer(s.current), i.onDraw && ((C = s.current) == null || C.events.on("draw", i.onDraw)), i.onMouseEnter && ((T = s.current) == null || T.events.on("mouseenter", i.onMouseEnter)), () => {
16456
+ return s.current = new ge(t, i), r.planet.addLayer(s.current), i.onDraw && ((C = s.current) == null || C.events.on("draw", i.onDraw)), i.onMouseEnter && ((T = s.current) == null || T.events.on("mouseenter", i.onMouseEnter)), () => {
16447
16457
  var L, S;
16448
16458
  s.current && (r.planet.removeLayer(s.current), i.onDraw && ((L = s.current) == null || L.events.off("draw", i.onDraw)), i.onMouseEnter && ((S = s.current) == null || S.events.off("mouseenter", i.onMouseEnter)));
16449
16459
  };
@@ -16503,8 +16513,8 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16503
16513
  removePolyline: w,
16504
16514
  addStrip: b,
16505
16515
  removeStrip: E
16506
- } }, /* @__PURE__ */ Ne.createElement(Qa, { layerRef: s, name: t, ...i }, e));
16507
- }, Td = ({
16516
+ } }, /* @__PURE__ */ Ne.createElement(Ka, { layerRef: s, name: t, ...i }, e));
16517
+ }, Ad = ({
16508
16518
  visibility: a,
16509
16519
  src: e,
16510
16520
  size: t,
@@ -16545,7 +16555,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16545
16555
  }), h.current && n && n(h.current), () => {
16546
16556
  h.current && o && o(h.current);
16547
16557
  }), [n, o]), null;
16548
- }, Ed = ({
16558
+ }, Ld = ({
16549
16559
  color: a,
16550
16560
  objSrc: e,
16551
16561
  scale: t,
@@ -16576,7 +16586,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16576
16586
  }), o.current && r && r(o.current), () => {
16577
16587
  o.current && s && s(o.current);
16578
16588
  }), [r, s]), null;
16579
- }, Ad = ({
16589
+ }, Pd = ({
16580
16590
  visibility: a,
16581
16591
  size: e,
16582
16592
  color: t,
@@ -16648,7 +16658,7 @@ const yd = ({ children: a, onDraw: e, ...t }) => {
16648
16658
  p.current && g && g(p.current);
16649
16659
  }), [u, g]), null;
16650
16660
  };
16651
- function dd(a) {
16661
+ function _d(a) {
16652
16662
  switch (a.type) {
16653
16663
  case "POINT":
16654
16664
  return Array.isArray(a.coordinates) && a.coordinates.length >= 2 && typeof a.coordinates[0] == "number";
@@ -16664,7 +16674,7 @@ function dd(a) {
16664
16674
  return !1;
16665
16675
  }
16666
16676
  }
16667
- const Ld = (a) => {
16677
+ const Sd = (a) => {
16668
16678
  const {
16669
16679
  visibility: e,
16670
16680
  fillColor: t,
@@ -16677,7 +16687,7 @@ const Ld = (a) => {
16677
16687
  _addGeometry: h,
16678
16688
  _removeGeometry: c
16679
16689
  } = a, d = Ue(null);
16680
- if (!dd({ type: o, coordinates: l }))
16690
+ if (!_d({ type: o, coordinates: l }))
16681
16691
  throw new Error(`Invalid coordinates for type ${o}`);
16682
16692
  return O(() => {
16683
16693
  typeof e == "boolean" && d.current && d.current.setVisibility(e);
@@ -16733,16 +16743,16 @@ const Ld = (a) => {
16733
16743
  }), d.current && h && h(d.current), () => {
16734
16744
  d.current && c && c(d.current);
16735
16745
  }), [h, c]), null;
16736
- }, yn = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof v, xn = (a) => Array.isArray(a) && a.length > 0 && (a[0][0] instanceof A || a[0][0] instanceof Array), ud = (a) => a.map((e) => e.map((t) => A.createFromArray(t))), _d = (a) => typeof a == "string" || Array.isArray(a), el = (a) => Array.isArray(a) && a.every(
16737
- (e) => Array.isArray(e) && e.every(_d)
16738
- ), fd = (a) => Array.isArray(a) && a.every(
16746
+ }, yn = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof v, xn = (a) => Array.isArray(a) && a.length > 0 && (a[0][0] instanceof A || a[0][0] instanceof Array), fd = (a) => a.map((e) => e.map((t) => A.createFromArray(t))), gd = (a) => typeof a == "string" || Array.isArray(a), el = (a) => Array.isArray(a) && a.every(
16747
+ (e) => Array.isArray(e) && e.every(gd)
16748
+ ), pd = (a) => Array.isArray(a) && a.every(
16739
16749
  (e) => Array.isArray(e) && e.every(
16740
16750
  (t) => Array.isArray(t) && t.length === 4 && t.every((i) => typeof i == "number")
16741
16751
  )
16742
16752
  ), bn = (a) => el(a) ? a.map((e) => e.map((t) => {
16743
16753
  const i = Oi.htmlColorToRgba(t);
16744
16754
  return [i.x, i.y, i.z, i.w];
16745
- })) : a, Pd = ({
16755
+ })) : a, Rd = ({
16746
16756
  visibility: a,
16747
16757
  color: e,
16748
16758
  altitude: t,
@@ -16779,7 +16789,7 @@ const Ld = (a) => {
16779
16789
  else if (yn(o))
16780
16790
  (g = d.current) == null || g.setPath3v(o);
16781
16791
  else {
16782
- const p = ud(o);
16792
+ const p = fd(o);
16783
16793
  p && ((f = d.current) == null || f.setPathLonLat(p));
16784
16794
  }
16785
16795
  }, [o]), O(() => {
@@ -16788,7 +16798,7 @@ const Ld = (a) => {
16788
16798
  if (el(n)) {
16789
16799
  const f = bn(n);
16790
16800
  f && ((u = d.current) == null || u.setPathColors(f));
16791
- } else fd(n) && ((g = d.current) == null || g.setPathColors(n));
16801
+ } else pd(n) && ((g = d.current) == null || g.setPathColors(n));
16792
16802
  }, [n]), O(() => (d.current = new Co({
16793
16803
  ...c,
16794
16804
  color: e,
@@ -16802,7 +16812,7 @@ const Ld = (a) => {
16802
16812
  }), d.current && l && l(d.current), () => {
16803
16813
  d.current && h && h(d.current);
16804
16814
  }), [l, h]), null;
16805
- }, gd = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof v, pd = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof A, wn = (a, e) => e ? gd(e) ? e : pd(e) ? e.map((t) => t.map((i) => a.lonLatToCartesian(i))) : e.map((t) => t.map((i) => a.lonLatToCartesian(A.createFromArray(i)))) : [], Sd = ({
16815
+ }, md = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof v, vd = (a) => Array.isArray(a) && a.length > 0 && a[0][0] instanceof A, wn = (a, e) => e ? md(e) ? e : vd(e) ? e.map((t) => t.map((i) => a.lonLatToCartesian(i))) : e.map((t) => t.map((i) => a.lonLatToCartesian(A.createFromArray(i)))) : [], Md = ({
16806
16816
  visibility: a,
16807
16817
  color: e,
16808
16818
  opacity: t,
@@ -16833,7 +16843,7 @@ const Ld = (a) => {
16833
16843
  }), o.current && r && r(o.current)), () => {
16834
16844
  o.current && s && s(o.current);
16835
16845
  }), [r, s, l]), null;
16836
- }, Rd = ({ visibility: a, lon: e, lat: t, alt: i, lonlat: r, name: s, children: n, ...o }) => {
16846
+ }, Bd = ({ visibility: a, lon: e, lat: t, alt: i, lonlat: r, name: s, children: n, ...o }) => {
16837
16847
  const { globe: l } = vt(), {
16838
16848
  addEntity: h,
16839
16849
  removeEntity: c,
@@ -16905,7 +16915,7 @@ const Ld = (a) => {
16905
16915
  C.current && y(C.current), R(null);
16906
16916
  }, [y]), Zt = oe(($) => {
16907
16917
  B($), C.current && x(C.current, $);
16908
- }, [x]), Kt = oe(() => {
16918
+ }, [x]), Qt = oe(() => {
16909
16919
  C.current && w(C.current), B(null);
16910
16920
  }, [w]), tl = oe(($) => {
16911
16921
  H($), C.current && b(C.current, $);
@@ -16921,14 +16931,14 @@ const Ld = (a) => {
16921
16931
  _addGeoObject: Pe,
16922
16932
  _removeGeoObject: Se,
16923
16933
  _addPolyline: Zt,
16924
- _removePolyline: Kt,
16934
+ _removePolyline: Qt,
16925
16935
  _addStrip: tl,
16926
16936
  _removeStrip: il
16927
16937
  };
16928
16938
  return n ? /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, Array.isArray(n) ? n.map(
16929
16939
  ($) => Ne.isValidElement($) ? Ne.cloneElement($, vs) : $
16930
16940
  ) : Ne.isValidElement(n) ? Ne.cloneElement(n, vs) : n) : null;
16931
- }, Md = ({
16941
+ }, kd = ({
16932
16942
  lon: a,
16933
16943
  lat: e,
16934
16944
  alt: t,
@@ -16946,22 +16956,22 @@ const Ld = (a) => {
16946
16956
  }, [n, l]), null;
16947
16957
  };
16948
16958
  export {
16949
- Td as Billboard,
16950
- Rd as Entity,
16951
- xd as GeoImage,
16952
- Ed as GeoObject,
16953
- bd as GeoVideo,
16954
- Ld as Geometry,
16955
- yd as Globe,
16956
- vd as GlobeContextProvider,
16957
- Ad as Label,
16958
- Qa as Layer,
16959
- Md as PlanetCamera,
16960
- Pd as Polyline,
16961
- Sd as Strip,
16962
- Cd as Vector,
16959
+ Ad as Billboard,
16960
+ Bd as Entity,
16961
+ wd as GeoImage,
16962
+ Ld as GeoObject,
16963
+ Cd as GeoVideo,
16964
+ Sd as Geometry,
16965
+ bd as Globe,
16966
+ xd as GlobeContextProvider,
16967
+ Pd as Label,
16968
+ Ka as Layer,
16969
+ kd as PlanetCamera,
16970
+ Rd as Polyline,
16971
+ Md as Strip,
16972
+ Ed as Vector,
16963
16973
  Ja as VectorContext,
16964
- wd as XYZ,
16974
+ Td as XYZ,
16965
16975
  vt as useGlobeContext
16966
16976
  };
16967
16977
  //# sourceMappingURL=index.js.map