leiting-bim 2.1.50 → 2.1.52

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 (411) hide show
  1. package/leiting-bim.es.js +25503 -1
  2. package/package.json +1 -1
  3. package/plugins/cesium-core/dist/cesium-core.mjs +587 -535
  4. package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -0
  5. package/plugins/cesium-core/dist/cesium-core.umd.js +19 -18
  6. package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -0
  7. package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +76 -73
  8. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js +1 -0
  9. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  10. package/plugins/cesium-vue/dist/components/basic-audio.js +3 -2
  11. package/plugins/cesium-vue/dist/components/basic-audio.js.map +1 -0
  12. package/plugins/cesium-vue/dist/components/basic-video.js +3 -2
  13. package/plugins/cesium-vue/dist/components/basic-video.js.map +1 -0
  14. package/plugins/cesium-vue/dist/components/card-carousel.js +2 -1
  15. package/plugins/cesium-vue/dist/components/card-carousel.js.map +1 -0
  16. package/plugins/cesium-vue/dist/components/card-content.js +13 -12
  17. package/plugins/cesium-vue/dist/components/card-content.js.map +1 -0
  18. package/plugins/cesium-vue/dist/components/card-page.js +2 -1
  19. package/plugins/cesium-vue/dist/components/card-page.js.map +1 -0
  20. package/plugins/cesium-vue/dist/components/carousel-img.js +6 -5
  21. package/plugins/cesium-vue/dist/components/carousel-img.js.map +1 -0
  22. package/plugins/cesium-vue/dist/components/echarts-pro.js +2 -1
  23. package/plugins/cesium-vue/dist/components/echarts-pro.js.map +1 -0
  24. package/plugins/cesium-vue/dist/components/marker-bubble.js +5 -4
  25. package/plugins/cesium-vue/dist/components/marker-bubble.js.map +1 -0
  26. package/plugins/cesium-vue/dist/components/marker-default.js +6 -5
  27. package/plugins/cesium-vue/dist/components/marker-default.js.map +1 -0
  28. package/plugins/cesium-vue/dist/components/marker-html.js +6 -5
  29. package/plugins/cesium-vue/dist/components/marker-html.js.map +1 -0
  30. package/plugins/cesium-vue/dist/components/marker-manage.js +112 -94
  31. package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -0
  32. package/plugins/cesium-vue/dist/components/marker-text.js +6 -5
  33. package/plugins/cesium-vue/dist/components/marker-text.js.map +1 -0
  34. package/plugins/cesium-vue/dist/components/measurement.js +4 -3
  35. package/plugins/cesium-vue/dist/components/measurement.js.map +1 -0
  36. package/plugins/cesium-vue/dist/components/position-picker/index.d.ts +58 -0
  37. package/plugins/cesium-vue/dist/components/position-picker.d.ts +6 -0
  38. package/plugins/cesium-vue/dist/components/position-picker.js +243 -0
  39. package/plugins/cesium-vue/dist/components/position-picker.js.map +1 -0
  40. package/plugins/cesium-vue/dist/create-DynflqE1.js +1 -0
  41. package/plugins/cesium-vue/dist/create-DynflqE1.js.map +1 -0
  42. package/plugins/cesium-vue/dist/{index-B03tSn8_.js → index-C0pspk3x.js} +3 -2
  43. package/plugins/cesium-vue/dist/index-C0pspk3x.js.map +1 -0
  44. package/plugins/cesium-vue/dist/index-CUs_hd1V.js +1 -0
  45. package/plugins/cesium-vue/dist/index-CUs_hd1V.js.map +1 -0
  46. package/plugins/cesium-vue/dist/index.d.ts +3 -1
  47. package/plugins/cesium-vue/dist/index.js +31 -27
  48. package/plugins/cesium-vue/dist/index.js.map +1 -0
  49. package/plugins/cesium-vue/package.json +4 -0
  50. package/plugins/theme-chalk/dist/debug.log +1 -0
  51. package/plugins/.gitmodules +0 -4
  52. package/plugins/README.md +0 -2
  53. package/plugins/build.cjs +0 -63
  54. package/plugins/cesium-core/pnpm-lock.yaml +0 -872
  55. package/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  56. package/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  57. package/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  58. package/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  59. package/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  60. package/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  61. package/plugins/cesium-core/src/components/Material/index.ts +0 -3
  62. package/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  63. package/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  64. package/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  65. package/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  66. package/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  67. package/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  68. package/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  69. package/plugins/cesium-core/src/components/draw/types.ts +0 -28
  70. package/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  71. package/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  72. package/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  73. package/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  74. package/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -552
  75. package/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -289
  76. package/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  77. package/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -427
  78. package/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -356
  79. package/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -516
  80. package/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -472
  81. package/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -250
  82. package/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  83. package/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -561
  84. package/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -361
  85. package/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  86. package/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  87. package/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  88. package/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  89. package/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  90. package/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  91. package/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  92. package/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  93. package/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  94. package/plugins/cesium-core/src/index.ts +0 -17
  95. package/plugins/cesium-core/src/test/measurement/index.html +0 -166
  96. package/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  97. package/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  98. package/plugins/cesium-core/src/test/roaming/index.html +0 -51
  99. package/plugins/cesium-core/src/test/roaming/path.html +0 -448
  100. package/plugins/cesium-core/src/test/roaming/view.html +0 -520
  101. package/plugins/cesium-core/stats.html +0 -4949
  102. package/plugins/cesium-core/tsconfig.json +0 -14
  103. package/plugins/cesium-core/vite.config.ts +0 -35
  104. package/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  105. package/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  106. package/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  107. package/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  108. package/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  109. package/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  110. package/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  111. package/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  112. package/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  113. package/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  114. package/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  115. package/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  116. package/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  117. package/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  118. package/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -6
  119. package/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -119
  120. package/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  121. package/plugins/cesium-vue/src/components/basic-video/index.ts +0 -7
  122. package/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -58
  123. package/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -14
  124. package/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -7
  125. package/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  126. package/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  127. package/plugins/cesium-vue/src/components/card-content/index.ts +0 -7
  128. package/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  129. package/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  130. package/plugins/cesium-vue/src/components/card-page/index.ts +0 -7
  131. package/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  132. package/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  133. package/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -7
  134. package/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -84
  135. package/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -8
  136. package/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -7
  137. package/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  138. package/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  139. package/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  140. package/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -7
  141. package/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  142. package/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  143. package/plugins/cesium-vue/src/components/marker-default/index.ts +0 -7
  144. package/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  145. package/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  146. package/plugins/cesium-vue/src/components/marker-html/index.ts +0 -7
  147. package/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  148. package/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  149. package/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -9
  150. package/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  151. package/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  152. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  153. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  154. package/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  155. package/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  156. package/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  157. package/plugins/cesium-vue/src/components/marker-text/index.ts +0 -7
  158. package/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  159. package/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  160. package/plugins/cesium-vue/src/components/measurement/index.ts +0 -7
  161. package/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  162. package/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  163. package/plugins/cesium-vue/src/index.ts +0 -89
  164. package/plugins/cesium-vue/stats.html +0 -4949
  165. package/plugins/cesium-vue/tsconfig.json +0 -18
  166. package/plugins/cesium-vue/vite.config.ts +0 -62
  167. package/plugins/plugins/README.md +0 -2
  168. package/plugins/plugins/build.cjs +0 -63
  169. package/plugins/plugins/cesium-core/dist/cesium-core.mjs +0 -5881
  170. package/plugins/plugins/cesium-core/dist/cesium-core.mjs.map +0 -1
  171. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js +0 -77
  172. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js.map +0 -1
  173. package/plugins/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +0 -73
  174. package/plugins/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +0 -152
  175. package/plugins/plugins/cesium-core/dist/components/MarkerEvent.d.ts +0 -38
  176. package/plugins/plugins/cesium-core/dist/components/Material/MaterialManager.d.ts +0 -49
  177. package/plugins/plugins/cesium-core/dist/components/Material/help/PolylineFlowMaterialProperty.d.ts +0 -10
  178. package/plugins/plugins/cesium-core/dist/components/Material/help/dynamicImgMaterial.d.ts +0 -16
  179. package/plugins/plugins/cesium-core/dist/components/Material/index.d.ts +0 -3
  180. package/plugins/plugins/cesium-core/dist/components/TooltipManager.d.ts +0 -11
  181. package/plugins/plugins/cesium-core/dist/components/draw/DrawTool.d.ts +0 -10
  182. package/plugins/plugins/cesium-core/dist/components/draw/handlers/CircleDrawer.d.ts +0 -16
  183. package/plugins/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +0 -14
  184. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PointDrawer.d.ts +0 -12
  185. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +0 -14
  186. package/plugins/plugins/cesium-core/dist/components/draw/handlers/RectangleDrawer.d.ts +0 -13
  187. package/plugins/plugins/cesium-core/dist/components/draw/types.d.ts +0 -29
  188. package/plugins/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +0 -65
  189. package/plugins/plugins/cesium-core/dist/components/gltf/GLTFManage.d.ts +0 -141
  190. package/plugins/plugins/cesium-core/dist/components/gltf/index.d.ts +0 -1
  191. package/plugins/plugins/cesium-core/dist/components/measurement/MeasurementTool.d.ts +0 -34
  192. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/AreaMeasure.d.ts +0 -23
  193. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CircleMeasure.d.ts +0 -21
  194. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CoordinateMeasure.d.ts +0 -16
  195. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/HorizontalMeasure.d.ts +0 -25
  196. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/PolylineDistanceMeasure.d.ts +0 -24
  197. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RectangleMeasure.d.ts +0 -22
  198. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RegularPolygonMeasure.d.ts +0 -23
  199. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/SpaceMeasure.d.ts +0 -20
  200. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TerrainHeightMeasure.d.ts +0 -18
  201. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TriangleMeasure.d.ts +0 -24
  202. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/VerticalMeasure.d.ts +0 -23
  203. package/plugins/plugins/cesium-core/dist/components/measurement/index.d.ts +0 -13
  204. package/plugins/plugins/cesium-core/dist/components/measurement/types.d.ts +0 -42
  205. package/plugins/plugins/cesium-core/dist/components/primitive/PrimitiveManager.d.ts +0 -50
  206. package/plugins/plugins/cesium-core/dist/components/roaming/CameraRoamTool.d.ts +0 -27
  207. package/plugins/plugins/cesium-core/dist/components/roaming/PathRoamTool.d.ts +0 -23
  208. package/plugins/plugins/cesium-core/dist/components/roaming/index.d.ts +0 -3
  209. package/plugins/plugins/cesium-core/dist/components/roaming/types.d.ts +0 -66
  210. package/plugins/plugins/cesium-core/dist/components/utils/convertGeoJsonToEntityData.d.ts +0 -1
  211. package/plugins/plugins/cesium-core/dist/components/utils/uuid.d.ts +0 -1
  212. package/plugins/plugins/cesium-core/dist/index.d.ts +0 -12
  213. package/plugins/plugins/cesium-core/package.json +0 -26
  214. package/plugins/plugins/cesium-core/pnpm-lock.yaml +0 -872
  215. package/plugins/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  216. package/plugins/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  217. package/plugins/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  218. package/plugins/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  219. package/plugins/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  220. package/plugins/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  221. package/plugins/plugins/cesium-core/src/components/Material/index.ts +0 -3
  222. package/plugins/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  223. package/plugins/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  224. package/plugins/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  225. package/plugins/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  226. package/plugins/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  227. package/plugins/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  228. package/plugins/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  229. package/plugins/plugins/cesium-core/src/components/draw/types.ts +0 -28
  230. package/plugins/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  231. package/plugins/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  232. package/plugins/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  233. package/plugins/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  234. package/plugins/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -451
  235. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -267
  236. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  237. package/plugins/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -418
  238. package/plugins/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -352
  239. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -388
  240. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -379
  241. package/plugins/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -246
  242. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  243. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -541
  244. package/plugins/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -360
  245. package/plugins/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  246. package/plugins/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  247. package/plugins/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  248. package/plugins/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  249. package/plugins/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  250. package/plugins/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  251. package/plugins/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  252. package/plugins/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  253. package/plugins/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  254. package/plugins/plugins/cesium-core/src/index.ts +0 -17
  255. package/plugins/plugins/cesium-core/src/test/measurement/index.html +0 -166
  256. package/plugins/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  257. package/plugins/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  258. package/plugins/plugins/cesium-core/src/test/roaming/index.html +0 -51
  259. package/plugins/plugins/cesium-core/src/test/roaming/path.html +0 -448
  260. package/plugins/plugins/cesium-core/src/test/roaming/view.html +0 -520
  261. package/plugins/plugins/cesium-core/stats.html +0 -4949
  262. package/plugins/plugins/cesium-core/tsconfig.json +0 -14
  263. package/plugins/plugins/cesium-core/vite.config.ts +0 -35
  264. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +0 -18
  265. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts.map +0 -1
  266. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts +0 -92
  267. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts.map +0 -1
  268. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts +0 -82
  269. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts.map +0 -1
  270. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +0 -152
  271. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts.map +0 -1
  272. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts +0 -21
  273. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts.map +0 -1
  274. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts +0 -69
  275. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts.map +0 -1
  276. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +0 -21
  277. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts.map +0 -1
  278. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +0 -68
  279. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts.map +0 -1
  280. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +0 -78
  281. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts.map +0 -1
  282. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts +0 -48
  283. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts.map +0 -1
  284. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts +0 -48
  285. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts.map +0 -1
  286. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +0 -164
  287. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts.map +0 -1
  288. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts +0 -30
  289. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts.map +0 -1
  290. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts +0 -78
  291. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts.map +0 -1
  292. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts +0 -82
  293. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts.map +0 -1
  294. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts +0 -67
  295. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts.map +0 -1
  296. package/plugins/plugins/cesium-vue/dist/index.css +0 -1
  297. package/plugins/plugins/cesium-vue/dist/index.d.ts +0 -30
  298. package/plugins/plugins/cesium-vue/dist/index.d.ts.map +0 -1
  299. package/plugins/plugins/cesium-vue/dist/index.js +0 -10087
  300. package/plugins/plugins/cesium-vue/dist/index.js.map +0 -1
  301. package/plugins/plugins/cesium-vue/dist/index.umd.cjs +0 -46
  302. package/plugins/plugins/cesium-vue/dist/index.umd.cjs.map +0 -1
  303. package/plugins/plugins/cesium-vue/package.json +0 -48
  304. package/plugins/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  305. package/plugins/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  306. package/plugins/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  307. package/plugins/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  308. package/plugins/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  309. package/plugins/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  310. package/plugins/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  311. package/plugins/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  312. package/plugins/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  313. package/plugins/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  314. package/plugins/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  315. package/plugins/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  316. package/plugins/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  317. package/plugins/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  318. package/plugins/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -11
  319. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -110
  320. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  321. package/plugins/plugins/cesium-vue/src/components/basic-video/index.ts +0 -12
  322. package/plugins/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -99
  323. package/plugins/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -13
  324. package/plugins/plugins/cesium-vue/src/components/camera-roam/index.ts +0 -4
  325. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/CameraRoam.vue +0 -434
  326. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/cameraRoam.ts +0 -28
  327. package/plugins/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -12
  328. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  329. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  330. package/plugins/plugins/cesium-vue/src/components/card-content/index.ts +0 -12
  331. package/plugins/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  332. package/plugins/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  333. package/plugins/plugins/cesium-vue/src/components/card-page/index.ts +0 -12
  334. package/plugins/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  335. package/plugins/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  336. package/plugins/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -12
  337. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -15
  338. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -6
  339. package/plugins/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -12
  340. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  341. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  342. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  343. package/plugins/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -12
  344. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  345. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  346. package/plugins/plugins/cesium-vue/src/components/marker-default/index.ts +0 -12
  347. package/plugins/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  348. package/plugins/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  349. package/plugins/plugins/cesium-vue/src/components/marker-html/index.ts +0 -12
  350. package/plugins/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  351. package/plugins/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  352. package/plugins/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -14
  353. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  354. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  355. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  356. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  357. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  358. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  359. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  360. package/plugins/plugins/cesium-vue/src/components/marker-text/index.ts +0 -12
  361. package/plugins/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  362. package/plugins/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  363. package/plugins/plugins/cesium-vue/src/components/measurement/index.ts +0 -12
  364. package/plugins/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  365. package/plugins/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  366. package/plugins/plugins/cesium-vue/src/components/path-roam/index.ts +0 -4
  367. package/plugins/plugins/cesium-vue/src/components/path-roam/src/PathRoam.vue +0 -429
  368. package/plugins/plugins/cesium-vue/src/components/path-roam/src/pathRoam.ts +0 -28
  369. package/plugins/plugins/cesium-vue/src/components/test/CardMarker.vue +0 -150
  370. package/plugins/plugins/cesium-vue/src/components/test/CesiumMarker.vue +0 -34
  371. package/plugins/plugins/cesium-vue/src/components/test/CesiumViewer.vue +0 -77
  372. package/plugins/plugins/cesium-vue/src/components/test/MyLabel.vue +0 -25
  373. package/plugins/plugins/cesium-vue/src/components/test/index.ts +0 -28
  374. package/plugins/plugins/cesium-vue/src/index.ts +0 -83
  375. package/plugins/plugins/cesium-vue/stats.html +0 -4949
  376. package/plugins/plugins/cesium-vue/tsconfig.json +0 -18
  377. package/plugins/plugins/cesium-vue/vite.config.ts +0 -56
  378. package/plugins/plugins/theme-chalk/dist/theme-chalk.css +0 -819
  379. package/plugins/plugins/theme-chalk/index.less +0 -11
  380. package/plugins/plugins/theme-chalk/package.json +0 -27
  381. package/plugins/plugins/theme-chalk/src/basicAudio.less +0 -41
  382. package/plugins/plugins/theme-chalk/src/basicVideo.less +0 -17
  383. package/plugins/plugins/theme-chalk/src/cameraRoam.less +0 -239
  384. package/plugins/plugins/theme-chalk/src/cardCarousel.less +0 -71
  385. package/plugins/plugins/theme-chalk/src/cardContent.less +0 -73
  386. package/plugins/plugins/theme-chalk/src/cardPage.less +0 -61
  387. package/plugins/plugins/theme-chalk/src/carouselImg.less +0 -34
  388. package/plugins/plugins/theme-chalk/src/marker.less +0 -107
  389. package/plugins/plugins/theme-chalk/src/markerManage.less +0 -25
  390. package/plugins/plugins/theme-chalk/src/measurement.less +0 -106
  391. package/plugins/plugins/theme-chalk/src/mixins/config.less +0 -4
  392. package/plugins/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  393. package/plugins/plugins/theme-chalk/src/pathRoam.less +0 -198
  394. package/plugins/plugins/utils/create.ts +0 -45
  395. package/plugins/plugins/utils/package.json +0 -12
  396. package/plugins/plugins/utils/uuid.ts +0 -43
  397. package/plugins/plugins/utils/with-install.ts +0 -10
  398. package/plugins/theme-chalk/index.less +0 -11
  399. package/plugins/theme-chalk/src/basicAudio.less +0 -44
  400. package/plugins/theme-chalk/src/basicVideo.less +0 -17
  401. package/plugins/theme-chalk/src/cameraRoam.less +0 -239
  402. package/plugins/theme-chalk/src/cardCarousel.less +0 -71
  403. package/plugins/theme-chalk/src/cardContent.less +0 -73
  404. package/plugins/theme-chalk/src/cardPage.less +0 -61
  405. package/plugins/theme-chalk/src/carouselImg.less +0 -66
  406. package/plugins/theme-chalk/src/marker.less +0 -107
  407. package/plugins/theme-chalk/src/markerManage.less +0 -25
  408. package/plugins/theme-chalk/src/measurement.less +0 -106
  409. package/plugins/theme-chalk/src/mixins/config.less +0 -4
  410. package/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  411. package/plugins/theme-chalk/src/pathRoam.less +0 -198
@@ -26,9 +26,21 @@ class Lr {
26
26
  h(this, "_updateDelay", 100);
27
27
  h(this, "_tilesRetryCount", 0);
28
28
  h(this, "_tilesRetryMax", 100);
29
+ h(this, "_cameraDirty", !1);
30
+ h(this, "_tileLoadListener", null);
31
+ h(this, "_cameraChangedHandler", null);
29
32
  this.Cesium = t, this.viewer = e, this.labelPool = i.labelPool, this.threshold = i.threshold ?? 10, this.displayLimit = i.displayLimit ?? 100, this.maxLevel = i.maxLevel ?? 5, this.debugCurrentGrids = i.debugCurrentGrids ?? !1, this.clusterTheme = i.clusterTheme ?? "cluster-label", this.pointTheme = i.pointTheme ?? "point-label", this.centralPointMode = i.centralPointMode ?? "central", this.minGlobalPointCount = i.minGlobalPointCount ?? 0, this.groupByTheme = i.groupByTheme ?? !1;
30
33
  const r = this.viewer.scene && this.viewer.scene.globe, s = r && r._surface, o = s && s._tileProvider;
31
- this.tilingScheme = (o == null ? void 0 : o.tilingScheme) || new this.Cesium.GeographicTilingScheme(), this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.viewer.camera.changed.addEventListener(this._updateFn);
34
+ this.tilingScheme = (o == null ? void 0 : o.tilingScheme) || new this.Cesium.GeographicTilingScheme(), this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), r && (this._tileLoadListener = (n) => {
35
+ n === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
36
+ }, r.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
37
+ const n = this.viewer.scene, l = n && n.globe;
38
+ if (!l) {
39
+ this._scheduleUpdate();
40
+ return;
41
+ }
42
+ this._cameraDirty = !0, l.tilesLoaded && (this._cameraDirty = !1, this._scheduleUpdate());
43
+ }, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
32
44
  }
33
45
  setGroupByTheme(t, e = !0, i = !0) {
34
46
  if (this.groupByTheme === t) {
@@ -158,112 +170,149 @@ class Lr {
158
170
  }
159
171
  }
160
172
  _update() {
173
+ var r, s, o, n;
161
174
  if (!this.labelPool) return;
162
175
  this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
163
176
  const t = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
164
177
  let e = 0;
165
- const i = (r, s, o) => {
166
- var v, b, M, L, E, P, I, x, D, T, A, _, $, S, F;
167
- if (e >= this.displayLimit || r < 0) return;
168
- r >= this.levels.length && (r = this.levels.length - 1);
169
- const l = this.levels[r].level, c = this.gridLayers.get(l);
170
- if (!c) return;
171
- const d = `${s}_${o}`, u = c.get(d);
172
- if (!u) return;
173
- const m = this.tilingScheme.tileXYToRectangle(s, o, l), g = this.Cesium.Math.toDegrees(m.west), p = this.Cesium.Math.toDegrees(m.south), f = this.Cesium.Math.toDegrees(m.east), w = this.Cesium.Math.toDegrees(m.north), y = (g + f) / 2, C = (p + w) / 2;
174
- for (const O of u.skipPoints)
175
- if (((v = O.data) == null ? void 0 : v.show) !== !1) {
178
+ const i = (l, c, d) => {
179
+ var E, I, D, S, T, _, x, A, O, $, k, j, Y, B, V;
180
+ if (e >= this.displayLimit || l < 0) return;
181
+ l >= this.levels.length && (l = this.levels.length - 1);
182
+ const u = this.levels[l], m = l === this.levels.length - 1, g = u.level, p = this.gridLayers.get(g);
183
+ if (!p) return;
184
+ const f = `${c}_${d}`, w = p.get(f);
185
+ if (!w) return;
186
+ const y = this.tilingScheme.tileXYToRectangle(c, d, g), C = this.Cesium.Math.toDegrees(y.west), b = this.Cesium.Math.toDegrees(y.south), v = this.Cesium.Math.toDegrees(y.east), M = this.Cesium.Math.toDegrees(y.north), P = (C + v) / 2, L = (b + M) / 2;
187
+ for (const R of w.skipPoints)
188
+ if (((E = R.data) == null ? void 0 : E.show) !== !1) {
176
189
  if (e >= this.displayLimit) break;
177
- this.labelPool.add(O.data, {
178
- id: `point-${O.id}`,
179
- lon: O.lon,
180
- lat: O.lat,
181
- height: O.height,
182
- theme: ((L = (M = (b = O.data) == null ? void 0 : b.billboard) == null ? void 0 : M[0]) == null ? void 0 : L.theme) || this.pointTheme,
183
- style: O.style
190
+ this.labelPool.add(R.data, {
191
+ id: `point-${R.id}`,
192
+ lon: R.lon,
193
+ lat: R.lat,
194
+ height: R.height,
195
+ theme: ((S = (D = (I = R.data) == null ? void 0 : I.billboard) == null ? void 0 : D[0]) == null ? void 0 : S.theme) || this.pointTheme,
196
+ style: R.style
184
197
  }), e++;
185
198
  }
186
199
  if (e >= this.displayLimit) {
187
- this.debugCurrentGrids && this._drawDebugGrid(g, p, f, w, d);
200
+ this.debugCurrentGrids && this._drawDebugGrid(C, b, v, M, f);
188
201
  return;
189
202
  }
190
- for (const [O, j] of u.groups) {
191
- const R = j.filter((z) => {
192
- var J;
193
- return ((J = z.data) == null ? void 0 : J.show) !== !1;
203
+ for (const [R, se] of w.groups) {
204
+ const W = se.filter((H) => {
205
+ var te;
206
+ return ((te = H.data) == null ? void 0 : te.show) !== !1;
194
207
  });
195
- if (R.length === 0) continue;
196
- let B = y, Y = C;
197
- if (this.centralPointMode == "firstPoint" && (B = ((E = R[0]) == null ? void 0 : E.lon) || 0, Y = ((P = R[0]) == null ? void 0 : P.lat) || 0), R.length < t)
198
- for (const z of R) {
208
+ if (W.length === 0) continue;
209
+ let ne = P, de = L;
210
+ if (this.centralPointMode == "firstPoint" && (ne = ((T = W[0]) == null ? void 0 : T.lon) || 0, de = ((_ = W[0]) == null ? void 0 : _.lat) || 0), m || W.length < t)
211
+ for (const H of W) {
199
212
  if (e >= this.displayLimit) break;
200
- this.labelPool.add(z.data, {
201
- id: `point-${z.id}`,
202
- lon: z.lon,
203
- lat: z.lat,
204
- height: z.height,
205
- theme: ((D = (x = (I = z.data) == null ? void 0 : I.billboard) == null ? void 0 : x[0]) == null ? void 0 : D.theme) || this.pointTheme,
206
- style: z.style
213
+ this.labelPool.add(H.data, {
214
+ id: `point-${H.id}`,
215
+ lon: H.lon,
216
+ lat: H.lat,
217
+ height: H.height,
218
+ theme: ((O = (A = (x = H.data) == null ? void 0 : x.billboard) == null ? void 0 : A[0]) == null ? void 0 : O.theme) || this.pointTheme,
219
+ style: H.style
207
220
  }), e++;
208
221
  }
209
222
  else {
210
223
  if (e >= this.displayLimit) break;
211
- const J = (($ = (_ = (A = (T = R[0]) == null ? void 0 : T.data) == null ? void 0 : A.billboard) == null ? void 0 : _[0]) == null ? void 0 : $.theme) || this.clusterTheme, oe = this.groupByTheme ? `cluster-${r}-${s}-${o}-${O}` : `cluster-${r}-${s}-${o}`;
224
+ const te = ((Y = (j = (k = ($ = W[0]) == null ? void 0 : $.data) == null ? void 0 : k.billboard) == null ? void 0 : j[0]) == null ? void 0 : Y.theme) || this.clusterTheme, ee = this.groupByTheme ? `cluster-${l}-${c}-${d}-${R}` : `cluster-${l}-${c}-${d}`;
212
225
  this.labelPool.add(
213
226
  {
214
- id: oe,
215
- billboard: ((F = (S = R[0]) == null ? void 0 : S.data) == null ? void 0 : F.billboard) || [],
216
- count: R.length,
217
- gridKey: d,
218
- points: R,
219
- aggregationGroup: O
227
+ id: ee,
228
+ billboard: ((V = (B = W[0]) == null ? void 0 : B.data) == null ? void 0 : V.billboard) || [],
229
+ count: W.length,
230
+ gridKey: f,
231
+ points: W,
232
+ aggregationGroup: R
220
233
  },
221
234
  {
222
- id: oe,
223
- lon: B,
224
- lat: Y,
225
- theme: J
235
+ id: ee,
236
+ lon: ne,
237
+ lat: de,
238
+ theme: te
226
239
  }
227
240
  ), e++;
228
241
  }
229
242
  }
230
243
  if (this.debugCurrentGrids) {
231
- const O = this.levels[r].level;
244
+ const R = this.levels[l].level;
232
245
  this._drawDebugGrid(
233
- g,
234
- p,
235
- f,
236
- w,
237
- `L:${O} X:${s} Y:${o}`
246
+ C,
247
+ b,
248
+ v,
249
+ M,
250
+ `L:${R} X:${c} Y:${d}`
238
251
  );
239
252
  }
240
253
  };
241
254
  try {
242
- const r = this.viewer.scene && this.viewer.scene.globe, s = r && r._surface;
243
- let o;
244
- if (s && (o = s._tilesToRender || s._tilesToRenderByTextureCount), !o || o.length === 0) {
255
+ const l = this.viewer.scene && this.viewer.scene.globe, c = l && l._surface;
256
+ let d;
257
+ if (c && (d = c._tilesToRender || c._tilesToRenderByTextureCount), !d || d.length === 0) {
258
+ for (const m of this.points) {
259
+ if (e >= this.displayLimit) break;
260
+ ((r = m.data) == null ? void 0 : r.show) !== !1 && (this.labelPool.add(m.data, {
261
+ id: `point-${m.id}`,
262
+ lon: m.lon,
263
+ lat: m.lat,
264
+ height: m.height,
265
+ theme: ((n = (o = (s = m.data) == null ? void 0 : s.billboard) == null ? void 0 : o[0]) == null ? void 0 : n.theme) || this.pointTheme,
266
+ style: m.style
267
+ }), e++);
268
+ }
245
269
  this.labelPool.cleanup(), this.points.length > 0 && this._tilesRetryCount < this._tilesRetryMax && (this._tilesRetryCount++, this._scheduleUpdate());
246
270
  return;
247
271
  }
248
272
  this._tilesRetryCount = 0;
249
- const n = /* @__PURE__ */ new Set();
250
- for (const l of o) {
251
- const c = l.rectangle, d = l._level ?? l.level;
252
- if (!c || typeof d != "number") continue;
253
- const u = this.levelIndexByTileLevel.get(d);
254
- if (u === void 0) continue;
255
- const m = l._x ?? l.x, g = l._y ?? l.y;
256
- if (typeof m == "number" && typeof g == "number") {
257
- const P = `${d}_${m}_${g}`;
258
- if (n.has(P)) continue;
259
- n.add(P), i(u, m, g);
273
+ const u = /* @__PURE__ */ new Set();
274
+ for (const m of d) {
275
+ const g = m.rectangle, p = m._level ?? m.level;
276
+ if (!g || typeof p != "number") continue;
277
+ let f = this.levelIndexByTileLevel.get(p);
278
+ if (f === void 0) {
279
+ if (this.levels.length === 0) continue;
280
+ const _ = this.levels[0].level, x = this.levels[this.levels.length - 1].level;
281
+ if (p > x)
282
+ f = this.levels.length - 1;
283
+ else if (p < _)
284
+ f = 0;
285
+ else {
286
+ let A = 0, O = 1 / 0;
287
+ for (let $ = 0; $ < this.levels.length; $++) {
288
+ const k = Math.abs(this.levels[$].level - p);
289
+ k < O && (O = k, A = $);
290
+ }
291
+ f = A;
292
+ }
293
+ }
294
+ if (f === void 0) continue;
295
+ const w = this.levels[f].level, y = m._x ?? m.x, C = m._y ?? m.y;
296
+ if (typeof y == "number" && typeof C == "number") {
297
+ let _ = y, x = C;
298
+ const A = p - w;
299
+ if (A > 0) {
300
+ const $ = 1 << A;
301
+ _ = Math.floor(y / $), x = Math.floor(C / $);
302
+ } else if (A < 0) {
303
+ const $ = 1 << -A;
304
+ _ = y * $, x = C * $;
305
+ }
306
+ const O = `${w}_${_}_${x}`;
307
+ if (u.has(O)) continue;
308
+ u.add(O), i(f, _, x);
260
309
  continue;
261
310
  }
262
- const f = this.levels[u].size, w = this.Cesium.Math.toDegrees(c.west), y = this.Cesium.Math.toDegrees(c.east), C = this.Cesium.Math.toDegrees(c.south), v = this.Cesium.Math.toDegrees(c.north), b = Math.floor((w - -180) / f), M = Math.floor((y - -180) / f), L = Math.floor((C - -90) / f), E = Math.floor((v - -90) / f);
263
- for (let P = b; P <= M; P++)
264
- for (let I = L; I <= E; I++) {
265
- const x = `${d}_${P}_${I}`;
266
- n.has(x) || (n.add(x), i(u, P, I));
311
+ const v = this.levels[f].size, M = this.Cesium.Math.toDegrees(g.west), P = this.Cesium.Math.toDegrees(g.east), L = this.Cesium.Math.toDegrees(g.south), E = this.Cesium.Math.toDegrees(g.north), I = Math.floor((M - -180) / v), D = Math.floor((P - -180) / v), S = Math.floor((L - -90) / v), T = Math.floor((E - -90) / v);
312
+ for (let _ = I; _ <= D; _++)
313
+ for (let x = S; x <= T; x++) {
314
+ const A = `${w}_${_}_${x}`;
315
+ u.has(A) || (u.add(A), i(f, _, x));
267
316
  }
268
317
  }
269
318
  } catch {
@@ -303,10 +352,12 @@ class Lr {
303
352
  this.debugGrids = [];
304
353
  }
305
354
  destroy() {
306
- this.viewer.camera.changed.removeEventListener(this._updateFn), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids();
355
+ this._cameraChangedHandler && (this.viewer.camera.changed.removeEventListener(this._cameraChangedHandler), this._cameraChangedHandler = null);
356
+ const t = this.viewer.scene, e = t && t.globe;
357
+ e && this._tileLoadListener && (e.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids();
307
358
  }
308
359
  }
309
- var ie = /* @__PURE__ */ ((a) => (a.Click = "marker:click", a.DoubleClick = "marker:dblclick", a.RightClick = "marker:rightclick", a.MouseEnter = "marker:mouseenter", a.MouseLeave = "marker:mouseleave", a.MouseDown = "marker:mousedown", a.MouseUp = "marker:mouseup", a))(ie || {});
360
+ var oe = /* @__PURE__ */ ((a) => (a.Click = "marker:click", a.DoubleClick = "marker:dblclick", a.RightClick = "marker:rightclick", a.MouseEnter = "marker:mouseenter", a.MouseLeave = "marker:mouseleave", a.MouseDown = "marker:mousedown", a.MouseUp = "marker:mouseup", a))(oe || {});
310
361
  class zt {
311
362
  constructor() {
312
363
  h(this, "listenerMap", /* @__PURE__ */ new Map());
@@ -357,13 +408,13 @@ class zt {
357
408
  }
358
409
  }
359
410
  const Nt = {
360
- [ie.Click]: "click",
361
- [ie.DoubleClick]: "dblclick",
362
- [ie.RightClick]: "contextmenu",
363
- [ie.MouseEnter]: "mouseenter",
364
- [ie.MouseLeave]: "mouseleave",
365
- [ie.MouseDown]: "mousedown",
366
- [ie.MouseUp]: "mouseup"
411
+ [oe.Click]: "click",
412
+ [oe.DoubleClick]: "dblclick",
413
+ [oe.RightClick]: "contextmenu",
414
+ [oe.MouseEnter]: "mouseenter",
415
+ [oe.MouseLeave]: "mouseleave",
416
+ [oe.MouseDown]: "mousedown",
417
+ [oe.MouseUp]: "mouseup"
367
418
  };
368
419
  class G {
369
420
  /**
@@ -444,17 +495,17 @@ class G {
444
495
  for (const [f, w] of Object.entries(Nt)) {
445
496
  g.addEventListener(w, (C) => {
446
497
  C.stopPropagation();
447
- const v = this.labels.get(i);
448
- this.eventBus.runListener(f, v, C);
498
+ const b = this.labels.get(i);
499
+ this.eventBus.runListener(f, b, C);
449
500
  });
450
501
  let y = 0;
451
502
  g.addEventListener("wheel", (C) => {
452
503
  if (!this.openWheel) return;
453
- const v = C.currentTarget;
504
+ const b = C.currentTarget;
454
505
  y = Date.now();
455
- const b = y;
456
- v.style.pointerEvents = "none", setTimeout(() => {
457
- y === b && (v.style.pointerEvents = "auto");
506
+ const v = y;
507
+ b.style.pointerEvents = "none", setTimeout(() => {
508
+ y === v && (b.style.pointerEvents = "auto");
458
509
  }, 2e3);
459
510
  });
460
511
  }
@@ -1050,7 +1101,7 @@ class Er {
1050
1101
  this.clear();
1051
1102
  }
1052
1103
  }
1053
- var vt = typeof global == "object" && global && global.Object === Object && global, Wt = typeof self == "object" && self && self.Object === Object && self, se = vt || Wt || Function("return this")(), ge = se.Symbol, bt = Object.prototype, Ut = bt.hasOwnProperty, qt = bt.toString, ve = ge ? ge.toStringTag : void 0;
1104
+ var vt = typeof global == "object" && global && global.Object === Object && global, Wt = typeof self == "object" && self && self.Object === Object && self, re = vt || Wt || Function("return this")(), fe = re.Symbol, bt = Object.prototype, Ut = bt.hasOwnProperty, qt = bt.toString, ve = fe ? fe.toStringTag : void 0;
1054
1105
  function Kt(a) {
1055
1106
  var t = Ut.call(a, ve), e = a[ve];
1056
1107
  try {
@@ -1065,7 +1116,7 @@ var Xt = Object.prototype, Jt = Xt.toString;
1065
1116
  function Qt(a) {
1066
1117
  return Jt.call(a);
1067
1118
  }
1068
- var Zt = "[object Null]", ei = "[object Undefined]", Be = ge ? ge.toStringTag : void 0;
1119
+ var Zt = "[object Null]", ei = "[object Undefined]", Be = fe ? fe.toStringTag : void 0;
1069
1120
  function Ee(a) {
1070
1121
  return a == null ? a === void 0 ? ei : Zt : Be && Be in Object(a) ? Kt(a) : Qt(a);
1071
1122
  }
@@ -1084,7 +1135,7 @@ function Pt(a) {
1084
1135
  var t = Ee(a);
1085
1136
  return t == ii || t == si || t == ti || t == oi;
1086
1137
  }
1087
- var $e = se["__core-js_shared__"], je = (function() {
1138
+ var $e = re["__core-js_shared__"], je = (function() {
1088
1139
  var a = /[^.]+$/.exec($e && $e.keys && $e.keys.IE_PROTO || "");
1089
1140
  return a ? "Symbol(src)_1." + a : "";
1090
1141
  })();
@@ -1092,7 +1143,7 @@ function ri(a) {
1092
1143
  return !!je && je in a;
1093
1144
  }
1094
1145
  var ni = Function.prototype, ai = ni.toString;
1095
- function de(a) {
1146
+ function ue(a) {
1096
1147
  if (a != null) {
1097
1148
  try {
1098
1149
  return ai.call(a);
@@ -1112,16 +1163,16 @@ function gi(a) {
1112
1163
  if (!_e(a) || ri(a))
1113
1164
  return !1;
1114
1165
  var t = Pt(a) ? mi : hi;
1115
- return t.test(de(a));
1166
+ return t.test(ue(a));
1116
1167
  }
1117
1168
  function fi(a, t) {
1118
1169
  return a == null ? void 0 : a[t];
1119
1170
  }
1120
- function pe(a, t) {
1171
+ function me(a, t) {
1121
1172
  var e = fi(a, t);
1122
1173
  return gi(e) ? e : void 0;
1123
1174
  }
1124
- var Fe = pe(se, "WeakMap"), Ye = Object.create, yi = /* @__PURE__ */ (function() {
1175
+ var Fe = me(re, "WeakMap"), Ye = Object.create, yi = /* @__PURE__ */ (function() {
1125
1176
  function a() {
1126
1177
  }
1127
1178
  return function(t) {
@@ -1135,7 +1186,7 @@ var Fe = pe(se, "WeakMap"), Ye = Object.create, yi = /* @__PURE__ */ (function()
1135
1186
  };
1136
1187
  })(), Ve = (function() {
1137
1188
  try {
1138
- var a = pe(Object, "defineProperty");
1189
+ var a = me(Object, "defineProperty");
1139
1190
  return a({}, "", {}), a;
1140
1191
  } catch {
1141
1192
  }
@@ -1195,7 +1246,7 @@ var It = Object.prototype, Si = It.hasOwnProperty, Ai = It.propertyIsEnumerable,
1195
1246
  function Oi() {
1196
1247
  return !1;
1197
1248
  }
1198
- var Tt = typeof exports == "object" && exports && !exports.nodeType && exports, Ue = Tt && typeof module == "object" && module && !module.nodeType && module, Fi = Ue && Ue.exports === Tt, qe = Fi ? se.Buffer : void 0, ki = qe ? qe.isBuffer : void 0, xt = ki || Oi, Ri = "[object Arguments]", Hi = "[object Array]", zi = "[object Boolean]", Ni = "[object Date]", Gi = "[object Error]", Bi = "[object Function]", ji = "[object Map]", Yi = "[object Number]", Vi = "[object Object]", Wi = "[object RegExp]", Ui = "[object Set]", qi = "[object String]", Ki = "[object WeakMap]", Xi = "[object ArrayBuffer]", Ji = "[object DataView]", Qi = "[object Float32Array]", Zi = "[object Float64Array]", es = "[object Int8Array]", ts = "[object Int16Array]", is = "[object Int32Array]", ss = "[object Uint8Array]", os = "[object Uint8ClampedArray]", rs = "[object Uint16Array]", ns = "[object Uint32Array]", N = {};
1249
+ var Tt = typeof exports == "object" && exports && !exports.nodeType && exports, Ue = Tt && typeof module == "object" && module && !module.nodeType && module, Fi = Ue && Ue.exports === Tt, qe = Fi ? re.Buffer : void 0, ki = qe ? qe.isBuffer : void 0, xt = ki || Oi, Ri = "[object Arguments]", Hi = "[object Array]", zi = "[object Boolean]", Ni = "[object Date]", Gi = "[object Error]", Bi = "[object Function]", ji = "[object Map]", Yi = "[object Number]", Vi = "[object Object]", Wi = "[object RegExp]", Ui = "[object Set]", qi = "[object String]", Ki = "[object WeakMap]", Xi = "[object ArrayBuffer]", Ji = "[object DataView]", Qi = "[object Float32Array]", Zi = "[object Float64Array]", es = "[object Int8Array]", ts = "[object Int16Array]", is = "[object Int32Array]", ss = "[object Uint8Array]", os = "[object Uint8ClampedArray]", rs = "[object Uint16Array]", ns = "[object Uint32Array]", N = {};
1199
1250
  N[Qi] = N[Zi] = N[es] = N[ts] = N[is] = N[ss] = N[os] = N[rs] = N[ns] = !0;
1200
1251
  N[Ri] = N[Hi] = N[Xi] = N[zi] = N[Ji] = N[Ni] = N[Gi] = N[Bi] = N[ji] = N[Yi] = N[Vi] = N[Wi] = N[Ui] = N[qi] = N[Ki] = !1;
1201
1252
  function as(a) {
@@ -1206,13 +1257,13 @@ function Ne(a) {
1206
1257
  return a(t);
1207
1258
  };
1208
1259
  }
1209
- var Dt = typeof exports == "object" && exports && !exports.nodeType && exports, be = Dt && typeof module == "object" && module && !module.nodeType && module, ls = be && be.exports === Dt, Oe = ls && vt.process, fe = (function() {
1260
+ var Dt = typeof exports == "object" && exports && !exports.nodeType && exports, be = Dt && typeof module == "object" && module && !module.nodeType && module, ls = be && be.exports === Dt, Oe = ls && vt.process, ye = (function() {
1210
1261
  try {
1211
1262
  var a = be && be.require && be.require("util").types;
1212
1263
  return a || Oe && Oe.binding && Oe.binding("util");
1213
1264
  } catch {
1214
1265
  }
1215
- })(), Ke = fe && fe.isTypedArray, hs = Ke ? Ne(Ke) : as, cs = Object.prototype, ds = cs.hasOwnProperty;
1266
+ })(), Ke = ye && ye.isTypedArray, hs = Ke ? Ne(Ke) : as, cs = Object.prototype, ds = cs.hasOwnProperty;
1216
1267
  function ps(a, t) {
1217
1268
  var e = De(a), i = !e && $i(a), r = !e && !i && xt(a), s = !e && !i && !r && hs(a), o = e || i || r || s, n = o ? Di(a.length, String) : [], l = n.length;
1218
1269
  for (var c in a)
@@ -1240,7 +1291,7 @@ function fs(a) {
1240
1291
  function ys(a) {
1241
1292
  return Ti(a) ? ps(a) : fs(a);
1242
1293
  }
1243
- var Pe = pe(Object, "create");
1294
+ var Pe = me(Object, "create");
1244
1295
  function ws() {
1245
1296
  this.__data__ = Pe ? Pe(null) : {}, this.size = 0;
1246
1297
  }
@@ -1267,18 +1318,18 @@ function xs(a, t) {
1267
1318
  var e = this.__data__;
1268
1319
  return this.size += this.has(a) ? 0 : 1, e[a] = Pe && t === void 0 ? Ts : t, this;
1269
1320
  }
1270
- function ce(a) {
1321
+ function pe(a) {
1271
1322
  var t = -1, e = a == null ? 0 : a.length;
1272
1323
  for (this.clear(); ++t < e; ) {
1273
1324
  var i = a[t];
1274
1325
  this.set(i[0], i[1]);
1275
1326
  }
1276
1327
  }
1277
- ce.prototype.clear = ws;
1278
- ce.prototype.delete = Cs;
1279
- ce.prototype.get = Ls;
1280
- ce.prototype.has = Is;
1281
- ce.prototype.set = xs;
1328
+ pe.prototype.clear = ws;
1329
+ pe.prototype.delete = Cs;
1330
+ pe.prototype.get = Ls;
1331
+ pe.prototype.has = Is;
1332
+ pe.prototype.set = xs;
1282
1333
  function Ds() {
1283
1334
  this.__data__ = [], this.size = 0;
1284
1335
  }
@@ -1307,24 +1358,24 @@ function Fs(a, t) {
1307
1358
  var e = this.__data__, i = Se(e, a);
1308
1359
  return i < 0 ? (++this.size, e.push([a, t])) : e[i][1] = t, this;
1309
1360
  }
1310
- function le(a) {
1361
+ function ce(a) {
1311
1362
  var t = -1, e = a == null ? 0 : a.length;
1312
1363
  for (this.clear(); ++t < e; ) {
1313
1364
  var i = a[t];
1314
1365
  this.set(i[0], i[1]);
1315
1366
  }
1316
1367
  }
1317
- le.prototype.clear = Ds;
1318
- le.prototype.delete = As;
1319
- le.prototype.get = $s;
1320
- le.prototype.has = Os;
1321
- le.prototype.set = Fs;
1322
- var Le = pe(se, "Map");
1368
+ ce.prototype.clear = Ds;
1369
+ ce.prototype.delete = As;
1370
+ ce.prototype.get = $s;
1371
+ ce.prototype.has = Os;
1372
+ ce.prototype.set = Fs;
1373
+ var Le = me(re, "Map");
1323
1374
  function ks() {
1324
1375
  this.size = 0, this.__data__ = {
1325
- hash: new ce(),
1326
- map: new (Le || le)(),
1327
- string: new ce()
1376
+ hash: new pe(),
1377
+ map: new (Le || ce)(),
1378
+ string: new pe()
1328
1379
  };
1329
1380
  }
1330
1381
  function Rs(a) {
@@ -1349,18 +1400,18 @@ function Gs(a, t) {
1349
1400
  var e = Ae(this, a), i = e.size;
1350
1401
  return e.set(a, t), this.size += e.size == i ? 0 : 1, this;
1351
1402
  }
1352
- function ye(a) {
1403
+ function we(a) {
1353
1404
  var t = -1, e = a == null ? 0 : a.length;
1354
1405
  for (this.clear(); ++t < e; ) {
1355
1406
  var i = a[t];
1356
1407
  this.set(i[0], i[1]);
1357
1408
  }
1358
1409
  }
1359
- ye.prototype.clear = ks;
1360
- ye.prototype.delete = Hs;
1361
- ye.prototype.get = zs;
1362
- ye.prototype.has = Ns;
1363
- ye.prototype.set = Gs;
1410
+ we.prototype.clear = ks;
1411
+ we.prototype.delete = Hs;
1412
+ we.prototype.get = zs;
1413
+ we.prototype.has = Ns;
1414
+ we.prototype.set = Gs;
1364
1415
  function Bs(a, t) {
1365
1416
  for (var e = -1, i = t.length, r = a.length; ++e < i; )
1366
1417
  a[r + e] = t[e];
@@ -1368,7 +1419,7 @@ function Bs(a, t) {
1368
1419
  }
1369
1420
  var js = _t(Object.getPrototypeOf, Object);
1370
1421
  function Ys() {
1371
- this.__data__ = new le(), this.size = 0;
1422
+ this.__data__ = new ce(), this.size = 0;
1372
1423
  }
1373
1424
  function Vs(a) {
1374
1425
  var t = this.__data__, e = t.delete(a);
@@ -1383,24 +1434,24 @@ function Us(a) {
1383
1434
  var qs = 200;
1384
1435
  function Ks(a, t) {
1385
1436
  var e = this.__data__;
1386
- if (e instanceof le) {
1437
+ if (e instanceof ce) {
1387
1438
  var i = e.__data__;
1388
1439
  if (!Le || i.length < qs - 1)
1389
1440
  return i.push([a, t]), this.size = ++e.size, this;
1390
- e = this.__data__ = new ye(i);
1441
+ e = this.__data__ = new we(i);
1391
1442
  }
1392
1443
  return e.set(a, t), this.size = e.size, this;
1393
1444
  }
1394
- function we(a) {
1395
- var t = this.__data__ = new le(a);
1445
+ function Ce(a) {
1446
+ var t = this.__data__ = new ce(a);
1396
1447
  this.size = t.size;
1397
1448
  }
1398
- we.prototype.clear = Ys;
1399
- we.prototype.delete = Vs;
1400
- we.prototype.get = Ws;
1401
- we.prototype.has = Us;
1402
- we.prototype.set = Ks;
1403
- var St = typeof exports == "object" && exports && !exports.nodeType && exports, Xe = St && typeof module == "object" && module && !module.nodeType && module, Xs = Xe && Xe.exports === St, Je = Xs ? se.Buffer : void 0;
1449
+ Ce.prototype.clear = Ys;
1450
+ Ce.prototype.delete = Vs;
1451
+ Ce.prototype.get = Ws;
1452
+ Ce.prototype.has = Us;
1453
+ Ce.prototype.set = Ks;
1454
+ var St = typeof exports == "object" && exports && !exports.nodeType && exports, Xe = St && typeof module == "object" && module && !module.nodeType && module, Xs = Xe && Xe.exports === St, Je = Xs ? re.Buffer : void 0;
1404
1455
  Je && Je.allocUnsafe;
1405
1456
  function Js(a, t) {
1406
1457
  return a.slice();
@@ -1427,9 +1478,9 @@ function so(a, t, e) {
1427
1478
  function oo(a) {
1428
1479
  return so(a, ys, io);
1429
1480
  }
1430
- var ke = pe(se, "DataView"), Re = pe(se, "Promise"), He = pe(se, "Set"), Ze = "[object Map]", ro = "[object Object]", et = "[object Promise]", tt = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", no = de(ke), ao = de(Le), lo = de(Re), ho = de(He), co = de(Fe), ae = Ee;
1431
- (ke && ae(new ke(new ArrayBuffer(1))) != st || Le && ae(new Le()) != Ze || Re && ae(Re.resolve()) != et || He && ae(new He()) != tt || Fe && ae(new Fe()) != it) && (ae = function(a) {
1432
- var t = Ee(a), e = t == ro ? a.constructor : void 0, i = e ? de(e) : "";
1481
+ var ke = me(re, "DataView"), Re = me(re, "Promise"), He = me(re, "Set"), Ze = "[object Map]", ro = "[object Object]", et = "[object Promise]", tt = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", no = ue(ke), ao = ue(Le), lo = ue(Re), ho = ue(He), co = ue(Fe), he = Ee;
1482
+ (ke && he(new ke(new ArrayBuffer(1))) != st || Le && he(new Le()) != Ze || Re && he(Re.resolve()) != et || He && he(new He()) != tt || Fe && he(new Fe()) != it) && (he = function(a) {
1483
+ var t = Ee(a), e = t == ro ? a.constructor : void 0, i = e ? ue(e) : "";
1433
1484
  if (i)
1434
1485
  switch (i) {
1435
1486
  case no:
@@ -1450,7 +1501,7 @@ function mo(a) {
1450
1501
  var t = a.length, e = new a.constructor(t);
1451
1502
  return t && typeof a[0] == "string" && uo.call(a, "index") && (e.index = a.index, e.input = a.input), e;
1452
1503
  }
1453
- var ot = se.Uint8Array;
1504
+ var ot = re.Uint8Array;
1454
1505
  function Ge(a) {
1455
1506
  var t = new a.constructor(a.byteLength);
1456
1507
  return new ot(t).set(new ot(a)), t;
@@ -1464,7 +1515,7 @@ function yo(a) {
1464
1515
  var t = new a.constructor(a.source, fo.exec(a));
1465
1516
  return t.lastIndex = a.lastIndex, t;
1466
1517
  }
1467
- var rt = ge ? ge.prototype : void 0, nt = rt ? rt.valueOf : void 0;
1518
+ var rt = fe ? fe.prototype : void 0, nt = rt ? rt.valueOf : void 0;
1468
1519
  function wo(a) {
1469
1520
  return nt ? Object(nt.call(a)) : {};
1470
1521
  }
@@ -1511,15 +1562,15 @@ function No(a) {
1511
1562
  }
1512
1563
  var Go = "[object Map]";
1513
1564
  function Bo(a) {
1514
- return Me(a) && ae(a) == Go;
1565
+ return Me(a) && he(a) == Go;
1515
1566
  }
1516
- var at = fe && fe.isMap, jo = at ? Ne(at) : Bo, Yo = "[object Set]";
1567
+ var at = ye && ye.isMap, jo = at ? Ne(at) : Bo, Yo = "[object Set]";
1517
1568
  function Vo(a) {
1518
- return Me(a) && ae(a) == Yo;
1569
+ return Me(a) && he(a) == Yo;
1519
1570
  }
1520
- var lt = fe && fe.isSet, Wo = lt ? Ne(lt) : Vo, At = "[object Arguments]", Uo = "[object Array]", qo = "[object Boolean]", Ko = "[object Date]", Xo = "[object Error]", $t = "[object Function]", Jo = "[object GeneratorFunction]", Qo = "[object Map]", Zo = "[object Number]", Ot = "[object Object]", er = "[object RegExp]", tr = "[object Set]", ir = "[object String]", sr = "[object Symbol]", or = "[object WeakMap]", rr = "[object ArrayBuffer]", nr = "[object DataView]", ar = "[object Float32Array]", lr = "[object Float64Array]", hr = "[object Int8Array]", cr = "[object Int16Array]", dr = "[object Int32Array]", pr = "[object Uint8Array]", ur = "[object Uint8ClampedArray]", mr = "[object Uint16Array]", gr = "[object Uint32Array]", H = {};
1521
- H[At] = H[Uo] = H[rr] = H[nr] = H[qo] = H[Ko] = H[ar] = H[lr] = H[hr] = H[cr] = H[dr] = H[Qo] = H[Zo] = H[Ot] = H[er] = H[tr] = H[ir] = H[sr] = H[pr] = H[ur] = H[mr] = H[gr] = !0;
1522
- H[Xo] = H[$t] = H[or] = !1;
1571
+ var lt = ye && ye.isSet, Wo = lt ? Ne(lt) : Vo, At = "[object Arguments]", Uo = "[object Array]", qo = "[object Boolean]", Ko = "[object Date]", Xo = "[object Error]", $t = "[object Function]", Jo = "[object GeneratorFunction]", Qo = "[object Map]", Zo = "[object Number]", Ot = "[object Object]", er = "[object RegExp]", tr = "[object Set]", ir = "[object String]", sr = "[object Symbol]", or = "[object WeakMap]", rr = "[object ArrayBuffer]", nr = "[object DataView]", ar = "[object Float32Array]", lr = "[object Float64Array]", hr = "[object Int8Array]", cr = "[object Int16Array]", dr = "[object Int32Array]", pr = "[object Uint8Array]", ur = "[object Uint8ClampedArray]", mr = "[object Uint16Array]", gr = "[object Uint32Array]", z = {};
1572
+ z[At] = z[Uo] = z[rr] = z[nr] = z[qo] = z[Ko] = z[ar] = z[lr] = z[hr] = z[cr] = z[dr] = z[Qo] = z[Zo] = z[Ot] = z[er] = z[tr] = z[ir] = z[sr] = z[pr] = z[ur] = z[mr] = z[gr] = !0;
1573
+ z[Xo] = z[$t] = z[or] = !1;
1523
1574
  function xe(a, t, e, i, r, s) {
1524
1575
  var o;
1525
1576
  if (o !== void 0)
@@ -1530,18 +1581,18 @@ function xe(a, t, e, i, r, s) {
1530
1581
  if (n)
1531
1582
  o = mo(a);
1532
1583
  else {
1533
- var l = ae(a), c = l == $t || l == Jo;
1584
+ var l = he(a), c = l == $t || l == Jo;
1534
1585
  if (xt(a))
1535
1586
  return Js(a);
1536
1587
  if (l == Ot || l == At || c && !r)
1537
1588
  o = c ? {} : No(a);
1538
1589
  else {
1539
- if (!H[l])
1590
+ if (!z[l])
1540
1591
  return r ? a : {};
1541
1592
  o = zo(a, l);
1542
1593
  }
1543
1594
  }
1544
- s || (s = new we());
1595
+ s || (s = new Ce());
1545
1596
  var d = s.get(a);
1546
1597
  if (d)
1547
1598
  return d;
@@ -1775,7 +1826,7 @@ class Mr {
1775
1826
  }
1776
1827
  };
1777
1828
  this.handler.setInputAction((m) => {
1778
- var f, w, y, C, v, b, M, L, E, P;
1829
+ var f, w, y, C, b, v, M, P, L, E;
1779
1830
  if (!t()) return;
1780
1831
  const p = r.pick(m.position);
1781
1832
  if (p && p.id && ((f = p.id) != null && f.includes("rotationRing"))) {
@@ -1804,7 +1855,7 @@ class Mr {
1804
1855
  ), u(I, m);
1805
1856
  } else if (p && p.id) {
1806
1857
  if (s = this.primitives.get(p.id), !s) return;
1807
- (!this.rotationRing || !((b = (v = this.rotationRing) == null ? void 0 : v._instanceIds) != null && b.includes(`rotationRing_${s.id}`))) && this.createRotationRing(s), (!this.translationSquare || !((L = (M = this.translationSquare) == null ? void 0 : M._instanceIds) != null && L.includes(`translationSquare_${s.id}`))) && this.createTranslationSquare(s), (!this.heightArrow || !((P = (E = this.heightArrow) == null ? void 0 : E._instanceIds) != null && P.includes(`heightArrow_${s.id}`))) && this.createHeightArrow(s);
1858
+ (!this.rotationRing || !((v = (b = this.rotationRing) == null ? void 0 : b._instanceIds) != null && v.includes(`rotationRing_${s.id}`))) && this.createRotationRing(s), (!this.translationSquare || !((P = (M = this.translationSquare) == null ? void 0 : M._instanceIds) != null && P.includes(`translationSquare_${s.id}`))) && this.createTranslationSquare(s), (!this.heightArrow || !((E = (L = this.heightArrow) == null ? void 0 : L._instanceIds) != null && E.includes(`heightArrow_${s.id}`))) && this.createHeightArrow(s);
1808
1859
  } else
1809
1860
  d();
1810
1861
  }, e.ScreenSpaceEventType.LEFT_DOWN), this.handler.setInputAction((m) => {
@@ -2391,7 +2442,7 @@ class br {
2391
2442
  h(this, "materialManager");
2392
2443
  h(this, "aggregator");
2393
2444
  h(this, "cardPool");
2394
- this.id = t, this.Cesium = e, this.viewer = i, this.materialManager = r, this.aggregator = s, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(ie.Click, {
2445
+ this.id = t, this.Cesium = e, this.viewer = i, this.materialManager = r, this.aggregator = s, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(oe.Click, {
2395
2446
  name: "BufferedHierarchicalAggregator_maker_click",
2396
2447
  fn: (l, c) => {
2397
2448
  this.cardPool.showByIds([l.data.id]);
@@ -2730,17 +2781,17 @@ class Ar {
2730
2781
  const w = ((s = (r = t.properties) == null ? void 0 : r.lineType) == null ? void 0 : s.pattern) && ((n = (o = t.properties) == null ? void 0 : o.lineType) == null ? void 0 : n.patternLength);
2731
2782
  let y = "";
2732
2783
  if (w) {
2733
- const C = ((c = (l = t.properties) == null ? void 0 : l.lineType) == null ? void 0 : c.pattern) || [0.25, -0.125], v = ((u = (d = t.properties) == null ? void 0 : d.lineType) == null ? void 0 : u.patternLength) || 0.375;
2734
- let b = this.convertCadPatternToCesiumDash(C, v);
2735
- y = `DashedLineMaterial_pattern_${b.dashPattern}_dashLength_${b.dashLength}_color_${(m = t.properties) == null ? void 0 : m.color}`, e.has(y) || e.register({
2784
+ const C = ((c = (l = t.properties) == null ? void 0 : l.lineType) == null ? void 0 : c.pattern) || [0.25, -0.125], b = ((u = (d = t.properties) == null ? void 0 : d.lineType) == null ? void 0 : u.patternLength) || 0.375;
2785
+ let v = this.convertCadPatternToCesiumDash(C, b);
2786
+ y = `DashedLineMaterial_pattern_${v.dashPattern}_dashLength_${v.dashLength}_color_${(m = t.properties) == null ? void 0 : m.color}`, e.has(y) || e.register({
2736
2787
  themeKey: y,
2737
2788
  material: i.Material.fromType("PolylineDash", {
2738
2789
  color: i.Color.fromCssColorString(t.properties.color || "#FFFFFF").withAlpha(
2739
2790
  0.8
2740
2791
  ),
2741
- dashLength: b.dashLength,
2792
+ dashLength: v.dashLength,
2742
2793
  // ← 注意,这里填总长度
2743
- dashPattern: b.dashPattern
2794
+ dashPattern: v.dashPattern
2744
2795
  // ← 这里才是 16-bit 掩码
2745
2796
  })
2746
2797
  });
@@ -3011,8 +3062,8 @@ class Ar {
3011
3062
  const n = o.geometry, l = n._positions || n._polygonHierarchy.positions;
3012
3063
  if (l && l.length > 0) {
3013
3064
  let c = l[0].x, d = l[0].y, u = l[0].z, m = l[0].x, g = l[0].y, p = l[0].z;
3014
- l.forEach((v) => {
3015
- c = Math.min(c, v.x), d = Math.min(d, v.y), u = Math.min(u, v.z), m = Math.max(m, v.x), g = Math.max(g, v.y), p = Math.max(p, v.z);
3065
+ l.forEach((b) => {
3066
+ c = Math.min(c, b.x), d = Math.min(d, b.y), u = Math.min(u, b.z), m = Math.max(m, b.x), g = Math.max(g, b.y), p = Math.max(p, b.z);
3016
3067
  });
3017
3068
  const f = new this.Cesium.Cartesian3(
3018
3069
  (c + m) / 2,
@@ -3103,9 +3154,9 @@ class ht {
3103
3154
  }
3104
3155
  });
3105
3156
  if (this.groundLineEntities.push(p), this.positions.length >= 2) {
3106
- const v = this.positions[this.positions.length - 2], b = this.positions[this.positions.length - 1], M = e.Cartographic.fromCartesian(v), L = e.Cartographic.fromCartesian(b), E = i.entities.add({
3157
+ const b = this.positions[this.positions.length - 2], v = this.positions[this.positions.length - 1], M = e.Cartographic.fromCartesian(b), P = e.Cartographic.fromCartesian(v), L = i.entities.add({
3107
3158
  polyline: {
3108
- positions: [v, b],
3159
+ positions: [b, v],
3109
3160
  width: t.width || 3,
3110
3161
  material: t.lineColor || t.color || e.Color.YELLOW,
3111
3162
  depthFailMaterial: new e.PolylineDashMaterialProperty({
@@ -3115,19 +3166,19 @@ class ht {
3115
3166
  })
3116
3167
  }
3117
3168
  });
3118
- this.segmentEntities.push(E);
3119
- const I = new e.EllipsoidGeodesic(M, L).surfaceDistance, x = new e.Cartesian3(
3120
- (v.x + b.x) / 2,
3121
- (v.y + b.y) / 2,
3122
- (v.z + b.z) / 2
3123
- ), D = e.Cartographic.fromCartesian(x), T = `measure_horizontal_seg_${this.segmentLabelIds.length}_${Date.now()}`;
3169
+ this.segmentEntities.push(L);
3170
+ const I = new e.EllipsoidGeodesic(M, P).surfaceDistance, D = new e.Cartesian3(
3171
+ (b.x + v.x) / 2,
3172
+ (b.y + v.y) / 2,
3173
+ (b.z + v.z) / 2
3174
+ ), S = e.Cartographic.fromCartesian(D), T = `measure_horizontal_seg_${this.segmentLabelIds.length}_${Date.now()}`;
3124
3175
  this.segmentLabelIds.push(T), this.htmlLabelPool.add(
3125
3176
  { text: `${I.toFixed(2)} m` },
3126
3177
  {
3127
3178
  id: T,
3128
- lon: e.Math.toDegrees(D.longitude),
3129
- lat: e.Math.toDegrees(D.latitude),
3130
- height: D.height || this.firstHeight || 0,
3179
+ lon: e.Math.toDegrees(S.longitude),
3180
+ lat: e.Math.toDegrees(S.latitude),
3181
+ height: S.height || this.firstHeight || 0,
3131
3182
  theme: "measure-horizontal-seg",
3132
3183
  show: !0
3133
3184
  }
@@ -3167,7 +3218,7 @@ class ht {
3167
3218
  };
3168
3219
  (c = t.onComplete) == null || c.call(t, l);
3169
3220
  }, e.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.handler.setInputAction((r) => {
3170
- var M, L, E, P;
3221
+ var M, P, L, E;
3171
3222
  if (this.positions.length === 0) return;
3172
3223
  const s = i.scene.pickPosition(r.endPosition);
3173
3224
  if (!s) return;
@@ -3180,11 +3231,11 @@ class ht {
3180
3231
  (m.x + c.x) / 2,
3181
3232
  (m.y + c.y) / 2,
3182
3233
  (m.z + c.z) / 2
3183
- ), C = e.Cartographic.fromCartesian(y), v = this.previewLabelId || "measure_horizontal_preview";
3184
- this.previewLabelId = v, this.htmlLabelPool.add(
3234
+ ), C = e.Cartographic.fromCartesian(y), b = this.previewLabelId || "measure_horizontal_preview";
3235
+ this.previewLabelId = b, this.htmlLabelPool.add(
3185
3236
  { text: `${w.toFixed(2)} m` },
3186
3237
  {
3187
- id: v,
3238
+ id: b,
3188
3239
  lon: e.Math.toDegrees(C.longitude),
3189
3240
  lat: e.Math.toDegrees(C.latitude),
3190
3241
  height: C.height || this.firstHeight || 0,
@@ -3192,13 +3243,13 @@ class ht {
3192
3243
  show: !0
3193
3244
  }
3194
3245
  );
3195
- const b = ((L = (M = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : L.call(M, 0.9)) || e.Color.RED;
3246
+ const v = ((P = (M = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : P.call(M, 0.9)) || e.Color.RED;
3196
3247
  this.previewGroundEntity || (this.previewGroundEntity = i.entities.add({
3197
3248
  polyline: {
3198
3249
  positions: new e.CallbackProperty(() => !this.previewPos || !this.previewGroundPos ? [] : [this.previewGroundPos, this.previewPos], !1),
3199
3250
  width: t.width || 3,
3200
3251
  material: new e.PolylineDashMaterialProperty({
3201
- color: b,
3252
+ color: v,
3202
3253
  dashLength: 12,
3203
3254
  dashPattern: 255
3204
3255
  })
@@ -3209,7 +3260,7 @@ class ht {
3209
3260
  width: t.width || 3,
3210
3261
  material: t.lineColor || t.color || e.Color.YELLOW,
3211
3262
  depthFailMaterial: new e.PolylineDashMaterialProperty({
3212
- color: ((P = (E = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : P.call(E, 0.9)) || e.Color.RED,
3263
+ color: ((E = (L = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : E.call(L, 0.9)) || e.Color.RED,
3213
3264
  dashLength: 12,
3214
3265
  dashPattern: 255
3215
3266
  })
@@ -3231,14 +3282,14 @@ class ht {
3231
3282
  const w = s.overlayContainerId || "html-label-container";
3232
3283
  this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-horizontal-total", {
3233
3284
  createElement: (y, C) => {
3234
- var v;
3235
- y.innerHTML = String(((v = C == null ? void 0 : C.data) == null ? void 0 : v.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
3285
+ var b;
3286
+ y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
3236
3287
  },
3237
3288
  options: { offset: { x: 0, y: -10 } }
3238
3289
  }), this.htmlLabelPool.registerTheme("measure-horizontal-seg", {
3239
3290
  createElement: (y, C) => {
3240
- var v;
3241
- y.innerHTML = String(((v = C == null ? void 0 : C.data) == null ? void 0 : v.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
3291
+ var b;
3292
+ y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
3242
3293
  },
3243
3294
  options: { offset: { x: 0, y: -10 } }
3244
3295
  });
@@ -3246,17 +3297,17 @@ class ht {
3246
3297
  for (const w of c) {
3247
3298
  const y = r.entities.add({ position: w, point: { pixelSize: 8, color: s.pointColor || s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } });
3248
3299
  this.tempPoints.push(y);
3249
- const C = i.Cartographic.fromCartesian(w), v = i.Math.toDegrees(C.longitude), b = i.Math.toDegrees(C.latitude), M = r.scene.globe.getHeight(new i.Cartographic(C.longitude, C.latitude, 0)) || 0, L = i.Cartesian3.fromDegrees(v, b, M), E = r.entities.add({
3300
+ const C = i.Cartographic.fromCartesian(w), b = i.Math.toDegrees(C.longitude), v = i.Math.toDegrees(C.latitude), M = r.scene.globe.getHeight(new i.Cartographic(C.longitude, C.latitude, 0)) || 0, P = i.Cartesian3.fromDegrees(b, v, M), L = r.entities.add({
3250
3301
  polyline: {
3251
- positions: [L, w],
3302
+ positions: [P, w],
3252
3303
  width: l,
3253
3304
  material: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 })
3254
3305
  }
3255
3306
  });
3256
- this.groundLineEntities.push(E);
3307
+ this.groundLineEntities.push(L);
3257
3308
  }
3258
3309
  for (let w = 1; w < c.length; w++) {
3259
- const y = c[w - 1], C = c[w], v = r.entities.add({
3310
+ const y = c[w - 1], C = c[w], b = r.entities.add({
3260
3311
  polyline: {
3261
3312
  positions: [y, C],
3262
3313
  width: l,
@@ -3264,10 +3315,10 @@ class ht {
3264
3315
  depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 })
3265
3316
  }
3266
3317
  });
3267
- this.segmentEntities.push(v);
3268
- const b = i.Cartographic.fromCartesian(y), M = i.Cartographic.fromCartesian(C), E = new i.EllipsoidGeodesic(b, M).surfaceDistance, P = new i.Cartesian3((y.x + C.x) / 2, (y.y + C.y) / 2, (y.z + C.z) / 2), I = i.Cartographic.fromCartesian(P), x = t.id + `_seg_${w - 1}`;
3269
- this.segmentLabelIds.push(x), this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, {
3270
- id: x,
3318
+ this.segmentEntities.push(b);
3319
+ const v = i.Cartographic.fromCartesian(y), M = i.Cartographic.fromCartesian(C), L = new i.EllipsoidGeodesic(v, M).surfaceDistance, E = new i.Cartesian3((y.x + C.x) / 2, (y.y + C.y) / 2, (y.z + C.z) / 2), I = i.Cartographic.fromCartesian(E), D = t.id + `_seg_${w - 1}`;
3320
+ this.segmentLabelIds.push(D), this.htmlLabelPool.add({ text: `${L.toFixed(2)} m` }, {
3321
+ id: D,
3271
3322
  lon: i.Math.toDegrees(I.longitude),
3272
3323
  lat: i.Math.toDegrees(I.latitude),
3273
3324
  height: I.height || 0,
@@ -3278,8 +3329,8 @@ class ht {
3278
3329
  }
3279
3330
  let d = 0;
3280
3331
  for (let w = 1; w < c.length; w++) {
3281
- const y = i.Cartographic.fromCartesian(c[w - 1]), C = i.Cartographic.fromCartesian(c[w]), v = new i.EllipsoidGeodesic(y, C);
3282
- d += v.surfaceDistance;
3332
+ const y = i.Cartographic.fromCartesian(c[w - 1]), C = i.Cartographic.fromCartesian(c[w]), b = new i.EllipsoidGeodesic(y, C);
3333
+ d += b.surfaceDistance;
3283
3334
  }
3284
3335
  const u = c[c.length - 1], m = i.Cartographic.fromCartesian(u), g = t.id + "_total";
3285
3336
  this.totalLabelId = g, this.htmlLabelPool.add({ text: `${d.toFixed(2)} m` }, {
@@ -3360,20 +3411,20 @@ class ct {
3360
3411
  if (!this.baseCarto || !this.baseUp) return;
3361
3412
  const m = this.positions[0], g = i.camera.getPickRay(r.position);
3362
3413
  if (!g) return;
3363
- const p = g.origin, f = e.Cartesian3.normalize(g.direction, new e.Cartesian3()), w = m, y = this.baseUp, C = e.Cartesian3.subtract(p, w, new e.Cartesian3()), v = e.Cartesian3.dot(f, f), b = -e.Cartesian3.dot(f, y), M = e.Cartesian3.dot(y, y), L = -e.Cartesian3.dot(f, C), E = e.Cartesian3.dot(y, C), P = v * M - b * b;
3364
- if (Math.abs(P) < 1e-6) return;
3365
- const I = (v * E - b * L) / P, x = e.Cartesian3.add(
3414
+ const p = g.origin, f = e.Cartesian3.normalize(g.direction, new e.Cartesian3()), w = m, y = this.baseUp, C = e.Cartesian3.subtract(p, w, new e.Cartesian3()), b = e.Cartesian3.dot(f, f), v = -e.Cartesian3.dot(f, y), M = e.Cartesian3.dot(y, y), P = -e.Cartesian3.dot(f, C), L = e.Cartesian3.dot(y, C), E = b * M - v * v;
3415
+ if (Math.abs(E) < 1e-6) return;
3416
+ const I = (b * L - v * P) / E, D = e.Cartesian3.add(
3366
3417
  w,
3367
3418
  e.Cartesian3.multiplyByScalar(y, I, new e.Cartesian3()),
3368
3419
  new e.Cartesian3()
3369
3420
  );
3370
- this.positions[1] = x, this.stop(), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3371
- const D = t.lineColor || t.color || e.Color.CYAN, T = ((d = (c = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : d.call(c, 0.9)) || e.Color.RED;
3421
+ this.positions[1] = D, this.stop(), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3422
+ const S = t.lineColor || t.color || e.Color.CYAN, T = ((d = (c = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : d.call(c, 0.9)) || e.Color.RED;
3372
3423
  this.entity = i.entities.add({
3373
3424
  polyline: {
3374
- positions: [m, x],
3425
+ positions: [m, D],
3375
3426
  width: t.width || 3,
3376
- material: D,
3427
+ material: S,
3377
3428
  depthFailMaterial: new e.PolylineDashMaterialProperty({
3378
3429
  color: T,
3379
3430
  dashLength: 12,
@@ -3381,45 +3432,45 @@ class ct {
3381
3432
  })
3382
3433
  }
3383
3434
  });
3384
- const A = i.entities.add({
3385
- position: x,
3435
+ const _ = i.entities.add({
3436
+ position: D,
3386
3437
  point: {
3387
3438
  pixelSize: 8,
3388
3439
  color: t.pointColor || t.color || e.Color.YELLOW,
3389
3440
  disableDepthTestDistance: Number.POSITIVE_INFINITY
3390
3441
  }
3391
3442
  });
3392
- this.tempPoints.push(A);
3393
- const _ = this.baseCarto, $ = e.Cartographic.fromCartesian(x), S = Math.abs(($.height || 0) - (_.height || 0)), F = new e.Cartesian3(
3443
+ this.tempPoints.push(_);
3444
+ const x = this.baseCarto, A = e.Cartographic.fromCartesian(D), O = Math.abs((A.height || 0) - (x.height || 0)), $ = new e.Cartesian3(
3394
3445
  (this.positions[0].x + this.positions[1].x) / 2,
3395
3446
  (this.positions[0].y + this.positions[1].y) / 2,
3396
3447
  (this.positions[0].z + this.positions[1].z) / 2
3397
- ), O = e.Cartographic.fromCartesian(F);
3448
+ ), k = e.Cartographic.fromCartesian($);
3398
3449
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
3399
3450
  const j = this.htmlLabelId || `measure_vertical_${Date.now()}`;
3400
3451
  this.htmlLabelId = j, this.htmlLabelPool.add(
3401
- { text: `${S.toFixed(2)} m` },
3452
+ { text: `${O.toFixed(2)} m` },
3402
3453
  {
3403
3454
  id: j,
3404
- lon: e.Math.toDegrees(O.longitude),
3405
- lat: e.Math.toDegrees(O.latitude),
3406
- height: O.height || 0,
3455
+ lon: e.Math.toDegrees(k.longitude),
3456
+ lat: e.Math.toDegrees(k.latitude),
3457
+ height: k.height || 0,
3407
3458
  theme: "measure-vertical",
3408
3459
  show: !0,
3409
3460
  style: { pointerEvents: "none", userSelect: "none", cursor: "default" }
3410
3461
  }
3411
3462
  );
3412
- const R = {
3463
+ const Y = {
3413
3464
  entity: this.entity,
3414
3465
  label: this.labelEntity,
3415
3466
  positions: this.positions,
3416
- vertical: S,
3467
+ vertical: O,
3417
3468
  clear: () => this.clear()
3418
3469
  };
3419
- (u = t.onComplete) == null || u.call(t, R);
3470
+ (u = t.onComplete) == null || u.call(t, Y);
3420
3471
  }
3421
3472
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((r) => {
3422
- var x, D;
3473
+ var D, S;
3423
3474
  if (this.positions.length < 1) return;
3424
3475
  if (!this.baseCarto || !this.baseUp) {
3425
3476
  const T = e.Cartographic.fromCartesian(this.positions[0]);
@@ -3429,46 +3480,46 @@ class ct {
3429
3480
  if (!o) return;
3430
3481
  const n = o.origin, l = e.Cartesian3.normalize(o.direction, new e.Cartesian3()), c = s, d = this.baseUp, u = e.Cartesian3.subtract(n, c, new e.Cartesian3()), m = e.Cartesian3.dot(l, l), g = -e.Cartesian3.dot(l, d), p = e.Cartesian3.dot(d, d), f = -e.Cartesian3.dot(l, u), w = e.Cartesian3.dot(d, u), y = m * p - g * g;
3431
3482
  if (Math.abs(y) < 1e-6) return;
3432
- const C = (m * w - g * f) / y, v = e.Cartesian3.add(
3483
+ const C = (m * w - g * f) / y, b = e.Cartesian3.add(
3433
3484
  c,
3434
3485
  e.Cartesian3.multiplyByScalar(d, C, new e.Cartesian3()),
3435
3486
  new e.Cartesian3()
3436
3487
  );
3437
- if (this.positions[1] = v, !this.previewEntity) {
3438
- const T = t.lineColor || t.color || e.Color.CYAN, A = ((D = (x = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : D.call(x, 0.9)) || e.Color.RED;
3488
+ if (this.positions[1] = b, !this.previewEntity) {
3489
+ const T = t.lineColor || t.color || e.Color.CYAN, _ = ((S = (D = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : S.call(D, 0.9)) || e.Color.RED;
3439
3490
  this.previewEntity = i.entities.add({
3440
3491
  polyline: {
3441
3492
  positions: new e.CallbackProperty(() => this.positions.length < 2 ? [] : [this.positions[0], this.positions[1]], !1),
3442
3493
  width: t.width || 3,
3443
3494
  material: T,
3444
3495
  depthFailMaterial: new e.PolylineDashMaterialProperty({
3445
- color: A,
3496
+ color: _,
3446
3497
  dashLength: 12,
3447
3498
  dashPattern: 255
3448
3499
  })
3449
3500
  }
3450
3501
  });
3451
3502
  }
3452
- this.previewPointEntity ? this.previewPointEntity.position = v : this.previewPointEntity = i.entities.add({
3453
- position: v,
3503
+ this.previewPointEntity ? this.previewPointEntity.position = b : this.previewPointEntity = i.entities.add({
3504
+ position: b,
3454
3505
  point: {
3455
3506
  pixelSize: 8,
3456
3507
  color: t.pointColor || t.color || e.Color.YELLOW,
3457
3508
  disableDepthTestDistance: Number.POSITIVE_INFINITY
3458
3509
  }
3459
3510
  });
3460
- const b = this.baseCarto, M = e.Cartographic.fromCartesian(v), L = Math.abs((M.height || 0) - (b.height || 0)), E = new e.Cartesian3(
3461
- (this.positions[0].x + v.x) / 2,
3462
- (this.positions[0].y + v.y) / 2,
3463
- (this.positions[0].z + v.z) / 2
3464
- ), P = e.Cartographic.fromCartesian(E), I = this.previewLabelId || "measure_vertical_preview";
3511
+ const v = this.baseCarto, M = e.Cartographic.fromCartesian(b), P = Math.abs((M.height || 0) - (v.height || 0)), L = new e.Cartesian3(
3512
+ (this.positions[0].x + b.x) / 2,
3513
+ (this.positions[0].y + b.y) / 2,
3514
+ (this.positions[0].z + b.z) / 2
3515
+ ), E = e.Cartographic.fromCartesian(L), I = this.previewLabelId || "measure_vertical_preview";
3465
3516
  this.previewLabelId = I, this.htmlLabelPool.add(
3466
- { text: `${L.toFixed(2)} m` },
3517
+ { text: `${P.toFixed(2)} m` },
3467
3518
  {
3468
3519
  id: I,
3469
- lon: e.Math.toDegrees(P.longitude),
3470
- lat: e.Math.toDegrees(P.latitude),
3471
- height: P.height || 0,
3520
+ lon: e.Math.toDegrees(E.longitude),
3521
+ lat: e.Math.toDegrees(E.latitude),
3522
+ height: E.height || 0,
3472
3523
  theme: "measure-vertical",
3473
3524
  show: !0,
3474
3525
  style: { pointerEvents: "none", userSelect: "none", cursor: "default" }
@@ -3483,24 +3534,24 @@ class ct {
3483
3534
  this.stop(), this.entity && (this.viewer.entities.remove(this.entity), this.entity = null), this.labelEntity && (this.viewer.entities.remove(this.labelEntity), this.labelEntity = null), this.tempPoints.forEach((t) => this.viewer.entities.remove(t)), this.tempPoints = [], this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.htmlLabelPool && this.htmlLabelId && (this.htmlLabelPool.removeByIds([this.htmlLabelId]), this.htmlLabelId = null), this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null), this.positions = [];
3484
3535
  }
3485
3536
  rehydrate(t, e) {
3486
- var b, M;
3487
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.CYAN, n = ((M = (b = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : M.call(b, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((L) => new i.Cartesian3(L[0], L[1], L[2]));
3537
+ var v, M;
3538
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.CYAN, n = ((M = (v = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : M.call(v, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((P) => new i.Cartesian3(P[0], P[1], P[2]));
3488
3539
  if (c.length < 2) return;
3489
3540
  if (!this.htmlLabelPool) {
3490
- const L = s.overlayContainerId || "html-label-container";
3491
- this.htmlLabelPool = e || new G(i, r, L), this.htmlLabelPool.registerTheme("measure-vertical", {
3492
- createElement: (E, P) => {
3541
+ const P = s.overlayContainerId || "html-label-container";
3542
+ this.htmlLabelPool = e || new G(i, r, P), this.htmlLabelPool.registerTheme("measure-vertical", {
3543
+ createElement: (L, E) => {
3493
3544
  var I;
3494
- E.innerHTML = String(((I = P == null ? void 0 : P.data) == null ? void 0 : I.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
3545
+ L.innerHTML = String(((I = E == null ? void 0 : E.data) == null ? void 0 : I.text) || ""), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
3495
3546
  },
3496
3547
  options: { offset: { x: 0, y: -10 } }
3497
3548
  });
3498
3549
  }
3499
3550
  const d = c[0], u = c[1], m = r.entities.add({ position: d, point: { pixelSize: 8, color: s.pointColor || s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } }), g = r.entities.add({ position: u, point: { pixelSize: 8, color: s.pointColor || s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } });
3500
3551
  this.tempPoints.push(m), this.tempPoints.push(g), this.entity = r.entities.add({ polyline: { positions: [d, u], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
3501
- const p = i.Cartographic.fromCartesian(d), f = i.Cartographic.fromCartesian(u), w = Math.abs((f.height || 0) - (p.height || 0)), y = new i.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), C = i.Cartographic.fromCartesian(y), v = t.id + "_label";
3502
- this.htmlLabelId = v, this.htmlLabelPool.add({ text: `${w.toFixed(2)} m` }, {
3503
- id: v,
3552
+ const p = i.Cartographic.fromCartesian(d), f = i.Cartographic.fromCartesian(u), w = Math.abs((f.height || 0) - (p.height || 0)), y = new i.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), C = i.Cartographic.fromCartesian(y), b = t.id + "_label";
3553
+ this.htmlLabelId = b, this.htmlLabelPool.add({ text: `${w.toFixed(2)} m` }, {
3554
+ id: b,
3504
3555
  lon: i.Math.toDegrees(C.longitude),
3505
3556
  lat: i.Math.toDegrees(C.latitude),
3506
3557
  height: C.height || 0,
@@ -3574,89 +3625,89 @@ class dt {
3574
3625
  }
3575
3626
  });
3576
3627
  if (this.pointEntities.push(o), this.positions.length === 2) {
3577
- this.stop(), this.previewSegmentEntities.forEach((X) => i.entities.remove(X)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((X) => i.entities.remove(X)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (i.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3628
+ this.stop(), this.previewSegmentEntities.forEach((J) => i.entities.remove(J)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((J) => i.entities.remove(J)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (i.entities.remove(this.previewPointEntity), this.previewPointEntity = null);
3578
3629
  const d = e.Cartographic.fromCartesian(this.positions[0]), u = e.Cartographic.fromCartesian(this.positions[1]), m = d.height || 0, g = u.height || 0, p = m <= g ? this.positions[0] : this.positions[1], f = m > g ? this.positions[0] : this.positions[1], w = e.Cartographic.fromCartesian(p);
3579
3630
  e.Cartographic.fromCartesian(f);
3580
3631
  const y = Math.max(m, g), C = e.Cartesian3.fromDegrees(
3581
3632
  e.Math.toDegrees(w.longitude),
3582
3633
  e.Math.toDegrees(w.latitude),
3583
3634
  y
3584
- ), v = t.lineColor || t.color || e.Color.YELLOW, b = ((l = (n = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : l.call(n, 0.9)) || e.Color.RED, M = i.entities.add({
3635
+ ), b = t.lineColor || t.color || e.Color.YELLOW, v = ((l = (n = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : l.call(n, 0.9)) || e.Color.RED, M = i.entities.add({
3585
3636
  polyline: {
3586
3637
  positions: [p, C],
3587
3638
  width: t.width || 3,
3588
- material: v,
3589
- depthFailMaterial: new e.PolylineDashMaterialProperty({ color: b, dashLength: 12, dashPattern: 255 })
3639
+ material: b,
3640
+ depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3590
3641
  }
3591
- }), L = i.entities.add({
3642
+ }), P = i.entities.add({
3592
3643
  polyline: {
3593
3644
  positions: [C, f],
3594
3645
  width: t.width || 3,
3595
- material: v,
3596
- depthFailMaterial: new e.PolylineDashMaterialProperty({ color: b, dashLength: 12, dashPattern: 255 })
3646
+ material: b,
3647
+ depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3597
3648
  }
3598
- }), E = i.entities.add({
3649
+ }), L = i.entities.add({
3599
3650
  polyline: {
3600
3651
  positions: [p, f],
3601
3652
  width: t.width || 3,
3602
- material: v,
3603
- depthFailMaterial: new e.PolylineDashMaterialProperty({ color: b, dashLength: 12, dashPattern: 255 })
3653
+ material: b,
3654
+ depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3604
3655
  }
3605
3656
  });
3606
- this.segmentEntities.push(M, L, E);
3607
- const P = e.Cartesian3.distance(p, C), I = e.Cartesian3.distance(C, f), x = e.Cartesian3.distance(p, f), D = new e.Cartesian3((p.x + C.x) / 2, (p.y + C.y) / 2, (p.z + C.z) / 2), T = new e.Cartesian3((C.x + f.x) / 2, (C.y + f.y) / 2, (C.z + f.z) / 2), A = new e.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), _ = e.Cartographic.fromCartesian(D), $ = e.Cartographic.fromCartesian(T), S = e.Cartographic.fromCartesian(A), F = "measure_triangle_seg_v", O = "measure_triangle_seg_h", j = "measure_triangle_seg_hyp";
3608
- this.segmentLabelIds = [F, O, j], this.htmlLabelPool.add({ text: `${P.toFixed(2)} m` }, { id: F, lon: e.Math.toDegrees(_.longitude), lat: e.Math.toDegrees(_.latitude), height: _.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: O, lon: e.Math.toDegrees($.longitude), lat: e.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${x.toFixed(2)} m` }, { id: j, lon: e.Math.toDegrees(S.longitude), lat: e.Math.toDegrees(S.latitude), height: S.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3609
- const R = e.Cartesian3.subtract(f, p, new e.Cartesian3()), B = e.Cartesian3.subtract(C, p, new e.Cartesian3()), Y = e.Cartesian3.subtract(C, f, new e.Cartesian3()), z = e.Cartesian3.subtract(p, f, new e.Cartesian3()), J = e.Cartesian3.dot(R, B), oe = Math.sqrt(e.Cartesian3.dot(R, R)) * Math.sqrt(e.Cartesian3.dot(B, B)), ue = e.Cartesian3.dot(Y, z), Ce = Math.sqrt(e.Cartesian3.dot(Y, Y)) * Math.sqrt(e.Cartesian3.dot(z, z)), V = Math.acos(Math.min(Math.max(J / (oe || 1), -1), 1)), he = Math.acos(Math.min(Math.max(ue / (Ce || 1), -1), 1)), te = e.Cartographic.fromCartesian(p), W = e.Cartographic.fromCartesian(f), Q = "measure_triangle_angle_a", re = "measure_triangle_angle_b";
3610
- this.angleLabelIds = [Q, re], this.htmlLabelPool.add({ text: `${(V * 180 / Math.PI).toFixed(2)}°` }, { id: Q, lon: e.Math.toDegrees(te.longitude), lat: e.Math.toDegrees(te.latitude), height: te.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(he * 180 / Math.PI).toFixed(2)}°` }, { id: re, lon: e.Math.toDegrees(W.longitude), lat: e.Math.toDegrees(W.latitude), height: W.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3611
- const me = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), U = Math.min(P, I) * me;
3612
- if (P > 1e-3 && I > 1e-3) {
3613
- const X = e.Cartesian3.normalize(
3657
+ this.segmentEntities.push(M, P, L);
3658
+ const E = e.Cartesian3.distance(p, C), I = e.Cartesian3.distance(C, f), D = e.Cartesian3.distance(p, f), S = new e.Cartesian3((p.x + C.x) / 2, (p.y + C.y) / 2, (p.z + C.z) / 2), T = new e.Cartesian3((C.x + f.x) / 2, (C.y + f.y) / 2, (C.z + f.z) / 2), _ = new e.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = e.Cartographic.fromCartesian(S), A = e.Cartographic.fromCartesian(T), O = e.Cartographic.fromCartesian(_), $ = "measure_triangle_seg_v", k = "measure_triangle_seg_h", j = "measure_triangle_seg_hyp";
3659
+ this.segmentLabelIds = [$, k, j], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: e.Math.toDegrees(x.longitude), lat: e.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: e.Math.toDegrees(A.longitude), lat: e.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${D.toFixed(2)} m` }, { id: j, lon: e.Math.toDegrees(O.longitude), lat: e.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3660
+ const Y = e.Cartesian3.subtract(f, p, new e.Cartesian3()), B = e.Cartesian3.subtract(C, p, new e.Cartesian3()), V = e.Cartesian3.subtract(C, f, new e.Cartesian3()), R = e.Cartesian3.subtract(p, f, new e.Cartesian3()), se = e.Cartesian3.dot(Y, B), W = Math.sqrt(e.Cartesian3.dot(Y, Y)) * Math.sqrt(e.Cartesian3.dot(B, B)), ne = e.Cartesian3.dot(V, R), de = Math.sqrt(e.Cartesian3.dot(V, V)) * Math.sqrt(e.Cartesian3.dot(R, R)), H = Math.acos(Math.min(Math.max(se / (W || 1), -1), 1)), te = Math.acos(Math.min(Math.max(ne / (de || 1), -1), 1)), ee = e.Cartographic.fromCartesian(p), U = e.Cartographic.fromCartesian(f), Q = "measure_triangle_angle_a", ae = "measure_triangle_angle_b";
3661
+ this.angleLabelIds = [Q, ae], this.htmlLabelPool.add({ text: `${(H * 180 / Math.PI).toFixed(2)}°` }, { id: Q, lon: e.Math.toDegrees(ee.longitude), lat: e.Math.toDegrees(ee.latitude), height: ee.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(te * 180 / Math.PI).toFixed(2)}°` }, { id: ae, lon: e.Math.toDegrees(U.longitude), lat: e.Math.toDegrees(U.latitude), height: U.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3662
+ const ge = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), q = Math.min(E, I) * ge;
3663
+ if (E > 1e-3 && I > 1e-3) {
3664
+ const J = e.Cartesian3.normalize(
3614
3665
  e.Cartesian3.subtract(p, C, new e.Cartesian3()),
3615
3666
  new e.Cartesian3()
3616
- ), ne = e.Cartesian3.normalize(
3667
+ ), le = e.Cartesian3.normalize(
3617
3668
  e.Cartesian3.subtract(f, C, new e.Cartesian3()),
3618
3669
  new e.Cartesian3()
3619
3670
  ), Z = new e.Cartesian3(
3620
- C.x + X.x * U,
3621
- C.y + X.y * U,
3622
- C.z + X.z * U
3623
- ), k = new e.Cartesian3(
3624
- C.x + ne.x * U,
3625
- C.y + ne.y * U,
3626
- C.z + ne.z * U
3627
- ), K = new e.Cartesian3(
3628
- C.x + X.x * U + ne.x * U,
3629
- C.y + X.y * U + ne.y * U,
3630
- C.z + X.z * U + ne.z * U
3631
- ), ee = i.entities.add({
3671
+ C.x + J.x * q,
3672
+ C.y + J.y * q,
3673
+ C.z + J.z * q
3674
+ ), F = new e.Cartesian3(
3675
+ C.x + le.x * q,
3676
+ C.y + le.y * q,
3677
+ C.z + le.z * q
3678
+ ), X = new e.Cartesian3(
3679
+ C.x + J.x * q + le.x * q,
3680
+ C.y + J.y * q + le.y * q,
3681
+ C.z + J.z * q + le.z * q
3682
+ ), ie = i.entities.add({
3632
3683
  polyline: {
3633
- positions: [Z, K],
3684
+ positions: [Z, X],
3634
3685
  width: t.width || 3,
3635
- material: v,
3636
- depthFailMaterial: new e.PolylineDashMaterialProperty({ color: b, dashLength: 12, dashPattern: 255 })
3686
+ material: b,
3687
+ depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3637
3688
  }
3638
3689
  }), Ie = i.entities.add({
3639
3690
  polyline: {
3640
- positions: [k, K],
3691
+ positions: [F, X],
3641
3692
  width: t.width || 3,
3642
- material: v,
3643
- depthFailMaterial: new e.PolylineDashMaterialProperty({ color: b, dashLength: 12, dashPattern: 255 })
3693
+ material: b,
3694
+ depthFailMaterial: new e.PolylineDashMaterialProperty({ color: v, dashLength: 12, dashPattern: 255 })
3644
3695
  }
3645
3696
  });
3646
- this.angleMarkerEntities.push(ee, Ie);
3697
+ this.angleMarkerEntities.push(ie, Ie);
3647
3698
  }
3648
3699
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
3649
- const q = {
3700
+ const K = {
3650
3701
  entity: this.segmentEntities,
3651
3702
  positions: [p, f, C],
3652
- lengths: { vertical: P, horizontal: I, hypotenuse: x },
3653
- angles: { acuteA: V, acuteB: he },
3703
+ lengths: { vertical: E, horizontal: I, hypotenuse: D },
3704
+ angles: { acuteA: H, acuteB: te },
3654
3705
  clear: () => this.clear()
3655
3706
  };
3656
- (c = t.onComplete) == null || c.call(t, q);
3707
+ (c = t.onComplete) == null || c.call(t, K);
3657
3708
  }
3658
3709
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((r) => {
3659
- var he, te;
3710
+ var te, ee;
3660
3711
  if (this.positions.length !== 1) return;
3661
3712
  const s = i.scene.pickPosition(r.endPosition);
3662
3713
  if (!s) return;
@@ -3666,7 +3717,7 @@ class dt {
3666
3717
  g
3667
3718
  );
3668
3719
  this.previewLow = d, this.previewHigh = u, this.previewThird = p;
3669
- const f = t.lineColor || t.color || e.Color.YELLOW, w = ((te = (he = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : te.call(he, 0.9)) || e.Color.RED;
3720
+ const f = t.lineColor || t.color || e.Color.YELLOW, w = ((ee = (te = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : ee.call(te, 0.9)) || e.Color.RED;
3670
3721
  if (this.previewPointEntity ? this.previewPointEntity.position = s : this.previewPointEntity = i.entities.add({
3671
3722
  position: s,
3672
3723
  point: {
@@ -3675,7 +3726,7 @@ class dt {
3675
3726
  disableDepthTestDistance: Number.POSITIVE_INFINITY
3676
3727
  }
3677
3728
  }), !this.previewSegmentEntities.length) {
3678
- const W = i.entities.add({
3729
+ const U = i.entities.add({
3679
3730
  polyline: {
3680
3731
  positions: new e.CallbackProperty(() => !this.previewLow || !this.previewThird ? [] : [this.previewLow, this.previewThird], !1),
3681
3732
  width: t.width || 3,
@@ -3689,7 +3740,7 @@ class dt {
3689
3740
  material: f,
3690
3741
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3691
3742
  }
3692
- }), re = i.entities.add({
3743
+ }), ae = i.entities.add({
3693
3744
  polyline: {
3694
3745
  positions: new e.CallbackProperty(() => !this.previewLow || !this.previewHigh ? [] : [this.previewLow, this.previewHigh], !1),
3695
3746
  width: t.width || 3,
@@ -3697,40 +3748,40 @@ class dt {
3697
3748
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3698
3749
  }
3699
3750
  });
3700
- this.previewSegmentEntities.push(W, Q, re);
3751
+ this.previewSegmentEntities.push(U, Q, ae);
3701
3752
  }
3702
- const y = e.Cartesian3.distance(d, p), C = e.Cartesian3.distance(p, u), v = e.Cartesian3.distance(d, u), b = e.Cartesian3.subtract(u, d, new e.Cartesian3()), M = e.Cartesian3.subtract(p, d, new e.Cartesian3()), L = e.Cartesian3.subtract(p, u, new e.Cartesian3()), E = e.Cartesian3.subtract(d, u, new e.Cartesian3()), P = e.Cartesian3.dot(b, M), I = Math.sqrt(e.Cartesian3.dot(b, b)) * Math.sqrt(e.Cartesian3.dot(M, M)), x = e.Cartesian3.dot(L, E), D = Math.sqrt(e.Cartesian3.dot(L, L)) * Math.sqrt(e.Cartesian3.dot(E, E)), T = Math.acos(Math.min(Math.max(P / (I || 1), -1), 1)), A = Math.acos(Math.min(Math.max(x / (D || 1), -1), 1)), _ = new e.Cartesian3((d.x + p.x) / 2, (d.y + p.y) / 2, (d.z + p.z) / 2), $ = new e.Cartesian3((p.x + u.x) / 2, (p.y + u.y) / 2, (p.z + u.z) / 2), S = new e.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), F = e.Cartographic.fromCartesian(_), O = e.Cartographic.fromCartesian($), j = e.Cartographic.fromCartesian(S), R = e.Cartographic.fromCartesian(d), B = e.Cartographic.fromCartesian(u), Y = "measure_triangle_seg_v", z = "measure_triangle_seg_h", J = "measure_triangle_seg_hyp", oe = "measure_triangle_angle_a", ue = "measure_triangle_angle_b";
3703
- this.segmentLabelIds.length === 0 && (this.segmentLabelIds = [Y, z, J]), this.angleLabelIds.length === 0 && (this.angleLabelIds = [oe, ue]), this.htmlLabelPool.add({ text: `${y.toFixed(2)} m` }, { id: Y, lon: e.Math.toDegrees(F.longitude), lat: e.Math.toDegrees(F.latitude), height: F.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${C.toFixed(2)} m` }, { id: z, lon: e.Math.toDegrees(O.longitude), lat: e.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${v.toFixed(2)} m` }, { id: J, lon: e.Math.toDegrees(j.longitude), lat: e.Math.toDegrees(j.latitude), height: j.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(T * 180 / Math.PI).toFixed(2)}°` }, { id: oe, lon: e.Math.toDegrees(R.longitude), lat: e.Math.toDegrees(R.latitude), height: R.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(A * 180 / Math.PI).toFixed(2)}°` }, { id: ue, lon: e.Math.toDegrees(B.longitude), lat: e.Math.toDegrees(B.latitude), height: B.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3704
- const Ce = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), V = Math.min(y, C) * Ce;
3753
+ const y = e.Cartesian3.distance(d, p), C = e.Cartesian3.distance(p, u), b = e.Cartesian3.distance(d, u), v = e.Cartesian3.subtract(u, d, new e.Cartesian3()), M = e.Cartesian3.subtract(p, d, new e.Cartesian3()), P = e.Cartesian3.subtract(p, u, new e.Cartesian3()), L = e.Cartesian3.subtract(d, u, new e.Cartesian3()), E = e.Cartesian3.dot(v, M), I = Math.sqrt(e.Cartesian3.dot(v, v)) * Math.sqrt(e.Cartesian3.dot(M, M)), D = e.Cartesian3.dot(P, L), S = Math.sqrt(e.Cartesian3.dot(P, P)) * Math.sqrt(e.Cartesian3.dot(L, L)), T = Math.acos(Math.min(Math.max(E / (I || 1), -1), 1)), _ = Math.acos(Math.min(Math.max(D / (S || 1), -1), 1)), x = new e.Cartesian3((d.x + p.x) / 2, (d.y + p.y) / 2, (d.z + p.z) / 2), A = new e.Cartesian3((p.x + u.x) / 2, (p.y + u.y) / 2, (p.z + u.z) / 2), O = new e.Cartesian3((d.x + u.x) / 2, (d.y + u.y) / 2, (d.z + u.z) / 2), $ = e.Cartographic.fromCartesian(x), k = e.Cartographic.fromCartesian(A), j = e.Cartographic.fromCartesian(O), Y = e.Cartographic.fromCartesian(d), B = e.Cartographic.fromCartesian(u), V = "measure_triangle_seg_v", R = "measure_triangle_seg_h", se = "measure_triangle_seg_hyp", W = "measure_triangle_angle_a", ne = "measure_triangle_angle_b";
3754
+ this.segmentLabelIds.length === 0 && (this.segmentLabelIds = [V, R, se]), this.angleLabelIds.length === 0 && (this.angleLabelIds = [W, ne]), this.htmlLabelPool.add({ text: `${y.toFixed(2)} m` }, { id: V, lon: e.Math.toDegrees($.longitude), lat: e.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${C.toFixed(2)} m` }, { id: R, lon: e.Math.toDegrees(k.longitude), lat: e.Math.toDegrees(k.latitude), height: k.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${b.toFixed(2)} m` }, { id: se, lon: e.Math.toDegrees(j.longitude), lat: e.Math.toDegrees(j.latitude), height: j.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(T * 180 / Math.PI).toFixed(2)}°` }, { id: W, lon: e.Math.toDegrees(Y.longitude), lat: e.Math.toDegrees(Y.latitude), height: Y.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${(_ * 180 / Math.PI).toFixed(2)}°` }, { id: ne, lon: e.Math.toDegrees(B.longitude), lat: e.Math.toDegrees(B.latitude), height: B.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3755
+ const de = Math.max(0.01, Math.min(0.5, t.angleMarkerRatio ?? 0.2)), H = Math.min(y, C) * de;
3705
3756
  if (y > 1e-3 && C > 1e-3) {
3706
- const W = e.Cartesian3.normalize(
3757
+ const U = e.Cartesian3.normalize(
3707
3758
  e.Cartesian3.subtract(d, p, new e.Cartesian3()),
3708
3759
  new e.Cartesian3()
3709
3760
  ), Q = e.Cartesian3.normalize(
3710
3761
  e.Cartesian3.subtract(u, p, new e.Cartesian3()),
3711
3762
  new e.Cartesian3()
3712
- ), re = new e.Cartesian3(
3713
- p.x + W.x * V,
3714
- p.y + W.y * V,
3715
- p.z + W.z * V
3716
- ), me = new e.Cartesian3(
3717
- p.x + Q.x * V,
3718
- p.y + Q.y * V,
3719
- p.z + Q.z * V
3720
- ), U = new e.Cartesian3(
3721
- p.x + W.x * V + Q.x * V,
3722
- p.y + W.y * V + Q.y * V,
3723
- p.z + W.z * V + Q.z * V
3763
+ ), ae = new e.Cartesian3(
3764
+ p.x + U.x * H,
3765
+ p.y + U.y * H,
3766
+ p.z + U.z * H
3767
+ ), ge = new e.Cartesian3(
3768
+ p.x + Q.x * H,
3769
+ p.y + Q.y * H,
3770
+ p.z + Q.z * H
3771
+ ), q = new e.Cartesian3(
3772
+ p.x + U.x * H + Q.x * H,
3773
+ p.y + U.y * H + Q.y * H,
3774
+ p.z + U.z * H + Q.z * H
3724
3775
  );
3725
- if (this.previewMarkerP1 = re, this.previewMarkerP2 = me, this.previewMarkerCorner = U, !this.previewAngleMarkerEntities.length) {
3726
- const q = i.entities.add({
3776
+ if (this.previewMarkerP1 = ae, this.previewMarkerP2 = ge, this.previewMarkerCorner = q, !this.previewAngleMarkerEntities.length) {
3777
+ const K = i.entities.add({
3727
3778
  polyline: {
3728
3779
  positions: new e.CallbackProperty(() => !this.previewMarkerP1 || !this.previewMarkerCorner ? [] : [this.previewMarkerP1, this.previewMarkerCorner], !1),
3729
3780
  width: t.width || 3,
3730
3781
  material: f,
3731
3782
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3732
3783
  }
3733
- }), X = i.entities.add({
3784
+ }), J = i.entities.add({
3734
3785
  polyline: {
3735
3786
  positions: new e.CallbackProperty(() => !this.previewMarkerP2 || !this.previewMarkerCorner ? [] : [this.previewMarkerP2, this.previewMarkerCorner], !1),
3736
3787
  width: t.width || 3,
@@ -3738,7 +3789,7 @@ class dt {
3738
3789
  depthFailMaterial: new e.PolylineDashMaterialProperty({ color: w, dashLength: 12, dashPattern: 255 })
3739
3790
  }
3740
3791
  });
3741
- this.previewAngleMarkerEntities.push(q, X);
3792
+ this.previewAngleMarkerEntities.push(K, J);
3742
3793
  }
3743
3794
  }
3744
3795
  }, e.ScreenSpaceEventType.MOUSE_MOVE);
@@ -3750,52 +3801,52 @@ class dt {
3750
3801
  this.stop(), this.segmentEntities.forEach((t) => this.viewer.entities.remove(t)), this.segmentEntities = [], this.angleMarkerEntities.forEach((t) => this.viewer.entities.remove(t)), this.angleMarkerEntities = [], this.pointEntities.forEach((t) => this.viewer.entities.remove(t)), this.pointEntities = [], this.previewSegmentEntities.forEach((t) => this.viewer.entities.remove(t)), this.previewSegmentEntities = [], this.previewAngleMarkerEntities.forEach((t) => this.viewer.entities.remove(t)), this.previewAngleMarkerEntities = [], this.previewPointEntity && (this.viewer.entities.remove(this.previewPointEntity), this.previewPointEntity = null), this.htmlLabelPool && this.htmlLabelId && (this.htmlLabelPool.removeByIds([this.htmlLabelId]), this.htmlLabelId = null), this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null), this.segmentLabelIds.length && this.htmlLabelPool && this.htmlLabelPool.removeByIds(this.segmentLabelIds.slice()), this.angleLabelIds.length && this.htmlLabelPool && this.htmlLabelPool.removeByIds(this.angleLabelIds.slice()), this.segmentLabelIds = [], this.angleLabelIds = [], this.positions = [];
3751
3802
  }
3752
3803
  rehydrate(t, e) {
3753
- var X, ne;
3754
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.YELLOW, n = ((ne = (X = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : ne.call(X, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((Z) => new i.Cartesian3(Z[0], Z[1], Z[2]));
3804
+ var J, le;
3805
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = s.lineColor || s.color || i.Color.YELLOW, n = ((le = (J = s.dashLineColor || s.lineColor || s.color || i.Color.RED).withAlpha) == null ? void 0 : le.call(J, 0.9)) || i.Color.RED, l = s.width || 3, c = (t.positions || []).map((Z) => new i.Cartesian3(Z[0], Z[1], Z[2]));
3755
3806
  if (c.length < 2) return;
3756
3807
  if (!this.htmlLabelPool) {
3757
3808
  const Z = s.overlayContainerId || "html-label-container";
3758
3809
  this.htmlLabelPool = e || new G(i, r, Z), this.htmlLabelPool.registerTheme("measure-triangle", {
3759
- createElement: (k, K) => {
3760
- var ee;
3761
- k.innerHTML = String(((ee = K == null ? void 0 : K.data) == null ? void 0 : ee.text) || ""), k.style.background = "rgba(0,0,0,0.6)", k.style.color = "#fff", k.style.font = "14px sans-serif", k.style.padding = "4px 6px", k.style.borderRadius = "4px", k.style.whiteSpace = "pre";
3810
+ createElement: (F, X) => {
3811
+ var ie;
3812
+ F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3762
3813
  },
3763
3814
  options: { offset: { x: 0, y: -10 } }
3764
3815
  }), this.htmlLabelPool.registerTheme("measure-triangle-seg", {
3765
- createElement: (k, K) => {
3766
- var ee;
3767
- k.innerHTML = String(((ee = K == null ? void 0 : K.data) == null ? void 0 : ee.text) || ""), k.style.background = "rgba(0,0,0,0.6)", k.style.color = "#fff", k.style.font = "14px sans-serif", k.style.padding = "4px 6px", k.style.borderRadius = "4px", k.style.whiteSpace = "pre";
3816
+ createElement: (F, X) => {
3817
+ var ie;
3818
+ F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3768
3819
  },
3769
3820
  options: { offset: { x: 0, y: -10 } }
3770
3821
  }), this.htmlLabelPool.registerTheme("measure-triangle-angle", {
3771
- createElement: (k, K) => {
3772
- var ee;
3773
- k.innerHTML = String(((ee = K == null ? void 0 : K.data) == null ? void 0 : ee.text) || ""), k.style.background = "rgba(0,0,0,0.6)", k.style.color = "#fff", k.style.font = "14px sans-serif", k.style.padding = "4px 6px", k.style.borderRadius = "4px", k.style.whiteSpace = "pre";
3822
+ createElement: (F, X) => {
3823
+ var ie;
3824
+ F.innerHTML = String(((ie = X == null ? void 0 : X.data) == null ? void 0 : ie.text) || ""), F.style.background = "rgba(0,0,0,0.6)", F.style.color = "#fff", F.style.font = "14px sans-serif", F.style.padding = "4px 6px", F.style.borderRadius = "4px", F.style.whiteSpace = "pre";
3774
3825
  },
3775
3826
  options: { offset: { x: 0, y: -10 } }
3776
3827
  });
3777
3828
  }
3778
3829
  const d = i.Cartographic.fromCartesian(c[0]), u = i.Cartographic.fromCartesian(c[1]), m = d.height || 0, g = u.height || 0, p = m <= g ? c[0] : c[1], f = m > g ? c[0] : c[1], w = r.entities.add({ position: p, point: { pixelSize: 8, color: s.pointColor || s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } }), y = r.entities.add({ position: f, point: { pixelSize: 8, color: s.pointColor || s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } });
3779
3830
  this.pointEntities.push(w, y);
3780
- const C = i.Cartographic.fromCartesian(p), v = Math.max(m, g), b = i.Cartesian3.fromDegrees(
3831
+ const C = i.Cartographic.fromCartesian(p), b = Math.max(m, g), v = i.Cartesian3.fromDegrees(
3781
3832
  i.Math.toDegrees(C.longitude),
3782
3833
  i.Math.toDegrees(C.latitude),
3783
- v
3834
+ b
3784
3835
  ), M = r.entities.add({
3785
- polyline: { positions: [p, b], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3836
+ polyline: { positions: [p, v], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3837
+ }), P = r.entities.add({
3838
+ polyline: { positions: [v, f], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3786
3839
  }), L = r.entities.add({
3787
- polyline: { positions: [b, f], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3788
- }), E = r.entities.add({
3789
3840
  polyline: { positions: [p, f], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) }
3790
3841
  });
3791
- this.segmentEntities.push(M, L, E);
3792
- const P = i.Cartesian3.distance(p, b), I = i.Cartesian3.distance(b, f), x = i.Cartesian3.distance(p, f), D = new i.Cartesian3((p.x + b.x) / 2, (p.y + b.y) / 2, (p.z + b.z) / 2), T = new i.Cartesian3((b.x + f.x) / 2, (b.y + f.y) / 2, (b.z + f.z) / 2), A = new i.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), _ = i.Cartographic.fromCartesian(D), $ = i.Cartographic.fromCartesian(T), S = i.Cartographic.fromCartesian(A), F = t.id + "_tri_v", O = t.id + "_tri_h", j = t.id + "_tri_hyp";
3793
- this.segmentLabelIds = [F, O, j], this.htmlLabelPool.add({ text: `${P.toFixed(2)} m` }, { id: F, lon: i.Math.toDegrees(_.longitude), lat: i.Math.toDegrees(_.latitude), height: _.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: O, lon: i.Math.toDegrees($.longitude), lat: i.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${x.toFixed(2)} m` }, { id: j, lon: i.Math.toDegrees(S.longitude), lat: i.Math.toDegrees(S.latitude), height: S.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3794
- const R = i.Cartesian3.subtract(f, p, new i.Cartesian3()), B = i.Cartesian3.subtract(b, p, new i.Cartesian3()), Y = i.Cartesian3.subtract(b, f, new i.Cartesian3()), z = i.Cartesian3.subtract(p, f, new i.Cartesian3()), J = i.Cartesian3.dot(R, B), oe = Math.sqrt(i.Cartesian3.dot(R, R)) * Math.sqrt(i.Cartesian3.dot(B, B)), ue = i.Cartesian3.dot(Y, z), Ce = Math.sqrt(i.Cartesian3.dot(Y, Y)) * Math.sqrt(i.Cartesian3.dot(z, z)), V = Math.acos(Math.min(Math.max(J / (oe || 1), -1), 1)), he = Math.acos(Math.min(Math.max(ue / (Ce || 1), -1), 1)), te = i.Cartographic.fromCartesian(p), W = i.Cartographic.fromCartesian(f), Q = s.labelText || { angle: "角度" }, re = t.id + "_tri_angA", me = t.id + "_tri_angB";
3795
- this.angleLabelIds = [re, me], this.htmlLabelPool.add({ text: `${Q.angle}:${(V * 180 / Math.PI).toFixed(2)}°` }, { id: re, lon: i.Math.toDegrees(te.longitude), lat: i.Math.toDegrees(te.latitude), height: te.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${Q.angle}:${(he * 180 / Math.PI).toFixed(2)}°` }, { id: me, lon: i.Math.toDegrees(W.longitude), lat: i.Math.toDegrees(W.latitude), height: W.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3796
- const U = Math.max(0.01, Math.min(0.5, s.angleMarkerRatio ?? 0.2)), q = Math.min(P, I) * U;
3797
- if (P > 1e-3 && I > 1e-3) {
3798
- const Z = i.Cartesian3.normalize(i.Cartesian3.subtract(p, b, new i.Cartesian3()), new i.Cartesian3()), k = i.Cartesian3.normalize(i.Cartesian3.subtract(f, b, new i.Cartesian3()), new i.Cartesian3()), K = new i.Cartesian3(b.x + Z.x * q, b.y + Z.y * q, b.z + Z.z * q), ee = new i.Cartesian3(b.x + k.x * q, b.y + k.y * q, b.z + k.z * q), Ie = new i.Cartesian3(b.x + Z.x * q + k.x * q, b.y + Z.y * q + k.y * q, b.z + Z.z * q + k.z * q), Ft = r.entities.add({ polyline: { positions: [K, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } }), kt = r.entities.add({ polyline: { positions: [ee, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
3842
+ this.segmentEntities.push(M, P, L);
3843
+ const E = i.Cartesian3.distance(p, v), I = i.Cartesian3.distance(v, f), D = i.Cartesian3.distance(p, f), S = new i.Cartesian3((p.x + v.x) / 2, (p.y + v.y) / 2, (p.z + v.z) / 2), T = new i.Cartesian3((v.x + f.x) / 2, (v.y + f.y) / 2, (v.z + f.z) / 2), _ = new i.Cartesian3((p.x + f.x) / 2, (p.y + f.y) / 2, (p.z + f.z) / 2), x = i.Cartographic.fromCartesian(S), A = i.Cartographic.fromCartesian(T), O = i.Cartographic.fromCartesian(_), $ = t.id + "_tri_v", k = t.id + "_tri_h", j = t.id + "_tri_hyp";
3844
+ this.segmentLabelIds = [$, k, j], this.htmlLabelPool.add({ text: `${E.toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(x.longitude), lat: i.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${I.toFixed(2)} m` }, { id: k, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${D.toFixed(2)} m` }, { id: j, lon: i.Math.toDegrees(O.longitude), lat: i.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-triangle-seg", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3845
+ const Y = i.Cartesian3.subtract(f, p, new i.Cartesian3()), B = i.Cartesian3.subtract(v, p, new i.Cartesian3()), V = i.Cartesian3.subtract(v, f, new i.Cartesian3()), R = i.Cartesian3.subtract(p, f, new i.Cartesian3()), se = i.Cartesian3.dot(Y, B), W = Math.sqrt(i.Cartesian3.dot(Y, Y)) * Math.sqrt(i.Cartesian3.dot(B, B)), ne = i.Cartesian3.dot(V, R), de = Math.sqrt(i.Cartesian3.dot(V, V)) * Math.sqrt(i.Cartesian3.dot(R, R)), H = Math.acos(Math.min(Math.max(se / (W || 1), -1), 1)), te = Math.acos(Math.min(Math.max(ne / (de || 1), -1), 1)), ee = i.Cartographic.fromCartesian(p), U = i.Cartographic.fromCartesian(f), Q = s.labelText || { angle: "角度" }, ae = t.id + "_tri_angA", ge = t.id + "_tri_angB";
3846
+ this.angleLabelIds = [ae, ge], this.htmlLabelPool.add({ text: `${Q.angle}:${(H * 180 / Math.PI).toFixed(2)}°` }, { id: ae, lon: i.Math.toDegrees(ee.longitude), lat: i.Math.toDegrees(ee.latitude), height: ee.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } }), this.htmlLabelPool.add({ text: `${Q.angle}:${(te * 180 / Math.PI).toFixed(2)}°` }, { id: ge, lon: i.Math.toDegrees(U.longitude), lat: i.Math.toDegrees(U.latitude), height: U.height || 0, theme: "measure-triangle-angle", show: !0, style: { pointerEvents: "none", userSelect: "none", cursor: "default" } });
3847
+ const q = Math.max(0.01, Math.min(0.5, s.angleMarkerRatio ?? 0.2)), K = Math.min(E, I) * q;
3848
+ if (E > 1e-3 && I > 1e-3) {
3849
+ const Z = i.Cartesian3.normalize(i.Cartesian3.subtract(p, v, new i.Cartesian3()), new i.Cartesian3()), F = i.Cartesian3.normalize(i.Cartesian3.subtract(f, v, new i.Cartesian3()), new i.Cartesian3()), X = new i.Cartesian3(v.x + Z.x * K, v.y + Z.y * K, v.z + Z.z * K), ie = new i.Cartesian3(v.x + F.x * K, v.y + F.y * K, v.z + F.z * K), Ie = new i.Cartesian3(v.x + Z.x * K + F.x * K, v.y + Z.y * K + F.y * K, v.z + Z.z * K + F.z * K), Ft = r.entities.add({ polyline: { positions: [X, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } }), kt = r.entities.add({ polyline: { positions: [ie, Ie], width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
3799
3850
  this.angleMarkerEntities.push(Ft, kt);
3800
3851
  }
3801
3852
  }
@@ -4129,15 +4180,15 @@ class ut {
4129
4180
  })
4130
4181
  }
4131
4182
  });
4132
- const v = t.pointColor || t.color || e.Color.YELLOW, b = i.entities.add({
4183
+ const b = t.pointColor || t.color || e.Color.YELLOW, v = i.entities.add({
4133
4184
  position: new e.CallbackProperty(() => this.previewPos || this.positions[this.positions.length - 1], !1),
4134
4185
  point: {
4135
4186
  pixelSize: 8,
4136
- color: v,
4187
+ color: b,
4137
4188
  disableDepthTestDistance: Number.POSITIVE_INFINITY
4138
4189
  }
4139
4190
  });
4140
- this.previewPointEntities.push(b);
4191
+ this.previewPointEntities.push(v);
4141
4192
  }
4142
4193
  }, e.ScreenSpaceEventType.MOUSE_MOVE), this.handler.setInputAction(() => {
4143
4194
  var g;
@@ -4185,14 +4236,14 @@ class ut {
4185
4236
  }
4186
4237
  ), this.labelEntity = this.htmlLabelId;
4187
4238
  for (let p = 0; p < this.positions.length; p++) {
4188
- const f = (p + 1) % this.positions.length, w = this.positions[p], y = this.positions[f], C = e.Cartographic.fromCartesian(w), v = e.Cartographic.fromCartesian(y), M = new e.EllipsoidGeodesic(C, v).surfaceDistance, L = new e.Cartesian3((w.x + y.x) / 2, (w.y + y.y) / 2, (w.z + y.z) / 2), E = e.Cartographic.fromCartesian(L), P = `measure_area_seg_${Date.now()}_${p}`;
4189
- this.segmentLabelIds.push(P), this.htmlLabelPool.add(
4239
+ const f = (p + 1) % this.positions.length, w = this.positions[p], y = this.positions[f], C = e.Cartographic.fromCartesian(w), b = e.Cartographic.fromCartesian(y), M = new e.EllipsoidGeodesic(C, b).surfaceDistance, P = new e.Cartesian3((w.x + y.x) / 2, (w.y + y.y) / 2, (w.z + y.z) / 2), L = e.Cartographic.fromCartesian(P), E = `measure_area_seg_${Date.now()}_${p}`;
4240
+ this.segmentLabelIds.push(E), this.htmlLabelPool.add(
4190
4241
  { text: `${d.side}:${M.toFixed(2)} m` },
4191
4242
  {
4192
- id: P,
4193
- lon: e.Math.toDegrees(E.longitude),
4194
- lat: e.Math.toDegrees(E.latitude),
4195
- height: E.height || 0,
4243
+ id: E,
4244
+ lon: e.Math.toDegrees(L.longitude),
4245
+ lat: e.Math.toDegrees(L.latitude),
4246
+ height: L.height || 0,
4196
4247
  theme: "measure-area-seg",
4197
4248
  show: !0
4198
4249
  }
@@ -4200,16 +4251,16 @@ class ut {
4200
4251
  }
4201
4252
  const u = o;
4202
4253
  for (let p = 0; p < u.length; p++) {
4203
- const f = u[(p - 1 + u.length) % u.length], w = u[p], y = u[(p + 1) % u.length], C = f.x - w.x, v = f.y - w.y, b = y.x - w.x, M = y.y - w.y, L = Math.sqrt(C * C + v * v), E = Math.sqrt(b * b + M * M);
4204
- if (!L || !E) continue;
4205
- const P = C / L * (b / E) + v / L * (M / E), I = Math.acos(Math.min(1, Math.max(-1, P))) * (180 / Math.PI), x = e.Cartographic.fromCartesian(this.positions[p]), D = `measure_area_angle_${Date.now()}_${p}`;
4206
- this.angleLabelIds.push(D), this.htmlLabelPool.add(
4254
+ const f = u[(p - 1 + u.length) % u.length], w = u[p], y = u[(p + 1) % u.length], C = f.x - w.x, b = f.y - w.y, v = y.x - w.x, M = y.y - w.y, P = Math.sqrt(C * C + b * b), L = Math.sqrt(v * v + M * M);
4255
+ if (!P || !L) continue;
4256
+ const E = C / P * (v / L) + b / P * (M / L), I = Math.acos(Math.min(1, Math.max(-1, E))) * (180 / Math.PI), D = e.Cartographic.fromCartesian(this.positions[p]), S = `measure_area_angle_${Date.now()}_${p}`;
4257
+ this.angleLabelIds.push(S), this.htmlLabelPool.add(
4207
4258
  { text: `${d.angle}:${I.toFixed(2)} °` },
4208
4259
  {
4209
- id: D,
4210
- lon: e.Math.toDegrees(x.longitude),
4211
- lat: e.Math.toDegrees(x.latitude),
4212
- height: x.height || 0,
4260
+ id: S,
4261
+ lon: e.Math.toDegrees(D.longitude),
4262
+ lat: e.Math.toDegrees(D.latitude),
4263
+ height: D.height || 0,
4213
4264
  theme: "measure-area-angle",
4214
4265
  show: !0
4215
4266
  }
@@ -4261,38 +4312,38 @@ class ut {
4261
4312
  if (!this.htmlLabelPool) {
4262
4313
  const M = s.overlayContainerId || "html-label-container";
4263
4314
  this.htmlLabelPool = e || new G(i, r, M), this.htmlLabelPool.registerTheme("measure-area", {
4264
- createElement: (L, E) => {
4265
- var P;
4266
- L.innerHTML = String(((P = E == null ? void 0 : E.data) == null ? void 0 : P.text) || ""), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
4315
+ createElement: (P, L) => {
4316
+ var E;
4317
+ P.innerHTML = String(((E = L == null ? void 0 : L.data) == null ? void 0 : E.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
4267
4318
  },
4268
4319
  options: { offset: { x: 0, y: -10 } }
4269
4320
  }), this.htmlLabelPool.registerTheme("measure-area-seg", {
4270
- createElement: (L, E) => {
4271
- var P;
4272
- L.innerHTML = String(((P = E == null ? void 0 : E.data) == null ? void 0 : P.text) || ""), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
4321
+ createElement: (P, L) => {
4322
+ var E;
4323
+ P.innerHTML = String(((E = L == null ? void 0 : L.data) == null ? void 0 : E.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
4273
4324
  },
4274
4325
  options: { offset: { x: 0, y: -10 } }
4275
4326
  }), this.htmlLabelPool.registerTheme("measure-area-angle", {
4276
- createElement: (L, E) => {
4277
- var P;
4278
- L.innerHTML = String(((P = E == null ? void 0 : E.data) == null ? void 0 : P.text) || ""), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
4327
+ createElement: (P, L) => {
4328
+ var E;
4329
+ P.innerHTML = String(((E = L == null ? void 0 : L.data) == null ? void 0 : E.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
4279
4330
  },
4280
4331
  options: { offset: { x: 0, y: -10 } }
4281
4332
  });
4282
4333
  }
4283
4334
  for (const M of o) {
4284
- const L = r.entities.add({ position: M, point: { pixelSize: 8, color: s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } });
4285
- this.tempPoints.push(L);
4335
+ const P = r.entities.add({ position: M, point: { pixelSize: 8, color: s.color || i.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY } });
4336
+ this.tempPoints.push(P);
4286
4337
  }
4287
4338
  const n = new i.Cartesian3(
4288
- o.reduce((M, L) => M + L.x, 0) / o.length,
4289
- o.reduce((M, L) => M + L.y, 0) / o.length,
4290
- o.reduce((M, L) => M + L.z, 0) / o.length
4339
+ o.reduce((M, P) => M + P.x, 0) / o.length,
4340
+ o.reduce((M, P) => M + P.y, 0) / o.length,
4341
+ o.reduce((M, P) => M + P.z, 0) / o.length
4291
4342
  ), c = new i.EllipsoidTangentPlane(n, i.Ellipsoid.WGS84).projectPointsOntoPlane(o);
4292
4343
  let d = 0;
4293
4344
  for (let M = 0; M < c.length; M++) {
4294
- const L = (M + 1) % c.length;
4295
- d += c[M].x * c[L].y - c[L].x * c[M].y;
4345
+ const P = (M + 1) % c.length;
4346
+ d += c[M].x * c[P].y - c[P].x * c[M].y;
4296
4347
  }
4297
4348
  d = Math.abs(d) / 2;
4298
4349
  const u = i.Cartographic.fromCartesian(n), m = t.id + "_area";
@@ -4306,22 +4357,22 @@ class ut {
4306
4357
  theme: "measure-area",
4307
4358
  show: !0
4308
4359
  });
4309
- const p = new i.PolygonHierarchy(o), f = new i.PolygonGeometry({ polygonHierarchy: p, vertexFormat: i.MaterialAppearance.VERTEX_FORMAT, perPositionHeight: !0 }), w = new i.GeometryInstance({ geometry: f }), y = s.color || i.Color.YELLOW.withAlpha(0.4), C = s.color && s.color.withAlpha ? s.color.withAlpha(0.25) : i.Color.RED.withAlpha(0.4), v = new i.Primitive({
4360
+ const p = new i.PolygonHierarchy(o), f = new i.PolygonGeometry({ polygonHierarchy: p, vertexFormat: i.MaterialAppearance.VERTEX_FORMAT, perPositionHeight: !0 }), w = new i.GeometryInstance({ geometry: f }), y = s.color || i.Color.YELLOW.withAlpha(0.4), C = s.color && s.color.withAlpha ? s.color.withAlpha(0.25) : i.Color.RED.withAlpha(0.4), b = new i.Primitive({
4310
4361
  geometryInstances: w,
4311
4362
  appearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: y }), translucent: !0, closed: !0 }),
4312
4363
  depthFailAppearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: C }), translucent: !0, closed: !0 })
4313
4364
  });
4314
- r.scene.primitives.add(v), this.primitive = v;
4365
+ r.scene.primitives.add(b), this.primitive = b;
4315
4366
  for (let M = 0; M < o.length; M++) {
4316
- const L = (M + 1) % o.length, E = o[M], P = o[L], I = i.Cartographic.fromCartesian(E), x = i.Cartographic.fromCartesian(P), T = new i.EllipsoidGeodesic(I, x).surfaceDistance, A = new i.Cartesian3((E.x + P.x) / 2, (E.y + P.y) / 2, (E.z + P.z) / 2), _ = i.Cartographic.fromCartesian(A), $ = t.id + `_area_seg_${M}`;
4317
- this.segmentLabelIds.push($), this.htmlLabelPool.add({ text: `${g.side}:${T.toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(_.longitude), lat: i.Math.toDegrees(_.latitude), height: _.height || 0, theme: "measure-area-seg", show: !0 });
4367
+ const P = (M + 1) % o.length, L = o[M], E = o[P], I = i.Cartographic.fromCartesian(L), D = i.Cartographic.fromCartesian(E), T = new i.EllipsoidGeodesic(I, D).surfaceDistance, _ = new i.Cartesian3((L.x + E.x) / 2, (L.y + E.y) / 2, (L.z + E.z) / 2), x = i.Cartographic.fromCartesian(_), A = t.id + `_area_seg_${M}`;
4368
+ this.segmentLabelIds.push(A), this.htmlLabelPool.add({ text: `${g.side}:${T.toFixed(2)} m` }, { id: A, lon: i.Math.toDegrees(x.longitude), lat: i.Math.toDegrees(x.latitude), height: x.height || 0, theme: "measure-area-seg", show: !0 });
4318
4369
  }
4319
- const b = c;
4320
- for (let M = 0; M < b.length; M++) {
4321
- const L = b[(M - 1 + b.length) % b.length], E = b[M], P = b[(M + 1) % b.length], I = L.x - E.x, x = L.y - E.y, D = P.x - E.x, T = P.y - E.y, A = Math.sqrt(I * I + x * x), _ = Math.sqrt(D * D + T * T);
4322
- if (!A || !_) continue;
4323
- const $ = I / A * (D / _) + x / A * (T / _), S = Math.acos(Math.min(1, Math.max(-1, $))) * (180 / Math.PI), F = i.Cartographic.fromCartesian(o[M]), O = t.id + `_area_angle_${M}`;
4324
- this.angleLabelIds.push(O), this.htmlLabelPool.add({ text: `${g.angle}:${S.toFixed(2)} °` }, { id: O, lon: i.Math.toDegrees(F.longitude), lat: i.Math.toDegrees(F.latitude), height: F.height || 0, theme: "measure-area-angle", show: !0 });
4370
+ const v = c;
4371
+ for (let M = 0; M < v.length; M++) {
4372
+ const P = v[(M - 1 + v.length) % v.length], L = v[M], E = v[(M + 1) % v.length], I = P.x - L.x, D = P.y - L.y, S = E.x - L.x, T = E.y - L.y, _ = Math.sqrt(I * I + D * D), x = Math.sqrt(S * S + T * T);
4373
+ if (!_ || !x) continue;
4374
+ const A = I / _ * (S / x) + D / _ * (T / x), O = Math.acos(Math.min(1, Math.max(-1, A))) * (180 / Math.PI), $ = i.Cartographic.fromCartesian(o[M]), k = t.id + `_area_angle_${M}`;
4375
+ this.angleLabelIds.push(k), this.htmlLabelPool.add({ text: `${g.angle}:${O.toFixed(2)} °` }, { id: k, lon: i.Math.toDegrees($.longitude), lat: i.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-area-angle", show: !0 });
4325
4376
  }
4326
4377
  }
4327
4378
  }
@@ -4404,12 +4455,12 @@ ${m.circumference}:${u.toFixed(2)} m`,
4404
4455
  closed: !0
4405
4456
  })
4406
4457
  }), i.scene.primitives.add(this.ellipsePrimitive), this.entity = this.ellipsePrimitive, this.isPrimitive = !0;
4407
- const v = e.Cartographic.fromCartesian(n), b = e.Math.toDegrees(v.longitude), M = e.Math.toDegrees(v.latitude), L = v.height || 0, E = this.htmlLabelId || `measure_circle_${Date.now()}`;
4408
- this.htmlLabelId = E;
4409
- const P = `${m.radius}:${c.toFixed(2)} m
4458
+ const b = e.Cartographic.fromCartesian(n), v = e.Math.toDegrees(b.longitude), M = e.Math.toDegrees(b.latitude), P = b.height || 0, L = this.htmlLabelId || `measure_circle_${Date.now()}`;
4459
+ this.htmlLabelId = L;
4460
+ const E = `${m.radius}:${c.toFixed(2)} m
4410
4461
  ${m.area}:${d.toFixed(2)} m²
4411
4462
  ${m.circumference}:${u.toFixed(2)} m`;
4412
- this.htmlLabelPool.add({ text: P }, { id: E, lon: b, lat: M, height: L, theme: "measure-circle", show: !0 });
4463
+ this.htmlLabelPool.add({ text: E }, { id: L, lon: v, lat: M, height: P, theme: "measure-circle", show: !0 });
4413
4464
  const I = {
4414
4465
  entity: this.entity,
4415
4466
  label: this.labelEntity,
@@ -4452,18 +4503,18 @@ ${m.circumference}:${u.toFixed(2)} m`,
4452
4503
  });
4453
4504
  const p = e.Cartographic.fromCartesian(s), f = e.Math.toDegrees(p.longitude), w = e.Math.toDegrees(p.latitude), y = p.height || 0, C = this.htmlLabelId || `measure_circle_${Date.now()}`;
4454
4505
  this.htmlLabelId = C;
4455
- const v = `${m.radius}:${l.toFixed(2)} m
4506
+ const b = `${m.radius}:${l.toFixed(2)} m
4456
4507
  ${m.area}:${d.toFixed(2)} m²
4457
4508
  ${m.circumference}:${u.toFixed(2)} m`;
4458
- if (this.htmlLabelPool.add({ text: v }, { id: C, lon: f, lat: w, height: y, theme: "measure-circle", show: !0 }), !this.previewEntity) {
4459
- const b = t.color || e.Color.YELLOW.withAlpha(0.5);
4509
+ if (this.htmlLabelPool.add({ text: b }, { id: C, lon: f, lat: w, height: y, theme: "measure-circle", show: !0 }), !this.previewEntity) {
4510
+ const v = t.color || e.Color.YELLOW.withAlpha(0.5);
4460
4511
  this.previewEntity = i.entities.add({
4461
4512
  position: s,
4462
4513
  ellipse: {
4463
4514
  semiMajorAxis: new e.CallbackProperty(() => this.currentRadius, !1),
4464
4515
  semiMinorAxis: new e.CallbackProperty(() => this.currentRadius, !1),
4465
4516
  height: c.height || 0,
4466
- material: b
4517
+ material: v
4467
4518
  }
4468
4519
  });
4469
4520
  }
@@ -4476,15 +4527,15 @@ ${m.circumference}:${u.toFixed(2)} m`;
4476
4527
  this.stop(), this.entity && (this.isPrimitive ? this.viewer.scene.primitives.remove(this.entity) : this.viewer.entities.remove(this.entity), this.entity = null, this.isPrimitive = !1), this.previewEntity && (this.viewer.entities.remove(this.previewEntity), this.previewEntity = null), this.labelEntity && (this.viewer.entities.remove(this.labelEntity), this.labelEntity = null), this.previewLabel && (this.viewer.entities.remove(this.previewLabel), this.previewLabel = null), this.ellipsePrimitive && (this.viewer.scene.primitives.remove(this.ellipsePrimitive), this.ellipsePrimitive = null), this.htmlLabelPool && this.htmlLabelId && (this.htmlLabelPool.removeByIds([this.htmlLabelId]), this.htmlLabelId = null), this.positions = [], this.currentRadius = 0;
4477
4528
  }
4478
4529
  rehydrate(t, e) {
4479
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = (t.positions || []).map((L) => new i.Cartesian3(L[0], L[1], L[2]));
4530
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = (t.positions || []).map((P) => new i.Cartesian3(P[0], P[1], P[2]));
4480
4531
  if (o.length < 2) return;
4481
4532
  if (!this.htmlLabelPool) {
4482
- const L = s.overlayContainerId || "html-label-container";
4483
- this.htmlLabelPool = e || new G(i, r, L), this.htmlLabelPool.registerTheme("measure-circle", {
4484
- createElement: (E, P) => {
4485
- var x;
4486
- const I = ((x = P == null ? void 0 : P.data) == null ? void 0 : x.text) || "";
4487
- E.innerHTML = String(I), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
4533
+ const P = s.overlayContainerId || "html-label-container";
4534
+ this.htmlLabelPool = e || new G(i, r, P), this.htmlLabelPool.registerTheme("measure-circle", {
4535
+ createElement: (L, E) => {
4536
+ var D;
4537
+ const I = ((D = E == null ? void 0 : E.data) == null ? void 0 : D.text) || "";
4538
+ L.innerHTML = String(I), L.style.background = "rgba(0,0,0,0.6)", L.style.color = "#fff", L.style.font = "14px sans-serif", L.style.padding = "4px 6px", L.style.borderRadius = "4px", L.style.whiteSpace = "pre";
4488
4539
  },
4489
4540
  options: { offset: { x: 0, y: -10 } }
4490
4541
  });
@@ -4495,12 +4546,12 @@ ${m.circumference}:${u.toFixed(2)} m`;
4495
4546
  depthFailAppearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: w }), translucent: !0, closed: !0 })
4496
4547
  });
4497
4548
  r.scene.primitives.add(y), this.ellipsePrimitive = y, this.entity = y, this.isPrimitive = !0;
4498
- const C = i.Cartographic.fromCartesian(n), v = t.id + "_circle";
4499
- this.htmlLabelId = v;
4500
- const b = s.labelText || { radius: "半径", area: "面积", circumference: "周长" }, M = `${b.radius}:${c.toFixed(2)} m
4501
- ${b.area}:${d.toFixed(2)} m²
4502
- ${b.circumference}:${u.toFixed(2)} m`;
4503
- this.htmlLabelPool.add({ text: M }, { id: v, lon: i.Math.toDegrees(C.longitude), lat: i.Math.toDegrees(C.latitude), height: C.height || 0, theme: "measure-circle", show: !0 });
4549
+ const C = i.Cartographic.fromCartesian(n), b = t.id + "_circle";
4550
+ this.htmlLabelId = b;
4551
+ const v = s.labelText || { radius: "半径", area: "面积", circumference: "周长" }, M = `${v.radius}:${c.toFixed(2)} m
4552
+ ${v.area}:${d.toFixed(2)} m²
4553
+ ${v.circumference}:${u.toFixed(2)} m`;
4554
+ this.htmlLabelPool.add({ text: M }, { id: b, lon: i.Math.toDegrees(C.longitude), lat: i.Math.toDegrees(C.latitude), height: C.height || 0, theme: "measure-circle", show: !0 });
4504
4555
  }
4505
4556
  }
4506
4557
  class gt {
@@ -4676,14 +4727,14 @@ class gt {
4676
4727
  const w = s.overlayContainerId || "html-label-container";
4677
4728
  this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-polyline-total", {
4678
4729
  createElement: (y, C) => {
4679
- var v;
4680
- y.innerHTML = String(((v = C == null ? void 0 : C.data) == null ? void 0 : v.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4730
+ var b;
4731
+ y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4681
4732
  },
4682
4733
  options: { offset: { x: 0, y: -10 } }
4683
4734
  }), this.htmlLabelPool.registerTheme("measure-polyline-seg", {
4684
4735
  createElement: (y, C) => {
4685
- var v;
4686
- y.innerHTML = String(((v = C == null ? void 0 : C.data) == null ? void 0 : v.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4736
+ var b;
4737
+ y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4687
4738
  },
4688
4739
  options: { offset: { x: 0, y: -10 } }
4689
4740
  });
@@ -4695,14 +4746,14 @@ class gt {
4695
4746
  this.entity = r.entities.add({ polyline: { positions: c, width: l, material: o, depthFailMaterial: new i.PolylineDashMaterialProperty({ color: n, dashLength: 12, dashPattern: 255 }) } });
4696
4747
  let d = 0;
4697
4748
  for (let w = 1; w < c.length; w++) {
4698
- const y = i.Cartographic.fromCartesian(c[w - 1]), C = i.Cartographic.fromCartesian(c[w]), v = new i.EllipsoidGeodesic(y, C);
4699
- d += v.surfaceDistance;
4700
- const b = c[w - 1], M = c[w], L = new i.Cartesian3((b.x + M.x) / 2, (b.y + M.y) / 2, (b.z + M.z) / 2), E = i.Cartographic.fromCartesian(L), P = t.id + `_seg_${w - 1}`;
4701
- this.segmentLabelIds.push(P), this.htmlLabelPool.add({ text: `${v.surfaceDistance.toFixed(2)} m` }, {
4702
- id: P,
4703
- lon: i.Math.toDegrees(E.longitude),
4704
- lat: i.Math.toDegrees(E.latitude),
4705
- height: E.height || 0,
4749
+ const y = i.Cartographic.fromCartesian(c[w - 1]), C = i.Cartographic.fromCartesian(c[w]), b = new i.EllipsoidGeodesic(y, C);
4750
+ d += b.surfaceDistance;
4751
+ const v = c[w - 1], M = c[w], P = new i.Cartesian3((v.x + M.x) / 2, (v.y + M.y) / 2, (v.z + M.z) / 2), L = i.Cartographic.fromCartesian(P), E = t.id + `_seg_${w - 1}`;
4752
+ this.segmentLabelIds.push(E), this.htmlLabelPool.add({ text: `${b.surfaceDistance.toFixed(2)} m` }, {
4753
+ id: E,
4754
+ lon: i.Math.toDegrees(L.longitude),
4755
+ lat: i.Math.toDegrees(L.latitude),
4756
+ height: L.height || 0,
4706
4757
  theme: "measure-polyline-seg",
4707
4758
  show: !0,
4708
4759
  style: { pointerEvents: "none", userSelect: "none", cursor: "default" }
@@ -4820,8 +4871,8 @@ class ft {
4820
4871
  const w = s.overlayContainerId || "html-label-container";
4821
4872
  this.htmlLabelPool = e || new G(i, r, w), this.htmlLabelPool.registerTheme("measure-terrainHeight", {
4822
4873
  createElement: (y, C) => {
4823
- var v;
4824
- y.innerHTML = String(((v = C == null ? void 0 : C.data) == null ? void 0 : v.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4874
+ var b;
4875
+ y.innerHTML = String(((b = C == null ? void 0 : C.data) == null ? void 0 : b.text) || ""), y.style.background = "rgba(0,0,0,0.6)", y.style.color = "#fff", y.style.font = "14px sans-serif", y.style.padding = "4px 6px", y.style.borderRadius = "4px", y.style.whiteSpace = "pre";
4825
4876
  },
4826
4877
  options: { offset: { x: 0, y: -10 } }
4827
4878
  });
@@ -4974,7 +5025,7 @@ class wt {
4974
5025
  });
4975
5026
  }
4976
5027
  this.handler = new e.ScreenSpaceEventHandler(i.canvas), this.handler.setInputAction((r) => {
4977
- var A, _, $;
5028
+ var _, x, A;
4978
5029
  const s = i.scene.pickPosition(r.position);
4979
5030
  if (!s) return;
4980
5031
  if (!this.startPoint) {
@@ -5015,12 +5066,12 @@ ${f.area}:${m.toFixed(2)} m²` },
5015
5066
  [l[2], l[3]],
5016
5067
  [l[3], l[0]]
5017
5068
  ];
5018
- for (let S = 0; S < w.length; S++) {
5019
- const [F, O] = w[S], j = S === 0 || S === 2 ? d : u, R = new e.Cartesian3((F.x + O.x) / 2, (F.y + O.y) / 2, (F.z + O.z) / 2), B = e.Cartographic.fromCartesian(R), Y = `measure_rectangle_seg_${Date.now()}_${S}`;
5020
- this.segmentLabelIds.push(Y), this.htmlLabelPool.add(
5069
+ for (let O = 0; O < w.length; O++) {
5070
+ const [$, k] = w[O], j = O === 0 || O === 2 ? d : u, Y = new e.Cartesian3(($.x + k.x) / 2, ($.y + k.y) / 2, ($.z + k.z) / 2), B = e.Cartographic.fromCartesian(Y), V = `measure_rectangle_seg_${Date.now()}_${O}`;
5071
+ this.segmentLabelIds.push(V), this.htmlLabelPool.add(
5021
5072
  { text: `${f.side}:${Number(j).toFixed(2)} m` },
5022
5073
  {
5023
- id: Y,
5074
+ id: V,
5024
5075
  lon: e.Math.toDegrees(B.longitude),
5025
5076
  lat: e.Math.toDegrees(B.latitude),
5026
5077
  height: B.height || 0,
@@ -5029,51 +5080,51 @@ ${f.area}:${m.toFixed(2)} m²` },
5029
5080
  }
5030
5081
  );
5031
5082
  }
5032
- const y = this.buildSurfaceRectanglePositions(l), C = new e.PolygonHierarchy(y), v = new e.PolygonGeometry({
5083
+ const y = this.buildSurfaceRectanglePositions(l), C = new e.PolygonHierarchy(y), b = new e.PolygonGeometry({
5033
5084
  polygonHierarchy: C,
5034
5085
  vertexFormat: e.MaterialAppearance.VERTEX_FORMAT,
5035
5086
  perPositionHeight: !0,
5036
5087
  arcType: e.ArcType.NONE
5037
- }), b = new e.GeometryInstance({ geometry: v }), M = t.color || e.Color.YELLOW.withAlpha(0.4), L = t.color && t.color.withAlpha ? t.color.withAlpha(0.25) : e.Color.RED.withAlpha(0.4);
5088
+ }), v = new e.GeometryInstance({ geometry: b }), M = t.color || e.Color.YELLOW.withAlpha(0.4), P = t.color && t.color.withAlpha ? t.color.withAlpha(0.25) : e.Color.RED.withAlpha(0.4);
5038
5089
  this.primitive = new e.Primitive({
5039
- geometryInstances: b,
5090
+ geometryInstances: v,
5040
5091
  appearance: new e.MaterialAppearance({
5041
5092
  material: e.Material.fromType("Color", { color: M }),
5042
5093
  translucent: !0,
5043
5094
  closed: !0
5044
5095
  }),
5045
5096
  depthFailAppearance: new e.MaterialAppearance({
5046
- material: e.Material.fromType("Color", { color: L }),
5097
+ material: e.Material.fromType("Color", { color: P }),
5047
5098
  translucent: !0,
5048
5099
  closed: !0
5049
5100
  })
5050
5101
  }), i.scene.primitives.add(this.primitive);
5051
- const E = t.lineColor || t.color || e.Color.YELLOW, P = ((_ = (A = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : _.call(A, 0.9)) || e.Color.RED, I = [...y, y[0]], x = i.entities.add({
5102
+ const L = t.lineColor || t.color || e.Color.YELLOW, E = ((x = (_ = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : x.call(_, 0.9)) || e.Color.RED, I = [...y, y[0]], D = i.entities.add({
5052
5103
  polyline: {
5053
5104
  positions: I,
5054
5105
  width: t.width || 2,
5055
- material: E,
5106
+ material: L,
5056
5107
  clampToGround: !1,
5057
5108
  arcType: e.ArcType.NONE,
5058
5109
  depthFailMaterial: new e.PolylineDashMaterialProperty({
5059
- color: P,
5110
+ color: E,
5060
5111
  dashLength: 12,
5061
5112
  dashPattern: 255
5062
5113
  })
5063
5114
  }
5064
5115
  });
5065
- this.edgeEntities.push(x);
5066
- const D = t.pointColor || t.color || e.Color.YELLOW;
5067
- for (const S of l) {
5068
- const F = i.entities.add({
5069
- position: S,
5116
+ this.edgeEntities.push(D);
5117
+ const S = t.pointColor || t.color || e.Color.YELLOW;
5118
+ for (const O of l) {
5119
+ const $ = i.entities.add({
5120
+ position: O,
5070
5121
  point: {
5071
5122
  pixelSize: 8,
5072
- color: D,
5123
+ color: S,
5073
5124
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5074
5125
  }
5075
5126
  });
5076
- this.pointEntities.push(F);
5127
+ this.pointEntities.push($);
5077
5128
  }
5078
5129
  const T = {
5079
5130
  entity: this.primitive,
@@ -5084,14 +5135,14 @@ ${f.area}:${m.toFixed(2)} m²` },
5084
5135
  area: m,
5085
5136
  clear: () => this.clear()
5086
5137
  };
5087
- ($ = t.onComplete) == null || $.call(t, T);
5138
+ (A = t.onComplete) == null || A.call(t, T);
5088
5139
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((r) => {
5089
5140
  var w, y;
5090
5141
  const s = i.scene.pickPosition(r.endPosition);
5091
5142
  if (!s) return;
5092
5143
  if (this.startPoint && !this.secondPoint) {
5093
5144
  if (this.endPoint = s, !this.previewEdgeEntity) {
5094
- const C = t.lineColor || t.color || e.Color.YELLOW, v = ((y = (w = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : y.call(w, 0.9)) || e.Color.RED;
5145
+ const C = t.lineColor || t.color || e.Color.YELLOW, b = ((y = (w = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : y.call(w, 0.9)) || e.Color.RED;
5095
5146
  this.previewEdgeEntity = i.entities.add({
5096
5147
  polyline: {
5097
5148
  positions: new e.CallbackProperty(() => !this.startPoint || !this.endPoint ? [] : [this.startPoint, this.endPoint], !1),
@@ -5100,28 +5151,28 @@ ${f.area}:${m.toFixed(2)} m²` },
5100
5151
  clampToGround: !1,
5101
5152
  arcType: e.ArcType.NONE,
5102
5153
  depthFailMaterial: new e.PolylineDashMaterialProperty({
5103
- color: v,
5154
+ color: b,
5104
5155
  dashLength: 12,
5105
5156
  dashPattern: 255
5106
5157
  })
5107
5158
  }
5108
5159
  });
5109
- const b = t.pointColor || t.color || e.Color.YELLOW, M = i.entities.add({
5160
+ const v = t.pointColor || t.color || e.Color.YELLOW, M = i.entities.add({
5110
5161
  position: this.startPoint,
5111
5162
  point: {
5112
5163
  pixelSize: 8,
5113
- color: b,
5164
+ color: v,
5114
5165
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5115
5166
  }
5116
- }), L = i.entities.add({
5167
+ }), P = i.entities.add({
5117
5168
  position: new e.CallbackProperty(() => this.endPoint || this.startPoint, !1),
5118
5169
  point: {
5119
5170
  pixelSize: 8,
5120
- color: b,
5171
+ color: v,
5121
5172
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5122
5173
  }
5123
5174
  });
5124
- this.previewPointEntities.push(M, L);
5175
+ this.previewPointEntities.push(M, P);
5125
5176
  }
5126
5177
  return;
5127
5178
  }
@@ -5195,20 +5246,20 @@ ${f.area}:${u.toFixed(2)} m²` },
5195
5246
  return !t || !t.length ? [] : t.slice();
5196
5247
  }
5197
5248
  rehydrate(t, e) {
5198
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = (t.positions || []).map((D) => new i.Cartesian3(D[0], D[1], D[2]));
5249
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = (t.positions || []).map((S) => new i.Cartesian3(S[0], S[1], S[2]));
5199
5250
  if (o.length < 3) return;
5200
5251
  if (!this.htmlLabelPool) {
5201
- const D = s.overlayContainerId || "html-label-container";
5202
- this.htmlLabelPool = e || new G(i, r, D), this.htmlLabelPool.registerTheme("measure-rectangle", {
5203
- createElement: (T, A) => {
5204
- var _;
5205
- T.innerHTML = String(((_ = A == null ? void 0 : A.data) == null ? void 0 : _.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5252
+ const S = s.overlayContainerId || "html-label-container";
5253
+ this.htmlLabelPool = e || new G(i, r, S), this.htmlLabelPool.registerTheme("measure-rectangle", {
5254
+ createElement: (T, _) => {
5255
+ var x;
5256
+ T.innerHTML = String(((x = _ == null ? void 0 : _.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5206
5257
  },
5207
5258
  options: { offset: { x: 0, y: -10 } }
5208
5259
  }), this.htmlLabelPool.registerTheme("measure-rectangle-seg", {
5209
- createElement: (T, A) => {
5210
- var _;
5211
- T.innerHTML = String(((_ = A == null ? void 0 : A.data) == null ? void 0 : _.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5260
+ createElement: (T, _) => {
5261
+ var x;
5262
+ T.innerHTML = String(((x = _ == null ? void 0 : _.data) == null ? void 0 : x.text) || ""), T.style.background = "rgba(0,0,0,0.6)", T.style.color = "#fff", T.style.font = "14px sans-serif", T.style.padding = "4px 6px", T.style.borderRadius = "4px", T.style.whiteSpace = "pre";
5212
5263
  },
5213
5264
  options: { offset: { x: 0, y: -10 } }
5214
5265
  });
@@ -5225,38 +5276,38 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5225
5276
  [l[2], l[3]],
5226
5277
  [l[3], l[0]]
5227
5278
  ];
5228
- for (let D = 0; D < w.length; D++) {
5229
- const [T, A] = w[D], _ = D === 0 || D === 2 ? d : u, $ = new i.Cartesian3((T.x + A.x) / 2, (T.y + A.y) / 2, (T.z + A.z) / 2), S = i.Cartographic.fromCartesian($), F = t.id + `_rectangle_seg_${D}`;
5230
- this.segmentLabelIds.push(F), this.htmlLabelPool.add({ text: `${f.side}:${Number(_).toFixed(2)} m` }, { id: F, lon: i.Math.toDegrees(S.longitude), lat: i.Math.toDegrees(S.latitude), height: S.height || 0, theme: "measure-rectangle-seg", show: !0 });
5279
+ for (let S = 0; S < w.length; S++) {
5280
+ const [T, _] = w[S], x = S === 0 || S === 2 ? d : u, A = new i.Cartesian3((T.x + _.x) / 2, (T.y + _.y) / 2, (T.z + _.z) / 2), O = i.Cartographic.fromCartesian(A), $ = t.id + `_rectangle_seg_${S}`;
5281
+ this.segmentLabelIds.push($), this.htmlLabelPool.add({ text: `${f.side}:${Number(x).toFixed(2)} m` }, { id: $, lon: i.Math.toDegrees(O.longitude), lat: i.Math.toDegrees(O.latitude), height: O.height || 0, theme: "measure-rectangle-seg", show: !0 });
5231
5282
  }
5232
5283
  const y = new i.PolygonHierarchy(l), C = new i.PolygonGeometry({
5233
5284
  polygonHierarchy: y,
5234
5285
  vertexFormat: i.MaterialAppearance.VERTEX_FORMAT,
5235
5286
  perPositionHeight: !0,
5236
5287
  arcType: i.ArcType.NONE
5237
- }), v = new i.GeometryInstance({ geometry: C }), b = s.color || i.Color.YELLOW.withAlpha(0.4), M = s.color && s.color.withAlpha ? s.color.withAlpha(0.25) : i.Color.RED.withAlpha(0.4), L = new i.Primitive({
5238
- geometryInstances: v,
5239
- appearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: b }), translucent: !0, closed: !0 }),
5288
+ }), b = new i.GeometryInstance({ geometry: C }), v = s.color || i.Color.YELLOW.withAlpha(0.4), M = s.color && s.color.withAlpha ? s.color.withAlpha(0.25) : i.Color.RED.withAlpha(0.4), P = new i.Primitive({
5289
+ geometryInstances: b,
5290
+ appearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: v }), translucent: !0, closed: !0 }),
5240
5291
  depthFailAppearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: M }), translucent: !0, closed: !0 })
5241
5292
  });
5242
- this.primitive = L, r.scene.primitives.add(this.primitive);
5243
- const E = s.lineColor || b, P = [...l, l[0]], I = r.entities.add({
5293
+ this.primitive = P, r.scene.primitives.add(this.primitive);
5294
+ const L = s.lineColor || v, E = [...l, l[0]], I = r.entities.add({
5244
5295
  polyline: {
5245
- positions: P,
5296
+ positions: E,
5246
5297
  width: s.width || 2,
5247
- material: E,
5298
+ material: L,
5248
5299
  clampToGround: !1,
5249
5300
  arcType: i.ArcType.NONE
5250
5301
  }
5251
5302
  });
5252
5303
  this.edgeEntities.push(I);
5253
- const x = s.pointColor || b;
5254
- for (const D of l) {
5304
+ const D = s.pointColor || v;
5305
+ for (const S of l) {
5255
5306
  const T = r.entities.add({
5256
- position: D,
5307
+ position: S,
5257
5308
  point: {
5258
5309
  pixelSize: 8,
5259
- color: x,
5310
+ color: D,
5260
5311
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5261
5312
  }
5262
5313
  });
@@ -5268,22 +5319,22 @@ ${f.area}:${m.toFixed(2)} m²` }, { id: p, lon: i.Math.toDegrees(g.longitude), l
5268
5319
  if (!o || o.length < 3) return null;
5269
5320
  const n = o[0], l = o[1], c = o[2], d = l.x - n.x, u = l.y - n.y, m = Math.sqrt(d * d + u * u);
5270
5321
  if (!m) return null;
5271
- const g = d / m, f = -(u / m), w = g, y = c.x - l.x, C = c.y - l.y, v = y * f + C * w;
5272
- if (!v) return null;
5273
- const b = new r.Cartesian2(l.x + f * v, l.y + w * v), M = new r.Cartesian2(n.x + f * v, n.y + w * v), L = s.projectPointsOntoEllipsoid([n, l, b, M]);
5274
- if (!L || L.length < 4) return null;
5275
- const E = L, P = E[0], I = E[2], x = Math.abs(m), D = Math.abs(v), T = new r.Cartesian3(
5276
- (P.x + I.x) / 2,
5277
- (P.y + I.y) / 2,
5278
- (P.z + I.z) / 2
5279
- ), _ = new r.EllipsoidTangentPlane(T, r.Ellipsoid.WGS84).projectPointsOntoPlane(E);
5280
- let $ = 0;
5281
- for (let F = 0; F < _.length; F++) {
5282
- const O = (F + 1) % _.length;
5283
- $ += _[F].x * _[O].y - _[O].x * _[F].y;
5322
+ const g = d / m, f = -(u / m), w = g, y = c.x - l.x, C = c.y - l.y, b = y * f + C * w;
5323
+ if (!b) return null;
5324
+ const v = new r.Cartesian2(l.x + f * b, l.y + w * b), M = new r.Cartesian2(n.x + f * b, n.y + w * b), P = s.projectPointsOntoEllipsoid([n, l, v, M]);
5325
+ if (!P || P.length < 4) return null;
5326
+ const L = P, E = L[0], I = L[2], D = Math.abs(m), S = Math.abs(b), T = new r.Cartesian3(
5327
+ (E.x + I.x) / 2,
5328
+ (E.y + I.y) / 2,
5329
+ (E.z + I.z) / 2
5330
+ ), x = new r.EllipsoidTangentPlane(T, r.Ellipsoid.WGS84).projectPointsOntoPlane(L);
5331
+ let A = 0;
5332
+ for (let $ = 0; $ < x.length; $++) {
5333
+ const k = ($ + 1) % x.length;
5334
+ A += x[$].x * x[k].y - x[k].x * x[$].y;
5284
5335
  }
5285
- const S = Math.abs($) / 2;
5286
- return { corners: E, center: T, width: x, height: D, area: S };
5336
+ const O = Math.abs(A) / 2;
5337
+ return { corners: L, center: T, width: D, height: S, area: O };
5287
5338
  }
5288
5339
  }
5289
5340
  class Ct {
@@ -5352,49 +5403,49 @@ class Ct {
5352
5403
  closed: !0
5353
5404
  })
5354
5405
  }), i.scene.primitives.add(this.primitive);
5355
- const v = t.lineColor || y, b = ((l = (n = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : l.call(n, 0.9)) || e.Color.RED, M = g.slice(), L = i.entities.add({
5406
+ const b = t.lineColor || y, v = ((l = (n = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : l.call(n, 0.9)) || e.Color.RED, M = g.slice(), P = i.entities.add({
5356
5407
  polyline: {
5357
5408
  positions: M,
5358
5409
  width: t.width || 2,
5359
- material: v,
5410
+ material: b,
5360
5411
  clampToGround: !1,
5361
5412
  arcType: e.ArcType.NONE,
5362
5413
  depthFailMaterial: new e.PolylineDashMaterialProperty({
5363
- color: b,
5414
+ color: v,
5364
5415
  dashLength: 12,
5365
5416
  dashPattern: 255
5366
5417
  })
5367
5418
  }
5368
5419
  });
5369
- this.edgeEntities.push(L);
5370
- const E = t.pointColor || y, P = g.slice(0, g.length - 1);
5371
- for (const $ of P) {
5372
- const S = i.entities.add({
5373
- position: $,
5420
+ this.edgeEntities.push(P);
5421
+ const L = t.pointColor || y, E = g.slice(0, g.length - 1);
5422
+ for (const A of E) {
5423
+ const O = i.entities.add({
5424
+ position: A,
5374
5425
  point: {
5375
5426
  pixelSize: 8,
5376
- color: E,
5427
+ color: L,
5377
5428
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5378
5429
  }
5379
5430
  });
5380
- this.pointEntities.push(S);
5431
+ this.pointEntities.push(O);
5381
5432
  }
5382
- const I = this.computeAreaByPlane(g), x = e.Cartographic.fromCartesian(d), D = this.htmlLabelId || `measure_regular_${Date.now()}`;
5383
- this.htmlLabelId = D;
5433
+ const I = this.computeAreaByPlane(g), D = e.Cartographic.fromCartesian(d), S = this.htmlLabelId || `measure_regular_${Date.now()}`;
5434
+ this.htmlLabelId = S;
5384
5435
  const T = t.labelText || { sides: "边数", radius: "半径", circumference: "周长", area: "面积", side: "边长" };
5385
5436
  this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null);
5386
- let A = 0;
5387
- for (let $ = 1; $ < g.length; $++) {
5388
- const S = g[$ - 1], F = g[$], O = e.Cartographic.fromCartesian(S), j = e.Cartographic.fromCartesian(F), B = new e.EllipsoidGeodesic(O, j).surfaceDistance;
5389
- A += B;
5390
- const Y = new e.Cartesian3((S.x + F.x) / 2, (S.y + F.y) / 2, (S.z + F.z) / 2), z = e.Cartographic.fromCartesian(Y), J = `measure_regular_seg_${Date.now()}_${$ - 1}`;
5391
- this.segmentLabelIds.push(J), this.htmlLabelPool.add(
5437
+ let _ = 0;
5438
+ for (let A = 1; A < g.length; A++) {
5439
+ const O = g[A - 1], $ = g[A], k = e.Cartographic.fromCartesian(O), j = e.Cartographic.fromCartesian($), B = new e.EllipsoidGeodesic(k, j).surfaceDistance;
5440
+ _ += B;
5441
+ const V = new e.Cartesian3((O.x + $.x) / 2, (O.y + $.y) / 2, (O.z + $.z) / 2), R = e.Cartographic.fromCartesian(V), se = `measure_regular_seg_${Date.now()}_${A - 1}`;
5442
+ this.segmentLabelIds.push(se), this.htmlLabelPool.add(
5392
5443
  { text: `${T.side}:${B.toFixed(2)} m` },
5393
5444
  {
5394
- id: J,
5395
- lon: e.Math.toDegrees(z.longitude),
5396
- lat: e.Math.toDegrees(z.latitude),
5397
- height: z.height || 0,
5445
+ id: se,
5446
+ lon: e.Math.toDegrees(R.longitude),
5447
+ lat: e.Math.toDegrees(R.latitude),
5448
+ height: R.height || 0,
5398
5449
  theme: "measure-regular-seg",
5399
5450
  show: !0
5400
5451
  }
@@ -5403,28 +5454,28 @@ class Ct {
5403
5454
  this.htmlLabelPool.add(
5404
5455
  { text: `${T.sides}:${r}
5405
5456
  ${T.radius}:${m.toFixed(2)} m
5406
- ${T.circumference}:${A.toFixed(2)} m
5457
+ ${T.circumference}:${_.toFixed(2)} m
5407
5458
  ${T.area}:${I.toFixed(2)} m²` },
5408
5459
  {
5409
- id: D,
5410
- lon: e.Math.toDegrees(x.longitude),
5411
- lat: e.Math.toDegrees(x.latitude),
5412
- height: x.height || 0,
5460
+ id: S,
5461
+ lon: e.Math.toDegrees(D.longitude),
5462
+ lat: e.Math.toDegrees(D.latitude),
5463
+ height: D.height || 0,
5413
5464
  theme: "measure-regular",
5414
5465
  show: !0
5415
5466
  }
5416
5467
  );
5417
- const _ = {
5468
+ const x = {
5418
5469
  entity: this.primitive,
5419
5470
  label: this.labelEntity,
5420
5471
  positions: g,
5421
5472
  radius: m,
5422
5473
  sides: r,
5423
- perimeter: A,
5474
+ perimeter: _,
5424
5475
  area: I,
5425
5476
  clear: () => this.clear()
5426
5477
  };
5427
- (c = t.onComplete) == null || c.call(t, _);
5478
+ (c = t.onComplete) == null || c.call(t, x);
5428
5479
  }
5429
5480
  }, e.ScreenSpaceEventType.LEFT_CLICK), this.handler.setInputAction((s) => {
5430
5481
  var f, w;
@@ -5445,7 +5496,7 @@ ${T.area}:${I.toFixed(2)} m²` },
5445
5496
  arcType: e.ArcType.NONE
5446
5497
  }
5447
5498
  });
5448
- const C = t.lineColor || t.color || e.Color.YELLOW, v = ((w = (f = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : w.call(f, 0.9)) || e.Color.RED;
5499
+ const C = t.lineColor || t.color || e.Color.YELLOW, b = ((w = (f = t.dashLineColor || t.lineColor || t.color || e.Color.RED).withAlpha) == null ? void 0 : w.call(f, 0.9)) || e.Color.RED;
5449
5500
  this.previewEdgeEntity = i.entities.add({
5450
5501
  polyline: {
5451
5502
  positions: new e.CallbackProperty(() => !this.currentPoints || this.currentPoints.length === 0 ? [] : this.currentPoints.slice(), !1),
@@ -5454,33 +5505,33 @@ ${T.area}:${I.toFixed(2)} m²` },
5454
5505
  clampToGround: !1,
5455
5506
  arcType: e.ArcType.NONE,
5456
5507
  depthFailMaterial: new e.PolylineDashMaterialProperty({
5457
- color: v,
5508
+ color: b,
5458
5509
  dashLength: 12,
5459
5510
  dashPattern: 255
5460
5511
  })
5461
5512
  }
5462
5513
  });
5463
- const b = t.pointColor || t.color || e.Color.YELLOW, M = i.entities.add({
5514
+ const v = t.pointColor || t.color || e.Color.YELLOW, M = i.entities.add({
5464
5515
  position: o,
5465
5516
  point: {
5466
5517
  pixelSize: 8,
5467
- color: b,
5518
+ color: v,
5468
5519
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5469
5520
  }
5470
- }), L = i.entities.add({
5521
+ }), P = i.entities.add({
5471
5522
  position: new e.CallbackProperty(() => l || o, !1),
5472
5523
  point: {
5473
5524
  pixelSize: 8,
5474
- color: b,
5525
+ color: v,
5475
5526
  disableDepthTestDistance: Number.POSITIVE_INFINITY
5476
5527
  }
5477
5528
  });
5478
- this.previewPointEntities.push(M, L);
5529
+ this.previewPointEntities.push(M, P);
5479
5530
  }
5480
5531
  let d = 0;
5481
5532
  for (let y = 1; y < this.currentPoints.length; y++) {
5482
- const C = this.currentPoints[y - 1], v = this.currentPoints[y], b = e.Cartographic.fromCartesian(C), M = e.Cartographic.fromCartesian(v), L = new e.EllipsoidGeodesic(b, M);
5483
- d += L.surfaceDistance;
5533
+ const C = this.currentPoints[y - 1], b = this.currentPoints[y], v = e.Cartographic.fromCartesian(C), M = e.Cartographic.fromCartesian(b), P = new e.EllipsoidGeodesic(v, M);
5534
+ d += P.surfaceDistance;
5484
5535
  }
5485
5536
  const u = this.computeAreaByPlane(this.currentPoints), m = e.Cartographic.fromCartesian(o), g = this.previewLabelId || "measure_regular_preview";
5486
5537
  this.previewLabelId = g;
@@ -5532,21 +5583,21 @@ ${p.area}:${u.toFixed(2)} m²` },
5532
5583
  this.labelEntity && (this.viewer.entities.remove(this.labelEntity), this.labelEntity = null), this.htmlLabelPool && this.htmlLabelId && (this.htmlLabelPool.removeByIds([this.htmlLabelId]), this.htmlLabelId = null), this.previewLabelId && this.htmlLabelPool && (this.htmlLabelPool.removeByIds([this.previewLabelId]), this.previewLabelId = null), this.segmentLabelIds.length && this.htmlLabelPool && this.htmlLabelPool.removeByIds(this.segmentLabelIds.slice()), this.segmentLabelIds = [], this.positions = [], this.currentPoints = [];
5533
5584
  }
5534
5585
  rehydrate(t, e) {
5535
- var L;
5536
- const i = this.Cesium, r = this.viewer, s = t.options || {}, o = ((L = t.data) == null ? void 0 : L.sides) || s.sides || 3, n = (t.positions || []).map((E) => new i.Cartesian3(E[0], E[1], E[2]));
5586
+ var P;
5587
+ const i = this.Cesium, r = this.viewer, s = t.options || {}, o = ((P = t.data) == null ? void 0 : P.sides) || s.sides || 3, n = (t.positions || []).map((L) => new i.Cartesian3(L[0], L[1], L[2]));
5537
5588
  if (n.length < 2) return;
5538
5589
  if (!this.htmlLabelPool) {
5539
- const E = s.overlayContainerId || "html-label-container";
5540
- this.htmlLabelPool = e || new G(i, r, E), this.htmlLabelPool.registerTheme("measure-regular", {
5541
- createElement: (P, I) => {
5542
- var x;
5543
- P.innerHTML = String(((x = I == null ? void 0 : I.data) == null ? void 0 : x.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
5590
+ const L = s.overlayContainerId || "html-label-container";
5591
+ this.htmlLabelPool = e || new G(i, r, L), this.htmlLabelPool.registerTheme("measure-regular", {
5592
+ createElement: (E, I) => {
5593
+ var D;
5594
+ E.innerHTML = String(((D = I == null ? void 0 : I.data) == null ? void 0 : D.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5544
5595
  },
5545
5596
  options: { offset: { x: 0, y: -10 } }
5546
5597
  }), this.htmlLabelPool.registerTheme("measure-regular-seg", {
5547
- createElement: (P, I) => {
5548
- var x;
5549
- P.innerHTML = String(((x = I == null ? void 0 : I.data) == null ? void 0 : x.text) || ""), P.style.background = "rgba(0,0,0,0.6)", P.style.color = "#fff", P.style.font = "14px sans-serif", P.style.padding = "4px 6px", P.style.borderRadius = "4px", P.style.whiteSpace = "pre";
5598
+ createElement: (E, I) => {
5599
+ var D;
5600
+ E.innerHTML = String(((D = I == null ? void 0 : I.data) == null ? void 0 : D.text) || ""), E.style.background = "rgba(0,0,0,0.6)", E.style.color = "#fff", E.style.font = "14px sans-serif", E.style.padding = "4px 6px", E.style.borderRadius = "4px", E.style.whiteSpace = "pre";
5550
5601
  },
5551
5602
  options: { offset: { x: 0, y: -10 } }
5552
5603
  });
@@ -5554,32 +5605,32 @@ ${p.area}:${u.toFixed(2)} m²` },
5554
5605
  let l = [], c = n[0], d = 0;
5555
5606
  if (n.length >= 3) {
5556
5607
  l = n.slice(), c = new i.Cartesian3(
5557
- l.reduce((P, I) => P + I.x, 0) / l.length,
5558
- l.reduce((P, I) => P + I.y, 0) / l.length,
5559
- l.reduce((P, I) => P + I.z, 0) / l.length
5608
+ l.reduce((E, I) => E + I.x, 0) / l.length,
5609
+ l.reduce((E, I) => E + I.y, 0) / l.length,
5610
+ l.reduce((E, I) => E + I.z, 0) / l.length
5560
5611
  );
5561
- const E = l[0];
5562
- l[Math.floor(l.length / 2)] || l[1], d = i.Cartesian3.distance(c, E);
5612
+ const L = l[0];
5613
+ l[Math.floor(l.length / 2)] || l[1], d = i.Cartesian3.distance(c, L);
5563
5614
  } else {
5564
- const E = n[1];
5565
- d = i.Cartesian3.distance(c, E), l = this.buildRegularPolygonPoints(c, d, Math.max(o, 3));
5615
+ const L = n[1];
5616
+ d = i.Cartesian3.distance(c, L), l = this.buildRegularPolygonPoints(c, d, Math.max(o, 3));
5566
5617
  }
5567
5618
  const u = new i.PolygonHierarchy(l), m = new i.PolygonGeometry({ polygonHierarchy: u, vertexFormat: i.MaterialAppearance.VERTEX_FORMAT, perPositionHeight: !0 }), g = new i.GeometryInstance({ geometry: m }), p = s.color || i.Color.YELLOW.withAlpha(0.4), f = s.color && s.color.withAlpha ? s.color.withAlpha(0.25) : i.Color.RED.withAlpha(0.4), w = new i.Primitive({ geometryInstances: g, appearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: p }), translucent: !0, closed: !0 }), depthFailAppearance: new i.MaterialAppearance({ material: i.Material.fromType("Color", { color: f }), translucent: !0, closed: !0 }) });
5568
5619
  r.scene.primitives.add(w), this.primitive = w;
5569
- const y = this.computeAreaByPlane(l), C = i.Cartographic.fromCartesian(c), v = t.id + "_regular";
5570
- this.htmlLabelId = v;
5571
- const b = s.labelText || { sides: "边数", radius: "半径", circumference: "周长", area: "面积", side: "边长" };
5620
+ const y = this.computeAreaByPlane(l), C = i.Cartographic.fromCartesian(c), b = t.id + "_regular";
5621
+ this.htmlLabelId = b;
5622
+ const v = s.labelText || { sides: "边数", radius: "半径", circumference: "周长", area: "面积", side: "边长" };
5572
5623
  let M = 0;
5573
- for (let E = 1; E < l.length; E++) {
5574
- const P = l[E - 1], I = l[E], x = i.Cartographic.fromCartesian(P), D = i.Cartographic.fromCartesian(I), A = new i.EllipsoidGeodesic(x, D).surfaceDistance;
5575
- M += A;
5576
- const _ = new i.Cartesian3((P.x + I.x) / 2, (P.y + I.y) / 2, (P.z + I.z) / 2), $ = i.Cartographic.fromCartesian(_), S = t.id + `_regular_seg_${E - 1}`;
5577
- this.segmentLabelIds.push(S), this.htmlLabelPool.add({ text: `${b.side}:${A.toFixed(2)} m` }, { id: S, lon: i.Math.toDegrees($.longitude), lat: i.Math.toDegrees($.latitude), height: $.height || 0, theme: "measure-regular-seg", show: !0 });
5624
+ for (let L = 1; L < l.length; L++) {
5625
+ const E = l[L - 1], I = l[L], D = i.Cartographic.fromCartesian(E), S = i.Cartographic.fromCartesian(I), _ = new i.EllipsoidGeodesic(D, S).surfaceDistance;
5626
+ M += _;
5627
+ const x = new i.Cartesian3((E.x + I.x) / 2, (E.y + I.y) / 2, (E.z + I.z) / 2), A = i.Cartographic.fromCartesian(x), O = t.id + `_regular_seg_${L - 1}`;
5628
+ this.segmentLabelIds.push(O), this.htmlLabelPool.add({ text: `${v.side}:${_.toFixed(2)} m` }, { id: O, lon: i.Math.toDegrees(A.longitude), lat: i.Math.toDegrees(A.latitude), height: A.height || 0, theme: "measure-regular-seg", show: !0 });
5578
5629
  }
5579
- this.htmlLabelPool.add({ text: `${b.sides}:${Math.max(o, 3)}
5580
- ${b.radius}:${d.toFixed(2)} m
5581
- ${b.circumference}:${M.toFixed(2)} m
5582
- ${b.area}:${y.toFixed(2)} m²` }, { id: v, lon: i.Math.toDegrees(C.longitude), lat: i.Math.toDegrees(C.latitude), height: C.height || 0, theme: "measure-regular", show: !0 });
5630
+ this.htmlLabelPool.add({ text: `${v.sides}:${Math.max(o, 3)}
5631
+ ${v.radius}:${d.toFixed(2)} m
5632
+ ${v.circumference}:${M.toFixed(2)} m
5633
+ ${v.area}:${y.toFixed(2)} m²` }, { id: b, lon: i.Math.toDegrees(C.longitude), lat: i.Math.toDegrees(C.latitude), height: C.height || 0, theme: "measure-regular", show: !0 });
5583
5634
  }
5584
5635
  buildRegularPolygonPoints(t, e, i) {
5585
5636
  const r = this.Cesium, s = new r.EllipsoidTangentPlane(t, r.Ellipsoid.WGS84), o = 2 * Math.PI / i, n = [];
@@ -5857,7 +5908,7 @@ class $r {
5857
5908
  },
5858
5909
  options: { offset: { x: 0, y: -10 } }
5859
5910
  }), this.deleteLabelPool.eventBus.addListener(
5860
- ie.Click,
5911
+ oe.Click,
5861
5912
  {
5862
5913
  name: "measurement_delete_label_click",
5863
5914
  fn: (i) => {
@@ -6197,7 +6248,7 @@ export {
6197
6248
  ht as HorizontalMeasure,
6198
6249
  G as HtmlOverlayLabelPool,
6199
6250
  zt as MarkerEventBus,
6200
- ie as MarkerEventKey,
6251
+ oe as MarkerEventKey,
6201
6252
  Dr as MaterialManager,
6202
6253
  $r as MeasurementTool,
6203
6254
  Fr as PathRoamTool,
@@ -6215,3 +6266,4 @@ export {
6215
6266
  xr as getPolylineFlowMaterialProperty,
6216
6267
  Tr as getWallMaterial
6217
6268
  };
6269
+ //# sourceMappingURL=cesium-core.mjs.map