leiting-bim 2.1.165 → 2.1.171

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.
@@ -1,12 +1,12 @@
1
- import { w as Ne } from "../create-DynflqE1.js";
2
- import { h as x, markRaw as I, render as O, defineComponent as ke, inject as Be, onMounted as We, watch as te, onUnmounted as Fe, renderSlot as $e, unref as ze } from "vue";
1
+ import { w as Re } from "../create-DynflqE1.js";
2
+ import { h as x, markRaw as I, render as O, defineComponent as Ne, inject as ke, onMounted as We, watch as te, onUnmounted as Fe, renderSlot as $e, unref as ze } from "vue";
3
3
  import { M as G, H as ie, a as V } from "../HtmlOverlayLabelPool-CbiNlyAM.js";
4
4
  import { CxCardCarousel as re } from "./card-carousel.js";
5
5
  import { CxMarkerBubbleLine as Ve, CxMarkerBubble as Ke } from "./marker-bubble.js";
6
6
  import { CxMarkerDefault as ae } from "./marker-default.js";
7
7
  import { CxMarkerHtml as Xe } from "./marker-html.js";
8
8
  import { CxMarkerText as Ye } from "./marker-text.js";
9
- import { i as q, b as ce, a as P, S as R, d as ne, c as j, e as ge, f as Ue, g as de, M as ue, h as K, j as qe, k as je, l as Ze, m as fe, n as me, o as Je, p as Qe, q as et, r as tt, s as it, t as pe, u as rt, v as at, w as nt, x as ot } from "../index-McKGafjp.js";
9
+ import { i as q, b as ce, a as P, S as B, d as ne, c as j, e as de, f as Ue, g as ge, M as ue, h as K, j as qe, k as je, l as Ze, m as fe, n as me, o as Je, p as Qe, q as et, r as tt, s as it, t as pe, u as rt, v as at, w as nt, x as ot } from "../index-McKGafjp.js";
10
10
  const st = {
11
11
  id: { type: String, default: "marker" },
12
12
  Cesium: { type: Object },
@@ -108,6 +108,15 @@ class lt {
108
108
  this._addPointToGrid(i);
109
109
  t && this._scheduleUpdate();
110
110
  }
111
+ _getCurrentBillboard(e) {
112
+ return e?.__currentBillboard || e?.billboard?.[0];
113
+ }
114
+ _getBillboardTheme(e) {
115
+ return this._getCurrentBillboard(e)?.theme;
116
+ }
117
+ _shouldSkipAggregation(e) {
118
+ return this._getCurrentBillboard(e)?.skipAggregation;
119
+ }
111
120
  _scheduleUpdate() {
112
121
  this._updateTimer !== null && clearTimeout(this._updateTimer), this._updateTimer = window.setTimeout(() => {
113
122
  this._update(), this._cameraDirty = !0, this._updateTimer = null;
@@ -120,23 +129,23 @@ class lt {
120
129
  for (const n of this.levels) {
121
130
  const o = n.level, s = this.gridLayers.get(o);
122
131
  if (!s) continue;
123
- const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), g = this.tilingScheme.positionToTileXY(
132
+ const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
124
133
  h,
125
134
  o,
126
135
  new this.Cesium.Cartesian2()
127
136
  );
128
- if (!g) continue;
129
- const l = `${g.x}_${g.y}`, c = s.get(l);
137
+ if (!d) continue;
138
+ const l = `${d.x}_${d.y}`, c = s.get(l);
130
139
  if (c) {
131
- const d = c.allPoints.findIndex((f) => f.id === e.id);
132
- if (d !== -1 && c.allPoints.splice(d, 1), i.data?.billboard?.[0]?.skipAggregation) {
140
+ const g = c.allPoints.findIndex((f) => f.id === e.id);
141
+ if (g !== -1 && c.allPoints.splice(g, 1), this._shouldSkipAggregation(i.data)) {
133
142
  const f = c.skipPoints.findIndex((u) => u.id === e.id);
134
143
  f !== -1 && c.skipPoints.splice(f, 1);
135
144
  } else {
136
- const f = this.groupByTheme ? i.data?.theme : this.clusterTheme, u = c.groups.get(f);
145
+ const f = this.groupByTheme ? this._getBillboardTheme(i.data) : this.clusterTheme, u = c.groups.get(f);
137
146
  if (u) {
138
- const m = u.findIndex((b) => b.id === e.id);
139
- m !== -1 && u.splice(m, 1), u.length === 0 && c.groups.delete(f);
147
+ const v = u.findIndex((p) => p.id === e.id);
148
+ v !== -1 && u.splice(v, 1), u.length === 0 && c.groups.delete(f);
140
149
  }
141
150
  }
142
151
  }
@@ -153,8 +162,8 @@ class lt {
153
162
  for (const [n, o] of r.entries()) {
154
163
  o.allPoints = o.allPoints.filter((s) => !t.has(s.id)), o.skipPoints = o.skipPoints.filter((s) => !t.has(s.id));
155
164
  for (const [s, h] of o.groups.entries()) {
156
- const g = h.filter((l) => !t.has(l.id));
157
- g.length === 0 ? o.groups.delete(s) : o.groups.set(s, g);
165
+ const d = h.filter((l) => !t.has(l.id));
166
+ d.length === 0 ? o.groups.delete(s) : o.groups.set(s, d);
158
167
  }
159
168
  o.allPoints.length === 0 && r.delete(n);
160
169
  }
@@ -184,11 +193,11 @@ class lt {
184
193
  allPoints: [],
185
194
  groups: /* @__PURE__ */ new Map(),
186
195
  skipPoints: []
187
- }, r.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
196
+ }, r.set(s, h)), h.allPoints.push(e), this._shouldSkipAggregation(e.data))
188
197
  h.skipPoints.push(e);
189
198
  else {
190
- const g = this.groupByTheme ? e.data?.billboard?.[0]?.theme : this.clusterTheme;
191
- h.groups.has(g) || h.groups.set(g, []), h.groups.get(g).push(e);
199
+ const d = this.groupByTheme ? this._getBillboardTheme(e.data) : this.clusterTheme;
200
+ h.groups.has(d) || h.groups.set(d, []), h.groups.get(d).push(e);
192
201
  }
193
202
  }
194
203
  }
@@ -248,7 +257,7 @@ class lt {
248
257
  lon: t.lon,
249
258
  lat: t.lat,
250
259
  height: t.height,
251
- theme: t.data?.billboard?.[0]?.theme || this.pointTheme,
260
+ theme: this._getBillboardTheme(t.data) || this.pointTheme,
252
261
  style: t.style
253
262
  }), e++);
254
263
  }
@@ -283,41 +292,41 @@ class lt {
283
292
  return t;
284
293
  }
285
294
  _processTiles(e, t) {
286
- const i = /* @__PURE__ */ new Set(), r = !this._isTerrainEnabled(), n = this.viewer.scene, o = n && n.globe, s = o && o.ellipsoid, h = s && n.camera.computeViewRectangle(s), g = (l, c, d) => {
295
+ const i = /* @__PURE__ */ new Set(), r = !this._isTerrainEnabled(), n = this.viewer.scene, o = n && n.globe, s = o && o.ellipsoid, h = s && n.camera.computeViewRectangle(s), d = (l, c, g) => {
287
296
  if (!r || !h) return !0;
288
- const f = this.tilingScheme.tileXYToRectangle(l, c, d);
297
+ const f = this.tilingScheme.tileXYToRectangle(l, c, g);
289
298
  return !(!f || f.east <= h.west || f.west >= h.east || f.north <= h.south || f.south >= h.north);
290
299
  };
291
300
  for (const l of e) {
292
- const c = l.rectangle, d = l._level ?? l.level;
293
- if (!c || typeof d != "number") continue;
294
- const f = this._getGridRefLevel(d), u = this._resolveLevelIndex(f);
301
+ const c = l.rectangle, g = l._level ?? l.level;
302
+ if (!c || typeof g != "number") continue;
303
+ const f = this._getGridRefLevel(g), u = this._resolveLevelIndex(f);
295
304
  if (u === void 0) continue;
296
- const m = this.levels[u].level, b = l._x ?? l.x, _ = l._y ?? l.y;
297
- if (typeof b == "number" && typeof _ == "number") {
298
- const L = d - m;
305
+ const v = this.levels[u].level, p = l._x ?? l.x, C = l._y ?? l.y;
306
+ if (typeof p == "number" && typeof C == "number") {
307
+ const L = g - v;
299
308
  if (L >= 0) {
300
- const T = 1 << L, M = Math.floor(b / T), D = Math.floor(_ / T), A = `${m}_${M}_${D}`;
309
+ const T = 1 << L, M = Math.floor(p / T), D = Math.floor(C / T), A = `${v}_${M}_${D}`;
301
310
  if (i.has(A)) continue;
302
- i.add(A), t(u, M, D, d);
311
+ i.add(A), t(u, M, D, g);
303
312
  } else {
304
- const M = 1 << Math.min(-L, this.maxRefineLevels), D = b * M, A = _ * M;
313
+ const M = 1 << Math.min(-L, this.maxRefineLevels), D = p * M, A = C * M;
305
314
  for (let W = 0; W < M; W++)
306
315
  for (let F = 0; F < M; F++) {
307
316
  const $ = D + W, z = A + F;
308
- if (!g($, z, m)) continue;
309
- const ee = `${m}_${$}_${z}`;
310
- i.has(ee) || (i.add(ee), t(u, $, z, d));
317
+ if (!d($, z, v)) continue;
318
+ const ee = `${v}_${$}_${z}`;
319
+ i.has(ee) || (i.add(ee), t(u, $, z, g));
311
320
  }
312
321
  }
313
322
  continue;
314
323
  }
315
- const p = this.levels[u].size, S = this.Cesium.Math.toDegrees(c.west), k = this.Cesium.Math.toDegrees(c.east), E = this.Cesium.Math.toDegrees(c.south), B = this.Cesium.Math.toDegrees(c.north), Oe = Math.floor((S - -180) / p), Ge = Math.floor((k - -180) / p), He = Math.floor((E - -90) / p), Re = Math.floor((B - -90) / p);
324
+ const m = this.levels[u].size, S = this.Cesium.Math.toDegrees(c.west), N = this.Cesium.Math.toDegrees(c.east), E = this.Cesium.Math.toDegrees(c.south), k = this.Cesium.Math.toDegrees(c.north), Oe = Math.floor((S - -180) / m), Ge = Math.floor((N - -180) / m), He = Math.floor((E - -90) / m), Be = Math.floor((k - -90) / m);
316
325
  for (let L = Oe; L <= Ge; L++)
317
- for (let T = He; T <= Re; T++) {
318
- if (!g(L, T, m)) continue;
319
- const M = `${m}_${L}_${T}`;
320
- i.has(M) || (i.add(M), t(u, L, T, d));
326
+ for (let T = He; T <= Be; T++) {
327
+ if (!d(L, T, v)) continue;
328
+ const M = `${v}_${L}_${T}`;
329
+ i.has(M) || (i.add(M), t(u, L, T, g));
321
330
  }
322
331
  }
323
332
  }
@@ -330,23 +339,23 @@ class lt {
330
339
  _getCellContext(e, t, i, r) {
331
340
  const o = this.levels[e].level, s = this.gridLayers.get(o);
332
341
  if (!s) return null;
333
- const h = `${t}_${i}`, g = s.get(h);
334
- if (!g) return null;
335
- const l = this.tilingScheme.tileXYToRectangle(t, i, o), c = this.Cesium.Math.toDegrees(l.west), d = this.Cesium.Math.toDegrees(l.south), f = this.Cesium.Math.toDegrees(l.east), u = this.Cesium.Math.toDegrees(l.north), m = (c + f) / 2, b = (d + u) / 2;
342
+ const h = `${t}_${i}`, d = s.get(h);
343
+ if (!d) return null;
344
+ const l = this.tilingScheme.tileXYToRectangle(t, i, o), c = this.Cesium.Math.toDegrees(l.west), g = this.Cesium.Math.toDegrees(l.south), f = this.Cesium.Math.toDegrees(l.east), u = this.Cesium.Math.toDegrees(l.north), v = (c + f) / 2, p = (g + u) / 2;
336
345
  return {
337
346
  levelIdx: e,
338
347
  tileLevel: o,
339
348
  lonIdx: t,
340
349
  latIdx: i,
341
350
  key: h,
342
- cell: g,
351
+ cell: d,
343
352
  rect: l,
344
353
  west: c,
345
- south: d,
354
+ south: g,
346
355
  east: f,
347
356
  north: u,
348
- centerLon: m,
349
- centerLat: b,
357
+ centerLon: v,
358
+ centerLat: p,
350
359
  viewTileLevel: r
351
360
  };
352
361
  }
@@ -360,7 +369,7 @@ class lt {
360
369
  lon: o.lon,
361
370
  lat: o.lat,
362
371
  height: o.height,
363
- theme: o.data?.billboard?.[0]?.theme || this.pointTheme,
372
+ theme: this._getBillboardTheme(o.data) || this.pointTheme,
364
373
  style: o.style
365
374
  }), t++);
366
375
  }
@@ -373,46 +382,46 @@ class lt {
373
382
  latIdx: o,
374
383
  cell: s,
375
384
  centerLon: h,
376
- centerLat: g,
385
+ centerLat: d,
377
386
  viewTileLevel: l
378
387
  } = e, c = l;
379
- for (const [d, f] of s.groups) {
380
- const u = f.filter((p) => p.data?.show !== !1);
388
+ for (const [g, f] of s.groups) {
389
+ const u = f.filter((m) => m.data?.show !== !1);
381
390
  if (u.length === 0) continue;
382
- let m = h, b = g, _ = u[0]?.height || 0;
383
- if (this.centralPointMode == "firstPoint" && (m = u[0]?.lon || 0, b = u[0]?.lat || 0, _ = u[0]?.height || 0), r === this.levels.length - 1 || u.length < t)
384
- for (const p of u) {
391
+ let v = h, p = d, C = u[0]?.height || 0;
392
+ if (this.centralPointMode == "firstPoint" && (v = u[0]?.lon || 0, p = u[0]?.lat || 0, C = u[0]?.height || 0), r === this.levels.length - 1 || u.length < t)
393
+ for (const m of u) {
385
394
  if (i >= this.displayLimit) break;
386
- this._isVisibleAtLevel(p, c) && (this.labelPool.add(p.data, {
387
- id: `point-${p.id}`,
388
- lon: p.lon,
389
- lat: p.lat,
390
- height: p.height,
391
- theme: p.data?.billboard?.[0]?.theme || this.pointTheme,
392
- style: p.style
395
+ this._isVisibleAtLevel(m, c) && (this.labelPool.add(m.data, {
396
+ id: `point-${m.id}`,
397
+ lon: m.lon,
398
+ lat: m.lat,
399
+ height: m.height,
400
+ theme: this._getBillboardTheme(m.data) || this.pointTheme,
401
+ style: m.style
393
402
  }), i++);
394
403
  }
395
404
  else {
396
405
  if (i >= this.displayLimit)
397
406
  return i;
398
- const p = c == null ? u : u.filter((B) => this._isVisibleAtLevel(B, c));
399
- if (!p.length) return i;
400
- const k = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, E = this.groupByTheme ? `cluster-${r}-${n}-${o}-${d}` : `cluster-${r}-${n}-${o}`;
407
+ const m = c == null ? u : u.filter((k) => this._isVisibleAtLevel(k, c));
408
+ if (!m.length) return i;
409
+ const N = this._getBillboardTheme(m[0]?.data) || this.clusterTheme, E = this.groupByTheme ? `cluster-${r}-${n}-${o}-${g}` : `cluster-${r}-${n}-${o}`;
401
410
  this.labelPool.add(
402
411
  {
403
412
  id: E,
404
- billboard: p[0]?.data?.billboard || [],
405
- count: p.length,
413
+ billboard: m[0]?.data?.billboard || [],
414
+ count: m.length,
406
415
  gridKey: `${n}_${o}`,
407
- points: p,
408
- aggregationGroup: d
416
+ points: m,
417
+ aggregationGroup: g
409
418
  },
410
419
  {
411
420
  id: E,
412
- lon: m,
413
- lat: b,
414
- height: _,
415
- theme: k
421
+ lon: v,
422
+ lat: p,
423
+ height: C,
424
+ theme: N
416
425
  }
417
426
  ), i++;
418
427
  }
@@ -421,13 +430,13 @@ class lt {
421
430
  }
422
431
  _debugDrawCell(e) {
423
432
  if (!this.debugCurrentGrids) return;
424
- const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e, g = this.levels[t].level;
433
+ const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e, d = this.levels[t].level;
425
434
  this._drawDebugGrid(
426
435
  i,
427
436
  r,
428
437
  n,
429
438
  o,
430
- `L:${g} X:${s} Y:${h}`
439
+ `L:${d} X:${s} Y:${h}`
431
440
  );
432
441
  }
433
442
  refresh() {
@@ -513,18 +522,18 @@ function ye(a, e) {
513
522
  r[t] = e(a[t], t, a);
514
523
  return r;
515
524
  }
516
- var oe = R ? R.prototype : void 0, se = oe ? oe.toString : void 0;
517
- function ve(a) {
525
+ var oe = B ? B.prototype : void 0, se = oe ? oe.toString : void 0;
526
+ function be(a) {
518
527
  if (typeof a == "string")
519
528
  return a;
520
529
  if (P(a))
521
- return ye(a, ve) + "";
530
+ return ye(a, be) + "";
522
531
  if (Z(a))
523
532
  return se ? se.call(a) : "";
524
533
  var e = a + "";
525
534
  return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
526
535
  }
527
- function be(a) {
536
+ function ve(a) {
528
537
  return a;
529
538
  }
530
539
  function ct(a, e, t) {
@@ -540,13 +549,13 @@ function ct(a, e, t) {
540
549
  }
541
550
  return a.apply(e, t);
542
551
  }
543
- var gt = 800, dt = 16, ut = Date.now;
552
+ var dt = 800, gt = 16, ut = Date.now;
544
553
  function ft(a) {
545
554
  var e = 0, t = 0;
546
555
  return function() {
547
- var i = ut(), r = dt - (i - t);
556
+ var i = ut(), r = gt - (i - t);
548
557
  if (t = i, r > 0) {
549
- if (++e >= gt)
558
+ if (++e >= dt)
550
559
  return arguments[0];
551
560
  } else
552
561
  e = 0;
@@ -565,8 +574,8 @@ var pt = ne ? function(a, e) {
565
574
  value: mt(e),
566
575
  writable: !0
567
576
  });
568
- } : be, Ce = ft(pt), le = Math.max;
569
- function Me(a, e, t) {
577
+ } : ve, Ce = ft(pt), le = Math.max;
578
+ function _e(a, e, t) {
570
579
  return e = le(e === void 0 ? a.length - 1 : e, 0), function() {
571
580
  for (var i = arguments, r = -1, n = le(i.length - e, 0), o = Array(n); ++r < n; )
572
581
  o[r] = i[e + r];
@@ -577,30 +586,30 @@ function Me(a, e, t) {
577
586
  };
578
587
  }
579
588
  function yt(a, e) {
580
- return Ce(Me(a, e, be), a + "");
589
+ return Ce(_e(a, e, ve), a + "");
581
590
  }
582
- function vt(a, e, t) {
591
+ function bt(a, e, t) {
583
592
  if (!j(t))
584
593
  return !1;
585
594
  var i = typeof e;
586
- return (i == "number" ? ge(t) && Ue(e, t.length) : i == "string" && e in t) ? de(t[e], a) : !1;
595
+ return (i == "number" ? de(t) && Ue(e, t.length) : i == "string" && e in t) ? ge(t[e], a) : !1;
587
596
  }
588
- function bt(a) {
597
+ function vt(a) {
589
598
  return yt(function(e, t) {
590
599
  var i = -1, r = t.length, n = r > 1 ? t[r - 1] : void 0, o = r > 2 ? t[2] : void 0;
591
- for (n = a.length > 3 && typeof n == "function" ? (r--, n) : void 0, o && vt(t[0], t[1], o) && (n = r < 3 ? void 0 : n, r = 1), e = Object(e); ++i < r; ) {
600
+ for (n = a.length > 3 && typeof n == "function" ? (r--, n) : void 0, o && bt(t[0], t[1], o) && (n = r < 3 ? void 0 : n, r = 1), e = Object(e); ++i < r; ) {
592
601
  var s = t[i];
593
602
  s && a(e, s, i, n);
594
603
  }
595
604
  return e;
596
605
  });
597
606
  }
598
- var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mt = /^\w*$/;
599
- function _t(a, e) {
607
+ var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _t = /^\w*$/;
608
+ function Mt(a, e) {
600
609
  if (P(a))
601
610
  return !1;
602
611
  var t = typeof a;
603
- return t == "number" || t == "symbol" || t == "boolean" || a == null || Z(a) ? !0 : Mt.test(a) || !Ct.test(a) || e != null && a in Object(e);
612
+ return t == "number" || t == "symbol" || t == "boolean" || a == null || Z(a) ? !0 : _t.test(a) || !Ct.test(a) || e != null && a in Object(e);
604
613
  }
605
614
  var Lt = "Expected a function";
606
615
  function J(a, e) {
@@ -630,10 +639,10 @@ var wt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
630
639
  }), e;
631
640
  });
632
641
  function St(a) {
633
- return a == null ? "" : ve(a);
642
+ return a == null ? "" : be(a);
634
643
  }
635
644
  function Q(a, e) {
636
- return P(a) ? a : _t(a, e) ? [a] : It(St(a));
645
+ return P(a) ? a : Mt(a, e) ? [a] : It(St(a));
637
646
  }
638
647
  function X(a) {
639
648
  if (typeof a == "string" || Z(a))
@@ -647,7 +656,7 @@ function Et(a, e) {
647
656
  a = a[X(e[t++])];
648
657
  return t && t == i ? a : void 0;
649
658
  }
650
- var he = R ? R.isConcatSpreadable : void 0;
659
+ var he = B ? B.isConcatSpreadable : void 0;
651
660
  function Dt(a) {
652
661
  return P(a) || K(a) || !!(he && a && a[he]);
653
662
  }
@@ -664,17 +673,17 @@ function Ot(a) {
664
673
  return e ? At(a) : [];
665
674
  }
666
675
  function Gt(a) {
667
- return Ce(Me(a, void 0, Ot), a + "");
676
+ return Ce(_e(a, void 0, Ot), a + "");
668
677
  }
669
- var Ht = "[object Object]", Rt = Function.prototype, Nt = Object.prototype, _e = Rt.toString, kt = Nt.hasOwnProperty, Bt = _e.call(Object);
678
+ var Ht = "[object Object]", Bt = Function.prototype, Rt = Object.prototype, Me = Bt.toString, Nt = Rt.hasOwnProperty, kt = Me.call(Object);
670
679
  function Le(a) {
671
680
  if (!q(a) || ce(a) != Ht)
672
681
  return !1;
673
682
  var e = je(a);
674
683
  if (e === null)
675
684
  return !0;
676
- var t = kt.call(e, "constructor") && e.constructor;
677
- return typeof t == "function" && t instanceof t && _e.call(t) == Bt;
685
+ var t = Nt.call(e, "constructor") && e.constructor;
686
+ return typeof t == "function" && t instanceof t && Me.call(t) == kt;
678
687
  }
679
688
  function Wt(a, e, t) {
680
689
  var i = -1, r = a.length;
@@ -695,10 +704,10 @@ function Ft(a) {
695
704
  }
696
705
  var $t = Ft();
697
706
  function Y(a, e, t) {
698
- (t !== void 0 && !de(a[e], t) || t === void 0 && !(e in a)) && Ze(a, e, t);
707
+ (t !== void 0 && !ge(a[e], t) || t === void 0 && !(e in a)) && Ze(a, e, t);
699
708
  }
700
709
  function zt(a) {
701
- return q(a) && ge(a);
710
+ return q(a) && de(a);
702
711
  }
703
712
  function U(a, e) {
704
713
  if (!(e === "constructor" && typeof a[e] == "function") && e != "__proto__")
@@ -708,15 +717,15 @@ function Vt(a) {
708
717
  return fe(a, me(a));
709
718
  }
710
719
  function Kt(a, e, t, i, r, n, o) {
711
- var s = U(a, t), h = U(e, t), g = o.get(h);
712
- if (g) {
713
- Y(a, t, g);
720
+ var s = U(a, t), h = U(e, t), d = o.get(h);
721
+ if (d) {
722
+ Y(a, t, d);
714
723
  return;
715
724
  }
716
725
  var l = n ? n(s, h, t + "", a, e, o) : void 0, c = l === void 0;
717
726
  if (c) {
718
- var d = P(h), f = !d && Je(h), u = !d && !f && Qe(h);
719
- l = h, d || f || u ? P(s) ? l = s : zt(s) ? l = et(s) : f ? (c = !1, l = tt(h, !0)) : u ? (c = !1, l = it(h, !0)) : l = [] : Le(h) || K(h) ? (l = s, K(s) ? l = Vt(s) : (!j(s) || pe(s)) && (l = rt(h))) : c = !1;
727
+ var g = P(h), f = !g && Je(h), u = !g && !f && Qe(h);
728
+ l = h, g || f || u ? P(s) ? l = s : zt(s) ? l = et(s) : f ? (c = !1, l = tt(h, !0)) : u ? (c = !1, l = it(h, !0)) : l = [] : Le(h) || K(h) ? (l = s, K(s) ? l = Vt(s) : (!j(s) || pe(s)) && (l = rt(h))) : c = !1;
720
729
  }
721
730
  c && (o.set(h, l), r(l, h, i, n, o), o.delete(h)), Y(a, t, l);
722
731
  }
@@ -737,7 +746,7 @@ function Xt(a) {
737
746
  function Yt(a, e) {
738
747
  return e.length < 2 ? a : Et(a, Wt(e, 0, -1));
739
748
  }
740
- var Ut = bt(function(a, e, t) {
749
+ var Ut = vt(function(a, e, t) {
741
750
  Te(a, e, t);
742
751
  }), qt = Object.prototype, jt = qt.hasOwnProperty;
743
752
  function Zt(a, e) {
@@ -894,8 +903,8 @@ function Pe(a, e) {
894
903
  }), new i(e);
895
904
  }
896
905
  function ai(a, e) {
897
- const t = a.Color, i = Object.defineProperties, r = a.Event, n = a.createPropertyDescriptor, o = a.Property, s = (c, d) => c === void 0 ? d : c, h = {};
898
- let g = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
906
+ const t = a.Color, i = Object.defineProperties, r = a.Event, n = a.createPropertyDescriptor, o = a.Property, s = (c, g) => c === void 0 ? g : c, h = {};
907
+ let d = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
899
908
  function l(c) {
900
909
  c = s(c, h), this._definitionChanged = new r(), this._color = void 0, this._colorSubscription = void 0, this.color = c.color || t.fromBytes(0, 255, 255, 255), this._duration = void 0, this._durationSubscription = void 0, this.duration = s(c.duration, 45);
901
910
  }
@@ -911,22 +920,22 @@ function ai(a, e) {
911
920
  }
912
921
  }
913
922
  }), l.prototype.getType = function(c) {
914
- return g;
915
- }, l.prototype.getValue = function(c, d) {
916
- return d || (d = {}), d.color = o.getValueOrClonedDefault(
923
+ return d;
924
+ }, l.prototype.getValue = function(c, g) {
925
+ return g || (g = {}), g.color = o.getValueOrClonedDefault(
917
926
  this._color,
918
927
  c,
919
928
  a.Color.WHITE,
920
- d.color
921
- ), d.duration = this._duration, d;
929
+ g.color
930
+ ), g.duration = this._duration, g;
922
931
  }, l.prototype.equals = function(c) {
923
932
  return this === c || c instanceof l && o.equals(this._color, c._color);
924
933
  }, i(l.prototype, {
925
934
  color: n("color"),
926
935
  duration: n("duration")
927
- }), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(g, {
936
+ }), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(d, {
928
937
  fabric: {
929
- type: g,
938
+ type: d,
930
939
  uniforms: {
931
940
  color: new t(1, 1, 1, 1),
932
941
  duration: 45
@@ -1052,12 +1061,21 @@ class ni {
1052
1061
  id;
1053
1062
  entities = [];
1054
1063
  primitives = [];
1064
+ billboardPointIds = [];
1055
1065
  dataItem = {};
1056
1066
  aggregator;
1057
1067
  cardPool;
1058
1068
  constructor(e) {
1059
- const { id: t, entities: i = [], primitives: r = [], dataItem: n = {}, aggregator: o, cardPool: s } = e;
1060
- this.id = t, this.entities = i, this.primitives = r, this.dataItem = n, this.aggregator = o, this.cardPool = s;
1069
+ const {
1070
+ id: t,
1071
+ entities: i = [],
1072
+ primitives: r = [],
1073
+ billboardPointIds: n = [],
1074
+ dataItem: o = {},
1075
+ aggregator: s,
1076
+ cardPool: h
1077
+ } = e;
1078
+ this.id = t, this.entities = i, this.primitives = r, this.billboardPointIds = n, this.dataItem = o, this.aggregator = s, this.cardPool = h;
1061
1079
  }
1062
1080
  // 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
1063
1081
  setVisible(e) {
@@ -1065,14 +1083,20 @@ class ni {
1065
1083
  t && (t.show = e);
1066
1084
  }), this.primitives.forEach((t) => {
1067
1085
  t && (t.show = e);
1068
- }), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, r) => ({
1069
- id: this.dataItem.id,
1070
- data: {
1071
- ...this.dataItem,
1072
- show: e && (i.data?.show ?? !0)
1073
- }
1074
- })).forEach((i) => {
1075
- this.aggregator?.updatePoint(i);
1086
+ }), this.aggregator && Array.isArray(this.dataItem.billboard) && this.billboardPointIds.length && this.dataItem.billboard.map((i, r) => {
1087
+ const n = this.billboardPointIds[r];
1088
+ return n ? {
1089
+ id: n,
1090
+ data: {
1091
+ ...this.dataItem,
1092
+ show: e && (i.show ?? i.data?.show ?? !0),
1093
+ __billboardRuntimeId: n,
1094
+ __billboardRuntimeIndex: r,
1095
+ __currentBillboard: i
1096
+ }
1097
+ } : null;
1098
+ }).forEach((i) => {
1099
+ i && this.aggregator?.updatePoint(i);
1076
1100
  }), this.cardPool && this.dataItem.card && (e ? this.cardPool.showByIds([this.dataItem.id]) : this.cardPool.hideByIds([this.dataItem.id]));
1077
1101
  }
1078
1102
  // 改造 removeAll 方法,支持 Entity 和 Primitive 的移除
@@ -1081,7 +1105,10 @@ class ni {
1081
1105
  i && e.entities.remove(i);
1082
1106
  }), this.entities = [], this.primitives.forEach((i) => {
1083
1107
  i && e.scene.primitives.remove(i);
1084
- }), this.primitives = [], t && this.aggregator && Array.isArray(this.dataItem.billboard) && this.aggregator.removePointsById([this.dataItem.id]), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), this.dataItem.id;
1108
+ }), this.primitives = [], t && this.aggregator && this.billboardPointIds.length && this.aggregator.removePointsById(this.billboardPointIds), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), {
1109
+ groupId: this.dataItem.id,
1110
+ billboardPointIds: [...this.billboardPointIds]
1111
+ };
1085
1112
  }
1086
1113
  }
1087
1114
  class oi {
@@ -1095,7 +1122,7 @@ class oi {
1095
1122
  constructor(e, t, i, r, n, o) {
1096
1123
  this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = r, this.aggregator = n, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(G.Click, {
1097
1124
  name: "BufferedHierarchicalAggregator_maker_click",
1098
- fn: (h, g) => {
1125
+ fn: (h, d) => {
1099
1126
  this.cardPool.showByIds([h.data.id]);
1100
1127
  }
1101
1128
  }), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
@@ -1103,6 +1130,9 @@ class oi {
1103
1130
  }, t.ScreenSpaceEventType.LEFT_CLICK);
1104
1131
  }
1105
1132
  /** ====== 下面是抽出的创建函数 ====== */
1133
+ getBillboardPointId(e, t) {
1134
+ return `${e}__billboard__${t}`;
1135
+ }
1106
1136
  createPolyline(e, t) {
1107
1137
  if (!e.positions || e.positions.length < 1) return null;
1108
1138
  const i = this.materialManager.get({
@@ -1127,21 +1157,21 @@ class oi {
1127
1157
  themeKey: e.theme,
1128
1158
  category: "wall",
1129
1159
  options: e
1130
- }), r = (y, p = 0) => {
1160
+ }), r = (y, m = 0) => {
1131
1161
  const S = Number(y);
1132
- return Number.isFinite(S) ? S : p;
1133
- }, n = e.positions.map((y) => r(y?.[2], 0)), o = r(e.minHeight, 0), s = r(e.maxHeight, 0), h = (y) => Array.isArray(y) && y.length === e.positions.length && y.every((p) => Math.abs(r(p, 0)) < 1e-6), g = n.some((y) => Math.abs(y) > 1e-6), d = (Array.isArray(e.minimumHeights) && e.minimumHeights.length === e.positions.length && !(h(e.minimumHeights) && g) ? e.minimumHeights.map((y) => r(y, 0)) : n).map((y) => y - o), m = (Array.isArray(e.maximumHeights) && e.maximumHeights.length === e.positions.length && !(h(e.maximumHeights) && g) ? e.maximumHeights.map((y) => r(y, 0)) : n).map((y) => y + s), b = e.positions.map(
1162
+ return Number.isFinite(S) ? S : m;
1163
+ }, n = e.positions.map((y) => r(y?.[2], 0)), o = r(e.minHeight, 0), s = r(e.maxHeight, 0), h = (y) => Array.isArray(y) && y.length === e.positions.length && y.every((m) => Math.abs(r(m, 0)) < 1e-6), d = n.some((y) => Math.abs(y) > 1e-6), g = (Array.isArray(e.minimumHeights) && e.minimumHeights.length === e.positions.length && !(h(e.minimumHeights) && d) ? e.minimumHeights.map((y) => r(y, 0)) : n).map((y) => y - o), v = (Array.isArray(e.maximumHeights) && e.maximumHeights.length === e.positions.length && !(h(e.maximumHeights) && d) ? e.maximumHeights.map((y) => r(y, 0)) : n).map((y) => y + s), p = e.positions.map(
1134
1164
  (y) => this.Cesium.Cartesian3.fromDegrees(y[0], y[1], y[2] || 0)
1135
1165
  );
1136
- let _ = {
1166
+ let C = {
1137
1167
  ...e
1138
1168
  };
1139
- return i && (_.material = i), this.viewer.entities.add({
1169
+ return i && (C.material = i), this.viewer.entities.add({
1140
1170
  wall: {
1141
- ..._,
1142
- positions: b,
1143
- minimumHeights: d,
1144
- maximumHeights: m
1171
+ ...C,
1172
+ positions: p,
1173
+ minimumHeights: g,
1174
+ maximumHeights: v
1145
1175
  },
1146
1176
  show: (e.show ?? !0) && t
1147
1177
  });
@@ -1152,8 +1182,8 @@ class oi {
1152
1182
  themeKey: e.theme,
1153
1183
  category: "polygon",
1154
1184
  options: e
1155
- }), r = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(r), o = e.holes?.map((g) => {
1156
- let l = Array.isArray(g[0]) ? e.hierarchy.flat() : e.hole;
1185
+ }), r = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(r), o = e.holes?.map((d) => {
1186
+ let l = Array.isArray(d[0]) ? e.hierarchy.flat() : e.hole;
1157
1187
  return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
1158
1188
  }) || [], s = new this.Cesium.PolygonHierarchy(n, o);
1159
1189
  let h = {
@@ -1169,15 +1199,20 @@ class oi {
1169
1199
  });
1170
1200
  }
1171
1201
  createBillboardPoints(e) {
1172
- return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
1173
- const [i, r, n = 0] = t.position || [0, 0, 0];
1202
+ return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t, i) => {
1203
+ const [r, n, o = 0] = t.position || [0, 0, 0], s = this.getBillboardPointId(e.id, i);
1174
1204
  return {
1175
- id: e.id,
1176
- lon: i,
1177
- lat: r,
1178
- height: n,
1205
+ id: s,
1206
+ lon: r,
1207
+ lat: n,
1208
+ height: o,
1179
1209
  name: t.options?.text || "",
1180
- data: e,
1210
+ data: {
1211
+ ...e,
1212
+ __billboardRuntimeId: s,
1213
+ __billboardRuntimeIndex: i,
1214
+ __currentBillboard: t
1215
+ },
1181
1216
  style: { zIndex: e.zIndex || "1" }
1182
1217
  };
1183
1218
  });
@@ -1196,30 +1231,31 @@ class oi {
1196
1231
  }
1197
1232
  /** ====== 主入口:仅保留循环,内部调用独立函数 ====== */
1198
1233
  addGroup(e, t = !0) {
1199
- const i = e.id || `${Date.now()}`;
1234
+ const i = e.id || `${Date.now()}`, r = e.id ? e : { ...e, id: i };
1200
1235
  this.removeGroup(i);
1201
- const r = [], n = e.show !== !1;
1202
- (e.polyline || []).forEach((h) => {
1203
- const g = this.createPolyline(h, n);
1204
- g && r.push(g);
1205
- }), (e.wall || []).forEach((h) => {
1206
- const g = this.createWall(h, n);
1207
- g && r.push(g);
1208
- }), (e.polygon || []).forEach((h) => {
1209
- const g = this.createPolygon(h, n);
1210
- g && r.push(g);
1236
+ const n = [], o = r.show !== !1;
1237
+ (r.polyline || []).forEach((d) => {
1238
+ const l = this.createPolyline(d, o);
1239
+ l && n.push(l);
1240
+ }), (r.wall || []).forEach((d) => {
1241
+ const l = this.createWall(d, o);
1242
+ l && n.push(l);
1243
+ }), (r.polygon || []).forEach((d) => {
1244
+ const l = this.createPolygon(d, o);
1245
+ l && n.push(l);
1211
1246
  });
1212
- const o = this.createBillboardPoints(e);
1213
- o.length && t && this.aggregator.appendPoints(o, !1), this.createCard(e);
1214
- const s = new ni({
1247
+ const s = this.createBillboardPoints(r);
1248
+ s.length && t && this.aggregator.appendPoints(s, !1), this.createCard(r);
1249
+ const h = new ni({
1215
1250
  id: i,
1216
- entities: r,
1251
+ entities: n,
1217
1252
  primitives: [],
1218
- dataItem: e,
1253
+ billboardPointIds: s.map((d) => d.id),
1254
+ dataItem: r,
1219
1255
  aggregator: this.aggregator,
1220
1256
  cardPool: this.cardPool
1221
1257
  });
1222
- return this.groupMap.set(i, s), o;
1258
+ return this.groupMap.set(i, h), s;
1223
1259
  }
1224
1260
  async addGroups(e) {
1225
1261
  const i = e.map((r) => this.addGroup(r, !1)).flat();
@@ -1230,27 +1266,33 @@ class oi {
1230
1266
  t && (t.removeAll(this.viewer), this.groupMap.delete(e));
1231
1267
  }
1232
1268
  removeGroups(e) {
1233
- let t = [];
1234
- for (const i of e) {
1235
- const r = this.groupMap.get(i);
1236
- if (r) {
1237
- let n = r.removeAll(this.viewer, !1);
1238
- this.groupMap.delete(i), t.push(n);
1269
+ let t = [], i = [];
1270
+ for (const r of e) {
1271
+ const n = this.groupMap.get(r);
1272
+ if (n) {
1273
+ let o = n.removeAll(this.viewer, !1);
1274
+ this.groupMap.delete(r), t.push(...o.billboardPointIds), i.push(o.groupId);
1239
1275
  }
1240
1276
  }
1241
- this.aggregator.removePointsById(t), this.cardPool.removeByIds(t);
1277
+ t.length && this.aggregator.removePointsById(t), i.length && this.cardPool.removeByIds(i);
1242
1278
  }
1243
1279
  updateGroup(e) {
1244
1280
  const t = this.groupMap.get(e.id);
1245
1281
  t && (t.removeAll(this.viewer), this.groupMap.delete(e.id)), this.addGroup(e);
1246
1282
  }
1247
1283
  async updateGroups(e) {
1248
- this.aggregator.removePointsById(e.map((r) => r.id)), this.cardPool.removeByIds(e.map((r) => r.id));
1249
- const i = e.map((r) => {
1250
- const n = this.groupMap.get(r.id);
1251
- return n && (n.removeAll(this.viewer, !1), this.groupMap.delete(r.id)), this.addGroup(r, !1);
1284
+ const t = e.flatMap((n) => {
1285
+ const o = this.groupMap.get(n.id);
1286
+ return o?.billboardPointIds?.length ? o.billboardPointIds : (n.billboard || []).map(
1287
+ (s, h) => this.getBillboardPointId(n.id, h)
1288
+ );
1289
+ });
1290
+ t.length && this.aggregator.removePointsById(t), this.cardPool.removeByIds(e.map((n) => n.id));
1291
+ const r = e.map((n) => {
1292
+ const o = this.groupMap.get(n.id);
1293
+ return o && (o.removeAll(this.viewer, !1), this.groupMap.delete(n.id)), this.addGroup(n, !1);
1252
1294
  }).flat();
1253
- i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
1295
+ r.length > 0 && this.aggregator && this.aggregator.appendPoints(r, !1);
1254
1296
  }
1255
1297
  setGroupVisible(e, t) {
1256
1298
  this.groupMap.get(e)?.setVisible(t);
@@ -1323,7 +1365,7 @@ class li {
1323
1365
  t || (t = new V()), i || (i = new V());
1324
1366
  const s = new ie(r, n, this.labelId, t);
1325
1367
  s.setOcclusionOptions({ distanceEpsilon: 1 }), s.setOcclusionEnabled(!1);
1326
- const h = new ie(r, n, this.cardId, i, !1), g = new lt(r, n, {
1368
+ const h = new ie(r, n, this.cardId, i, !1), d = new lt(r, n, {
1327
1369
  //聚合
1328
1370
  threshold: o?.threshold || 16,
1329
1371
  displayLimit: o?.displayLimit || 300,
@@ -1342,10 +1384,10 @@ class li {
1342
1384
  r,
1343
1385
  n,
1344
1386
  l,
1345
- g,
1387
+ d,
1346
1388
  h
1347
1389
  );
1348
- return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: g, eventBus: t, cardEventBus: i };
1390
+ return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: d, eventBus: t, cardEventBus: i };
1349
1391
  }
1350
1392
  //添加标记
1351
1393
  set(e) {
@@ -1422,11 +1464,11 @@ const w = {
1422
1464
  polygonTileWidth: 2,
1423
1465
  polygonTileHeight: 2
1424
1466
  };
1425
- function v(a, e) {
1467
+ function b(a, e) {
1426
1468
  const t = Number(a);
1427
1469
  return Number.isFinite(t) ? t : e;
1428
1470
  }
1429
- function C(a) {
1471
+ function _(a) {
1430
1472
  return Number.isFinite(a) ? Math.max(1, a) : 1;
1431
1473
  }
1432
1474
  function hi(a, e) {
@@ -1436,18 +1478,18 @@ function ci(a) {
1436
1478
  const e = a?.repeat;
1437
1479
  if (Array.isArray(e) && e.length >= 2)
1438
1480
  return {
1439
- x: C(v(e[0], 1)),
1440
- y: C(v(e[1], 1))
1481
+ x: _(b(e[0], 1)),
1482
+ y: _(b(e[1], 1))
1441
1483
  };
1442
1484
  if (e && typeof e == "object")
1443
1485
  return {
1444
- x: C(v(e.x, 1)),
1445
- y: C(v(e.y, 1))
1486
+ x: _(b(e.x, 1)),
1487
+ y: _(b(e.y, 1))
1446
1488
  };
1447
1489
  const t = Number(a?.repeatX), i = Number(a?.repeatY);
1448
1490
  return Number.isFinite(t) && Number.isFinite(i) ? {
1449
- x: C(t),
1450
- y: C(i)
1491
+ x: _(t),
1492
+ y: _(i)
1451
1493
  } : null;
1452
1494
  }
1453
1495
  function xe(a, e) {
@@ -1458,13 +1500,13 @@ function xe(a, e) {
1458
1500
  const n = t[r - 1], o = t[r];
1459
1501
  if (!Array.isArray(n) || !Array.isArray(o)) continue;
1460
1502
  const s = a.Cartesian3.fromDegrees(
1461
- v(n[0], 0),
1462
- v(n[1], 0),
1463
- v(n[2], 0)
1503
+ b(n[0], 0),
1504
+ b(n[1], 0),
1505
+ b(n[2], 0)
1464
1506
  ), h = a.Cartesian3.fromDegrees(
1465
- v(o[0], 0),
1466
- v(o[1], 0),
1467
- v(o[2], 0)
1507
+ b(o[0], 0),
1508
+ b(o[1], 0),
1509
+ b(o[2], 0)
1468
1510
  );
1469
1511
  i += a.Cartesian3.distance(s, h);
1470
1512
  }
@@ -1480,7 +1522,7 @@ function Ie(a) {
1480
1522
  }
1481
1523
  if (o > 0) return n / o;
1482
1524
  }
1483
- const i = Math.abs(v(a?.minHeight, 0)), r = Math.abs(v(a?.maxHeight, 0));
1525
+ const i = Math.abs(b(a?.minHeight, 0)), r = Math.abs(b(a?.maxHeight, 0));
1484
1526
  return i > 0 || r > 0 ? i + r : 3;
1485
1527
  }
1486
1528
  function Se(a, e) {
@@ -1491,14 +1533,14 @@ function Se(a, e) {
1491
1533
  if (!Array.isArray(i) || i.length < 3) return { width: 1, height: 1 };
1492
1534
  let r = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
1493
1535
  for (let u = 0; u < i.length; u += 3) {
1494
- const m = Number(i[u]), b = Number(i[u + 1]);
1495
- !Number.isFinite(m) || !Number.isFinite(b) || (r = Math.min(r, m), n = Math.max(n, m), o = Math.min(o, b), s = Math.max(s, b));
1536
+ const v = Number(i[u]), p = Number(i[u + 1]);
1537
+ !Number.isFinite(v) || !Number.isFinite(p) || (r = Math.min(r, v), n = Math.max(n, v), o = Math.min(o, p), s = Math.max(s, p));
1496
1538
  }
1497
1539
  if (!Number.isFinite(r) || !Number.isFinite(o))
1498
1540
  return { width: 1, height: 1 };
1499
- const h = (o + s) / 2, g = a.Ellipsoid.WGS84.maximumRadius, l = a.Math.toRadians(Math.abs(n - r)), c = a.Math.toRadians(Math.abs(s - o)), d = l * g * Math.cos(a.Math.toRadians(h)), f = c * g;
1541
+ const h = (o + s) / 2, d = a.Ellipsoid.WGS84.maximumRadius, l = a.Math.toRadians(Math.abs(n - r)), c = a.Math.toRadians(Math.abs(s - o)), g = l * d * Math.cos(a.Math.toRadians(h)), f = c * d;
1500
1542
  return {
1501
- width: d > 0 ? d : 1,
1543
+ width: g > 0 ? g : 1,
1502
1544
  height: f > 0 ? f : 1
1503
1545
  };
1504
1546
  }
@@ -1513,28 +1555,28 @@ function Ee({
1513
1555
  if (e?.autoRepeat === !1)
1514
1556
  return { x: 1, y: 1 };
1515
1557
  if (i === "wall") {
1516
- const h = xe(a, t), g = Ie(t), l = v(
1558
+ const h = xe(a, t), d = Ie(t), l = b(
1517
1559
  e?.tileWidth ?? e?.textureWidth,
1518
1560
  w.wallTileWidth
1519
- ), c = v(
1561
+ ), c = b(
1520
1562
  e?.tileHeight ?? e?.textureHeight,
1521
1563
  w.wallTileHeight
1522
1564
  );
1523
1565
  return {
1524
- x: C(h / Math.max(l, 0.01)),
1525
- y: C(g / Math.max(c, 0.01))
1566
+ x: _(h / Math.max(l, 0.01)),
1567
+ y: _(d / Math.max(c, 0.01))
1526
1568
  };
1527
1569
  }
1528
- const n = Se(a, t), o = v(
1570
+ const n = Se(a, t), o = b(
1529
1571
  e?.tileWidth ?? e?.textureWidth,
1530
1572
  w.polygonTileWidth
1531
- ), s = v(
1573
+ ), s = b(
1532
1574
  e?.tileHeight ?? e?.textureHeight,
1533
1575
  w.polygonTileHeight
1534
1576
  );
1535
1577
  return {
1536
- x: C(n.width / Math.max(o, 0.01)),
1537
- y: C(n.height / Math.max(s, 0.01))
1578
+ x: _(n.width / Math.max(o, 0.01)),
1579
+ y: _(n.height / Math.max(s, 0.01))
1538
1580
  };
1539
1581
  }
1540
1582
  function De({
@@ -1549,25 +1591,25 @@ function De({
1549
1591
  if (e?.autoRepeat === !1)
1550
1592
  return 1;
1551
1593
  if (i === "wall") {
1552
- const l = xe(a, t), c = Ie(t), d = v(
1594
+ const l = xe(a, t), c = Ie(t), g = b(
1553
1595
  e?.tileWidth ?? e?.textureWidth,
1554
1596
  w.wallTileWidth
1555
- ), f = v(
1597
+ ), f = b(
1556
1598
  e?.tileHeight ?? e?.textureHeight,
1557
1599
  w.wallTileHeight
1558
- ), u = r === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(d, 0.01);
1559
- return C(Number(u.toFixed(2)));
1600
+ ), u = r === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(g, 0.01);
1601
+ return _(Number(u.toFixed(2)));
1560
1602
  }
1561
- const o = Se(a, t), s = v(
1603
+ const o = Se(a, t), s = b(
1562
1604
  e?.tileWidth ?? e?.textureWidth,
1563
1605
  w.polygonTileWidth
1564
- ), h = v(
1606
+ ), h = b(
1565
1607
  e?.tileHeight ?? e?.textureHeight,
1566
1608
  w.polygonTileHeight
1567
- ), g = r === "vertical" ? o.height / Math.max(h, 0.01) : o.width / Math.max(s, 0.01);
1568
- return C(Number(g.toFixed(2)));
1609
+ ), d = r === "vertical" ? o.height / Math.max(h, 0.01) : o.width / Math.max(s, 0.01);
1610
+ return _(Number(d.toFixed(2)));
1569
1611
  }
1570
- function N(a) {
1612
+ function R(a) {
1571
1613
  const e = a;
1572
1614
  return e.__materialFactory = !0, e;
1573
1615
  }
@@ -1575,7 +1617,7 @@ function Ae(a) {
1575
1617
  const e = String(a?.wallVerticalMode ?? a?.verticalMode ?? "stretch");
1576
1618
  return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
1577
1619
  }
1578
- function gi({
1620
+ function di({
1579
1621
  Cesium: a,
1580
1622
  themeOptions: e,
1581
1623
  entityOptions: t
@@ -1588,7 +1630,7 @@ function gi({
1588
1630
  });
1589
1631
  return Ae(e) === "repeat" ? i : { x: i.x, y: 1 };
1590
1632
  }
1591
- function di(a, e) {
1633
+ function gi(a, e) {
1592
1634
  const t = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
1593
1635
  function i(r) {
1594
1636
  this._definitionChanged = new a.Event(), this._color = r.color, this.color = r.color;
@@ -1735,7 +1777,7 @@ function fi({
1735
1777
  themeKey: e.data?.theme,
1736
1778
  category: "polygon",
1737
1779
  force: i,
1738
- material: N((n = {}) => {
1780
+ material: R((n = {}) => {
1739
1781
  const o = Ee({
1740
1782
  Cesium: a,
1741
1783
  themeOptions: r,
@@ -1754,7 +1796,7 @@ function fi({
1754
1796
  themeKey: e.data?.theme,
1755
1797
  category: "polygon",
1756
1798
  force: i,
1757
- material: N((n = {}) => {
1799
+ material: R((n = {}) => {
1758
1800
  const o = e.data?.freely || "vertical", s = De({
1759
1801
  Cesium: a,
1760
1802
  themeOptions: r,
@@ -1765,7 +1807,7 @@ function fi({
1765
1807
  return Pe(a, {
1766
1808
  image: e.img,
1767
1809
  color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
1768
- duration: v(r?.duration, 5e3),
1810
+ duration: b(r?.duration, 5e3),
1769
1811
  freely: o,
1770
1812
  direction: r?.direction || "+",
1771
1813
  count: s
@@ -1788,18 +1830,18 @@ function mi({
1788
1830
  themeKey: e.data?.theme,
1789
1831
  category: "wall",
1790
1832
  force: i,
1791
- material: N((n = {}) => {
1792
- const o = Ae(r), s = gi({
1833
+ material: R((n = {}) => {
1834
+ const o = Ae(r), s = di({
1793
1835
  Cesium: a,
1794
1836
  themeOptions: r,
1795
1837
  entityOptions: n
1796
1838
  });
1797
1839
  if (o === "bottom") {
1798
1840
  const h = hi(
1799
- v(r?.bottomHeightRatio, 0.3),
1841
+ b(r?.bottomHeightRatio, 0.3),
1800
1842
  0.3
1801
1843
  );
1802
- return di(a, {
1844
+ return gi(a, {
1803
1845
  image: e.img,
1804
1846
  repeatX: s.x,
1805
1847
  bottomHeightRatio: h,
@@ -1819,7 +1861,7 @@ function mi({
1819
1861
  themeKey: e.data?.theme,
1820
1862
  category: "wall",
1821
1863
  force: i,
1822
- material: N((n = {}) => {
1864
+ material: R((n = {}) => {
1823
1865
  const o = e.data?.freely || "vertical", s = De({
1824
1866
  Cesium: a,
1825
1867
  themeOptions: r,
@@ -1830,7 +1872,7 @@ function mi({
1830
1872
  return Pe(a, {
1831
1873
  image: e.img,
1832
1874
  color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
1833
- duration: v(r?.duration, 5e3),
1875
+ duration: b(r?.duration, 5e3),
1834
1876
  freely: o,
1835
1877
  direction: r?.direction || "+",
1836
1878
  count: s
@@ -1841,6 +1883,9 @@ function mi({
1841
1883
  }
1842
1884
  }
1843
1885
  class pi extends li {
1886
+ getCurrentBillboard(e) {
1887
+ return e?.__currentBillboard || e?.billboard?.[0];
1888
+ }
1844
1889
  constructor(e) {
1845
1890
  const {
1846
1891
  labelId: t = "report-marker",
@@ -1851,13 +1896,13 @@ class pi extends li {
1851
1896
  runListener: s = () => {
1852
1897
  },
1853
1898
  MaterialManager: h = new we(),
1854
- aggregatorOptions: g
1855
- } = e, l = [...r], c = [...n], d = [...o], f = {
1899
+ aggregatorOptions: d
1900
+ } = e, l = [...r], c = [...n], g = [...o], f = {
1856
1901
  clusterTheme: "Tag1007",
1857
1902
  pointTheme: "Tag1001",
1858
1903
  centralPointMode: "firstPoint",
1859
1904
  debugCurrentGrids: !1,
1860
- ...g || {}
1905
+ ...d || {}
1861
1906
  }, u = {
1862
1907
  ...e,
1863
1908
  labelId: t,
@@ -1866,7 +1911,7 @@ class pi extends li {
1866
1911
  aggregatorOptions: f,
1867
1912
  eventBus: new V()
1868
1913
  };
1869
- super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(d), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
1914
+ super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(g), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
1870
1915
  }
1871
1916
  initDefaultTagTheme() {
1872
1917
  this.setTagTheme({
@@ -2088,21 +2133,22 @@ class pi extends li {
2088
2133
  //注册主题
2089
2134
  setTagTheme(e) {
2090
2135
  let { labelPool: t } = this.instance;
2136
+ const i = (r) => this.getCurrentBillboard(r);
2091
2137
  t.registerTheme(e.data.theme, {
2092
- createElement(i, r) {
2093
- let n = r.data?.billboard?.[0];
2094
- const o = ii(n, ["position", "options"]);
2095
- let s, h = {
2096
- ...o,
2097
- text: n?.options?.text,
2138
+ createElement(r, n) {
2139
+ let o = i(n.data);
2140
+ const s = ii(o, ["position", "options"]);
2141
+ let h, d = {
2142
+ ...s,
2143
+ text: o?.options?.text,
2098
2144
  isFullLink: e?.isFullLink ?? !1,
2099
2145
  img: e?.data?.options?.img,
2100
2146
  textStyle: e?.data?.options?.textStyle,
2101
2147
  imgStyle: e?.data?.options?.imgStyle
2102
2148
  };
2103
- if (r.data?.gridKey)
2104
- s = x(I(ae), {
2105
- text: r.data?.count,
2149
+ if (n.data?.gridKey)
2150
+ h = x(I(ae), {
2151
+ text: n.data?.count,
2106
2152
  isFullLink: e.isFullLink ?? !1,
2107
2153
  img: e?.data.options.img,
2108
2154
  imgStyle: e?.data.options?.imgStyle,
@@ -2123,29 +2169,31 @@ class pi extends li {
2123
2169
  }
2124
2170
  });
2125
2171
  else if (e.comType == 4)
2126
- s = x(I(Xe), h);
2172
+ h = x(I(Xe), d);
2127
2173
  else if (e.comType == 5 || e.comType == 8) {
2128
- const g = n?.options || {}, l = e?.data?.options || {}, c = n?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, d = g.otherOffset ?? l.otherOffset ?? { x: 0, y: -0 }, f = g.isCanDraggable ?? l.isCanDraggable ?? e?.isCanDraggable ?? !1, u = e.comType == 8 ? Ve : Ke;
2129
- s = x(I(u), {
2130
- ...h,
2131
- pixelOffset: c,
2132
- textStyle: g.textStyle || l.textStyle,
2133
- lineStyle: g.lineStyle || l.lineStyle,
2134
- otherOffset: d,
2135
- isCanDraggable: f,
2136
- onCanDraggable: g.onCanDraggable || e?.onCanDraggable,
2137
- onSetOtherOffset: (m) => {
2138
- r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.otherOffset = m), g.onSetOtherOffset?.(m), e?.onSetOtherOffset?.(r.data, m);
2174
+ const l = o?.options || {}, c = e?.data?.options || {}, g = o?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, f = l.otherOffset ?? c.otherOffset ?? { x: 0, y: -0 }, u = l.isCanDraggable ?? c.isCanDraggable ?? e?.isCanDraggable ?? !1, v = e.comType == 8 ? Ve : Ke;
2175
+ h = x(I(v), {
2176
+ ...d,
2177
+ pixelOffset: g,
2178
+ textStyle: l.textStyle || c.textStyle,
2179
+ lineStyle: l.lineStyle || c.lineStyle,
2180
+ otherOffset: f,
2181
+ isCanDraggable: u,
2182
+ onCanDraggable: l.onCanDraggable || e?.onCanDraggable,
2183
+ onSetOtherOffset: (p) => {
2184
+ const C = i(n.data);
2185
+ C?.options && (C.options.otherOffset = p), l.onSetOtherOffset?.(p), e?.onSetOtherOffset?.(n.data, p);
2139
2186
  },
2140
- onSetLineStake: (m) => {
2141
- r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.lineStake = m), g.onSetLineStake?.(m), e?.onSetLineStake?.(r.data, m);
2187
+ onSetLineStake: (p) => {
2188
+ const C = i(n.data);
2189
+ C?.options && (C.options.lineStake = p), l.onSetLineStake?.(p), e?.onSetLineStake?.(n.data, p);
2142
2190
  }
2143
2191
  });
2144
- } else e.comType == 6 || e.comType == 7 ? s = x(I(Ye), {
2145
- text: h.text,
2146
- textStyle: h.textStyle
2147
- }) : s = x(I(ae), h);
2148
- return O(s, i), () => O(null, i);
2192
+ } else e.comType == 6 || e.comType == 7 ? h = x(I(Ye), {
2193
+ text: d.text,
2194
+ textStyle: d.textStyle
2195
+ }) : h = x(I(ae), d);
2196
+ return O(h, r), () => O(null, r);
2149
2197
  },
2150
2198
  options: {
2151
2199
  offset: e.comType == 5 || e.comType == 8 ? {} : e?.data?.pixelOffset || {}
@@ -2158,7 +2206,7 @@ class pi extends li {
2158
2206
  e.addListener(G.Click, {
2159
2207
  name: "marker:click",
2160
2208
  fn: (n) => {
2161
- t.runListener?.(H.标记左键点击, n.data), pe(n.data?.onClick) && n.data?.onClick(n.data), n.data?.cameraPoint && n.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
2209
+ t.runListener?.(H.标记左键点击, n.data), pe(n.data?.onClick) && n.data?.onClick(n.data), n.data?.cameraPoint && this.getCurrentBillboard(n.data)?.isFlyToCameraPoint && i?.camera?.flyTo({
2162
2210
  duration: 1,
2163
2211
  ...n.data?.cameraPoint
2164
2212
  });
@@ -2168,9 +2216,10 @@ class pi extends li {
2168
2216
  fn: (n) => {
2169
2217
  let o = this.opt.Cesium, s = { x: 0, y: 0 };
2170
2218
  try {
2171
- if (n.data?.billboard?.[0]?.position?.length > 2) {
2172
- let h = n.data?.billboard[0]?.position, g = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(g);
2173
- s.x = l.x, s.y = l.y;
2219
+ const h = this.getCurrentBillboard(n.data);
2220
+ if (h?.position?.length > 2) {
2221
+ let d = h.position, l = o.Cartesian3.fromDegrees(d[0], d[1], d[3] || 0), c = this.instance.labelPool.toWindowCoordinates(l);
2222
+ s.x = c.x, s.y = c.y;
2174
2223
  }
2175
2224
  } catch (h) {
2176
2225
  console.log(h);
@@ -2182,9 +2231,10 @@ class pi extends li {
2182
2231
  fn: (n) => {
2183
2232
  let o = this.opt.Cesium, s = { x: 0, y: 0 };
2184
2233
  try {
2185
- if (n.data?.billboard?.[0]?.position?.length > 2) {
2186
- let h = n.data?.billboard[0]?.position, g = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(g);
2187
- s.x = l.x, s.y = l.y;
2234
+ const h = this.getCurrentBillboard(n.data);
2235
+ if (h?.position?.length > 2) {
2236
+ let d = h.position, l = o.Cartesian3.fromDegrees(d[0], d[1], d[3] || 0), c = this.instance.labelPool.toWindowCoordinates(l);
2237
+ s.x = c.x, s.y = c.y;
2188
2238
  }
2189
2239
  } catch (h) {
2190
2240
  console.log(h);
@@ -2207,12 +2257,12 @@ class pi extends li {
2207
2257
  });
2208
2258
  }
2209
2259
  }
2210
- const yi = /* @__PURE__ */ ke({
2260
+ const yi = /* @__PURE__ */ Ne({
2211
2261
  __name: "MarkerManage",
2212
2262
  props: st,
2213
2263
  emits: ["register", "load", "marker-event"],
2214
2264
  setup(a, { expose: e, emit: t }) {
2215
- const i = a, r = t, n = Be("leitingMethods");
2265
+ const i = a, r = t, n = ke("leitingMethods");
2216
2266
  let o = null;
2217
2267
  const s = (l = {}) => {
2218
2268
  if (o) return o;
@@ -2221,8 +2271,8 @@ const yi = /* @__PURE__ */ ke({
2221
2271
  ...l,
2222
2272
  Cesium: l.Cesium || i.Cesium,
2223
2273
  viewer: l.viewer || i.viewer,
2224
- runListener: (d, f, ...u) => {
2225
- r("marker-event", { key: d, data: f, args: u });
2274
+ runListener: (g, f, ...u) => {
2275
+ r("marker-event", { key: g, data: f, args: u });
2226
2276
  }
2227
2277
  };
2228
2278
  return !c.Cesium || !c.viewer ? null : (o = new pi(c), l.methods && (l.methods.setTagTheme = o.setTagTheme.bind(o), l.methods.setMaterial = o.setMaterial.bind(o), l.methods.setEntityList = o.set.bind(o), l.methods.addComItem = o.add.bind(o), l.methods.deleteComItem = o.delete.bind(o), l.methods.updateComItem = o.update.bind(o), l.methods.getEntityByID = o.getById.bind(o), l.methods.getOptions = o.getOptions.bind(o)), r("load", o), o);
@@ -2245,28 +2295,28 @@ const yi = /* @__PURE__ */ ke({
2245
2295
  setMaterial: (l) => o?.setMaterial(l)
2246
2296
  };
2247
2297
  e(h), r("register", h);
2248
- function g() {
2298
+ function d() {
2249
2299
  if (o) return o;
2250
- const l = ze(n), c = l?.getCesium?.(), d = l?.getViewer?.();
2251
- c && d ? s({ Cesium: c, viewer: d, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
2300
+ const l = ze(n), c = l?.getCesium?.(), g = l?.getViewer?.();
2301
+ c && g ? s({ Cesium: c, viewer: g, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
2252
2302
  }
2253
2303
  return We(() => {
2254
- g();
2304
+ d();
2255
2305
  }), te(
2256
2306
  () => [i.Cesium, i.viewer],
2257
2307
  ([l, c]) => {
2258
- l && c && !o && g();
2308
+ l && c && !o && d();
2259
2309
  }
2260
2310
  ), te(
2261
2311
  () => n?.value,
2262
2312
  (l, c) => {
2263
- g();
2313
+ d();
2264
2314
  },
2265
2315
  { deep: !1 }
2266
2316
  ), Fe(() => {
2267
2317
  }), (l, c) => $e(l.$slots, "default");
2268
2318
  }
2269
- }), xi = Ne(yi);
2319
+ }), xi = Re(yi);
2270
2320
  export {
2271
2321
  xi as CxMarkerManage,
2272
2322
  pi as MarkerManage,