@arcgis/core 5.1.0-next.36 → 5.1.0-next.38

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 (293) hide show
  1. package/applications/Components/analysisUtils.js +1 -1
  2. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  3. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{e09722903e63f6cc2540.js → 03894992558d063d0d5e.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{4490f8eeeb2ee04daa9d.js → 0dd12d6af0cf7707109c.js} +2 -2
  7. package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +1 -0
  8. package/assets/esri/core/workers/chunks/{6f1c590abd0e3adeb8fc.js → 1bf3e787eafec318bd2b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +1 -0
  10. package/assets/esri/core/workers/chunks/{64e1273e4e79c73ed579.js → 2ddfd406b9044390e9f7.js} +1 -1
  11. package/assets/esri/core/workers/chunks/2fa86dacc8a12a6a6c43.js +1 -0
  12. package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +1 -0
  13. package/assets/esri/core/workers/chunks/3be111488365768fd917.js +1 -0
  14. package/assets/esri/core/workers/chunks/448620052233e51b496c.js +1 -0
  15. package/assets/esri/core/workers/chunks/{6ca2064ea96bdb594f52.js → 4b0d6309abf273f1f79f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{973e3743cb7fdaa27f80.js → 4e07827ab870c65377d3.js} +1 -1
  17. package/assets/esri/core/workers/chunks/60e4312044fe40dfd41d.js +2 -0
  18. package/assets/esri/core/workers/chunks/67f95c57c1679935570b.js +1 -0
  19. package/assets/esri/core/workers/chunks/{04094d576bfa11d90f73.js → 6afdaa6c4555c467dca7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{a7a9716582b256d76e5b.js → 873c1b705ac3d4e6c384.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{527547fa10d52cb3a7b1.js → 888f6387e795d45a7ad3.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{eb811adbc5243d293ef5.js → 93bf908f596140ea4c61.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{2d49a611ad3441d7e759.js → 9ae9e9a65cb08b12caeb.js} +15 -15
  24. package/assets/esri/core/workers/chunks/{eaeb95be8d4032513247.js → b014f0b2385dc82dc683.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{2128a66f522d15493ce2.js → b2303b2771fcd75f298b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{7c16493ea34c49a6291e.js → b8f624f8c975728d75e2.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{f5144e570952ca62a1b0.js → b98c24229463029504e8.js} +1 -1
  28. package/assets/esri/core/workers/chunks/bf668010f36179792592.js +1 -0
  29. package/assets/esri/core/workers/chunks/c0ecb68387e342dddf58.js +1 -0
  30. package/assets/esri/core/workers/chunks/{0f2d6f267d235db48767.js → cb482e20e10ab0f63617.js} +1 -1
  31. package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +1 -0
  32. package/assets/esri/core/workers/chunks/{19955d064c17ba2fd9ad.js → d0da3a44f33f4d8e682b.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{0e78678281bcb888964d.js → d456f06d0c6a5cc02be7.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{a35d1be700ebd3109397.js → d82b543c96f09ded3bf9.js} +2 -2
  35. package/assets/esri/core/workers/chunks/{776a7179d32fe62a37e3.js → de9fea9b6f2269ee0703.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e8ae71e482b8d5f54a72.js → dec51409372764e7093d.js} +1 -1
  37. package/assets/esri/core/workers/chunks/e09f8b17cb0b92354de8.js +1 -0
  38. package/assets/esri/core/workers/chunks/{b859d98fa1c39f8e4099.js → e0a63b5861e8c975097e.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{23cb0611abe1031c513c.js → fce30184f354fb7d11af.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{67de5225b2c66c9c7bc9.js → ffc87a038712a4c9d2cb.js} +1 -1
  41. package/chunks/ChapmanAtmosphere.glsl.js +4 -4
  42. package/chunks/Clouds.glsl.js +14 -14
  43. package/chunks/ComponentShader.glsl.js +1 -1
  44. package/chunks/DefaultMaterial.glsl.js +1 -1
  45. package/chunks/Fog.glsl.js +2 -1
  46. package/chunks/GaussianSplat.glsl.js +2 -2
  47. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  48. package/chunks/GeodeticUtils.js +1 -1
  49. package/chunks/GlowBlur.glsl.js +8 -8
  50. package/chunks/GlowComposition.glsl.js +7 -7
  51. package/chunks/HUDMaterial.glsl.js +4 -1
  52. package/chunks/Haze.glsl.js +4 -4
  53. package/chunks/MultiPathImpl.js +1 -1
  54. package/chunks/NoiseTextureAtlas.glsl.js +34 -34
  55. package/chunks/OITBlend.glsl.js +10 -10
  56. package/chunks/OperatorGeodesicBuffer.js +1 -1
  57. package/chunks/OperatorGeodeticArea.js +1 -1
  58. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  59. package/chunks/OperatorGeodeticLength.js +1 -1
  60. package/chunks/OperatorProximityGeodesic.js +1 -1
  61. package/chunks/OperatorShapePreservingLength.js +1 -1
  62. package/chunks/OperatorShapePreservingProject.js +1 -1
  63. package/chunks/Path.glsl.js +2 -2
  64. package/chunks/Point2D.js +1 -1
  65. package/chunks/RealisticTree.glsl.js +1 -1
  66. package/chunks/SlicePlaneMaterial.glsl.js +6 -5
  67. package/chunks/SpatialReference.js +1 -1
  68. package/chunks/lyr3DMain.js +1 -1
  69. package/chunks/lyr3DWorker.js +1 -1
  70. package/config.js +1 -1
  71. package/core/has.js +1 -1
  72. package/geometry/libtess.js +1 -1
  73. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  74. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  75. package/intl.js +1 -1
  76. package/kernel.js +1 -1
  77. package/layers/VoxelWasmPerSceneView.js +1 -1
  78. package/layers/graphics/dehydratedPoint.js +1 -1
  79. package/layers/video/VideoController.js +1 -1
  80. package/libs/lyr3d/Lyr3DModule.js +1 -1
  81. package/package.json +4 -4
  82. package/rest/print.js +1 -1
  83. package/support/revision.js +1 -1
  84. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  85. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  86. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  87. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  88. package/views/2d/layers/MediaLayerView2D.js +1 -1
  89. package/views/2d/layers/TileLayerView2D.js +1 -1
  90. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  91. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  92. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  93. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  94. package/views/3d/analysis/Dimension/DimensionController.js +1 -1
  95. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  96. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  97. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  98. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  99. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  100. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  101. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  102. package/views/3d/environment/EnvironmentManager.js +1 -1
  103. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  104. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  105. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  106. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  107. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  108. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  109. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  110. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  111. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  112. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  113. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  114. package/views/3d/state/NearFarHeuristic.js +1 -1
  115. package/views/3d/state/ViewStateManager.js +1 -1
  116. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  117. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  118. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  119. package/views/3d/terrain/OverlayRenderer.js +1 -1
  120. package/views/3d/terrain/RasterTile.js +1 -1
  121. package/views/3d/terrain/TerrainRenderer.js +1 -1
  122. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  123. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  124. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  125. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  126. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  127. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  128. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  129. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  130. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  131. package/views/3d/webgl-engine/effects/WeatherFader.js +2 -0
  132. package/views/3d/{environment → webgl-engine/effects/atmosphere}/ChapmanApproximation.glsl.js +3 -3
  133. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +2 -0
  134. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +2 -0
  135. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +2 -0
  136. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +2 -0
  137. package/views/3d/{environment → webgl-engine/effects/atmosphere}/ChapmanRaymarching.glsl.js +5 -5
  138. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +2 -0
  139. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +2 -0
  140. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +2 -0
  141. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphereTechnique.js +2 -0
  142. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphereTechniqueConfiguration.js +2 -0
  143. package/views/3d/webgl-engine/effects/atmosphere/atmosphereUtils.js +2 -0
  144. package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +2 -0
  145. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +2 -0
  146. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +2 -0
  147. package/views/3d/webgl-engine/effects/clouds/CloudsCompositionTechnique.js +2 -0
  148. package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +2 -0
  149. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +2 -0
  150. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +2 -0
  151. package/views/3d/webgl-engine/effects/clouds/CloudsTechniqueConfiguration.js +2 -0
  152. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +2 -0
  153. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +2 -0
  154. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasConfiguration.js +2 -0
  155. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasDimensions.js +2 -0
  156. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +2 -0
  157. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +2 -0
  158. package/views/3d/webgl-engine/effects/fog/Fog.js +2 -0
  159. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +2 -0
  160. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +2 -0
  161. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  163. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  165. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  166. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  167. package/views/3d/webgl-engine/effects/precipitation/Precipitation.glsl.js +2 -0
  168. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +2 -0
  169. package/views/3d/webgl-engine/effects/precipitation/PrecipitationTechnique.js +2 -0
  170. package/views/3d/webgl-engine/effects/precipitation/PrecipitationTechniqueConfiguration.js +2 -0
  171. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  172. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  173. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  174. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  175. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +2 -0
  176. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +2 -0
  177. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  178. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  179. package/views/3d/webgl-engine/lib/Material.js +1 -1
  180. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  181. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  182. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  183. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  184. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  185. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  186. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  188. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  191. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  194. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  195. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  198. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  199. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  200. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  201. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  202. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  203. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  204. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  205. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  206. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  208. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
  209. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  210. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  211. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  212. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  213. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  214. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +2 -0
  215. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +2 -0
  216. package/views/3d/webgl.js +1 -1
  217. package/views/VideoView.js +1 -1
  218. package/views/interactive/sketch/normalizedPoint.js +1 -1
  219. package/views/interactive/snapping/LineSnapper.js +1 -1
  220. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  221. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  222. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  223. package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
  224. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  225. package/views/interactive/snapping/SnappingManager.js +1 -1
  226. package/views/interactive/snapping/candidates/dehydrated/DehydratedVertexSnappingCandidate.js +1 -1
  227. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  228. package/views/support/MeasurementWorker.js +1 -1
  229. package/views/support/MeasurementWorkerHandle.js +1 -1
  230. package/views/support/measurementWorkerUtils.js +1 -1
  231. package/views/webgl/WebGLDriverTest.js +1 -1
  232. package/widgets/OrientedImageryViewer.js +1 -1
  233. package/assets/esri/core/workers/chunks/144acac9bb1aa78f1170.js +0 -1
  234. package/assets/esri/core/workers/chunks/2f20a21db44bd8448e9e.js +0 -1
  235. package/assets/esri/core/workers/chunks/5d87316d6f973d95745c.js +0 -1
  236. package/assets/esri/core/workers/chunks/63722607fbf8d411188d.js +0 -1
  237. package/assets/esri/core/workers/chunks/6ac84e6d33104e74398d.js +0 -1
  238. package/assets/esri/core/workers/chunks/a53979c45ee429e21b99.js +0 -2
  239. package/assets/esri/core/workers/chunks/b1ddc837a6805a09d0da.js +0 -1
  240. package/assets/esri/core/workers/chunks/bd278f8081be8304be8d.js +0 -1
  241. package/assets/esri/core/workers/chunks/bd902ae413887082b453.js +0 -1
  242. package/assets/esri/core/workers/chunks/ce3e192fbb53a9c6eb3b.js +0 -1
  243. package/assets/esri/core/workers/chunks/de5719ef663224860af5.js +0 -1
  244. package/assets/esri/core/workers/chunks/f7506c9d57b2ae0c5fd3.js +0 -1
  245. package/views/3d/environment/ChapmanAtmosphere.glsl.js +0 -2
  246. package/views/3d/environment/ChapmanAtmosphere.js +0 -2
  247. package/views/3d/environment/ChapmanAtmosphereTechnique.js +0 -2
  248. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
  249. package/views/3d/environment/Clouds.glsl.js +0 -2
  250. package/views/3d/environment/CloudsComposition.glsl.js +0 -2
  251. package/views/3d/environment/CloudsComposition.js +0 -2
  252. package/views/3d/environment/CloudsCompositionTechnique.js +0 -2
  253. package/views/3d/environment/CloudsParameters.js +0 -2
  254. package/views/3d/environment/CloudsRenderer.js +0 -2
  255. package/views/3d/environment/CloudsTechnique.js +0 -2
  256. package/views/3d/environment/CloudsTechniqueConfiguration.js +0 -2
  257. package/views/3d/environment/EnvironmentRenderer.js +0 -2
  258. package/views/3d/environment/Fog.glsl.js +0 -2
  259. package/views/3d/environment/Fog.js +0 -2
  260. package/views/3d/environment/FogTechnique.js +0 -2
  261. package/views/3d/environment/FogTechniqueConfiguration.js +0 -2
  262. package/views/3d/environment/LocalAtmosphere.js +0 -2
  263. package/views/3d/environment/MarsAtmosphere.js +0 -2
  264. package/views/3d/environment/NoiseTextureAtlas.glsl.js +0 -2
  265. package/views/3d/environment/NoiseTextureAtlas.js +0 -2
  266. package/views/3d/environment/NoiseTextureAtlasConfiguration.js +0 -2
  267. package/views/3d/environment/NoiseTextureAtlasDimensions.js +0 -2
  268. package/views/3d/environment/NoiseTextureAtlasTechnique.js +0 -2
  269. package/views/3d/environment/Precipitation.glsl.js +0 -2
  270. package/views/3d/environment/Precipitation.js +0 -2
  271. package/views/3d/environment/PrecipitationTechnique.js +0 -2
  272. package/views/3d/environment/PrecipitationTechniqueConfiguration.js +0 -2
  273. package/views/3d/environment/SimpleAtmosphere.glsl.js +0 -2
  274. package/views/3d/environment/SimpleAtmosphereTechnique.js +0 -2
  275. package/views/3d/environment/SimpleAtmosphereTechniqueConfiguration.js +0 -2
  276. package/views/3d/environment/atmosphereUtils.js +0 -2
  277. package/views/3d/webgl-engine/lib/CutFillColor.js +0 -2
  278. package/views/3d/webgl-engine/lib/CutFillDepth.js +0 -2
  279. package/views/support/geodesicAreaMeasurementUtils.js +0 -2
  280. package/views/support/geodesicLengthMeasurementUtils.js +0 -2
  281. package/views/support/geodesicMeasurementUtils.js +0 -2
  282. package/views/webgl/AppleAmdDriverHelper.js +0 -2
  283. package/views/webgl/testAppleAmdDrawArrays.js +0 -2
  284. /package/assets/esri/core/workers/chunks/{4490f8eeeb2ee04daa9d.js.LICENSE.txt → 0dd12d6af0cf7707109c.js.LICENSE.txt} +0 -0
  285. /package/assets/esri/core/workers/chunks/{a53979c45ee429e21b99.js.LICENSE.txt → 60e4312044fe40dfd41d.js.LICENSE.txt} +0 -0
  286. /package/assets/esri/core/workers/chunks/{527547fa10d52cb3a7b1.js.LICENSE.txt → 888f6387e795d45a7ad3.js.LICENSE.txt} +0 -0
  287. /package/assets/esri/core/workers/chunks/{eaeb95be8d4032513247.js.LICENSE.txt → b014f0b2385dc82dc683.js.LICENSE.txt} +0 -0
  288. /package/assets/esri/core/workers/chunks/{a35d1be700ebd3109397.js.LICENSE.txt → d82b543c96f09ded3bf9.js.LICENSE.txt} +0 -0
  289. /package/views/3d/{environment/resources → webgl-engine/effects/atmosphere}/MarsAtmosphereTexture.js +0 -0
  290. /package/views/3d/{environment/resources → webgl-engine/effects/atmosphere}/SimpleAtmosphereTexture.js +0 -0
  291. /package/views/3d/{environment → webgl-engine/effects/clouds}/Clouds.js +0 -0
  292. /package/views/3d/{environment → webgl-engine/effects/clouds}/CloudsPresets.js +0 -0
  293. /package/views/3d/webgl-engine/effects/{weather → snowcover}/SnowCover.glsl.js +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";class i extends e{constructor(t){super(),this.spherical=t,this.capType=0,this.emissionSource=0,this.animation=2,this.hasPolygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.wireframe=!1,this.discardInvisibleFragments=!1,this.hasScreenSizePerspective=!1,this.worldSizedImagePattern=!1,this.textureCoordinateType=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1}get hasAnimation(){return 0!==this.animation}}t([o({count:3})],i.prototype,"capType",void 0),t([o({count:8})],i.prototype,"emissionSource",void 0),t([o({count:4})],i.prototype,"animation",void 0),t([o()],i.prototype,"hasPolygonOffset",void 0),t([o()],i.prototype,"writeDepth",void 0),t([o()],i.prototype,"draped",void 0),t([o()],i.prototype,"stippleEnabled",void 0),t([o()],i.prototype,"stippleOffColorEnabled",void 0),t([o()],i.prototype,"stipplePreferContinuous",void 0),t([o()],i.prototype,"roundJoins",void 0),t([o()],i.prototype,"applyMarkerOffset",void 0),t([o()],i.prototype,"hasVVSize",void 0),t([o()],i.prototype,"hasVVColor",void 0),t([o()],i.prototype,"hasVVOpacity",void 0),t([o()],i.prototype,"falloffEnabled",void 0),t([o()],i.prototype,"innerColorEnabled",void 0),t([o()],i.prototype,"hasOccludees",void 0),t([o()],i.prototype,"occluder",void 0),t([o()],i.prototype,"terrainDepthTest",void 0),t([o()],i.prototype,"cullAboveTerrain",void 0),t([o()],i.prototype,"wireframe",void 0),t([o()],i.prototype,"discardInvisibleFragments",void 0),t([o()],i.prototype,"hasScreenSizePerspective",void 0),t([o()],i.prototype,"worldSizedImagePattern",void 0);export{i as RibbonLineTechniqueConfiguration};
2
+ import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(t){super(),this.spherical=t,this.capType=0,this.emissionSource=0,this.animation=2,this.hasPolygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.wireframe=!1,this.discardInvisibleFragments=!1,this.hasScreenSizePerspective=!1,this.worldSizedImagePattern=!1,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1}get hasAnimation(){return 0!==this.animation}}t([e({count:3})],i.prototype,"capType",void 0),t([e({count:8})],i.prototype,"emissionSource",void 0),t([e({count:4})],i.prototype,"animation",void 0),t([e()],i.prototype,"hasPolygonOffset",void 0),t([e()],i.prototype,"writeDepth",void 0),t([e()],i.prototype,"draped",void 0),t([e()],i.prototype,"stippleEnabled",void 0),t([e()],i.prototype,"stippleOffColorEnabled",void 0),t([e()],i.prototype,"stipplePreferContinuous",void 0),t([e()],i.prototype,"roundJoins",void 0),t([e()],i.prototype,"applyMarkerOffset",void 0),t([e()],i.prototype,"hasVVSize",void 0),t([e()],i.prototype,"hasVVColor",void 0),t([e()],i.prototype,"hasVVOpacity",void 0),t([e()],i.prototype,"falloffEnabled",void 0),t([e()],i.prototype,"innerColorEnabled",void 0),t([e()],i.prototype,"hasOccludees",void 0),t([e()],i.prototype,"occluder",void 0),t([e()],i.prototype,"terrainDepthTest",void 0),t([e()],i.prototype,"cullAboveTerrain",void 0),t([e()],i.prototype,"wireframe",void 0),t([e()],i.prototype,"discardInvisibleFragments",void 0),t([e()],i.prototype,"hasScreenSizePerspective",void 0),t([e()],i.prototype,"worldSizedImagePattern",void 0);export{i as RibbonLineTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class r extends i{constructor(){super(...arguments),this.cullFace=0,this.transparent=!1,this.writeDepth=!0,this.screenSizeEnabled=!0,this.shadingEnabled=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=0,this.emissionSource=0,this.occlusionPass=!1,this.olidColorInstanced=!1,this.draped=!1,this.overlayEnabled=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent}}e([t({count:3})],r.prototype,"cullFace",void 0),e([t()],r.prototype,"transparent",void 0),e([t()],r.prototype,"writeDepth",void 0),e([t()],r.prototype,"screenSizeEnabled",void 0),e([t()],r.prototype,"shadingEnabled",void 0),e([t()],r.prototype,"terrainDepthTest",void 0),e([t()],r.prototype,"cullAboveTerrain",void 0);export{r as ShadedColorMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class i extends r{constructor(){super(...arguments),this.cullFace=0,this.transparent=!1,this.writeDepth=!0,this.screenSizeEnabled=!0,this.shadingEnabled=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=0,this.emissionSource=0,this.olidColorInstanced=!1,this.draped=!1,this.overlayEnabled=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent}}e([t({count:3})],i.prototype,"cullFace",void 0),e([t()],i.prototype,"transparent",void 0),e([t()],i.prototype,"writeDepth",void 0),e([t()],i.prototype,"screenSizeEnabled",void 0),e([t()],i.prototype,"shadingEnabled",void 0),e([t()],i.prototype,"terrainDepthTest",void 0),e([t()],i.prototype,"cullAboveTerrain",void 0);export{i as ShadedColorMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/SlicePlaneMaterial.glsl.js";
2
+ import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/SlicePlaneMaterial.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";class s extends e{constructor(){super(...arguments),this.discardInvisibleFragments=!1,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}export{s as SlicePlaneMaterialTechniqueConfiguration};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ function t(t,o){o.hasFloatOit?(t.constants.add("oitOutputScale","float",1),t.constants.add("oitInputScale","float",1)):(t.constants.add("oitOutputScale","float",1/a),t.constants.add("oitInputScale","float",a))}const a=16;export{a as oitReductionFactor,t as oitResolution};
package/views/3d/webgl.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scale as i,add as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../geometry/Point.js";import a from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as m}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as p}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as f}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as u}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as R,viewModeDependentUtil as d}from"./support/viewingModeUtils.js";const A={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},E=[A.FINAL,A.COMPOSITE,A.OPAQUE,A.TRANSPARENT],T={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_DEPTH:"cutfill-depth",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",PRE_TRANSPARENT:"pre-transparent-color",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserline-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",SSAO:"ssao",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",VIEWSHED:"viewshed-color"},j=Array.from(Object.values(T)).concat(E);function O(o,e,r,t,i,n,c){return t=t||o.spatialReference,m(e,t,r,i,o.renderCoordsHelper.spatialReference,n,c)?i:null}function g(o,e,r,t,i,n,c){return n=n||o.spatialReference,m(e,o.renderCoordsHelper.spatialReference,r,t,n,i,c)?t:null}function N(o,e,r,i){return i||(i=t()),r=r||o.spatialReference,s(r,e,i,o.renderCoordsHelper.spatialReference)?i:null}function y(r,t,i){const n=r.renderSpatialReference,c=R(r,t.eye,t.viewForward,t.up,C);let s=r.spatialReference;return f(t.eye,n,I,s)||(s=a.WGS84,f(t.eye,n,I,s)),null==i?i=new o(new l(I,s),c.heading,c.tilt,e(t.fov)):(i.position.x=I[0],i.position.y=I[1],i.position.z=I[2],i.position.spatialReference=s,i.heading=c.heading,i.tilt=c.tilt,i.fov=e(t.fov)),i.layout.row=t.row,i.layout.rows=t.rows,i.layout.column=t.column,i.layout.columns=t.columns,i}function S(o,e){if(!e)return null;const t=o.renderSpatialReference,l=d(o).headingTiltToDirectionUp,a=c();if(!p(e.position,a,t))return null;const s=l(a,e.heading,e.tilt);i(s.direction,s.direction,o.state.camera.distance),n(s.direction,s.direction,a);const m=u(o,a,s.direction,s.up);return m.fov=r(e.fov),m.row=e.layout.row,m.rows=e.layout.rows,m.column=e.layout.column,m.columns=e.layout.columns,m}const I=c(),C={heading:0,tilt:0};export{j as AllInternalRenderNodeOutputs,E as AllRenderNodeOutputs,T as InternalRenderCategory,A as RenderNodeOutput,y as fromRenderCamera,g as fromRenderCoordinates,N as renderCoordinateTransformAt,S as toRenderCamera,O as toRenderCoordinates};
2
+ import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scale as i,add as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../geometry/Point.js";import a from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as m}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as p}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as f}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as u}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as R,viewModeDependentUtil as d}from"./support/viewingModeUtils.js";const A={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},T=[A.FINAL,A.COMPOSITE,A.OPAQUE,A.TRANSPARENT],O={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",PRE_TRANSPARENT:"pre-transparent-color",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserline-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",SSAO:"ssao",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",VIEWSHED:"viewshed-color"},E=Array.from(Object.values(O)).concat(T);function j(o,e,r,t,i,n,c){return t=t||o.spatialReference,m(e,t,r,i,o.renderCoordsHelper.spatialReference,n,c)?i:null}function N(o,e,r,t,i,n,c){return n=n||o.spatialReference,m(e,o.renderCoordsHelper.spatialReference,r,t,n,i,c)?t:null}function g(o,e,r,i){return i||(i=t()),r=r||o.spatialReference,s(r,e,i,o.renderCoordsHelper.spatialReference)?i:null}function y(r,t,i){const n=r.renderSpatialReference,c=R(r,t.eye,t.viewForward,t.up,C);let s=r.spatialReference;return f(t.eye,n,S,s)||(s=a.WGS84,f(t.eye,n,S,s)),null==i?i=new o(new l(S,s),c.heading,c.tilt,e(t.fov)):(i.position.x=S[0],i.position.y=S[1],i.position.z=S[2],i.position.spatialReference=s,i.heading=c.heading,i.tilt=c.tilt,i.fov=e(t.fov)),i.layout.row=t.row,i.layout.rows=t.rows,i.layout.column=t.column,i.layout.columns=t.columns,i}function I(o,e){if(!e)return null;const t=o.renderSpatialReference,l=d(o).headingTiltToDirectionUp,a=c();if(!p(e.position,a,t))return null;const s=l(a,e.heading,e.tilt);i(s.direction,s.direction,o.state.camera.distance),n(s.direction,s.direction,a);const m=u(o,a,s.direction,s.up);return m.fov=r(e.fov),m.row=e.layout.row,m.rows=e.layout.rows,m.column=e.layout.column,m.columns=e.layout.columns,m}const S=c(),C={heading:0,tilt:0};export{E as AllInternalRenderNodeOutputs,T as AllRenderNodeOutputs,O as InternalRenderCategory,A as RenderNodeOutput,y as fromRenderCamera,N as fromRenderCoordinates,g as renderCoordinateTransformAt,I as toRenderCamera,j as toRenderCoordinates};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as r}from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,syncAndInitial as l,whenOnce as p,when as m}from"../core/reactiveUtils.js";import{property as h,cast as d,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import y from"../geometry/Point.js";import u from"../geometry/SpatialReference.js";import{load as j,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import _ from"../layers/support/TileInfo.js";import M from"../layers/support/VideoElement.js";import{DOMContainer as S}from"./DOMContainer.js";import{Viewport2DBaseMixin as C}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as V}from"./Viewport2DMixin.js";import x from"./2d/AnimationManager.js";import E from"./2d/MapViewConstraints.js";import"../core/RandomLCG.js";import"../core/Logger.js";import"../core/has.js";import"../core/scheduling.js";import"../core/mathUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../core/floatRGBA.js";import"../symbols/Font.js";import"../geometry/support/spatialReferenceUtils.js";import"../symbols/cim/effects/EffectAddControlPoints.js";import"../symbols/cim/effects/EffectArrow.js";import"../symbols/cim/effects/EffectBuffer.js";import"../symbols/cim/effects/EffectControlMeasureLine.js";import"../symbols/cim/effects/EffectCut.js";import"../symbols/cim/effects/EffectDashes.js";import"../symbols/cim/effects/EffectDonut.js";import"../symbols/cim/effects/EffectEnclosingPolygon.js";import"../symbols/cim/effects/EffectJog.js";import"../symbols/cim/effects/EffectMove.js";import"../symbols/cim/effects/EffectOffset.js";import"../symbols/cim/effects/EffectRadial.js";import"../symbols/cim/effects/EffectReverse.js";import"../symbols/cim/effects/EffectRotate.js";import"../symbols/cim/effects/EffectScale.js";import"../symbols/cim/effects/EffectSuppress.js";import"../symbols/cim/effects/EffectTaperedPolygon.js";import"../symbols/cim/effects/EffectWave.js";import"../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../symbols/cim/placements/PlacementAtExtremities.js";import"../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../symbols/cim/placements/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/dimensions/effects/LinearDimensionArrowEffect.js";import"../symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionPointEffect.js";import"../symbols/dimensions/effects/LinearDimensionTextEffect.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"../geometry/Polygon.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as G}from"./2d/engine/Container.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/enums.js";import"./webgl/Program.js";import"./webgl/Util.js";import"./webgl/VertexAttributeLayouts.js";import"./webgl/BufferObject.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/MappedMesh.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"./2d/engine/webgl/shaders/HighlightPrograms.js";import"./webgl/FramebufferObject.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./webgl/Renderbuffer.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../core/sql/UnknownTimeZone.js";import"luxon";import"../intl/locale.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polyline.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/animations/instructions.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/checkWebGLError.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as P}from"./2d/engine/ManagedCanvas.js";import"./2d/engine/transitions/FadeTransition.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import"./2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtils.js";import"./2d/layers/support/util.js";import D from"./2d/navigation/MapViewNavigation.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/units.js";import"../geometry/ellipsoidUtils.js";import"../geometry/spatialReferenceEllipsoidUtils.js";import"../geometry/operators/support/GeographicTransformation.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import"../geometry/support/Ellipsoid.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import q from"./2d/engine/webgl/Overlay.js";import z from"./2d/engine/webgl/OverlayContainer.js";import O from"./navigation/Navigation.js";import T from"./ui/DefaultUI.js";import L from"./ui/video/DefaultUIVideo.js";const W=new t("#000");let A;async function U(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);A=e}const F=.01,k=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let B=class extends(V(C(S(r(a(s)))))){constructor(e){super(e),this._isValid=!1,this._readyCycleForced=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.map=null,this.navigation=new O,this.ready=!1,this.spatialReference=new u({wkid:0}),this.stateManager=new R({constraints:new E({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new L,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),n(()=>this.size,e=>{this._operationalDataView&&this._operationalDataView.stateManager.resize(e[0],e[1])}),n(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},l)])}initialize(){this._prevZoomEnabled="zoom"===this.navigation.actionMap.mouseWheel&&this.ui.components.includes("zoom"),this._prevRotationEnabled="rotate"===this.navigation.actionMap.dragSecondary&&this.ui.components.includes("compass"),this.addHandles([n(()=>[this.operationalDataVisible,this.childStage],()=>{this.childStage&&(this.childStage.videoScreenRenderer.visible=this.operationalDataVisible),this.operationalDataVisible&&(this.scale=1,this.rotation=0),this.navigation&&(this._prevZoomEnabled&&(this.navigation.actionMap.mouseWheel=this.operationalDataVisible?"none":"zoom",this.navigation.actionMap.dragPrimary=this.operationalDataVisible?"none":"pan",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"zoom"!==e):[...new Set([...this.ui.components,"zoom"])])),this._prevRotationEnabled&&(this.navigation.actionMap.dragSecondary=this.operationalDataVisible?"none":"rotate",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"compass"!==e):[...new Set([...this.ui.components,"compass"])])))},l)]),this.addResolvingPromise(U().then(()=>(this._isValid=!0,p(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=o(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get layer(){return this._get("layer")}set layer(e){e!==this._get("layer")&&(this.constructed&&!this.destroyed&&(this._forceReadyCycle(),this.addResolvingPromise(p(()=>this.ready))),this._set("layer",e))}get preconditionsReady(){return!(!this._isValid||this._readyCycleForced||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,r=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,r]:r<=t?[e,r]:[s,t]:i>=1?r<=t?[e,r]:[s,t]:s<=e?[s,t]:[e,r]}async hitTest(e,t){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:W,groundControlPoints:()=>this.layer?.groundControlPoints,getSize:()=>this.videoSize},i=new A(this.surface,t,new P(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new x({view:this});this._set("animationManager",s);const r=new D({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.stage?.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer?.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager?.teardown(),this.frameTask?.stop(),this.stationaryManager?.clear()}_getViewpoint(){return new i({targetGeometry:new y({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([n(()=>this.stationary,t=>e.stationary=t,l),n(()=>this.state.id,()=>e.state=this.state,l),n(()=>this.renderingOptions,t=>e.renderingOptions=t,l)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new M({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new q(this._videoElementView);this._overlayContainer=new z,this._overlayContainer.addChild(t),this._effectsContainer=new G,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([n(()=>this.map,async t=>{if(!t)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(k).has(e.type),width:this.size[0],height:this.size[1],map:t}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},l),n(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints||!e.state)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await j();const s=new Array(i),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=w(new y(o,i),r)}let o=1/0,a=1/0,n=-1/0,l=-1/0;for(const e of s)o=Math.min(o,e.x),a=Math.min(a,e.y),n=Math.max(n,e.x),l=Math.max(l,e.y);const p=f.fromJSON({xmin:o,ymin:a,xmax:n,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},l)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let r=t;r>F;r/=2)i.push(r);i.push(F);const{lods:s}=_.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,r=i*e.scale/2,o=e.targetGeometry.clone();return o.x=Math.max(s,Math.min(t-s,o.x)),o.y=Math.max(r,Math.min(i-r,o.y)),e.targetGeometry=o,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}_forceReadyCycle(){this.ready&&(m(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}};e([h()],B.prototype,"_overlayContainer",void 0),e([h()],B.prototype,"_isValid",void 0),e([h()],B.prototype,"_readyCycleForced",void 0),e([h()],B.prototype,"_effectsContainer",void 0),e([h()],B.prototype,"constraintsInfo",null),e([h()],B.prototype,"operationalDataVisible",void 0),e([h()],B.prototype,"layer",null),e([h()],B.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],B.prototype,"navigation",void 0),e([h({readOnly:!0})],B.prototype,"preconditionsReady",null),e([h({readOnly:!0})],B.prototype,"ready",void 0),e([h({readOnly:!0})],B.prototype,"rendering",null),e([h()],B.prototype,"scale",null),e([h()],B.prototype,"spatialReference",void 0),e([h()],B.prototype,"stateManager",void 0),e([h()],B.prototype,"type",void 0),e([h(),d(e=>e instanceof T?e:g(L,e))],B.prototype,"ui",void 0),e([h({readOnly:!0})],B.prototype,"videoSize",null),e([h({readOnly:!0})],B.prototype,"view2dType",void 0),B=e([c("esri.views.VideoView")],B);const H=B;export{H as default};
2
+ import{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as r}from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,syncAndInitial as l,whenOnce as p,when as m}from"../core/reactiveUtils.js";import{property as h,cast as d,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import y from"../geometry/Point.js";import u from"../geometry/SpatialReference.js";import{load as j,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import _ from"../layers/support/TileInfo.js";import M from"../layers/support/VideoElement.js";import{DOMContainer as S}from"./DOMContainer.js";import{Viewport2DBaseMixin as C}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as V}from"./Viewport2DMixin.js";import x from"./2d/AnimationManager.js";import E from"./2d/MapViewConstraints.js";import"../core/RandomLCG.js";import"../core/Logger.js";import"../core/has.js";import"../core/scheduling.js";import"../core/mathUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../core/floatRGBA.js";import"../symbols/Font.js";import"../geometry/support/spatialReferenceUtils.js";import"../symbols/cim/effects/EffectAddControlPoints.js";import"../symbols/cim/effects/EffectArrow.js";import"../symbols/cim/effects/EffectBuffer.js";import"../symbols/cim/effects/EffectControlMeasureLine.js";import"../symbols/cim/effects/EffectCut.js";import"../symbols/cim/effects/EffectDashes.js";import"../symbols/cim/effects/EffectDonut.js";import"../symbols/cim/effects/EffectEnclosingPolygon.js";import"../symbols/cim/effects/EffectJog.js";import"../symbols/cim/effects/EffectMove.js";import"../symbols/cim/effects/EffectOffset.js";import"../symbols/cim/effects/EffectRadial.js";import"../symbols/cim/effects/EffectReverse.js";import"../symbols/cim/effects/EffectRotate.js";import"../symbols/cim/effects/EffectScale.js";import"../symbols/cim/effects/EffectSuppress.js";import"../symbols/cim/effects/EffectTaperedPolygon.js";import"../symbols/cim/effects/EffectWave.js";import"../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../symbols/cim/placements/PlacementAtExtremities.js";import"../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../symbols/cim/placements/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/dimensions/effects/LinearDimensionArrowEffect.js";import"../symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionPointEffect.js";import"../symbols/dimensions/effects/LinearDimensionTextEffect.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"../geometry/Polygon.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as G}from"./2d/engine/Container.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/enums.js";import"./webgl/Program.js";import"./webgl/Util.js";import"./webgl/VertexAttributeLayouts.js";import"./webgl/BufferObject.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/MappedMesh.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"./2d/engine/webgl/shaders/HighlightPrograms.js";import"./webgl/FramebufferObject.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./webgl/Renderbuffer.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../core/sql/UnknownTimeZone.js";import"luxon";import"../intl/locale.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polyline.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/animations/instructions.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/checkWebGLError.js";import"./webgl/renderState.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as P}from"./2d/engine/ManagedCanvas.js";import"./2d/engine/transitions/FadeTransition.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import"./2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtils.js";import"./2d/layers/support/util.js";import D from"./2d/navigation/MapViewNavigation.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/units.js";import"../geometry/ellipsoidUtils.js";import"../geometry/spatialReferenceEllipsoidUtils.js";import"../geometry/operators/support/GeographicTransformation.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import"../geometry/support/Ellipsoid.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import q from"./2d/engine/webgl/Overlay.js";import z from"./2d/engine/webgl/OverlayContainer.js";import O from"./navigation/Navigation.js";import T from"./ui/DefaultUI.js";import L from"./ui/video/DefaultUIVideo.js";const W=new t("#000");let A;async function U(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);A=e}const F=.01,k=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let B=class extends(V(C(S(r(a(s)))))){constructor(e){super(e),this._isValid=!1,this._readyCycleForced=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.map=null,this.navigation=new O,this.ready=!1,this.spatialReference=new u({wkid:0}),this.stateManager=new R({constraints:new E({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new L,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),n(()=>this.size,e=>{this._operationalDataView&&this._operationalDataView.stateManager.resize(e[0],e[1])}),n(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},l)])}initialize(){this._prevZoomEnabled="zoom"===this.navigation.actionMap.mouseWheel&&this.ui.components.includes("zoom"),this._prevRotationEnabled="rotate"===this.navigation.actionMap.dragSecondary&&this.ui.components.includes("compass"),this.addHandles([n(()=>[this.operationalDataVisible,this.childStage],()=>{this.childStage&&(this.childStage.videoScreenRenderer.visible=this.operationalDataVisible),this.operationalDataVisible&&(this.scale=1,this.rotation=0),this.navigation&&(this._prevZoomEnabled&&(this.navigation.actionMap.mouseWheel=this.operationalDataVisible?"none":"zoom",this.navigation.actionMap.dragPrimary=this.operationalDataVisible?"none":"pan",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"zoom"!==e):[...new Set([...this.ui.components,"zoom"])])),this._prevRotationEnabled&&(this.navigation.actionMap.dragSecondary=this.operationalDataVisible?"none":"rotate",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"compass"!==e):[...new Set([...this.ui.components,"compass"])])))},l)]),this.addResolvingPromise(U().then(()=>(this._isValid=!0,p(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=o(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get layer(){return this._get("layer")}set layer(e){e!==this._get("layer")&&(this.constructed&&!this.destroyed&&(this._forceReadyCycle(),this.addResolvingPromise(p(()=>this.ready))),this._set("layer",e))}get preconditionsReady(){return!(!this._isValid||this._readyCycleForced||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,r=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,r]:r<=t?[e,r]:[s,t]:i>=1?r<=t?[e,r]:[s,t]:s<=e?[s,t]:[e,r]}async hitTest(e,t){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:W,groundControlPoints:()=>this.layer?.groundControlPoints,getSize:()=>this.videoSize},i=new A(this.surface,t,new P(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new x({view:this});this._set("animationManager",s);const r=new D({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.stage?.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer?.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager?.teardown(),this.frameTask?.stop(),this.stationaryManager?.clear()}_getViewpoint(){return new i({targetGeometry:new y({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([n(()=>this.stationary,t=>e.stationary=t,l),n(()=>this.state.id,()=>e.state=this.state,l),n(()=>this.renderingOptions,t=>e.renderingOptions=t,l)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new M({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new q(this._videoElementView);this._overlayContainer=new z,this._overlayContainer.addChild(t),this._effectsContainer=new G,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([n(()=>this.map,async t=>{if(!t)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(k).has(e.type),width:this.size[0],height:this.size[1],map:t}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},l),n(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints||!e.state)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await j();const s=new Array(i),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=w(new y(o,i),r)}let o=1/0,a=1/0,n=-1/0,l=-1/0;for(const e of s)o=Math.min(o,e.x),a=Math.min(a,e.y),n=Math.max(n,e.x),l=Math.max(l,e.y);const p=f.fromJSON({xmin:o,ymin:a,xmax:n,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},l)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let r=t;r>F;r/=2)i.push(r);i.push(F);const{lods:s}=_.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,r=i*e.scale/2,o=e.targetGeometry.clone();return o.x=Math.max(s,Math.min(t-s,o.x)),o.y=Math.max(r,Math.min(i-r,o.y)),e.targetGeometry=o,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}_forceReadyCycle(){this.ready&&(m(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}};e([h()],B.prototype,"_overlayContainer",void 0),e([h()],B.prototype,"_isValid",void 0),e([h()],B.prototype,"_readyCycleForced",void 0),e([h()],B.prototype,"_effectsContainer",void 0),e([h()],B.prototype,"constraintsInfo",null),e([h()],B.prototype,"operationalDataVisible",void 0),e([h()],B.prototype,"layer",null),e([h()],B.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],B.prototype,"navigation",void 0),e([h({readOnly:!0})],B.prototype,"preconditionsReady",null),e([h({readOnly:!0})],B.prototype,"ready",void 0),e([h({readOnly:!0})],B.prototype,"rendering",null),e([h()],B.prototype,"scale",null),e([h()],B.prototype,"spatialReference",void 0),e([h()],B.prototype,"stateManager",void 0),e([h()],B.prototype,"type",void 0),e([h(),d(e=>e instanceof T?e:g(L,e))],B.prototype,"ui",void 0),e([h({readOnly:!0})],B.prototype,"videoSize",null),e([h({readOnly:!0})],B.prototype,"view2dType",void 0),B=e([c("esri.views.VideoView")],B);const H=B;export{H as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeDehydratedPoint as t,setDehydratedPoint as e}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevation as o,getConvertedElevationFromVector as r,absoluteHeightElevationInfo as u,getConvertedElevationFromXYZ as i}from"../../../support/elevationInfoUtils.js";function l(n,t,e){return f(n,t,e)}function f(t=0,e=0,o=0){return n(t,e,o)}function c(n){return n}function s(n){return n}function a(t,e,o){return c(n(t,e,o))}function d(n){const[t,e,o]=n;return n.length>3?[t,e,o,n[3]]:[t,e,o]}function p(n){return n[3]=1|((n.length>3?n[3]:void 0)??0),n}function v(n){return Boolean(1&((n.length>3?n[3]:void 0)??0))}function m(n,t,{coordinateHelper:e,elevationInfo:o},r){return n?h(e.vectorToDehydratedPoint(n,j),t,o,r):null}function h(n,t,e,r=f()){return r[0]=n.x,r[1]=n.y,r[2]=n.z??0,null==t||("2d"===t.type?r[2]=0:r[2]=o(t,n,e,u)??0),r}function y(n,o,r){return r?(e(r,n[0],n[1],n[2],o),r):t(n[0],n[1],n[2],o)}function g(n,o,{z:i,m:l},f,c){const{spatialReference:s,elevationInfo:a}=f;let d;if(null==i&&null==l)d=void 0;else if(null==o||"2d"===o.type)d=i??void 0;else{d=r(o,n,s,u,a)??0}const[p,v]=n;return c?e(c,p,v,d,s):c=t(p,v,d,s),null!=l&&(c.m=l,c.hasM=!0),c}function I(n,t,e,o,r=f()){const[l,c]=n;return r[0]=l,r[1]=c,n.length>3&&(r[3]=n[3]??0),"3d"!==e?.type?(r[2]=t.value,r):(r[2]=i(e,l,c,t.value,o,t.elevationInfo,u)??0,r)}const j=t(0,0,0,null);export{s as asVec2,d as clone,l as create,f as createWritable,m as fromAnyMapPoint,h as fromPoint,a as fromValues,c as fromVec3,v as isTarget,p as markAsTarget,y as toDehydratedPoint,g as toElevationAlignedDehydratedPoint,I as withSelfSnappingZ};
2
+ import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeDehydratedPoint as t,setDehydratedPointFromValues as e}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevation as o,getConvertedElevationFromVector as r,absoluteHeightElevationInfo as u,getConvertedElevationFromXYZ as i}from"../../../support/elevationInfoUtils.js";function l(n,t,e){return f(n,t,e)}function f(t=0,e=0,o=0){return n(t,e,o)}function c(n){return n}function s(n){return n}function a(t,e,o){return c(n(t,e,o))}function d(n){const[t,e,o]=n;return n.length>3?[t,e,o,n[3]]:[t,e,o]}function p(n){return n[3]=1|((n.length>3?n[3]:void 0)??0),n}function v(n){return Boolean(1&((n.length>3?n[3]:void 0)??0))}function m(n,t,{coordinateHelper:e,elevationInfo:o},r){return n?h(e.vectorToDehydratedPoint(n,x),t,o,r):null}function h(n,t,e,r=f()){return r[0]=n.x,r[1]=n.y,r[2]=n.z??0,null==t||("2d"===t.type?r[2]=0:r[2]=o(t,n,e,u)??0),r}function y(n,e){return t(n[0],n[1],n[2],e)}function g(n,t,o){return e(n,t[0],t[1],t[2],o),n}function I(n,o,{z:i,m:l},f,c){const{spatialReference:s,elevationInfo:a}=f;let d;if(null==i&&null==l)d=void 0;else if(null==o||"2d"===o.type)d=i??void 0;else{d=r(o,n,s,u,a)??0}const[p,v]=n;return c?e(c,p,v,d,s):c=t(p,v,d,s),null!=l&&(c.m=l,c.hasM=!0),c}function j(n,t,e,o,r=f()){const[l,c]=n;return r[0]=l,r[1]=c,n.length>3&&(r[3]=n[3]??0),"3d"!==e?.type?(r[2]=t.value,r):(r[2]=i(e,l,c,t.value,o,t.elevationInfo,u)??0,r)}const x=t(0,0,0,null);export{s as asVec2,d as clone,l as create,y as createDehydratedPoint,f as createWritable,m as fromAnyMapPoint,h as fromPoint,a as fromValues,c as fromVec3,v as isTarget,p as markAsTarget,g as setDehydratedPoint,I as toElevationAlignedDehydratedPoint,j as withSelfSnappingZ};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{cyclicalPI as e,cyclical2PI as t}from"../../../core/Cyclical.js";import{valueInUnit as s,createAngle as r}from"../../../core/quantity.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as o}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as n,markAsTarget as a,fromVec3 as l}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as p}from"./SnappingAlgorithm.js";import{isLine as h,editEdgeToSnappingEdge as c,squaredScreenDistance as d}from"./snappingUtils.js";import{LineSnappingCandidate as m}from"./candidates/LineSnappingCandidate.js";import{vectorToScreenPoint as g}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as f,pointFromDistanceAlongAzimuth as u}from"../../support/angularMeasurementUtils.js";import{projectPointToLineLike as x}from"../../support/geometry3dUtils.js";class S extends p{constructor(e,t,s){super(e,t),this._geodesicLengthMeasurementUtils=s}snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts.at(-1),r=s?.segments.length??0,i=[];if(r<1||!s)return i;const{spatialReference:n}=t,a=g(e,n,o,this.view),{view:l}=this,p=s.segments[r-1];let d=p;do{if(h(d)&&this.edgeExceedsShortLineThreshold(d,t)){const s=c(d,l,t);this._processCandidateProposal(s.left,s.right,e,a,t,i)}d=d.leftVertex.leftSegment}while(d&&d!==p);return i}snapExistingVertex(e,t){const s=[],r=t.vertexHandle,i=r.part;if(i.segments.length<2)return s;const{view:a}=this,{spatialReference:l}=t,p=g(e,l,o,a),d=r.leftSegment,m=r.rightSegment;h(d)&&h(m)&&this.edgeExceedsShortLineThreshold(d,t)&&this.edgeExceedsShortLineThreshold(m,t)&&this._processCandidateProposal(n(d.leftVertex.pos,a,t),n(m.rightVertex.pos,a,t),e,p,t,s);const f=i.segments[0];let u=f;do{if(h(u)&&u!==r.leftSegment&&u!==r.rightSegment&&this.edgeExceedsShortLineThreshold(u,t)){const r=c(u,a,t);this._processCandidateProposal(r.left,r.right,e,p,t,s)}u=u.rightVertex.rightSegment}while(u&&u!==f);return s}_processCandidateProposal(e,t,s,r,n,p){const{spatialReference:h,pointer:c}=n,f=i();j(f,e,t,s,n,this._geodesicLengthMeasurementUtils);const u=a(l(f));d(r,g(u,h,o,this.view))<this.squaredProximityThreshold(c)&&p.push(new m({lineStart:e,lineEnd:t,targetPoint:u,isDraped:"on-the-ground"===n.elevationInfo?.mode}))}}function j(e,t,s,r,i,o){v(e,t,s,r,i,o)||w(e,r,t,s)}function v(i,o,n,a,{spatialReference:l},p){const h=f(o,n,l,l);if(null==h)return!1;const c=f(n,a,l,l);if(null==c)return!1;const d=p.geodesicDistance(n,a,l);if(null==d)return!1;const m=Math.abs(e.shortestSignedDiff(h,c))>Math.PI/2?t.normalize(h+Math.PI):h;return u(i,n,l,s(d,"meters"),r(m,"radians","geographic"),"geodesic"),i[2]=a[2],!0}function w(e,t,s,r){x(t,{start:s,end:r,type:1},e),e[2]=t[2]}export{S as LineSnapper};
2
+ import{cyclicalPI as e,cyclical2PI as t}from"../../../core/Cyclical.js";import{valueInUnit as r,createAngle as n}from"../../../core/quantity.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import i from"../../../geometry/Multipoint.js";import{absoluteHeightElevationInfo as o}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as a,markAsTarget as l,fromVec3 as p}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as c}from"./SnappingAlgorithm.js";import{isLine as h,editEdgeToSnappingEdge as m,squaredScreenDistance as d}from"./snappingUtils.js";import{LineSnappingCandidate as f}from"./candidates/LineSnappingCandidate.js";import{vectorToScreenPoint as g}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as u,pointFromDistanceAlongAzimuth as w}from"../../support/angularMeasurementUtils.js";import{projectPointToLineLike as x}from"../../support/geometry3dUtils.js";class S extends c{constructor(e,t,r){super(e,t),this._measurementWorker=r}async snapNewVertex(e,t){const r=t.editGeometryOperations.data.parts.at(-1),n=r?.segments.length??0;if(n<1||!r)return[];const{spatialReference:s}=t,i=g(e,s,o,this.view),{view:a}=this,l=r.segments[n-1];let p=l;const c=[];do{if(h(p)&&this.edgeExceedsShortLineThreshold(p,t)){const e=m(p,a,t);c.push(new y(e.left,e.right))}p=p.leftVertex.leftSegment}while(p&&p!==l);return this._processCandidateProposals(c,e,i,t)}async snapExistingVertex(e,t){const r=t.vertexHandle,n=r.part;if(n.segments.length<2)return[];const{view:s}=this,{spatialReference:i}=t,l=g(e,i,o,s),p=r.leftSegment,c=r.rightSegment,d=[];h(p)&&h(c)&&this.edgeExceedsShortLineThreshold(p,t)&&this.edgeExceedsShortLineThreshold(c,t)&&d.push(new y(a(p.leftVertex.pos,s,t),a(c.rightVertex.pos,s,t)));const f=n.segments[0];let u=f;do{if(h(u)&&u!==r.leftSegment&&u!==r.rightSegment&&this.edgeExceedsShortLineThreshold(u,t)){const e=m(u,s,t);d.push(new y(e.left,e.right))}u=u.rightVertex.rightSegment}while(u&&u!==f);return this._processCandidateProposals(d,e,l,t)}async _processCandidateProposals(e,t,r,n){if(!e.length)return[];const s=await j(e.map(({lineEnd:e})=>e),t,n,this._measurementWorker);return e.map(({lineStart:e,lineEnd:i},o)=>this._processCandidateProposal(e,i,t,r,n,s[o]??null)).filter(e=>void 0!==e)}_processCandidateProposal(e,t,r,n,i,a){const{spatialReference:c,pointer:h}=i,m=s();P(m,e,t,r,i,a);const u=l(p(m));if(!(d(n,g(u,c,o,this.view))>=this.squaredProximityThreshold(h)))return new f({lineStart:e,lineEnd:t,targetPoint:u,isDraped:"on-the-ground"===i.elevationInfo?.mode})}}class y{constructor(e,t){this.lineStart=e,this.lineEnd=t}}async function j(e,t,{spatialReference:r},n){if(!e.length)return[];const s=new i({spatialReference:r,hasZ:!0,points:e.map(e=>[e[0],e[1],e[2]])}),o=new i({spatialReference:r,hasZ:!0,points:Array.from({length:e.length},()=>[t[0],t[1],t[2]])});try{return await n.geodeticDistanceBetweenPointsMany(s,o)}catch{return new Array(e.length).fill(null)}}function P(e,t,r,n,s,i){v(e,t,r,n,s,i)||E(e,n,t,r)}function v(s,i,o,a,{spatialReference:l},p){const c=u(i,o,l,l);if(null==c)return!1;const h=u(o,a,l,l);if(null==h)return!1;if(null==p)return!1;const m=Math.abs(e.shortestSignedDiff(c,h))>Math.PI/2?t.normalize(c+Math.PI):c;return w(s,o,l,r(p,"meters"),n(m,"radians","geographic"),"geodesic"),s[2]=a[2],!0}function E(e,t,r,n){x(t,{start:r,end:n,type:1},e),e[2]=t[2]}export{S as LineSnapper};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{squaredDistance as e}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as i,asVec2 as s,markAsTarget as n,fromValues as o}from"../sketch/normalizedPoint.js";import{defaults as l}from"./Settings.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{isLine as c,editEdgeToSnappingEdge as h,squaredScreenDistance as p}from"./snappingUtils.js";import{ParallelLineSnappingCandidate as g}from"./candidates/ParallelLineSnappingCandidate.js";import{vectorToScreenPoint as f}from"../support/viewUtils.js";import{projectPointToLine as m}from"../../support/geometry2dUtils.js";class d extends a{snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts.at(-1),n=[];if(!s)return n;const o=s.segments.length,l=s.vertices.length;if(o<2)return n;const{view:a}=this,p=f(e,t.spatialReference,r,a),g=s.vertices[0],m=s.vertices[l-1],d=c(m.leftSegment)?i(m.pos,a,t):null,u=c(g.rightSegment)?i(g.pos,a,t):null,v=s.segments[o-1];let x=v;do{if(c(x)&&this.edgeExceedsShortLineThreshold(x,t)){const r=h(x,a,t);d&&this._checkEdgeForParallelLines(r,d,e,p,t,n),u&&this._checkEdgeForParallelLines(r,u,e,p,t,n)}x=x.leftVertex.leftSegment}while(x&&x!==v);return n}snapExistingVertex(e,t){const s=[],n=t.vertexHandle,o=n.part;if(o.segments.length<3)return s;const{view:l}=this,a=f(e,t.spatialReference,r,l),p=n.leftSegment,g=n.rightSegment,m=o.vertices[0],d=i(m.pos,l,t),u=o.vertices.length,v=o.vertices[u-1],x=i(v.pos,l,t),L=o.segments[0];let S=L;do{if(c(S)&&S!==p&&S!==g&&this.edgeExceedsShortLineThreshold(S,t)){const r=h(S,l,t);c(p)&&this._checkEdgeForParallelLines(r,i(p.leftVertex.pos,l,t),e,a,t,s),c(g)&&this._checkEdgeForParallelLines(r,i(g.rightVertex.pos,l,t),e,a,t,s),n===m?this._checkEdgeForParallelLines(r,x,e,a,t,s):n===v&&this._checkEdgeForParallelLines(r,d,e,a,t,s)}S=S.rightVertex.rightSegment}while(S&&S!==L);return s}_checkEdgeForParallelLines(t,i,a,c,h,d){const x=t.left,L=t.right;if(m(v,s(i),s(x),s(L)),e(v,s(i))<l.parallelLineThreshold)return;m(v,s(a),s(x),s(L),s(i));const{spatialReference:S,pointer:P}=h,j=n(o(v[0],v[1],a[2]));if(p(c,f(j,S,r,this.view))<this.squaredProximityThreshold(P)){if(this.isVertical(j,i,h)||this.isVertical(x,L,h))return;if(u(t,d))return;d.push(new g({referenceLine:t,lineStart:i,targetPoint:j,isDraped:"on-the-ground"===h.elevationInfo?.mode}))}}}function u(t,r){const i=t.left,n=t.right;for(const o of r)if(m(v,s(n),s(o.constraint.start),s(o.constraint.end),s(i)),e(v,s(n))<l.parallelLineThreshold)return o.addReferenceLine(t),!0;return!1}const v=t();export{d as ParallelLineSnapper};
2
+ import{squaredDistance as e}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as i,asVec2 as s,markAsTarget as n,fromValues as o}from"../sketch/normalizedPoint.js";import{defaults as l}from"./Settings.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{isLine as c,editEdgeToSnappingEdge as h,squaredScreenDistance as p}from"./snappingUtils.js";import{ParallelLineSnappingCandidate as g}from"./candidates/ParallelLineSnappingCandidate.js";import{vectorToScreenPoint as f}from"../support/viewUtils.js";import{projectPointToLine as m}from"../../support/geometry2dUtils.js";class d extends a{async snapNewVertex(e,t){const s=t.editGeometryOperations.data.parts.at(-1),n=[];if(!s)return n;const o=s.segments.length,l=s.vertices.length;if(o<2)return n;const{view:a}=this,p=f(e,t.spatialReference,r,a),g=s.vertices[0],m=s.vertices[l-1],d=c(m.leftSegment)?i(m.pos,a,t):null,u=c(g.rightSegment)?i(g.pos,a,t):null,v=s.segments[o-1];let x=v;do{if(c(x)&&this.edgeExceedsShortLineThreshold(x,t)){const r=h(x,a,t);d&&this._checkEdgeForParallelLines(r,d,e,p,t,n),u&&this._checkEdgeForParallelLines(r,u,e,p,t,n)}x=x.leftVertex.leftSegment}while(x&&x!==v);return n}async snapExistingVertex(e,t){const s=[],n=t.vertexHandle,o=n.part;if(o.segments.length<3)return s;const{view:l}=this,a=f(e,t.spatialReference,r,l),p=n.leftSegment,g=n.rightSegment,m=o.vertices[0],d=i(m.pos,l,t),u=o.vertices.length,v=o.vertices[u-1],x=i(v.pos,l,t),L=o.segments[0];let S=L;do{if(c(S)&&S!==p&&S!==g&&this.edgeExceedsShortLineThreshold(S,t)){const r=h(S,l,t);c(p)&&this._checkEdgeForParallelLines(r,i(p.leftVertex.pos,l,t),e,a,t,s),c(g)&&this._checkEdgeForParallelLines(r,i(g.rightVertex.pos,l,t),e,a,t,s),n===m?this._checkEdgeForParallelLines(r,x,e,a,t,s):n===v&&this._checkEdgeForParallelLines(r,d,e,a,t,s)}S=S.rightVertex.rightSegment}while(S&&S!==L);return s}_checkEdgeForParallelLines(t,i,a,c,h,d){const x=t.left,L=t.right;if(m(v,s(i),s(x),s(L)),e(v,s(i))<l.parallelLineThreshold)return;m(v,s(a),s(x),s(L),s(i));const{spatialReference:S,pointer:P}=h,j=n(o(v[0],v[1],a[2]));if(p(c,f(j,S,r,this.view))<this.squaredProximityThreshold(P)){if(this.isVertical(j,i,h)||this.isVertical(x,L,h))return;if(u(t,d))return;d.push(new g({referenceLine:t,lineStart:i,targetPoint:j,isDraped:"on-the-ground"===h.elevationInfo?.mode}))}}}function u(t,r){const i=t.left,n=t.right;for(const o of r)if(m(v,s(n),s(o.constraint.start),s(o.constraint.end),s(i)),e(v,s(n))<l.parallelLineThreshold)return o.addReferenceLine(t),!0;return!1}const v=t();export{d as ParallelLineSnapper};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{cyclical2PI as e}from"../../../core/Cyclical.js";import{createAngle as t,valueInUnit as r}from"../../../core/quantity.js";import{subtract as i,dot as n,squaredLength as s,scaleAndAdd as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as c,subtract as g,set as p}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as l}from"../../../support/elevationInfoUtils.js";import{VerticalHalfPlaneConstraint as m}from"../sketch/constraints.js";import{fromAnyMapPoint as f,asVec2 as d,markAsTarget as u,fromValues as x,fromVec3 as S}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as V}from"./SnappingAlgorithm.js";import{isLine as v,squaredScreenDistance as j}from"./snappingUtils.js";import{RightAngleSnappingCandidate as k}from"./candidates/RightAngleSnappingCandidate.js";import{vectorToScreenPoint as C}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as _,pointFromDistanceAlongAzimuth as F}from"../../support/angularMeasurementUtils.js";class w extends V{constructor(e,t,r){super(e,t),this._geodesicLengthMeasurementUtils=r}snapNewVertex(e,t){const r=t.editGeometryOperations.data.parts.at(-1),i=[];if(!r||r.vertices.length<2)return i;const{view:n}=this,s=C(e,t.spatialReference,l,n),o=r.vertices.at(-1);v(o.leftSegment)&&this._checkForSnappingCandidate(1,i,o.leftSegment,o,o.leftSegment.leftVertex,e,s,t);const a=r.vertices[0];return v(a.rightSegment)&&this._checkForSnappingCandidate(2,i,a.rightSegment,a,a.rightSegment.rightVertex,e,s,t),i}snapExistingVertex(e,t){const r=[],i=t.vertexHandle,{part:n}=i;if(n.vertices.length<3)return r;const{view:s}=this,o=C(e,t.spatialReference,l,s),a=i.leftSegment,c=i.rightSegment;if(v(a?.leftVertex.leftSegment)){const i=a.leftVertex.leftSegment;this._checkForSnappingCandidate(3,r,i,i.rightVertex,i.leftVertex,e,o,t)}if(v(c)&&v(c.rightVertex.rightSegment)){const i=c.rightVertex.rightSegment;this._checkForSnappingCandidate(3,r,i,i.leftVertex,i.rightVertex,e,o,t)}const g=n.getFirstVertex()?.rightSegment;return!c&&v(g)&&this._checkForSnappingCandidate(3,r,g,g.leftVertex,g.rightVertex,e,o,t),r}_checkForSnappingCandidate(e,t,r,i,n,s,o,a){if(!v(r)||!this.edgeExceedsShortLineThreshold(r,a))return;const c=this.view,g=f(i.pos,c,a),p=f(n.pos,c,a);y(P,p,g,s,a,this._geodesicLengthMeasurementUtils),this._checkForSnappingCandidateAlongProjectedRay(e,t,p,g,P,s,o,a)}_checkForSnappingCandidateAlongProjectedRay(e,t,r,a,g,p,f,V){const{spatialReference:v,pointer:_}=V,F=i(M,d(p),d(a)),w=n(g,F)/s(g),y=o(M,d(a),g,w),R=u(x(y[0],y[1],p[2]));if(j(f,C(R,v,l,this.view))>this.squaredProximityThreshold(_)||this.isVertical(R,a,V)||this.isVertical(a,r,V))return;const A=c(h(),a,g,Math.sign(w));t.push(new k({targetPoint:R,constraint:new m(a,S(A)),previousVertex:r,otherVertex:a,otherVertexType:1,selfSnappingType:e,isDraped:"on-the-ground"===V.elevationInfo?.mode}))}}function y(e,t,r,i,n,s){R(e,t,r,i,n,s)||A(e,t,r)}function R(i,n,s,o,{spatialReference:a},c){const p=_(n,s,a,a);if(null==p)return!1;const l=_(s,o,a,a);if(null==l)return!1;const m=Math.sign(e.shortestSignedDiff(p,l))*Math.PI*.5,f=t(p+m,"radians","geographic"),d=h(),u=c.geodesicDistance(s,o,a);return null!=u&&(F(d,s,a,r(u,"meters"),f,"geodesic"),g(i,d,s),!0)}function A(e,t,r){const n=i(M,d(r),d(t));p(e,n[1],-n[0],0)}const M=a(),P=h();export{w as RightAngleSnapper};
2
+ import{cyclical2PI as e}from"../../../core/Cyclical.js";import{createAngle as t,valueInUnit as r}from"../../../core/quantity.js";import{subtract as i,dot as n,squaredLength as s,scaleAndAdd as a}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as c,subtract as p,set as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../geometry/Point.js";import{absoluteHeightElevationInfo as l}from"../../../support/elevationInfoUtils.js";import{VerticalHalfPlaneConstraint as f}from"../sketch/constraints.js";import{fromAnyMapPoint as d,asVec2 as u,markAsTarget as x,fromValues as S,fromVec3 as V,setDehydratedPoint as w}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as j}from"./SnappingAlgorithm.js";import{isLine as v,squaredScreenDistance as y}from"./snappingUtils.js";import{RightAngleSnappingCandidate as k}from"./candidates/RightAngleSnappingCandidate.js";import{vectorToScreenPoint as C}from"../support/viewUtils.js";import{radiansGeographicBetweenVec as _,pointFromDistanceAlongAzimuth as F}from"../../support/angularMeasurementUtils.js";class P extends j{constructor(e,t,r){super(e,t),this._measurementWorker=r}async snapNewVertex(e,t){const r=t.editGeometryOperations.data.parts.at(-1),i=[];if(!r||r.vertices.length<2)return i;const{view:n}=this,s=C(e,t.spatialReference,l,n),a=r.vertices.at(-1);v(a.leftSegment)&&await this._checkForSnappingCandidate(1,i,a.leftSegment,a,a.leftSegment.leftVertex,e,s,t);const o=r.vertices[0];return v(o.rightSegment)&&await this._checkForSnappingCandidate(2,i,o.rightSegment,o,o.rightSegment.rightVertex,e,s,t),i}async snapExistingVertex(e,t){const r=[],i=t.vertexHandle,{part:n}=i;if(n.vertices.length<3)return r;const{view:s}=this,a=C(e,t.spatialReference,l,s),o=i.leftSegment,c=i.rightSegment;if(v(o?.leftVertex.leftSegment)){const i=o.leftVertex.leftSegment;await this._checkForSnappingCandidate(3,r,i,i.rightVertex,i.leftVertex,e,a,t)}if(v(c)&&v(c.rightVertex.rightSegment)){const i=c.rightVertex.rightSegment;await this._checkForSnappingCandidate(3,r,i,i.leftVertex,i.rightVertex,e,a,t)}const p=n.getFirstVertex()?.rightSegment;return!c&&v(p)&&await this._checkForSnappingCandidate(3,r,p,p.leftVertex,p.rightVertex,e,a,t),r}async _checkForSnappingCandidate(e,t,r,i,n,s,a,o){if(!v(r)||!this.edgeExceedsShortLineThreshold(r,o))return;const c=this.view,p=d(i.pos,c,o),g=d(n.pos,c,o);await R(T,g,p,s,o,this._measurementWorker),this._checkForSnappingCandidateAlongProjectedRay(e,t,g,p,T,s,a,o)}_checkForSnappingCandidateAlongProjectedRay(e,t,r,o,p,g,h,d){const{spatialReference:w,pointer:j}=d,v=i(M,u(g),u(o)),_=n(p,v)/s(p),F=a(M,u(o),p,_),P=x(S(F[0],F[1],g[2]));if(y(h,C(P,w,l,this.view))>this.squaredProximityThreshold(j)||this.isVertical(P,o,d)||this.isVertical(o,r,d))return;const R=c(m(),o,p,Math.sign(_));t.push(new k({targetPoint:P,constraint:new f(o,V(R)),previousVertex:r,otherVertex:o,otherVertexType:1,selfSnappingType:e,isDraped:"on-the-ground"===d.elevationInfo?.mode}))}}async function R(e,t,r,i,n,s){await A(e,t,r,i,n,s)||b(e,t,r)}async function A(i,n,s,a,{spatialReference:o},c){const g=_(n,s,o,o);if(null==g)return!1;const l=_(s,a,o,o);if(null==l)return!1;const f=Math.sign(e.shortestSignedDiff(g,l))*Math.PI*.5,d=t(g+f,"radians","geographic"),u=m(),x=await c.geodeticDistanceBetweenPoints(w(new h,s,o),w(new h,a,o));return null!=x&&(F(u,s,o,r(x,"meters"),d,"geodesic"),p(i,u,s),!0)}function b(e,t,r){const n=i(M,u(r),u(t));g(e,n[1],-n[0],0)}const M=o(),T=m();export{P as RightAngleSnapper};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{lerp as e,distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as s,asVec2 as o,markAsTarget as n,fromValues as p}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{squaredScreenDistance as l}from"./snappingUtils.js";import{RightAngleTriangleSnappingCandidate as m}from"./candidates/RightAngleTriangleSnappingCandidate.js";import{vectorToScreenPoint as d}from"../support/viewUtils.js";import{projectPointToCircle as g}from"../../support/geometry2dUtils.js";class c extends a{snapNewVertex(e,t){const i=t.editGeometryOperations.data.parts.at(-1),r=[];if(!i)return r;const o=i.vertices.length;if("polygon"!==t.editGeometryOperations.data.type||o<2)return r;const{view:n}=this,p=i.vertices[0],a=i.vertices[o-1];if(a.leftSegment&&"line"!==a.leftSegment.type||a.rightSegment&&"line"!==a.rightSegment.type)return r;const l=s(p.pos,n,t),m=s(a.pos,n,t);return this._processCandidateProposal(l,m,e,t,r),r}snapExistingVertex(e,t){const i=[],r=t.vertexHandle,{part:o,rightSegment:n,leftSegment:p}=r;if(o.segments.length<2)return i;if("polyline"===t.editGeometryOperations.data.type&&(0===r.index||r.index===o.vertices.length-1))return i;if("line"!==p?.type||n&&"line"!==n.type)return i;const a=n?.rightVertex??(o.autoClose?o.getFirstVertex():null);if(!a)return i;const{view:l}=this,m=s(p.leftVertex.pos,l,t),d=s(a.pos,l,t);return this._processCandidateProposal(m,d,e,t,i),i}_processCandidateProposal(i,s,a,c,h){if(!this.exceedsShortLineThreshold(i,s,c))return;const u=e(f,o(i),o(s),.5),x=.5*t(o(i),o(s)),v=g(f,o(a),u,x),y=n(p(v[0],v[1],a[2])),{spatialReference:j,pointer:S}=c,w=d(a,j,r,this.view);if(l(w,d(y,j,r,this.view))<this.squaredProximityThreshold(S)){if(this.isVertical(i,y,c)||this.isVertical(y,s,c))return;h.push(new m({targetPoint:y,point1:i,point2:s,isDraped:"on-the-ground"===c.elevationInfo?.mode}))}}}const f=i();export{c as RightAngleTriangleSnapper};
2
+ import{lerp as e,distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as s,asVec2 as n,markAsTarget as o,fromValues as p}from"../sketch/normalizedPoint.js";import{SnappingAlgorithm as a}from"./SnappingAlgorithm.js";import{squaredScreenDistance as l}from"./snappingUtils.js";import{RightAngleTriangleSnappingCandidate as m}from"./candidates/RightAngleTriangleSnappingCandidate.js";import{vectorToScreenPoint as c}from"../support/viewUtils.js";import{projectPointToCircle as d}from"../../support/geometry2dUtils.js";class g extends a{async snapNewVertex(e,t){const i=t.editGeometryOperations.data.parts.at(-1),r=[];if(!i)return r;const n=i.vertices.length;if("polygon"!==t.editGeometryOperations.data.type||n<2)return r;const{view:o}=this,p=i.vertices[0],a=i.vertices[n-1];if(a.leftSegment&&"line"!==a.leftSegment.type||a.rightSegment&&"line"!==a.rightSegment.type)return r;const l=s(p.pos,o,t),m=s(a.pos,o,t);return this._processCandidateProposal(l,m,e,t,r),r}async snapExistingVertex(e,t){const i=[],r=t.vertexHandle,{part:n,rightSegment:o,leftSegment:p}=r;if(n.segments.length<2)return i;if("polyline"===t.editGeometryOperations.data.type&&(0===r.index||r.index===n.vertices.length-1))return i;if("line"!==p?.type||o&&"line"!==o.type)return i;const a=o?.rightVertex??(n.autoClose?n.getFirstVertex():null);if(!a)return i;const{view:l}=this,m=s(p.leftVertex.pos,l,t),c=s(a.pos,l,t);return this._processCandidateProposal(m,c,e,t,i),i}_processCandidateProposal(i,s,a,g,h){if(!this.exceedsShortLineThreshold(i,s,g))return;const u=e(f,n(i),n(s),.5),x=.5*t(n(i),n(s)),y=d(f,n(a),u,x),v=o(p(y[0],y[1],a[2])),{spatialReference:j,pointer:S}=g,w=c(a,j,r,this.view);if(l(w,c(v,j,r,this.view))<this.squaredProximityThreshold(S)){if(this.isVertical(i,v,g)||this.isVertical(v,s,g))return;h.push(new m({targetPoint:v,point1:i,point2:s,isDraped:"on-the-ground"===g.elevationInfo?.mode}))}}}const f=i();export{g as RightAngleTriangleSnapper};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import s from"../../../core/Accessor.js";import e from"../../../core/Collection.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import{LineSnapper as n}from"./LineSnapper.js";import{ParallelLineSnapper as p}from"./ParallelLineSnapper.js";import{RightAngleSnapper as r}from"./RightAngleSnapper.js";import{RightAngleTriangleSnapper as a}from"./RightAngleTriangleSnapper.js";import{sortCandidatesInPlace as c}from"./snappingUtils.js";let h=class extends s{constructor(t){super(t),this.updating=!1,this._snappers=new e,this._domain=2}initialize(){this._snappers.push(new p(this.view,this.options),new n(this.view,this.options,this.geodesicLengthMeasurementUtils),new r(this.view,this.options,this.geodesicLengthMeasurementUtils),new a(this.view,this.options))}set options(t){this._set("options",t);for(const s of this._snappers)s.options=t}async fetchCandidates(t,s,e){if(!(s&this._domain)||!this.options.effectiveSelfEnabled||e.suppressSelfSnapping)return[];const i=[];for(const o of this._snappers.items)for(const s of o.snap(t,e))i.push(s);return c(t,i),i}};t([i({readOnly:!0})],h.prototype,"updating",void 0),t([i({constructOnly:!0})],h.prototype,"view",void 0),t([i({constructOnly:!0})],h.prototype,"geodesicLengthMeasurementUtils",void 0),t([i()],h.prototype,"options",null),h=t([o("esri.views.interactive.snapping.SelfSnappingEngine")],h);export{h as SelfSnappingEngine};
2
+ import{__decorate as s}from"tslib";import t from"../../../core/Accessor.js";import e from"../../../core/Collection.js";import{property as o,subclass as i}from"../../../core/accessorSupport/decorators.js";import{LineSnapper as r}from"./LineSnapper.js";import{ParallelLineSnapper as n}from"./ParallelLineSnapper.js";import{RightAngleSnapper as p}from"./RightAngleSnapper.js";import{RightAngleTriangleSnapper as a}from"./RightAngleTriangleSnapper.js";import{sortCandidatesInPlace as m}from"./snappingUtils.js";import{MeasurementWorkerHandle as h}from"../../support/MeasurementWorkerHandle.js";let f=class extends t{constructor(s){super(s),this.updating=!1,this._measurementWorker=new h,this._snappers=new e,this._domain=2}initialize(){this._snappers.push(new n(this.view,this.options),new r(this.view,this.options,this._measurementWorker),new p(this.view,this.options,this._measurementWorker),new a(this.view,this.options))}destroy(){this._measurementWorker.destroy()}set options(s){this._set("options",s);for(const t of this._snappers)t.options=s}async fetchCandidates(s,t,e){if(!(t&this._domain)||!this.options.effectiveSelfEnabled||e.suppressSelfSnapping)return[];const o=[];for(const i of this._snappers.items)for(const t of await i.snap(s,e))o.push(t);return m(s,o),o}};s([o({readOnly:!0})],f.prototype,"updating",void 0),s([o({constructOnly:!0})],f.prototype,"view",void 0),s([o()],f.prototype,"options",null),f=s([i("esri.views.interactive.snapping.SelfSnappingEngine")],f);export{f as SelfSnappingEngine};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getMetersPerUnitForSR as e}from"../../../core/units.js";import{distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{absoluteHeightElevationInfo as r}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as s,asVec2 as i}from"../sketch/normalizedPoint.js";import{defaults as o}from"./Settings.js";import{squaredScreenDistance as h}from"./snappingUtils.js";import{vectorToScreenPoint as n}from"../support/viewUtils.js";class l{constructor(e,t){this.view=e,this.options=t,this.squaredShortLineThreshold=o.shortLineThreshold*o.shortLineThreshold}snap(e,t){return null!=t.vertexHandle?"vertex"!==t.vertexHandle.type?[]:this.snapExistingVertex(e,t):this.snapNewVertex(e,t)}edgeExceedsShortLineThreshold(e,t){return this.exceedsShortLineThreshold(s(e.leftVertex.pos,this.view,t),s(e.rightVertex.pos,this.view,t),t)}exceedsShortLineThreshold(e,t,{spatialReference:s}){return 0===this.squaredShortLineThreshold||h(n(t,s,r,this.view),n(e,s,r,this.view))>this.squaredShortLineThreshold}isVertical(r,s,{spatialReference:h}){const n=e(h);return t(i(r),i(s))*n<o.verticalLineThresholdMeters}squaredProximityThreshold(e){return"touch"===e?this._squaredTouchProximityThreshold:this._squaredMouseProximityThreshold}get _squaredMouseProximityThreshold(){return this.options.distance*this.options.distance}get _squaredTouchProximityThreshold(){const{distance:e,touchSensitivityMultiplier:t}=this.options,r=e*t;return r*r}}export{l as SnappingAlgorithm};
2
+ import{getMetersPerUnitForSR as e}from"../../../core/units.js";import{distance as t}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{absoluteHeightElevationInfo as s}from"../../../support/elevationInfoUtils.js";import{fromAnyMapPoint as r,asVec2 as i}from"../sketch/normalizedPoint.js";import{defaults as o}from"./Settings.js";import{squaredScreenDistance as h}from"./snappingUtils.js";import{vectorToScreenPoint as n}from"../support/viewUtils.js";class l{constructor(e,t){this.view=e,this.options=t,this.squaredShortLineThreshold=o.shortLineThreshold*o.shortLineThreshold}async snap(e,t){return null!=t.vertexHandle?"vertex"!==t.vertexHandle.type?[]:this.snapExistingVertex(e,t):this.snapNewVertex(e,t)}edgeExceedsShortLineThreshold(e,t){return this.exceedsShortLineThreshold(r(e.leftVertex.pos,this.view,t),r(e.rightVertex.pos,this.view,t),t)}exceedsShortLineThreshold(e,t,{spatialReference:r}){return 0===this.squaredShortLineThreshold||h(n(t,r,s,this.view),n(e,r,s,this.view))>this.squaredShortLineThreshold}isVertical(s,r,{spatialReference:h}){const n=e(h);return t(i(s),i(r))*n<o.verticalLineThresholdMeters}squaredProximityThreshold(e){return"touch"===e?this._squaredTouchProximityThreshold:this._squaredMouseProximityThreshold}get _squaredMouseProximityThreshold(){return this.options.distance*this.options.distance}get _squaredTouchProximityThreshold(){const{distance:e,touchSensitivityMultiplier:t}=this.options,s=e*t;return s*s}}export{l as SnappingAlgorithm};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{createTask as t}from"../../../core/asyncUtils.js";import n from"../../../core/Error.js";import{EventedAccessor as i}from"../../../core/Evented.js";import"../../../core/has.js";import{throwIfAborted as s,isAborted as a}from"../../../core/promiseUtils.js";import{watch as r,syncAndInitial as o,sync as p}from"../../../core/reactiveUtils.js";import{property as d,subclass as c}from"../../../core/accessorSupport/decorators.js";import{project as h,initializeProjection as l}from"../../../geometry/projectionUtils.js";import{absoluteHeightElevationInfo as u}from"../../../support/elevationInfoUtils.js";import{fromPoint as f,markAsTarget as g,toElevationAlignedDehydratedPoint as _}from"../sketch/normalizedPoint.js";import{defaults as S}from"./Settings.js";import m from"./SnappingOptions.js";import{sortCandidatesInPlace as v,squaredScreenDistance as y}from"./snappingUtils.js";import{DrapedEdgeSnappingCandidate as w}from"./candidates/DrapedEdgeSnappingCandidate.js";import{EdgeSnappingCandidate as C}from"./candidates/EdgeSnappingCandidate.js";import{IntersectionSnappingCandidate as P}from"./candidates/IntersectionSnappingCandidate.js";import{LineSnappingCandidate as T}from"./candidates/LineSnappingCandidate.js";import{ParallelLineSnappingCandidate as E}from"./candidates/ParallelLineSnappingCandidate.js";import{RightAngleSnappingCandidate as j}from"./candidates/RightAngleSnappingCandidate.js";import{RightAngleTriangleSnappingCandidate as R}from"./candidates/RightAngleTriangleSnappingCandidate.js";import{VertexSnappingCandidate as M}from"./candidates/VertexSnappingCandidate.js";import{DehydratedVertexSnappingCandidate as q}from"./candidates/dehydrated/DehydratedVertexSnappingCandidate.js";import{vectorToScreenPoint as x}from"../support/viewUtils.js";import{loadGeodesicLengthMeasurementUtils as b}from"../../support/geodesicLengthMeasurementUtils.js";let z=class extends i{constructor(e){super(e),this.options=new m,this._engineCache=new Map,this._loadTask=null,this._engines=[],this._currentMainCandidate=null,this._currentOtherActiveCandidates=[],this._currentSnappedType=0,this._currentSpatialReference=null}initialize(){this.addHandles([r(()=>{const{distance:e,touchSensitivityMultiplier:t,effectiveSelfEnabled:n,effectiveFeatureEnabled:i,effectiveGridEnabled:s}=this.options;return{selfEnabled:n,featureEnabled:i,gridEnabled:"2d"===this.view.type&&s,viewReady:this.view.ready,viewSpatialReference:this.view.spatialReference,distance:e,touchSensitivityMultiplier:t}},(e,n)=>{n&&(this.doneSnapping(),this.emit("changed")),this._loadTask?.abort(),this._loadTask=t(t=>this._updateEngines(e,n,t))},o),r(()=>this.options,e=>{for(const t of this._engines)t.options=e},p)])}destroy(){this._loadTask?.abort(),this._destroyEngines()}get updating(){return this._engines.some(e=>e.updating)||!this._loadTask?.finished}_destroyEngines(){this._engineCache.forEach(e=>e.destroy()),this._engineCache.clear(),this._engines=[]}async _updateEngines(e,t,n){if(!e.viewReady)return void this._destroyEngines();t?.viewSpatialReference!==e.viewSpatialReference&&this._destroyEngines();const i=this._engineCache,s=await Promise.allSettled([e.featureEnabled&&!i.has("feature")?this._createFeatureSnappingEngine(n):void 0,e.selfEnabled&&!i.has("self")?this._createSelfSnappingEngine(n):void 0,e.gridEnabled&&!i.has("grid")?this._createGridSnappingEngine(n):void 0]);if(n.aborted)for(const a of s)"fulfilled"===a.status&&a.value?.engine.destroy();else{for(const e of s)"fulfilled"===e.status&&e.value&&i.set(e.value.type,e.value.engine);this._engines=Array.from(i.values())}}async _createSelfSnappingEngine(e){const[{SelfSnappingEngine:t},n]=await Promise.all([import("./SelfSnappingEngine.js"),b()]);return s(e),{type:"self",engine:new t({view:this.view,options:this.options,geodesicLengthMeasurementUtils:n})}}async _createGridSnappingEngine(e){const{view:t}=this;if("2d"!==t.type)return;const{GridSnappingEngine:n}=await import("./GridSnappingEngine.js");return s(e),{type:"grid",engine:new n({view:t,options:this.options})}}async _createFeatureSnappingEngine(e){const{FeatureSnappingEngine:t}=await import("./FeatureSnappingEngine.js");s(e);const{view:n,options:i}=this,{spatialReference:a}=n;return{type:"feature",engine:new t({view:n,options:i,spatialReference:a})}}get _squaredMouseProximityThreshold(){return this.options.distance*this.options.distance}get _squaredTouchProximityThreshold(){const{distance:e,touchSensitivityMultiplier:t}=this.options,n=e*t;return n*n}getVertexCandidates(){const e=this._currentSpatialReference;if(!e)return[];const t=new Set;this._currentMainCandidate&&V(t,this._currentMainCandidate);for(const n of this._currentOtherActiveCandidates)V(t,n);return Array.from(t).map(t=>new q(t.objectId,t.layer,t.originalTargetPoint,e))}snap(e){return k(e)?this._snapMultiPoint(e):this._snapSinglePoint(e)}update(e){const{point:t,context:i}=e;this._removeVisualization();const s=this._currentMainCandidate;if(null==s)return t;const a=this._selectUpdateInput(e);if(null==a)return t;const{spatialReference:r}=i;if(!r.equals(this._currentSpatialReference))throw new n("snapping:mismatched-spatial-reference","Cannot update with the given spatial reference, as the current snapping candidates are in a different spatial reference.");const o=h(a,r);if(null==o)return t;const{view:p}=this,{elevationInfo:d,visualizer:c}=i,l=[],u=f(o,p,d),S=s.constraint.closestTo(u);if(!this._arePointsWithinScreenThreshold(u,S,i)||!U(s,i.drawConstraints))return this._resetSnappingState(),t;s.targetPoint=g(S),l.push(...s.hints);for(const n of this._currentOtherActiveCandidates)U(n,i.drawConstraints)&&!Z(s,n)&&(n.targetPoint=g(S),l.push(...n.hints));return null!=c&&this.addHandles(c.draw(l,{spatialReference:r,elevationInfo:D(i),view:p,selfSnappingZ:i.selfSnappingZ}),O),_(S,p,t,i)}doneSnapping(){this._removeVisualization(),this._resetSnappingState()}_selectUpdateInput({point:e,scenePoint:t}){switch(this._currentSnappedType){case 0:return e;case 1:return t}}_resetSnappingState(){this._currentMainCandidate=null,this._currentOtherActiveCandidates=[],this._currentSnappedType=0,this._currentSpatialReference=null}_removeVisualization(){this.removeHandles(O)}async _snapSinglePoint({point:e,context:t,signal:n}){const{view:i}=this,{elevationInfo:s}=t,a=f(e,i,s),r=await this._fetchCandidates(a,3,t,n);return this._createSnapResult(a,0,r,i,e,t,n)}async _snapMultiPoint({point:e,scenePoint:t,context:n,signal:i}){const{view:s}=this,{coordinateHelper:a,elevationInfo:r,spatialReference:o}=n;await l(t.spatialReference,o);const p=h(t,o),d=f(p,s,r),c=await this._fetchCandidates(d,1,n,i);if(c.length>0){const e=await this._fetchCandidates(d,2,n,i);return this._createSnapResult(d,1,[...c,...e],s,p,n,i)}const u=f(e,s,r),g=await this._fetchCandidates(u,2,n,i);return this._createSnapResult(u,0,g,s,{z:a.hasZ()&&e.hasZ?e.z??0:void 0,m:a.hasM()&&e.hasM?e.m??0:void 0},n,i)}async _fetchCandidates(e,t,n,i){return(await Promise.all(this._engines.map(s=>s.fetchCandidates(e,t,n,i)))).flat()}_createSnapResult(e,t,n,i,s,r,o){return{get valid(){return!a(o)},apply:()=>{const{spatialReference:a}=r,{snappedPoint:o,hints:p}=this._processCandidates(e,t,n,r);return this._removeVisualization(),null!=r.visualizer&&this.addHandles(r.visualizer.draw(p,{spatialReference:a,elevationInfo:u,view:i,selfSnappingZ:r.selfSnappingZ}),O),_(o,i,s,r)}}}_processCandidates(e,t,n,i){if(n.length<1)return this.doneSnapping(),{snappedPoint:e,hints:[]};this._currentSnappedType!==t&&this._resetSnappingState(),v(e,n);const s=this._currentMainCandidate;if(null!=s){const a=A(s,n);if(a>=0){if(!(n[a]instanceof P))return this._intersectWithOtherCandidates(a,n,e,t,i);if(this._arePointsWithinScreenThreshold(e,s.targetPoint,i))return this._updateSnappingCandidate(s,t,n,i)}}return this._intersectWithOtherCandidates(0,n,e,t,i)}_intersectWithOtherCandidates(e,t,n,i,s){const{coordinateHelper:a}=s,r=t[e],o=[];for(let p=0;p<t.length;++p){if(p===e)continue;const i=t[p],s=r.constraint.intersect(i.constraint);if(s)for(const e of s.closestPoints(r.targetPoint))o.push([new P(g(e),r,i,i.isDraped),this._squaredScreenDistance(n,e,a)])}return o.length>0&&(o.sort((e,t)=>e[1]-t[1]),o[0][1]<this._squaredPointProximityThreshold(s.pointer))?this._updateSnappingCandidate(o[0][0],i,t,s):U(r,s.drawConstraints)?this._updateSnappingCandidate(r,i,t,s):{snappedPoint:n,hints:[]}}_updateSnappingCandidate(e,t,n,i){this.doneSnapping(),this._currentMainCandidate=e,this._currentSnappedType=t,this._currentSpatialReference=i.spatialReference;const s=this._currentMainCandidate.targetPoint,a=[];a.push(...e.hints);for(const r of n){if(Z(e,r)){this._currentOtherActiveCandidates.push(r);continue}const t=r.constraint.closestTo(s);this._squaredScreenDistance(t,s,i.coordinateHelper)<I()&&(r.targetPoint=s,this._currentOtherActiveCandidates.push(r),a.push(...r.hints))}return{snappedPoint:s,hints:a}}_squaredPointProximityThreshold(e){return"touch"===e?this._squaredTouchProximityThreshold:this._squaredMouseProximityThreshold}_arePointsWithinScreenThreshold(e,t,n){return this._squaredScreenDistance(e,t,n.coordinateHelper)<this._squaredPointProximityThreshold(n.pointer)}_squaredScreenDistance(e,t,n){return y(this._toScreen(e,n),this._toScreen(t,n))}_toScreen(e,t){return x(e,t.spatialReference,u,this.view)}get test(){}};e([d({constructOnly:!0})],z.prototype,"view",void 0),e([d()],z.prototype,"options",void 0),e([d({readOnly:!0})],z.prototype,"updating",null),e([d()],z.prototype,"_loadTask",void 0),e([d()],z.prototype,"_engines",void 0),e([d()],z.prototype,"_squaredMouseProximityThreshold",null),e([d()],z.prototype,"_squaredTouchProximityThreshold",null),z=e([c("esri.views.interactive.snapping.SnappingManager")],z);const O="visualization-handle";function I(){return S.satisfiesConstraintScreenThreshold*S.satisfiesConstraintScreenThreshold}function U(e,t){return!t||null==t.direction&&null==t.distance||!(e instanceof w||e instanceof C||e instanceof T||e instanceof E||e instanceof R)&&(!(e instanceof j)||null==t.direction&&1===e.selfSnappingType)}function A(e,t){return e instanceof P?H(t,e.first)>=0&&H(t,e.second)>=0?0:-1:H(t,e)}function H(e,t){let n=-1;for(let i=0;i<e.length;++i)if(t.constraint.equals(e[i].constraint)){n=i;break}return n}function k(e){return null!=e.scenePoint}function D({coordinateHelper:e,elevationInfo:t}){return e.hasZ()?u:t}function V(e,t){t instanceof P&&(V(e,t.first),V(e,t.second)),t instanceof M&&null!=t.layer&&e.add(t)}function Z(e,t){return e instanceof P?t.constraint.equals(e.first.constraint)||t.constraint.equals(e.second.constraint):t.constraint.equals(e.constraint)}export{z as SnappingManager};
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../../core/asyncUtils.js";import n from"../../../core/Error.js";import{EventedAccessor as i}from"../../../core/Evented.js";import"../../../core/has.js";import{throwIfAborted as s,isAborted as a}from"../../../core/promiseUtils.js";import{watch as r,syncAndInitial as o,sync as p}from"../../../core/reactiveUtils.js";import{property as d,subclass as c}from"../../../core/accessorSupport/decorators.js";import{project as h,initializeProjection as l}from"../../../geometry/projectionUtils.js";import{absoluteHeightElevationInfo as u}from"../../../support/elevationInfoUtils.js";import{fromPoint as f,markAsTarget as g,toElevationAlignedDehydratedPoint as _}from"../sketch/normalizedPoint.js";import{defaults as S}from"./Settings.js";import m from"./SnappingOptions.js";import{sortCandidatesInPlace as v,squaredScreenDistance as y}from"./snappingUtils.js";import{DrapedEdgeSnappingCandidate as w}from"./candidates/DrapedEdgeSnappingCandidate.js";import{EdgeSnappingCandidate as C}from"./candidates/EdgeSnappingCandidate.js";import{IntersectionSnappingCandidate as P}from"./candidates/IntersectionSnappingCandidate.js";import{LineSnappingCandidate as T}from"./candidates/LineSnappingCandidate.js";import{ParallelLineSnappingCandidate as E}from"./candidates/ParallelLineSnappingCandidate.js";import{RightAngleSnappingCandidate as j}from"./candidates/RightAngleSnappingCandidate.js";import{RightAngleTriangleSnappingCandidate as R}from"./candidates/RightAngleTriangleSnappingCandidate.js";import{VertexSnappingCandidate as M}from"./candidates/VertexSnappingCandidate.js";import{DehydratedVertexSnappingCandidate as q}from"./candidates/dehydrated/DehydratedVertexSnappingCandidate.js";import{vectorToScreenPoint as x}from"../support/viewUtils.js";let b=class extends i{constructor(e){super(e),this.options=new m,this._engineCache=new Map,this._loadTask=null,this._engines=[],this._currentMainCandidate=null,this._currentOtherActiveCandidates=[],this._currentSnappedType=0,this._currentSpatialReference=null}initialize(){this.addHandles([r(()=>{const{distance:e,touchSensitivityMultiplier:t,effectiveSelfEnabled:n,effectiveFeatureEnabled:i,effectiveGridEnabled:s}=this.options;return{selfEnabled:n,featureEnabled:i,gridEnabled:"2d"===this.view.type&&s,viewReady:this.view.ready,viewSpatialReference:this.view.spatialReference,distance:e,touchSensitivityMultiplier:t}},(e,n)=>{n&&(this.doneSnapping(),this.emit("changed")),this._loadTask?.abort(),this._loadTask=t(t=>this._updateEngines(e,n,t))},o),r(()=>this.options,e=>{for(const t of this._engines)t.options=e},p)])}destroy(){this._loadTask?.abort(),this._destroyEngines()}get updating(){return this._engines.some(e=>e.updating)||!this._loadTask?.finished}_destroyEngines(){this._engineCache.forEach(e=>e.destroy()),this._engineCache.clear(),this._engines=[]}async _updateEngines(e,t,n){if(!e.viewReady)return void this._destroyEngines();t?.viewSpatialReference!==e.viewSpatialReference&&this._destroyEngines();const i=this._engineCache,s=await Promise.allSettled([e.featureEnabled&&!i.has("feature")?this._createFeatureSnappingEngine(n):void 0,e.selfEnabled&&!i.has("self")?this._createSelfSnappingEngine(n):void 0,e.gridEnabled&&!i.has("grid")?this._createGridSnappingEngine(n):void 0]);if(n.aborted)for(const a of s)"fulfilled"===a.status&&a.value?.engine.destroy();else{for(const e of s)"fulfilled"===e.status&&e.value&&i.set(e.value.type,e.value.engine);this._engines=Array.from(i.values())}}async _createSelfSnappingEngine(e){const{SelfSnappingEngine:t}=await import("./SelfSnappingEngine.js");return s(e),{type:"self",engine:new t({view:this.view,options:this.options})}}async _createGridSnappingEngine(e){const{view:t}=this;if("2d"!==t.type)return;const{GridSnappingEngine:n}=await import("./GridSnappingEngine.js");return s(e),{type:"grid",engine:new n({view:t,options:this.options})}}async _createFeatureSnappingEngine(e){const{FeatureSnappingEngine:t}=await import("./FeatureSnappingEngine.js");s(e);const{view:n,options:i}=this,{spatialReference:a}=n;return{type:"feature",engine:new t({view:n,options:i,spatialReference:a})}}get _squaredMouseProximityThreshold(){return this.options.distance*this.options.distance}get _squaredTouchProximityThreshold(){const{distance:e,touchSensitivityMultiplier:t}=this.options,n=e*t;return n*n}getVertexCandidates(){const e=this._currentSpatialReference;if(!e)return[];const t=new Set;this._currentMainCandidate&&D(t,this._currentMainCandidate);for(const n of this._currentOtherActiveCandidates)D(t,n);return Array.from(t).map(t=>new q(t.objectId,t.layer,t.originalTargetPoint,e))}snap(e){return U(e)?this._snapMultiPoint(e):this._snapSinglePoint(e)}update(e){const{point:t,context:i}=e;this._removeVisualization();const s=this._currentMainCandidate;if(null==s)return t;const a=this._selectUpdateInput(e);if(null==a)return t;const{spatialReference:r}=i;if(!r.equals(this._currentSpatialReference))throw new n("snapping:mismatched-spatial-reference","Cannot update with the given spatial reference, as the current snapping candidates are in a different spatial reference.");const o=h(a,r);if(null==o)return t;const{view:p}=this,{elevationInfo:d,visualizer:c}=i,l=[],u=f(o,p,d),S=s.constraint.closestTo(u);if(!this._arePointsWithinScreenThreshold(u,S,i)||!I(s,i.drawConstraints))return this._resetSnappingState(),t;s.targetPoint=g(S),l.push(...s.hints);for(const n of this._currentOtherActiveCandidates)I(n,i.drawConstraints)&&!V(s,n)&&(n.targetPoint=g(S),l.push(...n.hints));return null!=c&&this.addHandles(c.draw(l,{spatialReference:r,elevationInfo:k(i),view:p,selfSnappingZ:i.selfSnappingZ}),z),_(S,p,t,i)}doneSnapping(){this._removeVisualization(),this._resetSnappingState()}_selectUpdateInput({point:e,scenePoint:t}){switch(this._currentSnappedType){case 0:return e;case 1:return t}}_resetSnappingState(){this._currentMainCandidate=null,this._currentOtherActiveCandidates=[],this._currentSnappedType=0,this._currentSpatialReference=null}_removeVisualization(){this.removeHandles(z)}async _snapSinglePoint({point:e,context:t,signal:n}){const{view:i}=this,{elevationInfo:s}=t,a=f(e,i,s),r=await this._fetchCandidates(a,3,t,n);return this._createSnapResult(a,0,r,i,e,t,n)}async _snapMultiPoint({point:e,scenePoint:t,context:n,signal:i}){const{view:s}=this,{coordinateHelper:a,elevationInfo:r,spatialReference:o}=n;await l(t.spatialReference,o);const p=h(t,o),d=f(p,s,r),c=await this._fetchCandidates(d,1,n,i);if(c.length>0){const e=await this._fetchCandidates(d,2,n,i);return this._createSnapResult(d,1,[...c,...e],s,p,n,i)}const u=f(e,s,r),g=await this._fetchCandidates(u,2,n,i);return this._createSnapResult(u,0,g,s,{z:a.hasZ()&&e.hasZ?e.z??0:void 0,m:a.hasM()&&e.hasM?e.m??0:void 0},n,i)}async _fetchCandidates(e,t,n,i){return(await Promise.all(this._engines.map(s=>s.fetchCandidates(e,t,n,i)))).flat()}_createSnapResult(e,t,n,i,s,r,o){return{get valid(){return!a(o)},apply:()=>{const{spatialReference:a}=r,{snappedPoint:o,hints:p}=this._processCandidates(e,t,n,r);return this._removeVisualization(),null!=r.visualizer&&this.addHandles(r.visualizer.draw(p,{spatialReference:a,elevationInfo:u,view:i,selfSnappingZ:r.selfSnappingZ}),z),_(o,i,s,r)}}}_processCandidates(e,t,n,i){if(n.length<1)return this.doneSnapping(),{snappedPoint:e,hints:[]};this._currentSnappedType!==t&&this._resetSnappingState(),v(e,n);const s=this._currentMainCandidate;if(null!=s){const a=A(s,n);if(a>=0){if(!(n[a]instanceof P))return this._intersectWithOtherCandidates(a,n,e,t,i);if(this._arePointsWithinScreenThreshold(e,s.targetPoint,i))return this._updateSnappingCandidate(s,t,n,i)}}return this._intersectWithOtherCandidates(0,n,e,t,i)}_intersectWithOtherCandidates(e,t,n,i,s){const{coordinateHelper:a}=s,r=t[e],o=[];for(let p=0;p<t.length;++p){if(p===e)continue;const i=t[p],s=r.constraint.intersect(i.constraint);if(s)for(const e of s.closestPoints(r.targetPoint))o.push([new P(g(e),r,i,i.isDraped),this._squaredScreenDistance(n,e,a)])}return o.length>0&&(o.sort((e,t)=>e[1]-t[1]),o[0][1]<this._squaredPointProximityThreshold(s.pointer))?this._updateSnappingCandidate(o[0][0],i,t,s):I(r,s.drawConstraints)?this._updateSnappingCandidate(r,i,t,s):{snappedPoint:n,hints:[]}}_updateSnappingCandidate(e,t,n,i){this.doneSnapping(),this._currentMainCandidate=e,this._currentSnappedType=t,this._currentSpatialReference=i.spatialReference;const s=this._currentMainCandidate.targetPoint,a=[];a.push(...e.hints);for(const r of n){if(V(e,r)){this._currentOtherActiveCandidates.push(r);continue}const t=r.constraint.closestTo(s);this._squaredScreenDistance(t,s,i.coordinateHelper)<O()&&(r.targetPoint=s,this._currentOtherActiveCandidates.push(r),a.push(...r.hints))}return{snappedPoint:s,hints:a}}_squaredPointProximityThreshold(e){return"touch"===e?this._squaredTouchProximityThreshold:this._squaredMouseProximityThreshold}_arePointsWithinScreenThreshold(e,t,n){return this._squaredScreenDistance(e,t,n.coordinateHelper)<this._squaredPointProximityThreshold(n.pointer)}_squaredScreenDistance(e,t,n){return y(this._toScreen(e,n),this._toScreen(t,n))}_toScreen(e,t){return x(e,t.spatialReference,u,this.view)}get test(){}};e([d({constructOnly:!0})],b.prototype,"view",void 0),e([d()],b.prototype,"options",void 0),e([d({readOnly:!0})],b.prototype,"updating",null),e([d()],b.prototype,"_loadTask",void 0),e([d()],b.prototype,"_engines",void 0),e([d()],b.prototype,"_squaredMouseProximityThreshold",null),e([d()],b.prototype,"_squaredTouchProximityThreshold",null),b=e([c("esri.views.interactive.snapping.SnappingManager")],b);const z="visualization-handle";function O(){return S.satisfiesConstraintScreenThreshold*S.satisfiesConstraintScreenThreshold}function I(e,t){return!t||null==t.direction&&null==t.distance||!(e instanceof w||e instanceof C||e instanceof T||e instanceof E||e instanceof R)&&(!(e instanceof j)||null==t.direction&&1===e.selfSnappingType)}function A(e,t){return e instanceof P?H(t,e.first)>=0&&H(t,e.second)>=0?0:-1:H(t,e)}function H(e,t){let n=-1;for(let i=0;i<e.length;++i)if(t.constraint.equals(e[i].constraint)){n=i;break}return n}function U(e){return null!=e.scenePoint}function k({coordinateHelper:e,elevationInfo:t}){return e.hasZ()?u:t}function D(e,t){t instanceof P&&(D(e,t.first),D(e,t.second)),t instanceof M&&null!=t.layer&&e.add(t)}function V(e,t){return e instanceof P?t.constraint.equals(e.first.constraint)||t.constraint.equals(e.second.constraint):t.constraint.equals(e.constraint)}export{b as SnappingManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{toDehydratedPoint as t}from"../../../sketch/normalizedPoint.js";class o{constructor(o,r,s,i){this.objectId=o,this.layer=r,this.targetPoint=t(s,i)}}export{o as DehydratedVertexSnappingCandidate};
2
+ import{createDehydratedPoint as t}from"../../../sketch/normalizedPoint.js";class o{constructor(o,r,s,i){this.objectId=o,this.layer=r,this.targetPoint=t(s,i)}}export{o as DehydratedVertexSnappingCandidate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{createScalar as e}from"../../../../core/quantity.js";import{property as i,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{getLongitudeLatitude as s}from"../../../../geometry/support/pointUtils.js";import{makeLongitudeField as l,makeLatitudeField as a,makeXField as r,makeYField as n,makeElevationField as u}from"../fields/fields.js";import{createGeographicCoordinate as c}from"../fields/parsingAndFormattingUtils.js";import{elevationFromPoint as h}from"../../../support/euclideanLengthMeasurementUtils.js";import{supportsGeodesicMeasurement as p}from"../../../support/geodesicMeasurementUtils.js";const g=g=>{const d=g;let m=class extends d{constructor(){super(...arguments),this.longitude=l(),this.latitude=a(),this.x=r(),this.y=n(),this.elevation=u(),this.geographic=!1}get effectiveX(){return this.geographic?this.longitude:this.x}get effectiveY(){return this.geographic?this.latitude:this.y}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic}}setLocationFromPoint(t,i=t?.spatialReference){if(this.geographic=!!i&&p(i),null==t)return this._setActualLonLat(null,null),void this._setActualXY(null,null);if(this.geographic){const e=s(t,f);this._setActualLonLat(c(e?.[0]),c(e?.[1]))}else this._setActualXY(e(t.x),e(t.y))}setElevationFromPoint(t,e){const{elevation:i}=this;i.actual=h(t),i.visible=e.hasZ,i.readOnly=!1,i.showAsZ=!0}_setActualLonLat(t,e){this.longitude.actual=t,this.latitude.actual=e}_setActualXY(t,e){this.x.actual=t,this.y.actual=e}};return t([i()],m.prototype,"geographic",void 0),t([i()],m.prototype,"effectiveX",null),t([i()],m.prototype,"effectiveY",null),t([i()],m.prototype,"key",null),m=t([o("esri.views.interactive.tooltip.infos.TooltipInfoWithCoordinates")],m),m},f=[0,0];export{g as TooltipInfoWithCoordinates};
2
+ import{__decorate as t}from"tslib";import{createScalar as e}from"../../../../core/quantity.js";import{property as i,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{getLongitudeLatitude as s}from"../../../../geometry/support/pointUtils.js";import{makeLongitudeField as r,makeLatitudeField as l,makeXField as a,makeYField as n,makeElevationField as u}from"../fields/fields.js";import{createGeographicCoordinate as c}from"../fields/parsingAndFormattingUtils.js";import{elevationFromPoint as h}from"../../../support/euclideanLengthMeasurementUtils.js";import{autoMeasurementMode as p}from"../../../support/measurementWorkerUtils.js";const g=g=>{const m=g;let d=class extends m{constructor(){super(...arguments),this.longitude=r(),this.latitude=l(),this.x=a(),this.y=n(),this.elevation=u(),this.geographic=!1}get effectiveX(){return this.geographic?this.longitude:this.x}get effectiveY(){return this.geographic?this.latitude:this.y}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic}}setLocationFromPoint(t,i=t?.spatialReference){if(this.geographic=0===p(i),null==t)return this._setActualLonLat(null,null),void this._setActualXY(null,null);if(this.geographic){const e=s(t,f);this._setActualLonLat(c(e?.[0]),c(e?.[1]))}else this._setActualXY(e(t.x),e(t.y))}setElevationFromPoint(t,e){const{elevation:i}=this;i.actual=h(t),i.visible=e.hasZ,i.readOnly=!1,i.showAsZ=!0}_setActualLonLat(t,e){this.longitude.actual=t,this.latitude.actual=e}_setActualXY(t,e){this.x.actual=t,this.y.actual=e}};return t([i()],d.prototype,"geographic",void 0),t([i()],d.prototype,"effectiveX",null),t([i()],d.prototype,"effectiveY",null),t([i()],d.prototype,"key",null),d=t([o("esri.views.interactive.tooltip.infos.TooltipInfoWithCoordinates")],d),d},f=[0,0];export{g as TooltipInfoWithCoordinates};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{max as e,createLength as t,createArea as r}from"../../core/quantity.js";import{deriveLengthUnitFromAreaUnit as o}from"../../core/units.js";import{set as n,scale as i,normalize as s,cross as a,subtract as c,dot as m,add as f}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isEarth as u,isSphericalECEF as l}from"../../geometry/ellipsoidUtils.js";import g from"../../geometry/Point.js";import y from"../../geometry/Polygon.js";import O from"../../geometry/Polyline.js";import{projectWithoutEngine as h}from"../../geometry/projectionUtils.js";import S from"../../geometry/SpatialReference.js";import{WGS84ECEFSpatialReference as J,getSphericalPCPF as N,SphericalECEFSpatialReference as d}from"../../geometry/spatialReferenceEllipsoidUtils.js";import{e as j}from"../../chunks/areaOperator.js";import{e as R}from"../../chunks/centroidOperator.js";import{e as w}from"../../chunks/distanceOperator.js";import{l as k,e as v}from"../../chunks/geodeticAreaOperator.js";import{load as U,execute as x}from"../../geometry/operators/geodeticDistanceOperator.js";import{l as L,e as P}from"../../chunks/geodeticLengthOperator.js";import{e as M}from"../../chunks/lengthOperator.js";import{e as b}from"../../chunks/simplifyOperator.js";import{projectDirection as C}from"../../geometry/projection/projectDirection.js";import{isWGS84 as q,isWebMercator as z,isCGCS2000 as E,equals as Z}from"../../geometry/support/spatialReferenceUtils.js";import{makeOrthonormal as D}from"../3d/support/mathUtils.js";import{autoMeasurementMode as W}from"./measurementWorkerUtils.js";async function $({geometryJSON:e,options:t}){await Promise.allSettled([k(),t?.returnLength?L():void 0]);const n=B(e,t),i=t?.unit??"square-meters",s=b(n)??n,a=v(s,{unit:i,...t}),c=r(a,i),m=t?.lengthUnit??o(i);return{area:c,centroid:t?.returnCentroid?F(s).toJSON():void 0,length:t?.returnLength?await G(s,{unit:m}):void 0}}function A(){k(),L(),U()}function B(e,t){const r="rings"in e?y.fromJSON(e):O.fromJSON(e);if(t?.stagedPoint){const e=g.fromJSON(t.stagedPoint),o=("rings"in r?r.rings:r.paths).at(-1);if(o){const{x:t,y:n,z:i,m:s}=e,a=r.hasZ&&r.hasM?[t,n,i??0,s??0]:r.hasZ?[t,n,i??0]:r.hasM?[t,n,s??0]:[t,n];o.push(a)}}return r}function F(e){return R(e)}async function G(e,r){await L();const o=r?.unit??"meters";return t(P(e,{...r,unit:o}),o)}function H({geometryJSON:e,options:t}){return G(B(e,t),t)}async function I({geometry1JSON:e,geometry2JSON:r,options:o}){await U();const n=g.fromJSON(e),i=g.fromJSON(r),s=o?.unit??"meters";return t(x(n,i,{...o,unit:s}),s)}function K({geometryJSON:e,options:t}){return Q(B(e,t),t)}function Q(e,t){const n=t?.unit??"square-meters",i=t?.lengthUnit??o(n),s=b(e)??e,a=j(s,{unit:n,...t});return{area:r(a,n),centroid:t?.returnCentroid?F(s).toJSON():void 0,length:t?.returnLength?T(s,{unit:i}):void 0}}function T(e,r){const o=r?.unit??"meters";return t(M(e,{...r,unit:o}),o)}function V({geometryJSON:e,options:t}){return T(B(e,t),t)}function X({geometry1JSON:e,geometry2JSON:r,options:o}){const n=g.fromJSON(e),i=g.fromJSON(r),s=o?.unit??"meters";return t(w(n,i,{...o,unit:s}),s)}async function Y(e){return re(e.geometryJSON.spatialReference,$,K)(e)}async function _(e){return re(e.geometryJSON.spatialReference,H,V)(e)}async function ee(e){return re(e.geometry1JSON.spatialReference,I,X)(e)}async function te(t){const r=re(t.topLeftJSON.spatialReference,I,X),{topLeftJSON:o,topRightJSON:n,bottomRightJSON:i,bottomLeftJSON:s,options:a}=t,[c,m,f,p]=await Promise.all([r({geometry1JSON:s,geometry2JSON:i,options:a}),r({geometry1JSON:o,geometry2JSON:n,options:a}),r({geometry1JSON:i,geometry2JSON:n,options:a}),r({geometry1JSON:s,geometry2JSON:o,options:a})]);return{width:e(c,m),height:e(p,f)}}function re(e,t,r){switch(W(e)){case 0:return t;case 1:return r}}function oe(e){const{geometryJSON:t}=e,r=ae(t.spatialReference);if(!r)throw new Error("Cannot compute horizontal area without a valid spatial reference.");switch(r.mode){case 0:return K(e);case 1:return ne(r,e)}}function ne(e,{geometryJSON:t,options:r}){const o=B(t,r),n=fe,i=ce,s=me,a=Z(o.spatialReference,e.spatialReference)?o.clone():h(o,o.spatialReference,e.spatialReference);if(!a)throw new Error(`Cannot project geometry from ${o.spatialReference?.wkid??"unknown"} to ${e.spatialReference.wkid}.`);se(a,n,i,s);const{area:c,centroid:m,length:f}=Q(a,r);return{area:c,centroid:ie(m,n,i,s,e.spatialReference,o.spatialReference),length:f}}function ie(e,t,r,o,n,s){if(!e)return e;i(r,r,e.x),i(o,o,e.y);const a=pe;return f(a,r,o),f(a,a,t),e.x=a[0],e.y=a[1],e.z=a[2],e.spatialReference=n,h(e,e.spatialReference,s)?.toJSON()??void 0}function se(e,t,r,o){let f=0;n(t,0,0,0);for(const n of e.rings)for(const e of n)t[0]+=e[0],t[1]+=e[1],t[2]+=e[2],f++;i(t,t,1/f);const p=ue;s(p,t);const u=le,l=Math.atan2(p[1],p[0]);n(u,-Math.sin(l),Math.cos(l),0),Z(e.spatialReference,J)&&(C(t,p,d,p,e.spatialReference),C(t,u,d,u,e.spatialReference)),D(u,p,r),a(o,r,p);const g=pe;for(const i of e.rings)for(const e of i){n(g,e[0],e[1],e[2]),c(g,g,t);const i=m(r,g),s=m(o,g);e[0]=i,e[1]=s}e.hasZ=!1,e.spatialReference=S.WebMercator}function ae(e){return e?u(e)?q(e)||z(e)||E(e)||l(e)||Z(e,J)?{mode:1,spatialReference:J}:{mode:0,spatialReference:e}:{mode:1,spatialReference:N(e)}:null}const ce=p(),me=p(),fe=p(),pe=p(),ue=p(),le=p();export{K as area2D,oe as areaHorizontal,Y as autoArea2D,ee as autoDistance2DBetweenPoints,_ as autoLength2D,te as autoSize2D,X as distance2DBetweenPoints,$ as geodeticArea,I as geodeticDistanceBetweenPoints,H as geodeticLength,V as length2D,A as preloadGeodetic};
2
+ import{max as e,createLength as t,createArea as o}from"../../core/quantity.js";import{deriveLengthUnitFromAreaUnit as r}from"../../core/units.js";import{set as n,scale as i,normalize as s,cross as a,subtract as c,dot as m,add as f}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isEarth as u,isSphericalECEF as l}from"../../geometry/ellipsoidUtils.js";import g from"../../geometry/Multipoint.js";import y from"../../geometry/Point.js";import h from"../../geometry/Polygon.js";import O from"../../geometry/Polyline.js";import{projectWithoutEngine as S}from"../../geometry/projectionUtils.js";import J from"../../geometry/SpatialReference.js";import{WGS84ECEFSpatialReference as N,getSphericalPCPF as d,SphericalECEFSpatialReference as j}from"../../geometry/spatialReferenceEllipsoidUtils.js";import{e as R}from"../../chunks/areaOperator.js";import{e as w}from"../../chunks/centroidOperator.js";import{e as k}from"../../chunks/distanceOperator.js";import{l as v,e as P}from"../../chunks/geodeticAreaOperator.js";import{load as U,execute as x}from"../../geometry/operators/geodeticDistanceOperator.js";import{l as L,e as M}from"../../chunks/geodeticLengthOperator.js";import{e as b}from"../../chunks/lengthOperator.js";import{e as C}from"../../chunks/simplifyOperator.js";import{projectDirection as E}from"../../geometry/projection/projectDirection.js";import{isWGS84 as q,isWebMercator as z,isCGCS2000 as Z,equals as D}from"../../geometry/support/spatialReferenceUtils.js";import{makeOrthonormal as W}from"../3d/support/mathUtils.js";import{autoMeasurementMode as $}from"./measurementWorkerUtils.js";async function A({geometryJSON:e,options:t}){await Promise.allSettled([v(),t?.returnLength?L():void 0]);const n=B(e,t),i=t?.unit??"square-meters",s=C(n)??n,a=P(s,{unit:i,...t}),c=o(a,i),m=t?.lengthUnit??r(i);return{area:c,centroid:t?.returnCentroid?F(s).toJSON():void 0,length:t?.returnLength?await G(s,{unit:m}):void 0}}function I(){v(),L(),U()}function B(e,t){const o="rings"in e?h.fromJSON(e):O.fromJSON(e);if(t?.stagedPoint){const e=y.fromJSON(t.stagedPoint),r=("rings"in o?o.rings:o.paths).at(-1);if(r){const{x:t,y:n,z:i,m:s}=e,a=o.hasZ&&o.hasM?[t,n,i??0,s??0]:o.hasZ?[t,n,i??0]:o.hasM?[t,n,s??0]:[t,n];r.push(a)}}return o}function F(e){return w(e)}async function G(e,o){await L();const r=o?.unit??"meters";return t(M(e,{...o,unit:r}),r)}function H({geometryJSON:e,options:t}){return G(B(e,t),t)}async function K({geometry1JSON:e,geometry2JSON:o,options:r}){await U();const n=y.fromJSON(e),i=y.fromJSON(o),s=r?.unit??"meters";return t(x(n,i,{...r,unit:s}),s)}async function Q({geometry1JSON:e,geometry2JSON:o,options:r}){await U();const n=g.fromJSON(e),i=g.fromJSON(o);if(n.points.length!==i.points.length)throw new Error("Input multipoints must have the same number of points.");const s=n.points.length,a=r?.unit??"meters",c=[],m={...r,unit:a};for(let f=0;f<s;f++){const e=n.getPoint(f),o=i.getPoint(f);c.push(null!=e&&null!=o?t(x(e,o,m),a):null)}return c}function T({geometryJSON:e,options:t}){return V(B(e,t),t)}function V(e,t){const n=t?.unit??"square-meters",i=t?.lengthUnit??r(n),s=C(e)??e,a=R(s,{unit:n,...t});return{area:o(a,n),centroid:t?.returnCentroid?F(s).toJSON():void 0,length:t?.returnLength?X(s,{unit:i}):void 0}}function X(e,o){const r=o?.unit??"meters";return t(b(e,{...o,unit:r}),r)}function Y({geometryJSON:e,options:t}){return X(B(e,t),t)}function _({geometry1JSON:e,geometry2JSON:o,options:r}){const n=y.fromJSON(e),i=y.fromJSON(o),s=r?.unit??"meters";return t(k(n,i,{...r,unit:s}),s)}async function ee(e){return ne(e.geometryJSON.spatialReference,A,T)(e)}async function te(e){return ne(e.geometryJSON.spatialReference,H,Y)(e)}async function oe(e){return ne(e.geometry1JSON.spatialReference,K,_)(e)}async function re(t){const o=ne(t.topLeftJSON.spatialReference,K,_),{topLeftJSON:r,topRightJSON:n,bottomRightJSON:i,bottomLeftJSON:s,options:a}=t,[c,m,f,p]=await Promise.all([o({geometry1JSON:s,geometry2JSON:i,options:a}),o({geometry1JSON:r,geometry2JSON:n,options:a}),o({geometry1JSON:i,geometry2JSON:n,options:a}),o({geometry1JSON:s,geometry2JSON:r,options:a})]);return{width:e(c,m),height:e(p,f)}}function ne(e,t,o){switch($(e)){case 0:return t;case 1:return o}}function ie(e){const{geometryJSON:t}=e,o=me(t.spatialReference);if(!o)throw new Error("Cannot compute horizontal area without a valid spatial reference.");switch(o.mode){case 0:return T(e);case 1:return se(o,e)}}function se(e,{geometryJSON:t,options:o}){const r=B(t,o),n=ue,i=fe,s=pe,a=D(r.spatialReference,e.spatialReference)?r.clone():S(r,r.spatialReference,e.spatialReference);if(!a)throw new Error(`Cannot project geometry from ${r.spatialReference?.wkid??"unknown"} to ${e.spatialReference.wkid}.`);ce(a,n,i,s);const{area:c,centroid:m,length:f}=V(a,o);return{area:c,centroid:ae(m,n,i,s,e.spatialReference,r.spatialReference),length:f}}function ae(e,t,o,r,n,s){if(!e)return e;i(o,o,e.x),i(r,r,e.y);const a=le;return f(a,o,r),f(a,a,t),e.x=a[0],e.y=a[1],e.z=a[2],e.spatialReference=n,S(e,e.spatialReference,s)?.toJSON()??void 0}function ce(e,t,o,r){let f=0;n(t,0,0,0);for(const n of e.rings)for(const e of n)t[0]+=e[0],t[1]+=e[1],t[2]+=e[2],f++;i(t,t,1/f);const p=ge;s(p,t);const u=ye,l=Math.atan2(p[1],p[0]);n(u,-Math.sin(l),Math.cos(l),0),D(e.spatialReference,N)&&(E(t,p,j,p,e.spatialReference),E(t,u,j,u,e.spatialReference)),W(u,p,o),a(r,o,p);const g=le;for(const i of e.rings)for(const e of i){n(g,e[0],e[1],e[2]),c(g,g,t);const i=m(o,g),s=m(r,g);e[0]=i,e[1]=s}e.hasZ=!1,e.spatialReference=J.WebMercator}function me(e){return e?u(e)?q(e)||z(e)||Z(e)||l(e)||D(e,N)?{mode:1,spatialReference:N}:{mode:0,spatialReference:e}:{mode:1,spatialReference:d(e)}:null}const fe=p(),pe=p(),ue=p(),le=p(),ge=p(),ye=p();export{T as area2D,ie as areaHorizontal,ee as autoArea2D,oe as autoDistance2DBetweenPoints,te as autoLength2D,re as autoSize2D,_ as distance2DBetweenPoints,A as geodeticArea,K as geodeticDistanceBetweenPoints,Q as geodeticDistanceBetweenPointsMany,H as geodeticLength,Y as length2D,I as preloadGeodetic};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ignoreAbortErrors as t}from"../../core/promiseUtils.js";import{WorkerHandle as e}from"../../core/workers/WorkerHandle.js";import o from"../../geometry/Point.js";class n extends e{constructor(t){super("MeasurementWorker","geodeticArea",{},void 0,{strategy:"distributed"}),t?.preloadGeodetic&&this._preloadGeodetic()}async geodeticArea(t,e,n){const i=t.toJSON(),{area:r,centroid:a,length:s}=await this.invokeMethod("geodeticArea",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:a?o.fromJSON(a):void 0,length:s}}geodeticLength(t,e,o){const n=t.toJSON();return this.invokeMethod("geodeticLength",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}geodeticDistanceBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("geodeticDistanceBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}_preloadGeodetic(){t(this.broadcast(void 0,"preloadGeodetic"))}async area2D(t,e,n){const i=t.toJSON(),{area:r,centroid:a,length:s}=await this.invokeMethod("area2D",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:a?o.fromJSON(a):void 0,length:s}}length2D(t,e,o){const n=t.toJSON();return this.invokeMethod("length2D",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}distance2DBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("distance2DBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}async areaHorizontal(t,e,n){const i=t.toJSON(),{area:r,centroid:a,length:s}=await this.invokeMethod("areaHorizontal",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:a?o.fromJSON(a):void 0,length:s}}async autoArea2D(t,e,n){const i=t.toJSON(),{area:r,centroid:a,length:s}=await this.invokeMethod("autoArea2D",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:a?o.fromJSON(a):void 0,length:s}}async autoLength2D(t,e,o){const n=t.toJSON();return this.invokeMethod("autoLength2D",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}autoDistance2DBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("autoDistance2DBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}autoSize2D(t,e,o,n,i,r){const a=t.toJSON(),s=e.toJSON(),d=o.toJSON(),g=n.toJSON();return this.invokeMethod("autoSize2D",{topLeftJSON:a,topRightJSON:s,bottomRightJSON:d,bottomLeftJSON:g,options:i},r)}}export{n as MeasurementWorkerHandle};
2
+ import{ignoreAbortErrors as t}from"../../core/promiseUtils.js";import{WorkerHandle as e}from"../../core/workers/WorkerHandle.js";import o from"../../geometry/Point.js";class n extends e{constructor(t){super("MeasurementWorker","geodeticArea",{},void 0,{strategy:"distributed"}),t?.preloadGeodetic&&this._preloadGeodetic()}async geodeticArea(t,e,n){const i=t.toJSON(),{area:r,centroid:s,length:a}=await this.invokeMethod("geodeticArea",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:s?o.fromJSON(s):void 0,length:a}}geodeticLength(t,e,o){const n=t.toJSON();return this.invokeMethod("geodeticLength",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}geodeticDistanceBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("geodeticDistanceBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}geodeticDistanceBetweenPointsMany(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("geodeticDistanceBetweenPointsMany",{geometry1JSON:i,geometry2JSON:r,options:o},n)}_preloadGeodetic(){t(this.broadcast(void 0,"preloadGeodetic"))}async area2D(t,e,n){const i=t.toJSON(),{area:r,centroid:s,length:a}=await this.invokeMethod("area2D",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:s?o.fromJSON(s):void 0,length:a}}length2D(t,e,o){const n=t.toJSON();return this.invokeMethod("length2D",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}distance2DBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("distance2DBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}async areaHorizontal(t,e,n){const i=t.toJSON(),{area:r,centroid:s,length:a}=await this.invokeMethod("areaHorizontal",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:s?o.fromJSON(s):void 0,length:a}}async autoArea2D(t,e,n){const i=t.toJSON(),{area:r,centroid:s,length:a}=await this.invokeMethod("autoArea2D",{geometryJSON:i,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},n);return{area:r,centroid:s?o.fromJSON(s):void 0,length:a}}async autoLength2D(t,e,o){const n=t.toJSON();return this.invokeMethod("autoLength2D",{geometryJSON:n,options:{...e,stagedPoint:e?.stagedPoint?.toJSON()}},o)}autoDistance2DBetweenPoints(t,e,o,n){const i=t.toJSON(),r=e.toJSON();return this.invokeMethod("autoDistance2DBetweenPoints",{geometry1JSON:i,geometry2JSON:r,options:o},n)}autoSize2D(t,e,o,n,i,r){const s=t.toJSON(),a=e.toJSON(),d=o.toJSON(),g=n.toJSON();return this.invokeMethod("autoSize2D",{topLeftJSON:s,topRightJSON:a,bottomRightJSON:d,bottomLeftJSON:g,options:i},r)}}export{n as MeasurementWorkerHandle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{isGeographic as e,isWebMercator as r}from"../../geometry/support/spatialReferenceUtils.js";function t(t){return e(t)||r(t)?0:1}export{t as autoMeasurementMode};
2
+ import{isGeographic as e,isWebMercator as t}from"../../geometry/support/spatialReferenceUtils.js";const r=1e5;function o(r){return e(r)||t(r)?0:1}export{o as autoMeasurementMode,r as geodeticDistanceThresholdMeters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{DrawArraysRequiresIndicesTypeReset as s}from"./testAppleAmdDrawArrays.js";import{FloatBufferBlend as e}from"./testFloatBufferBlend.js";import{SVGPremultipliedAlpha as t}from"./testSVGPremultipliedAlpha.js";class r{constructor(r){this.rctx=r,this.floatBufferBlend=new e(r),this.svgPremultipliesAlpha=new t(r),this.drawArraysRequiresIndicesTypeReset=new s(r)}dispose(){this.svgPremultipliesAlpha.dispose(),this.floatBufferBlend.dispose(),this.drawArraysRequiresIndicesTypeReset.dispose()}}export{r as WebGLDriverTest};
2
+ import{FloatBufferBlend as s}from"./testFloatBufferBlend.js";import{SVGPremultipliedAlpha as t}from"./testSVGPremultipliedAlpha.js";class e{constructor(e){this.rctx=e,this.floatBufferBlend=new s(e),this.svgPremultipliesAlpha=new t(e)}dispose(){this.svgPremultipliesAlpha.dispose(),this.floatBufferBlend.dispose()}}export{e as WebGLDriverTest};