leiting-bim 2.1.97 → 2.1.99

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.
@@ -22,6 +22,7 @@ class Lr {
22
22
  h(this, "groupByTheme");
23
23
  h(this, "tilingScheme");
24
24
  h(this, "levelIndexByTileLevel", /* @__PURE__ */ new Map());
25
+ h(this, "_lastTileProvider", null);
25
26
  h(this, "_updateTimer", null);
26
27
  h(this, "_updateDelay", 100);
27
28
  h(this, "_tilesRetryCount", 0);
@@ -30,16 +31,16 @@ class Lr {
30
31
  h(this, "_tileLoadListener", null);
31
32
  h(this, "_cameraChangedHandler", null);
32
33
  this.Cesium = t, this.viewer = e, this.labelPool = i.labelPool, this.threshold = i.threshold ?? 10, this.displayLimit = i.displayLimit ?? 100, this.maxLevel = i.maxLevel ?? 5, this.debugCurrentGrids = i.debugCurrentGrids ?? !1, this.clusterTheme = i.clusterTheme ?? "cluster-label", this.pointTheme = i.pointTheme ?? "point-label", this.centralPointMode = i.centralPointMode ?? "central", this.minGlobalPointCount = i.minGlobalPointCount ?? 0, this.groupByTheme = i.groupByTheme ?? !1;
33
- const r = this.viewer.scene && this.viewer.scene.globe, s = r && r._surface, o = s && s._tileProvider;
34
- this.tilingScheme = (o == null ? void 0 : o.tilingScheme) || new this.Cesium.GeographicTilingScheme(), this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), r && (this._tileLoadListener = (n) => {
35
- n === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
34
+ const r = this.viewer.scene && this.viewer.scene.globe, s = r && r._surface, o = s && s._tileProvider, n = (o == null ? void 0 : o.tilingScheme) || new this.Cesium.GeographicTilingScheme();
35
+ this._lastTileProvider = o, this.tilingScheme = n, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), r && (this._tileLoadListener = (l) => {
36
+ l === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
36
37
  }, r.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
37
- const n = this.viewer.scene, l = n && n.globe;
38
- if (!l) {
38
+ const l = this.viewer.scene, c = l && l.globe;
39
+ if (!c) {
39
40
  this._scheduleUpdate();
40
41
  return;
41
42
  }
42
- this._cameraDirty = !0, l.tilesLoaded && (this._cameraDirty = !1, this._scheduleUpdate());
43
+ this._cameraDirty = !0, c.tilesLoaded && (this._cameraDirty = !1, this._scheduleUpdate());
43
44
  }, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
44
45
  }
45
46
  setGroupByTheme(t, e = !0, i = !0) {
@@ -58,6 +59,10 @@ class Lr {
58
59
  setDebugCurrentGrids(t, e = !0) {
59
60
  this.debugCurrentGrids = t, t || this._clearDebugGrids(), e && this._update();
60
61
  }
62
+ _syncTilingSchemeAndLevels() {
63
+ const t = this.viewer.scene && this.viewer.scene.globe, e = t && t._surface, i = e && e._tileProvider, r = (i == null ? void 0 : i.tilingScheme) || new this.Cesium.GeographicTilingScheme(), s = i !== this._lastTileProvider, o = this.tilingScheme !== r;
64
+ !s && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = r, this.levels = this._createLevels(), this._buildLevels());
65
+ }
61
66
  _createLevels() {
62
67
  const t = [];
63
68
  this.levelIndexByTileLevel = /* @__PURE__ */ new Map();
@@ -172,11 +177,11 @@ class Lr {
172
177
  _update() {
173
178
  var r, s, o, n;
174
179
  if (!this.labelPool) return;
175
- this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
180
+ this._syncTilingSchemeAndLevels(), this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
176
181
  const t = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
177
182
  let e = 0;
178
183
  const i = (l, c, d) => {
179
- var E, I, D, S, T, _, x, A, O, $, k, j, Y, B, V;
184
+ var E, I, _, S, T, D, x, A, O, $, k, Y, V, G, U, q, ie;
180
185
  if (e >= this.displayLimit || l < 0) return;
181
186
  l >= this.levels.length && (l = this.levels.length - 1);
182
187
  const u = this.levels[l], m = l === this.levels.length - 1, g = u.level, p = this.gridLayers.get(g);
@@ -184,70 +189,71 @@ class Lr {
184
189
  const f = `${c}_${d}`, w = p.get(f);
185
190
  if (!w) return;
186
191
  const y = this.tilingScheme.tileXYToRectangle(c, d, g), C = this.Cesium.Math.toDegrees(y.west), b = this.Cesium.Math.toDegrees(y.south), v = this.Cesium.Math.toDegrees(y.east), M = this.Cesium.Math.toDegrees(y.north), P = (C + v) / 2, L = (b + M) / 2;
187
- for (const R of w.skipPoints)
188
- if (((E = R.data) == null ? void 0 : E.show) !== !1) {
192
+ for (const B of w.skipPoints)
193
+ if (((E = B.data) == null ? void 0 : E.show) !== !1) {
189
194
  if (e >= this.displayLimit) break;
190
- this.labelPool.add(R.data, {
191
- id: `point-${R.id}`,
192
- lon: R.lon,
193
- lat: R.lat,
194
- height: R.height,
195
- theme: ((S = (D = (I = R.data) == null ? void 0 : I.billboard) == null ? void 0 : D[0]) == null ? void 0 : S.theme) || this.pointTheme,
196
- style: R.style
195
+ this.labelPool.add(B.data, {
196
+ id: `point-${B.id}`,
197
+ lon: B.lon,
198
+ lat: B.lat,
199
+ height: B.height,
200
+ theme: ((S = (_ = (I = B.data) == null ? void 0 : I.billboard) == null ? void 0 : _[0]) == null ? void 0 : S.theme) || this.pointTheme,
201
+ style: B.style
197
202
  }), e++;
198
203
  }
199
204
  if (e >= this.displayLimit) {
200
205
  this.debugCurrentGrids && this._drawDebugGrid(C, b, v, M, f);
201
206
  return;
202
207
  }
203
- for (const [R, se] of w.groups) {
204
- const W = se.filter((H) => {
205
- var te;
206
- return ((te = H.data) == null ? void 0 : te.show) !== !1;
208
+ for (const [B, de] of w.groups) {
209
+ const K = de.filter((R) => {
210
+ var W;
211
+ return ((W = R.data) == null ? void 0 : W.show) !== !1;
207
212
  });
208
- if (W.length === 0) continue;
209
- let ne = P, de = L;
210
- if (this.centralPointMode == "firstPoint" && (ne = ((T = W[0]) == null ? void 0 : T.lon) || 0, de = ((_ = W[0]) == null ? void 0 : _.lat) || 0), m || W.length < t)
211
- for (const H of W) {
213
+ if (K.length === 0) continue;
214
+ let j = P, re = L, te = ((T = K[0]) == null ? void 0 : T.height) || 0;
215
+ if (this.centralPointMode == "firstPoint" && (j = ((D = K[0]) == null ? void 0 : D.lon) || 0, re = ((x = K[0]) == null ? void 0 : x.lat) || 0, te = ((A = K[0]) == null ? void 0 : A.height) || 0), m || K.length < t)
216
+ for (const R of K) {
212
217
  if (e >= this.displayLimit) break;
213
- this.labelPool.add(H.data, {
214
- id: `point-${H.id}`,
215
- lon: H.lon,
216
- lat: H.lat,
217
- height: H.height,
218
- theme: ((O = (A = (x = H.data) == null ? void 0 : x.billboard) == null ? void 0 : A[0]) == null ? void 0 : O.theme) || this.pointTheme,
219
- style: H.style
218
+ this.labelPool.add(R.data, {
219
+ id: `point-${R.id}`,
220
+ lon: R.lon,
221
+ lat: R.lat,
222
+ height: R.height,
223
+ theme: ((k = ($ = (O = R.data) == null ? void 0 : O.billboard) == null ? void 0 : $[0]) == null ? void 0 : k.theme) || this.pointTheme,
224
+ style: R.style
220
225
  }), e++;
221
226
  }
222
227
  else {
223
228
  if (e >= this.displayLimit) break;
224
- const te = ((Y = (j = (k = ($ = W[0]) == null ? void 0 : $.data) == null ? void 0 : k.billboard) == null ? void 0 : j[0]) == null ? void 0 : Y.theme) || this.clusterTheme, ee = this.groupByTheme ? `cluster-${l}-${c}-${d}-${R}` : `cluster-${l}-${c}-${d}`;
229
+ const W = ((U = (G = (V = (Y = K[0]) == null ? void 0 : Y.data) == null ? void 0 : V.billboard) == null ? void 0 : G[0]) == null ? void 0 : U.theme) || this.clusterTheme, se = this.groupByTheme ? `cluster-${l}-${c}-${d}-${B}` : `cluster-${l}-${c}-${d}`;
225
230
  this.labelPool.add(
226
231
  {
227
- id: ee,
228
- billboard: ((V = (B = W[0]) == null ? void 0 : B.data) == null ? void 0 : V.billboard) || [],
229
- count: W.length,
232
+ id: se,
233
+ billboard: ((ie = (q = K[0]) == null ? void 0 : q.data) == null ? void 0 : ie.billboard) || [],
234
+ count: K.length,
230
235
  gridKey: f,
231
- points: W,
232
- aggregationGroup: R
236
+ points: K,
237
+ aggregationGroup: B
233
238
  },
234
239
  {
235
- id: ee,
236
- lon: ne,
237
- lat: de,
238
- theme: te
240
+ id: se,
241
+ lon: j,
242
+ lat: re,
243
+ height: te,
244
+ theme: W
239
245
  }
240
246
  ), e++;
241
247
  }
242
248
  }
243
249
  if (this.debugCurrentGrids) {
244
- const R = this.levels[l].level;
250
+ const B = this.levels[l].level;
245
251
  this._drawDebugGrid(
246
252
  C,
247
253
  b,
248
254
  v,
249
255
  M,
250
- `L:${R} X:${c} Y:${d}`
256
+ `L:${B} X:${c} Y:${d}`
251
257
  );
252
258
  }
253
259
  };
@@ -277,10 +283,10 @@ class Lr {
277
283
  let f = this.levelIndexByTileLevel.get(p);
278
284
  if (f === void 0) {
279
285
  if (this.levels.length === 0) continue;
280
- const _ = this.levels[0].level, x = this.levels[this.levels.length - 1].level;
286
+ const D = this.levels[0].level, x = this.levels[this.levels.length - 1].level;
281
287
  if (p > x)
282
288
  f = this.levels.length - 1;
283
- else if (p < _)
289
+ else if (p < D)
284
290
  f = 0;
285
291
  else {
286
292
  let A = 0, O = 1 / 0;
@@ -294,25 +300,25 @@ class Lr {
294
300
  if (f === void 0) continue;
295
301
  const w = this.levels[f].level, y = m._x ?? m.x, C = m._y ?? m.y;
296
302
  if (typeof y == "number" && typeof C == "number") {
297
- let _ = y, x = C;
303
+ let D = y, x = C;
298
304
  const A = p - w;
299
305
  if (A > 0) {
300
306
  const $ = 1 << A;
301
- _ = Math.floor(y / $), x = Math.floor(C / $);
307
+ D = Math.floor(y / $), x = Math.floor(C / $);
302
308
  } else if (A < 0) {
303
309
  const $ = 1 << -A;
304
- _ = y * $, x = C * $;
310
+ D = y * $, x = C * $;
305
311
  }
306
- const O = `${w}_${_}_${x}`;
312
+ const O = `${w}_${D}_${x}`;
307
313
  if (u.has(O)) continue;
308
- u.add(O), i(f, _, x);
314
+ u.add(O), i(f, D, x);
309
315
  continue;
310
316
  }
311
- const v = this.levels[f].size, M = this.Cesium.Math.toDegrees(g.west), P = this.Cesium.Math.toDegrees(g.east), L = this.Cesium.Math.toDegrees(g.south), E = this.Cesium.Math.toDegrees(g.north), I = Math.floor((M - -180) / v), D = Math.floor((P - -180) / v), S = Math.floor((L - -90) / v), T = Math.floor((E - -90) / v);
312
- for (let _ = I; _ <= D; _++)
317
+ const v = this.levels[f].size, M = this.Cesium.Math.toDegrees(g.west), P = this.Cesium.Math.toDegrees(g.east), L = this.Cesium.Math.toDegrees(g.south), E = this.Cesium.Math.toDegrees(g.north), I = Math.floor((M - -180) / v), _ = Math.floor((P - -180) / v), S = Math.floor((L - -90) / v), T = Math.floor((E - -90) / v);
318
+ for (let D = I; D <= _; D++)
313
319
  for (let x = S; x <= T; x++) {
314
- const A = `${w}_${_}_${x}`;
315
- u.has(A) || (u.add(A), i(f, _, x));
320
+ const A = `${w}_${D}_${x}`;
321
+ u.has(A) || (u.add(A), i(f, D, x));
316
322
  }
317
323
  }
318
324
  } catch {
@@ -357,7 +363,7 @@ class Lr {
357
363
  e && this._tileLoadListener && (e.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids();
358
364
  }
359
365
  }
360
- var oe = /* @__PURE__ */ ((a) => (a.Click = "marker:click", a.DoubleClick = "marker:dblclick", a.RightClick = "marker:rightclick", a.MouseEnter = "marker:mouseenter", a.MouseLeave = "marker:mouseleave", a.MouseDown = "marker:mousedown", a.MouseUp = "marker:mouseup", a))(oe || {});
366
+ var ne = /* @__PURE__ */ ((a) => (a.Click = "marker:click", a.DoubleClick = "marker:dblclick", a.RightClick = "marker:rightclick", a.MouseEnter = "marker:mouseenter", a.MouseLeave = "marker:mouseleave", a.MouseDown = "marker:mousedown", a.MouseUp = "marker:mouseup", a))(ne || {});
361
367
  class zt {
362
368
  constructor() {
363
369
  h(this, "listenerMap", /* @__PURE__ */ new Map());
@@ -408,15 +414,15 @@ class zt {
408
414
  }
409
415
  }
410
416
  const Nt = {
411
- [oe.Click]: "click",
412
- [oe.DoubleClick]: "dblclick",
413
- [oe.RightClick]: "contextmenu",
414
- [oe.MouseEnter]: "mouseenter",
415
- [oe.MouseLeave]: "mouseleave",
416
- [oe.MouseDown]: "mousedown",
417
- [oe.MouseUp]: "mouseup"
417
+ [ne.Click]: "click",
418
+ [ne.DoubleClick]: "dblclick",
419
+ [ne.RightClick]: "contextmenu",
420
+ [ne.MouseEnter]: "mouseenter",
421
+ [ne.MouseLeave]: "mouseleave",
422
+ [ne.MouseDown]: "mousedown",
423
+ [ne.MouseUp]: "mouseup"
418
424
  };
419
- class G {
425
+ class N {
420
426
  /**
421
427
  * 构造函数
422
428
  * @param Cesium Cesium 命名空间
@@ -1101,7 +1107,7 @@ class Er {
1101
1107
  this.clear();
1102
1108
  }
1103
1109
  }
1104
- var vt = typeof global == "object" && global && global.Object === Object && global, Wt = typeof self == "object" && self && self.Object === Object && self, re = vt || Wt || Function("return this")(), fe = re.Symbol, bt = Object.prototype, Ut = bt.hasOwnProperty, qt = bt.toString, ve = fe ? fe.toStringTag : void 0;
1110
+ var vt = typeof global == "object" && global && global.Object === Object && global, Wt = typeof self == "object" && self && self.Object === Object && self, ae = vt || Wt || Function("return this")(), fe = ae.Symbol, bt = Object.prototype, Ut = bt.hasOwnProperty, qt = bt.toString, ve = fe ? fe.toStringTag : void 0;
1105
1111
  function Kt(a) {
1106
1112
  var t = Ut.call(a, ve), e = a[ve];
1107
1113
  try {
@@ -1123,19 +1129,19 @@ function Ee(a) {
1123
1129
  function Me(a) {
1124
1130
  return a != null && typeof a == "object";
1125
1131
  }
1126
- var De = Array.isArray;
1127
- function _e(a) {
1132
+ var _e = Array.isArray;
1133
+ function De(a) {
1128
1134
  var t = typeof a;
1129
1135
  return a != null && (t == "object" || t == "function");
1130
1136
  }
1131
1137
  var ti = "[object AsyncFunction]", ii = "[object Function]", si = "[object GeneratorFunction]", oi = "[object Proxy]";
1132
1138
  function Pt(a) {
1133
- if (!_e(a))
1139
+ if (!De(a))
1134
1140
  return !1;
1135
1141
  var t = Ee(a);
1136
1142
  return t == ii || t == si || t == ti || t == oi;
1137
1143
  }
1138
- var $e = re["__core-js_shared__"], je = (function() {
1144
+ var $e = ae["__core-js_shared__"], je = (function() {
1139
1145
  var a = /[^.]+$/.exec($e && $e.keys && $e.keys.IE_PROTO || "");
1140
1146
  return a ? "Symbol(src)_1." + a : "";
1141
1147
  })();
@@ -1160,7 +1166,7 @@ var li = /[\\^$.*+?()[\]{}|]/g, hi = /^\[object .+?Constructor\]$/, ci = Functio
1160
1166
  "^" + pi.call(ui).replace(li, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1161
1167
  );
1162
1168
  function gi(a) {
1163
- if (!_e(a) || ri(a))
1169
+ if (!De(a) || ri(a))
1164
1170
  return !1;
1165
1171
  var t = Pt(a) ? mi : hi;
1166
1172
  return t.test(ue(a));
@@ -1172,11 +1178,11 @@ function me(a, t) {
1172
1178
  var e = fi(a, t);
1173
1179
  return gi(e) ? e : void 0;
1174
1180
  }
1175
- var Fe = me(re, "WeakMap"), Ye = Object.create, yi = /* @__PURE__ */ (function() {
1181
+ var Fe = me(ae, "WeakMap"), Ye = Object.create, yi = /* @__PURE__ */ (function() {
1176
1182
  function a() {
1177
1183
  }
1178
1184
  return function(t) {
1179
- if (!_e(t))
1185
+ if (!De(t))
1180
1186
  return {};
1181
1187
  if (Ye)
1182
1188
  return Ye(t);
@@ -1229,14 +1235,14 @@ function Mt(a) {
1229
1235
  var t = a && a.constructor, e = typeof t == "function" && t.prototype || xi;
1230
1236
  return a === e;
1231
1237
  }
1232
- function Di(a, t) {
1238
+ function _i(a, t) {
1233
1239
  for (var e = -1, i = Array(a); ++e < a; )
1234
1240
  i[e] = t(e);
1235
1241
  return i;
1236
1242
  }
1237
- var _i = "[object Arguments]";
1243
+ var Di = "[object Arguments]";
1238
1244
  function We(a) {
1239
- return Me(a) && Ee(a) == _i;
1245
+ return Me(a) && Ee(a) == Di;
1240
1246
  }
1241
1247
  var It = Object.prototype, Si = It.hasOwnProperty, Ai = It.propertyIsEnumerable, $i = We(/* @__PURE__ */ (function() {
1242
1248
  return arguments;
@@ -1246,18 +1252,18 @@ var It = Object.prototype, Si = It.hasOwnProperty, Ai = It.propertyIsEnumerable,
1246
1252
  function Oi() {
1247
1253
  return !1;
1248
1254
  }
1249
- var Tt = typeof exports == "object" && exports && !exports.nodeType && exports, Ue = Tt && typeof module == "object" && module && !module.nodeType && module, Fi = Ue && Ue.exports === Tt, qe = Fi ? re.Buffer : void 0, ki = qe ? qe.isBuffer : void 0, xt = ki || Oi, Ri = "[object Arguments]", Hi = "[object Array]", zi = "[object Boolean]", Ni = "[object Date]", Gi = "[object Error]", Bi = "[object Function]", ji = "[object Map]", Yi = "[object Number]", Vi = "[object Object]", Wi = "[object RegExp]", Ui = "[object Set]", qi = "[object String]", Ki = "[object WeakMap]", Xi = "[object ArrayBuffer]", Ji = "[object DataView]", Qi = "[object Float32Array]", Zi = "[object Float64Array]", es = "[object Int8Array]", ts = "[object Int16Array]", is = "[object Int32Array]", ss = "[object Uint8Array]", os = "[object Uint8ClampedArray]", rs = "[object Uint16Array]", ns = "[object Uint32Array]", N = {};
1250
- N[Qi] = N[Zi] = N[es] = N[ts] = N[is] = N[ss] = N[os] = N[rs] = N[ns] = !0;
1251
- N[Ri] = N[Hi] = N[Xi] = N[zi] = N[Ji] = N[Ni] = N[Gi] = N[Bi] = N[ji] = N[Yi] = N[Vi] = N[Wi] = N[Ui] = N[qi] = N[Ki] = !1;
1255
+ var Tt = typeof exports == "object" && exports && !exports.nodeType && exports, Ue = Tt && typeof module == "object" && module && !module.nodeType && module, Fi = Ue && Ue.exports === Tt, qe = Fi ? ae.Buffer : void 0, ki = qe ? qe.isBuffer : void 0, xt = ki || Oi, Ri = "[object Arguments]", Hi = "[object Array]", zi = "[object Boolean]", Ni = "[object Date]", Gi = "[object Error]", Bi = "[object Function]", ji = "[object Map]", Yi = "[object Number]", Vi = "[object Object]", Wi = "[object RegExp]", Ui = "[object Set]", qi = "[object String]", Ki = "[object WeakMap]", Xi = "[object ArrayBuffer]", Ji = "[object DataView]", Qi = "[object Float32Array]", Zi = "[object Float64Array]", es = "[object Int8Array]", ts = "[object Int16Array]", is = "[object Int32Array]", ss = "[object Uint8Array]", os = "[object Uint8ClampedArray]", rs = "[object Uint16Array]", ns = "[object Uint32Array]", z = {};
1256
+ z[Qi] = z[Zi] = z[es] = z[ts] = z[is] = z[ss] = z[os] = z[rs] = z[ns] = !0;
1257
+ z[Ri] = z[Hi] = z[Xi] = z[zi] = z[Ji] = z[Ni] = z[Gi] = z[Bi] = z[ji] = z[Yi] = z[Vi] = z[Wi] = z[Ui] = z[qi] = z[Ki] = !1;
1252
1258
  function as(a) {
1253
- return Me(a) && Et(a.length) && !!N[Ee(a)];
1259
+ return Me(a) && Et(a.length) && !!z[Ee(a)];
1254
1260
  }
1255
1261
  function Ne(a) {
1256
1262
  return function(t) {
1257
1263
  return a(t);
1258
1264
  };
1259
1265
  }
1260
- var Dt = typeof exports == "object" && exports && !exports.nodeType && exports, be = Dt && typeof module == "object" && module && !module.nodeType && module, ls = be && be.exports === Dt, Oe = ls && vt.process, ye = (function() {
1266
+ var _t = typeof exports == "object" && exports && !exports.nodeType && exports, be = _t && typeof module == "object" && module && !module.nodeType && module, ls = be && be.exports === _t, Oe = ls && vt.process, ye = (function() {
1261
1267
  try {
1262
1268
  var a = be && be.require && be.require("util").types;
1263
1269
  return a || Oe && Oe.binding && Oe.binding("util");
@@ -1265,7 +1271,7 @@ var Dt = typeof exports == "object" && exports && !exports.nodeType && exports,
1265
1271
  }
1266
1272
  })(), Ke = ye && ye.isTypedArray, hs = Ke ? Ne(Ke) : as, cs = Object.prototype, ds = cs.hasOwnProperty;
1267
1273
  function ps(a, t) {
1268
- var e = De(a), i = !e && $i(a), r = !e && !i && xt(a), s = !e && !i && !r && hs(a), o = e || i || r || s, n = o ? Di(a.length, String) : [], l = n.length;
1274
+ var e = _e(a), i = !e && $i(a), r = !e && !i && xt(a), s = !e && !i && !r && hs(a), o = e || i || r || s, n = o ? _i(a.length, String) : [], l = n.length;
1269
1275
  for (var c in a)
1270
1276
  ds.call(a, c) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
1271
1277
  (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -1274,12 +1280,12 @@ function ps(a, t) {
1274
1280
  bi(c, l))) && n.push(c);
1275
1281
  return n;
1276
1282
  }
1277
- function _t(a, t) {
1283
+ function Dt(a, t) {
1278
1284
  return function(e) {
1279
1285
  return a(t(e));
1280
1286
  };
1281
1287
  }
1282
- var us = _t(Object.keys, Object), ms = Object.prototype, gs = ms.hasOwnProperty;
1288
+ var us = Dt(Object.keys, Object), ms = Object.prototype, gs = ms.hasOwnProperty;
1283
1289
  function fs(a) {
1284
1290
  if (!Mt(a))
1285
1291
  return us(a);
@@ -1330,7 +1336,7 @@ pe.prototype.delete = Cs;
1330
1336
  pe.prototype.get = Ls;
1331
1337
  pe.prototype.has = Is;
1332
1338
  pe.prototype.set = xs;
1333
- function Ds() {
1339
+ function _s() {
1334
1340
  this.__data__ = [], this.size = 0;
1335
1341
  }
1336
1342
  function Se(a, t) {
@@ -1339,7 +1345,7 @@ function Se(a, t) {
1339
1345
  return e;
1340
1346
  return -1;
1341
1347
  }
1342
- var _s = Array.prototype, Ss = _s.splice;
1348
+ var Ds = Array.prototype, Ss = Ds.splice;
1343
1349
  function As(a) {
1344
1350
  var t = this.__data__, e = Se(t, a);
1345
1351
  if (e < 0)
@@ -1365,12 +1371,12 @@ function ce(a) {
1365
1371
  this.set(i[0], i[1]);
1366
1372
  }
1367
1373
  }
1368
- ce.prototype.clear = Ds;
1374
+ ce.prototype.clear = _s;
1369
1375
  ce.prototype.delete = As;
1370
1376
  ce.prototype.get = $s;
1371
1377
  ce.prototype.has = Os;
1372
1378
  ce.prototype.set = Fs;
1373
- var Le = me(re, "Map");
1379
+ var Le = me(ae, "Map");
1374
1380
  function ks() {
1375
1381
  this.size = 0, this.__data__ = {
1376
1382
  hash: new pe(),
@@ -1417,7 +1423,7 @@ function Bs(a, t) {
1417
1423
  a[r + e] = t[e];
1418
1424
  return a;
1419
1425
  }
1420
- var js = _t(Object.getPrototypeOf, Object);
1426
+ var js = Dt(Object.getPrototypeOf, Object);
1421
1427
  function Ys() {
1422
1428
  this.__data__ = new ce(), this.size = 0;
1423
1429
  }
@@ -1451,7 +1457,7 @@ Ce.prototype.delete = Vs;
1451
1457
  Ce.prototype.get = Ws;
1452
1458
  Ce.prototype.has = Us;
1453
1459
  Ce.prototype.set = Ks;
1454
- var St = typeof exports == "object" && exports && !exports.nodeType && exports, Xe = St && typeof module == "object" && module && !module.nodeType && module, Xs = Xe && Xe.exports === St, Je = Xs ? re.Buffer : void 0;
1460
+ var St = typeof exports == "object" && exports && !exports.nodeType && exports, Xe = St && typeof module == "object" && module && !module.nodeType && module, Xs = Xe && Xe.exports === St, Je = Xs ? ae.Buffer : void 0;
1455
1461
  Je && Je.allocUnsafe;
1456
1462
  function Js(a, t) {
1457
1463
  return a.slice();
@@ -1473,12 +1479,12 @@ var eo = Object.prototype, to = eo.propertyIsEnumerable, Qe = Object.getOwnPrope
1473
1479
  } : Zs;
1474
1480
  function so(a, t, e) {
1475
1481
  var i = t(a);
1476
- return De(a) ? i : Bs(i, e(a));
1482
+ return _e(a) ? i : Bs(i, e(a));
1477
1483
  }
1478
1484
  function oo(a) {
1479
1485
  return so(a, ys, io);
1480
1486
  }
1481
- var ke = me(re, "DataView"), Re = me(re, "Promise"), He = me(re, "Set"), Ze = "[object Map]", ro = "[object Object]", et = "[object Promise]", tt = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", no = ue(ke), ao = ue(Le), lo = ue(Re), ho = ue(He), co = ue(Fe), he = Ee;
1487
+ var ke = me(ae, "DataView"), Re = me(ae, "Promise"), He = me(ae, "Set"), Ze = "[object Map]", ro = "[object Object]", et = "[object Promise]", tt = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", no = ue(ke), ao = ue(Le), lo = ue(Re), ho = ue(He), co = ue(Fe), he = Ee;
1482
1488
  (ke && he(new ke(new ArrayBuffer(1))) != st || Le && he(new Le()) != Ze || Re && he(Re.resolve()) != et || He && he(new He()) != tt || Fe && he(new Fe()) != it) && (he = function(a) {
1483
1489
  var t = Ee(a), e = t == ro ? a.constructor : void 0, i = e ? ue(e) : "";
1484
1490
  if (i)
@@ -1501,7 +1507,7 @@ function mo(a) {
1501
1507
  var t = a.length, e = new a.constructor(t);
1502
1508
  return t && typeof a[0] == "string" && uo.call(a, "index") && (e.index = a.index, e.input = a.input), e;
1503
1509
  }
1504
- var ot = re.Uint8Array;
1510
+ var ot = ae.Uint8Array;
1505
1511
  function Ge(a) {
1506
1512
  var t = new a.constructor(a.byteLength);
1507
1513
  return new ot(t).set(new ot(a)), t;
@@ -1523,7 +1529,7 @@ function Co(a, t) {
1523
1529
  var e = Ge(a.buffer);
1524
1530
  return new a.constructor(e, a.byteOffset, a.length);
1525
1531
  }
1526
- var vo = "[object Boolean]", bo = "[object Date]", Po = "[object Map]", Lo = "[object Number]", Eo = "[object RegExp]", Mo = "[object Set]", Io = "[object String]", To = "[object Symbol]", xo = "[object ArrayBuffer]", Do = "[object DataView]", _o = "[object Float32Array]", So = "[object Float64Array]", Ao = "[object Int8Array]", $o = "[object Int16Array]", Oo = "[object Int32Array]", Fo = "[object Uint8Array]", ko = "[object Uint8ClampedArray]", Ro = "[object Uint16Array]", Ho = "[object Uint32Array]";
1532
+ var vo = "[object Boolean]", bo = "[object Date]", Po = "[object Map]", Lo = "[object Number]", Eo = "[object RegExp]", Mo = "[object Set]", Io = "[object String]", To = "[object Symbol]", xo = "[object ArrayBuffer]", _o = "[object DataView]", Do = "[object Float32Array]", So = "[object Float64Array]", Ao = "[object Int8Array]", $o = "[object Int16Array]", Oo = "[object Int32Array]", Fo = "[object Uint8Array]", ko = "[object Uint8ClampedArray]", Ro = "[object Uint16Array]", Ho = "[object Uint32Array]";
1527
1533
  function zo(a, t, e) {
1528
1534
  var i = a.constructor;
1529
1535
  switch (t) {
@@ -1532,9 +1538,9 @@ function zo(a, t, e) {
1532
1538
  case vo:
1533
1539
  case bo:
1534
1540
  return new i(+a);
1535
- case Do:
1536
- return go(a);
1537
1541
  case _o:
1542
+ return go(a);
1543
+ case Do:
1538
1544
  case So:
1539
1545
  case Ao:
1540
1546
  case $o:
@@ -1568,16 +1574,16 @@ var at = ye && ye.isMap, jo = at ? Ne(at) : Bo, Yo = "[object Set]";
1568
1574
  function Vo(a) {
1569
1575
  return Me(a) && he(a) == Yo;
1570
1576
  }
1571
- var lt = ye && ye.isSet, Wo = lt ? Ne(lt) : Vo, At = "[object Arguments]", Uo = "[object Array]", qo = "[object Boolean]", Ko = "[object Date]", Xo = "[object Error]", $t = "[object Function]", Jo = "[object GeneratorFunction]", Qo = "[object Map]", Zo = "[object Number]", Ot = "[object Object]", er = "[object RegExp]", tr = "[object Set]", ir = "[object String]", sr = "[object Symbol]", or = "[object WeakMap]", rr = "[object ArrayBuffer]", nr = "[object DataView]", ar = "[object Float32Array]", lr = "[object Float64Array]", hr = "[object Int8Array]", cr = "[object Int16Array]", dr = "[object Int32Array]", pr = "[object Uint8Array]", ur = "[object Uint8ClampedArray]", mr = "[object Uint16Array]", gr = "[object Uint32Array]", z = {};
1572
- z[At] = z[Uo] = z[rr] = z[nr] = z[qo] = z[Ko] = z[ar] = z[lr] = z[hr] = z[cr] = z[dr] = z[Qo] = z[Zo] = z[Ot] = z[er] = z[tr] = z[ir] = z[sr] = z[pr] = z[ur] = z[mr] = z[gr] = !0;
1573
- z[Xo] = z[$t] = z[or] = !1;
1577
+ var lt = ye && ye.isSet, Wo = lt ? Ne(lt) : Vo, At = "[object Arguments]", Uo = "[object Array]", qo = "[object Boolean]", Ko = "[object Date]", Xo = "[object Error]", $t = "[object Function]", Jo = "[object GeneratorFunction]", Qo = "[object Map]", Zo = "[object Number]", Ot = "[object Object]", er = "[object RegExp]", tr = "[object Set]", ir = "[object String]", sr = "[object Symbol]", or = "[object WeakMap]", rr = "[object ArrayBuffer]", nr = "[object DataView]", ar = "[object Float32Array]", lr = "[object Float64Array]", hr = "[object Int8Array]", cr = "[object Int16Array]", dr = "[object Int32Array]", pr = "[object Uint8Array]", ur = "[object Uint8ClampedArray]", mr = "[object Uint16Array]", gr = "[object Uint32Array]", H = {};
1578
+ H[At] = H[Uo] = H[rr] = H[nr] = H[qo] = H[Ko] = H[ar] = H[lr] = H[hr] = H[cr] = H[dr] = H[Qo] = H[Zo] = H[Ot] = H[er] = H[tr] = H[ir] = H[sr] = H[pr] = H[ur] = H[mr] = H[gr] = !0;
1579
+ H[Xo] = H[$t] = H[or] = !1;
1574
1580
  function xe(a, t, e, i, r, s) {
1575
1581
  var o;
1576
1582
  if (o !== void 0)
1577
1583
  return o;
1578
- if (!_e(a))
1584
+ if (!De(a))
1579
1585
  return a;
1580
- var n = De(a);
1586
+ var n = _e(a);
1581
1587
  if (n)
1582
1588
  o = mo(a);
1583
1589
  else {
@@ -1587,7 +1593,7 @@ function xe(a, t, e, i, r, s) {
1587
1593
  if (l == Ot || l == At || c && !r)
1588
1594
  o = c ? {} : No(a);
1589
1595
  else {
1590
- if (!z[l])
1596
+ if (!H[l])
1591
1597
  return r ? a : {};
1592
1598
  o = zo(a, l);
1593
1599
  }
@@ -2004,7 +2010,7 @@ class Mr {
2004
2010
  translate(t, e) {
2005
2011
  let i = this.Cesium;
2006
2012
  const r = new i.Cartesian3();
2007
- De(e) ? (r.x = e[0], r.y = e[1], r.z = e[2]) : i.Cartesian3.clone(e, r);
2013
+ _e(e) ? (r.x = e[0], r.y = e[1], r.z = e[2]) : i.Cartesian3.clone(e, r);
2008
2014
  for (let s = 0; s < t.attributes.position.values.length; s += 3)
2009
2015
  t.attributes.position.values[s] += r.x, t.attributes.position.values[s + 1] += r.y, t.attributes.position.values[s + 2] += r.z;
2010
2016
  }
@@ -2299,7 +2305,7 @@ function xr(a, t) {
2299
2305
  }
2300
2306
  }), new d(t);
2301
2307
  }
2302
- class Dr {
2308
+ class _r {
2303
2309
  constructor() {
2304
2310
  h(this, "categoryMap", /* @__PURE__ */ new Map());
2305
2311
  h(this, "CategoryGet", {});
@@ -2442,7 +2448,7 @@ class br {
2442
2448
  h(this, "materialManager");
2443
2449
  h(this, "aggregator");
2444
2450
  h(this, "cardPool");
2445
- this.id = t, this.Cesium = e, this.viewer = i, this.materialManager = r, this.aggregator = s, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(oe.Click, {
2451
+ this.id = t, this.Cesium = e, this.viewer = i, this.materialManager = r, this.aggregator = s, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(ne.Click, {
2446
2452
  name: "BufferedHierarchicalAggregator_maker_click",
2447
2453
  fn: (l, c) => {
2448
2454
  this.cardPool.showByIds([l.data.id]);
@@ -2611,7 +2617,7 @@ class br {
2611
2617
  this.groupMap.forEach((t) => t.removeAll(this.viewer)), this.groupMap.clear();
2612
2618
  }
2613
2619
  }
2614
- class _r {
2620
+ class Dr {
2615
2621
  constructor(t, e, i, r, s) {
2616
2622
  h(this, "Cesium");
2617
2623
  h(this, "viewer");
@@ -3111,7 +3117,7 @@ class ht {
3111
3117
  const e = this.Cesium, i = this.viewer;
3112
3118
  if (!this.htmlLabelPool) {
3113
3119
  const r = t.overlayContainerId || "html-label-container";
3114
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-horizontal-total", {
3120
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-horizontal-total", {
3115
3121
  createElement: (s, o) => {
3116
3122
  var n;
3117
3123
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -3167,11 +3173,11 @@ class ht {
3167
3173
  }
3168
3174
  });
3169
3175
  this.segmentEntities.push(L);
3170
- const I = new e.EllipsoidGeodesic(M, P).surfaceDistance, D = new e.Cartesian3(
3176
+ const I = new e.EllipsoidGeodesic(M, P).surfaceDistance, _ = new e.Cartesian3(
3171
3177
  (b.x + v.x) / 2,
3172
3178
  (b.y + v.y) / 2,
3173
3179
  (b.z + v.z) / 2
3174
- ), S = e.Cartographic.fromCartesian(D), T = `measure_horizontal_seg_${this.segmentLabelIds.length}_${Date.now()}`;
3180
+ ), S = e.Cartographic.fromCartesian(_), T = `measure_horizontal_seg_${this.segmentLabelIds.length}_${Date.now()}`;
3175
3181
  this.segmentLabelIds.push(T), this.htmlLabelPool.add(
3176
3182
  { text: `${I.toFixed(2)} m` },
3177
3183
  {
@@ -3280,7 +3286,7 @@ class ht {
3280
3286
  if (!c.length) return;
3281
3287
  if (!this.htmlLabelPool) {
3282
3288
  const w = s.overlayContainerId || "html-label-container";
3283
- this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-horizontal-total", {
3289
+ this.htmlLabelPool = e || new N(i, r, w), this.htmlLabelPool.registerTheme("measure-horizontal-total", {
3284
3290
  createElement: (y, C) => {
3285
3291
  var b;
3286
3292
  y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
@@ -3316,9 +3322,9 @@ class ht {
3316
3322
  }
3317
3323
  });
3318
3324
  this.segmentEntities.push(b);
3319
- const v = i.Cartographic.fromCartesian(y), M = i.Cartographic.fromCartesian(C), L = new i.EllipsoidGeodesic(v, M).surfaceDistance, E = new i.Cartesian3((y.x + C.x) / 2, (y.y + C.y) / 2, (y.z + C.z) / 2), I = i.Cartographic.fromCartesian(E), D = t.id + `_seg_${w - 1}`;
3320
- this.segmentLabelIds.push(D), this.htmlLabelPool.add({ text: `${L.toFixed(2)} m` }, {
3321
- id: D,
3325
+ const v = i.Cartographic.fromCartesian(y), M = i.Cartographic.fromCartesian(C), L = new i.EllipsoidGeodesic(v, M).surfaceDistance, E = new i.Cartesian3((y.x + C.x) / 2, (y.y + C.y) / 2, (y.z + C.z) / 2), I = i.Cartographic.fromCartesian(E), _ = t.id + `_seg_${w - 1}`;
3326
+ this.segmentLabelIds.push(_), this.htmlLabelPool.add({ text: `${L.toFixed(2)} m` }, {
3327
+ id: _,
3322
3328
  lon: i.Math.toDegrees(I.longitude),
3323
3329
  lat: i.Math.toDegrees(I.latitude),
3324
3330
  height: I.height || 0,
@@ -3367,7 +3373,7 @@ class ct {
3367
3373
  const e = this.Cesium, i = this.viewer;
3368
3374
  if (!this.htmlLabelPool) {
3369
3375
  const r = t.overlayContainerId || "html-label-container";
3370
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-vertical", {
3376
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-vertical", {
3371
3377
  createElement: (s, o) => {
3372
3378
  var n;
3373
3379
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -3413,16 +3419,16 @@ class ct {
3413
3419
  if (!g) return;
3414
3420
  const p = g.origin, f = e.Cartesian3.normalize(g.direction, new e.Cartesian3()), w = m, y = this.baseUp, C = e.Cartesian3.subtract(p, w, new e.Cartesian3()), b = e.Cartesian3.dot(f, f), v = -e.Cartesian3.dot(f, y), M = e.Cartesian3.dot(y, y), P = -e.Cartesian3.dot(f, C), L = e.Cartesian3.dot(y, C), E = b * M - v * v;
3415
3421
  if (Math.abs(E) < 1e-6) return;
3416
- const I = (b * L - v * P) / E, D = e.Cartesian3.add(
3422
+ const I = (b * L - v * P) / E, _ = e.Cartesian3.add(
3417
3423
  w,
3418
3424
  e.Cartesian3.multiplyByScalar(y, I, new e.Cartesian3()),
3419
3425
  new e.Cartesian3()
3420
3426
  );
3421
- this.positions[1] = D, this.stop(), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3427
+ this.positions[1] = _, this.stop(), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3422
3428
  const S = t.lineColor || t.color || e.Color.CYAN, T = ((d = (c = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : d.call(c, 0.9)) || e.Color.RED;
3423
3429
  this.entity = i.entities.add({
3424
3430
  polyline: {
3425
- positions: [m, D],
3431
+ positions: [m, _],
3426
3432
  width: t.width || 3,
3427
3433
  material: S,
3428
3434
  depthFailMaterial: new e.PolylineDashMaterialProperty({
@@ -3432,26 +3438,26 @@ class ct {
3432
3438
  })
3433
3439
  }
3434
3440
  });
3435
- const _ = i.entities.add({
3436
- position: D,
3441
+ const D = i.entities.add({
3442
+ position: _,
3437
3443
  point: {
3438
3444
  pixelSize: 8,
3439
3445
  color: t.pointColor || t.color || e.Color.YELLOW,
3440
3446
  disableDepthTestDistance: Number.POSITIVE_INFINITY
3441
3447
  }
3442
3448
  });
3443
- this.tempPoints.push(_);
3444
- const x = this.baseCarto, A = e.Cartographic.fromCartesian(D), O = Math.abs((A.height || 0) - (x.height || 0)), $ = new e.Cartesian3(
3449
+ this.tempPoints.push(D);
3450
+ const x = this.baseCarto, A = e.Cartographic.fromCartesian(_), O = Math.abs((A.height || 0) - (x.height || 0)), $ = new e.Cartesian3(
3445
3451
  (this.positions[0].x + this.positions[1].x) / 2,
3446
3452
  (this.positions[0].y + this.positions[1].y) / 2,
3447
3453
  (this.positions[0].z + this.positions[1].z) / 2
3448
3454
  ), k = e.Cartographic.fromCartesian($);
3449
3455
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
3450
- const j = this.htmlLabelId || `measure_vertical_${Date.now()}`;
3451
- this.htmlLabelId = j, this.htmlLabelPool.add(
3456
+ const Y = this.htmlLabelId || `measure_vertical_${Date.now()}`;
3457
+ this.htmlLabelId = Y, this.htmlLabelPool.add(
3452
3458
  { text: `${O.toFixed(2)} m` },
3453
3459
  {
3454
- id: j,
3460
+ id: Y,
3455
3461
  lon: e.Math.toDegrees(k.longitude),
3456
3462
  lat: e.Math.toDegrees(k.latitude),
3457
3463
  height: k.height || 0,
@@ -3460,17 +3466,17 @@ class ct {
3460
3466
  style: { pointerEvents: "none", userSelect: "none", cursor: "default" }
3461
3467
  }
3462
3468
  );
3463
- const Y = {
3469
+ const V = {
3464
3470
  entity: this.entity,
3465
3471
  label: this.labelEntity,
3466
3472
  positions: this.positions,
3467
3473
  vertical: O,
3468
3474
  clear: () => this.clear()
3469
3475
  };
3470
- (u = t.onComplete) == null || u.call(t, Y);
3476
+ (u = t.onComplete) == null || u.call(t, V);
3471
3477
  }
3472
3478
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((r) => {
3473
- var D, S;
3479
+ var _, S;
3474
3480
  if (this.positions.length < 1) return;
3475
3481
  if (!this.baseCarto || !this.baseUp) {
3476
3482
  const T = e.Cartographic.fromCartesian(this.positions[0]);
@@ -3486,14 +3492,14 @@ class ct {
3486
3492
  new e.Cartesian3()
3487
3493
  );
3488
3494
  if (this.positions[1] = b, !this.previewEntity) {
3489
- const T = t.lineColor || t.color || e.Color.CYAN, _ = ((S = (D = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : S.call(D, 0.9)) || e.Color.RED;
3495
+ const T = t.lineColor || t.color || e.Color.CYAN, D = ((S = (_ = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : S.call(_, 0.9)) || e.Color.RED;
3490
3496
  this.previewEntity = i.entities.add({
3491
3497
  polyline: {
3492
3498
  positions: new e.CallbackProperty(() => this.positions.length < 2 ? [] : [this.positions[0], this.positions[1]], !1),
3493
3499
  width: t.width || 3,
3494
3500
  material: T,
3495
3501
  depthFailMaterial: new e.PolylineDashMaterialProperty({
3496
- color: _,
3502
+ color: D,
3497
3503
  dashLength: 12,
3498
3504
  dashPattern: 255
3499
3505
  })
@@ -3539,7 +3545,7 @@ class ct {
3539
3545
  if (c.length < 2) return;
3540
3546
  if (!this.htmlLabelPool) {
3541
3547
  const P = s.overlayContainerId || "html-label-container";
3542
- this.htmlLabelPool = e || new G(i, r, P), this.htmlLabelPool.registerTheme("measure-vertical", {
3548
+ this.htmlLabelPool = e || new N(i, r, P), this.htmlLabelPool.registerTheme("measure-vertical", {
3543
3549
  createElement: (L, E) => {
3544
3550
  var I;
3545
3551
  L.innerHTML = String(((I = E == null ? void 0 : E.data) == null ? void 0 : I.text) || ""), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
@@ -3591,7 +3597,7 @@ class dt {
3591
3597
  const e = this.Cesium, i = this.viewer;
3592
3598
  if (!this.htmlLabelPool) {
3593
3599
  const r = t.overlayContainerId || "html-label-container";
3594
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-triangle", {
3600
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-triangle", {
3595
3601
  createElement: (s, o) => {
3596
3602
  var n;
3597
3603
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -3625,7 +3631,7 @@ class dt {
3625
3631
  }
3626
3632
  });
3627
3633
  if (this.pointEntities.push(o), this.positions.length === 2) {
3628
- this.stop(), this.previewSegmentEntities.forEach((J) => i.entities.remove(J)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((J) => i.entities.remove(J)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (i.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3634
+ this.stop(), this.previewSegmentEntities.forEach((Z) => i.entities.remove(Z)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((Z) => i.entities.remove(Z)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (i.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3629
3635
  const d = e.Cartographic.fromCartesian(this.positions[0]), u = e.Cartographic.fromCartesian(this.positions[1]), m = d.height || 0, g = u.height || 0, p = m <= g ? this.positions[0] : this.positions[1], f = m > g ? this.positions[0] : this.positions[1], w = e.Cartographic.fromCartesian(p);
3630
3636
  e.Cartographic.fromCartesian(f);
3631
3637
  const y = Math.max(m, g), C = e.Cartesian3.fromDegrees(
@@ -3655,59 +3661,59 @@ class dt {
3655
3661
  }
3656
3662
  });
3657
3663
  this.segmentEntities.push(M, P, L);
3658
- const E = e.Cartesian3.distance(p, C), I = e.Cartesian3.distance(C, f), D = e.Cartesian3.distance(p, f), S = new e.Cartesian3((p.x + C.x) / 2, (p.y + C.y) / 2, (p.z + C.z) / 2), T = new e.Cartesian3((C.x + f.x) / 2, (C.y + f.y) / 2, (C.z + f.z) / 2), _ = new e.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = e.Cartographic.fromCartesian(S), A = e.Cartographic.fromCartesian(T), O = e.Cartographic.fromCartesian(_), $ = "measure_triangle_seg_v", k = "measure_triangle_seg_h", j = "measure_triangle_seg_hyp";
3659
- this.segmentLabelIds = [$, k, j], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: e.Math.toDegrees(x.longitude), lat: e.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: e.Math.toDegrees(A.longitude), lat: e.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${D.toFixed(2)} m` }, { id: j, lon: e.Math.toDegrees(O.longitude), lat: e.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3660
- const Y = e.Cartesian3.subtract(f, p, new e.Cartesian3()), B = e.Cartesian3.subtract(C, p, new e.Cartesian3()), V = e.Cartesian3.subtract(C, f, new e.Cartesian3()), R = e.Cartesian3.subtract(p, f, new e.Cartesian3()), se = e.Cartesian3.dot(Y, B), W = Math.sqrt(e.Cartesian3.dot(Y, Y)) * Math.sqrt(e.Cartesian3.dot(B, B)), ne = e.Cartesian3.dot(V, R), de = Math.sqrt(e.Cartesian3.dot(V, V)) * Math.sqrt(e.Cartesian3.dot(R, R)), H = Math.acos(Math.min(Math.max(se / (W || 1), -1), 1)), te = Math.acos(Math.min(Math.max(ne / (de || 1), -1), 1)), ee = e.Cartographic.fromCartesian(p), U = e.Cartographic.fromCartesian(f), Q = "measure_triangle_angle_a", ae = "measure_triangle_angle_b";
3661
- this.angleLabelIds = [Q, ae], this.htmlLabelPool.add({ text: `${(H * 180 / Math.PI).toFixed(2)}°` }, { id: Q, lon: e.Math.toDegrees(ee.longitude), lat: e.Math.toDegrees(ee.latitude), height: ee.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(te * 180 / Math.PI).toFixed(2)}°` }, { id: ae, lon: e.Math.toDegrees(U.longitude), lat: e.Math.toDegrees(U.latitude), height: U.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3662
- const ge = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), q = Math.min(E, I) * ge;
3664
+ const E = e.Cartesian3.distance(p, C), I = e.Cartesian3.distance(C, f), _ = e.Cartesian3.distance(p, f), S = new e.Cartesian3((p.x + C.x) / 2, (p.y + C.y) / 2, (p.z + C.z) / 2), T = new e.Cartesian3((C.x + f.x) / 2, (C.y + f.y) / 2, (C.z + f.z) / 2), D = new e.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = e.Cartographic.fromCartesian(S), A = e.Cartographic.fromCartesian(T), O = e.Cartographic.fromCartesian(D), $ = "measure_triangle_seg_v", k = "measure_triangle_seg_h", Y = "measure_triangle_seg_hyp";
3665
+ this.segmentLabelIds = [$, k, Y], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: e.Math.toDegrees(x.longitude), lat: e.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: e.Math.toDegrees(A.longitude), lat: e.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${_.toFixed(2)} m` }, { id: Y, lon: e.Math.toDegrees(O.longitude), lat: e.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3666
+ const V = e.Cartesian3.subtract(f, p, new e.Cartesian3()), G = e.Cartesian3.subtract(C, p, new e.Cartesian3()), U = e.Cartesian3.subtract(C, f, new e.Cartesian3()), q = e.Cartesian3.subtract(p, f, new e.Cartesian3()), ie = e.Cartesian3.dot(V, G), B = Math.sqrt(e.Cartesian3.dot(V, V)) * Math.sqrt(e.Cartesian3.dot(G, G)), de = e.Cartesian3.dot(U, q), K = Math.sqrt(e.Cartesian3.dot(U, U)) * Math.sqrt(e.Cartesian3.dot(q, q)), j = Math.acos(Math.min(Math.max(ie / (B || 1), -1), 1)), re = Math.acos(Math.min(Math.max(de / (K || 1), -1), 1)), te = e.Cartographic.fromCartesian(p), R = e.Cartographic.fromCartesian(f), W = "measure_triangle_angle_a", se = "measure_triangle_angle_b";
3667
+ this.angleLabelIds = [W, se], this.htmlLabelPool.add({ text: `${(j * 180 / Math.PI).toFixed(2)}°` }, { id: W, lon: e.Math.toDegrees(te.longitude), lat: e.Math.toDegrees(te.latitude), height: te.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(re * 180 / Math.PI).toFixed(2)}°` }, { id: se, lon: e.Math.toDegrees(R.longitude), lat: e.Math.toDegrees(R.latitude), height: R.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3668
+ const ge = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), X = Math.min(E, I) * ge;
3663
3669
  if (E > 1e-3 && I > 1e-3) {
3664
- const J = e.Cartesian3.normalize(
3670
+ const Z = e.Cartesian3.normalize(
3665
3671
  e.Cartesian3.subtract(p, C, new e.Cartesian3()),
3666
3672
  new e.Cartesian3()
3667
3673
  ), le = e.Cartesian3.normalize(
3668
3674
  e.Cartesian3.subtract(f, C, new e.Cartesian3()),
3669
3675
  new e.Cartesian3()
3670
- ), Z = new e.Cartesian3(
3671
- C.x + J.x * q,
3672
- C.y + J.y * q,
3673
- C.z + J.z * q
3676
+ ), ee = new e.Cartesian3(
3677
+ C.x + Z.x * X,
3678
+ C.y + Z.y * X,
3679
+ C.z + Z.z * X
3674
3680
  ), F = new e.Cartesian3(
3675
- C.x + le.x * q,
3676
- C.y + le.y * q,
3677
- C.z + le.z * q
3678
- ), X = new e.Cartesian3(
3679
- C.x + J.x * q + le.x * q,
3680
- C.y + J.y * q + le.y * q,
3681
- C.z + J.z * q + le.z * q
3682
- ), ie = i.entities.add({
3681
+ C.x + le.x * X,
3682
+ C.y + le.y * X,
3683
+ C.z + le.z * X
3684
+ ), Q = new e.Cartesian3(
3685
+ C.x + Z.x * X + le.x * X,
3686
+ C.y + Z.y * X + le.y * X,
3687
+ C.z + Z.z * X + le.z * X
3688
+ ), oe = i.entities.add({
3683
3689
  polyline: {
3684
- positions: [Z, X],
3690
+ positions: [ee, Q],
3685
3691
  width: t.width || 3,
3686
3692
  material: b,
3687
3693
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3688
3694
  }
3689
3695
  }), Ie = i.entities.add({
3690
3696
  polyline: {
3691
- positions: [F, X],
3697
+ positions: [F, Q],
3692
3698
  width: t.width || 3,
3693
3699
  material: b,
3694
3700
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3695
3701
  }
3696
3702
  });
3697
- this.angleMarkerEntities.push(ie, Ie);
3703
+ this.angleMarkerEntities.push(oe, Ie);
3698
3704
  }
3699
3705
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
3700
- const K = {
3706
+ const J = {
3701
3707
  entity: this.segmentEntities,
3702
3708
  positions: [p, f, C],
3703
- lengths: { vertical: E, horizontal: I, hypotenuse: D },
3704
- angles: { acuteA: H, acuteB: te },
3709
+ lengths: { vertical: E, horizontal: I, hypotenuse: _ },
3710
+ angles: { acuteA: j, acuteB: re },
3705
3711
  clear: () => this.clear()
3706
3712
  };
3707
- (c = t.onComplete) == null || c.call(t, K);
3713
+ (c = t.onComplete) == null || c.call(t, J);
3708
3714
  }
3709
3715
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((r) => {
3710
- var te, ee;
3716
+ var re, te;
3711
3717
  if (this.positions.length !== 1) return;
3712
3718
  const s = i.scene.pickPosition(r.endPosition);
3713
3719
  if (!s) return;
@@ -3717,7 +3723,7 @@ class dt {
3717
3723
  g
3718
3724
  );
3719
3725
  this.previewLow = d, this.previewHigh = u, this.previewThird = p;
3720
- const f = t.lineColor || t.color || e.Color.YELLOW, w = ((ee = (te = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : ee.call(te, 0.9)) || e.Color.RED;
3726
+ const f = t.lineColor || t.color || e.Color.YELLOW, w = ((te = (re = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : te.call(re, 0.9)) || e.Color.RED;
3721
3727
  if (this.previewPointEntity ? this.previewPointEntity.position = s : this.previewPointEntity = i.entities.add({
3722
3728
  position: s,
3723
3729
  point: {
@@ -3726,21 +3732,21 @@ class dt {
3726
3732
  disableDepthTestDistance: Number.POSITIVE_INFINITY
3727
3733
  }
3728
3734
  }), !this.previewSegmentEntities.length) {
3729
- const U = i.entities.add({
3735
+ const R = i.entities.add({
3730
3736
  polyline: {
3731
3737
  positions: new e.CallbackProperty(() => !this.previewLow || !this.previewThird ? [] : [this.previewLow, this.previewThird], !1),
3732
3738
  width: t.width || 3,
3733
3739
  material: f,
3734
3740
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3735
3741
  }
3736
- }), Q = i.entities.add({
3742
+ }), W = i.entities.add({
3737
3743
  polyline: {
3738
3744
  positions: new e.CallbackProperty(() => !this.previewThird || !this.previewHigh ? [] : [this.previewThird, this.previewHigh], !1),
3739
3745
  width: t.width || 3,
3740
3746
  material: f,
3741
3747
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3742
3748
  }
3743
- }), ae = i.entities.add({
3749
+ }), se = i.entities.add({
3744
3750
  polyline: {
3745
3751
  positions: new e.CallbackProperty(() => !this.previewLow || !this.previewHigh ? [] : [this.previewLow, this.previewHigh], !1),
3746
3752
  width: t.width || 3,
@@ -3748,40 +3754,40 @@ class dt {
3748
3754
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3749
3755
  }
3750
3756
  });
3751
- this.previewSegmentEntities.push(U, Q, ae);
3757
+ this.previewSegmentEntities.push(R, W, se);
3752
3758
  }
3753
- const y = e.Cartesian3.distance(d, p), C = e.Cartesian3.distance(p, u), b = e.Cartesian3.distance(d, u), v = e.Cartesian3.subtract(u, d, new e.Cartesian3()), M = e.Cartesian3.subtract(p, d, new e.Cartesian3()), P = e.Cartesian3.subtract(p, u, new e.Cartesian3()), L = e.Cartesian3.subtract(d, u, new e.Cartesian3()), E = e.Cartesian3.dot(v, M), I = Math.sqrt(e.Cartesian3.dot(v, v)) * Math.sqrt(e.Cartesian3.dot(M, M)), D = e.Cartesian3.dot(P, L), S = Math.sqrt(e.Cartesian3.dot(P, P)) * Math.sqrt(e.Cartesian3.dot(L, L)), T = Math.acos(Math.min(Math.max(E / (I || 1), -1), 1)), _ = Math.acos(Math.min(Math.max(D / (S || 1), -1), 1)), x = new e.Cartesian3((d.x + p.x) / 2, (d.y + p.y) / 2, (d.z + p.z) / 2), A = new e.Cartesian3((p.x + u.x) / 2, (p.y + u.y) / 2, (p.z + u.z) / 2), O = new e.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), $ = e.Cartographic.fromCartesian(x), k = e.Cartographic.fromCartesian(A), j = e.Cartographic.fromCartesian(O), Y = e.Cartographic.fromCartesian(d), B = e.Cartographic.fromCartesian(u), V = "measure_triangle_seg_v", R = "measure_triangle_seg_h", se = "measure_triangle_seg_hyp", W = "measure_triangle_angle_a", ne = "measure_triangle_angle_b";
3754
- this.segmentLabelIds.length === 0 && (this.segmentLabelIds = [V, R, se]), this.angleLabelIds.length === 0 && (this.angleLabelIds = [W, ne]), this.htmlLabelPool.add({ text: `${y.toFixed(2)} m` }, { id: V, lon: e.Math.toDegrees($.longitude), lat: e.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${C.toFixed(2)} m` }, { id: R, lon: e.Math.toDegrees(k.longitude), lat: e.Math.toDegrees(k.latitude), height: k.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${b.toFixed(2)} m` }, { id: se, lon: e.Math.toDegrees(j.longitude), lat: e.Math.toDegrees(j.latitude), height: j.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(T * 180 / Math.PI).toFixed(2)}°` }, { id: W, lon: e.Math.toDegrees(Y.longitude), lat: e.Math.toDegrees(Y.latitude), height: Y.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(_ * 180 / Math.PI).toFixed(2)}°` }, { id: ne, lon: e.Math.toDegrees(B.longitude), lat: e.Math.toDegrees(B.latitude), height: B.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3755
- const de = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), H = Math.min(y, C) * de;
3759
+ const y = e.Cartesian3.distance(d, p), C = e.Cartesian3.distance(p, u), b = e.Cartesian3.distance(d, u), v = e.Cartesian3.subtract(u, d, new e.Cartesian3()), M = e.Cartesian3.subtract(p, d, new e.Cartesian3()), P = e.Cartesian3.subtract(p, u, new e.Cartesian3()), L = e.Cartesian3.subtract(d, u, new e.Cartesian3()), E = e.Cartesian3.dot(v, M), I = Math.sqrt(e.Cartesian3.dot(v, v)) * Math.sqrt(e.Cartesian3.dot(M, M)), _ = e.Cartesian3.dot(P, L), S = Math.sqrt(e.Cartesian3.dot(P, P)) * Math.sqrt(e.Cartesian3.dot(L, L)), T = Math.acos(Math.min(Math.max(E / (I || 1), -1), 1)), D = Math.acos(Math.min(Math.max(_ / (S || 1), -1), 1)), x = new e.Cartesian3((d.x + p.x) / 2, (d.y + p.y) / 2, (d.z + p.z) / 2), A = new e.Cartesian3((p.x + u.x) / 2, (p.y + u.y) / 2, (p.z + u.z) / 2), O = new e.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), $ = e.Cartographic.fromCartesian(x), k = e.Cartographic.fromCartesian(A), Y = e.Cartographic.fromCartesian(O), V = e.Cartographic.fromCartesian(d), G = e.Cartographic.fromCartesian(u), U = "measure_triangle_seg_v", q = "measure_triangle_seg_h", ie = "measure_triangle_seg_hyp", B = "measure_triangle_angle_a", de = "measure_triangle_angle_b";
3760
+ this.segmentLabelIds.length === 0 && (this.segmentLabelIds = [U, q, ie]), this.angleLabelIds.length === 0 && (this.angleLabelIds = [B, de]), this.htmlLabelPool.add({ text: `${y.toFixed(2)} m` }, { id: U, lon: e.Math.toDegrees($.longitude), lat: e.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${C.toFixed(2)} m` }, { id: q, lon: e.Math.toDegrees(k.longitude), lat: e.Math.toDegrees(k.latitude), height: k.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${b.toFixed(2)} m` }, { id: ie, lon: e.Math.toDegrees(Y.longitude), lat: e.Math.toDegrees(Y.latitude), height: Y.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(T * 180 / Math.PI).toFixed(2)}°` }, { id: B, lon: e.Math.toDegrees(V.longitude), lat: e.Math.toDegrees(V.latitude), height: V.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(D * 180 / Math.PI).toFixed(2)}°` }, { id: de, lon: e.Math.toDegrees(G.longitude), lat: e.Math.toDegrees(G.latitude), height: G.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3761
+ const K = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), j = Math.min(y, C) * K;
3756
3762
  if (y > 1e-3 && C > 1e-3) {
3757
- const U = e.Cartesian3.normalize(
3763
+ const R = e.Cartesian3.normalize(
3758
3764
  e.Cartesian3.subtract(d, p, new e.Cartesian3()),
3759
3765
  new e.Cartesian3()
3760
- ), Q = e.Cartesian3.normalize(
3766
+ ), W = e.Cartesian3.normalize(
3761
3767
  e.Cartesian3.subtract(u, p, new e.Cartesian3()),
3762
3768
  new e.Cartesian3()
3763
- ), ae = new e.Cartesian3(
3764
- p.x + U.x * H,
3765
- p.y + U.y * H,
3766
- p.z + U.z * H
3769
+ ), se = new e.Cartesian3(
3770
+ p.x + R.x * j,
3771
+ p.y + R.y * j,
3772
+ p.z + R.z * j
3767
3773
  ), ge = new e.Cartesian3(
3768
- p.x + Q.x * H,
3769
- p.y + Q.y * H,
3770
- p.z + Q.z * H
3771
- ), q = new e.Cartesian3(
3772
- p.x + U.x * H + Q.x * H,
3773
- p.y + U.y * H + Q.y * H,
3774
- p.z + U.z * H + Q.z * H
3774
+ p.x + W.x * j,
3775
+ p.y + W.y * j,
3776
+ p.z + W.z * j
3777
+ ), X = new e.Cartesian3(
3778
+ p.x + R.x * j + W.x * j,
3779
+ p.y + R.y * j + W.y * j,
3780
+ p.z + R.z * j + W.z * j
3775
3781
  );
3776
- if (this.previewMarkerP1 = ae, this.previewMarkerP2 = ge, this.previewMarkerCorner = q, !this.previewAngleMarkerEntities.length) {
3777
- const K = i.entities.add({
3782
+ if (this.previewMarkerP1 = se, this.previewMarkerP2 = ge, this.previewMarkerCorner = X, !this.previewAngleMarkerEntities.length) {
3783
+ const J = i.entities.add({
3778
3784
  polyline: {
3779
3785
  positions: new e.CallbackProperty(() => !this.previewMarkerP1 || !this.previewMarkerCorner ? [] : [this.previewMarkerP1, this.previewMarkerCorner], !1),
3780
3786
  width: t.width || 3,
3781
3787
  material: f,
3782
3788
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3783
3789
  }
3784
- }), J = i.entities.add({
3790
+ }), Z = i.entities.add({
3785
3791
  polyline: {
3786
3792
  positions: new e.CallbackProperty(() => !this.previewMarkerP2 || !this.previewMarkerCorner ? [] : [this.previewMarkerP2, this.previewMarkerCorner], !1),
3787
3793
  width: t.width || 3,
@@ -3789,7 +3795,7 @@ class dt {
3789
3795
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3790
3796
  }
3791
3797
  });
3792
- this.previewAngleMarkerEntities.push(K, J);
3798
+ this.previewAngleMarkerEntities.push(J, Z);
3793
3799
  }
3794
3800
  }
3795
3801
  }, e.ScreenSpaceEventType.MOUSE_MOVE);
@@ -3801,27 +3807,27 @@ class dt {
3801
3807
  this.stop(), this.segmentEntities.forEach((t) => this.viewer.entities.remove(t)), this.segmentEntities = [], this.angleMarkerEntities.forEach((t) => this.viewer.entities.remove(t)), this.angleMarkerEntities = [], this.pointEntities.forEach((t) => this.viewer.entities.remove(t)), this.pointEntities = [], this.previewSegmentEntities.forEach((t) => this.viewer.entities.remove(t)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((t) => this.viewer.entities.remove(t)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null), this.htmlLabelPool && this.htmlLabelId && (this.htmlLabelPool.removeByIds([this.htmlLabelId]), this.htmlLabelId = null), this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null), this.segmentLabelIds.length && this.htmlLabelPool && this.htmlLabelPool.removeByIds(this.segmentLabelIds.slice()), this.angleLabelIds.length && this.htmlLabelPool && this.htmlLabelPool.removeByIds(this.angleLabelIds.slice()), this.segmentLabelIds = [], this.angleLabelIds = [], this.positions = [];
3802
3808
  }
3803
3809
  rehydrate(t, e) {
3804
- var J, le;
3805
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.YELLOW, n = ((le = (J = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : le.call(J, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((Z) => new i.Cartesian3(Z[0], Z[1], Z[2]));
3810
+ var Z, le;
3811
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.YELLOW, n = ((le = (Z = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : le.call(Z, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((ee) => new i.Cartesian3(ee[0], ee[1], ee[2]));
3806
3812
  if (c.length < 2) return;
3807
3813
  if (!this.htmlLabelPool) {
3808
- const Z = s.overlayContainerId || "html-label-container";
3809
- this.htmlLabelPool = e || new G(i, r, Z), this.htmlLabelPool.registerTheme("measure-triangle", {
3810
- createElement: (F, X) => {
3811
- var ie;
3812
- F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3814
+ const ee = s.overlayContainerId || "html-label-container";
3815
+ this.htmlLabelPool = e || new N(i, r, ee), this.htmlLabelPool.registerTheme("measure-triangle", {
3816
+ createElement: (F, Q) => {
3817
+ var oe;
3818
+ F.innerHTML = String(((oe = Q == null ? void 0 : Q.data) == null ? void 0 : oe.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3813
3819
  },
3814
3820
  options: { offset: { x: 0, y: -10 } }
3815
3821
  }), this.htmlLabelPool.registerTheme("measure-triangle-seg", {
3816
- createElement: (F, X) => {
3817
- var ie;
3818
- F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3822
+ createElement: (F, Q) => {
3823
+ var oe;
3824
+ F.innerHTML = String(((oe = Q == null ? void 0 : Q.data) == null ? void 0 : oe.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3819
3825
  },
3820
3826
  options: { offset: { x: 0, y: -10 } }
3821
3827
  }), this.htmlLabelPool.registerTheme("measure-triangle-angle", {
3822
- createElement: (F, X) => {
3823
- var ie;
3824
- F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3828
+ createElement: (F, Q) => {
3829
+ var oe;
3830
+ F.innerHTML = String(((oe = Q == null ? void 0 : Q.data) == null ? void 0 : oe.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3825
3831
  },
3826
3832
  options: { offset: { x: 0, y: -10 } }
3827
3833
  });
@@ -3840,13 +3846,13 @@ class dt {
3840
3846
  polyline: { positions: [p, f], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3841
3847
  });
3842
3848
  this.segmentEntities.push(M, P, L);
3843
- const E = i.Cartesian3.distance(p, v), I = i.Cartesian3.distance(v, f), D = i.Cartesian3.distance(p, f), S = new i.Cartesian3((p.x + v.x) / 2, (p.y + v.y) / 2, (p.z + v.z) / 2), T = new i.Cartesian3((v.x + f.x) / 2, (v.y + f.y) / 2, (v.z + f.z) / 2), _ = new i.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = i.Cartographic.fromCartesian(S), A = i.Cartographic.fromCartesian(T), O = i.Cartographic.fromCartesian(_), $ = t.id + "_tri_v", k = t.id + "_tri_h", j = t.id + "_tri_hyp";
3844
- this.segmentLabelIds = [$, k, j], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(x.longitude), lat: i.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${D.toFixed(2)} m` }, { id: j, lon: i.Math.toDegrees(O.longitude), lat: i.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3845
- const Y = i.Cartesian3.subtract(f, p, new i.Cartesian3()), B = i.Cartesian3.subtract(v, p, new i.Cartesian3()), V = i.Cartesian3.subtract(v, f, new i.Cartesian3()), R = i.Cartesian3.subtract(p, f, new i.Cartesian3()), se = i.Cartesian3.dot(Y, B), W = Math.sqrt(i.Cartesian3.dot(Y, Y)) * Math.sqrt(i.Cartesian3.dot(B, B)), ne = i.Cartesian3.dot(V, R), de = Math.sqrt(i.Cartesian3.dot(V, V)) * Math.sqrt(i.Cartesian3.dot(R, R)), H = Math.acos(Math.min(Math.max(se / (W || 1), -1), 1)), te = Math.acos(Math.min(Math.max(ne / (de || 1), -1), 1)), ee = i.Cartographic.fromCartesian(p), U = i.Cartographic.fromCartesian(f), Q = s.labelText || { angle: "角度" }, ae = t.id + "_tri_angA", ge = t.id + "_tri_angB";
3846
- this.angleLabelIds = [ae, ge], this.htmlLabelPool.add({ text: `${Q.angle}:${(H * 180 / Math.PI).toFixed(2)}°` }, { id: ae, lon: i.Math.toDegrees(ee.longitude), lat: i.Math.toDegrees(ee.latitude), height: ee.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${Q.angle}:${(te * 180 / Math.PI).toFixed(2)}°` }, { id: ge, lon: i.Math.toDegrees(U.longitude), lat: i.Math.toDegrees(U.latitude), height: U.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3847
- const q = Math.max(0.01, Math.min(0.5, s.angleMarkerRatio ?? 0.2)), K = Math.min(E, I) * q;
3849
+ const E = i.Cartesian3.distance(p, v), I = i.Cartesian3.distance(v, f), _ = i.Cartesian3.distance(p, f), S = new i.Cartesian3((p.x + v.x) / 2, (p.y + v.y) / 2, (p.z + v.z) / 2), T = new i.Cartesian3((v.x + f.x) / 2, (v.y + f.y) / 2, (v.z + f.z) / 2), D = new i.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = i.Cartographic.fromCartesian(S), A = i.Cartographic.fromCartesian(T), O = i.Cartographic.fromCartesian(D), $ = t.id + "_tri_v", k = t.id + "_tri_h", Y = t.id + "_tri_hyp";
3850
+ this.segmentLabelIds = [$, k, Y], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(x.longitude), lat: i.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${_.toFixed(2)} m` }, { id: Y, lon: i.Math.toDegrees(O.longitude), lat: i.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3851
+ const V = i.Cartesian3.subtract(f, p, new i.Cartesian3()), G = i.Cartesian3.subtract(v, p, new i.Cartesian3()), U = i.Cartesian3.subtract(v, f, new i.Cartesian3()), q = i.Cartesian3.subtract(p, f, new i.Cartesian3()), ie = i.Cartesian3.dot(V, G), B = Math.sqrt(i.Cartesian3.dot(V, V)) * Math.sqrt(i.Cartesian3.dot(G, G)), de = i.Cartesian3.dot(U, q), K = Math.sqrt(i.Cartesian3.dot(U, U)) * Math.sqrt(i.Cartesian3.dot(q, q)), j = Math.acos(Math.min(Math.max(ie / (B || 1), -1), 1)), re = Math.acos(Math.min(Math.max(de / (K || 1), -1), 1)), te = i.Cartographic.fromCartesian(p), R = i.Cartographic.fromCartesian(f), W = s.labelText || { angle: "角度" }, se = t.id + "_tri_angA", ge = t.id + "_tri_angB";
3852
+ this.angleLabelIds = [se, ge], this.htmlLabelPool.add({ text: `${W.angle}:${(j * 180 / Math.PI).toFixed(2)}°` }, { id: se, lon: i.Math.toDegrees(te.longitude), lat: i.Math.toDegrees(te.latitude), height: te.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${W.angle}:${(re * 180 / Math.PI).toFixed(2)}°` }, { id: ge, lon: i.Math.toDegrees(R.longitude), lat: i.Math.toDegrees(R.latitude), height: R.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3853
+ const X = Math.max(0.01, Math.min(0.5, s.angleMarkerRatio ?? 0.2)), J = Math.min(E, I) * X;
3848
3854
  if (E > 1e-3 && I > 1e-3) {
3849
- const Z = i.Cartesian3.normalize(i.Cartesian3.subtract(p, v, new i.Cartesian3()), new i.Cartesian3()), F = i.Cartesian3.normalize(i.Cartesian3.subtract(f, v, new i.Cartesian3()), new i.Cartesian3()), X = new i.Cartesian3(v.x + Z.x * K, v.y + Z.y * K, v.z + Z.z * K), ie = new i.Cartesian3(v.x + F.x * K, v.y + F.y * K, v.z + F.z * K), Ie = new i.Cartesian3(v.x + Z.x * K + F.x * K, v.y + Z.y * K + F.y * K, v.z + Z.z * K + F.z * K), Ft = r.entities.add({ polyline: { positions: [X, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } }), kt = r.entities.add({ polyline: { positions: [ie, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
3855
+ const ee = i.Cartesian3.normalize(i.Cartesian3.subtract(p, v, new i.Cartesian3()), new i.Cartesian3()), F = i.Cartesian3.normalize(i.Cartesian3.subtract(f, v, new i.Cartesian3()), new i.Cartesian3()), Q = new i.Cartesian3(v.x + ee.x * J, v.y + ee.y * J, v.z + ee.z * J), oe = new i.Cartesian3(v.x + F.x * J, v.y + F.y * J, v.z + F.z * J), Ie = new i.Cartesian3(v.x + ee.x * J + F.x * J, v.y + ee.y * J + F.y * J, v.z + ee.z * J + F.z * J), Ft = r.entities.add({ polyline: { positions: [Q, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } }), kt = r.entities.add({ polyline: { positions: [oe, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
3850
3856
  this.angleMarkerEntities.push(Ft, kt);
3851
3857
  }
3852
3858
  }
@@ -3872,7 +3878,7 @@ class pt {
3872
3878
  const e = this.Cesium, i = this.viewer;
3873
3879
  if (!this.htmlLabelPool) {
3874
3880
  const r = t.overlayContainerId || "html-label-container";
3875
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-space", {
3881
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-space", {
3876
3882
  createElement: (s, o) => {
3877
3883
  var n;
3878
3884
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -3980,7 +3986,7 @@ class pt {
3980
3986
  if (c.length) {
3981
3987
  if (!this.htmlLabelPool) {
3982
3988
  const m = s.overlayContainerId || "html-label-container";
3983
- this.htmlLabelPool = e || new G(i, r, m), this.htmlLabelPool.registerTheme("measure-space", {
3989
+ this.htmlLabelPool = e || new N(i, r, m), this.htmlLabelPool.registerTheme("measure-space", {
3984
3990
  createElement: (g, p) => {
3985
3991
  var f;
3986
3992
  g.innerHTML = String(((f = p == null ? void 0 : p.data) == null ? void 0 : f.text) || ""), g.style.background = "rgba(0,0,0,0.6)", g.style.color = "#fff", g.style.font = "14px sans-serif", g.style.padding = "4px 6px", g.style.borderRadius = "4px", g.style.whiteSpace = "pre";
@@ -4044,7 +4050,7 @@ class ut {
4044
4050
  const e = this.Cesium, i = this.viewer;
4045
4051
  if (!this.htmlLabelPool) {
4046
4052
  const r = t.overlayContainerId || "html-label-container";
4047
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-area", {
4053
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-area", {
4048
4054
  createElement: (s, o) => {
4049
4055
  var n;
4050
4056
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -4253,14 +4259,14 @@ class ut {
4253
4259
  for (let p = 0; p < u.length; p++) {
4254
4260
  const f = u[(p - 1 + u.length) % u.length], w = u[p], y = u[(p + 1) % u.length], C = f.x - w.x, b = f.y - w.y, v = y.x - w.x, M = y.y - w.y, P = Math.sqrt(C * C + b * b), L = Math.sqrt(v * v + M * M);
4255
4261
  if (!P || !L) continue;
4256
- const E = C / P * (v / L) + b / P * (M / L), I = Math.acos(Math.min(1, Math.max(-1, E))) * (180 / Math.PI), D = e.Cartographic.fromCartesian(this.positions[p]), S = `measure_area_angle_${Date.now()}_${p}`;
4262
+ const E = C / P * (v / L) + b / P * (M / L), I = Math.acos(Math.min(1, Math.max(-1, E))) * (180 / Math.PI), _ = e.Cartographic.fromCartesian(this.positions[p]), S = `measure_area_angle_${Date.now()}_${p}`;
4257
4263
  this.angleLabelIds.push(S), this.htmlLabelPool.add(
4258
4264
  { text: `${d.angle}:${I.toFixed(2)} °` },
4259
4265
  {
4260
4266
  id: S,
4261
- lon: e.Math.toDegrees(D.longitude),
4262
- lat: e.Math.toDegrees(D.latitude),
4263
- height: D.height || 0,
4267
+ lon: e.Math.toDegrees(_.longitude),
4268
+ lat: e.Math.toDegrees(_.latitude),
4269
+ height: _.height || 0,
4264
4270
  theme: "measure-area-angle",
4265
4271
  show: !0
4266
4272
  }
@@ -4311,7 +4317,7 @@ class ut {
4311
4317
  if (o.length < 3) return;
4312
4318
  if (!this.htmlLabelPool) {
4313
4319
  const M = s.overlayContainerId || "html-label-container";
4314
- this.htmlLabelPool = e || new G(i, r, M), this.htmlLabelPool.registerTheme("measure-area", {
4320
+ this.htmlLabelPool = e || new N(i, r, M), this.htmlLabelPool.registerTheme("measure-area", {
4315
4321
  createElement: (P, L) => {
4316
4322
  var E;
4317
4323
  P.innerHTML = String(((E = L == null ? void 0 : L.data) == null ? void 0 : E.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
@@ -4364,14 +4370,14 @@ class ut {
4364
4370
  });
4365
4371
  r.scene.primitives.add(b), this.primitive = b;
4366
4372
  for (let M = 0; M < o.length; M++) {
4367
- const P = (M + 1) % o.length, L = o[M], E = o[P], I = i.Cartographic.fromCartesian(L), D = i.Cartographic.fromCartesian(E), T = new i.EllipsoidGeodesic(I, D).surfaceDistance, _ = new i.Cartesian3((L.x + E.x) / 2, (L.y + E.y) / 2, (L.z + E.z) / 2), x = i.Cartographic.fromCartesian(_), A = t.id + `_area_seg_${M}`;
4373
+ const P = (M + 1) % o.length, L = o[M], E = o[P], I = i.Cartographic.fromCartesian(L), _ = i.Cartographic.fromCartesian(E), T = new i.EllipsoidGeodesic(I, _).surfaceDistance, D = new i.Cartesian3((L.x + E.x) / 2, (L.y + E.y) / 2, (L.z + E.z) / 2), x = i.Cartographic.fromCartesian(D), A = t.id + `_area_seg_${M}`;
4368
4374
  this.segmentLabelIds.push(A), this.htmlLabelPool.add({ text: `${g.side}:${T.toFixed(2)} m` }, { id: A, lon: i.Math.toDegrees(x.longitude), lat: i.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-area-seg", show: !0 });
4369
4375
  }
4370
4376
  const v = c;
4371
4377
  for (let M = 0; M < v.length; M++) {
4372
- const P = v[(M - 1 + v.length) % v.length], L = v[M], E = v[(M + 1) % v.length], I = P.x - L.x, D = P.y - L.y, S = E.x - L.x, T = E.y - L.y, _ = Math.sqrt(I * I + D * D), x = Math.sqrt(S * S + T * T);
4373
- if (!_ || !x) continue;
4374
- const A = I / _ * (S / x) + D / _ * (T / x), O = Math.acos(Math.min(1, Math.max(-1, A))) * (180 / Math.PI), $ = i.Cartographic.fromCartesian(o[M]), k = t.id + `_area_angle_${M}`;
4378
+ const P = v[(M - 1 + v.length) % v.length], L = v[M], E = v[(M + 1) % v.length], I = P.x - L.x, _ = P.y - L.y, S = E.x - L.x, T = E.y - L.y, D = Math.sqrt(I * I + _ * _), x = Math.sqrt(S * S + T * T);
4379
+ if (!D || !x) continue;
4380
+ const A = I / D * (S / x) + _ / D * (T / x), O = Math.acos(Math.min(1, Math.max(-1, A))) * (180 / Math.PI), $ = i.Cartographic.fromCartesian(o[M]), k = t.id + `_area_angle_${M}`;
4375
4381
  this.angleLabelIds.push(k), this.htmlLabelPool.add({ text: `${g.angle}:${O.toFixed(2)} °` }, { id: k, lon: i.Math.toDegrees($.longitude), lat: i.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-area-angle", show: !0 });
4376
4382
  }
4377
4383
  }
@@ -4398,7 +4404,7 @@ class mt {
4398
4404
  const e = this.Cesium, i = this.viewer;
4399
4405
  if (!this.htmlLabelPool) {
4400
4406
  const r = t.overlayContainerId || "html-label-container";
4401
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-circle", {
4407
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-circle", {
4402
4408
  createElement: (s, o) => {
4403
4409
  var l;
4404
4410
  const n = ((l = o == null ? void 0 : o.data) == null ? void 0 : l.text) || "";
@@ -4531,10 +4537,10 @@ ${m.circumference}:${u.toFixed(2)} m`;
4531
4537
  if (o.length < 2) return;
4532
4538
  if (!this.htmlLabelPool) {
4533
4539
  const P = s.overlayContainerId || "html-label-container";
4534
- this.htmlLabelPool = e || new G(i, r, P), this.htmlLabelPool.registerTheme("measure-circle", {
4540
+ this.htmlLabelPool = e || new N(i, r, P), this.htmlLabelPool.registerTheme("measure-circle", {
4535
4541
  createElement: (L, E) => {
4536
- var D;
4537
- const I = ((D = E == null ? void 0 : E.data) == null ? void 0 : D.text) || "";
4542
+ var _;
4543
+ const I = ((_ = E == null ? void 0 : E.data) == null ? void 0 : _.text) || "";
4538
4544
  L.innerHTML = String(I), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
4539
4545
  },
4540
4546
  options: { offset: { x: 0, y: -10 } }
@@ -4579,7 +4585,7 @@ class gt {
4579
4585
  const e = this.Cesium, i = this.viewer;
4580
4586
  if (!this.htmlLabelPool) {
4581
4587
  const r = t.overlayContainerId || "html-label-container";
4582
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-polyline-total", {
4588
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-polyline-total", {
4583
4589
  createElement: (s, o) => {
4584
4590
  var n;
4585
4591
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -4725,7 +4731,7 @@ class gt {
4725
4731
  if (c.length < 2) return;
4726
4732
  if (!this.htmlLabelPool) {
4727
4733
  const w = s.overlayContainerId || "html-label-container";
4728
- this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-polyline-total", {
4734
+ this.htmlLabelPool = e || new N(i, r, w), this.htmlLabelPool.registerTheme("measure-polyline-total", {
4729
4735
  createElement: (y, C) => {
4730
4736
  var b;
4731
4737
  y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
@@ -4789,7 +4795,7 @@ class ft {
4789
4795
  const e = this.Cesium, i = this.viewer;
4790
4796
  if (!this.htmlLabelPool) {
4791
4797
  const r = t.overlayContainerId || "html-label-container";
4792
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-terrainHeight", {
4798
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-terrainHeight", {
4793
4799
  createElement: (s, o) => {
4794
4800
  var n;
4795
4801
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -4869,7 +4875,7 @@ class ft {
4869
4875
  if (o.length < 1) return;
4870
4876
  if (!this.htmlLabelPool) {
4871
4877
  const w = s.overlayContainerId || "html-label-container";
4872
- this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-terrainHeight", {
4878
+ this.htmlLabelPool = e || new N(i, r, w), this.htmlLabelPool.registerTheme("measure-terrainHeight", {
4873
4879
  createElement: (y, C) => {
4874
4880
  var b;
4875
4881
  y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
@@ -4899,7 +4905,7 @@ class yt {
4899
4905
  const e = this.Cesium, i = this.viewer;
4900
4906
  if (!this.htmlLabelPool) {
4901
4907
  const r = t.overlayContainerId || "html-label-container";
4902
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-coordinate", {
4908
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-coordinate", {
4903
4909
  createElement: (s, o) => {
4904
4910
  var n;
4905
4911
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -4964,7 +4970,7 @@ ${u.height}:${c.toFixed(2)} m` },
4964
4970
  if (!o.length) return;
4965
4971
  if (!this.htmlLabelPool) {
4966
4972
  const f = s.overlayContainerId || "html-label-container";
4967
- this.htmlLabelPool = e || new G(i, r, f), this.htmlLabelPool.registerTheme("measure-coordinate", {
4973
+ this.htmlLabelPool = e || new N(i, r, f), this.htmlLabelPool.registerTheme("measure-coordinate", {
4968
4974
  createElement: (w, y) => {
4969
4975
  var C;
4970
4976
  w.innerHTML = String(((C = y == null ? void 0 : y.data) == null ? void 0 : C.text) || ""), w.style.background = "rgba(0,0,0,0.6)", w.style.color = "#fff", w.style.font = "14px sans-serif", w.style.padding = "4px 6px", w.style.borderRadius = "4px", w.style.whiteSpace = "pre";
@@ -5010,7 +5016,7 @@ class wt {
5010
5016
  const e = this.Cesium, i = this.viewer;
5011
5017
  if (!this.htmlLabelPool) {
5012
5018
  const r = t.overlayContainerId || "html-label-container";
5013
- this.htmlLabelPool = new G(e, i, r), this.htmlLabelPool.registerTheme("measure-rectangle", {
5019
+ this.htmlLabelPool = new N(e, i, r), this.htmlLabelPool.registerTheme("measure-rectangle", {
5014
5020
  createElement: (s, o) => {
5015
5021
  var n;
5016
5022
  s.innerHTML = String(((n = o == null ? void 0 : o.data) == null ? void 0 : n.text) || ""), s.style.background = "rgba(0,0,0,0.6)", s.style.color = "#fff", s.style.font = "14px sans-serif", s.style.padding = "4px 6px", s.style.borderRadius = "4px", s.style.whiteSpace = "pre";
@@ -5025,7 +5031,7 @@ class wt {
5025
5031
  });
5026
5032
  }
5027
5033
  this.handler = new e.ScreenSpaceEventHandler(i.canvas), this.handler.setInputAction((r) => {
5028
- var _, x, A;
5034
+ var D, x, A;
5029
5035
  const s = i.scene.pickPosition(r.position);
5030
5036
  if (!s) return;
5031
5037
  if (!this.startPoint) {
@@ -5067,14 +5073,14 @@ ${f.area}:${m.toFixed(2)} m²` },
5067
5073
  [l[3], l[0]]
5068
5074
  ];
5069
5075
  for (let O = 0; O < w.length; O++) {
5070
- const [$, k] = w[O], j = O === 0 || O === 2 ? d : u, Y = new e.Cartesian3(($.x + k.x) / 2, ($.y + k.y) / 2, ($.z + k.z) / 2), B = e.Cartographic.fromCartesian(Y), V = `measure_rectangle_seg_${Date.now()}_${O}`;
5071
- this.segmentLabelIds.push(V), this.htmlLabelPool.add(
5072
- { text: `${f.side}:${Number(j).toFixed(2)} m` },
5076
+ const [$, k] = w[O], Y = O === 0 || O === 2 ? d : u, V = new e.Cartesian3(($.x + k.x) / 2, ($.y + k.y) / 2, ($.z + k.z) / 2), G = e.Cartographic.fromCartesian(V), U = `measure_rectangle_seg_${Date.now()}_${O}`;
5077
+ this.segmentLabelIds.push(U), this.htmlLabelPool.add(
5078
+ { text: `${f.side}:${Number(Y).toFixed(2)} m` },
5073
5079
  {
5074
- id: V,
5075
- lon: e.Math.toDegrees(B.longitude),
5076
- lat: e.Math.toDegrees(B.latitude),
5077
- height: B.height || 0,
5080
+ id: U,
5081
+ lon: e.Math.toDegrees(G.longitude),
5082
+ lat: e.Math.toDegrees(G.latitude),
5083
+ height: G.height || 0,
5078
5084
  theme: "measure-rectangle-seg",
5079
5085
  show: !0
5080
5086
  }
@@ -5099,7 +5105,7 @@ ${f.area}:${m.toFixed(2)} m²` },
5099
5105
  closed: !0
5100
5106
  })
5101
5107
  }), i.scene.primitives.add(this.primitive);
5102
- const L = t.lineColor || t.color || e.Color.YELLOW, E = ((x = (_ = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : x.call(_, 0.9)) || e.Color.RED, I = [...y, y[0]], D = i.entities.add({
5108
+ const L = t.lineColor || t.color || e.Color.YELLOW, E = ((x = (D = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : x.call(D, 0.9)) || e.Color.RED, I = [...y, y[0]], _ = i.entities.add({
5103
5109
  polyline: {
5104
5110
  positions: I,
5105
5111
  width: t.width || 2,
@@ -5113,7 +5119,7 @@ ${f.area}:${m.toFixed(2)} m²` },
5113
5119
  })
5114
5120
  }
5115
5121
  });
5116
- this.edgeEntities.push(D);
5122
+ this.edgeEntities.push(_);
5117
5123
  const S = t.pointColor || t.color || e.Color.YELLOW;
5118
5124
  for (const O of l) {
5119
5125
  const $ = i.entities.add({
@@ -5250,16 +5256,16 @@ ${f.area}:${u.toFixed(2)} m²` },
5250
5256
  if (o.length < 3) return;
5251
5257
  if (!this.htmlLabelPool) {
5252
5258
  const S = s.overlayContainerId || "html-label-container";
5253
- this.htmlLabelPool = e || new G(i, r, S), this.htmlLabelPool.registerTheme("measure-rectangle", {
5254
- createElement: (T, _) => {
5259
+ this.htmlLabelPool = e || new N(i, r, S), this.htmlLabelPool.registerTheme("measure-rectangle", {
5260
+ createElement: (T, D) => {
5255
5261
  var x;
5256
- T.innerHTML = String(((x = _ == null ? void 0 : _.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5262
+ T.innerHTML = String(((x = D == null ? void 0 : D.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5257
5263
  },
5258
5264
  options: { offset: { x: 0, y: -10 } }
5259
5265
  }), this.htmlLabelPool.registerTheme("measure-rectangle-seg", {
5260
- createElement: (T, _) => {
5266
+ createElement: (T, D) => {
5261
5267
  var x;
5262
- T.innerHTML = String(((x = _ == null ? void 0 : _.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5268
+ T.innerHTML = String(((x = D == null ? void 0 : D.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5263
5269
  },
5264
5270
  options: { offset: { x: 0, y: -10 } }
5265
5271
  });
@@ -5277,7 +5283,7 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5277
5283
  [l[3], l[0]]
5278
5284
  ];
5279
5285
  for (let S = 0; S < w.length; S++) {
5280
- const [T, _] = w[S], x = S === 0 || S === 2 ? d : u, A = new i.Cartesian3((T.x + _.x) / 2, (T.y + _.y) / 2, (T.z + _.z) / 2), O = i.Cartographic.fromCartesian(A), $ = t.id + `_rectangle_seg_${S}`;
5286
+ const [T, D] = w[S], x = S === 0 || S === 2 ? d : u, A = new i.Cartesian3((T.x + D.x) / 2, (T.y + D.y) / 2, (T.z + D.z) / 2), O = i.Cartographic.fromCartesian(A), $ = t.id + `_rectangle_seg_${S}`;
5281
5287
  this.segmentLabelIds.push($), this.htmlLabelPool.add({ text: `${f.side}:${Number(x).toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(O.longitude), lat: i.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-rectangle-seg", show: !0 });
5282
5288
  }
5283
5289
  const y = new i.PolygonHierarchy(l), C = new i.PolygonGeometry({
@@ -5301,13 +5307,13 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5301
5307
  }
5302
5308
  });
5303
5309
  this.edgeEntities.push(I);
5304
- const D = s.pointColor || v;
5310
+ const _ = s.pointColor || v;
5305
5311
  for (const S of l) {
5306
5312
  const T = r.entities.add({
5307
5313
  position: S,
5308
5314
  point: {
5309
5315
  pixelSize: 8,
5310
- color: D,
5316
+ color: _,
5311
5317
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5312
5318
  }
5313
5319
  });
@@ -5323,7 +5329,7 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5323
5329
  if (!b) return null;
5324
5330
  const v = new r.Cartesian2(l.x + f * b, l.y + w * b), M = new r.Cartesian2(n.x + f * b, n.y + w * b), P = s.projectPointsOntoEllipsoid([n, l, v, M]);
5325
5331
  if (!P || P.length < 4) return null;
5326
- const L = P, E = L[0], I = L[2], D = Math.abs(m), S = Math.abs(b), T = new r.Cartesian3(
5332
+ const L = P, E = L[0], I = L[2], _ = Math.abs(m), S = Math.abs(b), T = new r.Cartesian3(
5327
5333
  (E.x + I.x) / 2,
5328
5334
  (E.y + I.y) / 2,
5329
5335
  (E.z + I.z) / 2
@@ -5334,7 +5340,7 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5334
5340
  A += x[$].x * x[k].y - x[k].x * x[$].y;
5335
5341
  }
5336
5342
  const O = Math.abs(A) / 2;
5337
- return { corners: L, center: T, width: D, height: S, area: O };
5343
+ return { corners: L, center: T, width: _, height: S, area: O };
5338
5344
  }
5339
5345
  }
5340
5346
  class Ct {
@@ -5363,7 +5369,7 @@ class Ct {
5363
5369
  const e = this.Cesium, i = this.viewer, r = Math.max(t.sides || 6, 6);
5364
5370
  if (!this.htmlLabelPool) {
5365
5371
  const s = t.overlayContainerId || "html-label-container";
5366
- this.htmlLabelPool = new G(e, i, s), this.htmlLabelPool.registerTheme("measure-regular", {
5372
+ this.htmlLabelPool = new N(e, i, s), this.htmlLabelPool.registerTheme("measure-regular", {
5367
5373
  createElement: (o, n) => {
5368
5374
  var l;
5369
5375
  o.innerHTML = String(((l = n == null ? void 0 : n.data) == null ? void 0 : l.text) || ""), o.style.background = "rgba(0,0,0,0.6)", o.style.color = "#fff", o.style.font = "14px sans-serif", o.style.padding = "4px 6px", o.style.borderRadius = "4px", o.style.whiteSpace = "pre";
@@ -5430,22 +5436,22 @@ class Ct {
5430
5436
  });
5431
5437
  this.pointEntities.push(O);
5432
5438
  }
5433
- const I = this.computeAreaByPlane(g), D = e.Cartographic.fromCartesian(d), S = this.htmlLabelId || `measure_regular_${Date.now()}`;
5439
+ const I = this.computeAreaByPlane(g), _ = e.Cartographic.fromCartesian(d), S = this.htmlLabelId || `measure_regular_${Date.now()}`;
5434
5440
  this.htmlLabelId = S;
5435
5441
  const T = t.labelText || { sides: "边数", radius: "半径", circumference: "周长", area: "面积", side: "边长" };
5436
5442
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
5437
- let _ = 0;
5443
+ let D = 0;
5438
5444
  for (let A = 1; A < g.length; A++) {
5439
- const O = g[A - 1], $ = g[A], k = e.Cartographic.fromCartesian(O), j = e.Cartographic.fromCartesian($), B = new e.EllipsoidGeodesic(k, j).surfaceDistance;
5440
- _ += B;
5441
- const V = new e.Cartesian3((O.x + $.x) / 2, (O.y + $.y) / 2, (O.z + $.z) / 2), R = e.Cartographic.fromCartesian(V), se = `measure_regular_seg_${Date.now()}_${A - 1}`;
5442
- this.segmentLabelIds.push(se), this.htmlLabelPool.add(
5443
- { text: `${T.side}:${B.toFixed(2)} m` },
5445
+ const O = g[A - 1], $ = g[A], k = e.Cartographic.fromCartesian(O), Y = e.Cartographic.fromCartesian($), G = new e.EllipsoidGeodesic(k, Y).surfaceDistance;
5446
+ D += G;
5447
+ const U = new e.Cartesian3((O.x + $.x) / 2, (O.y + $.y) / 2, (O.z + $.z) / 2), q = e.Cartographic.fromCartesian(U), ie = `measure_regular_seg_${Date.now()}_${A - 1}`;
5448
+ this.segmentLabelIds.push(ie), this.htmlLabelPool.add(
5449
+ { text: `${T.side}:${G.toFixed(2)} m` },
5444
5450
  {
5445
- id: se,
5446
- lon: e.Math.toDegrees(R.longitude),
5447
- lat: e.Math.toDegrees(R.latitude),
5448
- height: R.height || 0,
5451
+ id: ie,
5452
+ lon: e.Math.toDegrees(q.longitude),
5453
+ lat: e.Math.toDegrees(q.latitude),
5454
+ height: q.height || 0,
5449
5455
  theme: "measure-regular-seg",
5450
5456
  show: !0
5451
5457
  }
@@ -5454,13 +5460,13 @@ class Ct {
5454
5460
  this.htmlLabelPool.add(
5455
5461
  { text: `${T.sides}:${r}
5456
5462
  ${T.radius}:${m.toFixed(2)} m
5457
- ${T.circumference}:${_.toFixed(2)} m
5463
+ ${T.circumference}:${D.toFixed(2)} m
5458
5464
  ${T.area}:${I.toFixed(2)} m²` },
5459
5465
  {
5460
5466
  id: S,
5461
- lon: e.Math.toDegrees(D.longitude),
5462
- lat: e.Math.toDegrees(D.latitude),
5463
- height: D.height || 0,
5467
+ lon: e.Math.toDegrees(_.longitude),
5468
+ lat: e.Math.toDegrees(_.latitude),
5469
+ height: _.height || 0,
5464
5470
  theme: "measure-regular",
5465
5471
  show: !0
5466
5472
  }
@@ -5471,7 +5477,7 @@ ${T.area}:${I.toFixed(2)} m²` },
5471
5477
  positions: g,
5472
5478
  radius: m,
5473
5479
  sides: r,
5474
- perimeter: _,
5480
+ perimeter: D,
5475
5481
  area: I,
5476
5482
  clear: () => this.clear()
5477
5483
  };
@@ -5588,16 +5594,16 @@ ${p.area}:${u.toFixed(2)} m²` },
5588
5594
  if (n.length < 2) return;
5589
5595
  if (!this.htmlLabelPool) {
5590
5596
  const L = s.overlayContainerId || "html-label-container";
5591
- this.htmlLabelPool = e || new G(i, r, L), this.htmlLabelPool.registerTheme("measure-regular", {
5597
+ this.htmlLabelPool = e || new N(i, r, L), this.htmlLabelPool.registerTheme("measure-regular", {
5592
5598
  createElement: (E, I) => {
5593
- var D;
5594
- E.innerHTML = String(((D = I == null ? void 0 : I.data) == null ? void 0 : D.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5599
+ var _;
5600
+ E.innerHTML = String(((_ = I == null ? void 0 : I.data) == null ? void 0 : _.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5595
5601
  },
5596
5602
  options: { offset: { x: 0, y: -10 } }
5597
5603
  }), this.htmlLabelPool.registerTheme("measure-regular-seg", {
5598
5604
  createElement: (E, I) => {
5599
- var D;
5600
- E.innerHTML = String(((D = I == null ? void 0 : I.data) == null ? void 0 : D.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5605
+ var _;
5606
+ E.innerHTML = String(((_ = I == null ? void 0 : I.data) == null ? void 0 : _.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5601
5607
  },
5602
5608
  options: { offset: { x: 0, y: -10 } }
5603
5609
  });
@@ -5622,10 +5628,10 @@ ${p.area}:${u.toFixed(2)} m²` },
5622
5628
  const v = s.labelText || { sides: "边数", radius: "半径", circumference: "周长", area: "面积", side: "边长" };
5623
5629
  let M = 0;
5624
5630
  for (let L = 1; L < l.length; L++) {
5625
- const E = l[L - 1], I = l[L], D = i.Cartographic.fromCartesian(E), S = i.Cartographic.fromCartesian(I), _ = new i.EllipsoidGeodesic(D, S).surfaceDistance;
5626
- M += _;
5631
+ const E = l[L - 1], I = l[L], _ = i.Cartographic.fromCartesian(E), S = i.Cartographic.fromCartesian(I), D = new i.EllipsoidGeodesic(_, S).surfaceDistance;
5632
+ M += D;
5627
5633
  const x = new i.Cartesian3((E.x + I.x) / 2, (E.y + I.y) / 2, (E.z + I.z) / 2), A = i.Cartographic.fromCartesian(x), O = t.id + `_regular_seg_${L - 1}`;
5628
- this.segmentLabelIds.push(O), this.htmlLabelPool.add({ text: `${v.side}:${_.toFixed(2)} m` }, { id: O, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-regular-seg", show: !0 });
5634
+ this.segmentLabelIds.push(O), this.htmlLabelPool.add({ text: `${v.side}:${D.toFixed(2)} m` }, { id: O, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-regular-seg", show: !0 });
5629
5635
  }
5630
5636
  this.htmlLabelPool.add({ text: `${v.sides}:${Math.max(o, 3)}
5631
5637
  ${v.radius}:${d.toFixed(2)} m
@@ -5902,13 +5908,13 @@ class $r {
5902
5908
  else {
5903
5909
  if (this.specifiedClear = !0, !this.deleteLabelPool) {
5904
5910
  const e = t || "html-label-container";
5905
- this.deleteLabelPool = new G(this.Cesium, this.viewer, e), this.deleteLabelPool.registerTheme("measure-delete-label", {
5911
+ this.deleteLabelPool = new N(this.Cesium, this.viewer, e), this.deleteLabelPool.registerTheme("measure-delete-label", {
5906
5912
  createElement: (i, r) => {
5907
5913
  i.innerHTML = "删除", i.style.background = "rgba(255,0,0,0.7)", i.style.color = "#fff", i.style.font = "12px sans-serif", i.style.padding = "2px 6px", i.style.borderRadius = "4px", i.style.whiteSpace = "nowrap";
5908
5914
  },
5909
5915
  options: { offset: { x: 0, y: -10 } }
5910
5916
  }), this.deleteLabelPool.eventBus.addListener(
5911
- oe.Click,
5917
+ ne.Click,
5912
5918
  {
5913
5919
  name: "measurement_delete_label_click",
5914
5920
  fn: (i) => {
@@ -6242,14 +6248,14 @@ export {
6242
6248
  Nt as DOM_EVENT_MAP,
6243
6249
  Er as DrawTool,
6244
6250
  wr as EditMode,
6245
- _r as EntityLayerManager,
6251
+ Dr as EntityLayerManager,
6246
6252
  Mr as GLTFManage,
6247
6253
  Cr as GLTFManageEventKey,
6248
6254
  ht as HorizontalMeasure,
6249
- G as HtmlOverlayLabelPool,
6255
+ N as HtmlOverlayLabelPool,
6250
6256
  zt as MarkerEventBus,
6251
- oe as MarkerEventKey,
6252
- Dr as MaterialManager,
6257
+ ne as MarkerEventKey,
6258
+ _r as MaterialManager,
6253
6259
  $r as MeasurementTool,
6254
6260
  Fr as PathRoamTool,
6255
6261
  gt as PolylineDistanceMeasure,