@uavs/3d-model-map 0.1.0

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.
Files changed (89) hide show
  1. package/README.md +392 -0
  2. package/dist/index.js +2116 -0
  3. package/dist/runtime/mars3dCesiumShim.js +34 -0
  4. package/dist/style.css +1 -0
  5. package/dist/types/api/index.d.ts +49 -0
  6. package/dist/types/api/index.d.ts.map +1 -0
  7. package/dist/types/api/mapApiContext.d.ts +5 -0
  8. package/dist/types/api/mapApiContext.d.ts.map +1 -0
  9. package/dist/types/components/RealModelClarityDialog.vue.d.ts +28 -0
  10. package/dist/types/components/RealModelClarityDialog.vue.d.ts.map +1 -0
  11. package/dist/types/components/ThreeDimensionalMap.vue.d.ts +33 -0
  12. package/dist/types/components/ThreeDimensionalMap.vue.d.ts.map +1 -0
  13. package/dist/types/config/map3dConfig.d.ts +33 -0
  14. package/dist/types/config/map3dConfig.d.ts.map +1 -0
  15. package/dist/types/index.d.ts +22 -0
  16. package/dist/types/index.d.ts.map +1 -0
  17. package/dist/types/models/mapMapdataTileOrigin.d.ts +4 -0
  18. package/dist/types/models/mapMapdataTileOrigin.d.ts.map +1 -0
  19. package/dist/types/models/materialModels.d.ts +18 -0
  20. package/dist/types/models/materialModels.d.ts.map +1 -0
  21. package/dist/types/models/materialTilesetOptions.d.ts +26 -0
  22. package/dist/types/models/materialTilesetOptions.d.ts.map +1 -0
  23. package/dist/types/models/useAutoRealModel.d.ts +116 -0
  24. package/dist/types/models/useAutoRealModel.d.ts.map +1 -0
  25. package/dist/types/models/useMaterialModelLabels.d.ts +13 -0
  26. package/dist/types/models/useMaterialModelLabels.d.ts.map +1 -0
  27. package/dist/types/models/useMaterialModelLayers.d.ts +27 -0
  28. package/dist/types/models/useMaterialModelLayers.d.ts.map +1 -0
  29. package/dist/types/pages/ThreeDimensionalMapPage.vue.d.ts +3 -0
  30. package/dist/types/pages/ThreeDimensionalMapPage.vue.d.ts.map +1 -0
  31. package/dist/types/runtime/cesiumRuntime.d.ts +3 -0
  32. package/dist/types/runtime/cesiumRuntime.d.ts.map +1 -0
  33. package/dist/types/runtime/hunanJiangxiMapRuntime.d.ts +13 -0
  34. package/dist/types/runtime/hunanJiangxiMapRuntime.d.ts.map +1 -0
  35. package/dist/types/runtime/mapLifecycle.d.ts +12 -0
  36. package/dist/types/runtime/mapLifecycle.d.ts.map +1 -0
  37. package/dist/types/runtime/mars3dCesiumShim.d.ts +4 -0
  38. package/dist/types/runtime/mars3dCesiumShim.d.ts.map +1 -0
  39. package/dist/types/runtime/mars3dRuntime.d.ts +6 -0
  40. package/dist/types/runtime/mars3dRuntime.d.ts.map +1 -0
  41. package/dist/types/vite/cesium.d.ts +16 -0
  42. package/dist/types/vite/cesium.d.ts.map +1 -0
  43. package/dist/vite/cesium.js +159 -0
  44. package/package.json +74 -0
  45. package/public/img/basemaps/TerrainEllipsoid.png +0 -0
  46. package/public/img/basemaps/TerrainSTK.png +0 -0
  47. package/public/img/basemaps/arcgis.png +0 -0
  48. package/public/img/basemaps/bd-c-bluish.png +0 -0
  49. package/public/img/basemaps/bd-c-dark.png +0 -0
  50. package/public/img/basemaps/bd-c-darkgreen.png +0 -0
  51. package/public/img/basemaps/bd-c-googlelite.png +0 -0
  52. package/public/img/basemaps/bd-c-grassgreen.png +0 -0
  53. package/public/img/basemaps/bd-c-grayscale.png +0 -0
  54. package/public/img/basemaps/bd-c-hardedge.png +0 -0
  55. package/public/img/basemaps/bd-c-light.png +0 -0
  56. package/public/img/basemaps/bd-c-midnight.png +0 -0
  57. package/public/img/basemaps/bd-c-pink.png +0 -0
  58. package/public/img/basemaps/bd-c-redalert.png +0 -0
  59. package/public/img/basemaps/bd-img.png +0 -0
  60. package/public/img/basemaps/bd-vec.png +0 -0
  61. package/public/img/basemaps/bingAerial.png +0 -0
  62. package/public/img/basemaps/bingAerialLabels.png +0 -0
  63. package/public/img/basemaps/bingRoads.png +0 -0
  64. package/public/img/basemaps/bingimage.png +0 -0
  65. package/public/img/basemaps/bingmap.png +0 -0
  66. package/public/img/basemaps/blackMarble.png +0 -0
  67. package/public/img/basemaps/esriNationalGeographic.png +0 -0
  68. package/public/img/basemaps/esriWorldImagery.png +0 -0
  69. package/public/img/basemaps/esriWorldStreetMap.png +0 -0
  70. package/public/img/basemaps/gaode_img.png +0 -0
  71. package/public/img/basemaps/gaode_vec.png +0 -0
  72. package/public/img/basemaps/google_img.png +0 -0
  73. package/public/img/basemaps/google_ter.png +0 -0
  74. package/public/img/basemaps/google_vec.png +0 -0
  75. package/public/img/basemaps/mapQuestOpenStreetMap.png +0 -0
  76. package/public/img/basemaps/mapboxSatellite.png +0 -0
  77. package/public/img/basemaps/mapboxStreets.png +0 -0
  78. package/public/img/basemaps/mapboxTerrain.png +0 -0
  79. package/public/img/basemaps/naturalEarthII.png +0 -0
  80. package/public/img/basemaps/offline.png +0 -0
  81. package/public/img/basemaps/osm.png +0 -0
  82. package/public/img/basemaps/sea.png +0 -0
  83. package/public/img/basemaps/stamenToner.png +0 -0
  84. package/public/img/basemaps/stamenWatercolor.png +0 -0
  85. package/public/img/basemaps/tdt_img.png +0 -0
  86. package/public/img/basemaps/tdt_ter.png +0 -0
  87. package/public/img/basemaps/tdt_vec.png +0 -0
  88. package/public/img/basemaps/tencent_img.png +0 -0
  89. package/public/img/basemaps/tencent_vec.png +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,2116 @@
1
+ import { ref as fe, defineComponent as zt, computed as A, watch as vt, openBlock as Z, createBlock as en, Teleport as Sn, createElementBlock as oe, withKeys as yn, withModifiers as tn, createElementVNode as v, toDisplayString as W, normalizeClass as Fe, Fragment as nn, renderList as rn, normalizeStyle as _n, createCommentVNode as Te, inject as En, onMounted as Tn, onUnmounted as vn, createTextVNode as Ut, createVNode as bn, createStaticVNode as Cn, nextTick as Ln } from "vue";
2
+ const an = Symbol("uavs-map-api");
3
+ function oa(a, l) {
4
+ a.provide(an, l);
5
+ }
6
+ function on() {
7
+ return globalThis.Cesium;
8
+ }
9
+ function wn(a) {
10
+ return [
11
+ a == null ? void 0 : a.default,
12
+ a,
13
+ on()
14
+ ].find((m) => !!m && typeof m == "object" && "Viewer" in m && "Cartesian3" in m);
15
+ }
16
+ async function xn() {
17
+ try {
18
+ const [a] = await Promise.all([
19
+ import("mars3d-cesium/Build/Cesium/index.js"),
20
+ import("mars3d-cesium/Build/Cesium/Widgets/widgets.css")
21
+ ]), l = wn(a);
22
+ if (!l)
23
+ throw new Error("mars3d-cesium loaded but Cesium exports are missing");
24
+ globalThis.Cesium = l;
25
+ } catch (a) {
26
+ throw new Error(
27
+ `Failed to load Cesium from dependency mars3d-cesium. Please install mars3d-cesium and make sure the bundler can import its CSS. ${a instanceof Error ? a.message : String(a)}`
28
+ );
29
+ }
30
+ }
31
+ let Vt = null;
32
+ function Rn() {
33
+ return typeof window < "u" && on() ? Promise.resolve() : (Vt || (Vt = xn()), Vt);
34
+ }
35
+ const Dn = "天地图影像", Nn = "湖南江西";
36
+ function Pn(a) {
37
+ const l = a == null ? void 0 : a.basemaps;
38
+ if (Array.isArray(l))
39
+ for (const m of l) {
40
+ const y = m == null ? void 0 : m.name;
41
+ typeof y == "string" && y.includes(Nn) && (m.show = !1), typeof y == "string" && y === Dn && (m.show = !0);
42
+ }
43
+ }
44
+ function In(a) {
45
+ return !1;
46
+ }
47
+ const An = "//data.mars3d.cn/terrain";
48
+ function On() {
49
+ return null;
50
+ }
51
+ function kn(a) {
52
+ const l = a == null ? void 0 : a.terrain;
53
+ if (!(!l || typeof l != "object")) {
54
+ l.url = An;
55
+ return;
56
+ }
57
+ }
58
+ function Bn(a) {
59
+ const l = On();
60
+ if (a != null && a.basemaps && Array.isArray(a.basemaps) && l) {
61
+ const m = "/mapdata-map/tiles/hunan/", y = "/mapdata-map/tiles/jiangxi/", B = `${l}${m}{z}/{x}/{y}.png`, z = `${l}${y}{z}/{x}/{y}.png`;
62
+ for (const I of a.basemaps) {
63
+ const P = I == null ? void 0 : I.layers;
64
+ if (Array.isArray(P))
65
+ for (const $ of P) {
66
+ const q = $ == null ? void 0 : $.url;
67
+ typeof q == "string" && (q.includes(m) ? $.url = B : q.includes(y) && ($.url = z));
68
+ }
69
+ }
70
+ }
71
+ kn(a);
72
+ }
73
+ const ln = {
74
+ lat: 28.164192,
75
+ lng: 113.638378,
76
+ alt: 3e4
77
+ }, et = {
78
+ lng: 113.11206036041597,
79
+ lat: 28.23130798811255,
80
+ alt: 3e4,
81
+ radius: 3e4,
82
+ pitch: -89,
83
+ duration: 1
84
+ }, Fn = "config/config.json";
85
+ function $n(a) {
86
+ const l = a.trim().replace(/^\/+/, ""), m = "/";
87
+ return `${m.endsWith("/") ? m : `${m}/`}${l}`;
88
+ }
89
+ const Gn = $n(Fn), tt = /* @__PURE__ */ new Map();
90
+ function Un(a) {
91
+ return typeof structuredClone == "function" ? structuredClone(a) : JSON.parse(JSON.stringify(a));
92
+ }
93
+ function la(a) {
94
+ if (a) {
95
+ tt.delete(a);
96
+ return;
97
+ }
98
+ tt.clear();
99
+ }
100
+ async function Vn(a, l) {
101
+ const m = l == null ? void 0 : l.trim();
102
+ if (!m)
103
+ throw new Error("map config url is empty");
104
+ let y = tt.get(m);
105
+ return y || (y = a.Util.fetchJson({ url: m }), y = y.catch((B) => {
106
+ throw tt.delete(m), B;
107
+ }), tt.set(m, y)), Un(await y);
108
+ }
109
+ function Hn(a) {
110
+ return {
111
+ lng: a.lng,
112
+ lat: a.lat,
113
+ alt: a.alt ?? a.radius ?? ln.alt,
114
+ heading: a.heading,
115
+ pitch: a.pitch
116
+ };
117
+ }
118
+ function Yt(a) {
119
+ a.scene = {
120
+ ...a.scene ?? {},
121
+ showSun: !1,
122
+ showMoon: !1,
123
+ showSkyBox: !1,
124
+ showSkyAtmosphere: !1
125
+ };
126
+ }
127
+ async function Wn(a) {
128
+ const l = await Vn(a.mars3d, a.configUrl);
129
+ if (!(l != null && l.map3d))
130
+ throw new Error("map config is missing map3d");
131
+ const m = l.map3d;
132
+ Bn(m), Pn(m), Yt(m), m.scene = {
133
+ ...m.scene ?? {},
134
+ center: a.center ?? ln
135
+ };
136
+ const y = {
137
+ ...m,
138
+ ...a.options ?? {}
139
+ };
140
+ return Yt(y), y;
141
+ }
142
+ function zn(a) {
143
+ return a.map((l) => {
144
+ const m = String(l.modelType) === "2";
145
+ return {
146
+ ...l,
147
+ label: String(l.modelTypeName || l.name || "模型分组"),
148
+ status: l.status || "1",
149
+ isExpand: l.isExpand ?? !1,
150
+ data: (l.data || []).map((y) => ({
151
+ ...y,
152
+ type: m ? "2" : y.type ?? l.type,
153
+ modelType: m ? "2" : y.modelType ?? l.modelType,
154
+ label: String(y.fileName || y.name || y.id),
155
+ value: l.modelType ?? y.id,
156
+ status: y.status || "1",
157
+ isExpand: !1
158
+ }))
159
+ };
160
+ });
161
+ }
162
+ function sa(a) {
163
+ return [a.type, a.modelType].some((l) => String(l) === "2");
164
+ }
165
+ function qn(a) {
166
+ const l = a == null ? void 0 : a.trim();
167
+ return l ? /^https?:\/\//i.test(l) || l.endsWith("/tileset.json") || l.endsWith("tileset.json") ? l : `/mapdata/${l.replace(/^\/+|\/+$/g, "")}/tileset.json` : "";
168
+ }
169
+ const Kn = 12, Qt = 16, jn = 0.3, Yn = 0.2;
170
+ function Wt(a, l = {}) {
171
+ const m = l.forceQualityMode || a <= 6;
172
+ return {
173
+ // 屏幕空间误差越大,越倾向加载粗层级;远距离保持较大值,能更快看到模型轮廓。
174
+ maximumScreenSpaceError: a,
175
+ // 非极致清晰模式下启用动态误差,远处瓦片会自动降低精度,减少同时加载的细节量。
176
+ dynamicScreenSpaceError: !m,
177
+ // 允许跳过中间层级,优先请求能覆盖当前视图的目标层级,推进时再逐步补细节。
178
+ skipLevelOfDetail: !0,
179
+ // 配合跳级加载优先选择叶子层级,避免中间层级长期占用显存和请求队列。
180
+ preferLeaves: !0,
181
+ // 不主动加载相邻兄弟瓦片,降低视野外数据带来的内存压力。
182
+ loadSiblings: !1,
183
+ // 视野中心优先保持清晰,边缘区域允许更粗,适合飞行和拖动中的模型浏览。
184
+ foveatedScreenSpaceError: !m,
185
+ // 不强制立即加载最终层级,先显示可用粗层级,避免瞬时请求过多导致卡顿。
186
+ immediatelyLoadDesiredLevelOfDetail: m,
187
+ // 先按较低屏幕高度加载一层粗略瓦片,让远处和初次进入时更快看到轮廓。
188
+ progressiveResolutionHeightFraction: m ? 1 : l.progressiveResolutionHeightFraction ?? jn,
189
+ // 相机移动时跳过大概率过期的瓦片请求,减少飞行和拖动过程中的网络与内存压力。
190
+ cullRequestsWhileMoving: !m,
191
+ // 移动请求剔除强度,Cesium 默认 60;先保守使用默认值,后续可按实测逐步调高。
192
+ cullRequestsWhileMovingMultiplier: 60,
193
+ // 缺少模型大小数据时先按保守预算加载,降低单个超大模型推进时打满内存的概率。
194
+ cacheBytes: (m ? 1024 : 160) * 1024 * 1024,
195
+ // 近景清晰模式放大缓存预算,减少刚移出视角再回来时高精瓦片被快速淘汰。
196
+ maximumCacheOverflowBytes: (m ? 1024 : 256) * 1024 * 1024,
197
+ // 不使用子节点包围盒裁剪父节点,避免远距离只剩零散细节而看不到整体轮廓。
198
+ cullWithChildrenBounds: !1,
199
+ // 关闭线框调试,避免调试渲染额外增加 GPU 压力。
200
+ enableDebugWireframe: !1
201
+ };
202
+ }
203
+ const Qn = 1, Xn = 0.8, Jn = 8e3, Zn = 300 * 1e3, er = 1500, Xt = 1e3, tr = 30 * 1e3, nr = -17, Oe = 6, rr = 16, Jt = 10, ar = 16, or = 28, lr = 72, sr = 12, ir = 180 * 1024 * 1024, ur = 260 * 1024 * 1024, cr = 1e3, dr = 8, fr = 220, gr = 650 * 1024 * 1024, mr = 6e3, Mr = 1, pr = 24, hr = 2, Sr = 5e3, yr = 5e3, Zt = /* @__PURE__ */ new WeakSet();
204
+ function _r(a) {
205
+ var y, B;
206
+ const l = (B = (y = a == null ? void 0 : a.graphic) == null ? void 0 : y.DivGraphic) == null ? void 0 : B.prototype;
207
+ if (!l || Zt.has(l)) return;
208
+ const m = l._container_onMouseMoveHandler;
209
+ typeof m == "function" && (l._container_onMouseMoveHandler = function(...I) {
210
+ try {
211
+ return m.apply(this, I);
212
+ } catch (P) {
213
+ if (P instanceof TypeError && P.message.includes("reading 'fire'"))
214
+ return;
215
+ throw P;
216
+ }
217
+ }, Zt.add(l));
218
+ }
219
+ function Er(a) {
220
+ const l = fe({
221
+ heightText: "-",
222
+ lngText: "-",
223
+ latText: "-",
224
+ pitchText: "-",
225
+ realText: "-",
226
+ clarityText: "-",
227
+ sseText: "-",
228
+ actualSseText: "-",
229
+ tilesLoadingText: "-",
230
+ tilesetOptionsText: "-",
231
+ pressureText: "-",
232
+ modelModeText: "-",
233
+ modelProfileText: "-"
234
+ }), m = fe(""), y = fe(null);
235
+ let B = 0, z = [];
236
+ const I = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set(), $ = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map();
237
+ let se = null, me = null, M = null, b = 0, _ = null, T = null, E = null, N = 0, g = null, U = "", f = 0, L = null, H = !1, K = "", ue = null;
238
+ function Se(e) {
239
+ return Number.isFinite(e) ? e <= 120 ? Oe : e <= 300 ? 8 : e <= 600 ? 10 : 12 : 12;
240
+ }
241
+ function Me(e) {
242
+ return Se(e);
243
+ }
244
+ function ce() {
245
+ var t, n;
246
+ const e = a.getMap();
247
+ return se ?? Me(Number(((n = (t = e == null ? void 0 : e.camera) == null ? void 0 : t.positionCartographic) == null ? void 0 : n.height) || 0));
248
+ }
249
+ function De() {
250
+ return g != null ? ee(g) : ce();
251
+ }
252
+ function nt() {
253
+ var n, r;
254
+ const e = a.getMap(), t = Number(((r = (n = e == null ? void 0 : e.camera) == null ? void 0 : n.positionCartographic) == null ? void 0 : r.height) || 0);
255
+ return g != null && ve(g, t) ? Oe : Math.max(Me(t), Oe);
256
+ }
257
+ function rt(e) {
258
+ return le.get(ne(e)) || null;
259
+ }
260
+ function Ne(e, t = Ae()) {
261
+ if (e == null) {
262
+ m.value = "", y.value = null;
263
+ return;
264
+ }
265
+ y.value = e;
266
+ const n = t.find((s) => X(s.id, e)), r = j(e);
267
+ m.value = String(
268
+ (n == null ? void 0 : n.name) || (n == null ? void 0 : n.label) || (n == null ? void 0 : n.fileName) || (r == null ? void 0 : r.name) || ""
269
+ );
270
+ }
271
+ function bt(e, t = Ae()) {
272
+ const n = t.find((i) => X(i.id, e)), r = j(e);
273
+ return `${(n == null ? void 0 : n.name) || (n == null ? void 0 : n.label) || (n == null ? void 0 : n.title) || (n == null ? void 0 : n.fileName) || (r == null ? void 0 : r.name) || "模型"}(${e ?? "-"})`;
274
+ }
275
+ function at(e) {
276
+ var t;
277
+ return ((t = rt(e)) == null ? void 0 : t.secondarySse) ?? rr;
278
+ }
279
+ function ot() {
280
+ return {
281
+ warnLoading: or,
282
+ criticalLoading: lr,
283
+ warnMemoryBytes: ir,
284
+ criticalMemoryBytes: ur
285
+ };
286
+ }
287
+ function ee(e, t = Number(((s) => (s = ((r) => (r = ((n) => (n = a.getMap()) == null ? void 0 : n.camera)()) == null ? void 0 : r.positionCartographic)()) == null ? void 0 : s.height)() || 0)) {
288
+ const i = Me(t), u = ye.get(ne(e)), d = g !== null && X(g, e), p = $.get(ne(e)) ?? 0, h = at(e);
289
+ if (d && u !== void 0)
290
+ return Math.max(u, p);
291
+ const S = ve(e, t) ? Oe : i;
292
+ return Math.max(d ? S : Math.max(i, h), p);
293
+ }
294
+ function lt(e, t, n) {
295
+ return t.size === 1 && n <= cr && g !== null && X(g, e);
296
+ }
297
+ function Ct(e) {
298
+ if (g === null) {
299
+ b = 0;
300
+ return;
301
+ }
302
+ const t = j(g);
303
+ t != null && t.show && e <= Xt && (b = Date.now() + tr);
304
+ }
305
+ function Ke() {
306
+ return g !== null && Date.now() <= b;
307
+ }
308
+ function ve(e, t) {
309
+ var n;
310
+ return t <= Xt && g !== null && X(g, e) && ((n = j(e)) != null && n.show) ? !0 : Ke() && g !== null && X(g, e);
311
+ }
312
+ function $e(e) {
313
+ return e.loadingCount >= fr || e.memoryBytes >= gr;
314
+ }
315
+ function be(e, t, n, r, s) {
316
+ const i = rt(e), u = (i == null ? void 0 : i.minSse) ?? Jt, d = (i == null ? void 0 : i.maxSse) ?? ar;
317
+ return lt(e, n, r) && !$e(t) ? s ? Math.min(d, dr) : u : s ? d : Math.max(u, Jt);
318
+ }
319
+ function Ce(e) {
320
+ return x(() => e == null ? void 0 : e.tileset) || x(() => e == null ? void 0 : e._tileset) || x(() => e == null ? void 0 : e._primitive) || x(() => e == null ? void 0 : e.primitive);
321
+ }
322
+ function j(e) {
323
+ const t = a.getMap();
324
+ return t ? t.getLayerById(e) || t.getLayerById(String(e)) || (Number.isFinite(Number(e)) ? t.getLayerById(Number(e)) : null) : null;
325
+ }
326
+ function x(e) {
327
+ try {
328
+ return e();
329
+ } catch {
330
+ return;
331
+ }
332
+ }
333
+ function st(e = !1) {
334
+ var i;
335
+ const t = a.getMap();
336
+ if (!(t != null && t.camera)) return;
337
+ const n = Date.now();
338
+ if (!e && n - B < 300) return;
339
+ B = n;
340
+ const r = t.camera.positionCartographic, s = (i = t.getCameraView) == null ? void 0 : i.call(t);
341
+ l.value = {
342
+ heightText: Number((r == null ? void 0 : r.height) || 0).toFixed(0),
343
+ lngText: Number((s == null ? void 0 : s.lng) || 0).toFixed(6),
344
+ latText: Number((s == null ? void 0 : s.lat) || 0).toFixed(6),
345
+ pitchText: Number((s == null ? void 0 : s.pitch) || 0).toFixed(1),
346
+ realText: l.value.realText,
347
+ clarityText: l.value.clarityText,
348
+ sseText: l.value.sseText,
349
+ actualSseText: l.value.actualSseText,
350
+ tilesLoadingText: l.value.tilesLoadingText,
351
+ tilesetOptionsText: l.value.tilesetOptionsText,
352
+ pressureText: l.value.pressureText,
353
+ modelModeText: l.value.modelModeText,
354
+ modelProfileText: l.value.modelProfileText
355
+ };
356
+ }
357
+ function He() {
358
+ var i, u, d, p, h;
359
+ if (!a.getMap()) return;
360
+ const t = /* @__PURE__ */ new Set([
361
+ ...I,
362
+ ...P,
363
+ ...a.getManualModelIds()
364
+ ]);
365
+ let n = "-", r = "-", s = "-";
366
+ for (const S of t) {
367
+ const C = Ce(j(S));
368
+ if (!C) continue;
369
+ n = C.maximumScreenSpaceError ?? "-";
370
+ const G = Number(((i = C._statistics) == null ? void 0 : i.numberOfPendingRequests) ?? ((u = C._requestedTiles) == null ? void 0 : u.length) ?? 0), O = Number(((d = C._statistics) == null ? void 0 : d.numberOfTilesProcessing) ?? 0), V = Number(((p = C._statistics) == null ? void 0 : p.numberOfTilesSelected) ?? ((h = C._selectedTiles) == null ? void 0 : h.length) ?? 0), w = Number.isFinite(G) ? G : 0, ge = Number.isFinite(O) ? O : 0, Y = Number.isFinite(V) ? V : 0, de = Math.max(w, ge);
371
+ r = de > 0 ? `加载中:后台处理 ${de} 项,画面显示 ${Y} 块` : Y > 0 ? `已稳定:画面显示 ${Y} 块` : "已稳定";
372
+ const J = Math.round(Number(C.cacheBytes ?? 0) / 1024 / 1024), pe = Math.round(Number(C.maximumCacheOverflowBytes ?? 0) / 1024 / 1024), Ve = Math.round(Number(C.maximumMemoryUsage ?? C._maximumMemoryUsage ?? 0));
373
+ s = [
374
+ `skip:${C.skipLevelOfDetail ? "Y" : "N"}`,
375
+ `fov:${C.foveatedScreenSpaceError ? "Y" : "N"}`,
376
+ `sib:${C.loadSiblings ? "Y" : "N"}`,
377
+ `moveCull:${C.cullRequestsWhileMoving ? "Y" : "N"}`,
378
+ `cache:${J}/${pe}MB`,
379
+ `mem:${Ve}MB`
380
+ ].join(" ");
381
+ break;
382
+ }
383
+ l.value.actualSseText = String(n), l.value.tilesLoadingText = String(r), l.value.tilesetOptionsText = s;
384
+ }
385
+ function je(e) {
386
+ var S, C, G, O, V, w, ge, Y, de, J, pe, Ve, Je, Ze, jt;
387
+ const t = Ce(e);
388
+ if (!t)
389
+ return {
390
+ loadingCount: 0,
391
+ pendingRequests: 0,
392
+ processingCount: 0,
393
+ memoryBytes: 0,
394
+ selectedTiles: 0,
395
+ visitedTiles: 0,
396
+ radius: 0,
397
+ rootGeometricError: 0,
398
+ actualSse: "-"
399
+ };
400
+ const n = Number(((S = t._statistics) == null ? void 0 : S.numberOfPendingRequests) ?? ((C = t._requestedTiles) == null ? void 0 : C.length) ?? 0), r = Number(((G = t._statistics) == null ? void 0 : G.numberOfTilesProcessing) ?? 0), s = Math.max(n, r), i = Number(
401
+ t.totalMemoryUsageInBytes ?? ((O = t._statistics) == null ? void 0 : O.texturesByteLength) ?? ((V = t._statistics) == null ? void 0 : V.geometryByteLength) ?? 0
402
+ ), u = Number(((w = t._statistics) == null ? void 0 : w.numberOfTilesSelected) ?? ((ge = t._selectedTiles) == null ? void 0 : ge.length) ?? 0), d = Number(((Y = t._statistics) == null ? void 0 : Y.numberOfTilesVisited) ?? 0), p = Number(((de = t.boundingSphere) == null ? void 0 : de.radius) ?? ((pe = (J = t._root) == null ? void 0 : J.boundingSphere) == null ? void 0 : pe.radius) ?? ((Je = (Ve = t.root) == null ? void 0 : Ve.boundingSphere) == null ? void 0 : Je.radius) ?? 0), h = Number(((Ze = t.root) == null ? void 0 : Ze.geometricError) ?? ((jt = t._root) == null ? void 0 : jt.geometricError) ?? 0);
403
+ return {
404
+ loadingCount: Number.isFinite(s) ? s : 0,
405
+ pendingRequests: Number.isFinite(n) ? n : 0,
406
+ processingCount: Number.isFinite(r) ? r : 0,
407
+ memoryBytes: Number.isFinite(i) ? i : 0,
408
+ selectedTiles: Number.isFinite(u) ? u : 0,
409
+ visitedTiles: Number.isFinite(d) ? d : 0,
410
+ radius: Number.isFinite(p) ? p : 0,
411
+ rootGeometricError: Number.isFinite(h) ? h : 0,
412
+ actualSse: t.maximumScreenSpaceError ?? "-"
413
+ };
414
+ }
415
+ function ke(e) {
416
+ const t = e.peakMemoryBytes / 1024 / 1024;
417
+ return t >= 420 || e.peakLoadingCount >= 72 ? "高风险" : t >= 260 || e.peakLoadingCount >= 40 ? "重" : t >= 120 || e.peakLoadingCount >= 20 ? "中" : "轻";
418
+ }
419
+ function Ye(e) {
420
+ const t = ke(e);
421
+ return t === "高风险" ? { minSse: 12, secondarySse: 20, maxSse: 24 } : t === "重" ? { minSse: 10, secondarySse: 18, maxSse: 22 } : t === "中" ? { minSse: 8, secondarySse: 16, maxSse: 20 } : { minSse: 6, secondarySse: 16, maxSse: 18 };
422
+ }
423
+ function Lt(e) {
424
+ if (e.samples < 3) return;
425
+ const t = Ye(e);
426
+ le.set(ne(e.id), {
427
+ level: ke(e),
428
+ minSse: t.minSse,
429
+ secondarySse: t.secondarySse,
430
+ maxSse: t.maxSse,
431
+ peakLoadingCount: e.peakLoadingCount,
432
+ peakMemoryMb: Math.round(e.peakMemoryBytes / 1024 / 1024),
433
+ radius: Math.round(e.radius),
434
+ rootGeometricError: Math.round(e.rootGeometricError)
435
+ });
436
+ }
437
+ function Qe(e) {
438
+ var h;
439
+ const t = Date.now(), n = !!((h = a.shouldProfileModels) != null && h.call(a)), r = Ae(), s = new Map(r.map((S) => [ne(S.id), S]));
440
+ e.forEach((S) => {
441
+ const C = ne(S), G = j(S);
442
+ if (!(G != null && G.show)) return;
443
+ const O = je(G), V = s.get(C), w = ie.get(C) || {
444
+ id: S,
445
+ name: (V == null ? void 0 : V.name) || (V == null ? void 0 : V.label) || (V == null ? void 0 : V.title) || "模型",
446
+ startedAt: t,
447
+ lastSeenAt: t,
448
+ samples: 0,
449
+ currentSse: ee(S),
450
+ actualSse: O.actualSse,
451
+ peakLoadingCount: 0,
452
+ peakPendingRequests: 0,
453
+ peakProcessingCount: 0,
454
+ peakMemoryBytes: 0,
455
+ peakSelectedTiles: 0,
456
+ peakVisitedTiles: 0,
457
+ radius: 0,
458
+ rootGeometricError: 0,
459
+ guardSse: null,
460
+ lastLoggedAt: 0
461
+ };
462
+ if (w.lastSeenAt = t, w.samples += 1, w.currentSse = ee(S), w.actualSse = O.actualSse, w.peakLoadingCount = Math.max(w.peakLoadingCount, O.loadingCount), w.peakPendingRequests = Math.max(w.peakPendingRequests, O.pendingRequests), w.peakProcessingCount = Math.max(w.peakProcessingCount, O.processingCount), w.peakMemoryBytes = Math.max(w.peakMemoryBytes, O.memoryBytes), w.peakSelectedTiles = Math.max(w.peakSelectedTiles, O.selectedTiles), w.peakVisitedTiles = Math.max(w.peakVisitedTiles, O.visitedTiles), w.radius = O.radius || w.radius, w.rootGeometricError = O.rootGeometricError || w.rootGeometricError, w.guardSse = $.get(C) ?? null, ie.set(C, w), Lt(w), n && w.samples >= 3 && t - w.lastLoggedAt >= yr) {
463
+ w.lastLoggedAt = t;
464
+ const ge = Ye(w);
465
+ console.table([{
466
+ id: w.id,
467
+ name: w.name,
468
+ level: ke(w),
469
+ currentSse: w.currentSse,
470
+ actualSse: w.actualSse,
471
+ peakLoading: w.peakLoadingCount,
472
+ peakPending: w.peakPendingRequests,
473
+ peakProcessing: w.peakProcessingCount,
474
+ peakMemoryMB: Math.round(w.peakMemoryBytes / 1024 / 1024),
475
+ radius: Math.round(w.radius),
476
+ rootError: Math.round(w.rootGeometricError),
477
+ minSse: ge.minSse,
478
+ secondarySse: ge.secondarySse,
479
+ maxSse: ge.maxSse
480
+ }]);
481
+ }
482
+ });
483
+ const i = new Set(Array.from(e).map((S) => ne(S)));
484
+ if (Array.from(ie.keys()).forEach((S) => {
485
+ const C = ie.get(S);
486
+ C && !i.has(S) && t - C.lastSeenAt > 15e3 && ie.delete(S);
487
+ }), !n) {
488
+ l.value.modelProfileText = "-";
489
+ return;
490
+ }
491
+ const d = Array.from(ie.values()).filter((S) => i.has(ne(S.id))).sort((S, C) => g !== null && X(S.id, g) ? -1 : g !== null && X(C.id, g) ? 1 : C.peakMemoryBytes - S.peakMemoryBytes || C.peakLoadingCount - S.peakLoadingCount)[0];
492
+ if (!d) {
493
+ l.value.modelProfileText = "-";
494
+ return;
495
+ }
496
+ const p = Ye(d);
497
+ l.value.modelProfileText = `${d.id} ${ke(d)} SSE${d.currentSse}/${d.actualSse} 峰值请求${d.peakLoadingCount} 内存${Math.round(d.peakMemoryBytes / 1024 / 1024)}MB 半径${Math.round(d.radius)}m root${Math.round(d.rootGeometricError)} 建议${p.minSse}/${p.secondarySse}/${p.maxSse}`;
498
+ }
499
+ function Ge() {
500
+ ie.clear(), l.value.modelProfileText = "-";
501
+ }
502
+ function wt() {
503
+ var u, d, p;
504
+ const e = /* @__PURE__ */ new Set([
505
+ ...I,
506
+ ...P,
507
+ ...a.getManualModelIds()
508
+ ]), t = Number(((p = (d = (u = a.getMap()) == null ? void 0 : u.camera) == null ? void 0 : d.positionCartographic) == null ? void 0 : p.height) || 0), n = Array.from(e).map((h) => String(h)).sort().join(",");
509
+ if (n !== U) {
510
+ U = n, f = Date.now(), q.clear(), Q.clear(), l.value.pressureText = $.size ? l.value.pressureText : "-", Qe(e);
511
+ return;
512
+ }
513
+ if (!$.size && Date.now() - f < Sr) {
514
+ q.clear(), Q.clear(), l.value.pressureText = "-", Qe(e);
515
+ return;
516
+ }
517
+ const r = [], s = Ae();
518
+ e.forEach((h) => {
519
+ var ge;
520
+ const S = je(j(h)), C = S.loadingCount >= sr;
521
+ let G = null;
522
+ const O = $.get(ne(h)), V = ot(), w = bt(h, s);
523
+ if (lt(h, e, t)) {
524
+ const Y = ne(h);
525
+ (ge = a.destroyModelResourcesExcept) == null || ge.call(a, [h]), $.delete(Y), q.delete(Y), Q.delete(Y), Pe(j(h), ee(h)), r.push(`${w}|保护中|SSE ${ee(h)}|内存 ${Math.round(S.memoryBytes / 1024 / 1024)}MB`);
526
+ return;
527
+ }
528
+ if (S.loadingCount >= V.criticalLoading || O !== void 0 && C && S.memoryBytes >= V.criticalMemoryBytes ? G = be(h, S, e, t, !0) : (S.loadingCount >= V.warnLoading || C && S.memoryBytes >= V.warnMemoryBytes) && (G = be(h, S, e, t, !1)), G !== null) {
529
+ const Y = ne(h);
530
+ Q.delete(Y);
531
+ const de = (q.get(Y) ?? 0) + 1;
532
+ if (q.set(Y, de), de < hr) return;
533
+ const J = Math.max(O ?? 0, G);
534
+ $.set(Y, J), Pe(j(h), ee(h)), r.push(`${w}|压力降级|保护 SSE ${J}|内存 ${Math.round(S.memoryBytes / 1024 / 1024)}MB`);
535
+ return;
536
+ }
537
+ if (q.delete(ne(h)), O !== void 0) {
538
+ const Y = ne(h), de = Q.get(Y) ?? Date.now();
539
+ Q.set(Y, de), Date.now() - de >= mr && ($.delete(Y), Q.delete(Y), Pe(j(h), ee(h)));
540
+ }
541
+ });
542
+ const i = new Set(Array.from(e).map((h) => ne(h)));
543
+ Array.from($.keys()).forEach((h) => {
544
+ i.has(h) || $.delete(h);
545
+ }), Array.from(Q.keys()).forEach((h) => {
546
+ i.has(h) || Q.delete(h);
547
+ }), l.value.pressureText = r.length ? `压力保护:${r.join(" | ")}` : "-", Qe(e);
548
+ }
549
+ function Pe(e, t) {
550
+ var h, S, C;
551
+ if (!e) return;
552
+ const n = a.getMap(), r = (e == null ? void 0 : e.id) ?? ((h = e == null ? void 0 : e.options) == null ? void 0 : h.id), s = g !== null && X(r, g) && Ke(), i = Wt(t, { forceQualityMode: s });
553
+ e.maximumScreenSpaceError = t, e.options && Object.assign(e.options, i);
554
+ const u = Object.entries(i), d = s || t <= Oe ? 1024 : 192;
555
+ e.maxMemory !== void 0 && (e.maxMemory = d), e.options && (e.options.maxMemory = d), u.forEach(([G, O]) => {
556
+ e[G] !== void 0 && (e[G] = O);
557
+ });
558
+ const p = Ce(e);
559
+ p && (p.maximumScreenSpaceError = t, p.maximumMemoryUsage !== void 0 && (p.maximumMemoryUsage = d), p._maximumMemoryUsage !== void 0 && (p._maximumMemoryUsage = d), u.forEach(([G, O]) => {
560
+ p[G] !== void 0 && (p[G] = O);
561
+ })), He(), (C = (S = n == null ? void 0 : n.scene) == null ? void 0 : S.requestRender) == null || C.call(S);
562
+ }
563
+ function Ie() {
564
+ M && (clearTimeout(M), M = null), me = null;
565
+ }
566
+ function We(e) {
567
+ if (!a.getMap()) return;
568
+ se = e, (/* @__PURE__ */ new Set([
569
+ ...I,
570
+ ...P,
571
+ ...a.getManualModelIds()
572
+ ])).forEach((r) => Pe(j(r), ee(r))), l.value.clarityText = g == null ? String(ce()) : String(ee(g)), l.value.sseText = g == null ? String(ce()) : `当前${g}:${ee(g)}`;
573
+ }
574
+ function xt() {
575
+ var n, r;
576
+ const e = (r = (n = a.getMap()) == null ? void 0 : n.getCameraView) == null ? void 0 : r.call(n), t = Number(e == null ? void 0 : e.pitch);
577
+ return Number.isFinite(t) ? t : -90;
578
+ }
579
+ function Rt() {
580
+ return xt() > nr;
581
+ }
582
+ function _e(e = Number(((r) => (r = ((n) => (n = ((t) => (t = a.getMap()) == null ? void 0 : t.camera)()) == null ? void 0 : n.positionCartographic)()) == null ? void 0 : r.height)() || 0)) {
583
+ if (!a.getMap()) return;
584
+ const i = se, u = g == null ? null : ye.get(ne(g));
585
+ if (u != null) {
586
+ Ie(), We(u);
587
+ return;
588
+ }
589
+ Ct(e);
590
+ let d = Math.max(Me(e), Oe);
591
+ if (g !== null && ve(g, e) && (d = Oe), i === null || d < i) {
592
+ Ie(), We(d);
593
+ return;
594
+ }
595
+ if (d === i) {
596
+ Ie(), l.value.clarityText = g == null ? String(i) : String(ee(g)), l.value.sseText = g == null ? String(i) : `当前${g}:${ee(g)}`;
597
+ return;
598
+ }
599
+ me === d && M || (Ie(), me = d, M = setTimeout(() => {
600
+ var C, G;
601
+ M = null;
602
+ const p = a.getMap(), h = Number(((G = (C = p == null ? void 0 : p.camera) == null ? void 0 : C.positionCartographic) == null ? void 0 : G.height) || 0);
603
+ let S = Math.max(Me(h), Oe);
604
+ g !== null && ve(g, h) && (S = Oe), me = null, se !== null && S > se && We(S);
605
+ }, er), l.value.clarityText = String(i), l.value.sseText = `${i}->${d}`);
606
+ }
607
+ function Dt(e) {
608
+ if (g == null) return !1;
609
+ const t = Math.min(pr, Math.max(Mr, Math.round(Number(e))));
610
+ if (!Number.isFinite(t)) return !1;
611
+ const n = ne(g);
612
+ return ye.set(n, t), $.delete(n), q.delete(n), Q.delete(n), Ie(), We(t), He(), Ue(), !0;
613
+ }
614
+ function Nt() {
615
+ return g == null ? !1 : (ye.delete(ne(g)), Ie(), se = null, _e(), He(), Ue(), !0);
616
+ }
617
+ function it(e = 0, t = 0) {
618
+ var C;
619
+ const n = a.getMap(), r = a.getCesium(), s = (C = n == null ? void 0 : n.camera) == null ? void 0 : C.computeViewRectangle(n.scene.globe.ellipsoid);
620
+ if (!s) return null;
621
+ const i = r.Math.toDegrees(s.west), u = r.Math.toDegrees(s.east), d = r.Math.toDegrees(s.south), p = r.Math.toDegrees(s.north), h = Math.max(Math.abs(u - i) * e, t), S = Math.max(Math.abs(p - d) * e, t);
622
+ return {
623
+ west: i - h,
624
+ east: u + h,
625
+ south: d - S,
626
+ north: p + S
627
+ };
628
+ }
629
+ function ut(e, t) {
630
+ return e.lng >= t.west && e.lng <= t.east && e.lat >= t.south && e.lat <= t.north;
631
+ }
632
+ function ct(e) {
633
+ const t = Number((e == null ? void 0 : e.longitude) ?? (e == null ? void 0 : e.lng) ?? (e == null ? void 0 : e.centerLng)), n = Number((e == null ? void 0 : e.latitude) ?? (e == null ? void 0 : e.lat) ?? (e == null ? void 0 : e.centerLat));
634
+ return !Number.isFinite(t) || !Number.isFinite(n) || t === 0 || n === 0 ? null : { lng: t, lat: n };
635
+ }
636
+ function dt(e) {
637
+ const t = a.getCesium(), n = j(e), r = x(() => {
638
+ var h;
639
+ return (h = n == null ? void 0 : n.options) == null ? void 0 : h.position;
640
+ }) || x(() => n == null ? void 0 : n.position), s = Number(x(() => r == null ? void 0 : r.lng) ?? x(() => r == null ? void 0 : r.longitude)), i = Number(x(() => r == null ? void 0 : r.lat) ?? x(() => r == null ? void 0 : r.latitude));
641
+ if (Number.isFinite(s) && Number.isFinite(i) && s !== 0 && i !== 0)
642
+ return { lng: s, lat: i };
643
+ const u = Ce(n), d = x(() => {
644
+ var h;
645
+ return (h = u == null ? void 0 : u.boundingSphere) == null ? void 0 : h.center;
646
+ }) || x(() => {
647
+ var h;
648
+ return (h = n == null ? void 0 : n.boundingSphere) == null ? void 0 : h.center;
649
+ });
650
+ if (!d) return null;
651
+ const p = x(() => t.Cartographic.fromCartesian(d));
652
+ return p ? {
653
+ lng: t.Math.toDegrees(p.longitude),
654
+ lat: t.Math.toDegrees(p.latitude)
655
+ } : null;
656
+ }
657
+ function Le(e) {
658
+ const t = ne(e == null ? void 0 : e.id), n = dt(e == null ? void 0 : e.id);
659
+ if (n)
660
+ return he.set(t, n), n;
661
+ const r = ct(e);
662
+ return r ? (he.set(t, r), r) : he.get(t) || null;
663
+ }
664
+ function ze(e) {
665
+ const t = a.getCesium(), n = j(e == null ? void 0 : e.id), r = Ce(n), s = x(() => {
666
+ var u;
667
+ return (u = r == null ? void 0 : r.boundingSphere) == null ? void 0 : u.center;
668
+ }) || x(() => {
669
+ var u;
670
+ return (u = n == null ? void 0 : n.boundingSphere) == null ? void 0 : u.center;
671
+ });
672
+ if (s) return s;
673
+ const i = Le(e);
674
+ return i ? t.Cartesian3.fromDegrees(i.lng, i.lat) : null;
675
+ }
676
+ function Xe(e) {
677
+ const t = a.getMap(), n = a.getCesium();
678
+ if (!t || !e) return null;
679
+ const r = n.SceneTransforms, s = (r == null ? void 0 : r.wgs84ToWindowCoordinates) || (r == null ? void 0 : r.worldToWindowCoordinates);
680
+ return s ? s(t.scene, e) : null;
681
+ }
682
+ function ft() {
683
+ var u;
684
+ const e = a.getMap(), t = a.getCesium(), n = (u = e == null ? void 0 : e.scene) == null ? void 0 : u.canvas;
685
+ if (!e || !t || !n) return null;
686
+ const r = new t.Cartesian2(n.clientWidth / 2, n.clientHeight / 2), s = x(() => {
687
+ var d, p;
688
+ return (p = (d = e.scene) == null ? void 0 : d.pickPosition) == null ? void 0 : p.call(d, r);
689
+ }) || x(() => {
690
+ var d, p;
691
+ return (p = (d = e.camera) == null ? void 0 : d.pickEllipsoid) == null ? void 0 : p.call(d, r, e.scene.globe.ellipsoid);
692
+ });
693
+ if (!s) return null;
694
+ const i = x(() => t.Cartographic.fromCartesian(s));
695
+ return i ? {
696
+ lng: t.Math.toDegrees(i.longitude),
697
+ lat: t.Math.toDegrees(i.latitude)
698
+ } : null;
699
+ }
700
+ function Pt() {
701
+ const e = a.getMap(), t = x(() => {
702
+ var s;
703
+ return (s = e == null ? void 0 : e.getCenter) == null ? void 0 : s.call(e);
704
+ }) || x(() => e == null ? void 0 : e.center), n = Number((t == null ? void 0 : t.lng) ?? (t == null ? void 0 : t.longitude)), r = Number((t == null ? void 0 : t.lat) ?? (t == null ? void 0 : t.latitude));
705
+ return !Number.isFinite(n) || !Number.isFinite(r) || n === 0 || r === 0 ? null : { lng: n, lat: r };
706
+ }
707
+ function gt(e) {
708
+ return e ? '<svg viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M512 512a128 128 0 1 0 0-256 128 128 0 0 0 0 256z"/><path fill="currentColor" d="M512 64a384 384 0 0 0-384 384c0 236.8 384 512 384 512s384-275.2 384-512A384 384 0 0 0 512 64zm0 512a192 192 0 1 1 0-384 192 192 0 0 1 0 384z"/></svg>' : '<svg viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M512 512a128 128 0 1 0 0-256 128 128 0 0 0 0 256z"/><path fill="currentColor" d="M512 64a384 384 0 0 0-384 384c0 236.8 384 512 384 512s384-275.2 384-512A384 384 0 0 0 512 64zm0 820.8C391.04 790.4 192 587.52 192 448a320 320 0 0 1 640 0c0 139.52-199.04 342.4-320 436.8z"/></svg>';
709
+ }
710
+ function It(e, t, n, r) {
711
+ var h;
712
+ const s = (e == null ? void 0 : e.id) ?? "-", i = (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || "模型", d = !!((h = a.shouldShowDebugDetails) != null && h.call(a)) ? `<span class="real-model-debug-label__id">${s}</span>` : "", p = r ? "正在查看" : "点击查看";
713
+ return `<div class="real-model-debug-label ${t ? "is-visible" : "is-hidden"} ${n ? "is-hovered" : ""} ${r ? "is-current" : ""}">
714
+ <span class="real-model-debug-label__icon">${gt(t)}</span>
715
+ ${d}
716
+ <span class="real-model-debug-label__name">${i}</span>
717
+ <span class="real-model-debug-label__action">${p}</span>
718
+ </div>`;
719
+ }
720
+ function mt() {
721
+ const e = a.getMap(), t = a.getMars3d();
722
+ return e ? L || (L = new t.layer.GraphicLayer({
723
+ name: "real-model-debug-layer",
724
+ zIndex: 9999
725
+ }), e.addLayer(L), L) : null;
726
+ }
727
+ function Mt(e) {
728
+ var h;
729
+ const t = a.getCesium(), n = Ce(e), r = x(() => {
730
+ var S;
731
+ return (S = n == null ? void 0 : n.root) == null ? void 0 : S.boundingVolume;
732
+ }) || x(() => {
733
+ var S;
734
+ return (S = n == null ? void 0 : n._root) == null ? void 0 : S.boundingVolume;
735
+ }) || x(() => {
736
+ var S;
737
+ return (S = n == null ? void 0 : n.root) == null ? void 0 : S._boundingVolume;
738
+ }) || x(() => {
739
+ var S;
740
+ return (S = n == null ? void 0 : n._root) == null ? void 0 : S._boundingVolume;
741
+ }), s = x(() => r == null ? void 0 : r.boundingVolume) || x(() => r == null ? void 0 : r._boundingVolume) || x(() => r == null ? void 0 : r.orientedBoundingBox) || x(() => r == null ? void 0 : r._orientedBoundingBox), i = x(() => s == null ? void 0 : s.center), u = x(() => s == null ? void 0 : s.halfAxes);
742
+ if (!i || !u || !((h = t == null ? void 0 : t.Matrix3) != null && h.getColumn)) return null;
743
+ const d = t.Matrix3.getColumn(u, 0, new t.Cartesian3()), p = t.Matrix3.getColumn(u, 1, new t.Cartesian3());
744
+ return [
745
+ t.Cartesian3.add(t.Cartesian3.add(i, d, new t.Cartesian3()), p, new t.Cartesian3()),
746
+ t.Cartesian3.add(t.Cartesian3.subtract(i, d, new t.Cartesian3()), p, new t.Cartesian3()),
747
+ t.Cartesian3.subtract(t.Cartesian3.subtract(i, d, new t.Cartesian3()), p, new t.Cartesian3()),
748
+ t.Cartesian3.add(t.Cartesian3.subtract(i, p, new t.Cartesian3()), d, new t.Cartesian3())
749
+ ];
750
+ }
751
+ function At(e) {
752
+ const t = a.getCesium(), n = Ce(e), r = x(() => {
753
+ var u;
754
+ return (u = n == null ? void 0 : n.root) == null ? void 0 : u.boundingVolume;
755
+ }) || x(() => {
756
+ var u;
757
+ return (u = n == null ? void 0 : n._root) == null ? void 0 : u.boundingVolume;
758
+ }) || x(() => {
759
+ var u;
760
+ return (u = n == null ? void 0 : n.root) == null ? void 0 : u._boundingVolume;
761
+ }) || x(() => {
762
+ var u;
763
+ return (u = n == null ? void 0 : n._root) == null ? void 0 : u._boundingVolume;
764
+ }), s = x(() => r == null ? void 0 : r.rectangle) || x(() => r == null ? void 0 : r._rectangle) || x(() => {
765
+ var u;
766
+ return (u = r == null ? void 0 : r.boundingVolume) == null ? void 0 : u.rectangle;
767
+ }) || x(() => {
768
+ var u;
769
+ return (u = r == null ? void 0 : r._boundingVolume) == null ? void 0 : u.rectangle;
770
+ });
771
+ if (s)
772
+ return {
773
+ west: t.Math.toDegrees(s.west),
774
+ south: t.Math.toDegrees(s.south),
775
+ east: t.Math.toDegrees(s.east),
776
+ north: t.Math.toDegrees(s.north)
777
+ };
778
+ const i = x(() => r == null ? void 0 : r.region) || x(() => r == null ? void 0 : r._region) || x(() => {
779
+ var u;
780
+ return (u = r == null ? void 0 : r.boundingVolume) == null ? void 0 : u.region;
781
+ }) || x(() => {
782
+ var u;
783
+ return (u = r == null ? void 0 : r._boundingVolume) == null ? void 0 : u.region;
784
+ });
785
+ return Array.isArray(i) && i.length >= 4 ? {
786
+ west: t.Math.toDegrees(Number(i[0])),
787
+ south: t.Math.toDegrees(Number(i[1])),
788
+ east: t.Math.toDegrees(Number(i[2])),
789
+ north: t.Math.toDegrees(Number(i[3]))
790
+ } : null;
791
+ }
792
+ function Ot(e) {
793
+ const t = a.getCesium();
794
+ if (!t || !(e != null && e.length)) return null;
795
+ const n = e.map((r) => x(() => t.Cartographic.fromCartesian(r))).filter(Boolean).map((r) => ({
796
+ lng: t.Math.toDegrees(r.longitude),
797
+ lat: t.Math.toDegrees(r.latitude)
798
+ })).filter((r) => Number.isFinite(r.lng) && Number.isFinite(r.lat));
799
+ return n.length ? {
800
+ west: Math.min(...n.map((r) => r.lng)),
801
+ south: Math.min(...n.map((r) => r.lat)),
802
+ east: Math.max(...n.map((r) => r.lng)),
803
+ north: Math.max(...n.map((r) => r.lat))
804
+ } : null;
805
+ }
806
+ function pt(e) {
807
+ const t = Le(e);
808
+ if (!t) return null;
809
+ const n = 12e-4, r = 1e-3;
810
+ return {
811
+ west: t.lng - n,
812
+ south: t.lat - r,
813
+ east: t.lng + n,
814
+ north: t.lat + r
815
+ };
816
+ }
817
+ function ht(e) {
818
+ return a.getCesium().Cartesian3.fromDegreesArray([
819
+ e.west,
820
+ e.south,
821
+ e.east,
822
+ e.south,
823
+ e.east,
824
+ e.north,
825
+ e.west,
826
+ e.north
827
+ ]);
828
+ }
829
+ function St(e) {
830
+ const t = j(e.id), n = ne(e.id), r = D.get(n);
831
+ if (re.has(n) && (r != null && r.length)) return r;
832
+ const s = Mt(t);
833
+ if (s != null && s.length) {
834
+ D.set(n, s);
835
+ const d = Ot(s);
836
+ return d && F.set(n, d), re.add(n), s;
837
+ }
838
+ const i = At(t), u = i || pt(e);
839
+ if (u) {
840
+ F.set(n, u);
841
+ const d = ht(u);
842
+ return D.set(n, d), i && re.add(n), d;
843
+ }
844
+ return r || null;
845
+ }
846
+ function kt(e, t, n, r) {
847
+ const s = a.getMars3d(), i = St(e);
848
+ if (!i) return null;
849
+ const u = r ? "#43ffd3" : t ? "#21f0bf" : n ? "#22d8ff" : "#4098ff";
850
+ return new s.graphic.PolygonEntity({
851
+ positions: i,
852
+ style: {
853
+ clampToGround: !0,
854
+ color: u,
855
+ opacity: r ? 0.01 : t ? 0.035 : 0.02,
856
+ outline: !0,
857
+ outlineColor: u,
858
+ outlineOpacity: r || n ? 1 : t ? 0.96 : 0.68,
859
+ outlineWidth: r ? n ? 6 : 4 : n ? 5 : t ? 3 : 2,
860
+ classification: !0
861
+ }
862
+ });
863
+ }
864
+ function o(e, t, n) {
865
+ const r = e ?? null;
866
+ ue !== r && (ue = r, K = "", ae(t, n));
867
+ }
868
+ function c(e) {
869
+ var t;
870
+ (t = a.locateMaterialModel) == null || t.call(a, e);
871
+ }
872
+ function R(e, t, n, r) {
873
+ var d, p, h, S;
874
+ const s = a.getMars3d(), i = ((d = s == null ? void 0 : s.EventType) == null ? void 0 : d.mouseOver) || "mouseover", u = ((p = s == null ? void 0 : s.EventType) == null ? void 0 : p.mouseOut) || "mouseout";
875
+ (h = e.on) == null || h.call(e, i, () => {
876
+ o(t.id, n, r);
877
+ }), (S = e.on) == null || S.call(e, u, () => {
878
+ o(null, n, r);
879
+ });
880
+ }
881
+ function k() {
882
+ var e;
883
+ K = "", ue = null, (e = L == null ? void 0 : L.clear) == null || e.call(L);
884
+ }
885
+ function te(e) {
886
+ if (H = e, !e) {
887
+ k();
888
+ return;
889
+ }
890
+ Gt();
891
+ }
892
+ function ae(e, t) {
893
+ const n = a.getMap(), r = a.getMars3d(), s = a.getCesium();
894
+ if (!n) return;
895
+ if (_r(r), !H) {
896
+ k();
897
+ return;
898
+ }
899
+ const i = mt();
900
+ if (!i) return;
901
+ const u = new Set(t.map((p) => String(p))), d = `${e.map((p) => String(p.id)).join(",")}|${Array.from(u).sort().join(",")}|current:${y.value ?? ""}|hover:${ue ?? ""}`;
902
+ d !== K && (K = d, i.clear(), e.forEach((p) => {
903
+ var w, ge, Y;
904
+ const h = ze(p);
905
+ if (!h) return;
906
+ const S = u.has(String(p.id)), C = String(ue ?? "") === String(p.id), G = y.value != null && X(y.value, p.id), O = kt(p, S, C, G);
907
+ O && (R(O, p, e, t), (w = O.on) == null || w.call(O, r.EventType.click, () => {
908
+ c(p);
909
+ }), i.addGraphic(O));
910
+ const V = new r.graphic.DivGraphic({
911
+ position: h,
912
+ pointerEvents: !0,
913
+ style: {
914
+ html: It(p, S, C, G),
915
+ horizontalOrigin: s.HorizontalOrigin.CENTER,
916
+ verticalOrigin: s.VerticalOrigin.BOTTOM,
917
+ offsetY: C ? -36 : -28,
918
+ clampToGround: !1,
919
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
920
+ }
921
+ });
922
+ R(V, p, e, t), (ge = V.on) == null || ge.call(V, r.EventType.load, (de) => {
923
+ var Ve, Je;
924
+ const J = (Ve = de == null ? void 0 : de.target) == null ? void 0 : Ve.container;
925
+ J != null && J.style && (J.style.pointerEvents = "auto", J.style.zIndex = C ? "10001" : "9999");
926
+ const pe = ((Je = J == null ? void 0 : J.querySelector) == null ? void 0 : Je.call(J, ".real-model-debug-label")) || (J == null ? void 0 : J.firstElementChild);
927
+ !(pe != null && pe.dataset) || pe.dataset.realModelClickBound === "1" || (pe.dataset.realModelClickBound = "1", pe.addEventListener("mouseenter", () => {
928
+ o(p.id, e, t);
929
+ }), pe.addEventListener("mouseleave", () => {
930
+ o(null, e, t);
931
+ }), pe.addEventListener("click", (Ze) => {
932
+ Ze.preventDefault(), Ze.stopPropagation(), c(p);
933
+ }));
934
+ }), (Y = V.on) == null || Y.call(V, r.EventType.click, () => {
935
+ c(p);
936
+ }), i.addGraphic(V);
937
+ }));
938
+ }
939
+ function we(e, t, n = 0) {
940
+ var p;
941
+ const r = a.getMap();
942
+ if (!r) return !1;
943
+ const s = Le(e);
944
+ if (!s || t && n <= 0 && !ut(s, t)) return !1;
945
+ const i = ze(e), u = (p = r.scene) == null ? void 0 : p.canvas, d = Xe(i);
946
+ if (d && u) {
947
+ const h = Math.max(u.clientWidth, u.clientHeight) * n;
948
+ return d.x >= 0 - h && d.x <= u.clientWidth + h && d.y >= 0 - h && d.y <= u.clientHeight + h;
949
+ }
950
+ return t ? ut(s, t) : !0;
951
+ }
952
+ function xe(e) {
953
+ return e ? {
954
+ lng: (Number(e.west) + Number(e.east)) / 2,
955
+ lat: (Number(e.south) + Number(e.north)) / 2
956
+ } : null;
957
+ }
958
+ function Ee(e, t) {
959
+ if (!e || !t) return Number.MAX_SAFE_INTEGER;
960
+ const n = e.lng - t.lng, r = e.lat - t.lat;
961
+ return n * n + r * r;
962
+ }
963
+ function Be(e) {
964
+ var d;
965
+ const t = a.getMap(), n = ze(e), r = (d = t == null ? void 0 : t.scene) == null ? void 0 : d.canvas, s = Xe(n);
966
+ if (!s || !r) return Number.MAX_SAFE_INTEGER;
967
+ const i = s.x - r.clientWidth / 2, u = s.y - r.clientHeight / 2;
968
+ return i * i + u * u;
969
+ }
970
+ function Bt(e) {
971
+ var i;
972
+ const t = a.getMap(), n = (i = t == null ? void 0 : t.scene) == null ? void 0 : i.canvas, r = Math.max(Number((n == null ? void 0 : n.clientWidth) || 0), Number((n == null ? void 0 : n.clientHeight) || 0));
973
+ if (!r) return Number.MAX_SAFE_INTEGER;
974
+ const s = Be(e);
975
+ return Number.isFinite(s) ? s / (r * r) : Number.MAX_SAFE_INTEGER;
976
+ }
977
+ function yt(e, t) {
978
+ var s, i, u, d;
979
+ const n = a.getMap(), r = (s = a.getLastPointerLngLat) == null ? void 0 : s.call(a);
980
+ if (Rt() && !((i = a.getLastPointerWindowPosition) != null && i.call(a))) {
981
+ const p = Ee(Le(e), r || t), h = Bt(e);
982
+ return p + (Number.isFinite(h) ? h * 2e-6 : 0);
983
+ }
984
+ if (n) {
985
+ const p = ze(e), h = (u = n.scene) == null ? void 0 : u.canvas, S = Xe(p);
986
+ if (S && h) {
987
+ const C = (d = a.getLastPointerWindowPosition) == null ? void 0 : d.call(a);
988
+ if (C) {
989
+ const G = S.x - C.x, O = S.y - C.y;
990
+ return G * G + O * O;
991
+ }
992
+ return r ? Ee(Le(e), r) : Be(e);
993
+ }
994
+ }
995
+ return Ee(Le(e), t);
996
+ }
997
+ function un(e) {
998
+ var t;
999
+ return ((t = a.getLastPointerLngLat) == null ? void 0 : t.call(a)) || Pt() || ft() || xe(e);
1000
+ }
1001
+ function X(e, t) {
1002
+ return String(e) === String(t);
1003
+ }
1004
+ function qe(e, t) {
1005
+ return Array.from(e).some((n) => X(n, t));
1006
+ }
1007
+ function ne(e) {
1008
+ return String(e);
1009
+ }
1010
+ function _t(e, t = !1, n = []) {
1011
+ return Array.isArray(e) && e.forEach((r) => {
1012
+ var u, d;
1013
+ const s = [r == null ? void 0 : r.value, r == null ? void 0 : r.modelType, r == null ? void 0 : r.type], i = t || s.some((p) => String(p) === "2");
1014
+ if ((u = r == null ? void 0 : r.data) != null && u.length) {
1015
+ _t(r.data, i, n);
1016
+ return;
1017
+ }
1018
+ if ((d = r == null ? void 0 : r.children) != null && d.length) {
1019
+ _t(r.children, i, n);
1020
+ return;
1021
+ }
1022
+ i && (r != null && r.id) && !a.isPoliceModelLeaf(r) && n.push(r);
1023
+ }), n;
1024
+ }
1025
+ function Ft(...e) {
1026
+ const t = /* @__PURE__ */ new Map();
1027
+ return e.flat().forEach((n) => {
1028
+ if (!(n != null && n.id)) return;
1029
+ const r = String(n.id), i = { ...t.get(r) || {} };
1030
+ Object.keys(n).forEach((u) => {
1031
+ n[u] !== void 0 && n[u] !== null && n[u] !== "" && (i[u] = n[u]);
1032
+ }), t.set(r, i);
1033
+ }), Array.from(t.values());
1034
+ }
1035
+ function Ae() {
1036
+ return Ft(
1037
+ z,
1038
+ _t(a.getTreeData())
1039
+ ).filter((e) => (e == null ? void 0 : e.id) && !a.isPoliceModelLeaf(e));
1040
+ }
1041
+ function Re(e, t = !0) {
1042
+ if (e != null) {
1043
+ if (a.destroyMaterialModel) {
1044
+ a.destroyMaterialModel(e, t);
1045
+ return;
1046
+ }
1047
+ a.hideMaterialModel(e, t);
1048
+ }
1049
+ }
1050
+ function cn(e) {
1051
+ var t;
1052
+ (t = a.destroyModelResourcesExcept) == null || t.call(a, Array.from(e)), Ae().forEach((n) => {
1053
+ if (qe(e, n.id)) return;
1054
+ const r = j(n.id);
1055
+ r != null && r.show && Re(n.id, !1);
1056
+ }), I.forEach((n) => {
1057
+ qe(e, n) || Re(n, !1);
1058
+ }), P.forEach((n) => {
1059
+ qe(e, n) || Re(n, !1);
1060
+ });
1061
+ }
1062
+ function Et(e) {
1063
+ return g !== null && X(g, e);
1064
+ }
1065
+ function $t() {
1066
+ const e = Ae(), t = new Map(e.map((d) => [String(d.id), d])), n = it(), r = un(n), s = /* @__PURE__ */ new Set([
1067
+ ...e.map((d) => d.id),
1068
+ ...I,
1069
+ ...P,
1070
+ ...a.getManualModelIds()
1071
+ ]), i = Array.from(s).filter((d) => {
1072
+ const p = j(d);
1073
+ return !!(p != null && p.show);
1074
+ }).sort((d, p) => yt(t.get(String(d)) || { id: d }, r) - yt(t.get(String(p)) || { id: p }, r)), u = e.filter((d) => !!Le(d)).filter((d) => we(d, n, Xn)).sort((d, p) => yt(d, r) - yt(p, r)).slice(0, 30);
1075
+ return ae(u, i), {
1076
+ visibleModelIds: i,
1077
+ visibleModelCount: i.length,
1078
+ manualModelCount: a.getManualModelIds().length,
1079
+ autoModelCount: I.size,
1080
+ pinnedModelCount: P.size
1081
+ };
1082
+ }
1083
+ function Ue(e = Ae().length) {
1084
+ const t = $t();
1085
+ l.value.realText = `${t.visibleModelCount}/${Qn} 当前真实模型 ${t.visibleModelIds.join(",") || "-"} / 标签 ${e}`;
1086
+ }
1087
+ function dn(e) {
1088
+ var r, s, i;
1089
+ const t = a.getMap();
1090
+ return {
1091
+ ...$t(),
1092
+ time: (/* @__PURE__ */ new Date()).toISOString(),
1093
+ cameraHeight: Number(((s = (r = t == null ? void 0 : t.camera) == null ? void 0 : r.positionCartographic) == null ? void 0 : s.height) || 0).toFixed(0),
1094
+ sse: l.value.sseText,
1095
+ actualSse: l.value.actualSseText,
1096
+ tilesLoading: l.value.tilesLoadingText,
1097
+ errorMessage: (e == null ? void 0 : e.message) || ((i = e == null ? void 0 : e.error) == null ? void 0 : i.message) || String(e || "")
1098
+ };
1099
+ }
1100
+ function fn(e = /* @__PURE__ */ new Set()) {
1101
+ I.forEach((t) => {
1102
+ Et(t) || qe(e, t) || a.getManualModelIds().includes(t) || Re(t, !1);
1103
+ }), P.forEach((t) => {
1104
+ Et(t) || qe(e, t) || a.getManualModelIds().some((n) => X(n, t)) || Re(t, !1);
1105
+ });
1106
+ }
1107
+ function qt(e) {
1108
+ return E !== null && Date.now() <= N && X(e, E);
1109
+ }
1110
+ function gn(e, t) {
1111
+ var i;
1112
+ if (!a.getMap()) return;
1113
+ _e(e);
1114
+ const r = /* @__PURE__ */ new Set(), s = Ae();
1115
+ if (g !== null && ((i = j(g)) != null && i.show) && (a.showMaterialModel(g, !1), Pe(j(g), ee(g)), r.add(g)), !r.size) {
1116
+ fn(r), I.clear(), P.clear(), $.clear(), q.clear(), Q.clear(), _ = null, E = null, N = 0, g = null, Ne(null, s), Ge(), $t(), Ue(s.length), l.value.modelModeText = "模型总览模式:当前仅展示模型范围和名称;点击模型标签后加载真实模型。";
1117
+ return;
1118
+ }
1119
+ cn(r), I.clear(), r.forEach((u) => I.add(u)), P.clear(), r.forEach((u) => P.add(u)), g = Array.from(r)[0] ?? null, Ne(g, s), _e(e), l.value.modelModeText = g !== null ? "模型查看模式:当前模型已锁定,拉远视角不会自动销毁;切换模型时才释放当前真实模型。" : "模型总览模式:当前仅展示模型范围和名称;点击模型标签后加载真实模型。", Ue(s.length), wt();
1120
+ }
1121
+ function Gt() {
1122
+ var n;
1123
+ const e = a.getMap();
1124
+ if (!e) return;
1125
+ const t = Number(((n = e.camera.positionCartographic) == null ? void 0 : n.height) || 0);
1126
+ it(0.5, 0.01), gn(t);
1127
+ }
1128
+ function mn(...e) {
1129
+ z = Ft(z, ...e);
1130
+ }
1131
+ function Mn(e) {
1132
+ T && (clearTimeout(T), T = null), I.forEach((t) => {
1133
+ !a.getManualModelIds().some((n) => X(n, t)) && !X(t, e) && Re(t, !1);
1134
+ }), P.forEach((t) => {
1135
+ !a.getManualModelIds().some((n) => X(n, t)) && !X(t, e) && Re(t, !1);
1136
+ }), I.clear(), P.clear(), $.clear(), q.clear(), Q.clear(), ye.clear(), b = 0, Ge(), g = e, Ne(e), E = e, N = Date.now() + Zn, a.showMaterialModel(e, !1), Pe(j(e), ee(e)), P.add(e), _ = e, T = setTimeout(() => {
1137
+ T = null, _ = null, Gt();
1138
+ }, Jn);
1139
+ }
1140
+ function Kt(e = {}) {
1141
+ T && (clearTimeout(T), T = null), I.clear(), P.clear(), e.clearDebugLayer !== !1 && k(), Ie(), b = 0, $.clear(), q.clear(), Q.clear(), Ge(), U = "", f = 0, g = null, Ne(null), se = null, _ = null, E = null, N = 0;
1142
+ }
1143
+ function pn() {
1144
+ var t, n, r;
1145
+ (/* @__PURE__ */ new Set([
1146
+ g,
1147
+ E,
1148
+ _,
1149
+ ...I,
1150
+ ...P
1151
+ ])).forEach((s) => {
1152
+ s != null && Re(s, !0);
1153
+ }), Kt({ clearDebugLayer: !1 }), Ue(), (r = (n = (t = a.getMap()) == null ? void 0 : t.scene) == null ? void 0 : n.requestRender) == null || r.call(n);
1154
+ }
1155
+ function hn() {
1156
+ var e, t, n, r;
1157
+ I.forEach((s) => {
1158
+ Et(s) || qt(s) || a.getManualModelIds().some((i) => X(i, s)) || Re(s, !1);
1159
+ }), P.forEach((s) => {
1160
+ Et(s) || qt(s) || a.getManualModelIds().some((i) => X(i, s)) || Re(s, !1);
1161
+ }), I.clear(), g !== null && ((e = j(g)) != null && e.show) ? (I.add(g), P.clear(), P.add(g), Ne(g)) : E !== null && Date.now() <= N ? (I.add(E), P.clear(), P.add(E), g = E, Ne(E)) : (P.clear(), g = null, Ne(null), E = null, N = 0), $.clear(), q.clear(), Q.clear(), Ge(), _e(Number(((r = (n = (t = a.getMap()) == null ? void 0 : t.camera) == null ? void 0 : n.positionCartographic) == null ? void 0 : r.height) || 0) + 1e3), Ue();
1162
+ }
1163
+ return {
1164
+ cameraDebugInfo: l,
1165
+ currentModelName: m,
1166
+ currentModelId: y,
1167
+ updateCameraDebugInfo: st,
1168
+ updateActualTilesetDebugInfo: He,
1169
+ collectRenderErrorDebugInfo: dn,
1170
+ applyTilesetScreenSpaceError: Pe,
1171
+ applyCurrentModelScreenSpaceError: _e,
1172
+ getCurrentModelScreenSpaceError: ce,
1173
+ getCurrentPrimaryModelScreenSpaceError: De,
1174
+ getCurrentPrimaryModelRecommendedScreenSpaceError: nt,
1175
+ setCurrentModelClarity: Dt,
1176
+ resetCurrentModelClarity: Nt,
1177
+ getMaterialModelLayerById: j,
1178
+ getRealModelLngLat: Le,
1179
+ collectThreeDimensionalModelNodes: _t,
1180
+ mergeRealModelMaterialItems: Ft,
1181
+ getThreeDimensionalModelItems: Ae,
1182
+ updateRealModelDebugText: Ue,
1183
+ updateRealModelLayer: Gt,
1184
+ setRealModelLabelsVisible: te,
1185
+ setRealModelMaterialItems: mn,
1186
+ handleLocationModel: Mn,
1187
+ switchToOverviewMode: pn,
1188
+ releaseAutoVisibleModels: hn,
1189
+ isSameModelId: X,
1190
+ hasModelId: qe,
1191
+ reset: Kt
1192
+ };
1193
+ }
1194
+ const Tr = 3e3;
1195
+ function vr(a) {
1196
+ const l = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set();
1197
+ let y = null;
1198
+ function B() {
1199
+ var M;
1200
+ return ((M = a.getCurrentModelScreenSpaceError) == null ? void 0 : M.call(a)) ?? Kn;
1201
+ }
1202
+ function z(M) {
1203
+ var _, T, E;
1204
+ if (M == null) return null;
1205
+ const b = a.getMap();
1206
+ return b ? ((_ = b.getLayerById) == null ? void 0 : _.call(b, M)) || ((T = b.getLayerById) == null ? void 0 : T.call(b, String(M))) || (Number.isFinite(Number(M)) ? (E = b.getLayerById) == null ? void 0 : E.call(b, Number(M)) : null) : null;
1207
+ }
1208
+ function I(M) {
1209
+ return (M == null ? void 0 : M.tileset) || (M == null ? void 0 : M._tileset) || (M == null ? void 0 : M._primitive) || (M == null ? void 0 : M.primitive);
1210
+ }
1211
+ function P(M, b) {
1212
+ var T, E, N;
1213
+ if (!M) return;
1214
+ Object.keys(b).forEach((g) => {
1215
+ M[g] !== void 0 && (M[g] = b[g]), M.options && (M.options[g] = b[g]);
1216
+ });
1217
+ const _ = I(M);
1218
+ _ && Object.keys(b).forEach((g) => {
1219
+ _[g] !== void 0 && (_[g] = b[g]);
1220
+ }), (N = (E = (T = a.getMap()) == null ? void 0 : T.scene) == null ? void 0 : E.requestRender) == null || N.call(E);
1221
+ }
1222
+ function $(M, b) {
1223
+ const _ = a.getMars3d();
1224
+ if (!_) return null;
1225
+ const T = B(), E = {
1226
+ id: M.id,
1227
+ name: M.fileName || M.name || "3D model",
1228
+ url: b,
1229
+ ...Wt(T),
1230
+ show: !1
1231
+ };
1232
+ return M.id === 5 || String(M.id) === "5" ? E.position = { alt: 35 } : (E.maxMemory = T <= 6 ? 768 : 192, E.loadSiblings = !1, E.dynamicScreenSpaceError = T > 6), new _.layer.TilesetLayer(E);
1233
+ }
1234
+ async function q(M) {
1235
+ const b = a.getMap();
1236
+ if (!b || M.id == null) return null;
1237
+ const _ = z(M.id), T = String(M.id);
1238
+ if (_)
1239
+ return m.add(T), _;
1240
+ const E = l.get(T);
1241
+ if (E) return E;
1242
+ const N = (async () => {
1243
+ const g = a.resolveTilesetUrl ? await a.resolveTilesetUrl(M) : qn(M.file);
1244
+ if (!g) return null;
1245
+ const U = $(M, g);
1246
+ return U ? (await b.addLayer(U), m.add(T), U) : null;
1247
+ })().finally(() => {
1248
+ l.delete(T);
1249
+ });
1250
+ return l.set(T, N), N;
1251
+ }
1252
+ async function Q(M) {
1253
+ var _, T, E;
1254
+ const b = await q(M);
1255
+ return b ? (b.show = !0, (E = (T = (_ = a.getMap()) == null ? void 0 : _.scene) == null ? void 0 : T.requestRender) == null || E.call(T), b) : null;
1256
+ }
1257
+ function ye(M) {
1258
+ var T, E, N, g;
1259
+ const b = z(M);
1260
+ if (!b) return;
1261
+ b.show = !1;
1262
+ const _ = I(b);
1263
+ (T = _ == null ? void 0 : _.trimLoadedTiles) == null || T.call(_), (g = (N = (E = a.getMap()) == null ? void 0 : E.scene) == null ? void 0 : N.requestRender) == null || g.call(N);
1264
+ }
1265
+ function he(M) {
1266
+ var N, g, U, f, L, H, K;
1267
+ const b = String(M);
1268
+ l.delete(b);
1269
+ const _ = z(M);
1270
+ if (m.delete(b), !_) return;
1271
+ const T = I(_);
1272
+ (N = T == null ? void 0 : T.trimLoadedTiles) == null || N.call(T), _.show = !1;
1273
+ const E = a.getMap();
1274
+ E != null && E.removeLayer ? E.removeLayer(_, !0) : ((g = _.remove) == null || g.call(_), !((U = _.isDestroy) != null && U.call(_)) && !((f = _.isDestroyed) != null && f.call(_)) && ((L = _.destroy) == null || L.call(_))), (K = (H = E == null ? void 0 : E.scene) == null ? void 0 : H.requestRender) == null || K.call(H);
1275
+ }
1276
+ function D(M) {
1277
+ var _, T, E;
1278
+ const b = new Set(M.map((N) => String(N)));
1279
+ Array.from(m).forEach((N) => {
1280
+ b.has(String(N)) || he(N);
1281
+ }), (E = (T = (_ = a.getMap()) == null ? void 0 : _.scene) == null ? void 0 : T.requestRender) == null || E.call(T);
1282
+ }
1283
+ function F(M) {
1284
+ P(M, {
1285
+ ...Wt(Qt, {
1286
+ progressiveResolutionHeightFraction: Yn
1287
+ }),
1288
+ preferLeaves: !1
1289
+ });
1290
+ }
1291
+ function re(M) {
1292
+ y && (clearTimeout(y), y = null), y = setTimeout(() => {
1293
+ y = null;
1294
+ const b = I(M);
1295
+ if (((b == null ? void 0 : b.maximumScreenSpaceError) ?? (M == null ? void 0 : M.maximumScreenSpaceError)) === Qt) {
1296
+ if (a.applyTilesetScreenSpaceError) {
1297
+ a.applyTilesetScreenSpaceError(M, B());
1298
+ return;
1299
+ }
1300
+ P(M, {
1301
+ maximumScreenSpaceError: B(),
1302
+ dynamicScreenSpaceError: B() > 6
1303
+ });
1304
+ }
1305
+ }, Tr);
1306
+ }
1307
+ async function le(M, b = 2500) {
1308
+ var T, E, N, g, U;
1309
+ if (!M) return;
1310
+ (N = (E = (T = a.getMap()) == null ? void 0 : T.scene) == null ? void 0 : E.requestRender) == null || N.call(E);
1311
+ const _ = M.readyPromise || ((g = I(M)) == null ? void 0 : g.readyPromise);
1312
+ if (!(_ != null && _.then)) {
1313
+ await new Promise((f) => setTimeout(f, 120));
1314
+ return;
1315
+ }
1316
+ await Promise.race([
1317
+ ((U = _.catch) == null ? void 0 : U.call(_, () => {
1318
+ })) || _,
1319
+ new Promise((f) => setTimeout(f, b))
1320
+ ]);
1321
+ }
1322
+ async function ie(M) {
1323
+ var N;
1324
+ const b = a.getMars3d(), _ = a.getMap(), T = await Q(M);
1325
+ if (!_ || !b || !T) return;
1326
+ if (F(T), re(T), await le(T), T.flyTo) {
1327
+ T.flyTo({ radius: 700, pitch: -15 });
1328
+ return;
1329
+ }
1330
+ const E = ((N = a.getModelLngLat) == null ? void 0 : N.call(a, M)) ?? (M.longitude && M.latitude ? { lng: Number(M.longitude), lat: Number(M.latitude) } : null);
1331
+ E && _.flyToPoint(new b.LngLatPoint(E.lng, E.lat), { radius: 150, pitch: -15, duration: 1 });
1332
+ }
1333
+ async function se(M) {
1334
+ for (const b of M)
1335
+ await q(b);
1336
+ }
1337
+ function me() {
1338
+ y && (clearTimeout(y), y = null), l.clear(), m.clear();
1339
+ }
1340
+ return {
1341
+ applyLocationFastTilesetOptions: F,
1342
+ destroyModel: he,
1343
+ destroyModelResourcesExcept: D,
1344
+ dispose: me,
1345
+ ensureLayer: q,
1346
+ getLayerById: z,
1347
+ hideModel: ye,
1348
+ locateModel: ie,
1349
+ preloadModels: se,
1350
+ scheduleRestoreLocationTilesetOptions: re,
1351
+ showModel: Q,
1352
+ waitForTilesetLayerReady: le
1353
+ };
1354
+ }
1355
+ let Tt = null, Ht = null;
1356
+ function br(a) {
1357
+ const l = globalThis.mars3d;
1358
+ return [
1359
+ a == null ? void 0 : a.default,
1360
+ a,
1361
+ l
1362
+ ].find((y) => !y || typeof y != "object" ? !1 : "BaseClass" in y && "Map" in y) ?? null;
1363
+ }
1364
+ async function Cr() {
1365
+ return Tt || (Ht || (Ht = (async () => {
1366
+ await Promise.all([
1367
+ Rn(),
1368
+ import("@turf/turf"),
1369
+ Promise.resolve({ })
1370
+ ]);
1371
+ const a = await import("mars3d"), l = br(a);
1372
+ if (!l) {
1373
+ const m = a && typeof a == "object" ? Object.keys(a).join(", ") : typeof a;
1374
+ throw new Error(`mars3d module loaded but BaseClass is missing. Module keys: ${m}`);
1375
+ }
1376
+ return Tt = l, globalThis.mars3d = l, Tt;
1377
+ })()), Ht);
1378
+ }
1379
+ async function Lr() {
1380
+ const a = await Cr();
1381
+ return { mars3d: a, Cesium: a.Cesium };
1382
+ }
1383
+ const wr = {
1384
+ class: "real-model-clarity__panel",
1385
+ role: "dialog",
1386
+ "aria-modal": "true",
1387
+ "aria-labelledby": "real-model-clarity-title",
1388
+ tabindex: "-1"
1389
+ }, xr = { class: "real-model-clarity__body" }, Rr = { class: "real-model-clarity__hero" }, Dr = { class: "real-model-clarity__status" }, Nr = { class: "real-model-clarity__status-card" }, Pr = { class: "real-model-clarity__status-card is-loading-status" }, Ir = { class: "real-model-clarity__control" }, Ar = { class: "real-model-clarity__control-head" }, Or = { class: "real-model-clarity__range-wrap" }, kr = ["value", "min", "max"], Br = { class: "real-model-clarity__marks" }, Fr = { class: "real-model-clarity__input" }, $r = ["value", "min", "max"], Gr = { class: "real-model-clarity__notice" }, Ur = /* @__PURE__ */ zt({
1390
+ __name: "RealModelClarityDialog",
1391
+ props: {
1392
+ modelValue: { type: Boolean },
1393
+ modelName: { default: "" },
1394
+ currentSse: {},
1395
+ actualSse: { default: "-" },
1396
+ tilesLoading: { default: "-" },
1397
+ min: { default: 1 },
1398
+ max: { default: 24 },
1399
+ recommended: { default: 6 }
1400
+ },
1401
+ emits: ["update:modelValue", "apply", "reset"],
1402
+ setup(a, { emit: l }) {
1403
+ const m = a, y = l, B = fe(m.currentSse), z = A(() => F(B.value)), I = A(() => re(z.value)), P = A(() => re(F(m.currentSse))), $ = A(() => F(m.recommended)), q = A(() => re($.value)), Q = A(() => le(m.tilesLoading)), ye = A(() => ie(m.tilesLoading)), he = A(() => se(ye.value, z.value, $.value)), D = A(() => [
1404
+ { label: "极清 1", value: 1, tone: "is-high" },
1405
+ { label: "高清 6", value: 6, tone: "is-recommended" },
1406
+ { label: "均衡 12", value: 12, tone: "is-balanced" },
1407
+ { label: "流畅 18", value: 18, tone: "is-fast" }
1408
+ ]);
1409
+ vt(
1410
+ () => m.modelValue,
1411
+ (f) => {
1412
+ f && (B.value = F(m.currentSse));
1413
+ }
1414
+ ), vt(
1415
+ () => m.currentSse,
1416
+ (f) => {
1417
+ m.modelValue || (B.value = F(f));
1418
+ }
1419
+ );
1420
+ function F(f) {
1421
+ const L = Number(f);
1422
+ return Number.isFinite(L) ? Math.min(m.max, Math.max(m.min, Math.round(L))) : m.recommended;
1423
+ }
1424
+ function re(f) {
1425
+ return f <= 4 ? {
1426
+ name: "极清",
1427
+ tone: "is-high",
1428
+ description: "细节最多,适合近距离检查和截图;会请求更多瓦片,等待时间和内存占用都会升高。"
1429
+ } : f <= 8 ? {
1430
+ name: "高清",
1431
+ tone: "is-recommended",
1432
+ description: "推荐演示档,近景细节更稳定;如果模型很大或当前加载任务多,仍然可能需要等待。"
1433
+ } : f <= 16 ? {
1434
+ name: "均衡",
1435
+ tone: "is-balanced",
1436
+ description: "适合普通浏览和拖动,画面更容易稳定,但近距离细节会比高清档弱。"
1437
+ } : {
1438
+ name: "流畅",
1439
+ tone: "is-fast",
1440
+ description: "适合低性能设备或远景总览,加载更快,但近距离查看会明显变糊。"
1441
+ };
1442
+ }
1443
+ function le(f) {
1444
+ var Se, Me, ce;
1445
+ if (!f || f === "-") return "暂无加载数据";
1446
+ if (f.includes("加载中") || f.includes("已稳定")) return f;
1447
+ const L = Number(((Se = f.match(/\bp(\d+)/)) == null ? void 0 : Se[1]) ?? 0), H = Number(((Me = f.match(/\bpr(\d+)/)) == null ? void 0 : Me[1]) ?? 0), K = Number(((ce = f.match(/\bs(\d+)/)) == null ? void 0 : ce[1]) ?? 0), ue = Math.max(L, H);
1448
+ return ue > 0 ? `加载中:后台处理 ${ue} 项,画面显示 ${K} 块` : K > 0 ? `已稳定:画面显示 ${K} 块` : "已稳定";
1449
+ }
1450
+ function ie(f) {
1451
+ var ue, Se;
1452
+ if (!f || f === "-") return 0;
1453
+ const L = f.match(/后台处理\s*(\d+)/);
1454
+ if (L) return Number(L[1]);
1455
+ const H = Number(((ue = f.match(/\bp(\d+)/)) == null ? void 0 : ue[1]) ?? 0), K = Number(((Se = f.match(/\bpr(\d+)/)) == null ? void 0 : Se[1]) ?? 0);
1456
+ return Math.max(H, K);
1457
+ }
1458
+ function se(f, L, H) {
1459
+ return f >= 96 ? {
1460
+ tone: "is-fast",
1461
+ title: "当前模型加载压力较高",
1462
+ description: "模型体量可能偏大,推荐档也不一定最快。演示时可先调到均衡或流畅,画面稳定后再逐步提高清晰度。"
1463
+ } : f >= 48 ? {
1464
+ tone: "is-balanced",
1465
+ title: "当前模型加载偏慢",
1466
+ description: L <= H ? "当前清晰度偏高,可以临时调大 SSE 到均衡档;加载完成后再调回推荐或高清。" : "当前已经偏向流畅,适合先等画面稳定;如果仍然很慢,可以继续调大 SSE。"
1467
+ } : L > 8 ? {
1468
+ tone: "is-recommended",
1469
+ title: "当前加载压力可控",
1470
+ description: "如果近景细节不够,可以调到高清或极清;数值越小越清晰,但会请求更多瓦片。"
1471
+ } : {
1472
+ tone: "is-recommended",
1473
+ title: "当前适合按效果微调",
1474
+ description: "推荐档适合多数模型近景演示。加载慢时调大 SSE,细节不够时调小 SSE。"
1475
+ };
1476
+ }
1477
+ function me(f) {
1478
+ return (f - m.min) / (m.max - m.min) * 100;
1479
+ }
1480
+ function M(f) {
1481
+ const L = me(f);
1482
+ return { left: `${Math.min(100, Math.max(0, L))}%` };
1483
+ }
1484
+ function b(f) {
1485
+ B.value = F(Number(f));
1486
+ }
1487
+ function _(f) {
1488
+ b(f.target.value);
1489
+ }
1490
+ function T(f) {
1491
+ const L = f.target, H = F(Number(L.value));
1492
+ L.value = String(H), B.value = H;
1493
+ }
1494
+ function E() {
1495
+ B.value = z.value;
1496
+ }
1497
+ function N() {
1498
+ y("apply", z.value), y("update:modelValue", !1);
1499
+ }
1500
+ function g() {
1501
+ y("update:modelValue", !1);
1502
+ }
1503
+ function U() {
1504
+ B.value = $.value, y("reset");
1505
+ }
1506
+ return (f, L) => (Z(), en(Sn, { to: "body" }, [
1507
+ a.modelValue ? (Z(), oe("div", {
1508
+ key: 0,
1509
+ class: "real-model-clarity",
1510
+ onClick: tn(g, ["self"]),
1511
+ onKeydown: yn(g, ["esc"])
1512
+ }, [
1513
+ v("section", wr, [
1514
+ v("header", { class: "real-model-clarity__header" }, [
1515
+ L[0] || (L[0] = v("h2", { id: "real-model-clarity-title" }, "模型清晰度设置", -1)),
1516
+ v("button", {
1517
+ class: "real-model-clarity__close",
1518
+ type: "button",
1519
+ "aria-label": "关闭",
1520
+ onClick: g
1521
+ })
1522
+ ]),
1523
+ v("section", xr, [
1524
+ v("header", Rr, [
1525
+ v("div", null, [
1526
+ L[1] || (L[1] = v("span", null, "当前模型", -1)),
1527
+ v("strong", null, W(a.modelName || "当前模型"), 1)
1528
+ ]),
1529
+ v("div", {
1530
+ class: Fe(["real-model-clarity__recommend", q.value.tone])
1531
+ }, " 推荐 " + W(q.value.name) + " / SSE " + W($.value), 3)
1532
+ ]),
1533
+ v("div", Dr, [
1534
+ v("div", Nr, [
1535
+ L[2] || (L[2] = v("span", null, "当前清晰度", -1)),
1536
+ v("strong", {
1537
+ class: Fe(P.value.tone)
1538
+ }, W(P.value.name) + " / SSE " + W(a.currentSse), 3)
1539
+ ]),
1540
+ v("div", Pr, [
1541
+ L[3] || (L[3] = v("span", null, "加载状态", -1)),
1542
+ v("strong", null, W(Q.value), 1)
1543
+ ])
1544
+ ]),
1545
+ v("section", Ir, [
1546
+ v("div", Ar, [
1547
+ L[4] || (L[4] = v("span", null, "设置清晰度", -1)),
1548
+ v("strong", {
1549
+ class: Fe(I.value.tone)
1550
+ }, W(I.value.name) + " / SSE " + W(z.value), 3)
1551
+ ]),
1552
+ v("div", Or, [
1553
+ v("input", {
1554
+ class: "real-model-clarity__range",
1555
+ type: "range",
1556
+ value: z.value,
1557
+ min: a.min,
1558
+ max: a.max,
1559
+ step: "1",
1560
+ onInput: _
1561
+ }, null, 40, kr),
1562
+ v("div", Br, [
1563
+ (Z(!0), oe(nn, null, rn(D.value, (H) => (Z(), oe("span", {
1564
+ key: H.value,
1565
+ class: Fe(H.tone),
1566
+ style: _n(M(H.value))
1567
+ }, W(H.label), 7))), 128))
1568
+ ])
1569
+ ]),
1570
+ v("label", Fr, [
1571
+ L[5] || (L[5] = v("span", null, "SSE", -1)),
1572
+ v("input", {
1573
+ value: z.value,
1574
+ type: "number",
1575
+ min: a.min,
1576
+ max: a.max,
1577
+ step: "1",
1578
+ inputmode: "numeric",
1579
+ onInput: T,
1580
+ onBlur: E
1581
+ }, null, 40, $r),
1582
+ v("small", null, "范围 " + W(a.min) + " - " + W(a.max) + ",数值越小越清晰", 1)
1583
+ ])
1584
+ ]),
1585
+ v("section", Gr, [
1586
+ v("strong", {
1587
+ class: Fe(he.value.tone)
1588
+ }, W(he.value.title), 3),
1589
+ v("span", null, W(he.value.description), 1),
1590
+ v("small", null, W(I.value.description), 1)
1591
+ ])
1592
+ ]),
1593
+ v("footer", { class: "real-model-clarity__footer" }, [
1594
+ v("button", {
1595
+ class: "real-model-clarity__secondary",
1596
+ type: "button",
1597
+ onClick: U
1598
+ }, "恢复推荐"),
1599
+ v("div", { class: "real-model-clarity__actions" }, [
1600
+ v("button", {
1601
+ class: "real-model-clarity__ghost",
1602
+ type: "button",
1603
+ onClick: g
1604
+ }, "取消"),
1605
+ v("button", {
1606
+ class: "real-model-clarity__primary",
1607
+ type: "button",
1608
+ onClick: N
1609
+ }, "应用")
1610
+ ])
1611
+ ])
1612
+ ])
1613
+ ], 32)) : Te("", !0)
1614
+ ]));
1615
+ }
1616
+ }), sn = (a, l) => {
1617
+ const m = a.__vccOpts || a;
1618
+ for (const [y, B] of l)
1619
+ m[y] = B;
1620
+ return m;
1621
+ }, Vr = /* @__PURE__ */ sn(Ur, [["__scopeId", "data-v-6094e99f"]]), Hr = { class: "three-dimensional-map" }, Wr = ["id"], zr = { key: 0 }, qr = { class: "three-dimensional-map__current-actions" }, Kr = ["data-tooltip"], jr = ["disabled"], Yr = {
1622
+ key: 2,
1623
+ class: "three-dimensional-map__clarity-nudge"
1624
+ }, Qr = {
1625
+ key: 3,
1626
+ class: "three-dimensional-map__model-tip"
1627
+ }, Xr = {
1628
+ key: 4,
1629
+ class: "three-dimensional-map__model-tip is-pressure"
1630
+ }, Jr = {
1631
+ key: 5,
1632
+ class: "three-dimensional-map__debug-panel"
1633
+ }, Zr = {
1634
+ key: 0,
1635
+ class: "three-dimensional-map__status-error"
1636
+ }, ea = {
1637
+ key: 1,
1638
+ class: "three-dimensional-map__loader",
1639
+ role: "status",
1640
+ "aria-live": "polite"
1641
+ }, ta = 6, na = /* @__PURE__ */ zt({
1642
+ __name: "ThreeDimensionalMap",
1643
+ props: {
1644
+ configUrl: { default: Gn },
1645
+ mapKey: { default: "common-3d" },
1646
+ options: { default: () => ({}) },
1647
+ initialView: { type: [Object, Boolean], default: () => et },
1648
+ flyToInitialView: { type: Boolean, default: !0 },
1649
+ showRealModelLabels: { type: Boolean, default: !0 },
1650
+ preloadModels: { type: Boolean, default: !0 },
1651
+ modelGroups: {},
1652
+ modelItems: {},
1653
+ dataSource: {},
1654
+ resolveTilesetUrl: {},
1655
+ showBackButton: { type: Boolean, default: !0 },
1656
+ backButtonText: { default: "返回" },
1657
+ backFallbackUrl: { default: "/" },
1658
+ onBack: {}
1659
+ },
1660
+ setup(a) {
1661
+ const l = a, m = En(an, null), y = A(() => `mars3d-container-${l.mapKey}`), B = fe(!0), z = fe(""), I = fe({}), P = A(() => I.value.realModel ?? {}), $ = A(() => !!P.value.showPanel), q = A(() => {
1662
+ const o = f.cameraDebugInfo.value.modelModeText;
1663
+ return o != null && o.startsWith("模型总览模式") ? o : "";
1664
+ }), Q = A(() => {
1665
+ const o = f.cameraDebugInfo.value.pressureText;
1666
+ return !o || o === "-" || o.includes("保护中") ? "" : "当前加载压力偏高,系统会临时偏向流畅,稳定后再恢复细节。";
1667
+ }), ye = A(() => "加载压力保护"), he = A(() => {
1668
+ const o = f.cameraDebugInfo.value, c = [
1669
+ { label: "相机高度", value: o.heightText },
1670
+ { label: "经度", value: o.lngText },
1671
+ { label: "纬度", value: o.latText },
1672
+ { label: "俯仰角", value: o.pitchText },
1673
+ { label: "模型模式", value: o.modelModeText }
1674
+ ];
1675
+ return P.value.showTilesetStats === !0 && c.push(
1676
+ { label: "目标SSE", value: o.sseText },
1677
+ { label: "实际SSE", value: o.actualSseText },
1678
+ { label: "模型加载", value: o.tilesLoadingText }
1679
+ ), c;
1680
+ });
1681
+ let D = null, F = null, re = null;
1682
+ const le = fe([]), ie = fe([]), se = /* @__PURE__ */ new Map();
1683
+ let me = null, M = 0, b = null, _ = 0, T = null, E = !1, N = !1;
1684
+ function g() {
1685
+ return N || E;
1686
+ }
1687
+ const U = vr({
1688
+ getMap: () => D,
1689
+ getMars3d: () => F,
1690
+ getCurrentModelScreenSpaceError: () => f.getCurrentModelScreenSpaceError(),
1691
+ applyTilesetScreenSpaceError: (o, c) => f.applyTilesetScreenSpaceError(o, c),
1692
+ getModelLngLat: (o) => f.getRealModelLngLat(o),
1693
+ resolveTilesetUrl: l.resolveTilesetUrl
1694
+ }), f = Er({
1695
+ getMap: () => D,
1696
+ getMars3d: () => F,
1697
+ getCesium: () => re,
1698
+ getTreeData: () => ie.value,
1699
+ getManualModelIds: () => le.value,
1700
+ getLastPointerLngLat: () => g() && Date.now() - M <= 1200 ? me : null,
1701
+ getLastPointerWindowPosition: () => g() && Date.now() - _ <= 1200 ? b : null,
1702
+ shouldShowDebugDetails: () => !!P.value.showLabelIds,
1703
+ destroyModelResourcesExcept: (o) => U.destroyModelResourcesExcept(o),
1704
+ ensureMaterialModelLayer: (o) => U.ensureLayer(o).then((c) => (f.updateRealModelLayer(), f.updateRealModelDebugText(), c)),
1705
+ locateMaterialModel: (o) => {
1706
+ ke(o == null ? void 0 : o.id) || Xe({ ...o, modelType: (o == null ? void 0 : o.modelType) ?? "2" });
1707
+ },
1708
+ showMaterialModel: (o, c = !0) => {
1709
+ le.value = le.value.filter((te) => f.isSameModelId(te, o)), c && !le.value.some((te) => f.isSameModelId(te, o)) && le.value.push(o), U.destroyModelResourcesExcept([o]);
1710
+ const k = se.get(String(o)) || f.getThreeDimensionalModelItems().find((te) => f.isSameModelId(te.id, o));
1711
+ k && U.showModel(k);
1712
+ },
1713
+ hideMaterialModel: (o, c = !0) => {
1714
+ c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))), U.hideModel(o);
1715
+ },
1716
+ destroyMaterialModel: (o, c = !0) => {
1717
+ c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))), U.destroyModel(o);
1718
+ },
1719
+ isPoliceModelLeaf: () => !1
1720
+ }), L = A(() => f.currentModelName.value), H = A(() => f.currentModelId.value), K = fe(!1), ue = fe(null), Se = fe(""), Me = fe(!1), ce = fe(0), De = A(() => ue.value != null), nt = A(() => !!L.value || K.value || De.value), rt = A(() => nt.value && l.initialView !== !1), Ne = A(() => K.value ? "正在返回" : (De.value, "正在查看")), bt = A(() => K.value ? "回到模型总览" : De.value ? Se.value || L.value || "模型加载中" : L.value), at = A(() => K.value ? "正在回到模型总览" : De.value ? "模型加载中..." : ""), ot = A(() => !!L.value && !K.value && !De.value), ee = A(() => (ce.value, H.value, f.cameraDebugInfo.value.clarityText, f.cameraDebugInfo.value.sseText, f.getCurrentPrimaryModelScreenSpaceError())), lt = A(() => (ce.value, H.value, f.cameraDebugInfo.value.clarityText, f.cameraDebugInfo.value.sseText, f.getCurrentPrimaryModelRecommendedScreenSpaceError())), Ct = A(() => f.cameraDebugInfo.value.actualSseText), Ke = A(() => f.cameraDebugInfo.value.tilesLoadingText), ve = fe("");
1721
+ let $e = null, be = null, Ce = 0;
1722
+ function j(o) {
1723
+ return o <= 4 ? "is-high" : o <= 8 ? "is-recommended" : o <= 16 ? "is-balanced" : "is-fast";
1724
+ }
1725
+ function x(o) {
1726
+ return o <= 4 ? `极清 / SSE ${o}` : o <= 8 ? `高清 / SSE ${o}` : o <= 16 ? `均衡 / SSE ${o}` : `流畅 / SSE ${o}`;
1727
+ }
1728
+ const st = A(() => x(ee.value)), He = A(() => j(ee.value)), je = A(() => {
1729
+ const c = (Ke.value || "").match(/后台处理\s*(\d+)/);
1730
+ return c ? Number(c[1]) : 0;
1731
+ });
1732
+ function ke(o) {
1733
+ return o != null && H.value != null && f.isSameModelId(H.value, o);
1734
+ }
1735
+ function Ye(o, c) {
1736
+ return o >= 96 ? "当前模型数据量较大,推荐清晰度也可能加载慢;可临时调到均衡或流畅,画面稳定后再调高清晰度。" : o >= 48 ? "当前模型加载较慢,可先调到均衡提升加载速度;需要近景细节时再调回高清。" : c > 8 ? "当前偏流畅,近景不够清晰时可调到高清或极清。" : "系统已设置默认清晰度;不同模型大小不同,可按加载速度和近景效果微调。";
1737
+ }
1738
+ const Lt = A(() => [
1739
+ He.value,
1740
+ je.value >= 48 ? "is-loading" : ""
1741
+ ].filter(Boolean)), Qe = A(() => Ye(je.value, ee.value)), Ge = A(() => ve.value ? ve.value : "");
1742
+ function wt() {
1743
+ if (l.onBack) {
1744
+ l.onBack();
1745
+ return;
1746
+ }
1747
+ if (window.history.length > 1) {
1748
+ window.history.back();
1749
+ return;
1750
+ }
1751
+ window.location.href = l.backFallbackUrl;
1752
+ }
1753
+ function Pe() {
1754
+ const o = pt();
1755
+ if (!o) return;
1756
+ const c = o.radius ?? o.alt ?? et.radius ?? 3200;
1757
+ K.value = !0, Me.value = !1, f.switchToOverviewMode(), ht({
1758
+ ...o,
1759
+ radius: Math.max(c, 3200),
1760
+ pitch: o.pitch ?? -45,
1761
+ duration: 0.8
1762
+ }), window.setTimeout(() => {
1763
+ f.updateRealModelLayer(), f.updateRealModelDebugText(), K.value = !1;
1764
+ }, 900);
1765
+ }
1766
+ function Ie() {
1767
+ const o = Date.now();
1768
+ if (!(o - Ce < 250)) {
1769
+ Ce = o, _e(), ce.value += 1, Me.value = !0;
1770
+ try {
1771
+ f.updateActualTilesetDebugInfo(), f.updateRealModelDebugText(), ce.value += 1;
1772
+ } catch (c) {
1773
+ console.warn("[ThreeDimensionalMap] open clarity dialog debug refresh failed:", c);
1774
+ }
1775
+ }
1776
+ }
1777
+ function We(o) {
1778
+ _e(), f.setCurrentModelClarity(o), ce.value += 1;
1779
+ }
1780
+ function xt() {
1781
+ _e(), f.resetCurrentModelClarity(), ce.value += 1;
1782
+ }
1783
+ function Rt() {
1784
+ _e(), ve.value = `已为当前模型设置默认清晰度:${st.value}。模型较大时推荐档也可能加载慢,可点“清晰度”按效果调整。`, $e = window.setTimeout(() => {
1785
+ ve.value = "", $e = null;
1786
+ }, 5200);
1787
+ }
1788
+ function _e() {
1789
+ be && (window.clearTimeout(be), be = null), $e && (window.clearTimeout($e), $e = null), ve.value = "";
1790
+ }
1791
+ vt([H, L], ([o, c], [R]) => {
1792
+ ce.value += 1, !(!o || !c || K.value || f.isSameModelId(o, R)) && (be && window.clearTimeout(be), be = window.setTimeout(() => {
1793
+ be = null, f.isSameModelId(H.value, o) && ot.value && Rt();
1794
+ }, 600));
1795
+ });
1796
+ function Dt(o) {
1797
+ return o ? Array.isArray(o) ? o : o.list || [] : [];
1798
+ }
1799
+ function Nt(o) {
1800
+ return o.flatMap((c) => c.data || []);
1801
+ }
1802
+ function it(o) {
1803
+ return o.length ? [{ modelType: "2", modelTypeName: "3D模型", name: "3D模型", data: o }] : [];
1804
+ }
1805
+ async function ut() {
1806
+ var o;
1807
+ return l.modelGroups ? l.modelGroups : (o = l.dataSource) != null && o.getModelGroups ? l.dataSource.getModelGroups() : m ? m.getThreeDimensionalModels() : [];
1808
+ }
1809
+ async function ct(o = []) {
1810
+ var c;
1811
+ return l.modelItems ? l.modelItems : (c = l.dataSource) != null && c.getModelItems ? Dt(await l.dataSource.getModelItems()) : m ? (await m.getMaterialModels({ pageSize: 100, pageNo: 1, type: 2 })).list || [] : Nt(o);
1812
+ }
1813
+ function dt(o) {
1814
+ o.forEach((c) => {
1815
+ (c == null ? void 0 : c.id) != null && se.set(String(c.id), c);
1816
+ });
1817
+ }
1818
+ function Le(o, c) {
1819
+ const R = String(c.id ?? ""), k = String(c.file ?? ""), te = String(c.name ?? c.label ?? "");
1820
+ return o.find((ae) => !!(R && String(ae.id) === R || k && String(ae.file) === k || te && String(ae.name ?? ae.label ?? "") === te)) || null;
1821
+ }
1822
+ async function ze(o) {
1823
+ let c = se.get(String(o.id));
1824
+ if (!c && o.file && (c = o), !c) {
1825
+ const k = await ct();
1826
+ dt(k), f.setRealModelMaterialItems(
1827
+ k,
1828
+ f.collectThreeDimensionalModelNodes(ie.value)
1829
+ ), c = se.get(String(o.id)) || Le(k, o) || void 0;
1830
+ }
1831
+ if (c && o.id != null && String(c.id) !== String(o.id) && (c = { ...c, id: o.id }, se.set(String(o.id), c)), !c) {
1832
+ const k = U.getLayerById(o.id);
1833
+ return k ? { item: o, layer: k } : null;
1834
+ }
1835
+ const R = await U.ensureLayer(c);
1836
+ return R ? { item: c, layer: R } : null;
1837
+ }
1838
+ async function Xe(o) {
1839
+ var k, te, ae;
1840
+ const c = (o == null ? void 0 : o.id) ?? null;
1841
+ if (ke(c)) return;
1842
+ const R = String((o == null ? void 0 : o.name) || (o == null ? void 0 : o.label) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.fileName) || "模型");
1843
+ ue.value = c, Se.value = R;
1844
+ try {
1845
+ const we = await ze(o);
1846
+ if (!we) return;
1847
+ const { item: xe, layer: Ee } = we;
1848
+ if (ke(xe.id)) return;
1849
+ ue.value = xe.id, Se.value = String(xe.name || xe.label || xe.title || xe.fileName || R);
1850
+ const Be = f.getRealModelLngLat(xe);
1851
+ Be && (me = Be, M = Date.now());
1852
+ const Bt = xe.id;
1853
+ f.handleLocationModel(Bt), Ee.show = !0, (te = (k = D == null ? void 0 : D.scene) == null ? void 0 : k.requestRender) == null || te.call(k), f.updateRealModelLayer(), U.applyLocationFastTilesetOptions(Ee), U.scheduleRestoreLocationTilesetOptions(Ee), Be && F ? D == null || D.flyToPoint(new F.LngLatPoint(Be.lng, Be.lat), { radius: 700, pitch: -15, duration: 1.6 }) : (await U.waitForTilesetLayerReady(Ee, 600), (ae = Ee.flyTo) == null || ae.call(Ee, { radius: 700, pitch: -15 })), f.updateActualTilesetDebugInfo(), f.updateRealModelDebugText();
1854
+ } finally {
1855
+ ue.value = null, Se.value = "";
1856
+ }
1857
+ }
1858
+ function ft(o) {
1859
+ var k, te, ae, we;
1860
+ if (!D || !re || !(o != null && o.windowPosition)) return !1;
1861
+ b = { x: o.windowPosition.x, y: o.windowPosition.y }, _ = Date.now();
1862
+ const c = ((te = (k = D.scene) == null ? void 0 : k.pickPosition) == null ? void 0 : te.call(k, o.windowPosition)) || ((we = (ae = D.camera) == null ? void 0 : ae.pickEllipsoid) == null ? void 0 : we.call(ae, o.windowPosition, D.scene.globe.ellipsoid));
1863
+ if (!c) return !1;
1864
+ const R = re.Cartographic.fromCartesian(c);
1865
+ return me = {
1866
+ lng: re.Math.toDegrees(R.longitude),
1867
+ lat: re.Math.toDegrees(R.latitude)
1868
+ }, M = Date.now(), !0;
1869
+ }
1870
+ function Pt() {
1871
+ me = null, M = 0, b = null, _ = 0, T = null, E = !1, N = !1;
1872
+ }
1873
+ function gt(o) {
1874
+ var k, te, ae, we;
1875
+ const c = Number(((k = o == null ? void 0 : o.windowPosition) == null ? void 0 : k.x) ?? ((te = o == null ? void 0 : o.startPosition) == null ? void 0 : te.x)), R = Number(((ae = o == null ? void 0 : o.windowPosition) == null ? void 0 : ae.y) ?? ((we = o == null ? void 0 : o.startPosition) == null ? void 0 : we.y));
1876
+ return !Number.isFinite(c) || !Number.isFinite(R) ? null : { x: c, y: R };
1877
+ }
1878
+ function It(o) {
1879
+ if (!T) return;
1880
+ const c = gt(o);
1881
+ if (!c) return;
1882
+ Math.hypot(
1883
+ c.x - T.x,
1884
+ c.y - T.y
1885
+ ) >= ta && (E = !0);
1886
+ }
1887
+ function mt() {
1888
+ T = null, E = !1, N = !1;
1889
+ }
1890
+ function Mt() {
1891
+ const o = D == null ? void 0 : D.scene;
1892
+ o && (o.sun && (o.sun.show = !1), o.moon && (o.moon.show = !1), o.skyBox && (o.skyBox.show = !1), o.skyAtmosphere && (o.skyAtmosphere.show = !1), o.globe && (o.globe.enableLighting = !1, o.globe.showGroundAtmosphere = !1));
1893
+ }
1894
+ function At(o) {
1895
+ var R;
1896
+ const c = String((o == null ? void 0 : o.message) || ((R = o == null ? void 0 : o.error) == null ? void 0 : R.message) || (o == null ? void 0 : o.error) || o || "").toLowerCase();
1897
+ return !c || c.includes("fragment shader") || c.includes("vertex shader") || c.includes("shader failed to compile") ? !1 : c.includes("out of memory") || c.includes("context lost") || c.includes("webgl context") || c.includes("too many active webgl contexts");
1898
+ }
1899
+ function Ot() {
1900
+ !D || !F || (D.on(F.EventType.leftDown, (o) => {
1901
+ T = gt(o), E = !1;
1902
+ }), D.on(F.EventType.cameraMoveEnd, () => {
1903
+ mt(), f.updateCameraDebugInfo(!0), f.updateRealModelLayer();
1904
+ }), D.on(F.EventType.leftUp || "leftUp", () => {
1905
+ mt();
1906
+ }), D.on(F.EventType.click, (o) => {
1907
+ N = !0, ft(o) && f.updateRealModelLayer(), N = !1;
1908
+ }), D.on(F.EventType.mouseMove, (o) => {
1909
+ It(o), ft(o) && E && f.updateCameraDebugInfo();
1910
+ }), D.on(F.EventType.renderError, (o) => {
1911
+ var R, k;
1912
+ const c = f.collectRenderErrorDebugInfo(o);
1913
+ console.error("[ThreeDimensionalMap] renderError:", c, o), Mt(), At(o) && f.releaseAutoVisibleModels(), (k = (R = D == null ? void 0 : D.scene) == null ? void 0 : R.requestRender) == null || k.call(R);
1914
+ }));
1915
+ }
1916
+ function pt() {
1917
+ return l.initialView === !1 ? null : l.initialView;
1918
+ }
1919
+ function ht(o) {
1920
+ !D || !F || o.lng === 0 || o.lat === 0 || D.flyToPoint(new F.LngLatPoint(o.lng, o.lat), {
1921
+ radius: o.radius ?? o.alt ?? et.radius,
1922
+ pitch: o.pitch ?? et.pitch,
1923
+ heading: o.heading,
1924
+ duration: o.duration ?? et.duration
1925
+ });
1926
+ }
1927
+ async function St() {
1928
+ if (!l.showRealModelLabels) return;
1929
+ const o = await ut(), c = await ct(o), R = o.length ? o : it(c);
1930
+ ie.value = zn(R), dt(c), f.setRealModelMaterialItems(
1931
+ c,
1932
+ f.collectThreeDimensionalModelNodes(ie.value)
1933
+ ), l.preloadModels && await U.preloadModels(c), f.setRealModelLabelsVisible(!0), f.updateRealModelLayer(), f.updateRealModelDebugText();
1934
+ }
1935
+ async function kt() {
1936
+ B.value = !0, z.value = "";
1937
+ try {
1938
+ const o = await Lr();
1939
+ F = o.mars3d, re = o.Cesium;
1940
+ const c = pt(), R = await Wn({
1941
+ mars3d: F,
1942
+ configUrl: l.configUrl,
1943
+ center: c ? Hn(c) : void 0,
1944
+ options: l.options
1945
+ });
1946
+ I.value = R.debug ?? {}, D = new F.Map(y.value, {
1947
+ ...R,
1948
+ minZoom: 5
1949
+ }), In(D) || (D.hasTerrain = !0), D.viewer.sceneModePicker && (D.viewer.sceneModePicker.viewModel.duration = 0), Mt(), Ot(), c && l.flyToInitialView && (await Ln(), ht(c)), await St();
1950
+ } catch (o) {
1951
+ z.value = o instanceof Error ? o.message : "三维地图初始化失败";
1952
+ } finally {
1953
+ B.value = !1;
1954
+ }
1955
+ }
1956
+ return Tn(() => {
1957
+ kt();
1958
+ }), vt(
1959
+ () => [l.modelGroups, l.modelItems, l.dataSource],
1960
+ () => {
1961
+ !D || B.value || St();
1962
+ }
1963
+ ), vn(() => {
1964
+ _e(), f.reset(), U.dispose(), Pt(), D && (D.destroy(), D = null), F = null, re = null;
1965
+ }), (o, c) => (Z(), oe("section", Hr, [
1966
+ v("div", {
1967
+ id: y.value,
1968
+ class: "three-dimensional-map__container"
1969
+ }, null, 8, Wr),
1970
+ a.showBackButton ? (Z(), oe("button", {
1971
+ key: 0,
1972
+ class: "three-dimensional-map__back",
1973
+ type: "button",
1974
+ onClick: wt
1975
+ }, [
1976
+ c[1] || (c[1] = v("span", {
1977
+ class: "three-dimensional-map__back-icon",
1978
+ "aria-hidden": "true"
1979
+ }, null, -1)),
1980
+ v("span", null, W(a.backButtonText), 1)
1981
+ ])) : Te("", !0),
1982
+ nt.value ? (Z(), oe("div", {
1983
+ key: 1,
1984
+ class: Fe(["three-dimensional-map__current-model", { "is-busy": K.value || De.value }])
1985
+ }, [
1986
+ v("span", null, W(Ne.value), 1),
1987
+ v("strong", null, W(bt.value), 1),
1988
+ at.value ? (Z(), oe("small", zr, W(at.value), 1)) : Te("", !0),
1989
+ v("div", qr, [
1990
+ ot.value ? (Z(), oe("button", {
1991
+ key: 0,
1992
+ class: Fe(["three-dimensional-map__clarity-action", Lt.value]),
1993
+ type: "button",
1994
+ "data-tooltip": Qe.value,
1995
+ onClick: tn(Ie, ["stop"])
1996
+ }, [
1997
+ c[2] || (c[2] = v("span", null, "清晰度", -1)),
1998
+ v("strong", null, W(st.value), 1)
1999
+ ], 10, Kr)) : Te("", !0),
2000
+ rt.value ? (Z(), oe("button", {
2001
+ key: 1,
2002
+ class: "three-dimensional-map__overview",
2003
+ type: "button",
2004
+ disabled: K.value || De.value,
2005
+ "data-tooltip": "回到模型总览,点击其他模型标签继续查看",
2006
+ onClick: Pe
2007
+ }, [
2008
+ c[3] || (c[3] = v("span", {
2009
+ class: "three-dimensional-map__switch-icon",
2010
+ "aria-hidden": "true"
2011
+ }, null, -1)),
2012
+ v("span", null, W(K.value ? "返回中" : "回到总览"), 1)
2013
+ ], 8, jr)) : Te("", !0)
2014
+ ])
2015
+ ], 2)) : Te("", !0),
2016
+ c[6] || (c[6] = v("div", {
2017
+ class: "three-dimensional-map__legend",
2018
+ "aria-label": "模型状态图例"
2019
+ }, [
2020
+ v("span", null, [
2021
+ v("i", { class: "is-available" }),
2022
+ Ut("可查看模型")
2023
+ ]),
2024
+ v("span", null, [
2025
+ v("i", { class: "is-loaded" }),
2026
+ Ut("已加载模型")
2027
+ ]),
2028
+ v("span", null, [
2029
+ v("i", { class: "is-hover" }),
2030
+ Ut("鼠标悬停")
2031
+ ])
2032
+ ], -1)),
2033
+ Ge.value ? (Z(), oe("div", Yr, W(Ge.value), 1)) : Te("", !0),
2034
+ bn(Vr, {
2035
+ modelValue: Me.value,
2036
+ "onUpdate:modelValue": c[0] || (c[0] = (R) => Me.value = R),
2037
+ "model-name": L.value,
2038
+ "current-sse": ee.value,
2039
+ "actual-sse": Ct.value,
2040
+ "tiles-loading": Ke.value,
2041
+ recommended: lt.value,
2042
+ onApply: We,
2043
+ onReset: xt
2044
+ }, null, 8, ["modelValue", "model-name", "current-sse", "actual-sse", "tiles-loading", "recommended"]),
2045
+ q.value ? (Z(), oe("div", Qr, [
2046
+ c[4] || (c[4] = v("strong", null, "模型总览模式", -1)),
2047
+ v("span", null, W(q.value), 1)
2048
+ ])) : Te("", !0),
2049
+ Q.value ? (Z(), oe("div", Xr, [
2050
+ v("strong", null, W(ye.value), 1),
2051
+ v("span", null, W(Q.value), 1)
2052
+ ])) : Te("", !0),
2053
+ $.value ? (Z(), oe("div", Jr, [
2054
+ (Z(!0), oe(nn, null, rn(he.value, (R) => (Z(), oe("div", {
2055
+ key: R.label,
2056
+ class: "three-dimensional-map__debug-row"
2057
+ }, [
2058
+ v("span", null, W(R.label), 1),
2059
+ v("strong", null, W(R.value), 1)
2060
+ ]))), 128))
2061
+ ])) : Te("", !0),
2062
+ B.value || z.value ? (Z(), oe("div", {
2063
+ key: 6,
2064
+ class: Fe(["three-dimensional-map__status", { "is-error": !!z.value }])
2065
+ }, [
2066
+ z.value ? (Z(), oe("span", Zr, W(z.value), 1)) : (Z(), oe("div", ea, [...c[5] || (c[5] = [
2067
+ Cn('<div class="three-dimensional-map__loader-orbit" aria-hidden="true" data-v-38a250d2><span class="three-dimensional-map__loader-core" data-v-38a250d2></span><span class="three-dimensional-map__loader-ring is-inner" data-v-38a250d2></span><span class="three-dimensional-map__loader-ring is-outer" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-a" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-b" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-c" data-v-38a250d2></span></div><div class="three-dimensional-map__loader-copy" data-v-38a250d2><strong data-v-38a250d2>三维地形引擎启动中</strong><span data-v-38a250d2>同步影像图层 / 实景模型 / 空间索引</span></div><div class="three-dimensional-map__loader-progress" aria-hidden="true" data-v-38a250d2><span data-v-38a250d2></span></div>', 3)
2068
+ ])]))
2069
+ ], 2)) : Te("", !0)
2070
+ ]));
2071
+ }
2072
+ }), ra = /* @__PURE__ */ sn(na, [["__scopeId", "data-v-38a250d2"]]), ia = /* @__PURE__ */ zt({
2073
+ __name: "ThreeDimensionalMapPage",
2074
+ setup(a) {
2075
+ return (l, m) => (Z(), en(ra));
2076
+ }
2077
+ });
2078
+ function ua(a) {
2079
+ return {
2080
+ async getThreeDimensionalModels() {
2081
+ return (await a.get("/material/threedList")).data ?? [];
2082
+ },
2083
+ async getMaterialModels(l) {
2084
+ return (await a.get("/material/page", { params: l })).data ?? {};
2085
+ }
2086
+ };
2087
+ }
2088
+ function ca(a) {
2089
+ const l = a == null ? void 0 : a.viewer;
2090
+ l && (l.useDefaultRenderLoop = !1);
2091
+ }
2092
+ function da(a) {
2093
+ var m, y, B;
2094
+ const l = a == null ? void 0 : a.viewer;
2095
+ l && (l.useDefaultRenderLoop = !0, (m = l.resize) == null || m.call(l), (B = (y = l.scene) == null ? void 0 : y.requestRender) == null || B.call(y));
2096
+ }
2097
+ export {
2098
+ ln as DEFAULT_MAP3D_CENTER,
2099
+ Gn as DEFAULT_MAP3D_CONFIG_URL,
2100
+ et as DEFAULT_MAP3D_INITIAL_VIEW,
2101
+ Fn as MAP3D_DEFAULT_CONFIG_PATH,
2102
+ ra as ThreeDimensionalMap,
2103
+ ia as ThreeDimensionalMapPage,
2104
+ la as clearMap3dConfigCache,
2105
+ Wn as createMap3dOptions,
2106
+ ua as createMapApi,
2107
+ Vn as fetchMap3dConfig,
2108
+ zn as formatMaterialModelTree,
2109
+ Hn as initialViewToCenter,
2110
+ sa as isThreeDimensionalModel,
2111
+ oa as provideMapApi,
2112
+ $n as resolveMap3dPublicUrl,
2113
+ qn as resolveTilesetUrl,
2114
+ da as resumeMars3dMap,
2115
+ ca as suspendMars3dMap
2116
+ };