leiting-bim 2.1.157 → 2.1.160

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,13 +1,13 @@
1
- import { w as xe } from "../create-DynflqE1.js";
2
- import { h as _, markRaw as M, render as O, defineComponent as Oe, inject as Se, onMounted as Ee, watch as j, onUnmounted as De, renderSlot as Ie, unref as Ge } from "vue";
3
- import { M as S, H as Z, a as $ } from "../HtmlOverlayLabelPool-CbiNlyAM.js";
4
- import { CxCardCarousel as J } from "./card-carousel.js";
5
- import { CxMarkerBubbleLine as Ae, CxMarkerBubble as ke } from "./marker-bubble.js";
6
- import { CxMarkerDefault as Q } from "./marker-default.js";
7
- import { CxMarkerHtml as Be } from "./marker-html.js";
8
- import { CxMarkerText as Re } from "./marker-text.js";
9
- import { i as K, b as ne, a as L, S as D, d as ee, c as W, e as oe, f as $e, g as se, M as le, h as H, j as He, k as Ne, l as ze, m as he, n as ce, o as Fe, p as Ke, q as We, r as Ve, s as Ye, t as de, u as Ue, v as Xe, w as qe, x as je } from "../index-McKGafjp.js";
10
- const Ze = {
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";
3
+ import { M as G, H as ie, a as V } from "../HtmlOverlayLabelPool-CbiNlyAM.js";
4
+ import { CxCardCarousel as re } from "./card-carousel.js";
5
+ import { CxMarkerBubbleLine as Ve, CxMarkerBubble as Ke } from "./marker-bubble.js";
6
+ import { CxMarkerDefault as ae } from "./marker-default.js";
7
+ import { CxMarkerHtml as Xe } from "./marker-html.js";
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";
10
+ const st = {
11
11
  id: { type: String, default: "marker" },
12
12
  Cesium: { type: Object },
13
13
  viewer: { type: Object },
@@ -18,8 +18,8 @@ const Ze = {
18
18
  themeConfig: { type: Object }
19
19
  // Optional override
20
20
  };
21
- var E = /* @__PURE__ */ ((r) => (r.左建选中模型 = "MODEL_LEFT_CLICK", r.标记左键点击 = "TAG_LEFT_CLICK", r.标记移入 = "TAG_MOUSEENTER", r.标记移出 = "TAG_MOUSELEAVE", r.模型位置保存 = "SAVE_REGION", r.模型加载完成 = "MODEL_READY", r))(E || {});
22
- class Je {
21
+ var H = /* @__PURE__ */ ((a) => (a.左建选中模型 = "MODEL_LEFT_CLICK", a.标记左键点击 = "TAG_LEFT_CLICK", a.标记移入 = "TAG_MOUSEENTER", a.标记移出 = "TAG_MOUSELEAVE", a.模型位置保存 = "SAVE_REGION", a.模型加载完成 = "MODEL_READY", a))(H || {});
22
+ class lt {
23
23
  Cesium;
24
24
  viewer;
25
25
  labelPool;
@@ -56,10 +56,10 @@ class Je {
56
56
  maxRefineLevels = 2;
57
57
  constructor(e, t, i) {
58
58
  this.Cesium = e, this.viewer = t, 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, this.terrainLevelOffset = i.terrainLevelOffset ?? 2;
59
- const n = this.viewer.scene && this.viewer.scene.globe, a = n && n._surface, o = a && a._tileProvider, s = o?.tilingScheme || new this.Cesium.GeographicTilingScheme();
60
- this._lastTileProvider = o, this.tilingScheme = s, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.debugCurrentGrids && this._ensureDebugImageryLayer(), n && (this._tileLoadListener = (h) => {
59
+ const r = this.viewer.scene && this.viewer.scene.globe, n = r && r._surface, o = n && n._tileProvider, s = o?.tilingScheme || new this.Cesium.GeographicTilingScheme();
60
+ this._lastTileProvider = o, this.tilingScheme = s, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.debugCurrentGrids && this._ensureDebugImageryLayer(), r && (this._tileLoadListener = (h) => {
61
61
  h === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
62
- }, n.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
62
+ }, r.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
63
63
  this._update();
64
64
  }, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
65
65
  }
@@ -80,21 +80,21 @@ class Je {
80
80
  this.debugCurrentGrids = e, e ? this._ensureDebugImageryLayer() : (this._clearDebugGrids(), this._removeDebugImageryLayer()), t && this._update();
81
81
  }
82
82
  _syncTilingSchemeAndLevels() {
83
- const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, n = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), a = i !== this._lastTileProvider, o = this.tilingScheme !== n;
84
- !a && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = n, this.levels = this._createLevels(), this._buildLevels(), this.debugCurrentGrids && (this._removeDebugImageryLayer(), this._ensureDebugImageryLayer()));
83
+ const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, r = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), n = i !== this._lastTileProvider, o = this.tilingScheme !== r;
84
+ !n && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = r, this.levels = this._createLevels(), this._buildLevels(), this.debugCurrentGrids && (this._removeDebugImageryLayer(), this._ensureDebugImageryLayer()));
85
85
  }
86
86
  _createLevels() {
87
87
  const e = [];
88
88
  this.levelIndexByTileLevel = /* @__PURE__ */ new Map();
89
89
  const t = 0, i = this.maxLevel;
90
- let n = 0;
91
- for (let a = t; a <= i; a++, n++) {
92
- const o = 360 / Math.pow(2, a);
90
+ let r = 0;
91
+ for (let n = t; n <= i; n++, r++) {
92
+ const o = 360 / Math.pow(2, n);
93
93
  e.push({
94
- level: a,
94
+ level: n,
95
95
  size: o,
96
96
  minViewWidth: o * 4
97
- }), this.levelIndexByTileLevel.set(a, n);
97
+ }), this.levelIndexByTileLevel.set(n, r);
98
98
  }
99
99
  return e;
100
100
  }
@@ -114,49 +114,49 @@ class Je {
114
114
  }, this._updateDelay);
115
115
  }
116
116
  updatePoint(e) {
117
- const t = this.points.findIndex((a) => a.id === e.id);
117
+ const t = this.points.findIndex((n) => n.id === e.id);
118
118
  if (t === -1) return;
119
119
  const i = this.points[t];
120
- for (const a of this.levels) {
121
- const o = a.level, s = this.gridLayers.get(o);
120
+ for (const n of this.levels) {
121
+ const o = n.level, s = this.gridLayers.get(o);
122
122
  if (!s) continue;
123
- const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
123
+ const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), g = this.tilingScheme.positionToTileXY(
124
124
  h,
125
125
  o,
126
126
  new this.Cesium.Cartesian2()
127
127
  );
128
- if (!d) continue;
129
- const l = `${d.x}_${d.y}`, c = s.get(l);
128
+ if (!g) continue;
129
+ const l = `${g.x}_${g.y}`, c = s.get(l);
130
130
  if (c) {
131
- const g = c.allPoints.findIndex((f) => f.id === e.id);
132
- if (g !== -1 && c.allPoints.splice(g, 1), i.data?.billboard?.[0]?.skipAggregation) {
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) {
133
133
  const f = c.skipPoints.findIndex((u) => u.id === e.id);
134
134
  f !== -1 && c.skipPoints.splice(f, 1);
135
135
  } else {
136
136
  const f = this.groupByTheme ? i.data?.theme : this.clusterTheme, u = c.groups.get(f);
137
137
  if (u) {
138
- const m = u.findIndex((y) => y.id === e.id);
138
+ const m = u.findIndex((b) => b.id === e.id);
139
139
  m !== -1 && u.splice(m, 1), u.length === 0 && c.groups.delete(f);
140
140
  }
141
141
  }
142
142
  }
143
143
  }
144
- const n = { ...i, ...e };
145
- this.points[t] = n, this._addPointToGrid(n), this._update();
144
+ const r = { ...i, ...e };
145
+ this.points[t] = r, this._addPointToGrid(r), this._update();
146
146
  }
147
147
  removePointsById(e) {
148
148
  const t = new Set(e);
149
149
  this.points = this.points.filter((i) => !t.has(i.id));
150
150
  for (const i of this.levels) {
151
- const n = this.gridLayers.get(i.level);
152
- if (n)
153
- for (const [a, o] of n.entries()) {
151
+ const r = this.gridLayers.get(i.level);
152
+ if (r)
153
+ for (const [n, o] of r.entries()) {
154
154
  o.allPoints = o.allPoints.filter((s) => !t.has(s.id)), o.skipPoints = o.skipPoints.filter((s) => !t.has(s.id));
155
155
  for (const [s, h] of o.groups.entries()) {
156
- const d = h.filter((l) => !t.has(l.id));
157
- d.length === 0 ? o.groups.delete(s) : o.groups.set(s, d);
156
+ const g = h.filter((l) => !t.has(l.id));
157
+ g.length === 0 ? o.groups.delete(s) : o.groups.set(s, g);
158
158
  }
159
- o.allPoints.length === 0 && n.delete(a);
159
+ o.allPoints.length === 0 && r.delete(n);
160
160
  }
161
161
  }
162
162
  this._update();
@@ -170,52 +170,52 @@ class Je {
170
170
  }
171
171
  _addPointToGrid(e) {
172
172
  for (const t of this.levels) {
173
- const i = t.level, n = this.gridLayers.get(i);
174
- if (!n) continue;
175
- const a = this.Cesium.Cartographic.fromDegrees(e.lon, e.lat), o = this.tilingScheme.positionToTileXY(
176
- a,
173
+ const i = t.level, r = this.gridLayers.get(i);
174
+ if (!r) continue;
175
+ const n = this.Cesium.Cartographic.fromDegrees(e.lon, e.lat), o = this.tilingScheme.positionToTileXY(
176
+ n,
177
177
  i,
178
178
  new this.Cesium.Cartesian2()
179
179
  );
180
180
  if (!o) continue;
181
181
  const s = `${o.x}_${o.y}`;
182
- let h = n.get(s);
182
+ let h = r.get(s);
183
183
  if (h || (h = {
184
184
  allPoints: [],
185
185
  groups: /* @__PURE__ */ new Map(),
186
186
  skipPoints: []
187
- }, n.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
187
+ }, r.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
188
188
  h.skipPoints.push(e);
189
189
  else {
190
- const d = this.groupByTheme ? e.data?.billboard?.[0]?.theme : this.clusterTheme;
191
- h.groups.has(d) || h.groups.set(d, []), h.groups.get(d).push(e);
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);
192
192
  }
193
193
  }
194
194
  }
195
195
  // 在添加/更新点时预计算并缓存地图层级区间
196
196
  _preparePointLevelRange(e) {
197
197
  const t = e.data || {};
198
- let i = t.minLevel, n = t.maxLevel;
199
- const a = t.levelRange;
200
- Array.isArray(a) ? (a.length > 0 && i == null && (i = a[0]), a.length > 1 && n == null && (n = a[1])) : a && typeof a == "object" && (i == null && typeof a.min == "number" && (i = a.min), n == null && typeof a.max == "number" && (n = a.max));
201
- const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s = n == null ? this.defaultMaxLevel : Number(n) || this.defaultMaxLevel;
198
+ let i = t.minLevel, r = t.maxLevel;
199
+ const n = t.levelRange;
200
+ Array.isArray(n) ? (n.length > 0 && i == null && (i = n[0]), n.length > 1 && r == null && (r = n[1])) : n && typeof n == "object" && (i == null && typeof n.min == "number" && (i = n.min), r == null && typeof n.max == "number" && (r = n.max));
201
+ const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s = r == null ? this.defaultMaxLevel : Number(r) || this.defaultMaxLevel;
202
202
  e.__minLevel = o, e.__maxLevel = s;
203
203
  }
204
204
  _isVisibleAtLevel(e, t) {
205
205
  if (t == null) return !0;
206
206
  (e.__minLevel === void 0 || e.__maxLevel === void 0) && this._preparePointLevelRange(e);
207
- const i = e.__minLevel ?? this.defaultMinLevel, n = e.__maxLevel ?? this.defaultMaxLevel;
208
- return t >= i && t <= n;
207
+ const i = e.__minLevel ?? this.defaultMinLevel, r = e.__maxLevel ?? this.defaultMaxLevel;
208
+ return t >= i && t <= r;
209
209
  }
210
210
  _update() {
211
211
  if (!this.labelPool) return;
212
212
  this._syncTilingSchemeAndLevels(), this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
213
213
  const e = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
214
214
  let t = 0;
215
- const i = (n, a, o, s) => {
215
+ const i = (r, n, o, s) => {
216
216
  t = this._processCell(
217
+ r,
217
218
  n,
218
- a,
219
219
  o,
220
220
  s,
221
221
  e,
@@ -223,12 +223,12 @@ class Je {
223
223
  );
224
224
  };
225
225
  try {
226
- const n = this._getSurfaceTiles();
227
- if (!n || n.length === 0) {
226
+ const r = this._getSurfaceTiles();
227
+ if (!r || r.length === 0) {
228
228
  this._handleNoSurfaceTiles(t);
229
229
  return;
230
230
  }
231
- this._tilesRetryCount = 0, this._processTiles(n, i);
231
+ this._tilesRetryCount = 0, this._processTiles(r, i);
232
232
  } catch {
233
233
  this.labelPool.cleanup();
234
234
  return;
@@ -258,21 +258,21 @@ class Je {
258
258
  let t = this.levelIndexByTileLevel.get(e);
259
259
  if (t !== void 0) return t;
260
260
  if (this.levels.length === 0) return;
261
- const i = this.levels[0].level, n = this.levels[this.levels.length - 1].level;
262
- if (e > n)
261
+ const i = this.levels[0].level, r = this.levels[this.levels.length - 1].level;
262
+ if (e > r)
263
263
  return this.levels.length - 1;
264
264
  if (e < i)
265
265
  return 0;
266
- let a = 0, o = 1 / 0;
266
+ let n = 0, o = 1 / 0;
267
267
  for (let s = 0; s < this.levels.length; s++) {
268
268
  const h = Math.abs(this.levels[s].level - e);
269
- h < o && (o = h, a = s);
269
+ h < o && (o = h, n = s);
270
270
  }
271
- return a;
271
+ return n;
272
272
  }
273
273
  _isTerrainEnabled() {
274
- const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe, n = i && i.terrainProvider, a = e || n;
275
- return a ? !(a instanceof this.Cesium.EllipsoidTerrainProvider) : !1;
274
+ const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe, r = i && i.terrainProvider, n = e || r;
275
+ return n ? !(n instanceof this.Cesium.EllipsoidTerrainProvider) : !1;
276
276
  }
277
277
  _getGridRefLevel(e) {
278
278
  let t = e;
@@ -283,79 +283,79 @@ class Je {
283
283
  return t;
284
284
  }
285
285
  _processTiles(e, t) {
286
- const i = /* @__PURE__ */ new Set(), n = !this._isTerrainEnabled(), a = this.viewer.scene, o = a && a.globe, s = o && o.ellipsoid, h = s && a.camera.computeViewRectangle(s), d = (l, c, g) => {
287
- if (!n || !h) return !0;
288
- const f = this.tilingScheme.tileXYToRectangle(l, c, g);
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) => {
287
+ if (!r || !h) return !0;
288
+ const f = this.tilingScheme.tileXYToRectangle(l, c, d);
289
289
  return !(!f || f.east <= h.west || f.west >= h.east || f.north <= h.south || f.south >= h.north);
290
290
  };
291
291
  for (const l of e) {
292
- const c = l.rectangle, g = l._level ?? l.level;
293
- if (!c || typeof g != "number") continue;
294
- const f = this._getGridRefLevel(g), u = this._resolveLevelIndex(f);
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);
295
295
  if (u === void 0) continue;
296
- const m = this.levels[u].level, y = l._x ?? l.x, T = l._y ?? l.y;
297
- if (typeof y == "number" && typeof T == "number") {
298
- const C = g - m;
299
- if (C >= 0) {
300
- const b = 1 << C, v = Math.floor(y / b), w = Math.floor(T / b), x = `${m}_${v}_${w}`;
301
- if (i.has(x)) continue;
302
- i.add(x), t(u, v, w, g);
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;
299
+ if (L >= 0) {
300
+ const T = 1 << L, M = Math.floor(b / T), D = Math.floor(_ / T), A = `${m}_${M}_${D}`;
301
+ if (i.has(A)) continue;
302
+ i.add(A), t(u, M, D, d);
303
303
  } else {
304
- const v = 1 << Math.min(-C, this.maxRefineLevels), w = y * v, x = T * v;
305
- for (let A = 0; A < v; A++)
306
- for (let k = 0; k < v; k++) {
307
- const B = w + A, R = x + k;
308
- if (!d(B, R, m)) continue;
309
- const q = `${m}_${B}_${R}`;
310
- i.has(q) || (i.add(q), t(u, B, R, g));
304
+ const M = 1 << Math.min(-L, this.maxRefineLevels), D = b * M, A = _ * M;
305
+ for (let W = 0; W < M; W++)
306
+ for (let F = 0; F < M; F++) {
307
+ 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));
311
311
  }
312
312
  }
313
313
  continue;
314
314
  }
315
- const p = this.levels[u].size, X = this.Cesium.Math.toDegrees(c.west), I = this.Cesium.Math.toDegrees(c.east), P = this.Cesium.Math.toDegrees(c.south), G = this.Cesium.Math.toDegrees(c.north), Me = Math.floor((X - -180) / p), Te = Math.floor((I - -180) / p), Pe = Math.floor((P - -90) / p), we = Math.floor((G - -90) / p);
316
- for (let C = Me; C <= Te; C++)
317
- for (let b = Pe; b <= we; b++) {
318
- if (!d(C, b, m)) continue;
319
- const v = `${m}_${C}_${b}`;
320
- i.has(v) || (i.add(v), t(u, C, b, g));
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);
316
+ 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));
321
321
  }
322
322
  }
323
323
  }
324
- _processCell(e, t, i, n, a, o) {
324
+ _processCell(e, t, i, r, n, o) {
325
325
  if (o >= this.displayLimit || e < 0) return o;
326
326
  e >= this.levels.length && (e = this.levels.length - 1);
327
- const s = this._getCellContext(e, t, i, n);
328
- return s ? (o = this._processCellSkipPoints(s, o), o >= this.displayLimit ? (this._debugDrawCell(s), o) : (o = this._processCellGroups(s, a, o), this._debugDrawCell(s), o)) : o;
327
+ const s = this._getCellContext(e, t, i, r);
328
+ return s ? (o = this._processCellSkipPoints(s, o), o >= this.displayLimit ? (this._debugDrawCell(s), o) : (o = this._processCellGroups(s, n, o), this._debugDrawCell(s), o)) : o;
329
329
  }
330
- _getCellContext(e, t, i, n) {
330
+ _getCellContext(e, t, i, r) {
331
331
  const o = this.levels[e].level, s = this.gridLayers.get(o);
332
332
  if (!s) return null;
333
- const h = `${t}_${i}`, d = s.get(h);
334
- if (!d) return null;
335
- 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), m = (c + f) / 2, y = (g + u) / 2;
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;
336
336
  return {
337
337
  levelIdx: e,
338
338
  tileLevel: o,
339
339
  lonIdx: t,
340
340
  latIdx: i,
341
341
  key: h,
342
- cell: d,
342
+ cell: g,
343
343
  rect: l,
344
344
  west: c,
345
- south: g,
345
+ south: d,
346
346
  east: f,
347
347
  north: u,
348
348
  centerLon: m,
349
- centerLat: y,
350
- viewTileLevel: n
349
+ centerLat: b,
350
+ viewTileLevel: r
351
351
  };
352
352
  }
353
353
  _processCellSkipPoints(e, t) {
354
- const { cell: i, viewTileLevel: n } = e, a = n;
354
+ const { cell: i, viewTileLevel: r } = e, n = r;
355
355
  for (const o of i.skipPoints)
356
356
  if (o.data?.show !== !1) {
357
357
  if (t >= this.displayLimit) break;
358
- this._isVisibleAtLevel(o, a) && (this.labelPool.add(o.data, {
358
+ this._isVisibleAtLevel(o, n) && (this.labelPool.add(o.data, {
359
359
  id: `point-${o.id}`,
360
360
  lon: o.lon,
361
361
  lat: o.lat,
@@ -368,19 +368,19 @@ class Je {
368
368
  }
369
369
  _processCellGroups(e, t, i) {
370
370
  const {
371
- levelIdx: n,
372
- lonIdx: a,
371
+ levelIdx: r,
372
+ lonIdx: n,
373
373
  latIdx: o,
374
374
  cell: s,
375
375
  centerLon: h,
376
- centerLat: d,
376
+ centerLat: g,
377
377
  viewTileLevel: l
378
378
  } = e, c = l;
379
- for (const [g, f] of s.groups) {
379
+ for (const [d, f] of s.groups) {
380
380
  const u = f.filter((p) => p.data?.show !== !1);
381
381
  if (u.length === 0) continue;
382
- let m = h, y = d, T = u[0]?.height || 0;
383
- if (this.centralPointMode == "firstPoint" && (m = u[0]?.lon || 0, y = u[0]?.lat || 0, T = u[0]?.height || 0), n === this.levels.length - 1 || u.length < t)
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
384
  for (const p of u) {
385
385
  if (i >= this.displayLimit) break;
386
386
  this._isVisibleAtLevel(p, c) && (this.labelPool.add(p.data, {
@@ -395,24 +395,24 @@ class Je {
395
395
  else {
396
396
  if (i >= this.displayLimit)
397
397
  return i;
398
- const p = c == null ? u : u.filter((G) => this._isVisibleAtLevel(G, c));
398
+ const p = c == null ? u : u.filter((B) => this._isVisibleAtLevel(B, c));
399
399
  if (!p.length) return i;
400
- const I = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, P = this.groupByTheme ? `cluster-${n}-${a}-${o}-${g}` : `cluster-${n}-${a}-${o}`;
400
+ const k = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, E = this.groupByTheme ? `cluster-${r}-${n}-${o}-${d}` : `cluster-${r}-${n}-${o}`;
401
401
  this.labelPool.add(
402
402
  {
403
- id: P,
403
+ id: E,
404
404
  billboard: p[0]?.data?.billboard || [],
405
405
  count: p.length,
406
- gridKey: `${a}_${o}`,
406
+ gridKey: `${n}_${o}`,
407
407
  points: p,
408
- aggregationGroup: g
408
+ aggregationGroup: d
409
409
  },
410
410
  {
411
- id: P,
411
+ id: E,
412
412
  lon: m,
413
- lat: y,
414
- height: T,
415
- theme: I
413
+ lat: b,
414
+ height: _,
415
+ theme: k
416
416
  }
417
417
  ), i++;
418
418
  }
@@ -421,28 +421,28 @@ class Je {
421
421
  }
422
422
  _debugDrawCell(e) {
423
423
  if (!this.debugCurrentGrids) return;
424
- const { levelIdx: t, west: i, south: n, east: a, north: o, lonIdx: s, latIdx: h } = e, d = this.levels[t].level;
424
+ const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e, g = this.levels[t].level;
425
425
  this._drawDebugGrid(
426
426
  i,
427
+ r,
427
428
  n,
428
- a,
429
429
  o,
430
- `L:${d} X:${s} Y:${h}`
430
+ `L:${g} X:${s} Y:${h}`
431
431
  );
432
432
  }
433
433
  refresh() {
434
434
  this._update();
435
435
  }
436
- _drawDebugGrid(e, t, i, n, a) {
437
- const o = this.Cesium.Rectangle.fromDegrees(e, t, i, n), s = this.Cesium.Cartesian3.fromDegreesArray([
436
+ _drawDebugGrid(e, t, i, r, n) {
437
+ const o = this.Cesium.Rectangle.fromDegrees(e, t, i, r), s = this.Cesium.Cartesian3.fromDegreesArray([
438
438
  e,
439
439
  t,
440
440
  i,
441
441
  t,
442
442
  i,
443
- n,
443
+ r,
444
444
  e,
445
- n,
445
+ r,
446
446
  e,
447
447
  t
448
448
  ]), h = this.viewer.entities.add({
@@ -463,7 +463,7 @@ class Je {
463
463
  clampToGround: !0
464
464
  },
465
465
  label: {
466
- text: a,
466
+ text: n,
467
467
  font: "14px sans-serif",
468
468
  fillColor: this.Cesium.Color.BLACK,
469
469
  outlineColor: this.Cesium.Color.WHITE,
@@ -504,274 +504,274 @@ class Je {
504
504
  t && this._tileLoadListener && (t.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids(), this._removeDebugImageryLayer();
505
505
  }
506
506
  }
507
- var Qe = "[object Symbol]";
508
- function V(r) {
509
- return typeof r == "symbol" || K(r) && ne(r) == Qe;
507
+ var ht = "[object Symbol]";
508
+ function Z(a) {
509
+ return typeof a == "symbol" || q(a) && ce(a) == ht;
510
510
  }
511
- function ge(r, e) {
512
- for (var t = -1, i = r == null ? 0 : r.length, n = Array(i); ++t < i; )
513
- n[t] = e(r[t], t, r);
514
- return n;
511
+ function ye(a, e) {
512
+ for (var t = -1, i = a == null ? 0 : a.length, r = Array(i); ++t < i; )
513
+ r[t] = e(a[t], t, a);
514
+ return r;
515
515
  }
516
- var te = D ? D.prototype : void 0, ie = te ? te.toString : void 0;
517
- function ue(r) {
518
- if (typeof r == "string")
519
- return r;
520
- if (L(r))
521
- return ge(r, ue) + "";
522
- if (V(r))
523
- return ie ? ie.call(r) : "";
524
- var e = r + "";
525
- return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
516
+ var oe = R ? R.prototype : void 0, se = oe ? oe.toString : void 0;
517
+ function ve(a) {
518
+ if (typeof a == "string")
519
+ return a;
520
+ if (P(a))
521
+ return ye(a, ve) + "";
522
+ if (Z(a))
523
+ return se ? se.call(a) : "";
524
+ var e = a + "";
525
+ return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
526
526
  }
527
- function fe(r) {
528
- return r;
527
+ function be(a) {
528
+ return a;
529
529
  }
530
- function et(r, e, t) {
530
+ function ct(a, e, t) {
531
531
  switch (t.length) {
532
532
  case 0:
533
- return r.call(e);
533
+ return a.call(e);
534
534
  case 1:
535
- return r.call(e, t[0]);
535
+ return a.call(e, t[0]);
536
536
  case 2:
537
- return r.call(e, t[0], t[1]);
537
+ return a.call(e, t[0], t[1]);
538
538
  case 3:
539
- return r.call(e, t[0], t[1], t[2]);
539
+ return a.call(e, t[0], t[1], t[2]);
540
540
  }
541
- return r.apply(e, t);
541
+ return a.apply(e, t);
542
542
  }
543
- var tt = 800, it = 16, rt = Date.now;
544
- function at(r) {
543
+ var gt = 800, dt = 16, ut = Date.now;
544
+ function ft(a) {
545
545
  var e = 0, t = 0;
546
546
  return function() {
547
- var i = rt(), n = it - (i - t);
548
- if (t = i, n > 0) {
549
- if (++e >= tt)
547
+ var i = ut(), r = dt - (i - t);
548
+ if (t = i, r > 0) {
549
+ if (++e >= gt)
550
550
  return arguments[0];
551
551
  } else
552
552
  e = 0;
553
- return r.apply(void 0, arguments);
553
+ return a.apply(void 0, arguments);
554
554
  };
555
555
  }
556
- function nt(r) {
556
+ function mt(a) {
557
557
  return function() {
558
- return r;
558
+ return a;
559
559
  };
560
560
  }
561
- var ot = ee ? function(r, e) {
562
- return ee(r, "toString", {
561
+ var pt = ne ? function(a, e) {
562
+ return ne(a, "toString", {
563
563
  configurable: !0,
564
564
  enumerable: !1,
565
- value: nt(e),
565
+ value: mt(e),
566
566
  writable: !0
567
567
  });
568
- } : fe, me = at(ot), re = Math.max;
569
- function pe(r, e, t) {
570
- return e = re(e === void 0 ? r.length - 1 : e, 0), function() {
571
- for (var i = arguments, n = -1, a = re(i.length - e, 0), o = Array(a); ++n < a; )
572
- o[n] = i[e + n];
573
- n = -1;
574
- for (var s = Array(e + 1); ++n < e; )
575
- s[n] = i[n];
576
- return s[e] = t(o), et(r, this, s);
568
+ } : be, Ce = ft(pt), le = Math.max;
569
+ function Me(a, e, t) {
570
+ return e = le(e === void 0 ? a.length - 1 : e, 0), function() {
571
+ for (var i = arguments, r = -1, n = le(i.length - e, 0), o = Array(n); ++r < n; )
572
+ o[r] = i[e + r];
573
+ r = -1;
574
+ for (var s = Array(e + 1); ++r < e; )
575
+ s[r] = i[r];
576
+ return s[e] = t(o), ct(a, this, s);
577
577
  };
578
578
  }
579
- function st(r, e) {
580
- return me(pe(r, e, fe), r + "");
579
+ function yt(a, e) {
580
+ return Ce(Me(a, e, be), a + "");
581
581
  }
582
- function lt(r, e, t) {
583
- if (!W(t))
582
+ function vt(a, e, t) {
583
+ if (!j(t))
584
584
  return !1;
585
585
  var i = typeof e;
586
- return (i == "number" ? oe(t) && $e(e, t.length) : i == "string" && e in t) ? se(t[e], r) : !1;
586
+ return (i == "number" ? ge(t) && Ue(e, t.length) : i == "string" && e in t) ? de(t[e], a) : !1;
587
587
  }
588
- function ht(r) {
589
- return st(function(e, t) {
590
- var i = -1, n = t.length, a = n > 1 ? t[n - 1] : void 0, o = n > 2 ? t[2] : void 0;
591
- for (a = r.length > 3 && typeof a == "function" ? (n--, a) : void 0, o && lt(t[0], t[1], o) && (a = n < 3 ? void 0 : a, n = 1), e = Object(e); ++i < n; ) {
588
+ function bt(a) {
589
+ return yt(function(e, t) {
590
+ 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; ) {
592
592
  var s = t[i];
593
- s && r(e, s, i, a);
593
+ s && a(e, s, i, n);
594
594
  }
595
595
  return e;
596
596
  });
597
597
  }
598
- var ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, dt = /^\w*$/;
599
- function gt(r, e) {
600
- if (L(r))
598
+ var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mt = /^\w*$/;
599
+ function _t(a, e) {
600
+ if (P(a))
601
601
  return !1;
602
- var t = typeof r;
603
- return t == "number" || t == "symbol" || t == "boolean" || r == null || V(r) ? !0 : dt.test(r) || !ct.test(r) || e != null && r in Object(e);
602
+ 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);
604
604
  }
605
- var ut = "Expected a function";
606
- function Y(r, e) {
607
- if (typeof r != "function" || e != null && typeof e != "function")
608
- throw new TypeError(ut);
605
+ var Lt = "Expected a function";
606
+ function J(a, e) {
607
+ if (typeof a != "function" || e != null && typeof e != "function")
608
+ throw new TypeError(Lt);
609
609
  var t = function() {
610
- var i = arguments, n = e ? e.apply(this, i) : i[0], a = t.cache;
611
- if (a.has(n))
612
- return a.get(n);
613
- var o = r.apply(this, i);
614
- return t.cache = a.set(n, o) || a, o;
610
+ var i = arguments, r = e ? e.apply(this, i) : i[0], n = t.cache;
611
+ if (n.has(r))
612
+ return n.get(r);
613
+ var o = a.apply(this, i);
614
+ return t.cache = n.set(r, o) || n, o;
615
615
  };
616
- return t.cache = new (Y.Cache || le)(), t;
616
+ return t.cache = new (J.Cache || ue)(), t;
617
617
  }
618
- Y.Cache = le;
619
- var ft = 500;
620
- function mt(r) {
621
- var e = Y(r, function(i) {
622
- return t.size === ft && t.clear(), i;
618
+ J.Cache = ue;
619
+ var Tt = 500;
620
+ function Pt(a) {
621
+ var e = J(a, function(i) {
622
+ return t.size === Tt && t.clear(), i;
623
623
  }), t = e.cache;
624
624
  return e;
625
625
  }
626
- var pt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, yt = /\\(\\)?/g, vt = mt(function(r) {
626
+ var wt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xt = /\\(\\)?/g, It = Pt(function(a) {
627
627
  var e = [];
628
- return r.charCodeAt(0) === 46 && e.push(""), r.replace(pt, function(t, i, n, a) {
629
- e.push(n ? a.replace(yt, "$1") : i || t);
628
+ return a.charCodeAt(0) === 46 && e.push(""), a.replace(wt, function(t, i, r, n) {
629
+ e.push(r ? n.replace(xt, "$1") : i || t);
630
630
  }), e;
631
631
  });
632
- function Ct(r) {
633
- return r == null ? "" : ue(r);
632
+ function St(a) {
633
+ return a == null ? "" : ve(a);
634
634
  }
635
- function U(r, e) {
636
- return L(r) ? r : gt(r, e) ? [r] : vt(Ct(r));
635
+ function Q(a, e) {
636
+ return P(a) ? a : _t(a, e) ? [a] : It(St(a));
637
637
  }
638
- function N(r) {
639
- if (typeof r == "string" || V(r))
640
- return r;
641
- var e = r + "";
642
- return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
638
+ function X(a) {
639
+ if (typeof a == "string" || Z(a))
640
+ return a;
641
+ var e = a + "";
642
+ return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
643
643
  }
644
- function bt(r, e) {
645
- e = U(e, r);
646
- for (var t = 0, i = e.length; r != null && t < i; )
647
- r = r[N(e[t++])];
648
- return t && t == i ? r : void 0;
644
+ function Et(a, e) {
645
+ e = Q(e, a);
646
+ for (var t = 0, i = e.length; a != null && t < i; )
647
+ a = a[X(e[t++])];
648
+ return t && t == i ? a : void 0;
649
649
  }
650
- var ae = D ? D.isConcatSpreadable : void 0;
651
- function Lt(r) {
652
- return L(r) || H(r) || !!(ae && r && r[ae]);
650
+ var he = R ? R.isConcatSpreadable : void 0;
651
+ function Dt(a) {
652
+ return P(a) || K(a) || !!(he && a && a[he]);
653
653
  }
654
- function _t(r, e, t, i, n) {
655
- var a = -1, o = r.length;
656
- for (t || (t = Lt), n || (n = []); ++a < o; ) {
657
- var s = r[a];
658
- t(s) ? He(n, s) : n[n.length] = s;
654
+ function At(a, e, t, i, r) {
655
+ var n = -1, o = a.length;
656
+ for (t || (t = Dt), r || (r = []); ++n < o; ) {
657
+ var s = a[n];
658
+ t(s) ? qe(r, s) : r[r.length] = s;
659
659
  }
660
- return n;
660
+ return r;
661
661
  }
662
- function Mt(r) {
663
- var e = r == null ? 0 : r.length;
664
- return e ? _t(r) : [];
662
+ function Ot(a) {
663
+ var e = a == null ? 0 : a.length;
664
+ return e ? At(a) : [];
665
665
  }
666
- function Tt(r) {
667
- return me(pe(r, void 0, Mt), r + "");
666
+ function Gt(a) {
667
+ return Ce(Me(a, void 0, Ot), a + "");
668
668
  }
669
- var Pt = "[object Object]", wt = Function.prototype, xt = Object.prototype, ye = wt.toString, Ot = xt.hasOwnProperty, St = ye.call(Object);
670
- function ve(r) {
671
- if (!K(r) || ne(r) != Pt)
669
+ var Ht = "[object Object]", Rt = Function.prototype, Nt = Object.prototype, _e = Rt.toString, kt = Nt.hasOwnProperty, Bt = _e.call(Object);
670
+ function Le(a) {
671
+ if (!q(a) || ce(a) != Ht)
672
672
  return !1;
673
- var e = Ne(r);
673
+ var e = je(a);
674
674
  if (e === null)
675
675
  return !0;
676
- var t = Ot.call(e, "constructor") && e.constructor;
677
- return typeof t == "function" && t instanceof t && ye.call(t) == St;
676
+ var t = kt.call(e, "constructor") && e.constructor;
677
+ return typeof t == "function" && t instanceof t && _e.call(t) == Bt;
678
678
  }
679
- function Et(r, e, t) {
680
- var i = -1, n = r.length;
681
- e < 0 && (e = -e > n ? 0 : n + e), t = t > n ? n : t, t < 0 && (t += n), n = e > t ? 0 : t - e >>> 0, e >>>= 0;
682
- for (var a = Array(n); ++i < n; )
683
- a[i] = r[i + e];
684
- return a;
679
+ function Wt(a, e, t) {
680
+ var i = -1, r = a.length;
681
+ e < 0 && (e = -e > r ? 0 : r + e), t = t > r ? r : t, t < 0 && (t += r), r = e > t ? 0 : t - e >>> 0, e >>>= 0;
682
+ for (var n = Array(r); ++i < r; )
683
+ n[i] = a[i + e];
684
+ return n;
685
685
  }
686
- function Dt(r) {
686
+ function Ft(a) {
687
687
  return function(e, t, i) {
688
- for (var n = -1, a = Object(e), o = i(e), s = o.length; s--; ) {
689
- var h = o[++n];
690
- if (t(a[h], h, a) === !1)
688
+ for (var r = -1, n = Object(e), o = i(e), s = o.length; s--; ) {
689
+ var h = o[++r];
690
+ if (t(n[h], h, n) === !1)
691
691
  break;
692
692
  }
693
693
  return e;
694
694
  };
695
695
  }
696
- var It = Dt();
697
- function z(r, e, t) {
698
- (t !== void 0 && !se(r[e], t) || t === void 0 && !(e in r)) && ze(r, e, t);
696
+ var $t = Ft();
697
+ function Y(a, e, t) {
698
+ (t !== void 0 && !de(a[e], t) || t === void 0 && !(e in a)) && Ze(a, e, t);
699
699
  }
700
- function Gt(r) {
701
- return K(r) && oe(r);
700
+ function zt(a) {
701
+ return q(a) && ge(a);
702
702
  }
703
- function F(r, e) {
704
- if (!(e === "constructor" && typeof r[e] == "function") && e != "__proto__")
705
- return r[e];
703
+ function U(a, e) {
704
+ if (!(e === "constructor" && typeof a[e] == "function") && e != "__proto__")
705
+ return a[e];
706
706
  }
707
- function At(r) {
708
- return he(r, ce(r));
707
+ function Vt(a) {
708
+ return fe(a, me(a));
709
709
  }
710
- function kt(r, e, t, i, n, a, o) {
711
- var s = F(r, t), h = F(e, t), d = o.get(h);
712
- if (d) {
713
- z(r, t, d);
710
+ 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);
714
714
  return;
715
715
  }
716
- var l = a ? a(s, h, t + "", r, e, o) : void 0, c = l === void 0;
716
+ var l = n ? n(s, h, t + "", a, e, o) : void 0, c = l === void 0;
717
717
  if (c) {
718
- var g = L(h), f = !g && Fe(h), u = !g && !f && Ke(h);
719
- l = h, g || f || u ? L(s) ? l = s : Gt(s) ? l = We(s) : f ? (c = !1, l = Ve(h, !0)) : u ? (c = !1, l = Ye(h, !0)) : l = [] : ve(h) || H(h) ? (l = s, H(s) ? l = At(s) : (!W(s) || de(s)) && (l = Ue(h))) : c = !1;
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;
720
720
  }
721
- c && (o.set(h, l), n(l, h, i, a, o), o.delete(h)), z(r, t, l);
721
+ c && (o.set(h, l), r(l, h, i, n, o), o.delete(h)), Y(a, t, l);
722
722
  }
723
- function Ce(r, e, t, i, n) {
724
- r !== e && It(e, function(a, o) {
725
- if (n || (n = new Xe()), W(a))
726
- kt(r, e, o, t, Ce, i, n);
723
+ function Te(a, e, t, i, r) {
724
+ a !== e && $t(e, function(n, o) {
725
+ if (r || (r = new at()), j(n))
726
+ Kt(a, e, o, t, Te, i, r);
727
727
  else {
728
- var s = i ? i(F(r, o), a, o + "", r, e, n) : void 0;
729
- s === void 0 && (s = a), z(r, o, s);
728
+ var s = i ? i(U(a, o), n, o + "", a, e, r) : void 0;
729
+ s === void 0 && (s = n), Y(a, o, s);
730
730
  }
731
- }, ce);
731
+ }, me);
732
732
  }
733
- function Bt(r) {
734
- var e = r == null ? 0 : r.length;
735
- return e ? r[e - 1] : void 0;
733
+ function Xt(a) {
734
+ var e = a == null ? 0 : a.length;
735
+ return e ? a[e - 1] : void 0;
736
736
  }
737
- function Rt(r, e) {
738
- return e.length < 2 ? r : bt(r, Et(e, 0, -1));
737
+ function Yt(a, e) {
738
+ return e.length < 2 ? a : Et(a, Wt(e, 0, -1));
739
739
  }
740
- var $t = ht(function(r, e, t) {
741
- Ce(r, e, t);
742
- }), Ht = Object.prototype, Nt = Ht.hasOwnProperty;
743
- function zt(r, e) {
744
- e = U(e, r);
740
+ var Ut = bt(function(a, e, t) {
741
+ Te(a, e, t);
742
+ }), qt = Object.prototype, jt = qt.hasOwnProperty;
743
+ function Zt(a, e) {
744
+ e = Q(e, a);
745
745
  var t = -1, i = e.length;
746
746
  if (!i)
747
747
  return !0;
748
748
  for (; ++t < i; ) {
749
- var n = N(e[t]);
750
- if (n === "__proto__" && !Nt.call(r, "__proto__") || (n === "constructor" || n === "prototype") && t < i - 1)
749
+ var r = X(e[t]);
750
+ if (r === "__proto__" && !jt.call(a, "__proto__") || (r === "constructor" || r === "prototype") && t < i - 1)
751
751
  return !1;
752
752
  }
753
- var a = Rt(r, e);
754
- return a == null || delete a[N(Bt(e))];
753
+ var n = Yt(a, e);
754
+ return n == null || delete n[X(Xt(e))];
755
755
  }
756
- function Ft(r) {
757
- return ve(r) ? void 0 : r;
756
+ function Jt(a) {
757
+ return Le(a) ? void 0 : a;
758
758
  }
759
- var Kt = 1, Wt = 2, Vt = 4, Yt = Tt(function(r, e) {
759
+ var Qt = 1, ei = 2, ti = 4, ii = Gt(function(a, e) {
760
760
  var t = {};
761
- if (r == null)
761
+ if (a == null)
762
762
  return t;
763
763
  var i = !1;
764
- e = ge(e, function(a) {
765
- return a = U(a, r), i || (i = a.length > 1), a;
766
- }), he(r, qe(r), t), i && (t = je(t, Kt | Wt | Vt, Ft));
767
- for (var n = e.length; n--; )
768
- zt(t, e[n]);
764
+ e = ye(e, function(n) {
765
+ return n = Q(n, a), i || (i = n.length > 1), n;
766
+ }), fe(a, nt(a), t), i && (t = ot(t, Qt | ei | ti, Jt));
767
+ for (var r = e.length; r--; )
768
+ Zt(t, e[r]);
769
769
  return t;
770
770
  });
771
- function Ut(r, e) {
771
+ function ri(a, e) {
772
772
  const t = e.materialType || "DynamicImgMaterial" + Date.now() + Math.floor(Math.random() * 1e3);
773
- function i(a) {
774
- this._definitionChanged = new r.Event(), this._color = a.color, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = Date.now();
773
+ function i(n) {
774
+ this._definitionChanged = new a.Event(), this._color = n.color, this._colorSubscription = void 0, this.color = n.color, this.duration = n.duration, this._time = Date.now();
775
775
  }
776
776
  Object.defineProperties(i.prototype, {
777
777
  isConstant: {
@@ -784,33 +784,33 @@ function Ut(r, e) {
784
784
  return this._definitionChanged;
785
785
  }
786
786
  },
787
- color: r.createPropertyDescriptor("color")
787
+ color: a.createPropertyDescriptor("color")
788
788
  }), i.prototype.getType = function() {
789
789
  return t;
790
- }, i.prototype.getValue = function(a, o) {
791
- return r.defined(o) || (o = {}), o.color = r.Property.getValueOrClonedDefault(
790
+ }, i.prototype.getValue = function(n, o) {
791
+ return a.defined(o) || (o = {}), o.color = a.Property.getValueOrClonedDefault(
792
792
  this._color,
793
- a,
794
- r.Color.WHITE,
793
+ n,
794
+ a.Color.WHITE,
795
795
  o.color
796
796
  ), o.image = e.image, o;
797
- }, i.prototype.equals = function(a) {
798
- return this === a || a instanceof i && r.Property.equals(this._color, a._color);
797
+ }, i.prototype.equals = function(n) {
798
+ return this === n || n instanceof i && a.Property.equals(this._color, n._color);
799
799
  };
800
- const n = function(a) {
800
+ const r = function(n) {
801
801
  return `
802
802
  czm_material czm_getMaterial(czm_materialInput materialInput)
803
803
  {
804
804
  czm_material material = czm_getDefaultMaterial(materialInput);
805
805
  vec2 st = materialInput.st;
806
- float time = fract(mod(float(czm_frameNumber * 33.0) , float(${a.duration})) / float(${a.duration}));
807
- ${a.freely === "vertical" ? `vec4 colorImage = texture(image, vec2(fract(float(${a.count}) *st.t ${a.direction} time), fract(st.s)));` : `vec4 colorImage = texture(image, vec2(fract(float(${a.count}) *st.s ${a.direction} time), fract(st.t)));`}
806
+ float time = fract(mod(float(czm_frameNumber * 33.0) , float(${n.duration})) / float(${n.duration}));
807
+ ${n.freely === "vertical" ? `vec4 colorImage = texture(image, vec2(fract(float(${n.count}) *st.t ${n.direction} time), fract(st.s)));` : `vec4 colorImage = texture(image, vec2(fract(float(${n.count}) *st.s ${n.direction} time), fract(st.t)));`}
808
808
  material.diffuse = color.rgb;
809
809
  material.alpha = colorImage.a;
810
810
  return material;
811
811
  }`;
812
812
  };
813
- return r.Material._materialCache.addMaterial(t, {
813
+ return a.Material._materialCache.addMaterial(t, {
814
814
  fabric: {
815
815
  type: t,
816
816
  uniforms: {
@@ -818,7 +818,7 @@ function Ut(r, e) {
818
818
  image: e.image,
819
819
  time: 1e3
820
820
  },
821
- source: n({
821
+ source: r({
822
822
  count: e.count,
823
823
  freely: e.freely || "",
824
824
  direction: e.direction,
@@ -830,10 +830,10 @@ function Ut(r, e) {
830
830
  }
831
831
  }), new i(e);
832
832
  }
833
- function be(r, e) {
833
+ function Pe(a, e) {
834
834
  const t = e.MaterialType || "wallType" + (/* @__PURE__ */ new Date()).getTime() + parseInt(Math.random() * 1e3 + "");
835
- function i(a) {
836
- this._definitionChanged = new r.Event(), this._color = void 0, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = (/* @__PURE__ */ new Date()).getTime();
835
+ function i(n) {
836
+ this._definitionChanged = new a.Event(), this._color = void 0, this._colorSubscription = void 0, this.color = n.color, this.duration = n.duration, this._time = (/* @__PURE__ */ new Date()).getTime();
837
837
  }
838
838
  Object.defineProperties(i.prototype, {
839
839
  isConstant: {
@@ -846,23 +846,23 @@ function be(r, e) {
846
846
  return this._definitionChanged;
847
847
  }
848
848
  },
849
- color: r.createPropertyDescriptor("color")
849
+ color: a.createPropertyDescriptor("color")
850
850
  }), i.prototype.getType = function() {
851
851
  return t;
852
- }, i.prototype.getValue = function(a, o) {
853
- return r.defined(o) || (o = {}), o.image = e.image, this.duration && (o.time = ((/* @__PURE__ */ new Date()).getTime() - this._time) % this.duration / this.duration), o;
854
- }, i.prototype.equals = function(a) {
855
- return this === a || a instanceof i && r.Property.equals(this._color, a._color);
852
+ }, i.prototype.getValue = function(n, o) {
853
+ return a.defined(o) || (o = {}), o.image = e.image, this.duration && (o.time = ((/* @__PURE__ */ new Date()).getTime() - this._time) % this.duration / this.duration), o;
854
+ }, i.prototype.equals = function(n) {
855
+ return this === n || n instanceof i && a.Property.equals(this._color, n._color);
856
856
  };
857
- const n = function(a) {
857
+ const r = function(n) {
858
858
  let o = `czm_material czm_getMaterial(czm_materialInput materialInput)
859
859
  {
860
860
  czm_material material = czm_getDefaultMaterial(materialInput);
861
861
  vec2 st = materialInput.st;
862
862
 
863
863
  `;
864
- return a.freely == "vertical" ? o += "vec4 colorImage = texture(image, vec2(fract(float(" + a.count + ")*st.t " + a.direction + ` time), fract(st.s)));
865
- ` : o += "vec4 colorImage = texture(image, vec2(fract(float(" + a.count + ")*st.s " + a.direction + ` time), fract(st.t)));
864
+ return n.freely == "vertical" ? o += "vec4 colorImage = texture(image, vec2(fract(float(" + n.count + ")*st.t " + n.direction + ` time), fract(st.s)));
865
+ ` : o += "vec4 colorImage = texture(image, vec2(fract(float(" + n.count + ")*st.s " + n.direction + ` time), fract(st.t)));
866
866
  `, o += `vec4 fragColor;
867
867
  fragColor.rgb = (color.rgb) / 1.0;
868
868
  fragColor = czm_gammaCorrect(fragColor);
@@ -874,15 +874,15 @@ function be(r, e) {
874
874
  }
875
875
  `, o;
876
876
  };
877
- return r.Material._materialCache.addMaterial(t, {
877
+ return a.Material._materialCache.addMaterial(t, {
878
878
  fabric: {
879
879
  type: t,
880
880
  uniforms: {
881
- color: e.color || new r.Color(1, 1, 1, 1),
881
+ color: e.color || new a.Color(1, 1, 1, 1),
882
882
  image: e.image,
883
883
  time: 0
884
884
  },
885
- source: n({
885
+ source: r({
886
886
  count: e.count,
887
887
  freely: e.freely,
888
888
  direction: e.direction
@@ -893,11 +893,11 @@ function be(r, e) {
893
893
  }
894
894
  }), new i(e);
895
895
  }
896
- function Xt(r, e) {
897
- const t = r.Color, i = Object.defineProperties, n = r.Event, a = r.createPropertyDescriptor, o = r.Property, s = (c, g) => c === void 0 ? g : c, h = {};
898
- let d = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
896
+ 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);
899
899
  function l(c) {
900
- c = s(c, h), this._definitionChanged = new n(), 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);
900
+ 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
901
  }
902
902
  return i(l.prototype, {
903
903
  isConstant: {
@@ -911,22 +911,22 @@ function Xt(r, e) {
911
911
  }
912
912
  }
913
913
  }), l.prototype.getType = function(c) {
914
- return d;
915
- }, l.prototype.getValue = function(c, g) {
916
- return g || (g = {}), g.color = o.getValueOrClonedDefault(
914
+ return g;
915
+ }, l.prototype.getValue = function(c, d) {
916
+ return d || (d = {}), d.color = o.getValueOrClonedDefault(
917
917
  this._color,
918
918
  c,
919
- r.Color.WHITE,
920
- g.color
921
- ), g.duration = this._duration, g;
919
+ a.Color.WHITE,
920
+ d.color
921
+ ), d.duration = this._duration, d;
922
922
  }, l.prototype.equals = function(c) {
923
923
  return this === c || c instanceof l && o.equals(this._color, c._color);
924
924
  }, i(l.prototype, {
925
- color: a("color"),
926
- duration: a("duration")
927
- }), r.PolylineFlowMaterialProperty = l, r.Material._materialCache.addMaterial(d, {
925
+ color: n("color"),
926
+ duration: n("duration")
927
+ }), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(g, {
928
928
  fabric: {
929
- type: d,
929
+ type: g,
930
930
  uniforms: {
931
931
  color: new t(1, 1, 1, 1),
932
932
  duration: 45
@@ -956,7 +956,7 @@ function Xt(r, e) {
956
956
  }
957
957
  }), new l(e);
958
958
  }
959
- class Le {
959
+ class we {
960
960
  categoryMap = /* @__PURE__ */ new Map();
961
961
  CategoryGet = {};
962
962
  constructor() {
@@ -969,15 +969,15 @@ class Le {
969
969
  * 注册材质
970
970
  */
971
971
  register(e) {
972
- const { themeKey: t, material: i, force: n = !1, category: a = "default" } = e;
973
- this.categoryMap.has(a) || this.categoryMap.set(a, /* @__PURE__ */ new Map());
974
- const o = this.categoryMap.get(a);
972
+ const { themeKey: t, material: i, force: r = !1, category: n = "default" } = e;
973
+ this.categoryMap.has(n) || this.categoryMap.set(n, /* @__PURE__ */ new Map());
974
+ const o = this.categoryMap.get(n);
975
975
  if (o.has(t))
976
- if (n)
977
- console.info(`[MaterialManager] themeKey '${t}' 在分类 '${a}' 已被覆盖`);
976
+ if (r)
977
+ console.info(`[MaterialManager] themeKey '${t}' 在分类 '${n}' 已被覆盖`);
978
978
  else {
979
979
  console.warn(
980
- `[MaterialManager] 已存在 themeKey '${t}' 在分类 '${a}',如需覆盖请设置 force = true`
980
+ `[MaterialManager] 已存在 themeKey '${t}' 在分类 '${n}',如需覆盖请设置 force = true`
981
981
  );
982
982
  return;
983
983
  }
@@ -991,11 +991,14 @@ class Le {
991
991
  category: t,
992
992
  options: i
993
993
  }) {
994
- return t = t || "default", this.CategoryGet[t] ? this.CategoryGet[t]({
995
- themeKey: e,
996
- materialMap: this.categoryMap,
997
- options: i || {}
998
- }) : this.categoryMap.get(t)?.get(e);
994
+ if (t = t || "default", this.CategoryGet[t])
995
+ return this.CategoryGet[t]({
996
+ themeKey: e,
997
+ materialMap: this.categoryMap,
998
+ options: i || {}
999
+ });
1000
+ const r = this.categoryMap.get(t)?.get(e);
1001
+ return typeof r == "function" && r.__materialFactory === !0 ? r(i || {}) : r;
999
1002
  }
1000
1003
  /**
1001
1004
  * 是否存在
@@ -1009,8 +1012,8 @@ class Le {
1009
1012
  remove(e, t = "default") {
1010
1013
  const i = this.categoryMap.get(t);
1011
1014
  if (!i) return;
1012
- const n = i.get(e);
1013
- n?.destroy && n.destroy(), i.delete(e), i.size === 0 && this.categoryMap.delete(t);
1015
+ const r = i.get(e);
1016
+ r?.destroy && r.destroy(), i.delete(e), i.size === 0 && this.categoryMap.delete(t);
1014
1017
  }
1015
1018
  /**
1016
1019
  * 获取某分类下的所有 keys
@@ -1045,7 +1048,7 @@ class Le {
1045
1048
  return [...this.categoryMap.keys()];
1046
1049
  }
1047
1050
  }
1048
- class qt {
1051
+ class ni {
1049
1052
  id;
1050
1053
  entities = [];
1051
1054
  primitives = [];
@@ -1053,8 +1056,8 @@ class qt {
1053
1056
  aggregator;
1054
1057
  cardPool;
1055
1058
  constructor(e) {
1056
- const { id: t, entities: i = [], primitives: n = [], dataItem: a = {}, aggregator: o, cardPool: s } = e;
1057
- this.id = t, this.entities = i, this.primitives = n, this.dataItem = a, this.aggregator = o, this.cardPool = s;
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;
1058
1061
  }
1059
1062
  // 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
1060
1063
  setVisible(e) {
@@ -1062,7 +1065,7 @@ class qt {
1062
1065
  t && (t.show = e);
1063
1066
  }), this.primitives.forEach((t) => {
1064
1067
  t && (t.show = e);
1065
- }), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, n) => ({
1068
+ }), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, r) => ({
1066
1069
  id: this.dataItem.id,
1067
1070
  data: {
1068
1071
  ...this.dataItem,
@@ -1081,7 +1084,7 @@ class qt {
1081
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;
1082
1085
  }
1083
1086
  }
1084
- class jt {
1087
+ class oi {
1085
1088
  id;
1086
1089
  groupMap = /* @__PURE__ */ new Map();
1087
1090
  Cesium;
@@ -1089,10 +1092,10 @@ class jt {
1089
1092
  materialManager;
1090
1093
  aggregator;
1091
1094
  cardPool;
1092
- constructor(e, t, i, n, a, o) {
1093
- this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = n, this.aggregator = a, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(S.Click, {
1095
+ constructor(e, t, i, r, n, o) {
1096
+ 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, {
1094
1097
  name: "BufferedHierarchicalAggregator_maker_click",
1095
- fn: (h, d) => {
1098
+ fn: (h, g) => {
1096
1099
  this.cardPool.showByIds([h.data.id]);
1097
1100
  }
1098
1101
  }), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
@@ -1106,14 +1109,14 @@ class jt {
1106
1109
  themeKey: e.theme,
1107
1110
  category: "polyline",
1108
1111
  options: e
1109
- }), n = Array.isArray(e.positions[0]) ? e.positions.flat() : e.positions;
1110
- let a = {
1112
+ }), r = Array.isArray(e.positions[0]) ? e.positions.flat() : e.positions;
1113
+ let n = {
1111
1114
  ...e
1112
1115
  };
1113
- return i && (a.material = i), this.viewer.entities.add({
1116
+ return i && (n.material = i), this.viewer.entities.add({
1114
1117
  polyline: {
1115
- ...a,
1116
- positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(n)
1118
+ ...n,
1119
+ positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(r)
1117
1120
  },
1118
1121
  show: (e.show ?? !0) && t
1119
1122
  });
@@ -1124,18 +1127,21 @@ class jt {
1124
1127
  themeKey: e.theme,
1125
1128
  category: "wall",
1126
1129
  options: e
1127
- }), n = e.positions.length === e.minimumHeights?.length ? e.minimumHeights.map((h) => h - Number(e.minHeight || 0)) : e.positions.map((h) => (h[2] || 0) - Number(e.minHeight || 0)), a = e.positions.length === e.maximumHeights?.length ? e.maximumHeights.map((h) => h + Number(e.maxHeight || 0)) : e.positions.map((h) => (h[2] || 0) + Number(e.maxHeight || 0)), o = e.positions.map(
1128
- (h) => this.Cesium.Cartesian3.fromDegrees(h[0], h[1], h[2] || 0)
1130
+ }), r = (y, p = 0) => {
1131
+ 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(
1134
+ (y) => this.Cesium.Cartesian3.fromDegrees(y[0], y[1], y[2] || 0)
1129
1135
  );
1130
- let s = {
1136
+ let _ = {
1131
1137
  ...e
1132
1138
  };
1133
- return i && (s.material = i), this.viewer.entities.add({
1139
+ return i && (_.material = i), this.viewer.entities.add({
1134
1140
  wall: {
1135
- ...s,
1136
- positions: o,
1137
- minimumHeights: n,
1138
- maximumHeights: a
1141
+ ..._,
1142
+ positions: b,
1143
+ minimumHeights: d,
1144
+ maximumHeights: m
1139
1145
  },
1140
1146
  show: (e.show ?? !0) && t
1141
1147
  });
@@ -1146,10 +1152,10 @@ class jt {
1146
1152
  themeKey: e.theme,
1147
1153
  category: "polygon",
1148
1154
  options: e
1149
- }), n = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, a = this.Cesium.Cartesian3.fromDegreesArrayHeights(n), o = e.holes?.map((d) => {
1150
- let l = Array.isArray(d[0]) ? e.hierarchy.flat() : e.hole;
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;
1151
1157
  return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
1152
- }) || [], s = new this.Cesium.PolygonHierarchy(a, o);
1158
+ }) || [], s = new this.Cesium.PolygonHierarchy(n, o);
1153
1159
  let h = {
1154
1160
  ...e
1155
1161
  };
@@ -1164,12 +1170,12 @@ class jt {
1164
1170
  }
1165
1171
  createBillboardPoints(e) {
1166
1172
  return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
1167
- const [i, n, a = 0] = t.position || [0, 0, 0];
1173
+ const [i, r, n = 0] = t.position || [0, 0, 0];
1168
1174
  return {
1169
1175
  id: e.id,
1170
1176
  lon: i,
1171
- lat: n,
1172
- height: a,
1177
+ lat: r,
1178
+ height: n,
1173
1179
  name: t.options?.text || "",
1174
1180
  data: e,
1175
1181
  style: { zIndex: e.zIndex || "1" }
@@ -1192,22 +1198,22 @@ class jt {
1192
1198
  addGroup(e, t = !0) {
1193
1199
  const i = e.id || `${Date.now()}`;
1194
1200
  this.removeGroup(i);
1195
- const n = [], a = e.show !== !1;
1201
+ const r = [], n = e.show !== !1;
1196
1202
  (e.polyline || []).forEach((h) => {
1197
- const d = this.createPolyline(h, a);
1198
- d && n.push(d);
1203
+ const g = this.createPolyline(h, n);
1204
+ g && r.push(g);
1199
1205
  }), (e.wall || []).forEach((h) => {
1200
- const d = this.createWall(h, a);
1201
- d && n.push(d);
1206
+ const g = this.createWall(h, n);
1207
+ g && r.push(g);
1202
1208
  }), (e.polygon || []).forEach((h) => {
1203
- const d = this.createPolygon(h, a);
1204
- d && n.push(d);
1209
+ const g = this.createPolygon(h, n);
1210
+ g && r.push(g);
1205
1211
  });
1206
1212
  const o = this.createBillboardPoints(e);
1207
1213
  o.length && t && this.aggregator.appendPoints(o, !1), this.createCard(e);
1208
- const s = new qt({
1214
+ const s = new ni({
1209
1215
  id: i,
1210
- entities: n,
1216
+ entities: r,
1211
1217
  primitives: [],
1212
1218
  dataItem: e,
1213
1219
  aggregator: this.aggregator,
@@ -1216,7 +1222,7 @@ class jt {
1216
1222
  return this.groupMap.set(i, s), o;
1217
1223
  }
1218
1224
  async addGroups(e) {
1219
- const i = e.map((n) => this.addGroup(n, !1)).flat();
1225
+ const i = e.map((r) => this.addGroup(r, !1)).flat();
1220
1226
  i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
1221
1227
  }
1222
1228
  removeGroup(e) {
@@ -1226,10 +1232,10 @@ class jt {
1226
1232
  removeGroups(e) {
1227
1233
  let t = [];
1228
1234
  for (const i of e) {
1229
- const n = this.groupMap.get(i);
1230
- if (n) {
1231
- let a = n.removeAll(this.viewer, !1);
1232
- this.groupMap.delete(i), t.push(a);
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);
1233
1239
  }
1234
1240
  }
1235
1241
  this.aggregator.removePointsById(t), this.cardPool.removeByIds(t);
@@ -1239,10 +1245,10 @@ class jt {
1239
1245
  t && (t.removeAll(this.viewer), this.groupMap.delete(e.id)), this.addGroup(e);
1240
1246
  }
1241
1247
  async updateGroups(e) {
1242
- this.aggregator.removePointsById(e.map((n) => n.id)), this.cardPool.removeByIds(e.map((n) => n.id));
1243
- const i = e.map((n) => {
1244
- const a = this.groupMap.get(n.id);
1245
- return a && (a.removeAll(this.viewer, !1), this.groupMap.delete(n.id)), this.addGroup(n, !1);
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);
1246
1252
  }).flat();
1247
1253
  i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
1248
1254
  }
@@ -1253,20 +1259,20 @@ class jt {
1253
1259
  this.groupMap.forEach((e) => e.removeAll(this.viewer)), this.groupMap.clear();
1254
1260
  }
1255
1261
  }
1256
- class Zt {
1262
+ class si {
1257
1263
  Cesium;
1258
1264
  viewer;
1259
1265
  layerMap = /* @__PURE__ */ new Map();
1260
1266
  materialManager;
1261
1267
  aggregator;
1262
1268
  cardPool;
1263
- constructor(e, t, i, n, a) {
1264
- this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator = n, this.cardPool = a;
1269
+ constructor(e, t, i, r, n) {
1270
+ this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator = r, this.cardPool = n;
1265
1271
  }
1266
1272
  addLayer(e) {
1267
1273
  this.layerMap.has(e) || this.layerMap.set(
1268
1274
  e,
1269
- new jt(
1275
+ new oi(
1270
1276
  e,
1271
1277
  this.Cesium,
1272
1278
  this.viewer,
@@ -1301,7 +1307,7 @@ class Zt {
1301
1307
  this.layerMap.get(e)?.removeGroups(t);
1302
1308
  }
1303
1309
  }
1304
- class Jt {
1310
+ class li {
1305
1311
  labelId;
1306
1312
  cardId;
1307
1313
  opt;
@@ -1309,15 +1315,15 @@ class Jt {
1309
1315
  MaterialManager;
1310
1316
  instance;
1311
1317
  constructor(e) {
1312
- this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new Le(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus);
1318
+ this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new we(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus);
1313
1319
  }
1314
1320
  //初始化标记管理
1315
1321
  initCore(e, t, i) {
1316
- let { Cesium: n, viewer: a, aggregatorOptions: o } = e;
1317
- t || (t = new $()), i || (i = new $());
1318
- const s = new Z(n, a, this.labelId, t);
1322
+ let { Cesium: r, viewer: n, aggregatorOptions: o } = e;
1323
+ t || (t = new V()), i || (i = new V());
1324
+ const s = new ie(r, n, this.labelId, t);
1319
1325
  s.setOcclusionOptions({ distanceEpsilon: 1 }), s.setOcclusionEnabled(!1);
1320
- const h = new Z(n, a, this.cardId, i, !1), d = new Je(n, a, {
1326
+ const h = new ie(r, n, this.cardId, i, !1), g = new lt(r, n, {
1321
1327
  //聚合
1322
1328
  threshold: o?.threshold || 16,
1323
1329
  displayLimit: o?.displayLimit || 300,
@@ -1331,15 +1337,15 @@ class Jt {
1331
1337
  // 普通点的默认主题
1332
1338
  ...o,
1333
1339
  labelPool: s
1334
- }), l = this.MaterialManager, c = new Zt(
1340
+ }), l = this.MaterialManager, c = new si(
1335
1341
  //实体图层管理
1342
+ r,
1336
1343
  n,
1337
- a,
1338
1344
  l,
1339
- d,
1345
+ g,
1340
1346
  h
1341
1347
  );
1342
- return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: d, eventBus: t, cardEventBus: i };
1348
+ return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: g, eventBus: t, cardEventBus: i };
1343
1349
  }
1344
1350
  //添加标记
1345
1351
  set(e) {
@@ -1353,21 +1359,21 @@ class Jt {
1353
1359
  //添加
1354
1360
  add(e) {
1355
1361
  let t = [];
1356
- L(e) ? t = e : t.push(e), t.forEach((i) => {
1362
+ P(e) ? t = e : t.push(e), t.forEach((i) => {
1357
1363
  this.entityList.set(i.id, i);
1358
1364
  }), this.instance.entityLayerManager.getLayer("Layer_default") || this.instance.entityLayerManager.addLayer("Layer_default"), this.instance.entityLayerManager.addGroupsToLayer("Layer_default", t);
1359
1365
  }
1360
1366
  //更新标记
1361
1367
  update(e, t = !0) {
1362
1368
  let i = [];
1363
- L(e) ? i = e : i.push(e);
1364
- const n = i.map((a) => {
1365
- const o = this.entityList.get(a.id);
1369
+ P(e) ? i = e : i.push(e);
1370
+ const r = i.map((n) => {
1371
+ const o = this.entityList.get(n.id);
1366
1372
  if (!o) return;
1367
- let s = $t({}, o, a);
1368
- return this.entityList.set(a.id, s), s;
1373
+ let s = Ut({}, o, n);
1374
+ return this.entityList.set(n.id, s), s;
1369
1375
  }).filter(Boolean);
1370
- t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", n);
1376
+ t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", r);
1371
1377
  }
1372
1378
  //获取标记
1373
1379
  getById(e) {
@@ -1383,7 +1389,7 @@ class Jt {
1383
1389
  //删除标记
1384
1390
  delete(e) {
1385
1391
  let t = [];
1386
- L(e) ? t = e : t.push(e), t.forEach((i) => {
1392
+ P(e) ? t = e : t.push(e), t.forEach((i) => {
1387
1393
  this.entityList.delete(i);
1388
1394
  }), this.instance.entityLayerManager.removeGroups("Layer_default", t);
1389
1395
  }
@@ -1410,167 +1416,457 @@ class Jt {
1410
1416
  return this.instance?.labelPool?.getOcclusionOptions?.() || null;
1411
1417
  }
1412
1418
  }
1413
- function Qt({
1414
- Cesium: r,
1419
+ const w = {
1420
+ wallTileWidth: 2,
1421
+ wallTileHeight: 1,
1422
+ polygonTileWidth: 2,
1423
+ polygonTileHeight: 2
1424
+ };
1425
+ function v(a, e) {
1426
+ const t = Number(a);
1427
+ return Number.isFinite(t) ? t : e;
1428
+ }
1429
+ function C(a) {
1430
+ return Number.isFinite(a) ? Math.max(1, a) : 1;
1431
+ }
1432
+ function hi(a, e) {
1433
+ return Number.isFinite(a) ? Math.min(1, Math.max(0, a)) : e;
1434
+ }
1435
+ function ci(a) {
1436
+ const e = a?.repeat;
1437
+ if (Array.isArray(e) && e.length >= 2)
1438
+ return {
1439
+ x: C(v(e[0], 1)),
1440
+ y: C(v(e[1], 1))
1441
+ };
1442
+ if (e && typeof e == "object")
1443
+ return {
1444
+ x: C(v(e.x, 1)),
1445
+ y: C(v(e.y, 1))
1446
+ };
1447
+ const t = Number(a?.repeatX), i = Number(a?.repeatY);
1448
+ return Number.isFinite(t) && Number.isFinite(i) ? {
1449
+ x: C(t),
1450
+ y: C(i)
1451
+ } : null;
1452
+ }
1453
+ function xe(a, e) {
1454
+ const t = Array.isArray(e?.positions) ? e.positions : [];
1455
+ if (t.length < 2) return 1;
1456
+ let i = 0;
1457
+ for (let r = 1; r < t.length; r++) {
1458
+ const n = t[r - 1], o = t[r];
1459
+ if (!Array.isArray(n) || !Array.isArray(o)) continue;
1460
+ const s = a.Cartesian3.fromDegrees(
1461
+ v(n[0], 0),
1462
+ v(n[1], 0),
1463
+ v(n[2], 0)
1464
+ ), h = a.Cartesian3.fromDegrees(
1465
+ v(o[0], 0),
1466
+ v(o[1], 0),
1467
+ v(o[2], 0)
1468
+ );
1469
+ i += a.Cartesian3.distance(s, h);
1470
+ }
1471
+ return i > 0 ? i : 1;
1472
+ }
1473
+ function Ie(a) {
1474
+ const e = a?.maximumHeights, t = a?.minimumHeights;
1475
+ if (Array.isArray(e) && Array.isArray(t) && e.length > 0 && e.length === t.length) {
1476
+ let n = 0, o = 0;
1477
+ for (let s = 0; s < e.length; s++) {
1478
+ const h = Number(e[s]) - Number(t[s]);
1479
+ Number.isFinite(h) && h > 0 && (n += h, o++);
1480
+ }
1481
+ if (o > 0) return n / o;
1482
+ }
1483
+ const i = Math.abs(v(a?.minHeight, 0)), r = Math.abs(v(a?.maxHeight, 0));
1484
+ return i > 0 || r > 0 ? i + r : 3;
1485
+ }
1486
+ function Se(a, e) {
1487
+ const t = e?.hierarchy;
1488
+ if (!Array.isArray(t) || t.length < 3)
1489
+ return { width: 1, height: 1 };
1490
+ const i = Array.isArray(t[0]) ? t.flat() : t;
1491
+ if (!Array.isArray(i) || i.length < 3) return { width: 1, height: 1 };
1492
+ let r = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
1493
+ 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));
1496
+ }
1497
+ if (!Number.isFinite(r) || !Number.isFinite(o))
1498
+ 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;
1500
+ return {
1501
+ width: d > 0 ? d : 1,
1502
+ height: f > 0 ? f : 1
1503
+ };
1504
+ }
1505
+ function Ee({
1506
+ Cesium: a,
1507
+ themeOptions: e,
1508
+ entityOptions: t,
1509
+ category: i
1510
+ }) {
1511
+ const r = ci(e);
1512
+ if (r) return r;
1513
+ if (e?.autoRepeat === !1)
1514
+ return { x: 1, y: 1 };
1515
+ if (i === "wall") {
1516
+ const h = xe(a, t), g = Ie(t), l = v(
1517
+ e?.tileWidth ?? e?.textureWidth,
1518
+ w.wallTileWidth
1519
+ ), c = v(
1520
+ e?.tileHeight ?? e?.textureHeight,
1521
+ w.wallTileHeight
1522
+ );
1523
+ return {
1524
+ x: C(h / Math.max(l, 0.01)),
1525
+ y: C(g / Math.max(c, 0.01))
1526
+ };
1527
+ }
1528
+ const n = Se(a, t), o = v(
1529
+ e?.tileWidth ?? e?.textureWidth,
1530
+ w.polygonTileWidth
1531
+ ), s = v(
1532
+ e?.tileHeight ?? e?.textureHeight,
1533
+ w.polygonTileHeight
1534
+ );
1535
+ return {
1536
+ x: C(n.width / Math.max(o, 0.01)),
1537
+ y: C(n.height / Math.max(s, 0.01))
1538
+ };
1539
+ }
1540
+ function De({
1541
+ Cesium: a,
1542
+ themeOptions: e,
1543
+ entityOptions: t,
1544
+ category: i,
1545
+ freely: r
1546
+ }) {
1547
+ const n = Number(e?.count);
1548
+ if (Number.isFinite(n) && n > 0) return n;
1549
+ if (e?.autoRepeat === !1)
1550
+ return 1;
1551
+ if (i === "wall") {
1552
+ const l = xe(a, t), c = Ie(t), d = v(
1553
+ e?.tileWidth ?? e?.textureWidth,
1554
+ w.wallTileWidth
1555
+ ), f = v(
1556
+ e?.tileHeight ?? e?.textureHeight,
1557
+ 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)));
1560
+ }
1561
+ const o = Se(a, t), s = v(
1562
+ e?.tileWidth ?? e?.textureWidth,
1563
+ w.polygonTileWidth
1564
+ ), h = v(
1565
+ e?.tileHeight ?? e?.textureHeight,
1566
+ 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)));
1569
+ }
1570
+ function N(a) {
1571
+ const e = a;
1572
+ return e.__materialFactory = !0, e;
1573
+ }
1574
+ function Ae(a) {
1575
+ const e = String(a?.wallVerticalMode ?? a?.verticalMode ?? "stretch");
1576
+ return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
1577
+ }
1578
+ function gi({
1579
+ Cesium: a,
1580
+ themeOptions: e,
1581
+ entityOptions: t
1582
+ }) {
1583
+ const i = Ee({
1584
+ Cesium: a,
1585
+ themeOptions: e,
1586
+ entityOptions: t,
1587
+ category: "wall"
1588
+ });
1589
+ return Ae(e) === "repeat" ? i : { x: i.x, y: 1 };
1590
+ }
1591
+ function di(a, e) {
1592
+ const t = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
1593
+ function i(r) {
1594
+ this._definitionChanged = new a.Event(), this._color = r.color, this.color = r.color;
1595
+ }
1596
+ return Object.defineProperties(i.prototype, {
1597
+ isConstant: {
1598
+ get() {
1599
+ return !1;
1600
+ }
1601
+ },
1602
+ definitionChanged: {
1603
+ get() {
1604
+ return this._definitionChanged;
1605
+ }
1606
+ },
1607
+ color: a.createPropertyDescriptor("color")
1608
+ }), i.prototype.getType = function() {
1609
+ return t;
1610
+ }, i.prototype.getValue = function(r, n) {
1611
+ return a.defined(n) || (n = {}), n.image = e.image, n.repeatX = e.repeatX, n.bottomHeightRatio = e.bottomHeightRatio, n.color = a.Property.getValueOrClonedDefault(
1612
+ this._color,
1613
+ r,
1614
+ a.Color.WHITE,
1615
+ n.color
1616
+ ), n;
1617
+ }, i.prototype.equals = function(r) {
1618
+ return this === r || r instanceof i && a.Property.equals(this._color, r._color);
1619
+ }, a.Material._materialCache.addMaterial(t, {
1620
+ fabric: {
1621
+ type: t,
1622
+ uniforms: {
1623
+ image: e.image,
1624
+ repeatX: e.repeatX,
1625
+ bottomHeightRatio: e.bottomHeightRatio,
1626
+ color: e.color || a.Color.WHITE
1627
+ },
1628
+ source: `
1629
+ czm_material czm_getMaterial(czm_materialInput materialInput)
1630
+ {
1631
+ czm_material material = czm_getDefaultMaterial(materialInput);
1632
+ vec2 st = materialInput.st;
1633
+ float ratio = max(bottomHeightRatio, 0.0001);
1634
+ if (st.t > ratio) {
1635
+ material.alpha = 0.0;
1636
+ return material;
1637
+ }
1638
+ vec2 uv = vec2(fract(st.s * repeatX), clamp(st.t / ratio, 0.0, 1.0));
1639
+ vec4 colorImage = texture(image, uv);
1640
+ material.diffuse = colorImage.rgb * color.rgb;
1641
+ material.alpha = colorImage.a * color.a;
1642
+ return material;
1643
+ }`
1644
+ },
1645
+ translucent: function() {
1646
+ return !0;
1647
+ }
1648
+ }), new i(e);
1649
+ }
1650
+ function ui({
1651
+ Cesium: a,
1415
1652
  options: e,
1416
- MaterialManager: t
1653
+ MaterialManager: t,
1654
+ force: i = !1
1417
1655
  }) {
1418
1656
  if (e.data?.theme) {
1419
1657
  if (e.data?.lineType == "1") {
1420
- let i = Xt(r, {
1421
- color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1658
+ let r = ai(a, {
1659
+ color: new a.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1422
1660
  duration: 100
1423
1661
  });
1424
1662
  t.register({
1425
1663
  themeKey: e.data?.theme,
1426
- material: i,
1664
+ material: r,
1665
+ force: i,
1427
1666
  category: "polyline"
1428
1667
  });
1429
1668
  } else if (e.data?.lineType == "2") {
1430
- let i = new r.PolylineArrowMaterialProperty(
1431
- r.Color.fromCssColorString(e?.options?.color || "red")
1669
+ let r = new a.PolylineArrowMaterialProperty(
1670
+ a.Color.fromCssColorString(e?.options?.color || "red")
1432
1671
  );
1433
1672
  t.register({
1434
1673
  themeKey: e.data?.theme,
1435
- material: i,
1674
+ material: r,
1675
+ force: i,
1436
1676
  category: "polyline"
1437
1677
  });
1438
1678
  } else if (e.data?.lineType == "3") {
1439
- let i = new r.PolylineOutlineMaterialProperty({
1440
- color: r.Color.fromCssColorString(e?.options?.color || "red"),
1679
+ let r = new a.PolylineOutlineMaterialProperty({
1680
+ color: a.Color.fromCssColorString(e?.options?.color || "red"),
1441
1681
  outlineWidth: 0
1442
1682
  });
1443
1683
  t.register({
1444
1684
  themeKey: e.data?.theme,
1445
- material: i,
1685
+ material: r,
1686
+ force: i,
1446
1687
  category: "polyline"
1447
1688
  });
1448
1689
  } else if (e.data?.lineType == "4") {
1449
- let i = new r.PolylineDashMaterialProperty({
1450
- color: r.Color.fromCssColorString(e?.options?.color || "red"),
1690
+ let r = new a.PolylineDashMaterialProperty({
1691
+ color: a.Color.fromCssColorString(e?.options?.color || "red"),
1451
1692
  dashLength: Number(e?.options?.dashLength || 30)
1452
- //短划线长度
1453
1693
  });
1454
1694
  t.register({
1455
1695
  themeKey: e.data?.theme,
1456
- material: i,
1696
+ material: r,
1697
+ force: i,
1457
1698
  category: "polyline"
1458
1699
  });
1459
1700
  } else if (e.data?.lineType == "5") {
1460
- let i = Ut(r, {
1701
+ let r = ri(a, {
1461
1702
  image: e.img,
1462
- color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1703
+ color: new a.Color.fromCssColorString(e?.options?.color || "#ffffff"),
1463
1704
  duration: 5e3,
1464
- // freely: 'vertical',
1465
1705
  direction: "-",
1466
1706
  count: 1
1467
1707
  });
1468
1708
  t.register({
1469
1709
  themeKey: e.data?.theme,
1470
- material: i,
1710
+ material: r,
1711
+ force: i,
1471
1712
  category: "polyline"
1472
1713
  });
1473
1714
  }
1474
1715
  }
1475
1716
  }
1476
- function ei({
1477
- Cesium: r,
1717
+ function fi({
1718
+ Cesium: a,
1478
1719
  options: e,
1479
- MaterialManager: t
1720
+ MaterialManager: t,
1721
+ force: i = !1
1480
1722
  }) {
1481
1723
  if (e.data?.theme) {
1482
1724
  if (e.data?.polygonType == "colorMode") {
1483
- let i = new r.Color.fromCssColorString(e?.options?.color || "#ffffff");
1725
+ let r = new a.Color.fromCssColorString(e?.options?.color || "#ffffff");
1484
1726
  t.register({
1485
1727
  themeKey: e.data?.theme,
1486
- material: i,
1728
+ material: r,
1729
+ force: i,
1487
1730
  category: "polygon"
1488
1731
  });
1489
1732
  } else if (e.data?.polygonType == "img") {
1490
- let i = new r.ImageMaterialProperty({
1491
- image: e.img
1492
- });
1733
+ const r = e?.options || {};
1493
1734
  t.register({
1494
1735
  themeKey: e.data?.theme,
1495
- material: i,
1496
- category: "polygon"
1736
+ category: "polygon",
1737
+ force: i,
1738
+ material: N((n = {}) => {
1739
+ const o = Ee({
1740
+ Cesium: a,
1741
+ themeOptions: r,
1742
+ entityOptions: n,
1743
+ category: "polygon"
1744
+ });
1745
+ return new a.ImageMaterialProperty({
1746
+ image: e.img,
1747
+ repeat: new a.Cartesian2(o.x, o.y)
1748
+ });
1749
+ })
1497
1750
  });
1498
1751
  } else if (e.data?.polygonType == "DynamicImgMaterial") {
1499
- let i = be(r, {
1500
- image: e.img,
1501
- color: new r.Color.fromCssColorString(e?.options?.color),
1502
- duration: 5e3,
1503
- freely: e.data?.freely || "vertical",
1504
- direction: "+",
1505
- count: 1
1506
- });
1752
+ const r = e?.options || {};
1507
1753
  t.register({
1508
1754
  themeKey: e.data?.theme,
1509
- material: i,
1510
- category: "polygon"
1755
+ category: "polygon",
1756
+ force: i,
1757
+ material: N((n = {}) => {
1758
+ const o = e.data?.freely || "vertical", s = De({
1759
+ Cesium: a,
1760
+ themeOptions: r,
1761
+ entityOptions: n,
1762
+ category: "polygon",
1763
+ freely: o
1764
+ });
1765
+ return Pe(a, {
1766
+ image: e.img,
1767
+ color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
1768
+ duration: v(r?.duration, 5e3),
1769
+ freely: o,
1770
+ direction: r?.direction || "+",
1771
+ count: s
1772
+ });
1773
+ })
1511
1774
  });
1512
1775
  }
1513
1776
  }
1514
1777
  }
1515
- function ti({
1516
- Cesium: r,
1778
+ function mi({
1779
+ Cesium: a,
1517
1780
  options: e,
1518
- MaterialManager: t
1781
+ MaterialManager: t,
1782
+ force: i = !1
1519
1783
  }) {
1520
1784
  if (e.data?.theme) {
1521
1785
  if (e.data?.wallType == "img") {
1522
- let i = new r.ImageMaterialProperty({
1523
- image: e.img
1524
- });
1786
+ const r = e?.options || {};
1525
1787
  t.register({
1526
1788
  themeKey: e.data?.theme,
1527
- material: i,
1528
- category: "wall"
1789
+ category: "wall",
1790
+ force: i,
1791
+ material: N((n = {}) => {
1792
+ const o = Ae(r), s = gi({
1793
+ Cesium: a,
1794
+ themeOptions: r,
1795
+ entityOptions: n
1796
+ });
1797
+ if (o === "bottom") {
1798
+ const h = hi(
1799
+ v(r?.bottomHeightRatio, 0.3),
1800
+ 0.3
1801
+ );
1802
+ return di(a, {
1803
+ image: e.img,
1804
+ repeatX: s.x,
1805
+ bottomHeightRatio: h,
1806
+ color: new a.Color.fromCssColorString(r?.color || "#ffffff")
1807
+ });
1808
+ }
1809
+ return new a.ImageMaterialProperty({
1810
+ image: e.img,
1811
+ repeat: new a.Cartesian2(s.x, s.y),
1812
+ transparent: !0
1813
+ });
1814
+ })
1529
1815
  });
1530
1816
  } else if (e.data?.wallType == "DynamicImgMaterial") {
1531
- let i = be(r, {
1532
- image: e.img,
1533
- color: new r.Color.fromCssColorString(e?.options?.color),
1534
- duration: 5e3,
1535
- freely: e.data?.freely || "vertical",
1536
- direction: "+",
1537
- count: 1
1538
- });
1817
+ const r = e?.options || {};
1539
1818
  t.register({
1540
1819
  themeKey: e.data?.theme,
1541
- material: i,
1542
- category: "wall"
1820
+ category: "wall",
1821
+ force: i,
1822
+ material: N((n = {}) => {
1823
+ const o = e.data?.freely || "vertical", s = De({
1824
+ Cesium: a,
1825
+ themeOptions: r,
1826
+ entityOptions: n,
1827
+ category: "wall",
1828
+ freely: o
1829
+ });
1830
+ return Pe(a, {
1831
+ image: e.img,
1832
+ color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
1833
+ duration: v(r?.duration, 5e3),
1834
+ freely: o,
1835
+ direction: r?.direction || "+",
1836
+ count: s
1837
+ });
1838
+ })
1543
1839
  });
1544
1840
  }
1545
1841
  }
1546
1842
  }
1547
- class ii extends Jt {
1843
+ class pi extends li {
1548
1844
  constructor(e) {
1549
1845
  const {
1550
1846
  labelId: t = "report-marker",
1551
1847
  cardId: i = "report-marker",
1552
- tagThemeConfig: n = [],
1553
- lineThemeConfig: a = [],
1848
+ tagThemeConfig: r = [],
1849
+ lineThemeConfig: n = [],
1554
1850
  cardThemeConfig: o = [],
1555
1851
  runListener: s = () => {
1556
1852
  },
1557
- MaterialManager: h = new Le(),
1558
- aggregatorOptions: d
1559
- } = e, l = [...n], c = [...a], g = [...o], f = {
1853
+ MaterialManager: h = new we(),
1854
+ aggregatorOptions: g
1855
+ } = e, l = [...r], c = [...n], d = [...o], f = {
1560
1856
  clusterTheme: "Tag1007",
1561
1857
  pointTheme: "Tag1001",
1562
1858
  centralPointMode: "firstPoint",
1563
1859
  debugCurrentGrids: !1,
1564
- ...d || {}
1860
+ ...g || {}
1565
1861
  }, u = {
1566
1862
  ...e,
1567
1863
  labelId: t,
1568
1864
  cardId: i,
1569
1865
  MaterialManager: h,
1570
1866
  aggregatorOptions: f,
1571
- eventBus: new $()
1867
+ eventBus: new V()
1572
1868
  };
1573
- 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();
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();
1574
1870
  }
1575
1871
  initDefaultTagTheme() {
1576
1872
  this.setTagTheme({
@@ -1668,40 +1964,44 @@ class ii extends Jt {
1668
1964
  })
1669
1965
  }
1670
1966
  };
1671
- Object.entries(t).forEach(([i, n]) => {
1967
+ Object.entries(t).forEach(([i, r]) => {
1672
1968
  this.MaterialManager.has(i, "polyline") || this.MaterialManager.register({
1673
1969
  themeKey: i,
1674
- material: n.material,
1970
+ material: r.material,
1675
1971
  category: "polyline"
1676
1972
  });
1677
1973
  });
1678
1974
  }
1679
1975
  // Initialize dynamic themes from data
1680
- initThemes(e) {
1976
+ initThemes(e, t = !1) {
1681
1977
  if (!e) return;
1682
1978
  e.tag && this.loadTabThemeConfig(e.tag), e.card && this.loadCardThemeConfig(e.card);
1683
- const t = this.opt.Cesium, i = this.instance.materialManager || this.opt.MaterialManager;
1979
+ const i = this.opt.Cesium, r = this.instance.materialManager || this.opt.MaterialManager;
1684
1980
  if (e.line?.length > 0)
1685
1981
  for (let n of e.line)
1686
- Qt({
1982
+ ui({
1687
1983
  options: n,
1688
- Cesium: t,
1689
- MaterialManager: i
1984
+ Cesium: i,
1985
+ MaterialManager: r,
1986
+ force: t
1690
1987
  });
1691
1988
  if (e.polygon?.length > 0)
1692
1989
  for (let n of e.polygon)
1693
- ei({
1990
+ fi({
1694
1991
  options: n,
1695
- Cesium: t,
1696
- MaterialManager: i
1992
+ Cesium: i,
1993
+ MaterialManager: r,
1994
+ force: t
1697
1995
  });
1698
1996
  if (e.wall?.length > 0)
1699
1997
  for (let n of e.wall)
1700
- ti({
1998
+ mi({
1701
1999
  options: n,
1702
- Cesium: t,
1703
- MaterialManager: i
2000
+ Cesium: i,
2001
+ MaterialManager: r,
2002
+ force: t
1704
2003
  });
2004
+ t && this.entityList.size > 0 && this.set(Array.from(this.entityList.values()));
1705
2005
  }
1706
2006
  extractOnEvents(e) {
1707
2007
  const t = {};
@@ -1716,11 +2016,12 @@ class ii extends Jt {
1716
2016
  });
1717
2017
  }
1718
2018
  //注册默认的线配置
1719
- loadLineThemeConfig(e) {
1720
- e.forEach((t) => {
1721
- this.MaterialManager.has(t.data.theme, "polyline") || t.material && this.MaterialManager.register({
1722
- themeKey: t.data.theme,
1723
- material: t.material,
2019
+ loadLineThemeConfig(e, t = !1) {
2020
+ e.forEach((i) => {
2021
+ !t && this.MaterialManager.has(i.data.theme, "polyline") || i.material && this.MaterialManager.register({
2022
+ themeKey: i.data.theme,
2023
+ material: i.material,
2024
+ force: t,
1724
2025
  category: "polyline"
1725
2026
  });
1726
2027
  });
@@ -1729,9 +2030,9 @@ class ii extends Jt {
1729
2030
  let t = this.instance.cardPool;
1730
2031
  e.forEach((i) => {
1731
2032
  t.registerTheme(i.data.theme, {
1732
- createElement(n, a) {
1733
- let o = a.data.data, s;
1734
- return i.comType == 1 ? s = _(M(J), {
2033
+ createElement(r, n) {
2034
+ let o = n.data.data, s;
2035
+ return i.comType == 1 ? s = x(I(re), {
1735
2036
  data: o || {},
1736
2037
  imgSrc: i.data.img,
1737
2038
  styleConfig: {
@@ -1752,7 +2053,7 @@ class ii extends Jt {
1752
2053
  top: "0px"
1753
2054
  },
1754
2055
  bgClass: [i.data.theme]
1755
- }) : i.comType == 3 && (s = _(M(J), {
2056
+ }) : i.comType == 3 && (s = x(I(re), {
1756
2057
  data: o || {},
1757
2058
  imgSrc: i.data.img,
1758
2059
  styleConfig: {
@@ -1775,7 +2076,7 @@ class ii extends Jt {
1775
2076
  bgClass: [i.data.theme]
1776
2077
  // titleConfig: themeOptions.options.titleConfig,
1777
2078
  // pageInfoConfig: themeOptions.options.pageInfoConfig,
1778
- })), O(s, n), () => O(null, n);
2079
+ })), O(s, r), () => O(null, r);
1779
2080
  },
1780
2081
  options: {
1781
2082
  offset: i.data.pixelOffset,
@@ -1788,20 +2089,20 @@ class ii extends Jt {
1788
2089
  setTagTheme(e) {
1789
2090
  let { labelPool: t } = this.instance;
1790
2091
  t.registerTheme(e.data.theme, {
1791
- createElement(i, n) {
1792
- let a = n.data?.billboard?.[0];
1793
- const o = Yt(a, ["position", "options"]);
2092
+ createElement(i, r) {
2093
+ let n = r.data?.billboard?.[0];
2094
+ const o = ii(n, ["position", "options"]);
1794
2095
  let s, h = {
1795
2096
  ...o,
1796
- text: a?.options?.text,
2097
+ text: n?.options?.text,
1797
2098
  isFullLink: e?.isFullLink ?? !1,
1798
2099
  img: e?.data?.options?.img,
1799
2100
  textStyle: e?.data?.options?.textStyle,
1800
2101
  imgStyle: e?.data?.options?.imgStyle
1801
2102
  };
1802
- if (n.data?.gridKey)
1803
- s = _(M(Q), {
1804
- text: n.data?.count,
2103
+ if (r.data?.gridKey)
2104
+ s = x(I(ae), {
2105
+ text: r.data?.count,
1805
2106
  isFullLink: e.isFullLink ?? !1,
1806
2107
  img: e?.data.options.img,
1807
2108
  imgStyle: e?.data.options?.imgStyle,
@@ -1822,28 +2123,28 @@ class ii extends Jt {
1822
2123
  }
1823
2124
  });
1824
2125
  else if (e.comType == 4)
1825
- s = _(M(Be), h);
2126
+ s = x(I(Xe), h);
1826
2127
  else if (e.comType == 5 || e.comType == 8) {
1827
- const d = a?.options || {}, l = e?.data?.options || {}, c = a?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, g = d.otherOffset ?? l.otherOffset ?? { x: 0, y: -0 }, f = d.isCanDraggable ?? l.isCanDraggable ?? e?.isCanDraggable ?? !1, u = e.comType == 8 ? Ae : ke;
1828
- s = _(M(u), {
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), {
1829
2130
  ...h,
1830
2131
  pixelOffset: c,
1831
- textStyle: d.textStyle || l.textStyle,
1832
- lineStyle: d.lineStyle || l.lineStyle,
1833
- otherOffset: g,
2132
+ textStyle: g.textStyle || l.textStyle,
2133
+ lineStyle: g.lineStyle || l.lineStyle,
2134
+ otherOffset: d,
1834
2135
  isCanDraggable: f,
1835
- onCanDraggable: d.onCanDraggable || e?.onCanDraggable,
2136
+ onCanDraggable: g.onCanDraggable || e?.onCanDraggable,
1836
2137
  onSetOtherOffset: (m) => {
1837
- n.data?.billboard?.[0]?.options && (n.data.billboard[0].options.otherOffset = m), d.onSetOtherOffset?.(m), e?.onSetOtherOffset?.(n.data, m);
2138
+ r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.otherOffset = m), g.onSetOtherOffset?.(m), e?.onSetOtherOffset?.(r.data, m);
1838
2139
  },
1839
2140
  onSetLineStake: (m) => {
1840
- n.data?.billboard?.[0]?.options && (n.data.billboard[0].options.lineStake = m), d.onSetLineStake?.(m), e?.onSetLineStake?.(n.data, m);
2141
+ r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.lineStake = m), g.onSetLineStake?.(m), e?.onSetLineStake?.(r.data, m);
1841
2142
  }
1842
2143
  });
1843
- } else e.comType == 6 || e.comType == 7 ? s = _(M(Re), {
2144
+ } else e.comType == 6 || e.comType == 7 ? s = x(I(Ye), {
1844
2145
  text: h.text,
1845
2146
  textStyle: h.textStyle
1846
- }) : s = _(M(Q), h);
2147
+ }) : s = x(I(ae), h);
1847
2148
  return O(s, i), () => O(null, i);
1848
2149
  },
1849
2150
  options: {
@@ -1853,65 +2154,65 @@ class ii extends Jt {
1853
2154
  }
1854
2155
  //标记监听事件
1855
2156
  initTagListener(e, t) {
1856
- let { viewer: i, tagListeningOptions: n } = t;
1857
- e.addListener(S.Click, {
2157
+ let { viewer: i, tagListeningOptions: r } = t;
2158
+ e.addListener(G.Click, {
1858
2159
  name: "marker:click",
1859
- fn: (a) => {
1860
- t.runListener?.(E.标记左键点击, a.data), de(a.data?.onClick) && a.data?.onClick(a.data), a.data?.cameraPoint && a.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
2160
+ 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({
1861
2162
  duration: 1,
1862
- ...a.data?.cameraPoint
2163
+ ...n.data?.cameraPoint
1863
2164
  });
1864
2165
  }
1865
- }), e.addListener(S.MouseEnter, {
2166
+ }), e.addListener(G.MouseEnter, {
1866
2167
  name: "marker:mouseenter",
1867
- fn: (a) => {
2168
+ fn: (n) => {
1868
2169
  let o = this.opt.Cesium, s = { x: 0, y: 0 };
1869
2170
  try {
1870
- if (a.data?.billboard?.[0]?.position?.length > 2) {
1871
- let h = a.data?.billboard[0]?.position, d = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(d);
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);
1872
2173
  s.x = l.x, s.y = l.y;
1873
2174
  }
1874
2175
  } catch (h) {
1875
2176
  console.log(h);
1876
2177
  }
1877
- t.runListener?.(E.标记移入, a.data, s);
2178
+ t.runListener?.(H.标记移入, n.data, s);
1878
2179
  }
1879
- }), e.addListener(S.MouseLeave, {
2180
+ }), e.addListener(G.MouseLeave, {
1880
2181
  name: "marker:mouseleave",
1881
- fn: (a) => {
2182
+ fn: (n) => {
1882
2183
  let o = this.opt.Cesium, s = { x: 0, y: 0 };
1883
2184
  try {
1884
- if (a.data?.billboard?.[0]?.position?.length > 2) {
1885
- let h = a.data?.billboard[0]?.position, d = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(d);
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);
1886
2187
  s.x = l.x, s.y = l.y;
1887
2188
  }
1888
2189
  } catch (h) {
1889
2190
  console.log(h);
1890
2191
  }
1891
- t.runListener?.(E.标记移出, a.data, s);
2192
+ t.runListener?.(H.标记移出, n.data, s);
1892
2193
  }
1893
- }), n?.forEach((a) => {
1894
- e.addListener(a.key, a.ListenerItem, a.overwrite);
2194
+ }), r?.forEach((n) => {
2195
+ e.addListener(n.key, n.ListenerItem, n.overwrite);
1895
2196
  });
1896
2197
  }
1897
2198
  // 兼容旧模式的材质注册
1898
2199
  setMaterial(e) {
1899
- const { type: t, material: i, materialKey: n, cover: a } = e, o = t ? t.toLowerCase() : "default";
2200
+ const { type: t, material: i, materialKey: r, cover: n } = e, o = t ? t.toLowerCase() : "default";
1900
2201
  this.MaterialManager.register({
1901
- themeKey: n,
2202
+ themeKey: r,
1902
2203
  // 兼容传入的是 { material: ... } 结构或者直接是材质对象
1903
2204
  material: i?.material || i,
1904
- force: a,
2205
+ force: n,
1905
2206
  category: o
1906
2207
  });
1907
2208
  }
1908
2209
  }
1909
- const ri = /* @__PURE__ */ Oe({
2210
+ const yi = /* @__PURE__ */ ke({
1910
2211
  __name: "MarkerManage",
1911
- props: Ze,
2212
+ props: st,
1912
2213
  emits: ["register", "load", "marker-event"],
1913
- setup(r, { expose: e, emit: t }) {
1914
- const i = r, n = t, a = Se("leitingMethods");
2214
+ setup(a, { expose: e, emit: t }) {
2215
+ const i = a, r = t, n = Be("leitingMethods");
1915
2216
  let o = null;
1916
2217
  const s = (l = {}) => {
1917
2218
  if (o) return o;
@@ -1920,11 +2221,11 @@ const ri = /* @__PURE__ */ Oe({
1920
2221
  ...l,
1921
2222
  Cesium: l.Cesium || i.Cesium,
1922
2223
  viewer: l.viewer || i.viewer,
1923
- runListener: (g, f, ...u) => {
1924
- n("marker-event", { key: g, data: f, args: u });
2224
+ runListener: (d, f, ...u) => {
2225
+ r("marker-event", { key: d, data: f, args: u });
1925
2226
  }
1926
2227
  };
1927
- return !c.Cesium || !c.viewer ? null : (o = new ii(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)), n("load", o), o);
2228
+ 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);
1928
2229
  }, h = {
1929
2230
  init: s,
1930
2231
  set: (l) => o?.set(l),
@@ -1943,35 +2244,35 @@ const ri = /* @__PURE__ */ Oe({
1943
2244
  setTagTheme: (l) => o?.setTagTheme(l),
1944
2245
  setMaterial: (l) => o?.setMaterial(l)
1945
2246
  };
1946
- e(h), n("register", h);
1947
- function d() {
2247
+ e(h), r("register", h);
2248
+ function g() {
1948
2249
  if (o) return o;
1949
- const l = Ge(a), c = l?.getCesium?.(), g = l?.getViewer?.();
1950
- c && g ? s({ Cesium: c, viewer: g, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
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 });
1951
2252
  }
1952
- return Ee(() => {
1953
- d();
1954
- }), j(
2253
+ return We(() => {
2254
+ g();
2255
+ }), te(
1955
2256
  () => [i.Cesium, i.viewer],
1956
2257
  ([l, c]) => {
1957
- l && c && !o && d();
2258
+ l && c && !o && g();
1958
2259
  }
1959
- ), j(
1960
- () => a?.value,
2260
+ ), te(
2261
+ () => n?.value,
1961
2262
  (l, c) => {
1962
- d();
2263
+ g();
1963
2264
  },
1964
2265
  { deep: !1 }
1965
- ), De(() => {
1966
- }), (l, c) => Ie(l.$slots, "default");
2266
+ ), Fe(() => {
2267
+ }), (l, c) => $e(l.$slots, "default");
1967
2268
  }
1968
- }), ui = xe(ri);
2269
+ }), xi = Ne(yi);
1969
2270
  export {
1970
- ui as CxMarkerManage,
1971
- ii as MarkerManage,
1972
- Jt as MarkerManagerCore,
1973
- E as ReportListenerKey,
1974
- ui as default,
1975
- Ze as markerManageProps
2271
+ xi as CxMarkerManage,
2272
+ pi as MarkerManage,
2273
+ li as MarkerManagerCore,
2274
+ H as ReportListenerKey,
2275
+ xi as default,
2276
+ st as markerManageProps
1976
2277
  };
1977
2278
  //# sourceMappingURL=marker-manage.js.map