@u-gis/ue 3.1.0 → 3.6.4

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 (195) hide show
  1. package/dist/types/ESUeViewer/ESUeViewer.d.ts +39 -17
  2. package/dist/types/ESUeViewer/ESUeViewer.d.ts.map +1 -1
  3. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/ESMsgWebSocketWrapper.d.ts +1 -1
  4. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/ESMsgWebSocketWrapper.d.ts.map +1 -1
  5. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/PSUEViewer.d.ts +1 -1
  6. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/PSUEViewer.d.ts.map +1 -1
  7. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/PSUEViewerWrapper.d.ts +1 -1
  8. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/PSUEViewerWrapper.d.ts.map +1 -1
  9. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/index.d.ts +4 -4
  10. package/dist/types/ESUeViewer/Viewers/CSTMPSViewer/index.d.ts.map +1 -1
  11. package/dist/types/ESUeViewer/Viewers/H5Viewer/DLViewer.d.ts +1 -1
  12. package/dist/types/ESUeViewer/Viewers/H5Viewer/DLViewer.d.ts.map +1 -1
  13. package/dist/types/ESUeViewer/Viewers/H5Viewer/ViewerH5Instance.d.ts +1 -1
  14. package/dist/types/ESUeViewer/Viewers/H5Viewer/ViewerH5Instance.d.ts.map +1 -1
  15. package/dist/types/ESUeViewer/Viewers/INNPSViewer/WebRtcManager.d.ts +1 -1
  16. package/dist/types/ESUeViewer/Viewers/INNPSViewer/WebRtcManager.d.ts.map +1 -1
  17. package/dist/types/ESUeViewer/Viewers/INNPSViewer/WebRtcManagerWrapper.d.ts +1 -1
  18. package/dist/types/ESUeViewer/Viewers/INNPSViewer/WebRtcManagerWrapper.d.ts.map +1 -1
  19. package/dist/types/ESUeViewer/Viewers/INNPSViewer/index.d.ts +1 -1
  20. package/dist/types/ESUeViewer/Viewers/INNPSViewer/index.d.ts.map +1 -1
  21. package/dist/types/ESUeViewer/inner/ReactProps.d.ts +20 -7
  22. package/dist/types/ESUeViewer/inner/ReactProps.d.ts.map +1 -1
  23. package/dist/types/ESUeViewer/inner/UeLocalViewer.d.ts +2 -2
  24. package/dist/types/ESUeViewer/inner/UeLocalViewer.d.ts.map +1 -1
  25. package/dist/types/ESUeViewer/inner/ViewerCreating.d.ts +1 -2
  26. package/dist/types/ESUeViewer/inner/ViewerCreating.d.ts.map +1 -1
  27. package/dist/types/ESUeViewer/inner/ViewerInstance.d.ts +1 -1
  28. package/dist/types/ESUeViewer/inner/ViewerInstance.d.ts.map +1 -1
  29. package/dist/types/ESUeViewer/inner/ViewerLocalInstance.d.ts +1 -1
  30. package/dist/types/ESUeViewer/inner/ViewerLocalInstance.d.ts.map +1 -1
  31. package/dist/types/ESUeViewer/uemsg/CallUeFuncs.d.ts.map +1 -1
  32. package/dist/types/ESUeViewer/uemsg/UeCloudViewerBase.d.ts +1 -1
  33. package/dist/types/ESUeViewer/uemsg/UeCloudViewerBase.d.ts.map +1 -1
  34. package/dist/types/ESUeViewer/uemsg/UeEventsType.d.ts +4 -0
  35. package/dist/types/ESUeViewer/uemsg/UeEventsType.d.ts.map +1 -1
  36. package/dist/types/ESUeViewer/uemsg/UeFuncsType.d.ts +2 -2
  37. package/dist/types/ESUeViewer/uemsg/UeFuncsType.d.ts.map +1 -1
  38. package/dist/types/UeObjects/base/UeESGeoVector/index.d.ts +3 -1
  39. package/dist/types/UeObjects/base/UeESGeoVector/index.d.ts.map +1 -1
  40. package/dist/types/UeObjects/base/UeESLocalVector/index.d.ts +2 -0
  41. package/dist/types/UeObjects/base/UeESLocalVector/index.d.ts.map +1 -1
  42. package/dist/types/UeObjects/base/UeESSceneObject/index.d.ts.map +1 -1
  43. package/dist/types/UeObjects/general/UeES3DTileset/index.d.ts +1 -1
  44. package/dist/types/UeObjects/general/UeES3DTileset/index.d.ts.map +1 -1
  45. package/dist/types/UeObjects/general/UeESAlarm/index.d.ts +1 -1
  46. package/dist/types/UeObjects/general/UeESAlarm/index.d.ts.map +1 -1
  47. package/dist/types/UeObjects/general/UeESApertureEffect/index.d.ts +1 -1
  48. package/dist/types/UeObjects/general/UeESApertureEffect/index.d.ts.map +1 -1
  49. package/dist/types/UeObjects/general/UeESAreaMeasurement/index.d.ts +1 -1
  50. package/dist/types/UeObjects/general/UeESAreaMeasurement/index.d.ts.map +1 -1
  51. package/dist/types/UeObjects/general/UeESBlastParticleSystem/index.d.ts +1 -1
  52. package/dist/types/UeObjects/general/UeESBlastParticleSystem/index.d.ts.map +1 -1
  53. package/dist/types/UeObjects/general/UeESBoxClipping/index.d.ts +4 -1
  54. package/dist/types/UeObjects/general/UeESBoxClipping/index.d.ts.map +1 -1
  55. package/dist/types/UeObjects/general/UeESCameraView/index.d.ts +1 -1
  56. package/dist/types/UeObjects/general/UeESCameraView/index.d.ts.map +1 -1
  57. package/dist/types/UeObjects/general/UeESCameraVisibleRange/index.d.ts +1 -1
  58. package/dist/types/UeObjects/general/UeESCameraVisibleRange/index.d.ts.map +1 -1
  59. package/dist/types/UeObjects/general/UeESCar/index.d.ts +1 -1
  60. package/dist/types/UeObjects/general/UeESCar/index.d.ts.map +1 -1
  61. package/dist/types/UeObjects/general/UeESClassification/index.d.ts +1 -1
  62. package/dist/types/UeObjects/general/UeESClassification/index.d.ts.map +1 -1
  63. package/dist/types/UeObjects/general/UeESClippingPlane/index.d.ts +4 -1
  64. package/dist/types/UeObjects/general/UeESClippingPlane/index.d.ts.map +1 -1
  65. package/dist/types/UeObjects/general/UeESDataMesh/index.d.ts +1 -1
  66. package/dist/types/UeObjects/general/UeESDataMesh/index.d.ts.map +1 -1
  67. package/dist/types/UeObjects/general/UeESDatasmithRuntimeModel/index.d.ts +1 -1
  68. package/dist/types/UeObjects/general/UeESDatasmithRuntimeModel/index.d.ts.map +1 -1
  69. package/dist/types/UeObjects/general/UeESDirectionMeasurement/index.d.ts +1 -1
  70. package/dist/types/UeObjects/general/UeESDirectionMeasurement/index.d.ts.map +1 -1
  71. package/dist/types/UeObjects/general/UeESDistanceMeasurement/index.d.ts +1 -1
  72. package/dist/types/UeObjects/general/UeESDistanceMeasurement/index.d.ts.map +1 -1
  73. package/dist/types/UeObjects/general/UeESDynamicWater/index.d.ts +1 -1
  74. package/dist/types/UeObjects/general/UeESDynamicWater/index.d.ts.map +1 -1
  75. package/dist/types/UeObjects/general/UeESEntityCluster/index.d.ts +1 -1
  76. package/dist/types/UeObjects/general/UeESEntityCluster/index.d.ts.map +1 -1
  77. package/dist/types/UeObjects/general/UeESExcavate/index.d.ts +27 -1
  78. package/dist/types/UeObjects/general/UeESExcavate/index.d.ts.map +1 -1
  79. package/dist/types/UeObjects/general/UeESFireParticleSystem/index.d.ts +1 -1
  80. package/dist/types/UeObjects/general/UeESFireParticleSystem/index.d.ts.map +1 -1
  81. package/dist/types/UeObjects/general/UeESForestTileset/index.d.ts +1 -1
  82. package/dist/types/UeObjects/general/UeESForestTileset/index.d.ts.map +1 -1
  83. package/dist/types/UeObjects/general/UeESGaussianSplatting/index.d.ts +1 -1
  84. package/dist/types/UeObjects/general/UeESGaussianSplatting/index.d.ts.map +1 -1
  85. package/dist/types/UeObjects/general/UeESGeoDiv/index.d.ts +12 -1
  86. package/dist/types/UeObjects/general/UeESGeoDiv/index.d.ts.map +1 -1
  87. package/dist/types/UeObjects/general/UeESGeoExtrudedPolygon/index.d.ts +1 -1
  88. package/dist/types/UeObjects/general/UeESGeoExtrudedPolygon/index.d.ts.map +1 -1
  89. package/dist/types/UeObjects/general/UeESGeoJson/index.d.ts +6 -2
  90. package/dist/types/UeObjects/general/UeESGeoJson/index.d.ts.map +1 -1
  91. package/dist/types/UeObjects/general/UeESGeoLineString/index.d.ts +1 -1
  92. package/dist/types/UeObjects/general/UeESGeoLineString/index.d.ts.map +1 -1
  93. package/dist/types/UeObjects/general/UeESGeoPolygon/index.d.ts +1 -1
  94. package/dist/types/UeObjects/general/UeESGeoPolygon/index.d.ts.map +1 -1
  95. package/dist/types/UeObjects/general/UeESGeoRectangle/index.d.ts +1 -1
  96. package/dist/types/UeObjects/general/UeESGeoRectangle/index.d.ts.map +1 -1
  97. package/dist/types/UeObjects/general/UeESGeoWater/index.d.ts +1 -1
  98. package/dist/types/UeObjects/general/UeESGeoWater/index.d.ts.map +1 -1
  99. package/dist/types/UeObjects/general/UeESGltfModel/index.d.ts +1 -1
  100. package/dist/types/UeObjects/general/UeESGltfModel/index.d.ts.map +1 -1
  101. package/dist/types/UeObjects/general/UeESHeightMeasurement/index.d.ts +1 -1
  102. package/dist/types/UeObjects/general/UeESHeightMeasurement/index.d.ts.map +1 -1
  103. package/dist/types/UeObjects/general/UeESHuman/index.d.ts +1 -1
  104. package/dist/types/UeObjects/general/UeESHuman/index.d.ts.map +1 -1
  105. package/dist/types/UeObjects/general/UeESHumanPoi/index.d.ts +1 -1
  106. package/dist/types/UeObjects/general/UeESHumanPoi/index.d.ts.map +1 -1
  107. package/dist/types/UeObjects/general/UeESImageLabel/index.d.ts +1 -1
  108. package/dist/types/UeObjects/general/UeESImageLabel/index.d.ts.map +1 -1
  109. package/dist/types/UeObjects/general/UeESImageryLayer/index.d.ts +1 -1
  110. package/dist/types/UeObjects/general/UeESImageryLayer/index.d.ts.map +1 -1
  111. package/dist/types/UeObjects/general/UeESLevelRuntimeModel/index.d.ts +1 -1
  112. package/dist/types/UeObjects/general/UeESLevelRuntimeModel/index.d.ts.map +1 -1
  113. package/dist/types/UeObjects/general/UeESLocalCircle/index.d.ts +1 -1
  114. package/dist/types/UeObjects/general/UeESLocalCircle/index.d.ts.map +1 -1
  115. package/dist/types/UeObjects/general/UeESLocalPolygon/index.d.ts +1 -1
  116. package/dist/types/UeObjects/general/UeESLocalPolygon/index.d.ts.map +1 -1
  117. package/dist/types/UeObjects/general/UeESLocalPolygonZ/index.d.ts +1 -1
  118. package/dist/types/UeObjects/general/UeESLocalPolygonZ/index.d.ts.map +1 -1
  119. package/dist/types/UeObjects/general/UeESLocalRectangle/index.d.ts +1 -1
  120. package/dist/types/UeObjects/general/UeESLocalRectangle/index.d.ts.map +1 -1
  121. package/dist/types/UeObjects/general/UeESLocalSkyBox/index.d.ts +1 -1
  122. package/dist/types/UeObjects/general/UeESLocalSkyBox/index.d.ts.map +1 -1
  123. package/dist/types/UeObjects/general/UeESLocationMeasurement/index.d.ts +1 -1
  124. package/dist/types/UeObjects/general/UeESLocationMeasurement/index.d.ts.map +1 -1
  125. package/dist/types/UeObjects/general/UeESMsTileset/index.d.ts +1 -1
  126. package/dist/types/UeObjects/general/UeESMsTileset/index.d.ts.map +1 -1
  127. package/dist/types/UeObjects/general/UeESNavigator/index.d.ts +1 -1
  128. package/dist/types/UeObjects/general/UeESNavigator/index.d.ts.map +1 -1
  129. package/dist/types/UeObjects/general/UeESPath/index.d.ts +3 -2
  130. package/dist/types/UeObjects/general/UeESPath/index.d.ts.map +1 -1
  131. package/dist/types/UeObjects/general/UeESPipeFence/index.d.ts +1 -1
  132. package/dist/types/UeObjects/general/UeESPipeFence/index.d.ts.map +1 -1
  133. package/dist/types/UeObjects/general/UeESPipeline/index.d.ts +1 -1
  134. package/dist/types/UeObjects/general/UeESPipeline/index.d.ts.map +1 -1
  135. package/dist/types/UeObjects/general/UeESPipeserTileset/index.d.ts +1 -1
  136. package/dist/types/UeObjects/general/UeESPipeserTileset/index.d.ts.map +1 -1
  137. package/dist/types/UeObjects/general/UeESPit/index.d.ts +1 -1
  138. package/dist/types/UeObjects/general/UeESPit/index.d.ts.map +1 -1
  139. package/dist/types/UeObjects/general/UeESPoi2D/index.d.ts +1 -1
  140. package/dist/types/UeObjects/general/UeESPoi2D/index.d.ts.map +1 -1
  141. package/dist/types/UeObjects/general/UeESPoi3D/index.d.ts +1 -1
  142. package/dist/types/UeObjects/general/UeESPoi3D/index.d.ts.map +1 -1
  143. package/dist/types/UeObjects/general/UeESPoiTileset/index.d.ts +1 -1
  144. package/dist/types/UeObjects/general/UeESPoiTileset/index.d.ts.map +1 -1
  145. package/dist/types/UeObjects/general/UeESPolygonFence/index.d.ts +1 -1
  146. package/dist/types/UeObjects/general/UeESPolygonFence/index.d.ts.map +1 -1
  147. package/dist/types/UeObjects/general/UeESPolygonFlattenedPlane/index.d.ts +27 -1
  148. package/dist/types/UeObjects/general/UeESPolygonFlattenedPlane/index.d.ts.map +1 -1
  149. package/dist/types/UeObjects/general/UeESPolygonWithHole/index.d.ts +1 -1
  150. package/dist/types/UeObjects/general/UeESPolygonWithHole/index.d.ts.map +1 -1
  151. package/dist/types/UeObjects/general/UeESRtsFeatureEditing/index.d.ts +3 -5
  152. package/dist/types/UeObjects/general/UeESRtsFeatureEditing/index.d.ts.map +1 -1
  153. package/dist/types/UeObjects/general/UeESRtsTileset/index.d.ts +1 -1
  154. package/dist/types/UeObjects/general/UeESRtsTileset/index.d.ts.map +1 -1
  155. package/dist/types/UeObjects/general/UeESSeparateFoliage/index.d.ts +1 -1
  156. package/dist/types/UeObjects/general/UeESSeparateFoliage/index.d.ts.map +1 -1
  157. package/dist/types/UeObjects/general/UeESSkylineAnalysis/index.d.ts +1 -1
  158. package/dist/types/UeObjects/general/UeESSkylineAnalysis/index.d.ts.map +1 -1
  159. package/dist/types/UeObjects/general/UeESStaticMesh/index.d.ts +1 -1
  160. package/dist/types/UeObjects/general/UeESStaticMesh/index.d.ts.map +1 -1
  161. package/dist/types/UeObjects/general/UeESSubmergingAnalysis/index.d.ts +1 -1
  162. package/dist/types/UeObjects/general/UeESSubmergingAnalysis/index.d.ts.map +1 -1
  163. package/dist/types/UeObjects/general/UeESSunshineAnalysis/index.d.ts +1 -1
  164. package/dist/types/UeObjects/general/UeESSunshineAnalysis/index.d.ts.map +1 -1
  165. package/dist/types/UeObjects/general/UeESSurfaceAreaMeasurement/index.d.ts +1 -1
  166. package/dist/types/UeObjects/general/UeESSurfaceAreaMeasurement/index.d.ts.map +1 -1
  167. package/dist/types/UeObjects/general/UeESTerrainLayer/index.d.ts +1 -1
  168. package/dist/types/UeObjects/general/UeESTerrainLayer/index.d.ts.map +1 -1
  169. package/dist/types/UeObjects/general/UeESTextLabel/index.d.ts +1 -1
  170. package/dist/types/UeObjects/general/UeESTextLabel/index.d.ts.map +1 -1
  171. package/dist/types/UeObjects/general/UeESUEWidget/index.d.ts +1 -1
  172. package/dist/types/UeObjects/general/UeESUEWidget/index.d.ts.map +1 -1
  173. package/dist/types/UeObjects/general/UeESUnrealActor/index.d.ts +2 -2
  174. package/dist/types/UeObjects/general/UeESUnrealActor/index.d.ts.map +1 -1
  175. package/dist/types/UeObjects/general/UeESVideoFusion/index.d.ts +1 -1
  176. package/dist/types/UeObjects/general/UeESVideoFusion/index.d.ts.map +1 -1
  177. package/dist/types/UeObjects/general/UeESViewShed/index.d.ts +1 -1
  178. package/dist/types/UeObjects/general/UeESViewShed/index.d.ts.map +1 -1
  179. package/dist/types/UeObjects/general/UeESViewerStatusBar/index.d.ts +1 -1
  180. package/dist/types/UeObjects/general/UeESViewerStatusBar/index.d.ts.map +1 -1
  181. package/dist/types/UeObjects/general/UeESVisibilityAnalysis/index.d.ts +1 -1
  182. package/dist/types/UeObjects/general/UeESVisibilityAnalysis/index.d.ts.map +1 -1
  183. package/dist/types/UeObjects/general/UeESVolumeMeasurement/index.d.ts +1 -1
  184. package/dist/types/UeObjects/general/UeESVolumeMeasurement/index.d.ts.map +1 -1
  185. package/dist/types/UeObjects/general/UeESWidget/index.d.ts +1 -1
  186. package/dist/types/UeObjects/general/UeESWidget/index.d.ts.map +1 -1
  187. package/dist/types/index.d.ts +3 -0
  188. package/dist/types/index.d.ts.map +1 -1
  189. package/dist/ue.iife.js +112 -0
  190. package/dist/ue.js +5422 -0
  191. package/dist/ue.umd.cjs +1 -0
  192. package/package.json +15 -15
  193. package/dist/earthsdk3-ue.iife.js +0 -112
  194. package/dist/earthsdk3-ue.js +0 -5195
  195. package/dist/earthsdk3-ue.umd.cjs +0 -1
@@ -1 +0,0 @@
1
- (function(f,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@u-gis/core"),require("xbsj-base"),require("@epicgames-ps/lib-pixelstreamingfrontend-ue5.2"),require("html2canvas")):typeof define=="function"&&define.amd?define(["exports","@u-gis/core","xbsj-base","@epicgames-ps/lib-pixelstreamingfrontend-ue5.2","html2canvas"],c):(f=typeof globalThis<"u"?globalThis:f||self,c(f.uGIS_UE={},f.uGIS_Core,f.xbsj_base,f.libPixelstreamingfrontendUe5_2,f.html2canvas))})(this,function(f,c,a,L,Gn){"use strict";var yr=Object.defineProperty;var mr=(f,c,a)=>c in f?yr(f,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):f[c]=a;var p=(f,c,a)=>mr(f,typeof c!="symbol"?c+"":c,a);const Jn={...c.ESViewer.defaults,geoReferenceOrigin:void 0,keepWorldOriginNearCamera:!1,useCache:!0,widgetInteractionDistance:200,memReportInterval:10,sceneControlled:!0,brightness:0,emissiveIntensity:1,statusUpdateInterval:.5,baseUrl:window.location.href??""},_i=()=>({...c.ESViewer.createCommonProps(),apiKey:"",apiUrl:"",secretKey:"",speechVoiceMode:"",geoReferenceOrigin:a.reactArrayWithUndefined(void 0),keepWorldOriginNearCamera:void 0,useCache:void 0,widgetInteractionDistance:void 0,memReportInterval:void 0,sceneControlled:void 0,brightness:void 0,emissiveIntensity:void 0,statusUpdateInterval:void 0,baseUrl:void 0});function oe(){const u=_i(),e=[];return Object.keys(u).forEach(t=>{e.push(t)}),e}function we(u){const{defaults:e}=A,t=oe(),i={};return t.forEach(n=>{i[n]=u[n]??e[n]}),i}const B=async(u,e,t,i,n,r="default")=>{const s=await u.callUeFunc({f:"flyTo",p:{id:e,duration:t,flyToParam:i,position:n,flyMode:r}});if(s.error){console.error(s.error);return}return s.re},ye=async(u,e)=>{const t=await u.callUeFunc({f:"destroy",p:{id:e}});return t.error&&console.error(t.error),t},K=(u,e)=>{u.callUeFunc({f:"calcFlyToParam",p:{id:e}}).then(t=>{t.error&&console.error("calcFlyToParam:",t.error)}).catch(t=>{console.error("calcFlyToParam:",t)})},Ni=(u,e)=>{u.callUeFunc({f:"refreshTileset",p:{id:e}}).then(t=>{t.error&&console.error("refreshTileset:",t.error)}).catch(t=>{console.error("refreshTileset:",t)})},Q=async(u,e,t,i,n,r="default")=>{const s=await u.callUeFunc({f:"flyIn",p:{id:e,position:t,rotation:i,duration:n,flyMode:r}});if(s.error){console.error(s.error);return}return s.re},zi=async(u,e)=>{if(!u){console.warn("DefaultCameraFlyIn: viewer is undefined");return}const t=await u.callUeFunc({f:"DefaultCameraFlyIn",p:{Duration:e??1}});if(t.error){console.error("DefaultCameraFlyIn:",t.error);return}return t},Hi=async u=>{if(!u){console.warn("StartVoice:viewer is undefined");return}const e=await u.callUeFunc({f:"StartVoice",p:{}});if(e.error){console.error("StartVoice:",e.error);return}return e},Gi=async u=>{if(!u){console.warn("StopVoice:viewer is undefined");return}const e=await u.callUeFunc({f:"StopVoice",p:{}});if(e.error){console.error("StopVoice:",e.error);return}return e},Ji=async(u,e)=>{if(!u){console.warn("mountPakFiles:viewer is undefined");return}const t=await u.callUeFunc({f:"MountPakFiles",p:{json:e}});if(t.error){console.error("mountPakFiles:",t.error);return}return t},Bi=async u=>{if(!u){console.warn("generateMemReport:viewer is undefined");return}const e=await u.callUeFunc({f:"GenerateMemReport",p:{}});if(e.error){console.error("generateMemReport:",e.error);return}return e},me=async(u,e)=>{const t=await u.callUeFunc({f:"resetWithCurrentCamera",p:{id:e}});return t.error&&console.error("resetWithCurrentCamera:",t.error),t},ae=(u,e,t,i,n)=>{u.callUeFunc({f:"smoothMoveWithRotation",p:{id:e,Destination:t,NewRotation:i,Time:n}}).then(r=>{r.error&&console.error("smoothMoveWithRotation:",r.error)}).catch(r=>{console.error("smoothMoveWithRotation:",r)})},le=(u,e,t,i,n,r)=>{u.callUeFunc({f:"smoothMoveOnGround",p:{id:e,Lon:t,Lat:i,Ground:n,Time:r}}).then(s=>{s.error&&console.error("smoothMoveOnGround:",s.error)}).catch(s=>{console.error("smoothMoveOnGround:",s)})},de=(u,e,t,i,n,r,s)=>{u.callUeFunc({f:"smoothMoveWithRotationOnGround",p:{id:e,NewRotation:t,Lon:i,Lat:n,Time:r,Ground:s}}).then(o=>{o.error&&console.error("smoothMoveWithRotationOnGround:",o.error)}).catch(o=>{console.error("smoothMoveWithRotationOnGround:",o)})},Ki=(u,e,t)=>{u.callUeFunc({f:"HighlightFeature",p:{id:e,HlId:t}}).then(i=>{i.error&&console.error("HighlightFeature:",i.error)}).catch(i=>{console.error("HighlightFeature:",i)})},qi=(u,e,t,i)=>{u.callUeFunc({f:"HighlightFeatureAndFlyTo",p:{id:e,HlId:t,Duration:i}}).then(n=>{n.error&&console.error("HighlightFeatureAndFlyTo:",n.error)}).catch(n=>{console.error("HighlightFeatureAndFlyTo:",n)})},Vi=(u,e,t)=>{u.callUeFunc({f:"SetLayerVisible",p:{id:e,LayerJson:t}}).then(i=>{i.error&&console.error("SetLayerVisible:",i.error)}).catch(i=>{console.error("SetLayerVisible:",i)})},Xi=(u,e,t)=>{u.callUeFunc({f:"SetLayerColor",p:{id:e,LayerJson:t}}).then(i=>{i.error&&console.error("SetLayerColor:",i.error)}).catch(i=>{console.error("SetLayerColor:",i)})},ce=(u,e,t,i)=>{u.callUeFunc({f:"smoothMove",p:{id:e,Destination:t,Time:i}}).then(n=>{n.error&&console.error("smoothMove:",n.error)}).catch(n=>{console.error("smoothMove:",n)})},Ce=async(u,e,t,i)=>{const n=await u.callUeFunc({f:"callFunction",p:{id:e,fn:t,p:i}});return n.error&&(console.error("callFunction:",n.error),console.error(`id: ${e} fn: ${t} param: ${i}`)),n.re??void 0},Qi=(u,e,t,i)=>{u.callUeFunc({f:"SetNodePosition",p:{id:e,NodeName:t,NodePosition:i}}).then(n=>{n.error&&console.error("SetNodePosition:",n.error)}).catch(n=>{console.error("SetNodePosition:",n)})},Yi=(u,e,t,i)=>{u.callUeFunc({f:"SetNodeRotation",p:{id:e,NodeName:t,NodeRotation:i}}).then(n=>{n.error&&console.error("SetNodeRotation:",n.error)}).catch(n=>{console.error("SetNodeRotation:",n)})},Zi=(u,e,t,i)=>{u.callUeFunc({f:"SetNodeScale",p:{id:e,NodeName:t,NodeScale:i}}).then(n=>{n.error&&console.error("SetNodeScale:",n.error)}).catch(n=>{console.error("SetNodeScale:",n)})},M=async(u,e)=>{const t=await u.callUeFunc({f:"ChangeNavigationMode",p:e});if(t.error){console.error("ChangeNavigationMode:",t.error);return}return t},xi=async(u,e)=>{const t=await u.callUeFunc({f:"setGlobalProperty",p:e});if(t.error){console.error("setGlobalProperty:",t.error);return}return t},bi=async u=>{const e=await u.callUeFunc({f:"Quit",p:void 0});if(e.error){console.error("Quit:",e.error);return}return e},Oi=async(u,e,t,i)=>{console.log("pickCallFunc",e,t,i);const n=await u.callUeFunc({f:"pick",p:{screenPosition:e,parentInfo:i}});if(!n.re&&(n.error||n.error=="")){console.error("pick:",n.error==""?"未获取到结果":n.error);return}let r=n.re.id,s;const o=r?c.ESSceneObject.getSceneObject(r):void 0;return o&&Reflect.has(o,"allowPicking")&&Reflect.has(o,"pickedEvent")&&(o.allowPicking??!1)&&(s=new c.ESJPickedResult(n.re,o,n.re.features,n.re.add,t,e),o.pickedEvent.emit(s)),o&&Reflect.has(o,"allowPicking")&&!o.allowPicking?new c.ESJPickedResult:s},ji=async(u,e)=>{const t=await u.callUeFunc({f:"pickPosition",p:{screenPosition:e}});if(!t.re&&(t.error||t.error=="")){console.error("pickPosition",t.error==""?"未获取到结果":t.error);return}const{position:i}=t.re;return i},tn=async(u,e,t,i="ECC_Visibility")=>{const n=await u.callUeFunc({f:"GetHeightByLonLat",p:{Lon:e,Lat:t,Channel:i}});if(n.error){console.warn(`GetHeightByLonLat:${n.error}`);return}return n.re},en=async(u,e,t="ECC_Visibility")=>{const i=await u.callUeFunc({f:"GetHeightsByLonLats",p:{LonLats:e,Channel:t}});if(i.error){console.warn(`GetHeightsByLonLats:${i.error}`);return}i.re.heights.includes(null)&&console.warn("注意! GetHeightsByLonLats: 存在高度为null的点. there are points with a height of null");try{return i.re.heights}catch{return}},nn=async(u,e=64,t=64)=>{const i=await u.callUeFunc({f:"capture",p:{resx:e,resy:t}});if(i.error){console.warn(i.error);return}return i.re.image},rn=async(u,e,t=[64,64])=>{const i=await u.callUeFunc({f:"partialCapture",p:{startPos:e,size:t}});if(i.error){console.warn(i.error);return}return i.re.image},sn=async(u,e)=>{const t=await u.callUeFunc({f:"LonLatAltToScreenPosition",p:{LonLatAlt:e}});return t.error&&console.warn(t.error),t.re},on=async(u,e)=>{const t=await u.callUeFunc({f:"UEPositionToLonLatAlt",p:{UEPosition:e}});if(t.error){console.warn(t.error);return}return[...t.re.LonLatAlt]},an=async(u,e)=>{const t=await u.callUeFunc({f:"GetAllSocketNamesByActorTag",p:{ActorTag:e}});if(t.error){console.warn(t.error);return}return[...t.re.socketNames]},ln=async u=>{const e=await u.callUeFunc({f:"GetVersion",p:void 0});if(e.error){console.warn("GetVersion:",e.error);return}return e.re.version},dn=async(u,e)=>{const t=await u.callUeFunc({f:"GetBoundSphere",p:{id:e}});if(t.error){console.warn(t.error);return}return t.re},cn=async(u,e)=>{const t=await u.callUeFunc({f:"GetBoundSphereWithChildren",p:{id:e}});if(t.error){console.warn(`GetBoundSphereWithChildren:${t.error}`);return}return t.re},un=async(u,e)=>{const t=await u.callUeFunc({f:"GetStrokeMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetStrokeMaterialParamInfo:${t.error}`);return}return t.re},hn=async(u,e)=>{const t=await u.callUeFunc({f:"GetFillMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetFillMaterialParamInfo:${t.error}`);return}return t.re},vn=async(u,e)=>{const t=await u.callUeFunc({f:"getGlobalProperty",p:{props:e}});if(t.error){console.warn(`getGlobalProperty:${t.error}`);return}return t.re},gn=async(u,e)=>{const t=await u.callUeFunc({f:"GetObjectByInfo",p:{info:e}});if(t.error){console.warn(`GetObjectByInfo:${t.error}`);return}return t.re},fn=async(u,e,t)=>await u.callUeFunc({f:"BindActorByTag",p:{ID:e,ActorTag:t}}),pn=async u=>await u.callUeFunc({f:"RestoreOriginalScene",p:void 0}),wn=async(u,e)=>await u.callUeFunc({f:"UnBindActorByID",p:{ID:e}}),yn=async(u,e)=>await u.callUeFunc({f:"UnBindActorByTag",p:{ActorTag:e}}),mn=async(u,e,t)=>await u.callUeFunc({f:"CreateActorByClass",p:{ID:e,ActorClass:t}}),Cn=async function(u,e,t){return await u.callUeFunc({f:"Bind3DTilesetByTag",p:{ID:e,ActorTag:t}})},En=async function(u,e){return await u.callUeFunc({f:"UnBind3DTilesetByTag",p:{ActorTag:e}})},Fn=async function(u,e){return await u.callUeFunc({f:"UnBind3DTilesetById",p:{ID:e}})},Sn=async function(u,e,t,i){return await u.callUeFunc({f:"BindImageryByTag",p:{ID:e,ActorTag:t,ComponentTag:i}})},In=async function(u,e,t){return await u.callUeFunc({f:"UnBindImageryByTag",p:{ActorTag:e,ComponentTag:t}})},Tn=async function(u,e){return await u.callUeFunc({f:"UnBindImageryById",p:{ID:e}})},Rn=async function(u,e,t,i){return await u.callUeFunc({f:"GetIdByComponentNameAndHitItem",p:{id:e,ComponentName:t,HitItem:i}})},Dn=async function(u,e="ECC_Visibility"){return await u.callUeFunc({f:"GetCameraRelativeHeight",p:{Channel:e}})},Ln=async function(u,e,t,i){const n=await u.callUeFunc({f:"SaveStringToFile",p:{String:e,Path:t??"undefine",File:i??"data.txt"}});return n.error!==""&&console.warn("SaveStringToFile: ",n.error),n},kn=async function(u,e,t=!0){const i=await u.callUeFunc({f:"HighlightActorByTag",p:{ActorTag:e,Highlight:t}});return i.error!==""&&console.warn("HighlightActorByTag: ",i.error),i},Pn=async function(u,e){const t=await u.callUeFunc({f:"SendCustomMessage",p:{Message:e}});return t.error!==""&&console.warn("SendCustomMessage: ",t.error),t},Un=async function(u){const e=await u.callUeFunc({f:"GetStatus",p:void 0});if(e.error){console.warn(`GetStatus:${e.error}`);return}return e.re},Mn=async(u,e,t,i,n=!0)=>{const r=await u.callUeFunc({f:"startEditing",p:{sceneObjectID:e,editingID:t,modes:i,useKeyToSwitch:n}});if(r.error){console.error("startEditing:",r.error);return}return r},An=async u=>{const e=await u.callUeFunc({f:"stopEditing",p:void 0});if(e.error){console.error("stopEditing:",e.error);return}return e},Wn=async(u,e,t)=>{const i=await u.callUeFunc({f:"moveObjects",p:{sceneObjectIDs:e,editingID:t}});if(i.error){console.error("moveObjects:",i.error);return}return i},$n=async u=>{const e=await u.callUeFunc({f:"GetTilesetMaterialIDList",p:void 0});if(e.error){console.error("GetTilesetMaterialIDList:",e.error);return}return e.re.materialIDList};class Y extends a.Destroyable{}const Bn={Response:1},ue={UIInteraction:50,MouseWheel:75};class Kn extends a.HasOwner{constructor(t,i){super(t);p(this,"_processResponseFn",t=>this.esUeViewer.processResponse(t));p(this,"_inner");this._uri=i,this._inner=new WebSocket(this._uri),this.d(()=>{this._inner.close()}),this._innerInit()}get esUeViewer(){return this.owner}get uri(){return this._uri}get inner(){return this._inner}_innerInit(){this.inner.onmessage=t=>{if(this.isDestroyed())return;let i=new FileReader;i.onload=n=>{if(this.isDestroyed())return;let r=n.target.result,s=new Uint32Array(r),o=0;if(s[0]===Bn.Response){o+=4;let v=s[o/4];o+=4;for(let d=0;d<v;d++){let y=s[o/4];o+=4;let w=new TextDecoder("utf-8").decode(r.slice(o,o+y));o+=y,this._processResponseFn(w)}}},i.readAsArrayBuffer(t.data)},this.inner.onopen=()=>{this.isDestroyed()||(console.warn("earthsdk message websocket server connected:",this.uri),console.log("%c[EarthSDK websocket open]","background: #a6ec99; color: black","open"),this.owner.dispatchEvent(new CustomEvent("esmsgwsopen",{detail:"websocket open"})))},this._inner.onclose=t=>{this.isDestroyed()||(console.log("%c[EarthSDK websocket close ]","background: red; color: black","error"),this.owner.dispatchEvent(new CustomEvent("error",{detail:"websocket close"})))},this._inner.onerror=t=>{this.isDestroyed()||(console.log("%c[EarthSDK websocket error ]","background: red; color: black","error"),this.owner.dispatchEvent(new CustomEvent("error",{detail:"websocket error"})))}}sendInputData(t){const i=this.inner;if(i.readyState!==WebSocket.OPEN)return;const r=new Uint8Array(t)[0];if(r>=ue.UIInteraction&&r<=ue.MouseWheel){const s=new ArrayBuffer(t.byteLength+4);return new DataView(s).setUint32(0,t.byteLength,!0),new Uint8Array(s,4).set(new Uint8Array(t)),i.send(new DataView(s)),!0}else return!1}emitDescriptorWithString(t,i){let n=new TextEncoder().encode(i),r=new DataView(new ArrayBuffer(3+n.length)),s=0;r.setUint8(s,t),s++,r.setUint16(s,n.length,!0),s+=2;for(let o=0;o<n.length;o++)r.setUint8(s,n[o]),s+=1;try{this.sendInputData(r.buffer)}catch(o){console.error(`data.buffer.size: ${r.buffer.byteLength} 独立通道 sendInputData error: ${o}`,o)}}destroyImpl(){this._inner&&this._inner.close()}}window.g_emitDescriptor_maxBytes=3e4;let qn=-1;L.Logger.SetLoggerVerbosity(1);class Vn extends a.Destroyable{constructor(t,i){super();p(this,"_eventTarget",new EventTarget);p(this,"debug",!1);p(this,"uiInteractionCallbacks",new Map);p(this,"_pixelStream");p(this,"_esMsgWsWrapper");this._domOrDomId=t,this._options=i;const n=typeof this._domOrDomId=="string"?document.getElementById(this._domOrDomId):this._domOrDomId;if(!n)throw new Error(`ESUEViewer container${this._domOrDomId} error!`);console.log(`PSUEViewer init _options ${this._options}`);const{url:r,esmsgWsUri:s}=this._options;this._pixelStream=this._initPixelStream(n,r),this.d(()=>{this._pixelStream.disconnect()}),this._handerPixelStreamEvent(),this._esMsgWsWrapper=this._initEsMsgWsWrapper(s);const o=this;if(o.esMsgWsWrapper){const v=o.webRtcController.sendMessageController.dataChannelSender.sendData;o.webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData=function(d){o.esMsgWsWrapper?o.esMsgWsWrapper.sendInputData(d):v.call(this,d)}}}get eventTarget(){return this._eventTarget}addEventListener(t,i,n){return this.eventTarget.addEventListener(t,i,n)}removeEventListener(t,i,n){return this.eventTarget.removeEventListener(t,i,n)}dispatchEvent(t){return this.eventTarget.dispatchEvent(t)}_initPixelStream(t,i){const n=new L.Config({initialSettings:{AutoPlayVideo:!0,AutoConnect:!0,StartVideoMuted:!0,SuppressBrowserKeys:!1,[L.TextParameters.SignallingServerUrl]:i}});return n.setFlagEnabled(L.Flags.BrowserSendOffer,!1),n.setFlagEnabled(L.Flags.HoveringMouseMode,!0),n.setFlagEnabled(L.Flags.MatchViewportResolution,!0),n.setNumericSetting(L.NumericParameters.MaxReconnectAttempts,0),new L.PixelStreaming(n,{videoElementParent:t})}get pixelStream(){return this._pixelStream}_initEsMsgWsWrapper(t){return t?this.dv(new Kn(this,t)):void 0}get esMsgWsWrapper(){return this._esMsgWsWrapper}get esWebSocketReady(){var t;return((t=this.esMsgWsWrapper)==null?void 0:t.inner.readyState)===1}_handerPixelStreamEvent(){this.pixelStream.addEventListener("videoInitialized",()=>{console.log("%c[EarthSDK webrtc videoInitialized]","background: #a6ec99; color: black","videoInitialized"),this.dispatchEvent(new CustomEvent("videoinited",{detail:"videoinited"}))}),this.pixelStream.addEventListener("webRtcFailed",()=>{this.isDestroyed()||(console.log("%c[EarthSDK webRtc webRtcFailed]","background: red; color: black","webRtcFailed"),this.dispatchEvent(new CustomEvent("error",{detail:"webRtcFailed"})),this.pixelStream.disconnect())}),this.pixelStream.addEventListener("webRtcDisconnected",()=>{this.isDestroyed()||(console.log("%c[EarthSDK webRtc webRtcDisconnected]","background: red; color: black","webRtcDisconnected"),this.dispatchEvent(new CustomEvent("error",{detail:"webRtcDisconnected"})),this.pixelStream.disconnect())}),this.pixelStream.addEventListener("webRtcConnected",()=>{this.isDestroyed()||(console.log("%c[EarthSDK webrtc webRtcConnected]","background: #a6ec99; color: black","webRtcConnected"),this.dispatchEvent(new CustomEvent("webRtcConnected",{detail:"webRtcConnected"})))}),this.pixelStream.addResponseEventListener("esueviewer",t=>{this.processResponse(t)})}resolveCallback(t){let i={};try{i=JSON.parse(t)}catch{return!1}let n=i.callid;if(typeof n!="string"||!this.uiInteractionCallbacks.has(n))return!1;let r=this.uiInteractionCallbacks.get(n);return typeof r!="function"?!1:(r(i),this.uiInteractionCallbacks.delete(n),!0)}processResponse(t){if(this.debug??!1)try{const i=JSON.parse(t);if(i.ers=i.ers&&i.ers.filter(n=>n.et!=="mouseMoveEvent"),!(i.ers&&i.ers.length>0||i.frs&&i.frs.length>0))return;console.group("%cUE => JS"," background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(i,void 0,"")}`," border:1px dashed #006EFF;border-radius:5px;padding:10px;line-height:25px;color:#006EFF;"),console.groupEnd()}catch(i){console.error(`processResponse(${t}) error: ${i}`,i)}this.resolveCallback(t)||this.dispatchEvent(new CustomEvent("ueevent",{detail:t}))}emitUIInteraction(t,i){typeof i=="function"&&(t.callid=a.createGuid(),this.uiInteractionCallbacks.set(t.callid,i)),this.pixelStream.emitUIInteraction(t)}get webRtcController(){return this.pixelStream._webRtcController}emitUIInteractionForBigData(t,i){typeof i=="function"&&(t.callid=a.createGuid(),this.uiInteractionCallbacks.set(t.callid,i));const n=JSON.stringify(t),r=window.g_emitDescriptor_maxBytes,s=n.length,o=++qn;if(this.esMsgWsWrapper){if(s<r){this.esMsgWsWrapper.emitDescriptorWithString(ue.UIInteraction,`${o}-0/1-`+n);return}const v=Math.ceil(s/r)|0;[...new Array(v).keys()].map(y=>n.slice(y*r,(y+1)*r)).forEach((y,w)=>{this.esMsgWsWrapper&&this.esMsgWsWrapper.emitDescriptorWithString(ue.UIInteraction,`${o}-${w}/${v}-`+y)})}}emitCommand(t){this.pixelStream.emitCommand(t)}getVideoSize(){const t=this.webRtcController.videoPlayer.getVideoElement();return{width:t.videoWidth,height:t.videoHeight}}resizeUEVideo(t,i){let n={Resolution:{Width:t,Height:i}};console.log(`resizeUEVideo emitCommand ${t} ${i} begin`),this.emitCommand(n)}}class Xn extends a.Destroyable{constructor(t,i,n){super();p(this,"_instance");p(this,"_event",this.dv(new a.Event));this._container=t,this._wsuri=i,this._esmsgWsUri=n,this._instance=this.dv(new Vn(this._container,{url:this._wsuri,esmsgWsUri:this._esmsgWsUri})),this.instanceInit()}get webSocketReady(){return this._instance.esWebSocketReady}get event(){return this._event}get debug(){return this._instance.debug}set debug(t){this._instance.debug=t}instanceInit(){if("addEventListener"in this._instance){["esmsgwsopen","error","videoinited","ueevent","webRtcConnected"].forEach(i=>{const n=r=>{this._event.emit(i,r.detail)};this._instance.addEventListener(i,n),this.dispose(()=>this._instance.removeEventListener(i,n))});return}this.dispose(this._instance.errorEvent.disposableOn(t=>{this._event.emit("error",t.detail)})),this.dispose(this._instance.webRtcConnectedEvent.disposableOn(t=>{this._event.emit("webRtcConnected",t.detail)})),this.dispose(this._instance.videoinitedEvent.disposableOn(t=>{this._event.emit("videoinited",t.detail)})),this.dispose(this._instance.ueevent.disposableOn(t=>{this._event.emit("ueevent",t.detail)}))}emitUIInteractionForBigData(t,i){return new Promise((n,r)=>{const s=(...o)=>{n(o),i&&i(...o)};try{this._instance.emitUIInteractionForBigData(t,s)}catch(o){console.warn(`emitUIInteraction发生错误:${o}`),r(o)}})}getVideoSize(){return this._instance.getVideoSize()}resize(t,i){this._instance.resizeUEVideo(t,i)}}class Qn extends Y{constructor(t,i,n,r){super();p(this,"_esueViewerWrapper");p(this,"_ueFuncResultWithIdsEvent",this.dv(new a.Event));p(this,"_ueFuncWithIdAndResultCallbacks",[]);p(this,"_waitingUeFuncIdAndResultCallbacks",new Map);p(this,"_waitingUeCalls",new Set);p(this,"_ueEvent",this.dv(new a.Event));p(this,"_errorEvent",this.dv(new a.Event));p(this,"_readyEvent",this.dv(new a.Event));p(this,"_esmsgwsopen",this.dv(a.react(!1)));p(this,"_videoinited",this.dv(a.react(!1)));p(this,"_webRtcConnected",this.dv(a.react(!1)));this._ueViewer=r,console.log("CSTMPSViewer init ! 以官方像素流 + 独立通信的模式启动!");const s=this._ueViewer;this._esueViewerWrapper=this.dv(new Xn(t,i,n));const o=this._esueViewerWrapper;{const g=()=>o.debug=s.debug??!1;g(),this.d(s.debugChanged.don(g))}let v=!1;{const g=()=>{if(v)return;const h=o.webSocketReady;if(this.videoinited&&this.webRtcConnected&&h){console.log("%c[EarthSDK: esmsgWebSocket && videoinited && webRtcConnected]","background: #a6ec99; color: black");const m={eventType:"init",params:{}};o.emitUIInteractionForBigData(m),this._readyEvent.emit(),v=!0}};this.d(this.videoinitedChanged.don(()=>{g()})),this.d(this.webRtcConnectedChanged.don(()=>{g()})),this.d(this.esmsgwsopenChanged.don(()=>{g()}))}this.d(o.event.don((g,h)=>{if(g==="error")this._errorEvent.emit(h);else if(g==="ueevent"){const m=JSON.parse(h);if(m.t==="cr"){const C=m;if(C.frs&&this._ueFuncResultWithIdsEvent.emit(C.frs),C.ers)for(let E of C.ers)this._ueEvent.emit(E)}}else g==="webRtcConnected"?this.webRtcConnected=!0:g==="videoinited"?this.videoinited=!0:g==="esmsgwsopen"&&(this.esmsgwsopen=!0)}));{const g=this.dv(a.createAnimateFrame());let h,m;g.start(()=>{if(h!==t.offsetWidth||m!==t.offsetHeight){if(h=t.offsetWidth,m=t.offsetHeight,h===void 0||m===void 0||!Number.isFinite(h)||!Number.isFinite(m)||h<0||m<0){console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${h} ${m}`);return}o.resize(h,m),console.log(`resize: ${h} ${m}`)}})}this.d(this._ueFuncResultWithIdsEvent.don(g=>{for(const h of g){const m=this._waitingUeFuncIdAndResultCallbacks.get(h.fid);m&&(this._waitingUeFuncIdAndResultCallbacks.delete(h.fid),m.resultCallback(h.r))}}));let d=0;const y=g=>{const h={n:d++,tt:Date.now(),t:"c",fs:g};this._waitingUeCalls.add(h),s.debug&&(console.group("%cxe2 => ue"," background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(h,void 0,"")}`," border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"),console.groupEnd()),this._esueViewerWrapper.emitUIInteractionForBigData(h,()=>{this._waitingUeCalls.delete(h)})},w=()=>{if(!v||this._ueFuncWithIdAndResultCallbacks.length===0)return;const g=this._ueFuncWithIdAndResultCallbacks.map(([h])=>h);for(const[h,m]of this._ueFuncWithIdAndResultCallbacks)this._waitingUeFuncIdAndResultCallbacks.set(h.fid,m);this._ueFuncWithIdAndResultCallbacks.length=0;{const h=window.g_emitDescriptor_maxBytes,m=g.map(R=>({f:R,s:JSON.stringify(R).length}));let C=m.length,E=0,I=0,F=[];do{do{const{f:R,s:T}=m[E];if(F.push(R),++E,I+T>h||F.length>=20)break}while(E<C);F.length>0&&(s.debug&&console.log(`传送${F.length}条消息...`),y([...F]),F.length=0,I=0)}while(E<C)}};this.dv(a.createInterval()).start(w,50),this.d(()=>console.log("UeCloudViewer正在销毁..."))}get esueViewerWrapper(){return this._esueViewerWrapper}get errorEvent(){return this._errorEvent}get readyEvent(){return this._readyEvent}get esmsgwsopen(){return this._esmsgwsopen.value}set esmsgwsopen(t){this._esmsgwsopen.value=t}get esmsgwsopenChanged(){return this._esmsgwsopen.changed}get videoinited(){return this._videoinited.value}set videoinited(t){this._videoinited.value=t}get videoinitedChanged(){return this._videoinited.changed}get webRtcConnected(){return this._webRtcConnected.value}set webRtcConnected(t){this._webRtcConnected.value=t}get webRtcConnectedChanged(){return this._webRtcConnected.changed}resize(t,i){this.esueViewerWrapper.resize(t,i)}callUeFunc(t){return new Promise(i=>{const r={fid:a.createGuid(),...t};this._ueFuncWithIdAndResultCallbacks.push([r,{timeStamp:Date.now(),ueFunc:t,resultCallback:i}])})}disposableOnUeEvent(t,i){(this._ueViewer.debug??!1)&&console.log(`disposableOnUeEvent from UeCloudViewer, type:${t}`);const n=a.createGuid();this.callUeFunc({f:"addEventListener",p:{et:t,eid:n}});const r=()=>{this.callUeFunc({f:"removeEventListener",p:{eid:n}})},s=this._ueEvent.don(o=>{o.et===t&&o.eid===n&&i(o)});return()=>{s(),r()}}}function Yn(u){let e="";const t=new Uint8Array(u),i=t.length;for(let n=0;n<i;n++)e+=String.fromCharCode(t[n]);return btoa(e)}const Zn=u=>{const e={type:"input",inputdata:Yn(u)};return JSON.stringify(e)};function xn(u){return typeof u=="string"?document.getElementById(u):u}window.g_emitDescriptor_maxBytes=3e4,console.log("全局可设置消息体最大字节, window.g_emitDescriptor_maxBytes 默认 30000 。");let bn=-1;L.Logger.SetLoggerVerbosity(1);class On extends a.Destroyable{constructor(t,i){super();p(this,"debug",!1);p(this,"_error",this.dv(new a.Event));p(this,"_connected",this.dv(new a.Event));p(this,"_ueevent",this.dv(new a.Event));p(this,"_pixelStream");p(this,"uiInteractionCallbacks",new Map);this._container=t,this._option=i;const n=new L.Config({initialSettings:{HoveringMouse:!0,AutoPlayVideo:!0,AutoConnect:!0,StartVideoMuted:!1,SuppressBrowserKeys:!1,ss:this._option.ws},useUrlParams:!0});n.setFlagEnabled(L.Flags.BrowserSendOffer,!1),n.setFlagEnabled(L.Flags.HoveringMouseMode,!0),n.setFlagEnabled(L.Flags.MatchViewportResolution,!0),n.setNumericSetting(L.NumericParameters.MaxReconnectAttempts,0),this._pixelStream=new L.PixelStreaming(n,{videoElementParent:this.container}),this.d(()=>{this._pixelStream.disconnect()});{const r=this.pixelStream.webSocketController.webSocket,s=this._pixelStream._webRtcController.sendMessageController.dataChannelSender.sendData;this._pixelStream._webRtcController.sendMessageController.dataChannelSender.constructor.prototype.sendData=function(o){r?r.send(Zn(o)):s.call(this,o)}}{const r=s=>{const o=this._pixelStream._webRtcController.mouseController;setTimeout(()=>{const v=o.coordinateConverter.normalizeAndQuantizeUnsigned(s.offsetX,s.offsetY),y=o.toStreamerMessagesProvider.toStreamerHandlers.get("MouseUp");y&&y([s.button,v.x,v.y]),s.preventDefault()})};this.container.addEventListener("dblclick",r),this.d(()=>{this.container.removeEventListener("dblclick",r)})}["error","close","open"].forEach(s=>{const o=()=>{this.isDestroyed()||(s==="open"?this.connected.emit("webSocketOpen"):s==="close"?this.error.emit("webSocketClose"):s==="error"&&this.error.emit("webSocketError"))};this.pixelStream.webSocketController.webSocket.addEventListener(s,o),this.d(()=>{this.pixelStream.webSocketController.webSocket.removeEventListener(s,o)})}),["videoInitialized","webRtcConnected","webRtcDisconnected","webRtcFailed"].forEach(s=>{const o=()=>{this.isDestroyed()||(s==="webRtcConnected"||s==="videoInitialized"?this.connected.emit(s):(s==="webRtcDisconnected"||s==="webRtcFailed")&&(this.error.emit(s),this.pixelStream.disconnect()))};this.pixelStream.addEventListener(s,o),this.d(()=>{this.pixelStream.removeEventListener(s,o)})}),this.pixelStream.addResponseEventListener("handle_responses",r=>{this.processResponse(r)}),this.d(()=>{this.pixelStream.removeResponseEventListener("handle_responses")})}get error(){return this._error}get connected(){return this._connected}get ueevent(){return this._ueevent}get container(){return xn(this._container)}get pixelStream(){return this._pixelStream}get webSocketReady(){return this.pixelStream.webSocketController.webSocket.readyState===1}processResponse(t){if(this.debug??!1)try{const i=JSON.parse(t);console.group("%cUE => JS"," background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(i,void 0,"")}`," border:1px dashed #006EFF;border-radius:5px;padding:10px;line-height:25px;color:#006EFF;"),console.groupEnd()}catch(i){console.error(`processResponse(${t}) error: ${i}`,i)}this.resolveCallback(t)||this.ueevent.emit(t)}emitUIInteractionForBigData(t,i){typeof i=="function"&&(t.callid=a.createGuid(),this.uiInteractionCallbacks.set(t.callid,i));const n=JSON.stringify(t),r=window.g_emitDescriptor_maxBytes??3e4,s=n.length,o=++bn;if(s<r){const y={type:"earthsdk",time:new Date().getTime(),params:`${o}-0/1-`+n};this.sendData(JSON.stringify(y));return}const v=Math.ceil(s/r)|0;[...new Array(v).keys()].map(y=>n.slice(y*r,(y+1)*r)).forEach((y,w)=>{const l={type:"earthsdk",time:new Date().getTime(),params:`${o}-${w}/${v}-`+y};this.sendData(JSON.stringify(l))})}sendData(t){this.pixelStream.webSocketController.webSocket.send(t)}resolveCallback(t){let i={};try{i=JSON.parse(t)}catch{return!1}let n=i.callid;if(typeof n!="string"||!this.uiInteractionCallbacks.has(n))return!1;let r=this.uiInteractionCallbacks.get(n);return typeof r!="function"?!1:(r(i),this.uiInteractionCallbacks.delete(n),!0)}getVideoSize(){const t=this._pixelStream._webRtcController.videoPlayer.getVideoElement();return{width:t.videoWidth,height:t.videoHeight}}emitCommand(t){this.pixelStream.emitCommand(t)}emitUIInteraction(){console.log("emitUIInteraction 像素流初始化"),this.pixelStream.emitUIInteraction("像素流初始化")}resizeUEVideo(t,i){const n={Resolution:{Width:t,Height:i}};console.log(`resizeUEVideo emitCommand ${t} ${i} begin`),this.emitCommand(n)}}class jn extends a.Destroyable{constructor(t,i,n){super();p(this,"_instance");p(this,"_event",this.dv(new a.Event));this._container=t,this._wsuri=i,this._esmsgWsUri=n,this._instance=this.dv(new On(this._container,{ws:this._wsuri})),this.d(this._instance.connected.don(r=>{this._event.emit(r,r),console.log(`%c[EarthSDK] ${r}`,"background: #a6ec99; color: black")})),this.d(this._instance.error.don(r=>{this._event.emit("errorEvent",r),console.log(`%c[EarthSDK] ${r}`,"background: red; color: black")})),this.d(this._instance.ueevent.don(r=>{this._event.emit("ueevent",r)}))}get instance(){return this._instance}get event(){return this._event}get debug(){return this._instance.debug}set debug(t){this._instance.debug=t}emitUIInteractionForBigData(t,i){return new Promise((n,r)=>{const s=(...o)=>{n(o),i&&i(...o)};try{this._instance.emitUIInteractionForBigData(t,s)}catch(o){console.warn(`emitUIInteraction发生错误:${o}`),r(o)}})}getVideoSize(){return this._instance.getVideoSize()}resize(t,i){this._instance.resizeUEVideo(t,i)}}class tr extends Y{constructor(t,i,n,r){super();p(this,"_videoInitialized",this.dv(a.react(!1)));p(this,"_webRtcConnected",this.dv(a.react(!1)));p(this,"_webSocketOpen",this.dv(a.react(!1)));p(this,"_ue5ViewerWrapper");p(this,"_ueFuncResultWithIdsEvent",this.dv(new a.Event));p(this,"_ueFuncWithIdAndResultCallbacks",[]);p(this,"_waitingUeFuncIdAndResultCallbacks",new Map);p(this,"_waitingUeCalls",new Set);p(this,"_ueEvent",this.dv(new a.Event));p(this,"_errorEvent",this.dv(new a.Event));p(this,"_readyEvent",this.dv(new a.Event));this._ueViewer=r,console.log("INNPSViewer init ! 以内置信令服务器模式启动!");const s=this._ueViewer,o=this.dv(new jn(t,i,n));this._ue5ViewerWrapper=o;{const l=()=>o.debug=s.debug??!1;l(),this.d(s.debugChanged.don(l))}{let l=!1;const g=this.dv(a.createNextAnimateFrameEvent(this._videoInitialized.changed,this._webRtcConnected.changed,this._webSocketOpen.changed));this.d(g.don(()=>{if(l)return;const h=this._ue5ViewerWrapper.instance.webSocketReady;if(this.videoInitialized&&this.webRtcConnected&&h){this._ue5ViewerWrapper.instance.emitUIInteraction(),this._readyEvent.emit(),l=!0,console.log("%c[EarthSDK videoInitialized && webRtcConnected && webSocketReady]","background: #a6ec99; color: black");const m={eventType:"init",params:{}};this._ue5ViewerWrapper.emitUIInteractionForBigData(m)}else console.warn("webSocketReady",h),l=!1}))}this.d(o.event.don((l,g)=>{if(l==="errorEvent")this._errorEvent.emit(g);else if(l==="videoInitialized")this._videoInitialized.value=!0;else if(l==="webRtcConnected")this._webRtcConnected.value=!0;else if(l==="webSocketOpen")this._webSocketOpen.value=!0;else if(l==="ueevent"){const h=JSON.parse(g);if(h.t==="cr"){const m=h;if(m.frs&&this._ueFuncResultWithIdsEvent.emit(m.frs),m.ers)for(let C of m.ers)this._ueEvent.emit(C)}}}));{const l=this.dv(a.createAnimateFrame());let g,h,m;l.start(()=>{if(g!==t.offsetWidth||h!==t.offsetHeight||m!==s.resolutionScale){if(g=t.offsetWidth,h=t.offsetHeight,g===void 0||h===void 0||!Number.isFinite(g)||!Number.isFinite(h)||g<0||h<0){console.warn(`lastWidth === undefined || lastHeight === undefined || !Number.isFinite(lastWidth) || !Number.isFinite(lastHeight) || lastWidth < 0 || lastHeight < 0 ${g} ${h}`);return}m=s.resolutionScale,o.resize(g/m,h/m)}})}this.d(this._ueFuncResultWithIdsEvent.don(l=>{for(const g of l){const h=this._waitingUeFuncIdAndResultCallbacks.get(g.fid);h&&(this._waitingUeFuncIdAndResultCallbacks.delete(g.fid),h.resultCallback(g.r))}}));let v=0;const d=l=>{const g={n:v++,tt:Date.now(),t:"c",fs:l};this._waitingUeCalls.add(g),s.debug&&(console.group("%cxe2 => ue"," background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(g,void 0,"")}`," border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"),console.groupEnd()),this._ue5ViewerWrapper.emitUIInteractionForBigData(g,()=>{this._waitingUeCalls.delete(g)})},y=()=>{if(!this._ue5ViewerWrapper.instance.webSocketReady||this._ueFuncWithIdAndResultCallbacks.length===0)return;const g=this._ueFuncWithIdAndResultCallbacks.map(([h])=>h);for(const[h,m]of this._ueFuncWithIdAndResultCallbacks)this._waitingUeFuncIdAndResultCallbacks.set(h.fid,m);this._ueFuncWithIdAndResultCallbacks.length=0;{const h=window.g_emitDescriptor_maxBytes,m=g.map(R=>({f:R,s:JSON.stringify(R).length}));let C=m.length,E=0,I=0,F=[];do{do{const{f:R,s:T}=m[E];if(F.push(R),++E,I+T>h||F.length>=20)break}while(E<C);F.length>0&&(s.debug&&console.log(`传送${F.length}条消息...`),d([...F]),F.length=0,I=0)}while(E<C)}};this.dv(a.createInterval()).start(y,50),this.d(()=>console.log("UeCloudViewer正在销毁..."))}get videoInitialized(){return this._videoInitialized.value}get webRtcConnected(){return this._webRtcConnected.value}get webSocketOpen(){return this._webSocketOpen.value}get ue5ViewerWrapper(){return this._ue5ViewerWrapper}get errorEvent(){return this._errorEvent}get readyEvent(){return this._readyEvent}resize(t,i){this.ue5ViewerWrapper.resize(t,i)}callUeFunc(t){return new Promise(i=>{const r={fid:a.createGuid(),...t};this._ueFuncWithIdAndResultCallbacks.push([r,{timeStamp:Date.now(),ueFunc:t,resultCallback:i}])})}disposableOnUeEvent(t,i){const n=a.createGuid();this.callUeFunc({f:"addEventListener",p:{et:t,eid:n}});const r=()=>{this.callUeFunc({f:"removeEventListener",p:{eid:n}})},s=this._ueEvent.don(o=>{o.et===t&&o.eid===n&&i(o)});return()=>{s(),r()}}}class er extends a.Destroyable{constructor(t,i,n,r){super();p(this,"_onRuntimeInitialized",this.dv(new a.Event));p(this,"_vIframe",null);this._ueViewer=r;const s=this._ueViewer;{const o=document.createElement("iframe");this._vIframe=o,o.style.cssText="width: 100%; height: 100%; margin: 0; padding: 0; border: none; outline: none;",t.appendChild(o),this.d(()=>{o&&t.removeChild(o)});const v=c.ESSceneObject.getStrFromEnv(n+`/web/${i}.html`);o.src=v,o.onload=()=>{const d=o.contentWindow;if(!d){console.error("iframeWindow is null");return}console.log("iwindow.Module",d.Module),d.Module.onRuntimeInitialized=()=>{this._onRuntimeInitialized.emit(),s.setStatus("Created"),s.setStatusLog("创建成功"),d.Module.UE4_resizeCanvas(),d.console.log("创建成功__________________________________________")}}}}get onRuntimeInitialized(){return this._onRuntimeInitialized}get vIframe(){return this._vIframe}}const _n=typeof TextDecoder<"u"?new TextDecoder:void 0,ir=(u,e=0,t=NaN)=>{const i=e+t;let n=e;for(;u[n]&&!(n>=i);)++n;if(n-e>16&&u.buffer&&_n)return _n.decode(u.subarray(e,n));let r="";for(;e<n;){var s=u[e++];if(!(s&128)){r+=String.fromCharCode(s);continue}var o=u[e++]&63;if((s&224)==192){r+=String.fromCharCode((s&31)<<6|o);continue}var v=u[e++]&63;if((s&240)==224?s=(s&15)<<12|o<<6|v:((s&248)!=240&&console.warn("Invalid UTF-8 leading byte encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),s=(s&7)<<18|o<<12|v<<6|u[e++]&63),s<65536)r+=String.fromCharCode(s);else{var d=s-65536;r+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return r};class nr extends a.Destroyable{constructor(e,t,i){super();{const n=()=>{const v=we(t);t.setGlobalProperty(v)};n();const r=oe(),s=[];r.forEach(v=>{const d=t[v+"Changed"];s.push(d)});const o=this.dv(a.createNextAnimateFrameEvent(...s));this.d(o.don(n))}this.d(t.propChanged.don(n=>{if(n.objId==="")try{Object.keys(n.props).forEach(r=>{const s=n.props[r]===null?void 0:n.props[r];t[r]=s})}catch(r){console.error("ueViewer propChanged:"+r)}})),t.useCustomInteraction=!1,this.dv(new c.ViewerCustomInteraction(t,e)),this.dv(new a.ObjResettingWithEvent(t.statusUpdateIntervalChanged,n=>{if((t.statusUpdateInterval??.5)===0)return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("statusUpdate",o=>{t.statusUpdateEvent.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.propChangedListeningChanged,()=>{if(!(t.propChangedListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("propChanged",s=>{t.propChanged.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(t.objectEventListeningChanged,()=>{if(!(t.objectEventListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("objectEvent",s=>{t.objectEvent.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(t.widgetEventListeningChanged,()=>{if(!(t.widgetEventListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("widgetEvent",s=>{t.widgetEvent.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(t.speechRecognitionListeningChanged,()=>{if(!(t.speechRecognitionListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("speechRecognition",s=>{t.speechRecognition.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(t.customMessageListeningChanged,()=>{if(!(t.customMessageListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("customMessage",s=>{t.customMessage.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(t.editingEventListeningChanged,()=>{if(!(t.editingEventListening??!0))return;const r=new a.Destroyable;return r.d(i.disposableOnUeEvent("editingEvent",s=>{s.objectIDs=s.objectIDs.map(o=>o.split("_")[0]),t.editingEvent.emit(s)})),r}))}}let rr=-1;class sr extends Y{constructor(t,i,n="${earthsdk3-ue-h5-assets-script-dir}",r){super();p(this,"_ueFuncResultWithIdsEvent",this.dv(new a.Event));p(this,"_ueFuncWithIdAndResultCallbacks",[]);p(this,"_waitingUeFuncIdAndResultCallbacks",new Map);p(this,"_waitingUeCalls",new Map);p(this,"_ueEvent",this.dv(new a.Event));this._ueViewer=r;const s=this._ueViewer,o=this.dv(new er(t,i,n,s));let v=!1,d=null;this.d(o.onRuntimeInitialized.don(()=>{var g;if(v=!0,(g=o==null?void 0:o.vIframe)!=null&&g.contentWindow){d=o.vIframe.contentWindow;const h=o.vIframe.contentWindow.document.getElementById("mainarea");h?this.dv(new nr(h,s,this)):console.error("h5Container is null")}else{console.error("iframeWindow is null");return}d.UE_JSHTML5Communication?d.UE_JSHTML5Communication.UESendMessageToJS=h=>{try{const m=ir(d.HEAPU8,h),C=JSON.parse(m);if(s.debug&&(console.group("%cUE => JS"," background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(C,void 0,"")}`," border:1px dashed #006EFF;border-radius:5px;padding:10px;line-height:25px;color:#006EFF;"),console.groupEnd()),C.t==="cr"){const E=C;if(E.frs&&this._ueFuncResultWithIdsEvent.emit(E.frs),E.ers)for(let I of E.ers)this._ueEvent.emit(I)}C.callid&&this._waitingUeCalls.has(C.callid)&&(this._waitingUeCalls.delete(C.callid),console.log(`waitingUeCalls.delete:${C.callid} end`))}catch(m){console.error("UE_JSHTML5Communication.UESendMessageToJS error:",m)}}:console.error("UE_JSHTML5Communication UESendMessageToJS not found")})),this.dispose(this._ueFuncResultWithIdsEvent.disposableOn(g=>{for(const h of g){const m=this._waitingUeFuncIdAndResultCallbacks.get(h.fid);m&&(this._waitingUeFuncIdAndResultCallbacks.delete(h.fid),m(h.r))}}));let y=0;const w=()=>{if(!v||!d||!d.UE_JSHTML5Communication||!d.UE_JSHTML5Communication.JSSendMessageToUE||this._ueFuncWithIdAndResultCallbacks.length===0)return;const g=this._ueFuncWithIdAndResultCallbacks.map(([T])=>T),h={n:y++,tt:Date.now(),t:"c",fs:g,callid:a.createGuid()};for(const[T,W]of this._ueFuncWithIdAndResultCallbacks)this._waitingUeFuncIdAndResultCallbacks.set(T.fid,W);this._ueFuncWithIdAndResultCallbacks.length=0,this._waitingUeCalls.set(h.callid,h),s.debug&&(console.group("%cxe2 => ue"," background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(h,void 0,"")}`," border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"),console.groupEnd());const m=JSON.stringify(h),C=window.g_emitDescriptor_maxBytes??3e4,E=m.length,I=++rr;if(E<C){const T=`${I}-0/1-`+m;d.UE_JSHTML5Communication.JSSendMessageToUE(T);return}const F=Math.ceil(E/C)|0;[...new Array(F).keys()].map(T=>m.slice(T*C,(T+1)*C)).forEach((T,W)=>{const pe=`${I}-${W}/${F}-`+T;d.UE_JSHTML5Communication.JSSendMessageToUE(pe)})};this.dv(a.createInterval()).start(w,50)}processResponse(t){if(this._ueViewer.debug??!1)try{const i=JSON.parse(t);console.group("%cUE => JS"," background-color:#006EFF;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(i,void 0,"")}`," border:1px dashed #006EFF;border-radius:5px;padding:10px;line-height:25px;color:#006EFF;"),console.groupEnd()}catch(i){console.error(`processResponse(${t}) error: ${i}`,i)}}callUeFunc(t){return new Promise(i=>{const r={fid:a.createGuid(),...t};this._ueFuncWithIdAndResultCallbacks.push([r,i])})}disposableOnUeEvent(t,i){const n=a.createGuid();this.callUeFunc({f:"addEventListener",p:{et:t,eid:n}});const r=()=>{this.callUeFunc({f:"removeEventListener",p:{eid:n}})},s=this._ueEvent.disposableOn(o=>{o.et===t&&o.eid===n&&((this._ueViewer.debug??!1)&&console.log(`callback, type:${t} eid:${n} ueEvent:${JSON.stringify(o)}`),i(o))});return()=>{s(),r()}}}let or=-1;class ar extends Y{constructor(t,i){super();p(this,"_ueFuncResultWithIdsEvent",this.dv(new a.Event));p(this,"_ueFuncWithIdAndResultCallbacks",[]);p(this,"_waitingUeFuncIdAndResultCallbacks",new Map);p(this,"_waitingUeCalls",new Set);p(this,"_ueEvent",this.dv(new a.Event));this._ueViewer=i;const n=this._ueViewer;let r=!1;const s={eventType:"init",params:{}};window.ue.es.oncommand(JSON.stringify(s)),r=!0,window.calljs=(y,w)=>{if(n.debug&&console.log(`calljs eventName:${y} eventDetailStr:${w}`),y==="ueevent"||y==="commanFinish")try{const l=JSON.parse(w);if(l.t==="cr"){const g=l;if(g.frs&&this._ueFuncResultWithIdsEvent.emit(g.frs),g.ers)for(let h of g.ers)this._ueEvent.emit(h)}}catch(l){console.error(l)}},this.dispose(this._ueFuncResultWithIdsEvent.disposableOn(y=>{for(const w of y){const l=this._waitingUeFuncIdAndResultCallbacks.get(w.fid);l&&(this._waitingUeFuncIdAndResultCallbacks.delete(w.fid),l(w.r))}}));let o=0;const v=()=>{if(!r||this._ueFuncWithIdAndResultCallbacks.length===0)return;const y=this._ueFuncWithIdAndResultCallbacks.map(([g])=>g),w={n:o++,tt:Date.now(),t:"c",fs:y};for(const[g,h]of this._ueFuncWithIdAndResultCallbacks)this._waitingUeFuncIdAndResultCallbacks.set(g.fid,h);this._ueFuncWithIdAndResultCallbacks.length=0,this._waitingUeCalls.add(w),n.debug&&(console.group("%cxe2 => ue"," background-color:green;color:#ffffff;font-weight:bold;padding:4px;border-radius:5px;"),console.log(`%c${JSON.stringify(w,void 0,"")}`," border:1px dashed green;border-radius:5px;padding:10px;line-height:25px;color:green;"),console.groupEnd());const l=++or;window.ue.es.oncommand(`${l}-0/1-`+JSON.stringify(w)).then(()=>{this._waitingUeCalls.delete(w)})};this.dv(a.createInterval()).start(v,50)}callUeFunc(t){return new Promise(i=>{const r={fid:a.createGuid(),...t};this._ueFuncWithIdAndResultCallbacks.push([r,i])})}disposableOnUeEvent(t,i){const n=a.createGuid();this.callUeFunc({f:"addEventListener",p:{et:t,eid:n}});const r=()=>{this.callUeFunc({f:"removeEventListener",p:{eid:n}})},s=this._ueEvent.disposableOn(o=>{o.et===t&&o.eid===n&&((this._ueViewer.debug??!1)&&console.log(`callback, type:${t} eid:${n} ueEvent:${JSON.stringify(o)}`),i(o))});return()=>{s(),r()}}}class lr extends a.Destroyable{constructor(e,t){super();{const i=()=>{const o=we(e);e.setGlobalProperty(o)};i();const n=oe(),r=[];n.forEach(o=>{const v=e[o+"Changed"];r.push(v)});const s=this.dv(a.createNextAnimateFrameEvent(...r));this.d(s.don(i))}this.d(e.propChanged.don(i=>{if(i.objId==="")try{Object.keys(i.props).forEach(n=>{const r=i.props[n]===null?void 0:i.props[n];e[n]=r})}catch(n){console.error("ueViewer propChanged:"+n)}})),this.dv(new a.ObjResettingWithEvent(e.statusUpdateIntervalChanged,i=>{if((e.statusUpdateInterval??.5)===0)return;const r=new a.Destroyable;return r.d(t.disposableOnUeEvent("statusUpdate",s=>{e.statusUpdateEvent.emit(s)})),r})),this.dv(new a.ObjResettingWithEvent(e.propChangedListeningChanged,()=>{if(!(e.propChangedListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("propChanged",r=>{e.propChanged.emit(r)})),n})),this.dv(new a.ObjResettingWithEvent(e.objectEventListeningChanged,()=>{if(!(e.objectEventListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("objectEvent",r=>{e.objectEvent.emit(r)})),n})),this.dv(new a.ObjResettingWithEvent(e.widgetEventListeningChanged,()=>{if(!(e.widgetEventListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("widgetEvent",r=>{e.widgetEvent.emit(r)})),n})),this.dv(new a.ObjResettingWithEvent(e.speechRecognitionListeningChanged,()=>{if(!(e.speechRecognitionListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("speechRecognition",r=>{e.speechRecognition.emit(r)})),n})),this.dv(new a.ObjResettingWithEvent(e.customMessageListeningChanged,()=>{if(!(e.customMessageListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("customMessage",r=>{e.customMessage.emit(r)})),n})),this.dv(new a.ObjResettingWithEvent(e.editingEventListeningChanged,()=>{if(!(e.editingEventListening??!0))return;const n=new a.Destroyable;return n.d(t.disposableOnUeEvent("editingEvent",r=>{r.objectIDs=r.objectIDs.map(s=>s.split("_")[0]),e.editingEvent.emit(r)})),n}))}}class dr extends a.Destroyable{constructor(e,t,i){super();{const r=()=>{const d=we(t);t.setGlobalProperty(d)};r();const s=oe(),o=[];s.forEach(d=>{const y=t[d+"Changed"];o.push(y)});const v=this.dv(a.createNextAnimateFrameEvent(...o));this.d(v.don(r))}this.d(t.propChanged.don(r=>{if(r.objId==="")try{Object.keys(r.props).forEach(s=>{const o=r.props[s]===null?void 0:r.props[s];t[s]=o})}catch(s){console.error("ueViewer propChanged:"+s)}}));const n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.overflow="hidden",n.style.top="0",n.style.left="0",n.style.zIndex="0",n.style.backgroundColor="rgba(255,0,0,0)",n.setAttribute("masker","大屏顶层div,用于模拟鼠标事件和控制UE鼠标事件是否生效"),e.appendChild(n),this.d(()=>{n&&e&&e.removeChild(n)});{const r=(d,y)=>{window.ue.esinput.setinterceptevent(y),d.preventDefault()},s=d=>{r(d,!1)},o=d=>{r(d,!0)},v=d=>{r(d,!1)};n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",o),n.addEventListener("mousemove",v),this.d(()=>{n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",o),n.removeEventListener("mousemove",v)})}t.useCustomInteraction=!1,this.dv(new c.ViewerCustomInteraction(t,n)),this.dv(new a.ObjResettingWithEvent(t.statusUpdateIntervalChanged,r=>{if((t.statusUpdateInterval??.5)===0)return;const o=new a.Destroyable;return o.d(i.disposableOnUeEvent("statusUpdate",v=>{t.statusUpdateEvent.emit(v)})),o})),this.dv(new a.ObjResettingWithEvent(t.propChangedListeningChanged,()=>{if(!(t.propChangedListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("propChanged",o=>{t.propChanged.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.objectEventListeningChanged,()=>{if(!(t.objectEventListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("objectEvent",o=>{t.objectEvent.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.widgetEventListeningChanged,()=>{if(!(t.widgetEventListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("widgetEvent",o=>{t.widgetEvent.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.speechRecognitionListeningChanged,()=>{if(!(t.speechRecognitionListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("speechRecognition",o=>{t.speechRecognition.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.customMessageListeningChanged,()=>{if(!(t.customMessageListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("customMessage",o=>{t.customMessage.emit(o)})),s})),this.dv(new a.ObjResettingWithEvent(t.editingEventListeningChanged,()=>{if(!(t.editingEventListening??!0))return;const s=new a.Destroyable;return s.d(i.disposableOnUeEvent("editingEvent",o=>{o.objectIDs=o.objectIDs.map(v=>v.split("_")[0]),t.editingEvent.emit(o)})),s}))}}class cr extends a.Destroyable{constructor(t,i,n){super();p(this,"_reconnectEvent",this.dv(new a.Event));const r=(v,d)=>v.hasOwnProperty(d);let s=0,o;if(this.d(()=>{o&&clearTimeout(o)}),window.ue&&window.ue.es)if(window.ue.esinput){n.setStatus("Creating"),console.log("存在(window.ue && window.ue.es && window.ue.esinput 需要适配新版ESWebView 鼠标穿透), 开始创建UeFalseCloudViewer..."),n.setStatusLog("开始创建本地视口...");const v=this.dv(new ar(t,n));this.d(()=>n.viewer=void 0),n.viewer=v,n.setStatus("Created"),n.setStatusLog("本地视口创建成功!"),this.dv(new dr(t,n,v))}else n.setStatus("Error"),n.setStatusLog("请升级 ESWebView !");else if(r(i.options,"ws")||r(i.options,"uri")&&r(i.options,"app")){n.setStatus("Creating"),n.setStatusLog("开始创建云渲染视口...");let v;this.d(()=>{n.setStatus("Raw"),n.setStatusLog(""),t&&v&&t.removeChild(v)&&(v=void 0)});const d=this.dv(a.createProcessingFromAsyncFunc(async y=>{n.viewer&&!n.viewer.isDestroyed()&&n.viewer.destroy(),n.viewer=void 0,v&&t.removeChild(v)&&(v=void 0),v=document.createElement("div"),v.setAttribute("earthsdk3-ue","earthsdk3-ue-videoContainer"),v.style.cssText="position:relative; height: 100%;width:100%;",t.appendChild(v);let w,l,g;if(r(i.options,"ws")){const{ws:E,esmsg:I,uselnternalSignallingServer:F}=i.options;w=E,l=I,g=F??!1}if(r(i.options,"uri")&&r(i.options,"app")){const{offsetWidth:E,offsetHeight:I}=v;let{uri:F,app:R,token:T}=i.options;F.endsWith("/")||(F+="/");const W=T?`?essstoken=${T}`:"",pe=`/${R}/${E??1920}/${I??1080}`+W;console.log(`请求信令服务器: ${F}instance${pe}`);const vr=await y.promise(fetch(`${F}instance${pe}`,{method:"GET"})),X=await y.promise(vr.json());if(X&&X.status!=="ok"){n.setStatus("Error"),n.setStatusLog(`信令服务器请求失败 ${X.status}`),this._reconnectEvent.emit(void 0);return}else{console.log(`信令服务器请求成功! ${JSON.stringify(X,void 0," ")}`),await a.sleep(2e3);const{server:gr,esmsg:fr,instanceId:pr,useInternalSignallingServer:wr}=X;if(!pr){n.setStatus("Error"),n.setStatusLog("检查信令服务器版本,返回数据错误! "),console.log("信令服务器返回数据错误!不包含instanceId!请升级到 ESSS V3.0+ 版本!"),this._reconnectEvent.emit(void 0);return}w=gr,l=fr,g=wr??!1,n.esssResponse=X}}const h=this.dv(g?new tr(v,w,l,n):new Qn(v,w,l,n));this.d(()=>n.viewer=void 0),this.d(h.errorEvent.don(E=>{const I=`[${E}]:像素流连接错误!`;n.setStatus("Error"),n.setStatusLog(I),this._reconnectEvent.emit(h)})),await y.promise(new Promise(E=>this.d(h.readyEvent.donce(E)))),n.setStatus("Created"),n.setStatusLog("云渲染视口创建成功!"),s=0,o&&clearTimeout(o),o=void 0;const{offsetWidth:m,offsetHeight:C}=v;h.resize(m*window.devicePixelRatio,C*window.devicePixelRatio),n.viewer=h,this.d(()=>n.viewer=void 0),this.dv(new lr(n,h))}));d.start(),this.d(this._reconnectEvent.don(y=>{o===void 0&&(y&&!y.isDestroyed()&&y.destroy(),n.viewer&&!n.viewer.isDestroyed()&&n.viewer.destroy(),n.viewer=void 0,n.autoReconnect&&(n.setStatus("Reconnecting"),n.setStatusLog("正在尝试重新连接..."),s=s+5e3>3e4?3e4:s+5e3,console.warn(`间隔:${s/1e3}s,正在尝试重新连接...`),o=window.setTimeout(()=>{d.restart()},s)))})),this.d(d.errorEvent.don(y=>{n.setStatus("Error"),n.setStatusLog("云渲染视口创建失败!"),console.warn("云渲染视口创建失败!",y),this._reconnectEvent.emit(void 0)}))}else if(r(i.options,"project")){const v=i,d=v.options.project,y=v.options.baseUrl;n.setStatus("Creating"),n.setStatusLog("下载编译中...");const w=this.dv(new sr(t,d,y,n));n.viewer=w,this.d(()=>n.viewer=void 0)}else n.setStatus("Error"),n.setStatusLog("视口创建失败!"),console.warn("视口创建失败: 参数错误!")}}const _=class _ extends c.ESViewer{constructor(t){super(t);p(this,"_viewer",this.dv(a.react(void 0)));p(this,"_esssResponse");p(this,"_speechRecognition",this.dv(new a.Event));p(this,"_propChanged",this.dv(new a.Event));p(this,"_objectEvent",this.dv(new a.Event));p(this,"_widgetEvent",this.dv(new a.Event));p(this,"_customMessage",this.dv(new a.Event));p(this,"_statusUpdateEvent",this.dv(new a.Event));p(this,"_statusUpdateEventdon",(()=>{this.d(this.statusUpdateEvent.don(t=>{this._statusInfo.fps=t.FPS??0,this._statusInfo.length=t.length??0,this._statusInfo.position=t.position??[0,0,0],this._statusInfo.rotation=t.rotation??[0,0,0]}))})());if(t.type!=="ESUeViewer")throw new Error("option.type must be ESUeViewer");const i=t;this.d(this._viewer.changed.don(()=>{this.viewerChanged.emit(this.viewer)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new cr(this.subContainer,i,this)}))}get defaultProps(){return _.createDefaultProps()}set viewer(t){this._viewer.value=t}get viewer(){return this._viewer.value}get esssResponse(){return this._esssResponse}set esssResponse(t){this._esssResponse=t}get speechRecognition(){return this._speechRecognition}get propChanged(){return this._propChanged}get objectEvent(){return this._objectEvent}get widgetEvent(){return this._widgetEvent}get customMessage(){return this._customMessage}get statusUpdateEvent(){return this._statusUpdateEvent}async uePositionToLonLatAlt(t){if(!this.viewer){console.warn("UEPositionToLonLatAlt: viewer is undefined");return}return await on(this.viewer,t)}async changeNavigationMode(t){if(!this.viewer){console.warn("ChangeNavigationMode: viewer is undefined");return}const i=await M(this.viewer,t);return i&&!i.error&&(this._navigationMode.value=t.mode),i}async resetWithCurrentCamera(t){if(!this.viewer){console.warn("resetWithCurrentCamera: viewer is undefined");return}return await me(this.viewer,t)}async getAllSocketNamesByActorTag(t){if(!this.viewer){console.warn("GetAllSocketNamesByActorTag: viewer is undefined");return}return await an(this.viewer,t)}async getBoundSphere(t){if(!this.viewer){console.warn("getBoundSphere: viewer is undefined");return}return await dn(this.viewer,t)}async getBoundSphereWithChildren(t){if(!this.viewer){console.warn("getBoundSphereWithChildren: viewer is undefined");return}return await cn(this.viewer,t)}async getStrokeMaterialParamInfo(t){if(!this.viewer){console.warn("GetStrokeMaterialParamInfo: viewer is undefined");return}return await un(this.viewer,t)}async getFillMaterialParamInfo(t){if(!this.viewer){console.warn("getFillMaterialParamInfo: viewer is undefined");return}return await hn(this.viewer,t)}async getGlobalProperty(t){if(!this.viewer){console.warn("getGlobalProperty: viewer is undefined");return}return await vn(this.viewer,t)}async getObjectByInfo(t){if(!this.viewer){console.warn("GetObjectByInfo: viewer is undefined");return}return await gn(this.viewer,t)}async defaultCameraFlyIn(t=1){if(!this.viewer){console.warn("DefaultCameraFlyIn: viewer is undefined");return}return await zi(this.viewer,t)}async startVoice(){if(!this.viewer){console.warn("startVoice:viewer is undefined");return}return await Hi(this.viewer)}async stopVoice(){if(!this.viewer){console.warn("startVoice:viewer is undefined");return}return await Gi(this.viewer)}async mountPakFiles(t){if(!this.viewer){console.warn("mountPakFiles:viewer is undefined");return}return await Ji(this.viewer,t)}async generateMemReport(){if(!this.viewer){console.warn("generateMemReport:viewer is undefined");return}return await Bi(this.viewer)}async quit(){if(!this.viewer){console.warn("Quit: viewer is undefined");return}return await bi(this.viewer)}async bindActorByTag(t,i){if(!this.viewer){console.warn("BindActorByTag: viewer is undefined");return}return await fn(this.viewer,t,i)}async restoreOriginalScene(){if(!this.viewer){console.warn("RestoreOriginalScene: viewer is undefined");return}return await pn(this.viewer)}async unBindActorByID(t){if(!this.viewer){console.warn("UnBindActorByID: viewer is undefined");return}return await wn(this.viewer,t)}async unBindActorByTag(t){if(!this.viewer){console.warn("UnBindActorByTag: viewer is undefined");return}return await yn(this.viewer,t)}async createActorByClass(t,i){if(!this.viewer){console.warn("CreateActorByClass: viewer is undefined");return}return await mn(this.viewer,t,i)}async bind3DTilesetByTag(t,i){if(!this.viewer){console.warn("Bind3DTilesetByTag: viewer is undefined");return}return await Cn(this.viewer,t,i)}async unBind3DTilesetByTag(t){if(!this.viewer){console.warn("UnBind3DTilesetByTag: viewer is undefined");return}return await En(this.viewer,t)}async unBind3DTilesetById(t){if(!this.viewer){console.warn("UnBind3DTilesetById: viewer is undefined");return}return await Fn(this.viewer,t)}async bindImageryByTag(t,i,n){if(!this.viewer){console.warn("BindImageryByTag: viewer is undefined");return}return await Sn(this.viewer,t,i,n)}async unBindImageryByTag(t,i){if(!this.viewer){console.warn("UnBindImageryByTag: viewer is undefined");return}return await In(this.viewer,t,i)}async unBindImageryById(t){if(!this.viewer){console.warn("UnBindImageryById: viewer is undefined");return}return await Tn(this.viewer,t)}async getIdByComponentNameAndHitItem(t,i,n){if(!this.viewer){console.warn("GetIdByComponentNameAndHitItem: viewer is undefined");return}return await Rn(this.viewer,t,i,n)}async getCameraRelativeHeight(t="ECC_Visibility"){if(!this.viewer){console.warn("GetCameraRelativeHeight: viewer is undefined");return}return await Dn(this.viewer,t)}async saveStringToFile(t,i,n){if(!this.viewer){console.warn("SaveStringToFile: viewer is undefined");return}return await Ln(this.viewer,t,i,n)}async highlightActorByTag(t,i=!0){if(!this.viewer){console.warn("HighlightActorByTag: viewer is undefined");return}return await kn(this.viewer,t,i)}async sendCustomMessage(t){if(!this.viewer){console.warn("SendCustomMessage: viewer is undefined");return}return await Pn(this.viewer,t)}async getStatus(){if(!this.viewer){console.warn("GetStatus:viewer is undefined");return}return await Un(this.viewer)}async getTilesetMaterialIDList(){if(!this.viewer){console.warn("GetTilesetMaterialIDList:viewer is undefined");return}return await $n(this.viewer)}async pick(t,i,n){if(!this.viewer)return;let r=t;if(t&&window.ue&&this.container){const[s,o]=t,{x:v,y:d}=this.container.getBoundingClientRect();r=[v+s,d+o]}return await Oi(this.viewer,r,i,n)}async pickPosition(t){if(!this.viewer)return;let i=t;if(t&&window.ue&&this.container){const[n,r]=t,{x:s,y:o}=this.container.getBoundingClientRect();i=[s+n,o+r]}return await ji(this.viewer,i)}async flyIn(t,i=[0,0,0],n=1,r="default"){if(!this.viewer)return;const s=await Q(this.viewer,void 0,t,i,n,r);if(s)return s.endType===0&&console.warn(`flyTo:flyTo is end! endType:${s.endType}`),s.endType===1&&console.warn(`flyTo:飞行中断! endType:${s.endType}`),s}async flyTo(t,i,n="default"){if(!this.viewer)return;const r=await B(this.viewer,void 0,void 0,t,i,n);if(r)return r.endType===0&&console.warn(`flyTo:flyTo is end! endType:${r.endType}`),r.endType===1&&console.warn(`flyTo:飞行中断! endType:${r.endType}`),r}flyToBoundingSphere(t,i,n=1){const r=[[t[0],t[1],0],[t[0],t[3],0],[t[2],t[3],0],[t[2],t[1],0]],s=c.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:o,radius:v}=s,d={distance:i??v,heading:0,pitch:-90,flyDuration:n,hDelta:0,pDelta:0};this.flyTo(d,o)}getCurrentCameraInfo(){const{position:t,rotation:i}=this._statusInfo;return{position:t,rotation:i}}getLengthInPixel(){return this._statusInfo.length}async changeToWalk(t,i=4.2){if(!this.viewer)return;const n={mode:"Walk",position:t,jumpZVelocity:i},r=await M(this.viewer,n);return r&&!r.error&&(this._navigationMode.value=n.mode),r}async changeToMap(){if(!this.viewer)return;const t={mode:"Map"},i=await M(this.viewer,t);return i&&!i.error&&(this._navigationMode.value=t.mode),i}async changeToRotateGlobe(t=38,i=1e7,n=60){if(!this.viewer)return;const r={mode:"RotateGlobe",latitude:t,height:i,cycleTime:n},s=await M(this.viewer,r);return s&&!s.error&&(this._navigationMode.value=r.mode),s}async changeToLine(t,i=10,n=10,r=!0,s=10,o="auto"){if(!this.viewer)return;const v={mode:"Line",geoLineStringId:t,speed:i,heightOffset:n,loop:r,turnRateDPS:s,lineMode:o},d=await M(this.viewer,v);return d&&!d.error&&(this._navigationMode.value=v.mode),d}async changeToUserDefined(t){if(!this.viewer)return;const i={mode:"UserDefined",userDefinedPawn:t},n=await M(this.viewer,i);return n&&!n.error&&(this._navigationMode.value=i.mode),n}async changeToRotatePoint(t,i=5e4,n=60,r=0,s=-30){if(!this.viewer)return;const o={mode:"RotatePoint",position:t,distance:i,orbitPeriod:n,heading:r,pitch:s},v=await M(this.viewer,o);return v&&!v.error&&(this._navigationMode.value=o.mode),v}async changeToFollow(t,i=0,n=0,r=-30,s=!0){if(!this.viewer)return;const o={mode:"Follow",objectId:t,distance:i,heading:n,pitch:r,relativeRotation:s},v=await M(this.viewer,o);return v&&!v.error&&(this._navigationMode.value=o.mode),v}getFPS(){return this._statusInfo.fps}async getVersion(){const t=window.g_XE3CopyRights??{};if(!this.viewer)return t;const i=await ln(this.viewer);return t.esforue=i,t}async getHeightByLonLat(t,i,n="ECC_Visibility"){if(!this.viewer)return null;const r=await tn(this.viewer,t,i,n);return r&&r.height!==void 0?r.height:null}async getHeightsByLonLats(t,i="ECC_Visibility"){return this.viewer?await en(this.viewer,t,i):void 0}async capture(t=64,i=64){return this.viewer?await nn(this.viewer,t,i):void 0}async partialCapture(t,i=[64,64]){if(!this.viewer){console.warn("partialCapture:viewer is undefined");return}return await rn(this.viewer,t,i)}async lonLatAltToScreenPosition(t){if(!this.viewer)return;const i=await sn(this.viewer,t);return i&&[i.X,i.Y]}async setGlobalProperty(t){if(this.viewer)return await xi(this.viewer,t)}async startEditing(t,i,n){n=Object.assign({useKeyToSwitch:!0,callSource:"outer"},n);const r=t.combinationClass?t.getMainClass():t;if(!r||!this.viewer||i==null)return;const s=Array.isArray(i)?[...i]:[i];return r.editingID=`${n.callSource}_${a.createGuid()}`,await Mn(this.viewer,r.id,r.editingID,s,n.useKeyToSwitch)}async stopEditing(){if(this.viewer)return await An(this.viewer)}async moveObjects(t){if(!this.viewer)return;const i=[],n=a.createGuid();for(let r=0;r<t.length;r++){const s=t[r],o=s.combinationClass?s.getMainClass():s;o.editingID=n,o&&i.push(o.id)}if(i.length!==0)return await Wn(this.viewer,i,n)}getProperties(){return[...super.getProperties()]}};p(_,"type",_.register("ESUeViewer",_)),p(_,"defaults",{...Jn});let A=_;(u=>{u.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),..._i(),resolutionScale:1,autoReconnect:!1,propChangedListening:void 0,objectEventListening:void 0,widgetEventListening:void 0,speechRecognitionListening:void 0,customMessageListening:void 0})})(A||(A={})),a.extendClassProps(A.prototype,A.createDefaultProps);class $ extends c.EngineObject{constructor(e,t){super(e,t);const i=t.viewer;if(i&&(e.combinationClass||this.d(this.createdEvent.don(()=>{const n=this.constructor.propValFuncs,r=e.defaultProps,s=Object.keys(r).filter(l=>n[l]!==null);s.push(...this.constructor.forceUeUpdateProps);const o=e.constructor.defaults,v={val:{}},d=[];for(let l of s){const g=l+"Changed",h=e[g];d.push(h);const m=n[l];if(m===null)throw console.error("vf === null error"),new Error("vf === null error");const C=()=>{const E=e[l]??o[l];let I=m?m(E,this,t,e):E;if(I===void 0){console.warn(`UE自动更新的属性,不应该为undefined! 属性名:${l} 对象名:${e.name} 对象id: ${e.id}`);return}v.val[l]=I};C(),this.d(h.don(C))}const y=()=>{i.callUeFunc({f:"update",p:{id:e.id,...v.val}}),v.val={}},w=this.dv(a.createNextAnimateFrameEvent(...d));this.d(w.don(y)),this.d(e.createdEvent.don(y)),this.d(e.flushEvent.don(()=>w.flush()))})),!e.combinationClass)){let n=!1;this.d(()=>{n&&ye(i,e.id)}),i.callUeFunc({f:"create",p:{type:e.typeName,id:e.id}}).then(()=>{n=!0,e.createdEvent.emit()}).catch(r=>console.error(r))}}}p($,"propValFuncs",{ref:null,devTags:null,extras:null,execOnceFuncStr:null,updateFuncStr:null,toDestroyFuncStr:null}),p($,"forceUeUpdateProps",[]);class k extends ${constructor(e,t){super(e,t);const i=t.viewer;i&&(this.d(e.flyToEvent.don(n=>{B(i,e.id,n)})),this.d(e.flyInEvent.don(n=>{var r,s;Q(i,e.id,(r=e.flyInParam)==null?void 0:r.position,(s=e.flyInParam)==null?void 0:s.rotation,n??1)})),this.d(e.calcFlyToParamEvent.don(()=>{K(i,e.id)})),this.d(e.calcFlyInParamEvent.don(()=>{const n=t.getCurrentCameraInfo();if(!n)return;const{position:r,rotation:s}=n;e.flyInParam={position:r,rotation:s,flyDuration:1}})),this.d(t.propChanged.don(n=>{n.objId===e.id&&Object.keys(n.props).forEach(r=>{const s=n.props[r]===null?void 0:n.props[r];e[r]=s})})))}}class S extends k{constructor(e,t){super(e,t);const i=t.viewer;if(!i)return;const n=()=>{e.editing||i.callUeFunc({f:"update",p:{id:e.id,position:e.position,rotation:e.rotation}})},r=this.dv(a.createNextAnimateFrameEvent(e.positionChanged,e.rotationChanged,e.editingChanged));this.d(r.don(()=>{setTimeout(n,0)})),this.d(e.smoothMoveEvent.don((v,d)=>{ce(i,e.id,v,d)})),this.d(e.smoothMoveWithRotationEvent.don((v,d,y)=>{ae(i,e.id,v,d,y)})),this.d(e.smoothMoveOnGroundEvent.don((v,d,y,w)=>{le(i,e.id,v,d,w,y)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((v,d,y,w,l)=>{de(i,e.id,v,d,y,w,l)})),this.d(e.smoothMoveKeepPitchEvent.don(async(v,d)=>{const y=await i.callUeFunc({f:"SmoothMoveKeepPitch",p:{id:e.id,Destination:v,Time:d}});y.error&&console.error("SmoothMoveKeepPitch:",y.error)})),this.d(e.automaticLandingEvent.don(v=>{const d=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(y=>{y!==null&&(e.position=[...d,y],e.collision=v)})}));const s=async(v,d,y,w)=>{const{viewer:l}=v;if(!l){console.error("SmoothMoveRelatively: ueViewer.viewer is undefined");return}const g=await l.callUeFunc({f:"SmoothMoveRelatively",p:{id:d,RelativePosition:y,Time:w}});return g.error&&console.error("SmoothMoveRelatively:",g.error),g};this.d(e.smoothMoveRelativelyEvent.don((v,d)=>{s(t,e.id,v,d)}));const o=async(v,d,y,w,l)=>{const{viewer:g}=v;if(!g){console.error("SmoothMoveRelativelyWithRotation: ueViewer.viewer is undefined");return}const h=await g.callUeFunc({f:"SmoothMoveRelativelyWithRotation",p:{id:d,RelativePosition:y,NewRotation:w,Time:l}});return h.error&&console.error("SmoothMoveRelativelyWithRotation:",h.error),h};this.d(e.smoothMoveRelativelyWithRotationEvent.don((v,d,y)=>{o(t,e.id,v,d,y)}))}}class D extends k{constructor(e,t){super(e,t);const i=t.viewer;if(!i)return;const n=()=>{e.editing||i.callUeFunc({f:"update",p:{id:e.id,points:e.points}})},r=this.dv(a.createNextAnimateFrameEvent(e.pointsChanged,e.editingChanged));this.d(r.don(()=>{setTimeout(n,0)}))}}p(D,"propValFuncs",{...k.propValFuncs,pointStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})}),strokeStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})}),fillStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})})});class U extends S{constructor(e,t){super(e,t),t.viewer&&this.d(t.widgetEvent.don(n=>{if(n.objId!==e.id)return;const{type:r,add:s}=n;e.widgetEvent.emit({type:r,add:s})}))}}class Ee extends S{constructor(e,t){super(e,t),t.viewer}}p(Ee,"propValFuncs",{...S.propValFuncs,pointStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})}),strokeStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})}),fillStyle:e=>({...e,materialParams:JSON.stringify(e.materialParams??{})})});class he extends Ee{constructor(e,t){super(e,t),t.viewer}}const Nn=u=>{switch(u){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"没搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是3dTileset,无法绑定";default:return"未知错误"}},Z=class Z extends c.EngineObject{constructor(t,i){super(t,i);p(this,"_styleColor",this.dv(a.react([])));p(this,"_styleVisable",this.dv(a.react([])));const n=i.viewer;if(!n){console.warn("UeES3DTileset: viewer is undefined!");return}let r,s;const o=async()=>{!r&&!s||await n.callUeFunc({f:"update",p:{id:t.id,url:t.url,show:t.show,collision:t.collision,allowPicking:t.allowPicking,flyToParam:t.flyToParam??c.ESVisualObject.defaults.flyToParam,flyInParam:t.flyInParam??c.ESVisualObject.defaults.flyInParam,highlightID:t.highlightID,highlightColor:t.highlightColor,highlight:t.highlight,materialMode:t.materialMode,maximumScreenSpaceError:t.maximumScreenSpaceError,colorMode:Reflect.has(t,"colorMode")?t.colorMode:void 0,offset:t.offset,rotation:t.rotation,cacheBytes:t.cacheBytes,colorBlendMode:t.colorBlendMode,materialOverrideMap:t.materialOverrideMap}})},v=this.dv(a.createNextAnimateFrameEvent(t.urlChanged,t.showChanged,t.flyToParamChanged,t.flyInParamChanged,t.collisionChanged,t.allowPickingChanged,t.highlightIDChanged,t.highlightColorChanged,t.highlightChanged,t.materialModeChanged,t.maximumScreenSpaceErrorChanged,t.offsetChanged,t.rotationChanged,t.cacheBytesChanged,t.colorBlendModeChanged,t.materialOverrideMapChanged));o(),this.d(v.don(o)),Reflect.has(t,"colorMode")&&this.d(t.colorModeChanged.don(()=>o()));const d=this.dv(a.react(void 0));{const w=this.dv(a.createNextAnimateFrameEvent(t.actorTagChanged,t.urlChanged)),l=()=>{t.actorTag?d.value={type:"ActorTag",actorTag:t.actorTag}:t.url?d.value={type:"CreatedUrl",url:t.url}:d.value=void 0,t.editing=!1};l(),this.d(w.don(l))}const y=async()=>{const{id:w}=t;if(r!==void 0){r=void 0;try{const l=await i.unBind3DTilesetById(w);if(!l)return;if(l.error!==""){console.warn(`UeES3DTileset UnBind3DTilesetById: ${l.error}`);return}}catch(l){console.warn(`UeES3DTileset UnBind3DTilesetById: ${l}`);return}}if(s!==void 0){s=void 0;try{const l=await n.callUeFunc({f:"destroy",p:{id:w}});if(!l)return;if(l.error!==""){console.warn(`UeES3DTileset Destroy: ${l.error}`);return}}catch(l){console.warn(`UeES3DTileset Destroy: ${l}`);return}}};this.d(()=>{y()});{const w=this.dv(a.createProcessingFromAsyncFunc(async g=>{if(d.value===void 0){await g.promise(y());return}if(d.value.type==="ActorTag"){const{actorTag:h}=d.value;if(r!==h&&await g.promise(y()),r!==void 0||h===void 0)return;try{r=h;const m=await g.promise(i.bind3DTilesetByTag(t.id,h));if(!m)return;if(m.error!==""){console.warn(`UeES3DTileset Bind3DTilesetByTag: ${m.error}`);return}if(m.re.type!==0)if(m.re.type===1)console.warn(`UeES3DTileset Bind3DTilesetByTag: ${Nn(m.re.type)}`);else{console.warn(`UeES3DTileset Bind3DTilesetByTag: ${Nn(m.re.type)}`);return}}catch(m){console.warn(`UeES3DTileset Bind3DTilesetByTag: ${m}`);return}}else if(d.value.type==="CreatedUrl"){const{url:h}=d.value;if(h!==s&&await y(),s!==void 0||h===void 0)return;try{s=h;const m=await g.promise(n.callUeFunc({f:"create",p:{type:t.typeName,id:t.id}}));if(!m)return;if(m.error!==""){console.warn(`UeES3DTileset create: ${m.error}`);return}}catch(m){console.warn(`UeES3DTileset create: ${m}`);return}}await g.promise(o())})),l=async()=>{w.restart()};l(),this.d(d.changed.don(l))}this.d(t.refreshTilesetEvent.don(()=>{Ni(n,t.id)})),this.d(t.flyToEvent.don(async(w,l)=>{if(!r&&!s)return;const g=await B(n,t.id,w);let h="over";g===void 0?h="error":g.endType===0?h="over":g.endType===1&&(h="cancelled"),t.flyOverEvent.emit(l,h,i)})),this.d(t.calcFlyToParamEvent.don(()=>{!r&&!s||K(n,t.id)})),this.d(t.calcFlyInParamEvent.don(async()=>{if(!r&&!s||!i.actived)return;const w=await i.getCurrentCameraInfo();if(!w)return;const{position:l,rotation:g}=w;t.flyInParam={position:l,rotation:g,flyDuration:1}})),this.d(i.propChanged.don(w=>{!r&&!s||w.objId===t.id&&Object.keys(w.props).forEach(l=>{const g=w.props[l]===null?void 0:w.props[l];t[l]=g})})),this.d(i.objectEvent.don(w=>{!r&&!s||w.id!==t.id||w.type!=="3DTilesetReady"||t.tilesetReady.emit(w.p)}));{const w=async(m,C)=>{if(!r&&!s)return;const E=await n.callUeFunc({f:"SetFeatureColor",p:{id:t.id,featureName:m,json:C}});if(E&&E.error!==""){console.warn(`UeES3DTileset SetFeatureColor: ${E.error}`);return}},l=async(m,C)=>{if(!r&&!s)return;const E=await n.callUeFunc({f:"SetFeatureVisable",p:{id:t.id,featureName:m,json:C}});if(E&&E.error!==""){console.warn(`UeES3DTileset SetFeatureVisable: ${E.error}`);return}},g=async()=>{if(!r&&!s)return;const m=await n.callUeFunc({f:"ResetFeatureStyle",p:{id:t.id}});if(m&&m.error!==""){console.warn(`UeES3DTileset ResetFeatureStyle: ${m.error}`);return}},h=async m=>{if(!r&&!s)return;const C=await n.callUeFunc({f:"SetFeatureStyle",p:{id:t.id,json:m}});if(C&&C.error!==""){console.warn(`UeES3DTileset SetFeatureStyle: ${C.error}`);return}};this.d(t.setFeatureColorEvent.don((m,C)=>{const E=[...this.styleColor,...C];this.styleColor=[...E],w(m,E)})),this.d(t.setFeatureVisableEvent.don((m,C)=>{const E=[...this.styleVisable,...C];this.styleVisable=[...E],l(m,E)})),this.d(t.resetFeatureStyleEvent.don(()=>{g(),this.styleColor=[],this.styleVisable=[]})),this.d(t.setFeatureStyleEvent.don(m=>{h(m)}))}{const w=async()=>{if(!r&&!s){t._featureTableResultEvent.emit(void 0);return}try{const l=await n.callUeFunc({f:"GetFeatureTable",p:{id:t.id}});l.error!==""&&console.warn(`UeES3DTileset GetFeatureTable: ${l.error}`),t._featureTableResultEvent.emit(l.re.table)}catch(l){console.warn(`UeES3DTileset GetFeatureTable: ${l}`),t._featureTableResultEvent.emit(void 0)}};this.d(t.getFeatureTableEvent.don(()=>{w()}))}{const w=async()=>{if(!r&&!s){t.getMaterialNameListEvent.emit(void 0);return}try{const l=await n.callUeFunc({f:"GetMaterialNameList",p:{id:t.id}});l.error!==""&&console.warn(`UeES3DTileset GetMaterialNameList: ${l.error}`),t.getMaterialNameListEvent.emit(l.re.materialNameList)}catch(l){console.warn(`UeES3DTileset GetMaterialNameList: ${l}`),t.getMaterialNameListEvent.emit(void 0)}};this.ad(t.getMaterialNameListEvent.don(l=>{l=="start"&&w()}))}}get styleColor(){return this._styleColor.value}set styleColor(t){this._styleColor.value=t}get styleVisable(){return this._styleVisable.value}set styleVisable(t){this._styleVisable.value=t}};p(Z,"type",Z.register("ESUeViewer",c.ES3DTileset.type,Z));let ve=Z;const zn=u=>{switch(u){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"没搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag对应的Actor是地形,无法绑定";case 4:return"没搜索到ComponentTag,无法绑定";default:return"未知错误"}},x=class x extends c.EngineObject{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}let n,r;const s=this.dv(a.react(void 0)),o=this.ad(a.reactJson(""));{const w=()=>{if(typeof e.url=="string")o.value=c.ESSceneObject.context.getStrFromEnv(e.url);else{const l=e.url;l.url=c.ESSceneObject.context.getStrFromEnv(l.url),o.value=l}};w(),this.ad(e.urlChanged.don(w))}const v=async()=>{!n&&!r||await i.callUeFunc({f:"update",p:{id:e.id,show:e.show??!0,rectangle:e.rectangle??[-180,-90,180,90],collision:e.collision??!0,allowPicking:e.allowPicking??!1,flyToParam:e.flyToParam??c.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??c.ESVisualObject.defaults.flyInParam,url:o.value??"",zIndex:e.zIndex??0,maximumLevel:e.maximumLevel??c.ESImageryLayer.defaults.maximumLevel,minimumLevel:e.minimumLevel??c.ESImageryLayer.defaults.minimumLevel,options:e.options??c.ESImageryLayer.defaults.options,targetID:e.targetID??c.ESImageryLayer.defaults.targetID,opacity:e.opacity??c.ESImageryLayer.defaults.opacity}})},d=this.dv(a.createNextAnimateFrameEvent(e.showChanged,o.changed,e.flyToParamChanged,e.flyInParamChanged,e.zIndexChanged,e.collisionChanged,e.allowPickingChanged,e.maximumLevelChanged,e.minimumLevelChanged,e.rectangleChanged,e.optionsChanged,e.targetIDChanged,e.opacityChanged));this.d(d.don(v));const y=async()=>{const{id:w}=e;if(n!==void 0){n=void 0;try{const l=await t.unBindImageryById(w);if(!l)return;if(l.error!==""){console.warn(`UeESImageryLayer UnImageryByID: ${l.error}`);return}}catch(l){console.warn(`UeESImageryLayer UnImageryByID promise: ${l}`);return}}if(r!==void 0){r=void 0;try{const l=await i.callUeFunc({f:"destroy",p:{id:w,test:"UeESImageryLayer"}});if(!l)return;if(l.error!==""){console.warn(`UeESImageryLayer Destroy: ${l.error}`);return}}catch(l){console.warn(`UeESImageryLayer Destroy promise: ${l}`);return}}};this.d(()=>{y()});{const w=this.dv(a.createProcessingFromAsyncFunc(async g=>{if(s.value===void 0){await g.promise(y());return}if(s.value.type==="ActorTag"){const{actorTag:h,componentTag:m}=s.value;if(n!==h&&await g.promise(y()),n!==void 0||h===void 0)return;try{n=h;const C=await g.promise(t.bindImageryByTag(e.id,h,m));if(!C)return;if(C.error!==""){console.warn(`ESImageryLayer BindImageryByTag: ${C.error}`);return}if(C.re.type!==0)if(C.re.type===1)console.warn(`ESImageryLayer BindImageryByTag: ${zn(C.re.type)}`);else{console.warn(`ESImageryLayer BindImageryByTag: ${zn(C.re.type)}`);return}}catch(C){console.warn(`ESImageryLayer BindImageryByTag promise: ${C}`);return}}else if(s.value.type==="CreatedUrl"){const{url:h}=s.value;if(h!==r&&await g.promise(y()),r!==void 0||h===void 0)return;try{r=h;const m=await g.promise(i.callUeFunc({f:"create",p:{type:"ESImageryLayer",id:e.id}}));if(!m)return;if(m.error!==""){console.warn(`ESImageryLayer create: ${m.error}`);return}}catch{console.warn("ESImageryLayer create: create promise error");return}}await g.promise(v())})),l=async()=>{w.restart()};l(),this.d(s.changed.don(l))}{const w=this.dv(a.createNextAnimateFrameEvent(e.actorTagChanged,o.changed,e.componentTagChanged)),l=()=>{e.actorTag&&e.componentTag?s.value={type:"ActorTag",actorTag:e.actorTag,componentTag:e.componentTag}:o.value?s.value={type:"CreatedUrl",url:o.value}:s.value=void 0};l(),this.d(w.don(l))}this.d(e.flyToEvent.don(async(w,l)=>{if(!n&&!r)return;const g=await B(i,e.id,w);let h="over";g===void 0?h="error":g.endType===0?h="over":g.endType===1&&(h="cancelled"),e.flyOverEvent.emit(l,h,t)})),this.d(e.flyInEvent.don(async(w,l)=>{var m,C;if(!n&&!r)return;const g=await Q(i,e.id,(m=e.flyInParam)==null?void 0:m.position,(C=e.flyInParam)==null?void 0:C.rotation,w??1);let h="over";g===void 0?h="error":g.endType===0?h="over":g.endType===1&&(h="cancelled"),e.flyOverEvent.emit(l,h,t)})),this.d(e.calcFlyToParamEvent.don(()=>{!n&&!r||K(i,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const w=await t.getCurrentCameraInfo();if(!w)return;const{position:l,rotation:g}=w;e.flyInParam={position:l,rotation:g,flyDuration:1}})),this.d(t.propChanged.don(w=>{!n&&!r||w.objId===e.id&&Object.keys(w.props).forEach(l=>{const g=w.props[l]===null?void 0:w.props[l];e[l]=g})}))}};p(x,"type",x.register("ESUeViewer",c.ESImageryLayer.type,x));let Fe=x;const N=class N extends k{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(N,"type",N.register("ESUeViewer",c.ESTerrainLayer.type,N)),p(N,"forceUeUpdateProps",[...k.forceUeUpdateProps,"url"]),p(N,"propValFuncs",{...k.propValFuncs,url:e=>typeof e=="string"?c.ESSceneObject.context.getStrFromEnv(e):(e.url=c.ESSceneObject.context.getStrFromEnv(e.url),e),czmMaxzoom:null,czmMinzoom:null});let Se=N;const b=class b extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(b,"type",b.register("ESUeViewer",c.ESAlarm.type,b));let Ie=b;const O=class O extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(O,"type",O.register("ESUeViewer",c.ESApertureEffect.type,O));let Te=O;const j=class j extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(j,"type",j.register("ESUeViewer",c.ESGeoPolygon.type,j));let P=j;const tt=class tt extends P{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=()=>{let s=c.ESAreaMeasurement.defaults.fillStyle;try{s={...e.fillStyle??c.ESAreaMeasurement.defaults.fillStyle}}catch(o){console.error("ESAreaMeasurement fillStyle 属性类型错误!",o),s={...c.ESAreaMeasurement.defaults.fillStyle}}s.materialParams=JSON.stringify(s.materialParams),i.callUeFunc({f:"update",p:{id:e.id,stroked:e.stroked??c.ESAreaMeasurement.defaults.stroked,fillStyle:s,filled:e.filled??c.ESAreaMeasurement.defaults.filled}}),console.log(s)},r=this.dv(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.strokedChanged,e.filledChanged));this.d(r.don(n)),this.d(e.createdEvent.don(n))}};p(tt,"type",tt.register("ESUeViewer",c.ESAreaMeasurement.type,tt));let Re=tt;const et=class et extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(et,"type",et.register("ESUeViewer",c.ESBlastParticleSystem.type,et));let De=et;const it=class it extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};p(it,"type",it.register("ESUeViewer",c.ESBoxClipping.type,it));let Le=it;const nt=class nt extends S{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.dispose(e.flyInEvent.don((n,r,s="default")=>{const{id:o,duration:v,position:d,rotation:y}=e;Q(i,o,d,y,v??n,s)})),this.dispose(e.resetWithCurrentCameraEvent.don(()=>{me(i,e.id)})),this.dispose(e.captureEvent.don((n,r)=>{t.capture(n,r).then(o=>{o&&(e.thumbnail=o)})}))}};p(nt,"type",nt.register("ESUeViewer",c.ESCameraView.type,nt));let ke=nt;const rt=class rt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(rt,"type",rt.register("ESUeViewer",c.ESCameraVisibleRange.type,rt));let Pe=rt;const st=class st extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(st,"type",st.register("ESUeViewer",c.ESCar.type,st));let Ue=st;const ot=class ot extends D{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=()=>{let s=c.ESClassification.defaults.fillStyle;try{s={...e.fillStyle??c.ESClassification.defaults.fillStyle}}catch(o){console.error("ESClassification fillStyle 属性类型错误!",o),s={...c.ESClassification.defaults.fillStyle}}s.materialParams=JSON.stringify(s.materialParams),i.callUeFunc({f:"update",p:{id:e.id,filled:e.filled??c.ESClassification.defaults.filled,fillStyle:s}})},r=this.dv(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.d(r.don(n)),this.d(e.createdEvent.don(n))}};p(ot,"type",ot.register("ESUeViewer",c.ESClassification.type,ot));let Me=ot;const at=class at extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};p(at,"type",at.register("ESUeViewer",c.ESClippingPlane.type,at));let Ae=at;const lt=class lt extends S{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=this.ad(a.reactJson(""));{const o=()=>{if(typeof e.url=="string")n.value=c.ESSceneObject.context.getStrFromEnv(e.url??c.ESDataMesh.defaults.url);else{const v=e.url;v.url=c.ESSceneObject.context.getStrFromEnv(v.url??c.ESDataMesh.defaults.url),n.value=v}};o(),this.ad(e.urlChanged.don(o))}const r=()=>{const o=e.colorStops??c.ESDataMesh.defaults.colorStops;i.callUeFunc({f:"update",p:{id:e.id,url:n.value??c.ESDataMesh.defaults.url,currentTime:e.currentTime??c.ESDataMesh.defaults.currentTime,minPropValue:e.minPropValue??c.ESDataMesh.defaults.minPropValue,maxPropValue:e.maxPropValue??c.ESDataMesh.defaults.maxPropValue,colorStops:JSON.stringify(o)}})},s=this.dv(a.createNextAnimateFrameEvent(n.changed,e.currentTimeChanged,e.minPropValueChanged,e.maxPropValueChanged,e.colorStopsChanged));this.d(s.don(r)),this.d(e.createdEvent.don(r))}};p(lt,"type",lt.register("ESUeViewer",c.ESDataMesh.type,lt));let We=lt;const dt=class dt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(dt,"type",dt.register("ESUeViewer",c.ESDatasmithRuntimeModel.type,dt));let $e=dt;const ct=class ct extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(ct,"type",ct.register("ESUeViewer",c.ESDirectionMeasurement.type,ct));let _e=ct;const ut=class ut extends D{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=()=>{let s;try{s={...e.strokeStyle??c.ESDistanceMeasurement.defaults.strokeStyle}}catch(o){console.error("ESDistanceMeasurement strokeStyle 属性类型错误!",o),s={...c.ESDistanceMeasurement.defaults.strokeStyle}}i.callUeFunc({f:"update",p:{id:e.id,strokeStyle:s}})},r=this.dv(a.createNextAnimateFrameEvent(e.strokeStyleChanged));this.d(r.don(n)),this.d(e.createdEvent.don(n))}};p(ut,"type",ut.register("ESUeViewer",c.ESDistanceMeasurement.type,ut));let Ne=ut;const ht=class ht extends he{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(ht,"type",ht.register("ESUeViewer",c.ESLocalPolygon.type,ht));let ge=ht;const vt=class vt extends ge{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(vt,"type",vt.register("ESUeViewer",c.ESDynamicWater.type,vt));let ze=vt;const gt=class gt extends k{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(t.widgetEvent.don(n=>{if(n.objId!==e.id)return;const{type:r,properties:s}=n;e.widgetEvent.emit({type:r,properties:s})}))}};p(gt,"type",gt.register("ESUeViewer",c.ESEntityCluster.type,gt));let He=gt;const ft=class ft extends P{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(ft,"type",ft.register("ESUeViewer",c.ESExcavate.type,ft));let Ge=ft;const pt=class pt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(pt,"type",pt.register("ESUeViewer",c.ESFireParticleSystem.type,pt));let Je=pt;const wt=class wt extends k{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=this.ad(a.reactJson(""));{const o=()=>{if(typeof e.url=="string")n.value=c.ESSceneObject.context.getStrFromEnv(e.url);else{const v=e.url;v.url=c.ESSceneObject.context.getStrFromEnv(v.url),n.value=v}};o(),this.ad(e.urlChanged.don(o))}const r=()=>{i.callUeFunc({f:"update",p:{id:e.id,url:n.value??c.ESForestTileset.defaults.url,treeTypes:e.treeTypes??c.ESForestTileset.defaults.treeTypes,xiaoBanWidget:e.xiaoBanWidget??c.ESForestTileset.defaults.xiaoBanWidgetDefault,youShiSZ:e.youShiSZ??c.ESForestTileset.defaults.youShiSZ,diLei:e.diLei??c.ESForestTileset.defaults.diLei,senLinLB:e.senLinLB??c.ESForestTileset.defaults.senLinLB,labelMaterial:e.labelMaterial??c.ESForestTileset.defaults.labelMaterial,heightOffset:e.heightOffset??c.ESForestTileset.defaults.heightOffset}})},s=this.dv(a.createNextAnimateFrameEvent(n.changed,e.treeTypesChanged,e.xiaoBanWidgetChanged,e.youShiSZChanged,e.diLeiChanged,e.senLinLBChanged,e.labelMaterialChanged,e.heightOffsetChanged));this.d(s.don(r)),this.d(e.createdEvent.don(r))}};p(wt,"type",wt.register("ESUeViewer",c.ESForestTileset.type,wt));let Be=wt;const yt=class yt extends c.EngineObject{constructor(t,i){super(t,i);p(this,"_imageLabel",this.dv(new c.ESImageLabel(`${this.sceneObject.id}_ESImageLabel`)));p(this,"_hasClassDivAndPos",{});const n=i.viewer;if(!n){console.warn("viewer is undefined!");return}t.mainClass=this._imageLabel;const r=this._imageLabel;i.add(r),this.d(()=>i.delete(r));{const s=()=>{if(!n)return;if(!t.instanceClass)throw new Error("!sceneObject.instanceClass");const d=document.createElement("div"),y=this.dv(new t.instanceClass(d,t,i))._container;if(y.style.opacity=t.opacity.toString()??c.ESGeoDiv.defaults.opacity,y.style.position="fixed",y.style.zIndex="-1",y.style.top="0px",!document.body.contains(y)){document.body.appendChild(y);let l=y?y.querySelectorAll("*[class]"):[];for(let g=0;g<l.length;g++){const h=l[g];var w=h.getBoundingClientRect();this._hasClassDivAndPos[h.className]=[h.offsetLeft,h.offsetTop,h.offsetLeft+w.width,h.offsetTop+w.height]}}Gn(y,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:y.offsetWidth,height:y.offsetHeight,scale:1}).then(l=>{document.body.contains(y)&&document.body.removeChild(y),r.url=l.toDataURL(),r.show=t.show}).catch(()=>{document.body.contains(y)&&document.body.removeChild(y)})},o=()=>{try{t.instanceClass?s():(r.url="",r.show=!1)}catch(d){console.error(d)}};o();const v=this.dv(a.createNextAnimateFrameEvent(t.instanceClassChanged,t.opacityChanged));this.d(v.don(o))}{const s=()=>{r.show=t.show};r.show=!1,this.ad(t.showChanged.don(s))}this.d(a.track([r,"anchor"],[t,"anchor"])),this.d(a.bind([r,"position"],[t,"position"])),this.d(a.bind([r,"rotation"],[t,"rotation"])),this.d(a.bind([r,"flyToParam"],[t,"flyToParam"])),this.d(a.bind([r,"flyInParam"],[t,"flyInParam"])),this.d(a.bind([r,"allowPicking"],[t,"allowPicking"])),this.d(a.bind([r,"scale"],[t,"scale"])),this.d(a.track([r,"minVisibleDistance"],[t,"minVisibleDistance"])),this.d(a.track([r,"maxVisibleDistance"],[t,"maxVisibleDistance"])),this.ad(t.automaticLandingEvent.don(()=>{r.automaticLanding()})),this.d(r.pickedEvent.don(s=>{(t.allowPicking??!1)&&t.pickedEvent.emit(s)})),this.d(i.widgetEvent.don(s=>{if(s.objId!==this._imageLabel.id)return;const{type:o,add:v}=s;if(o==="leftClick"&&v){const d=(v==null?void 0:v.classNames)??[],y=Object.keys(this._hasClassDivAndPos);for(let w=0;w<y.length;w++){const l=y[w];let g=this._hasClassDivAndPos[l];v&&v.mouseRelativePos&&v.mouseRelativePos[0]>=g[0]&&v.mouseRelativePos[0]<=g[2]&&v.mouseRelativePos[1]>=g[1]&&v.mouseRelativePos[1]<=g[3]&&d.push(l)}v.classNames=d}t.widgetEvent.emit({type:o,add:v})})),this.d(t.calcFlyToParamEvent.don(()=>{K(n,r.id)})),this.d(t.calcFlyInParamEvent.don(()=>{const s=i.getCurrentCameraInfo();if(!s)return;const{position:o,rotation:v}=s;t.flyInParam={position:o,rotation:v,flyDuration:1}})),this.d(t.smoothMoveEvent.don((s,o)=>{ce(n,r.id,s,o)})),this.d(t.smoothMoveWithRotationEvent.don((s,o,v)=>{ae(n,r.id,s,o,v)})),this.d(t.smoothMoveOnGroundEvent.don((s,o,v,d)=>{le(n,r.id,s,o,d,v)})),this.d(t.smoothMoveWithRotationOnGroundEvent.don((s,o,v,d,y)=>{de(n,r.id,s,o,v,d,y)})),this.d(t.flyToEvent.don((s,o)=>{r.flyTo(s)})),this.d(t.flyInEvent.don(s=>{r.flyIn(s)}))}};p(yt,"type",yt.register("ESUeViewer",c.ESGeoDiv.type,yt));let Ke=yt;const mt=class mt extends k{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.flyToFeatureIndexEvent.don((n,r)=>{i.callUeFunc({f:"flyToFeatureIndex",p:{id:e.id,index:n,duration:r}})})),this.d(e.flyToFeatureEvent.don((n,r,s)=>{i.callUeFunc({f:"flyToFeature",p:{id:e.id,key:n,value:r,duration:s}})}))}};p(mt,"type",mt.register("ESUeViewer",c.ESGeoJson.type,mt));let qe=mt;const Ct=class Ct extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Ct,"type",Ct.register("ESUeViewer",c.ESGeoLineString.type,Ct));let fe=Ct;const Et=class Et extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Et,"type",Et.register("ESUeViewer",c.ESGeoRectangle.type,Et));let Ve=Et;const Ft=class Ft extends P{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Ft,"type",Ft.register("ESUeViewer",c.ESGeoWater.type,Ft));let Xe=Ft;const z=class z extends S{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.setNodePositionEvent.don((n,r)=>{Qi(i,e.id,n,r)})),this.d(e.setNodeRotationEvent.don((n,r)=>{Yi(i,e.id,n,r)})),this.d(e.setNodeScaleEvent.don((n,r)=>{Zi(i,e.id,n,r)}))}};p(z,"forceUeUpdateProps",[...S.forceUeUpdateProps,"url"]),p(z,"propValFuncs",{...S.propValFuncs,url:e=>typeof e=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(e)):(e.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(e.url)),e),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),p(z,"type",z.register("ESUeViewer",c.ESGltfModel.type,z));let Qe=z;const St=class St extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(St,"type",St.register("ESUeViewer",c.ESHeightMeasurement.type,St));let Ye=St;const It=class It extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const n=async(s,o,v,d)=>{const{viewer:y}=s;if(!y){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const w=await y.callUeFunc({f:"AIMoveTo",p:{id:o,Destination:v,Time:d}});return w.error&&console.error("AIMoveTo:",w.error),w};this.d(e.aiMoveToEvent.don((s,o)=>{n(t,e.id,s,o)}));const r=async(s,o)=>{const{viewer:v}=s;if(!v){console.error("StopAIMove: ueViewer.viewer is undefined");return}const d=await v.callUeFunc({f:"StopAIMove",p:{id:o}});return d.error&&console.error("StopAIMove:",d.error),d};this.d(e.stopAIMoveEvent.don(()=>{r(t,e.id)}))}};p(It,"type",It.register("ESUeViewer",c.ESHuman.type,It));let Ze=It;const H=class H extends U{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.anchor=[.5,1]}};p(H,"type",H.register("ESUeViewer",c.ESImageLabel.type,H)),p(H,"forceUeUpdateProps",[...U.forceUeUpdateProps,"url"]),p(H,"propValFuncs",{...U.propValFuncs,url:e=>typeof e=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(e)):(e.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(e.url)),e)});let xe=H;const Tt=class Tt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Tt,"type",Tt.register("ESUeViewer",c.ESLevelRuntimeModel.type,Tt));let be=Tt;const Rt=class Rt extends he{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Rt,"type",Rt.register("ESUeViewer",c.ESLocalCircle.type,Rt));let Oe=Rt;const Dt=class Dt extends k{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Dt,"type",Dt.register("ESUeViewer",c.ESLocalPolygonZ.type,Dt));let je=Dt;const Lt=class Lt extends he{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Lt,"type",Lt.register("ESUeViewer",c.ESLocalRectangle.type,Lt));let ti=Lt;const kt=class kt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(kt,"type",kt.register("ESUeViewer",c.ESLocalSkyBox.type,kt));let ei=kt;const Pt=class Pt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Pt,"type",Pt.register("ESUeViewer",c.ESLocationMeasurement.type,Pt));let ii=Pt;const Ut=class Ut extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Ut,"type",Ut.register("ESUeViewer",c.ESPipeFence.type,Ut));let ni=Ut;const Mt=class Mt extends fe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Mt,"type",Mt.register("ESUeViewer",c.ESPipeline.type,Mt));let ri=Mt;const At=class At extends ve{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.highlightFeatureEvent.don(n=>{const r=typeof n=="number"?n.toString():n;Ki(i,e.id,r)})),this.d(e.highlightFeatureAndFlyToEvent.don((n,r,s,o)=>{const v=typeof n=="number"?n.toString():n;qi(i,e.id,v,o??1)})),this.d(e.setLayerVisibleEvent.don((n,r)=>{let s="";typeof r!="string"?s=JSON.stringify(r):s=r,Vi(i,e.id,s)})),this.d(e.setLayerColorEvent.don((n,r)=>{let s="";typeof r!="string"?s=JSON.stringify(r):s=r,Xi(i,e.id,s)}))}};p(At,"type",At.register("ESUeViewer",c.ESPipeserTileset.type,At));let si=At;const Wt=class Wt extends P{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Wt,"type",Wt.register("ESUeViewer",c.ESPit.type,Wt));let oi=Wt;const $t=class $t extends U{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.ad(e.getInitialStyleEvent.don(async()=>{try{const n=await i.callUeFunc({f:"GetInitialStyle",p:{id:e.id}});n.error!=""&&console.error("getInitialStyleEvent:",n.error),e.initialStyle.value=structuredClone(n.re)}catch(n){console.error("getInitialStyleEvent:",n),e.initialStyle.value=void 0}}))}};p($t,"type",$t.register("ESUeViewer",c.ESPoi2D.type,$t));let ai=$t;const _t=class _t extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(_t,"type",_t.register("ESUeViewer",c.ESPoi3D.type,_t));let li=_t;const G=class G extends k{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(G,"type",G.register("ESUeViewer",c.ESPoiTileset.type,G)),p(G,"forceUeUpdateProps",[...k.forceUeUpdateProps,"url"]),p(G,"propValFuncs",{...k.propValFuncs,url:e=>typeof e=="string"?c.ESSceneObject.context.getStrFromEnv(e):(e.url=c.ESSceneObject.context.getStrFromEnv(e.url),e)});let di=G;const Nt=class Nt extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Nt,"type",Nt.register("ESUeViewer",c.ESPolygonFence.type,Nt));let ci=Nt;const zt=class zt extends P{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(zt,"type",zt.register("ESUeViewer",c.ESPolygonFlattenedPlane.type,zt));let ui=zt;const Ht=class Ht extends P{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Ht,"type",Ht.register("ESUeViewer",c.ESPolygonWithHole.type,Ht));let hi=Ht;const Gt=class Gt extends ${constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(()=>{e.ids=[]}),this.d(e.highlightInner3DtilesetEvent.don(n=>{n.highlight=!0})),this.d(e.removeHighlightInner3DtilesetEvent.don(n=>{n.highlight=!1}));{const n=o=>{o=o.toLocaleLowerCase();let v=[255,255,255,1];if(o.startsWith("#")){if(o.length===4){let d=parseInt(o[1]+o[1],16),y=parseInt(o[2]+o[2],16),w=parseInt(o[3]+o[3],16);v=[d,y,w,1]}else if(o.length===7){let d=parseInt(o.substring(1,3),16),y=parseInt(o.substring(3,5),16),w=parseInt(o.substring(5,7),16);v=[d,y,w,1]}}else if(o.startsWith("rgba")){let d=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(d){let y=parseInt(d[1]),w=parseInt(d[2]),l=parseInt(d[3]),g=parseFloat(d[4]);v=[y,w,l,g]}}else if(o.startsWith("rgb")){let d=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(d){let y=parseInt(d[1]),w=parseInt(d[2]),l=parseInt(d[3]);v=[y,w,l,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[v[0]/255,v[1]/255,v[2]/255,v[3]]},r=()=>{const o=e.layerConfig;if(!o)return;const v=[];o.forEach(d=>{v.push({condition:[{field:"layer",op:"==",value:d.layer},{field:"dataset",op:"==",value:d.dataset}],color:n(d.value.color??"rgb(255,255,255)"),show:d.value.visible})}),e.setFeatureStyle(v)};r();const s=this.dv(a.createNextAnimateFrameEvent(e.layerConfigChanged));this.d(s.don(()=>{r()}))}}};p(Gt,"type",Gt.register("ESUeViewer",c.ESRtsTileset.type,Gt));let vi=Gt;const Jt=class Jt extends k{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(e.addTreesEvent.don(n=>{c.addTreesCallFunc(t,e.id,n)})),this.d(e.removeAllTreesEvent.don(()=>{c.removeAllTreesCallFunc(t,e.id)})),this.d(e.updateTreeParamsEvent.don(n=>{c.updateTreeParamsCallFunc(t,e.id,n)})),this.d(e.cutDownTreesEvent.don((n,r)=>{c.cutDownTreesCallFunc(t,e.id,n,r)})),this.d(e.growthSimulationEvent.don((n,r,s)=>{c.growthSimulationCallFunc(t,e.id,n,r,s)}))}};p(Jt,"type",Jt.register("ESUeViewer",c.ESSeparateFoliage.type,Jt));let gi=Jt;const Bt=class Bt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Bt,"type",Bt.register("ESUeViewer",c.ESSubmergingAnalysis.type,Bt));let fi=Bt;const Kt=class Kt extends P{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{i.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.stopEvent.don(()=>{i.callUeFunc({f:"Stop",p:{id:e.id}})}))}};p(Kt,"type",Kt.register("ESUeViewer",c.ESSunshineAnalysis.type,Kt));let pi=Kt;const qt=class qt extends P{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{i.callUeFunc({f:"Start",p:{id:e.id}})}))}};p(qt,"type",qt.register("ESUeViewer",c.ESSurfaceAreaMeasurement.type,qt));let wi=qt;const Vt=class Vt extends U{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Vt,"type",Vt.register("ESUeViewer",c.ESTextLabel.type,Vt));let yi=Vt;const q=class q extends U{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.callFunctionEvent.don(async(n,r)=>{const s=await Ce(i,e.id,n,r);e.__callFunctionResultEvent.emit(s)}))}};p(q,"type",q.register("ESUeViewer",c.ESUEWidget.type,q)),p(q,"propValFuncs",{...U.propValFuncs,info:e=>JSON.stringify(e??{})});let mi=q;const Hn=u=>{switch(u){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},ur=u=>{switch(u){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},Xt=class Xt extends c.EngineObject{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn(`${e.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{ye(i,e.id)});const n=async()=>{d()||await i.callUeFunc({f:"update",p:{id:e.id,name:e.name,show:e.show,rotation:e.rotation,flyToParam:e.flyToParam??c.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??c.ESVisualObject.defaults.flyInParam,highlight:e.highlight,collision:e.collision,scale:e.scale,minVisibleDistance:e.minVisibleDistance,maxVisibleDistance:e.maxVisibleDistance}})},r=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.nameChanged,e.rotationChanged,e.flyToParamChanged,e.flyInParamChanged,e.highlightChanged,e.collisionChanged,e.scaleChanged,e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(r.don(n)),this.d(e.flushEvent.don(()=>r.flush()));let s,o;const v=async()=>{d()||(await i.callUeFunc({f:"update",p:{id:e.id,position:e.position}}),(t.debug??!1)&&console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`))},d=()=>!s&&!o?(console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,y=async()=>{const{id:l}=e,g=await t.unBindActorByID(l);g&&g.error!==""&&console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${g.error}`),s=void 0;const h=await i.callUeFunc({f:"destroy",p:{id:l}});if(h&&h.error!==""){console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${h.error}`);return}o=void 0},w=this.dv(a.react({type:"ActorClass",actorClass:"default"}));{const l=this.dv(a.createNextAnimateFrameEvent(e.actorClassChanged,e.actorTagChanged)),g=async()=>{e.actorTag!==""?w.value={type:"ActorTag",actorTag:e.actorTag}:w.value={type:"ActorClass",actorClass:e.actorClass===""?"default":e.actorClass}};g(),this.d(l.don(g)),this.d(e.flushEvent.don(()=>l.flush()))}{const l=this.dv(a.createProcessingFromAsyncFunc(async h=>{if(await h.promise(y()),w.value.type==="ActorTag"){const{actorTag:m}=w.value;await h.promise(y());try{e.lastActorStatus="null";const C=await h.promise(t.bindActorByTag(e.id,m));if(!C)return;if(C.error!==""){console.warn(`${e.id} UeESUnrealActor BindActorByTag:${m},${C.error}`);return}if(C.re.type===0)e.lastActorStatus="bound",s=m;else if(C.re.type===1)e.lastActorStatus="bound",s=m,console.warn(`${e.id} UeESUnrealActor BindActorByTag:${m},${Hn(C.re.type)}`);else{s=void 0,console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${m}, ${Hn(C.re.type)}`);return}}catch(C){console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${m}, ${C}`);return}}else if(w.value.type==="ActorClass"){const{actorClass:m}=w.value;try{const C=await h.promise(t.createActorByClass(e.id,m));if(!C)return;if(C.error!==""){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${m}, ${C.error}`);return}if(C.re.type===0)e.lastActorStatus="created",o=m;else{console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${m},${ur(C.re.type)}`);return}}catch(C){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${m}, ${JSON.stringify(C)}`);return}}await h.promise(n()),await h.promise(v())})),g=async()=>{l.restart()};g(),this.d(w.changed.don(g))}this.d(e.positionChanged.don(v)),this.d(e.callFunctionEvent.don(async(l,g)=>{if(d()){e.__callFunctionResultEvent.emit(void 0);return}const h=await Ce(i,e.id,l,g);e.__callFunctionResultEvent.emit(h)})),this.d(e.smoothMoveEvent.don((l,g)=>{d()||ce(i,e.id,l,g)})),this.d(e.smoothMoveWithRotationEvent.don((l,g,h)=>{d()||ae(i,e.id,l,g,h)})),this.d(e.smoothMoveOnGroundEvent.don((l,g,h,m)=>{d()||le(i,e.id,l,g,m,h)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((l,g,h,m,C)=>{d()||de(i,e.id,l,g,h,m,C)})),this.d(e.automaticLandingEvent.don(l=>{if(d())return;const g=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(h=>{h!==null&&(e.position=[...g,h],e.collision=l)})})),this.d(e.flyToEvent.don(async(l,g)=>{if(d())return;const h=await B(i,e.id,l);let m="over";h===void 0?m="error":h.endType===0?m="over":h.endType===1&&(m="cancelled"),e.flyOverEvent.emit(g,m,t)})),this.d(e.calcFlyToParamEvent.don(()=>{d()||K(i,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const l=await t.getCurrentCameraInfo();if(!l)return;const{position:g,rotation:h}=l;e.flyInParam={position:g,rotation:h,flyDuration:1}})),this.d(t.propChanged.don(l=>{d()||l.objId===e.id&&Object.keys(l.props).forEach(g=>{const h=l.props[g]===null?void 0:l.props[g];e[g]=h})}))}};p(Xt,"type",Xt.register("ESUeViewer",c.ESUnrealActor.type,Xt));let Ci=Xt;const Qt=class Qt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Qt,"type",Qt.register("ESUeViewer",c.ESVideoFusion.type,Qt));let Ei=Qt;const Yt=class Yt extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(Yt,"type",Yt.register("ESUeViewer",c.ESViewShed.type,Yt));let Fi=Yt;const Zt=class Zt extends D{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};p(Zt,"type",Zt.register("ESUeViewer",c.ESVisibilityAnalysis.type,Zt));let Si=Zt;const xt=class xt extends P{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{i.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{i.callUeFunc({f:"Clear",p:{id:e.id}})}))}};p(xt,"type",xt.register("ESUeViewer",c.ESVolumeMeasurement.type,xt));let Ii=xt;const V=class V extends U{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(V,"type",V.register("ESUeViewer",c.ESWidget.type,V)),p(V,"propValFuncs",{...U.propValFuncs,info:e=>JSON.stringify(e??{})});let Ti=V;const bt=class bt extends c.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.poi.actorTag=e.human.id,e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8],this.d(e.poiOffsetHeightChanged.don(()=>{e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8]})),this.d(()=>{e.poi.actorTag=""})}};p(bt,"type",bt.register("ESUeViewer",c.ESHumanPoi.type,bt));let Ri=bt;c.ESSceneObject.context.getStrFromEnv(c.ESNavigator.defaults.imgUrl);const Ot=class Ot extends c.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);t.add(n),this.dispose(()=>t.delete(n)),this.dispose(a.track([n,"show"],[e,"show"])),n.instanceClass=class extends a.Destroyable{constructor(s,o,v){super(),this._subContainer=s;const d=document.createElement("div");this._subContainer.appendChild(d),this.dispose(()=>this._subContainer.removeChild(d));{const l=async()=>{const g=await t.getCurrentCameraInfo(),h=g==null?void 0:g.position,C=[...g==null?void 0:g.rotation];C[0]=360,t.flyIn(h,C)};d.addEventListener("click",l),d.style.cursor="pointer",this.dispose(()=>d.removeEventListener("click",l))}{const l=()=>{d.style.width=`${e.cssSize?e.cssSize:c.ESNavigator.defaults.cssSize}px`,d.style.height=`${e.cssSize?e.cssSize:c.ESNavigator.defaults.cssSize}px`};l(),e.dispose(e.cssSizeChanged.disposableOn(l))}d.style.position="fixed";{const l=()=>{d.style.top=`${e.cssPosition?e.cssPosition[0]:c.ESNavigator.defaults.cssPosition[0]}px`,d.style.right=`${e.cssPosition?e.cssPosition[1]:c.ESNavigator.defaults.cssPosition[1]}px`};l(),e.dispose(e.cssPositionChanged.disposableOn(l))}d.style.transition=" right 0.4s linear",d.style.cursor="pointer";const y=document.createElement("div");d.appendChild(y),this.dispose(()=>d.removeChild(y)),y.style.width="100%",y.style.height="100%",y.style.position="relative";const w=document.createElement("img");y.appendChild(w),this.dispose(()=>y.removeChild(w)),w.style.width="100%",w.style.height="100%",w.style.border="none";{const l=()=>w.src=e.imgUrl;l(),e.dispose(e.imgUrlChanged.disposableOn(l))}{const l=()=>{const C=-t.getCurrentCameraInfo().rotation[0];w.style.transform=`rotate(${C}deg)`};let g;const h=async()=>{l(),e.show?(d.style.display="block",g=setInterval(()=>{l()},1e3)):(d.style.display="none",clearInterval(g))};this.dispose(e.showChanged.disposableOn(h)),h(),this.dispose(()=>clearInterval(g))}w.style.transformOrigin="50% 50%"}}}};p(Ot,"type",Ot.register("ESUeViewer",c.ESNavigator.type,Ot));let Di=Ot;const J=class J extends D{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}{const n=()=>{let r=e.materialMode==="blue"?"multipleArrows":e.materialMode==="purple"?"singleArrow":e.materialMode;i.callUeFunc({f:"update",p:{id:e.id,materialMode:r}})};this.dispose(e.materialModeChanged.disposableOn(n)),this.dispose(e.createdEvent.disposableOn(n))}}};p(J,"type",J.register("ESUeViewer",c.ESPath.type,J)),p(J,"forceUeUpdateProps",[...D.forceUeUpdateProps]),p(J,"propValFuncs",{...D.propValFuncs,materialMode:null});let Li=J;async function hr(u){navigator.clipboard.writeText(u).then(function(){console.log("复制成功")},function(e){console.log("复制失败")})}const jt=class jt extends c.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);t.add(n),this.dispose(()=>t.delete(n)),n.instanceClass=class extends a.Destroyable{constructor(s,o,v){if(super(),this._subContainer=s,!v||!(v instanceof A))return;const d=document.createElement("div");this._subContainer.appendChild(d),this.dispose(()=>this._subContainer.removeChild(d)),d.style.width="100%",d.style.position="absolute",d.style.height=`${c.ESViewerStatusBar.defaults.height}px`,d.style.left="0",d.style.bottom="0",d.style.color="#fff",d.style.padding="0 20px 0 0",d.style.boxSizing="border-box",d.style.lineHeight=`${c.ESViewerStatusBar.defaults.height}px`,d.style.zIndex="100",d.style.alignContent="center",d.style.justifyContent="space-between";const y=document.createElement("span");d.appendChild(y),this.dispose(()=>d.removeChild(y));const w=document.createElement("span");y.appendChild(w),this.dispose(()=>y.removeChild(w));const l=document.createElement("span");y.appendChild(l),l.addEventListener("dblclick",function(){let h=l.innerHTML;h.startsWith("鼠标位置")&&(h=h.slice(5)),hr(h)}),l.style.cursor="pointer",this.dispose(()=>y.removeChild(l));const g=document.createElement("span");d.appendChild(g),this.dispose(()=>d.removeChild(g));{const h=()=>{d.style.height=(e.height??c.ESViewerStatusBar.defaults.height)+"px",d.style.lineHeight=(e.height??c.ESViewerStatusBar.defaults.height)+"px"};this.dispose(e.heightChanged.disposableOn(h)),h()}{const h=()=>{d.style.fontSize=(e.fontSize??c.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(e.fontSizeChanged.disposableOn(h)),h()}{const h=()=>{e.bgColor?d.style.background=`rgba(${e.bgColor[0]*255},${e.bgColor[1]*255},${e.bgColor[2]*255},${e.bgColor[3]})`:d.style.background=`rgba(${c.ESViewerStatusBar.defaults.bgColor[0]},${c.ESViewerStatusBar.defaults.bgColor[1]},${c.ESViewerStatusBar.defaults.bgColor[2]},${c.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(e.bgColorChanged.disposableOn(h)),h()}v.getVersion().then(h=>{h&&(g.innerText=`Ue 版本 : ${h[0]} `)}).catch(h=>{console.log(h)});{const h=()=>{let E="",I="";E+=`帧率:${v.getFPS().toFixed(0)}FPS`,w.innerText=E;const F=t.getCurrentCameraInfo();E+=` 经度: ${F.position[0].toFixed(5)}° 纬度: ${F.position[1].toFixed(5)}° 高度: ${F.position[2].toFixed(2)}米 偏航角: ${F.rotation[0].toFixed(2)}° 俯仰角: ${F.rotation[1].toFixed(2)}° 翻滚角:${F.rotation[2].toFixed(2)}° `,w.innerText=E,t.pick().then(R=>{if(R){const{pickResult:T}=R;if(T&&T.position){const{position:W}=T;I+=`鼠标位置:${W[0].toFixed(5)}° ${W[1].toFixed(5)}° ${W[2].toFixed(2)}m`}else I+="暂时无法获取鼠标位置...";l.innerText=I}}).catch(R=>{console.log(R)})};let m;const C=async()=>{h(),e.show?(d.style.display="flex",m=setInterval(()=>{h()},1e3)):(d.style.display="none",clearInterval(m))};this.dispose(e.showChanged.disposableOn(C)),C(),this.dispose(()=>clearInterval(m))}}}}};p(jt,"type",jt.register("ESUeViewer",c.ESViewerStatusBar.type,jt));let ki=jt;const te=class te extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(te,"type",te.register("ESUeViewer",c.ESGaussianSplatting.type,te));let Pi=te;const ee=class ee extends ${constructor(t,i){super(t,i);p(this,"_es3DTileset",this.dv(new c.ES3DTileset(`${this.sceneObject.id}_ES3DTileset`)));if(!i.viewer){console.warn("viewer is undefined!");return}t.mainClass=this._es3DTileset;{const r=this._es3DTileset;i.add(r),this.dispose(()=>i.delete(r)),this.d(a.track([r,"allowPicking"],[t,"allowPicking"])),this.d(a.track([r,"collision"],[t,"collision"])),this.d(a.bind([r,"flyToParam"],[t,"flyToParam"])),this.d(a.bind([r,"flyToParam"],[t,"flyToParam"])),this.d(a.track([r,"url"],[t,"url"])),this.d(a.track([r,"actorTag"],[t,"actorTag"])),this.d(a.track([r,"materialMode"],[t,"materialMode"])),this.d(a.track([r,"highlight"],[t,"highlight"])),this.d(a.track([r,"maximumScreenSpaceError"],[t,"maximumScreenSpaceError"])),this.d(a.track([r,"highlightID"],[t,"highlightID"])),this.d(a.track([r,"highlightColor"],[t,"highlightColor"])),this.d(a.bind([r,"offset"],[t,"offset"])),this.d(a.bind([r,"rotation"],[t,"rotation"])),this.d(a.track([r,"czmImageBasedLightingFactor"],[t,"czmImageBasedLightingFactor"])),this.d(a.track([r,"czmLuminanceAtZenith"],[t,"czmLuminanceAtZenith"])),this.d(a.track([r,"czmMaximumMemoryUsage"],[t,"czmMaximumMemoryUsage"])),this.d(a.track([r,"czmClassificationType"],[t,"czmClassificationType"])),this.d(a.track([r,"czmStyleJson"],[t,"czmStyleJson"])),this.d(a.track([r,"czmBackFaceCulling"],[t,"czmBackFaceCulling"])),this.d(a.track([r,"czmDebugShowBoundingVolume"],[t,"czmDebugShowBoundingVolume"])),this.d(a.track([r,"czmDebugShowContentBoundingVolume"],[t,"czmDebugShowContentBoundingVolume"])),this.d(a.track([r,"colorBlendMode"],[t,"colorBlendMode"])),this.d(a.track([r,"cacheBytes"],[t,"cacheBytes"])),this.d(a.track([r,"clippingPlaneEnabled"],[t,"clippingPlaneEnabled"])),this.d(a.track([r,"unionClippingRegions"],[t,"unionClippingRegions"])),this.d(a.track([r,"clippingPlaneEdgeColor"],[t,"clippingPlaneEdgeColor"])),this.d(a.track([r,"clippingPlaneEdgeWidth"],[t,"clippingPlaneEdgeWidth"])),this.d(a.track([r,"materialParams"],[t,"materialParams"])),this.d(a.bind([r,"supportEdit"],[t,"supportEdit"])),this.d(a.bind([r,"clippingPlanesId"],[t,"clippingPlanesId"])),this.d(a.bind([r,"clippingPlaneIds"],[t,"clippingPlaneIds"])),this.d(a.bind([r,"flattenedPlaneId"],[t,"flattenedPlaneId"])),this.d(a.bind([r,"flattenedPlaneEnabled"],[t,"flattenedPlaneEnabled"])),this.d(a.bind([r,"clippingPlaneId"],[t,"clippingPlaneId"])),this.d(a.bind([r,"excavateId"],[t,"excavateId"]))}{const r=this._es3DTileset;this.d(t.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(t.highlightFeatureEvent.don((...s)=>{r.highlightFeature(...s)})),this.d(t.highlightFeatureAndFlyToEvent.don((...s)=>{r.highlightFeatureAndFlyTo(...s)})),this.d(t.setFeatureColorEvent.don((...s)=>{r.setFeatureColor(...s)})),this.d(t.setFeatureVisableEvent.don((...s)=>{r.setFeatureVisable(...s)})),this.d(t.resetFeatureStyleEvent.don((...s)=>{r.resetFeatureStyle(...s)})),this.d(t.flyInEvent.don((...s)=>{r.flyIn(s[0])})),this.d(t.flyToEvent.don((...s)=>{r.flyTo(s[0])})),this.d(t.calcFlyToParamEvent.don((...s)=>{r.calcFlyToParam(...s)})),this.d(t.calcFlyInParamEvent.don((...s)=>{r.calcFlyInParam(...s)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(s=>{t.tilesetReady.emit(s)})),this.d(r.pickedEvent.don(s=>{s.assign({sceneObject:t}),t.pickedEvent.emit(s)}))}{const r=()=>{this.es3DTileset.show=t.show};r(),this.d(t.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}};p(ee,"type",ee.register("ESUeViewer",c.ESRtsFeatureEditing.type,ee));let Ui=ee;const ie=class ie extends ${constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(ie,"type",ie.register("ESUeViewer",c.ESMsTileset.type,ie));let Mi=ie;const ne=class ne extends P{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}const n=()=>{i.callUeFunc({f:"update",p:{id:e.id,height:e.height??c.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:e.extrudedHeight??c.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:e.perPositionHeight??c.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},r=this.disposeVar(a.createNextAnimateFrameEvent(e.heightChanged,e.extrudedHeightChanged,e.perPositionHeightChanged));this.dispose(r.disposableOn(n)),this.dispose(e.createdEvent.disposableOn(n))}};p(ne,"type",ne.register("ESUeViewer",c.ESGeoExtrudedPolygon.type,ne));let Ai=ne;const re=class re extends S{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};p(re,"type",re.register("ESUeViewer",c.ESStaticMesh.type,re));let Wi=re;const se=class se extends D{constructor(e,t){super(e,t);const i=t.viewer;if(!i){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{i.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{i.callUeFunc({f:"Clear",p:{id:e.id}})}))}};p(se,"type",se.register("ESUeViewer",c.ESSkylineAnalysis.type,se));let $i=se;f.ESUeViewer=A,f.HighlightFeatureAndFlyToCallFunc=qi,f.HighlightFeatureCallFunc=Ki,f.SetLayerColorCallFunc=Xi,f.SetLayerVisibleCallFunc=Vi,f.UeCloudViewerBase=Y,f.UeES3DTileset=ve,f.UeESAlarm=Ie,f.UeESApertureEffect=Te,f.UeESAreaMeasurement=Re,f.UeESBlastParticleSystem=De,f.UeESBoxClipping=Le,f.UeESCameraView=ke,f.UeESCameraVisibleRange=Pe,f.UeESCar=Ue,f.UeESClassification=Me,f.UeESClippingPlane=Ae,f.UeESDataMesh=We,f.UeESDatasmithRuntimeModel=$e,f.UeESDirectionMeasurement=_e,f.UeESDistanceMeasurement=Ne,f.UeESDynamicWater=ze,f.UeESEntityCluster=He,f.UeESExcavate=Ge,f.UeESFireParticleSystem=Je,f.UeESForestTileset=Be,f.UeESGaussianSplatting=Pi,f.UeESGeoDiv=Ke,f.UeESGeoExtrudedPolygon=Ai,f.UeESGeoJson=qe,f.UeESGeoLineString=fe,f.UeESGeoPolygon=P,f.UeESGeoRectangle=Ve,f.UeESGeoVector=D,f.UeESGeoWater=Xe,f.UeESGltfModel=Qe,f.UeESHeightMeasurement=Ye,f.UeESHuman=Ze,f.UeESHumanPoi=Ri,f.UeESImageLabel=xe,f.UeESImageryLayer=Fe,f.UeESLabel=U,f.UeESLevelRuntimeModel=be,f.UeESLocalCircle=Oe,f.UeESLocalPolygon=ge,f.UeESLocalPolygonZ=je,f.UeESLocalRectangle=ti,f.UeESLocalSkyBox=ei,f.UeESLocalVector=Ee,f.UeESLocalVector2D=he,f.UeESLocationMeasurement=ii,f.UeESMsTileset=Mi,f.UeESNavigator=Di,f.UeESObjectWithLocation=S,f.UeESPath=Li,f.UeESPipeFence=ni,f.UeESPipeline=ri,f.UeESPipeserTileset=si,f.UeESPit=oi,f.UeESPoi2D=ai,f.UeESPoi3D=li,f.UeESPoiTileset=di,f.UeESPolygonFence=ci,f.UeESPolygonFlattenedPlane=ui,f.UeESPolygonWithHole=hi,f.UeESRtsFeatureEditing=Ui,f.UeESRtsTileset=vi,f.UeESSceneObject=$,f.UeESSeparateFoliage=gi,f.UeESSkylineAnalysis=$i,f.UeESStaticMesh=Wi,f.UeESSubmergingAnalysis=fi,f.UeESSunshineAnalysis=pi,f.UeESSurfaceAreaMeasurement=wi,f.UeESTerrainLayer=Se,f.UeESTextLabel=yi,f.UeESUEWidget=mi,f.UeESUnrealActor=Ci,f.UeESVideoFusion=Ei,f.UeESViewShed=Fi,f.UeESViewerStatusBar=ki,f.UeESVisibilityAnalysis=Si,f.UeESVisualObject=k,f.UeESVolumeMeasurement=Ii,f.UeESWidget=Ti,f.bind3DTilesetByTagCallFunc=Cn,f.bindActorByTagCallFunc=fn,f.bindImageryByTagCallFunc=Sn,f.calcFlyToParamCallFunc=K,f.callFunctionCallFunc=Ce,f.captureCallFunc=nn,f.changeNavigationModeCallFunc=M,f.createActorByClassCallFunc=mn,f.destroyCallFunc=ye,f.flyInCallFunc=Q,f.flyInDefaultCameraCallFunc=zi,f.flyToCallFunc=B,f.generateMemReportCallFunc=Bi,f.getAllSocketNamesByActorTagCallFunc=an,f.getBoundSphereCallFunc=dn,f.getBoundSphereWithChildrenCallFunc=cn,f.getCameraRelativeHeightCallFunc=Dn,f.getFillMaterialParamInfoCallFunc=hn,f.getGlobalPropertyCallFunc=vn,f.getHeightByLonLatCallFunc=tn,f.getHeightByLonLatsCallFunc=en,f.getIdByComponentNameAndHitItemCallFunc=Rn,f.getLonLatAltToScreenPositionCallFunc=sn,f.getObjectByInfoCallFunc=gn,f.getStatusCallFunc=Un,f.getStrokeMaterialParamInfoCallFunc=un,f.getTilesetMaterialIDListCallFunc=$n,f.getVersionCallFunc=ln,f.highlightActorByTagCallFunc=kn,f.mountPakFiles=Ji,f.moveObjectsCallFunc=Wn,f.partialCaptureCallFunc=rn,f.pickCallFunc=Oi,f.pickPositionCallFunc=ji,f.quitCallFunc=bi,f.refreshTilesetCallFunc=Ni,f.resetWithCurrentCameraCallFunc=me,f.restoreOriginalSceneCallFunc=pn,f.saveStringToFileCallFunc=Ln,f.sendCustomMessageCallFunc=Pn,f.setGlobalPropertyCallFunc=xi,f.setNodePositionCallFunc=Qi,f.setNodeRotationCallFunc=Yi,f.setNodeScaleCallFunc=Zi,f.smoothMoveCallFunc=ce,f.smoothMoveOnGroundCallFunc=le,f.smoothMoveWithRotationCallFunc=ae,f.smoothMoveWithRotationOnGroundCallFunc=de,f.startEditingCallFunc=Mn,f.startVoiceCallFunc=Hi,f.stopEditingCallFunc=An,f.stopVoiceCallFunc=Gi,f.uePositionToLonLatAltCallFunc=on,f.unBind3DTilesetByIdCallFunc=Fn,f.unBind3DTilesetByTagCallFunc=En,f.unBindActorByIDCallFunc=wn,f.unBindActorByTagCallFunc=yn,f.unBindImageryByIdCallFunc=Tn,f.unBindImageryByTagCallFunc=In,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});