@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240710

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 (239) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
  6. package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
  7. package/assets/esri/core/workers/chunks/34b5bab6239c7277f854.js +1 -0
  8. package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
  9. package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
  10. package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
  11. package/assets/esri/core/workers/chunks/63eb1cc923bb8dcb3cb3.js +1 -0
  12. package/assets/esri/core/workers/chunks/{380e2654bc7e07163df0.js → 725a0eae5248a933db05.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
  14. package/assets/esri/core/workers/chunks/7baf288a07401f9e972d.js +1 -0
  15. package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
  19. package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
  20. package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
  21. package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
  22. package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
  23. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
  24. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
  25. package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
  26. package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
  27. package/assets/esri/core/workers/chunks/ee72a006e25e94a4cd4a.js +1039 -0
  28. package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
  29. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
  30. package/assets/esri/themes/dark/main.css +1 -1
  31. package/assets/esri/themes/light/main.css +1 -1
  32. package/assets/esri/themes/light/view.css +1 -1
  33. package/chunks/AtmosphereCompositing.glsl.js +6 -9
  34. package/chunks/BlendLayers.glsl.js +1 -7
  35. package/chunks/BlendWeights.glsl.js +81 -86
  36. package/chunks/Blur.glsl.js +1 -3
  37. package/chunks/ChapmanAtmosphere.glsl.js +3 -8
  38. package/chunks/CheckerBoard.glsl.js +3 -9
  39. package/chunks/Clouds.glsl.js +21 -10
  40. package/chunks/CloudsComposition.glsl.js +3 -7
  41. package/chunks/ColorMaterial.glsl.js +3 -9
  42. package/chunks/ComponentShader.glsl.js +41 -75
  43. package/chunks/Compositing.glsl.js +5 -7
  44. package/chunks/DefaultMaterial.glsl.js +68 -73
  45. package/chunks/EdgeDetect.glsl.js +29 -39
  46. package/chunks/EdgeShader.glsl.js +37 -60
  47. package/chunks/Fog.glsl.js +4 -9
  48. package/chunks/HUDCompositing.glsl.js +1 -3
  49. package/chunks/HUDMaterial.glsl.js +11 -20
  50. package/chunks/Heatmap.glsl.js +3 -11
  51. package/chunks/HeatmapDensity.glsl.js +12 -15
  52. package/chunks/HighlightApply.glsl.js +130 -174
  53. package/chunks/HighlightDownsample.glsl.js +29 -32
  54. package/chunks/ImageMaterial.glsl.js +11 -21
  55. package/chunks/LaserlinePath.glsl.js +6 -10
  56. package/chunks/Laserlines.glsl.js +8 -20
  57. package/chunks/LineCallout.glsl.js +91 -108
  58. package/chunks/LineMarker.glsl.js +62 -53
  59. package/chunks/Magnifier.glsl.js +4 -9
  60. package/chunks/MeasurementArrow.glsl.js +9 -15
  61. package/chunks/NativeLine.glsl.js +8 -12
  62. package/chunks/NoiseTextureAtlas.glsl.js +89 -86
  63. package/chunks/OITCompositing.glsl.js +8 -12
  64. package/chunks/OverlayCompositing.glsl.js +2 -4
  65. package/chunks/Path.glsl.js +31 -55
  66. package/chunks/Pattern.glsl.js +16 -20
  67. package/chunks/PointRenderer.glsl.js +39 -48
  68. package/chunks/Precipitation.glsl.js +22 -39
  69. package/chunks/RasterColorizer.glsl.js +25 -33
  70. package/chunks/RealisticTree.glsl.js +53 -65
  71. package/chunks/RibbonLine.glsl.js +31 -36
  72. package/chunks/SSAO.glsl.js +7 -10
  73. package/chunks/SSAOBlur.glsl.js +10 -14
  74. package/chunks/ShadedColorMaterial.glsl.js +12 -15
  75. package/chunks/ShadowCastAccumulate.glsl.js +6 -8
  76. package/chunks/ShadowCastVisualize.glsl.js +12 -18
  77. package/chunks/ShadowHighlight.glsl.js +49 -51
  78. package/chunks/SimpleAtmosphere.glsl.js +4 -13
  79. package/chunks/SlicePlaneMaterial.glsl.js +3 -7
  80. package/chunks/Stars.glsl.js +3 -7
  81. package/chunks/Terrain.glsl.js +20 -61
  82. package/chunks/TextureOnly.glsl.js +2 -4
  83. package/chunks/Viewshed.glsl.js +20 -38
  84. package/chunks/WaterSurface.glsl.js +34 -60
  85. package/core/accessorSupport/tracking.js +1 -1
  86. package/core/workers/registry.js +1 -1
  87. package/geometry/Circle.js +1 -1
  88. package/geometry/Polygon.js +1 -1
  89. package/geometry/Polyline.js +1 -1
  90. package/geometry/support/geodesicUtils.js +1 -1
  91. package/interfaces.d.ts +34 -4
  92. package/layers/WCSLayer.js +1 -1
  93. package/layers/mixins/ArcGISImageService.js +1 -1
  94. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  95. package/layers/support/SubtypeSublayer.js +1 -1
  96. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  97. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  98. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  99. package/package.json +3 -3
  100. package/support/revision.js +1 -1
  101. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  102. package/views/2d/engine/flow/styles/Particles.js +1 -1
  103. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  104. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  105. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  106. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  107. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  108. package/views/2d/engine/webgl/DefaultVertexAttributeLayouts.js +1 -1
  109. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  110. package/views/2d/engine/webgl/Overlay.js +1 -1
  111. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  112. package/views/2d/engine/webgl/Utils.js +1 -1
  113. package/views/2d/engine/webgl/VertexStream.js +1 -1
  114. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  115. package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
  116. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +1 -1
  117. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  118. package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +1 -1
  119. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  120. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  124. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  125. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  126. package/views/2d/layers/support/DebugOverlay.js +1 -1
  127. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  128. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  129. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  130. package/views/3d/environment/LocalAtmosphere.js +1 -1
  131. package/views/3d/environment/MarsAtmosphere.js +1 -1
  132. package/views/3d/environment/Precipitation.js +1 -1
  133. package/views/3d/environment/Stars.js +1 -1
  134. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  135. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  136. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  137. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
  138. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  139. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  140. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  141. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  142. package/views/3d/layers/StreamLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  145. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
  146. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
  147. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
  148. package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
  149. package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
  150. package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
  151. package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
  152. package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
  153. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  154. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  155. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  156. package/views/3d/terrain/OverlayRenderer.js +1 -1
  157. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  158. package/views/3d/terrain/PatchRenderData.js +1 -1
  159. package/views/3d/terrain/TerrainRenderer.js +1 -1
  160. package/views/3d/terrain/TileCompositor.js +1 -1
  161. package/views/3d/webgl/ManagedFBObject.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  163. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  164. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  165. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
  166. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  167. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
  168. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +11 -11
  170. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +1 -1
  171. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +4 -7
  172. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
  174. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +4 -4
  175. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
  176. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  177. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  178. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  179. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  180. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  181. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  182. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  183. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  184. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  185. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  186. package/views/3d/webgl-engine/effects/magnifier/MagnifierRenderNode.js +1 -1
  187. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  188. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  189. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  190. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  191. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  192. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  193. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  194. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  195. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  196. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  197. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  198. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  199. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  200. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  201. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  202. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  203. package/views/3d/webgl-engine/materials/renderers/VaoCache.js +1 -1
  204. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
  205. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  206. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +1 -1
  207. package/views/SceneView.js +1 -1
  208. package/views/draw/support/Box.js +1 -1
  209. package/views/interactive/tooltip/Tooltip.js +1 -1
  210. package/views/interactive/tooltip/fields/fields.js +1 -1
  211. package/views/webgl/RenderingContext.js +1 -1
  212. package/views/webgl/Util.js +1 -1
  213. package/views/webgl/VertexArrayObject.js +1 -1
  214. package/views/webgl/enums.js +1 -1
  215. package/views/webgl/heatmapTextureUtils.js +1 -1
  216. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  217. package/views/webgl/testFloatBufferBlend.js +1 -1
  218. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  219. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  220. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  221. package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
  222. package/widgets/FeatureForm.js +1 -1
  223. package/widgets/OrientedImageryViewer/constants.js +1 -1
  224. package/widgets/OrientedImageryViewer.js +1 -1
  225. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  226. package/widgets/UtilityNetworkTrace.js +1 -1
  227. package/widgets/support/TimezonePicker.js +1 -1
  228. package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
  229. package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
  230. package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
  231. package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
  232. package/assets/esri/core/workers/chunks/812e18c65aa6e398c338.js +0 -1
  233. package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
  234. package/assets/esri/core/workers/chunks/a7e2ca5ede46395f0787.js +0 -1
  235. package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
  236. package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
  237. package/assets/esri/core/workers/chunks/d85c51abde781660b1f5.js +0 -1
  238. package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
  239. package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{invertOrIdentity as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{NormalFromDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{PiUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{LocalFromScreenSpacePassParameters as n,LocalFromScreenSpace as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import{Rgba4FloatEncoding as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js";import{TextureAtlasLookup as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js";import{Float2PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{IntegerPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{Matrix4sPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js";import{ShaderBuilder as x}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";class b extends n{constructor(){super(...arguments),this.targetVector=[1,0,0],this.upVector=[0,0,1],this.fovs=[45,45],this.headingAndTilt=[0,0],this.shadowMap={depthTexture:null,nearFar:[1,100],numActiveFaces:1,atlasRegions:[[0,0,1,1]]},this.projectionMatrices=i.flat(),this.viewMatrices=i.flat(),this.volumeOffset=0}}function P(i){const o=new x,n=o.fragment;o.include(r),o.include(d),o.include(c),n.include(s),n.include(l),o.include(a),n.uniforms.add(new V("depthTexture",((e,i)=>i.depth?.attachment)),new g("inverseProjectionMatrix",((e,i)=>i.camera.inverseProjectionMatrix)),new g("inverseViewNormalMatrix",((i,o)=>e(F,o.camera.viewInverseTransposeMatrix))),new v("viewshedTargetVector",((e,i)=>e.targetVector)),new v("viewshedUpVector",((e,i)=>e.upVector)),new h("viewshedFOVs",((e,i)=>e.fovs)),new h("viewshedHeadingAndTilt",((e,i)=>e.headingAndTilt)),new h("viewshedNearFar",((e,i)=>e.shadowMap.nearFar??[1,100])),new w("viewshedVolumeOffset",((e,i)=>e.volumeOffset)),new V("viewshedShadowMap",(e=>e.shadowMap.depthTexture)),new u("viewshedProjectionMatrices",((e,i)=>e.projectionMatrices),6),new u("viewshedViewMatrices",((e,i)=>e.viewMatrices),6),new f("viewshedNumFaces",((e,i)=>e.shadowMap.numActiveFaces)),new m("viewshedAtlasRegions",((e,i)=>e.shadowMap.atlasRegions.flat()),24)),n.constants.add("visibleColor","vec4",[0,1,0,.5]),n.constants.add("occludedColor","vec4",[1,0,0,.5]);const b=i.hasNormals;return b?(n.uniforms.add(new V("normalMap",((e,i)=>e.normals))),n.code.add(p`vec3 normalFromTexture() {
5
+ import{invertOrIdentity as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{NormalFromDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{LocalFromScreenSpacePassParameters as n,localFromScreenSpace as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import{Rgba4FloatEncoding as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js";import{TextureAtlasLookup as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js";import{Float2PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{IntegerPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{Matrix4sPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js";import{ShaderBuilder as x}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";class b extends n{constructor(){super(...arguments),this.shadowMap={depthTexture:null,nearFar:[1,100],numActiveFaces:1,atlasRegions:[[0,0,1,1]]},this.targetVector=[1,0,0],this.upVector=[0,0,1],this.fovs=[45,45],this.headingAndTilt=[0,0],this.projectionMatrices=i.flat(),this.viewMatrices=i.flat(),this.volumeOffset=0}}function P(i){const o=new x,n=o.fragment;o.include(r),o.include(d),o.include(c),n.include(a),n.include(l),o.include(s),n.uniforms.add(new V("depthTexture",((e,i)=>i.depth?.attachment)),new g("inverseProjectionMatrix",((e,i)=>i.camera.inverseProjectionMatrix)),new g("inverseViewNormalMatrix",((i,o)=>e(F,o.camera.viewInverseTransposeMatrix))),new v("viewshedTargetVector",(e=>e.targetVector)),new v("viewshedUpVector",(e=>e.upVector)),new h("viewshedFOVs",(e=>e.fovs)),new h("viewshedHeadingAndTilt",(e=>e.headingAndTilt)),new h("viewshedNearFar",(e=>e.shadowMap.nearFar??[1,100])),new w("viewshedVolumeOffset",(e=>e.volumeOffset)),new V("viewshedShadowMap",(e=>e.shadowMap.depthTexture)),new u("viewshedProjectionMatrices",(e=>e.projectionMatrices),6),new u("viewshedViewMatrices",(e=>e.viewMatrices),6),new m("viewshedNumFaces",(e=>e.shadowMap.numActiveFaces)),new f("viewshedAtlasRegions",(e=>e.shadowMap.atlasRegions.flat()),24)),n.constants.add("visibleColor","vec4",[0,1,0,.5]),n.constants.add("occludedColor","vec4",[1,0,0,.5]);const b=i.hasNormals;return b?(n.uniforms.add(new V("normalMap",((e,i)=>e.normals))),n.code.add(p`vec3 normalFromTexture() {
6
6
  vec4 norm4 = texture(normalMap, uv);
7
7
  vec3 nNormal = vec3(-1.0) + 2.0 * norm4.xyz;
8
8
  return normalize((inverseViewNormalMatrix * vec4(nNormal, 1.0)).xyz);
@@ -170,40 +170,22 @@ return normalize((inverseViewNormalMatrix * vec4(nNormal, 1.0)).xyz);
170
170
 
171
171
  vec3 viewingDir = normalize(localPosition);
172
172
  return dot(normal, viewingDir);
173
- }
174
-
175
- void main() {
176
- float depth = depthFromTexture(depthTexture, uv);
177
-
178
- // Outside camera planes
179
- if (depth >= 1.0 || depth <= 0.0) {
180
- return;
181
- }
182
-
183
- float linearDepth = linearizeDepth(depth);
184
-
185
- // Relative to viewshed position
186
- vec4 localPosition = reconstructLocalPosition(gl_FragCoord.xy, linearDepth);
187
-
188
- ViewshedPoint point;
189
- bool foundFace = getViewshedPoint(localPosition, point);
190
-
191
- // Outside every viewshed
192
- if (!foundFace || !point.isWithin) {
193
- return;
194
- }
195
-
196
- float viewshedDepth = getDepthFromShadowMap(point.uv, point.face);
197
- float distance = point.orthographicDepth;
198
-
199
- bool visible = distance < viewshedDepth;
200
- fragColor = visible ? visibleColor : occludedColor;
201
-
202
- float cosAngle = normalCosAngle(linearDepth, localPosition.xyz);
203
-
204
- // Everything facing away, and close to parallel is considered occluded.
205
- // Theshold corresponds to around 0.6 degrees, tuned empirically.
206
- if (cosAngle > -0.01) {
207
- fragColor = occludedColor;
208
- }
209
- }`),o}const F=o(),M=Object.freeze(Object.defineProperty({__proto__:null,ViewshedPassParameters:b,build:P},Symbol.toStringTag,{value:"Module"}));export{b as V,M as a,P as b};
173
+ }`),n.main.add(p`float depth = depthFromTexture(depthTexture, uv);
174
+ if (depth >= 1.0 || depth <= 0.0) {
175
+ return;
176
+ }
177
+ float linearDepth = linearizeDepth(depth);
178
+ vec4 localPosition = reconstructLocalPosition(gl_FragCoord.xy, linearDepth);
179
+ ViewshedPoint point;
180
+ bool foundFace = getViewshedPoint(localPosition, point);
181
+ if (!foundFace || !point.isWithin) {
182
+ return;
183
+ }
184
+ float viewshedDepth = getDepthFromShadowMap(point.uv, point.face);
185
+ float distance = point.orthographicDepth;
186
+ bool visible = distance < viewshedDepth;
187
+ fragColor = visible ? visibleColor : occludedColor;
188
+ float cosAngle = normalCosAngle(linearDepth, localPosition.xyz);
189
+ if (cosAngle > -0.01) {
190
+ fragColor = occludedColor;
191
+ }`),o}const F=o(),M=Object.freeze(Object.defineProperty({__proto__:null,ViewshedPassParameters:b,build:P},Symbol.toStringTag,{value:"Module"}));export{b as V,M as a,P as b};
@@ -2,40 +2,31 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{MainLighting as t,addMainLightDirection as d,addMainLightIntensity as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{alphaCutoff as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as h,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as C}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{VertexAttribute as P}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as x}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";function O(O){const S=new C,{vertex:M,fragment:D}=S;h(M,O),S.include(r,O),S.attributes.add(P.POSITION,"vec3"),S.attributes.add(P.UV0,"vec2");const N=new y("waterColor",(e=>e.color));if(O.output===o.Color&&O.draped)return S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.code.add(L`
6
- void main(void) {
7
- if (waterColor.a < ${L.float(w)}) {
8
- // Discard this vertex
9
- gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
10
- return;
11
- }
5
+ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{MainLighting as t,addMainLightDirection as l,addMainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalUtils as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{alphaCutoff as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as h,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as C}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{VertexAttribute as P}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as x}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";function O(O){const S=new C,{vertex:M,fragment:D}=S;h(M,O),S.include(o,O),S.attributes.add(P.POSITION,"vec3"),S.attributes.add(P.UV0,"vec2");const N=new y("waterColor",(e=>e.color));if(O.output===r.Color&&O.draped)return S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.main.add(L`
6
+ if (waterColor.a < ${L.float(w)}) {
7
+ // Discard this vertex
8
+ gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
9
+ return;
10
+ }
12
11
 
13
- vpos = position;
14
- gl_Position = transformPosition(proj, view, vpos);
15
- }
16
- `),D.uniforms.add(N),D.code.add(L`void main() {
17
- fragColor = waterColor;
18
- }`),S;switch(O.output===o.Color&&(S.include(g,O),S.include(e,O),S.varyings.add("vuv","vec2"),S.varyings.add("vpos","vec3"),S.varyings.add("vnormal","vec3"),S.varyings.add("vtbnMatrix","mat3"),O.multipassEnabled&&S.varyings.add("depth","float"),M.uniforms.add(N),M.code.add(L`
19
- void main(void) {
20
- if (waterColor.a < ${L.float(w)}) {
21
- // Discard this vertex
22
- gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
23
- return;
24
- }
12
+ vpos = position;
13
+ gl_Position = transformPosition(proj, view, vpos);`),D.uniforms.add(N),D.main.add(L`fragColor = waterColor;`),S;switch(O.output===r.Color&&(S.include(v,O),S.include(e,O),S.varyings.add("vuv","vec2"),S.varyings.add("vpos","vec3"),S.varyings.add("vnormal","vec3"),S.varyings.add("vtbnMatrix","mat3"),O.multipassEnabled&&S.varyings.add("depth","float"),M.uniforms.add(N),M.main.add(L`
14
+ if (waterColor.a < ${L.float(w)}) {
15
+ // Discard this vertex
16
+ gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
17
+ return;
18
+ }
25
19
 
26
- vuv = uv0;
27
- vpos = position;
20
+ vuv = uv0;
21
+ vpos = position;
28
22
 
29
- vnormal = getLocalUp(vpos, localOrigin);
30
- vtbnMatrix = getTBNMatrix(vnormal);
23
+ vnormal = getLocalUp(vpos, localOrigin);
24
+ vtbnMatrix = getTBNMatrix(vnormal);
31
25
 
32
- ${O.multipassEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
26
+ ${O.multipassEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
33
27
 
34
- gl_Position = transformPosition(proj, view, vpos);
35
- ${O.output===o.Color?"forwardLinearDepth();":""}
36
- }
37
- `)),S.include(v,O),O.output){case o.Color:S.include(t),S.include(n,{pbrMode:c.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(u),S.include(m,O),S.include(p,O),S.include(i,O),S.include(x,O),D.uniforms.add(N,new j("timeElapsed",(e=>e.timeElapsed)),M.uniforms.get("view"),M.uniforms.get("localOrigin")),b(D,O),D.include(f),d(D),l(D),D.code.add(L`
38
- void main() {
28
+ gl_Position = transformPosition(proj, view, vpos);
29
+ ${O.output===r.Color?"forwardLinearDepth();":""}`)),S.include(g,O),O.output){case r.Color:S.include(t),S.include(n,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(u),S.include(c,O),S.include(p,O),S.include(i,O),S.include(x,O),D.uniforms.add(N,new j("timeElapsed",(e=>e.timeElapsed)),M.uniforms.get("view"),M.uniforms.get("localOrigin")),b(D,O),D.include(f),l(D),d(D),D.main.add(L`
39
30
  discardBySlice(vpos);
40
31
  ${O.multipassEnabled?"terrainDepthTest(depth);":""}
41
32
  vec3 localUp = vnormal;
@@ -51,28 +42,20 @@ fragColor = waterColor;
51
42
 
52
43
  // gamma correction
53
44
  fragColor = delinearizeGamma(final);
54
- outputColorHighlightOID(fragColor, vpos);
55
- }
56
- `);break;case o.Normal:S.include(g,O),S.include(u,O),S.include(i,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),M.uniforms.add(N),M.code.add(L`
57
- void main(void) {
58
- if (waterColor.a < ${L.float(w)}) {
59
- // Discard this vertex
60
- gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
61
- return;
62
- }
45
+ outputColorHighlightOID(fragColor, vpos);`);break;case r.Normal:S.include(v,O),S.include(u,O),S.include(i,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),M.uniforms.add(N),M.main.add(L`
46
+ if (waterColor.a < ${L.float(w)}) {
47
+ // Discard this vertex
48
+ gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
49
+ return;
50
+ }
63
51
 
64
- vuv = uv0;
65
- vpos = position;
52
+ vuv = uv0;
53
+ vpos = position;
66
54
 
67
- gl_Position = transformPosition(proj, view, vpos);
68
- }
69
- `),D.uniforms.add(new j("timeElapsed",(e=>e.timeElapsed))),D.code.add(L`void main() {
70
- discardBySlice(vpos);
55
+ gl_Position = transformPosition(proj, view, vpos);`),D.uniforms.add(new j("timeElapsed",(e=>e.timeElapsed))),D.main.add(L`discardBySlice(vpos);
71
56
  vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
72
57
  tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
73
- fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);
74
- }`);break;case o.Highlight:S.include(s,O),S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.code.add(L`
75
- void main(void) {
58
+ fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case r.Highlight:S.include(s,O),S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.main.add(L`
76
59
  if (waterColor.a < ${L.float(w)}) {
77
60
  // Discard this vertex
78
61
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
@@ -80,13 +63,8 @@ fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w)
80
63
  }
81
64
 
82
65
  vpos = position;
83
- gl_Position = transformPosition(proj, view, vpos);
84
- }
85
- `),S.include(i,O),D.code.add(L`void main() {
86
- discardBySlice(vpos);
87
- outputHighlight();
88
- }`);break;case o.ObjectAndLayerIdColor:S.include(a,O),S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.code.add(L`
89
- void main(void) {
66
+ gl_Position = transformPosition(proj, view, vpos);`),S.include(i,O),D.main.add(L`discardBySlice(vpos);
67
+ outputHighlight();`);break;case r.ObjectAndLayerIdColor:S.include(a,O),S.varyings.add("vpos","vec3"),M.uniforms.add(N),M.main.add(L`
90
68
  if (waterColor.a < ${L.float(w)}) {
91
69
  // Discard this vertex
92
70
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
@@ -95,9 +73,5 @@ outputHighlight();
95
73
 
96
74
  vpos = position;
97
75
  gl_Position = transformPosition(proj, view, vpos);
98
- forwardObjectAndLayerIdColor();
99
- }
100
- `),S.include(i,O),D.code.add(L`void main() {
101
- discardBySlice(vpos);
102
- outputObjectAndLayerIdColor();
103
- }`)}return S}const S=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));export{S as W,O as b};
76
+ forwardObjectAndLayerIdColor();`),S.include(i,O),D.main.add(L`discardBySlice(vpos);
77
+ outputObjectAndLayerIdColor();`)}return S}const S=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));export{S as W,O as b};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import"../has.js";import t from"../Logger.js";import{pathToArray as n,getProperties as r}from"./utils.js";import{Flags as e}from"./tracking/Flags.js";const o={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},c=[];let i=o;function s(t){i.onObservableAccessed(t)}let l=!1,a=!1;function f(t,n,r){if(l)return u(t,n,r);p(t);const e=n.call(r);return d(),e}function g(t,n){return f(o,t,n)}function u(n,r,e){const o=l;l=!0,p(n);let c=null;try{c=r.call(e)}catch(i){a&&t.getLogger("esri.core.accessorSupport.tracking").error(i)}return d(),l=o,c}function p(t){i=t,c.push(t)}function d(){const t=c.length;if(t>1){const n=c.pop();i=c[t-2],n.onTrackingEnd()}else if(1===t){const t=c.pop();i=o,t.onTrackingEnd()}else i=o}function m(t,n){if(n.flags&e.DepTrackingInitialized)return;const r=a;a=!1,n.flags&e.AutoTracked?u(n,n.metadata.get,t):k(t,n),a=r}const y=[];function k(t,r){r.flags&e.ExplicitlyTracking||(r.flags|=e.ExplicitlyTracking,u(r,(()=>{const e=r.metadata.dependsOn||y;for(const r of e)if("string"!=typeof r||r.includes(".")){const e=n(r);for(let n=0,r=t;n<e.length&&null!=r&&"object"==typeof r;++n)r=A(r,e[n],n!==e.length-1)}else A(t,r,!1)})),r.flags&=~e.ExplicitlyTracking)}function A(t,n,e){const o="?"===n[n.length-1]?n.slice(0,-1):n;if(null!=t.getItemAt||Array.isArray(t)){const n=parseInt(o,10);if(!isNaN(n))return Array.isArray(t)?t[n]:t.at(n)}const c=r(t);if(c){const n=c.propertiesByName.get(o);n&&(s(n),m(t,n))}return e?t[o]:void 0}export{m as initializeDependencyTracking,f as runTracked,u as runTrackedNoThrow,g as runUntracked,s as trackAccess,k as trackExplicitDependencies};
5
+ import"../has.js";import t from"../Logger.js";import{pathToArray as n,getProperties as e}from"./utils.js";import{Flags as r}from"./tracking/Flags.js";const o={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},c=[];let i=o;function s(t){i.onObservableAccessed(t)}let l=!1,a=!1;function f(t,n,e){if(l)return u(t,n,e);let r=null;return p(t),r=n.call(e),d(),r}function g(t,n){return f(o,t,n)}function u(n,e,r){const o=l;l=!0,p(n);let c=null;try{c=e.call(r)}catch(i){a&&t.getLogger("esri.core.accessorSupport.tracking").error(i)}return d(),l=o,c}function p(t){i=t,c.push(t)}function d(){const t=c.length;if(t>1){const n=c.pop();i=c[t-2],n.onTrackingEnd()}else if(1===t){const t=c.pop();i=o,t.onTrackingEnd()}else i=o}function m(t,n){if(n.flags&r.DepTrackingInitialized)return;const e=a;a=!1,n.flags&r.AutoTracked?u(n,n.metadata.get,t):k(t,n),a=e}const y=[];function k(t,e){e.flags&r.ExplicitlyTracking||(e.flags|=r.ExplicitlyTracking,u(e,(()=>{const r=e.metadata.dependsOn||y;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=n(e);for(let n=0,e=t;n<r.length&&null!=e&&"object"==typeof e;++n)e=A(e,r[n],n!==r.length-1)}else A(t,e,!1)})),e.flags&=~r.ExplicitlyTracking)}function A(t,n,r){const o="?"===n[n.length-1]?n.slice(0,-1):n;if(null!=t.getItemAt||Array.isArray(t)){const n=parseInt(o,10);if(!isNaN(n))return Array.isArray(t)?t[n]:t.at(n)}const c=e(t);if(c){const n=c.propertiesByName.get(o);n&&(s(n),m(t,n))}return r?t[o]:void 0}export{m as initializeDependencyTracking,f as runTracked,u as runTrackedNoThrow,g as runUntracked,s as trackAccess,k as trackExplicitDependencies};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- const r={statsWorker:()=>import("../../smartMapping/statistics/support/statsWorker.js"),geometryEngineWorker:()=>import("../../geometry/geometryEngineWorker.js"),CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),GeoJSONSourceWorker:()=>import("../../layers/graphics/sources/geojson/GeoJSONSourceWorker.js"),LercWorker:()=>import("../../layers/support/LercWorker.js"),MemorySourceWorker:()=>import("../../layers/graphics/sources/support/MemorySourceWorker.js"),PBFDecoderWorker:()=>import("../../views/3d/support/PBFDecoderWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),PointCloudWorker:()=>import("../../views/3d/layers/PointCloudWorker.js"),RasterWorker:()=>import("../../layers/support/RasterWorker.js"),SceneLayerSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js"),SceneLayerWorker:()=>import("../../views/3d/layers/SceneLayerWorker.js"),WFSSourceWorker:()=>import("../../layers/graphics/sources/WFSSourceWorker.js"),WorkerTileHandler:()=>import("../../views/2d/engine/vectorTiles/WorkerTileHandler.js"),Lyr3DWorker:()=>import("../../views/3d/layers/Lyr3DWorker.js")};export{r as registry};
5
+ const e={statsWorker:()=>import("../../smartMapping/statistics/support/statsWorker.js"),geometryEngineWorker:()=>import("../../geometry/geometryEngineWorker.js"),CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),GeoJSONSourceWorker:()=>import("../../layers/graphics/sources/geojson/GeoJSONSourceWorker.js"),LercWorker:()=>import("../../layers/support/LercWorker.js"),MemorySourceWorker:()=>import("../../layers/graphics/sources/support/MemorySourceWorker.js"),PBFDecoderWorker:()=>import("../../views/3d/support/PBFDecoderWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),PointCloudWorker:()=>import("../../views/3d/layers/PointCloudWorker.js"),RasterWorker:()=>import("../../layers/support/RasterWorker.js"),SceneLayerSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js"),SceneLayerWorker:()=>import("../../views/3d/layers/SceneLayerWorker.js"),WFSSourceWorker:()=>import("../../layers/graphics/sources/WFSSourceWorker.js"),WorkerTileHandler:()=>import("../../views/2d/engine/vectorTiles/WorkerTileHandler.js"),Lyr3DWorker:()=>import("../../views/3d/layers/Lyr3DWorker.js"),Feature3DPipelineWorker:()=>import("../../views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js")};export{e as registry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{convertUnit as r,isProjectedWKT as t,getMetersPerUnit as s,lengthToDegrees as i}from"../core/unitUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as n}from"./ellipsoidUtils.js";import a from"./Point.js";import p from"./Polygon.js";import l from"./SpatialReference.js";import{directGeodeticSolver as u}from"./support/geodesicUtils.js";import{webMercatorToGeographic as h,geographicToWebMercator as d}from"./support/webMercatorUtils.js";import m from"./support/WKIDUnitConversion.js";var f;let g=f=class extends p{constructor(...e){super(...e),this.center=null,this.geodesic=!1,this.numberOfPoints=60,this.radius=1e3,this.radiusUnit="meters"}normalizeCtorArgs(e,r){let t;if(e?.center)t=e;else{if(e?.rings)return super.normalizeCtorArgs(e,r);t={center:e}}return{...super.normalizeCtorArgs(),...t,...r}}initialize(){const e=this.center,o=this.numberOfPoints;if(this.hasZ=e?.hasZ??!1,0!==this.rings.length||!e)return;const c=r(this.radius,this.radiusUnit,"meters"),a=e.spatialReference;let p,l="geographic";if(a.isWebMercator?l="webMercator":(null!=(a.wkid&&m[a.wkid])||(a.wkt2||a.wkt)&&t(a.wkt2||a.wkt))&&(l="projected"),this.geodesic){let r;switch(l){case"webMercator":r=h(e);break;case"projected":console.error("Creating a geodesic circle requires the center to be specified in web mercator or geographic coordinate system");break;case"geographic":r=e}p=this._createGeodesicCircle(r,c,o),"webMercator"===l&&(p=d(p))}else{let r;"webMercator"===l||"projected"===l?r=c/s(e.spatialReference):"geographic"===l&&(r=i(c,"meters",n(e.spatialReference).radius)),p=this._createPlanarCircle(e,r,o)}this.spatialReference=p.spatialReference,this.addRing(p.rings[0])}clone(){const{center:e,numberOfPoints:r,radius:t,radiusUnit:s,geodesic:i}=this;return new f({center:e?.clone(),numberOfPoints:r,radius:t,radiusUnit:s,geodesic:i})}_createGeodesicCircle(e,r,t){let s=0;const i=[];for(;s<360;){const o=[0,0],c=[e.x,e.y];u(o,c,s,r,l.WGS84),this.hasZ&&o.push(e.z),i.push(o),s+=360/t}return i.push(i[0]),new p(i)}_createPlanarCircle(e,r,t){const s=[],i=2*Math.PI/t;for(let o=0;o<t;++o){const t=i*o,c=[e.x+Math.cos(-t)*r,e.y+Math.sin(-t)*r];this.hasZ&&c.push(e.z),s.push(c)}return s.push(s[0]),new p({spatialReference:e.spatialReference,rings:[s]})}};e([o({type:a})],g.prototype,"center",void 0),e([o()],g.prototype,"geodesic",void 0),e([o()],g.prototype,"numberOfPoints",void 0),e([o()],g.prototype,"radius",void 0),e([o()],g.prototype,"radiusUnit",void 0),g=f=e([c("esri.geometry.Circle")],g);const b=g;export{b as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{convertUnit as r,isProjectedWKT as t,getMetersPerUnit as s,lengthToDegrees as i}from"../core/unitUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as a}from"./ellipsoidUtils.js";import n from"./Point.js";import p from"./Polygon.js";import l from"./SpatialReference.js";import{directGeodeticSolver as h}from"./support/geodesicUtils.js";import{webMercatorToGeographic as d,geographicToWebMercator as u}from"./support/webMercatorUtils.js";import m from"./support/WKIDUnitConversion.js";var f;let g=f=class extends p{constructor(e){super(e),this.center=null,this.geodesic=!1,this.numberOfPoints=60,this.radius=1e3,this.radiusUnit="meters"}initialize(){const e=this.center,o=this.numberOfPoints;if(this.hasZ=e?.hasZ??!1,0!==this.rings.length||!e)return;const c=r(this.radius,this.radiusUnit,"meters"),n=e.spatialReference;let p,l="geographic";if(n.isWebMercator?l="webMercator":(null!=(n.wkid&&m[n.wkid])||(n.wkt2||n.wkt)&&t(n.wkt2||n.wkt))&&(l="projected"),this.geodesic){let r;switch(l){case"webMercator":r=d(e);break;case"projected":console.error("Creating a geodesic circle requires the center to be specified in web mercator or geographic coordinate system");break;case"geographic":r=e}p=this._createGeodesicCircle(r,c,o),"webMercator"===l&&(p=u(p))}else{let r;"webMercator"===l||"projected"===l?r=c/s(e.spatialReference):"geographic"===l&&(r=i(c,"meters",a(e.spatialReference).radius)),p=this._createPlanarCircle(e,r,o)}this.spatialReference=p.spatialReference,this.addRing(p.rings[0])}clone(){const{center:e,numberOfPoints:r,radius:t,radiusUnit:s,geodesic:i}=this;return new f({center:e?.clone(),numberOfPoints:r,radius:t,radiusUnit:s,geodesic:i})}_createGeodesicCircle(e,r,t){let s=0;const i=[];for(;s<360;){const o=[0,0],c=[e.x,e.y];h(o,c,s,r,l.WGS84),this.hasZ&&o.push(e.z),i.push(o),s+=360/t}return i.push(i[0]),new p({rings:[i]})}_createPlanarCircle(e,r,t){const s=[],i=2*Math.PI/t;for(let o=0;o<t;++o){const t=i*o,c=[e.x+Math.cos(-t)*r,e.y+Math.sin(-t)*r];this.hasZ&&c.push(e.z),s.push(c)}return s.push(s[0]),new p({spatialReference:e.spatialReference,rings:[s]})}};e([o({type:n})],g.prototype,"center",void 0),e([o()],g.prototype,"geodesic",void 0),e([o()],g.prototype,"numberOfPoints",void 0),e([o()],g.prototype,"radius",void 0),e([o()],g.prototype,"radiusUnit",void 0),g=f=e([c("esri.geometry.Circle")],g);const b=g;export{b as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import{equals as r}from"../core/arrayUtils.js";import{clone as e}from"../core/lang.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../core/accessorSupport/decorators/writer.js";import o from"./Extent.js";import a from"./Geometry.js";import l from"./Point.js";import h from"./SpatialReference.js";import{polygonCentroid as p}from"./support/centroid.js";import{polygonContainsPoint as c}from"./support/contains.js";import{isClockwise as u}from"./support/coordsUtils.js";import{getPolygonExtent as f}from"./support/extentUtils.js";import{isSelfIntersecting as m}from"./support/intersectsBase.js";import{project as g}from"./support/webMercatorUtils.js";import{updateSupportFromPoint as y}from"./support/zmUtils.js";var d;function R(t){return!Array.isArray(t[0])}let x=d=class extends a{static fromExtent(t){const r=t.clone().normalize(),e=t.spatialReference;let s=!1,n=!1;for(const o of r)o.hasZ&&(s=!0),o.hasM&&(n=!0);const i={rings:r.map((t=>{const r=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(s&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<r.length;t++)r[t].push(e)}if(n&&t.hasM){const e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<r.length;t++)r[t].push(e)}return r})),spatialReference:e};return s&&(i.hasZ=!0),n&&(i.hasM=!0),new d(i)}constructor(...t){super(...t),this.rings=[],this.type="polygon"}normalizeCtorArgs(t,r){let e,s,n=null,i=null;return t&&!Array.isArray(t)?(n=t.rings??null,r||(t.spatialReference?r=t.spatialReference:t.rings||(r=t)),e=t.hasZ,s=t.hasM):n=t,n=n||[],r=r||h.WGS84,n.length&&null!=n[0]?.[0]&&"number"==typeof n[0][0]&&(n=[n]),i=n[0]?.[0],i&&(void 0===e&&void 0===s?(e=i.length>2,s=i.length>3):void 0===e?e=s?i.length>3:i.length>2:void 0===s&&(s=e?i.length>3:i.length>2)),{rings:n,spatialReference:r,hasZ:e,hasM:s}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const t=p(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const r=new l;return r.x=t[0],r.y=t[1],r.spatialReference=this.spatialReference,this.hasZ&&(r.z=t[2]),r}get extent(){const{spatialReference:t}=this,r=f(this);if(!r)return null;const e=new o(r);return e.spatialReference=t,e}get isSelfIntersecting(){return m(this.rings)}writeRings(t,r){r.rings=e(this.rings)}addRing(t){if(!t)return;const r=this.rings,e=r.length;if(R(t)){const s=[];for(let r=0,e=t.length;r<e;r++)s[r]=t[r].toArray();r[e]=s}else r[e]=t.concat();return this.notifyChange("rings"),this}clone(){const t=new d;return t.spatialReference=this.spatialReference,t.rings=e(this.rings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,s=t.spatialReference;if(null!=e!=(null!=s))return!1;if(null!=e&&null!=s&&!e.equals(s))return!1;if(this.rings.length!==t.rings.length)return!1;const n=([t,r,e,s],[n,i,o,a])=>t===n&&r===i&&(null==e&&null==o||e===o)&&(null==s&&null==a||s===a);for(let i=0;i<this.rings.length;i++){const e=this.rings[i],s=t.rings[i];if(!r(e,s,n))return!1}return!0}contains(t){if(!t)return!1;const r=g(t,this.spatialReference);return c(this,null!=r?r:t)}isClockwise(t){const r=R(t)?t.map((t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])):t;return u(r)}getPoint(t,r){if(!this._validateInputs(t,r))return null;const e=this.rings[t][r],s=this.hasZ,n=this.hasM;return s&&!n?new l(e[0],e[1],e[2],void 0,this.spatialReference):n&&!s?new l(e[0],e[1],void 0,e[2],this.spatialReference):s&&n?new l(e[0],e[1],e[2],e[3],this.spatialReference):new l(e[0],e[1],this.spatialReference)}insertPoint(t,r,e){return this._validateInputs(t,r,!0)?(y(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(r,0,e),this.notifyChange("rings"),this):this}removePoint(t,r){if(!this._validateInputs(t,r))return null;const e=new l(this.rings[t].splice(r,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;const r=this.rings.splice(t,1)[0],e=this.spatialReference,s=r.map((t=>new l(t,e)));return this.notifyChange("rings"),s}setPoint(t,r,e){return this._validateInputs(t,r)?(y(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][r]=e,this.notifyChange("rings"),this):this}_validateInputs(t,r,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=r){const s=this.rings[t];if(e&&(r<0||r>s.length))return!1;if(!e&&(r<0||r>=s.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],x.prototype,"cache",null),t([s({readOnly:!0})],x.prototype,"centroid",null),t([s({readOnly:!0})],x.prototype,"extent",null),t([s({readOnly:!0})],x.prototype,"isSelfIntersecting",null),t([s({type:[[[Number]]],json:{write:{isRequired:!0}}})],x.prototype,"rings",void 0),t([i("rings")],x.prototype,"writeRings",null),x=d=t([n("esri.geometry.Polygon")],x),x.prototype.toJSON.isDefaultToJSON=!0;const j=x;export{j as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import{equals as r}from"../core/arrayUtils.js";import{clone as e}from"../core/lang.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../core/accessorSupport/decorators/writer.js";import o from"./Extent.js";import a from"./Geometry.js";import l from"./Point.js";import h from"./SpatialReference.js";import{polygonCentroid as p}from"./support/centroid.js";import{polygonContainsPoint as c}from"./support/contains.js";import{isClockwise as u}from"./support/coordsUtils.js";import{getPolygonExtent as f}from"./support/extentUtils.js";import{isSelfIntersecting as m}from"./support/intersectsBase.js";import{project as g}from"./support/webMercatorUtils.js";import{updateSupportFromPoint as y}from"./support/zmUtils.js";var d;function R(t){return!Array.isArray(t[0])}function x(t){return"number"==typeof t[0]?.[0]}function j(t){if(!t)return;let{rings:r,hasM:e,hasZ:s,spatialReference:i}=t;switch(r??=[],x(r)&&(r=[r]),r[0]?.[0]?.length){case 4:s??=!0,e??=!0;break;case 3:s??=!0!==e,e??=!s;break;default:s??=!1,e??=!1}return i??=h.WGS84,{...t,hasM:e,hasZ:s,rings:r,spatialReference:i}}let w=d=class extends a{static fromExtent(t){const r=t.clone().normalize(),{spatialReference:e}=t;let s=!1,i=!1;for(const o of r)o.hasZ&&(s=!0),o.hasM&&(i=!0);const n={rings:r.map((t=>{const r=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(s&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<r.length;t++)r[t].push(e)}if(i&&t.hasM){const e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<r.length;t++)r[t].push(e)}return r})),spatialReference:e};return s&&(n.hasZ=!0),i&&(n.hasM=!0),new d(n)}constructor(t){super(j(t)),this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const t=p(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const r=new l;return r.x=t[0],r.y=t[1],r.spatialReference=this.spatialReference,this.hasZ&&(r.z=t[2]),r}get extent(){const{spatialReference:t}=this,r=f(this);if(!r)return null;const e=new o(r);return e.spatialReference=t,e}get isSelfIntersecting(){return m(this.rings)}writeRings(t,r){r.rings=e(this.rings)}addRing(t){if(!t)return;const r=this.rings,e=r.length;if(R(t)){const s=[];for(let r=0,e=t.length;r<e;r++)s[r]=t[r].toArray();r[e]=s}else r[e]=t.concat();return this.notifyChange("rings"),this}clone(){const t=new d;return t.spatialReference=this.spatialReference,t.rings=e(this.rings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,s=t.spatialReference;if(null!=e!=(null!=s))return!1;if(null!=e&&null!=s&&!e.equals(s))return!1;if(this.rings.length!==t.rings.length)return!1;const i=([t,r,e,s],[i,n,o,a])=>t===i&&r===n&&(null==e&&null==o||e===o)&&(null==s&&null==a||s===a);for(let n=0;n<this.rings.length;n++){const e=this.rings[n],s=t.rings[n];if(!r(e,s,i))return!1}return!0}contains(t){if(!t)return!1;const r=g(t,this.spatialReference);return c(this,null!=r?r:t)}isClockwise(t){const r=R(t)?t.map((t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])):t;return u(r)}getPoint(t,r){if(!this._validateInputs(t,r))return null;const e=this.rings[t][r],s=this.hasZ,i=this.hasM;return s&&!i?new l(e[0],e[1],e[2],void 0,this.spatialReference):i&&!s?new l(e[0],e[1],void 0,e[2],this.spatialReference):s&&i?new l(e[0],e[1],e[2],e[3],this.spatialReference):new l(e[0],e[1],this.spatialReference)}insertPoint(t,r,e){return this._validateInputs(t,r,!0)?(y(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(r,0,e),this.notifyChange("rings"),this):this}removePoint(t,r){if(!this._validateInputs(t,r))return null;const e=new l(this.rings[t].splice(r,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;const r=this.rings.splice(t,1)[0],e=this.spatialReference,s=r.map((t=>new l(t,e)));return this.notifyChange("rings"),s}setPoint(t,r,e){return this._validateInputs(t,r)?(y(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][r]=e,this.notifyChange("rings"),this):this}_validateInputs(t,r,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=r){const s=this.rings[t];if(e&&(r<0||r>s.length))return!1;if(!e&&(r<0||r>=s.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],w.prototype,"cache",null),t([s({readOnly:!0})],w.prototype,"centroid",null),t([s({readOnly:!0})],w.prototype,"extent",null),t([s({readOnly:!0})],w.prototype,"isSelfIntersecting",null),t([s({type:[[[Number]]],json:{write:{isRequired:!0}}})],w.prototype,"rings",void 0),t([n("rings")],w.prototype,"writeRings",null),w=d=t([i("esri.geometry.Polygon")],w);const v=w;w.prototype.toJSON.isDefaultToJSON=!0;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import{clone as e}from"../core/lang.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../core/accessorSupport/decorators/writer.js";import a from"./Extent.js";import n from"./Geometry.js";import o from"./Point.js";import h from"./SpatialReference.js";import{getPolylineExtent as p}from"./support/extentUtils.js";import{updateSupportFromPoint as l}from"./support/zmUtils.js";var c;function u(t){return!Array.isArray(t[0])}function f(t){return"number"==typeof t[0]?.[0]}function m(t){if(!t)return;let{paths:e,hasM:s,hasZ:r,spatialReference:i}=t;switch(e??=[],f(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,s??=!0;break;case 3:r??=!0!==s,s??=!r;break;default:r??=!1,s??=!1}return i??=h.WGS84,{hasM:s,hasZ:r,paths:e,spatialReference:i}}let y=c=class extends n{constructor(t){super(m(t)),this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:t}=this,e=p(this);if(!e)return null;const s=new a(e);return s.spatialReference=t,s}writePaths(t,s){s.paths=e(this.paths)}addPath(t){if(!t)return;const e=this.paths,s=e.length;if(u(t)){const r=[];for(let e=0,s=t.length;e<s;e++)r[e]=t[e].toArray();e[s]=r}else e[s]=t.concat();return this.notifyChange("paths"),this}clone(){const t=new c;return t.spatialReference=this.spatialReference,t.paths=e(this.paths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const s=this.paths[t][e],r=this.hasZ,i=this.hasM;return r&&!i?new o(s[0],s[1],s[2],void 0,this.spatialReference):i&&!r?new o(s[0],s[1],void 0,s[2],this.spatialReference):r&&i?new o(s[0],s[1],s[2],s[3],this.spatialReference):new o(s[0],s[1],this.spatialReference)}insertPoint(t,e,s){return this._validateInputs(t,e,!0)?(l(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[t].splice(e,0,s),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],s=this.spatialReference,r=e.map((t=>new o(t,s)));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const s=new o(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),s}setPoint(t,e,s){return this._validateInputs(t,e)?(l(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[t][e]=s,this.notifyChange("paths"),this):this}_validateInputs(t,e,s=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(s&&(e<0||e>r.length))return!1;if(!s&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],y.prototype,"cache",null),t([s({readOnly:!0})],y.prototype,"extent",null),t([s({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),t([i("paths")],y.prototype,"writePaths",null),y=c=t([r("esri.geometry.Polyline")],y);const d=y;y.prototype.toJSON.isDefaultToJSON=!0;export{d as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import{clone as e}from"../core/lang.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../core/accessorSupport/decorators/writer.js";import a from"./Extent.js";import n from"./Geometry.js";import o from"./Point.js";import h from"./SpatialReference.js";import{getPolylineExtent as p}from"./support/extentUtils.js";import{updateSupportFromPoint as l}from"./support/zmUtils.js";var c;function u(t){return!Array.isArray(t[0])}function f(t){return"number"==typeof t[0]?.[0]}function m(t){if(!t)return;let{paths:e,hasM:s,hasZ:r,spatialReference:i}=t;switch(e??=[],f(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,s??=!0;break;case 3:r??=!0!==s,s??=!r;break;default:r??=!1,s??=!1}return i??=h.WGS84,{...t,hasM:s,hasZ:r,paths:e,spatialReference:i}}let y=c=class extends n{constructor(t){super(m(t)),this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:t}=this,e=p(this);if(!e)return null;const s=new a(e);return s.spatialReference=t,s}writePaths(t,s){s.paths=e(this.paths)}addPath(t){if(!t)return;const e=this.paths,s=e.length;if(u(t)){const r=[];for(let e=0,s=t.length;e<s;e++)r[e]=t[e].toArray();e[s]=r}else e[s]=t.concat();return this.notifyChange("paths"),this}clone(){const t=new c;return t.spatialReference=this.spatialReference,t.paths=e(this.paths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const s=this.paths[t][e],r=this.hasZ,i=this.hasM;return r&&!i?new o(s[0],s[1],s[2],void 0,this.spatialReference):i&&!r?new o(s[0],s[1],void 0,s[2],this.spatialReference):r&&i?new o(s[0],s[1],s[2],s[3],this.spatialReference):new o(s[0],s[1],this.spatialReference)}insertPoint(t,e,s){return this._validateInputs(t,e,!0)?(l(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[t].splice(e,0,s),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],s=this.spatialReference,r=e.map((t=>new o(t,s)));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const s=new o(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),s}setPoint(t,e,s){return this._validateInputs(t,e)?(l(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[t][e]=s,this.notifyChange("paths"),this):this}_validateInputs(t,e,s=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(s&&(e<0||e>r.length))return!1;if(!s&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],y.prototype,"cache",null),t([s({readOnly:!0})],y.prototype,"extent",null),t([s({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),t([i("paths")],y.prototype,"writePaths",null),y=c=t([r("esri.geometry.Polyline")],y);const d=y;y.prototype.toJSON.isDefaultToJSON=!0;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import"../../geometry.js";import e from"../../core/Error.js";import{convertUnit as t}from"../../core/unitUtils.js";import{ensureClass as n}from"../../core/accessorSupport/ensureType.js";import{toRadians as i,spheroids as s,wktSpheroidRegex as r}from"./geodesicConstants.js";import{equals as a,isWebMercator as o,isGeographic as c}from"./spatialReferenceUtils.js";import l from"../Polyline.js";import h from"../SpatialReference.js";import p from"../Polygon.js";import f from"../Point.js";function u(e){if(!e)return null;if(c(e)&&e.wkid){const t=s[e.wkid];if(t)return t}const t=e.wkt2||e.wkt;if(t){const e=m(t);if(e)return e}return null}function m(e){const t=r.exec(e);if(!t||2!==t.length)return null;const n=t[1].split(",");if(!n||n.length<3)return null;const i=parseFloat(n[1]),s=parseFloat(n[2]);if(isNaN(i)||isNaN(s))return null;return{a:i,f:0===s?0:1/s}}function d(e){const t=u(e);if(g(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function g(e){return null!=e&&"b"in e&&"eSq"in e&&"radius"in e}function M(e){return null!=e&&e<0?e+360:e}function w(e,t,n){const{a:s,eSq:r}=d(n),a=Math.sqrt(r),o=Math.sin(t[1]*i),c=s*t[0]*i;let l;if(r>0){l=s*((1-r)*(o/(1-r*(o*o))-1/(2*a)*Math.log((1-a*o)/(1+a*o))))*.5}else l=s*o;return e[0]=c,e[1]=l,e}function y(e){return null!==u(e)}function v(n,i="square-meters"){if(n.some((e=>!y(e.spatialReference))))throw new e("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.spatialReference,{radius:r,densificationRatio:a}=d(i),o=r*a;s.push(z(t,o))}const r=[],a=[0,0],o=[0,0];for(let e=0;e<s.length;e++){const{rings:n,spatialReference:c}=s[e];let l=0;for(let e=0;e<n.length;e++){const t=n[e];w(a,t[0],c),w(o,t[t.length-1],c);let i=o[0]*a[1]-a[0]*o[1];for(let e=0;e<t.length-1;e++)w(a,t[e+1],c),w(o,t[e],c),i+=o[0]*a[1]-a[0]*o[1];l+=i}l=t(l,"square-meters",i),r.push(l/-2)}return r}function R(n,i="meters"){if(!n)throw new e("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(n.some((e=>!y(e.spatialReference))))throw new e("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const r=n[e],{spatialReference:a}=r,o="polyline"===r.type?r.paths:r.rings;let c=0;for(let e=0;e<o.length;e++){const t=o[e];let n=0;for(let e=1;e<t.length;e++){const i=t[e-1][0],s=t[e][0],r=t[e-1][1],o=t[e][1];if(r!==o||i!==s){const e=new b;q(e,[i,r],[s,o],a),n+=e.distance}}c+=n}c=t(c,"meters",i),s.push(c)}return s}function z(t,i){if("polyline"!==t.type&&"polygon"!==t.type)throw new e("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:s}=t;if(!y(s))throw new e("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const r="polyline"===t.type?t.paths:t.rings,a=[],o=[0,0],c=new b;for(const e of r){const t=[];a.push(t),t.push([e[0][0],e[0][1]]);let n,r,l=e[0][0],h=e[0][1];for(let a=0;a<e.length-1;a++){if(n=e[a+1][0],r=e[a+1][1],l===n&&h===r)continue;const p=[l,h];q(c,[l,h],[n,r],s);const{azimuth:f,distance:u}=c,m=u/i;if(m>1){for(let e=1;e<=m-1;e++){j(o,p,f,e*i,s),t.push(o.slice(0))}j(o,p,f,(u+Math.floor(m-1)*i)/2,s),t.push(o.slice(0))}j(o,p,f,u,s),t.push(o.slice(0)),l=o[0],h=o[1]}}return"polyline"===t.type?new l({paths:a,spatialReference:n(h,s)}):new p({rings:a,spatialReference:s})}class b{constructor(e=0,t=void 0,n=void 0){this.distance=e,this.azimuth=t,this.reverseAzimuth=n}}function j(e,t,n,s,r){const a=t[0],o=t[1],c=a*i,l=o*i,h=(n??0)*i,{a:p,b:f,f:u}=d(r),m=Math.sin(h),g=Math.cos(h),M=(1-u)*Math.tan(l),w=1/Math.sqrt(1+M*M),y=M*w,v=Math.atan2(M,g),R=w*m,z=R*R,b=1-z,j=b*(p*p-f*f)/(f*f),q=1+j/16384*(4096+j*(j*(320-175*j)-768)),x=j/1024*(256+j*(j*(74-47*j)-128));let A,N,S,k,P=s/(f*q),F=2*Math.PI;for(;Math.abs(P-F)>1e-12;)S=Math.cos(2*v+P),A=Math.sin(P),N=Math.cos(P),k=x*A*(S+x/4*(N*(2*S*S-1)-x/6*S*(4*A*A-3)*(4*S*S-3))),F=P,P=s/(f*q)+k;const U=y*A-w*N*g,C=Math.atan2(y*N+w*A*g,(1-u)*Math.sqrt(z+U*U)),E=Math.atan2(A*m,w*N-y*A*g),G=u/16*b*(4+u*(4-3*b)),I=C/i,O=(c+(E-(1-G)*u*R*(P+G*A*(S+G*N*(2*S*S-1)))))/i;return e[0]=O,e[1]=I,e}function q(e,t,n,s){const r=t[0]*i,a=t[1]*i,o=n[0]*i,c=n[1]*i,{a:l,b:h,f:p,radius:f}=d(s),u=o-r,m=Math.atan((1-p)*Math.tan(a)),g=Math.atan((1-p)*Math.tan(c)),M=Math.sin(m),w=Math.cos(m),y=Math.sin(g),v=Math.cos(g);let R,z,b,j,q,x,A,N,S,k,P=1e3,F=u;do{if(A=Math.sin(F),N=Math.cos(F),b=Math.sqrt(v*A*(v*A)+(w*y-M*v*N)*(w*y-M*v*N)),0===b)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;q=M*y+w*v*N,x=Math.atan2(b,q),S=w*v*A/b,z=1-S*S,j=q-2*M*y/z,isNaN(j)&&(j=0),k=p/16*z*(4+p*(4-3*z)),R=F,F=u+(1-k)*p*S*(x+k*b*(j+k*q*(2*j*j-1)))}while(Math.abs(F-R)>1e-12&&--P>0);if(0===P){const t=f,n=Math.acos(Math.sin(a)*Math.sin(c)+Math.cos(a)*Math.cos(c)*Math.cos(o-r))*t,s=o-r,l=Math.sin(s)*Math.cos(c),h=Math.cos(a)*Math.sin(c)-Math.sin(a)*Math.cos(c)*Math.cos(s),p=Math.atan2(l,h);return e.azimuth=p/i,e.distance=n,e.reverseAzimuth=void 0,e}const U=z*(l*l-h*h)/(h*h),C=U/1024*(256+U*(U*(74-47*U)-128)),E=h*(1+U/16384*(4096+U*(U*(320-175*U)-768)))*(x-C*b*(j+C/4*(q*(2*j*j-1)-C/6*j*(4*b*b-3)*(4*j*j-3)))),G=Math.atan2(v*Math.sin(F),w*y-M*v*Math.cos(F)),I=Math.atan2(w*Math.sin(F),w*y*Math.cos(F)-M*v);return e.azimuth=G/i,e.distance=E,e.reverseAzimuth=I/i,e}function x(n,i,s="meters"){if(!n||!i)throw new e("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!n.spatialReference||!i.spatialReference)throw new e("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!a(n.spatialReference,i.spatialReference))throw new e("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");const{spatialReference:r}=n;if(!y(r))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(n.x===i.x&&n.y===i.y)return new b(0,0,0);const o=new b;return q(o,[n.x,n.y],[i.x,i.y],r),o.distance=t(o.distance,"meters",s),o.azimuth=M(o.azimuth),o.reverseAzimuth=M(o.reverseAzimuth),o}function A(t,n,i){if(!t||null==n||null==i)throw new e("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(i<0||i>360)throw new e("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0° to 360° degrees");if(!t.spatialReference)throw new e("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const{spatialReference:s}=t;if(!y(s))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");const r=[0,0];return j(r,[t.x,t.y],i,n,s),new f({x:r[0],y:r[1],spatialReference:s})}function N(e){return y(e)?e:o(e)?h.WGS84:null}export{b as InverseGeodeticSolverResult,j as directGeodeticSolver,v as geodesicAreas,N as geodesicCompatibleSpatialReference,z as geodesicDensify,x as geodesicDistance,R as geodesicLengths,q as inverseGeodeticSolver,y as isSupported,A as pointFromDistance};
5
+ import"../../geometry.js";import e from"../../core/Error.js";import{convertUnit as t}from"../../core/unitUtils.js";import{ensureClass as n}from"../../core/accessorSupport/ensureType.js";import{toRadians as i,spheroids as s,wktSpheroidRegex as r}from"./geodesicConstants.js";import{equals as a,isWebMercator as o,isGeographic as c}from"./spatialReferenceUtils.js";import l from"../SpatialReference.js";import h from"../Polyline.js";import p from"../Polygon.js";import f from"../Point.js";function u(e){if(!e)return null;if(c(e)&&e.wkid){const t=s[e.wkid];if(t)return t}const t=e.wkt2||e.wkt;if(t){const e=m(t);if(e)return e}return null}function m(e){const t=r.exec(e);if(!t||2!==t.length)return null;const n=t[1].split(",");if(!n||n.length<3)return null;const i=parseFloat(n[1]),s=parseFloat(n[2]);if(isNaN(i)||isNaN(s))return null;return{a:i,f:0===s?0:1/s}}function d(e){const t=u(e);if(g(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function g(e){return null!=e&&"b"in e&&"eSq"in e&&"radius"in e}function M(e){return null!=e&&e<0?e+360:e}function w(e,t,n){const{a:s,eSq:r}=d(n),a=Math.sqrt(r),o=Math.sin(t[1]*i),c=s*t[0]*i;let l;if(r>0){l=s*((1-r)*(o/(1-r*(o*o))-1/(2*a)*Math.log((1-a*o)/(1+a*o))))*.5}else l=s*o;return e[0]=c,e[1]=l,e}function y(e){return null!==u(e)}function v(n,i="square-meters"){if(n.some((e=>!y(e.spatialReference))))throw new e("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.spatialReference,{radius:r,densificationRatio:a}=d(i),o=r*a;s.push(z(t,o))}const r=[],a=[0,0],o=[0,0];for(let e=0;e<s.length;e++){const{rings:n,spatialReference:c}=s[e];let l=0;for(let e=0;e<n.length;e++){const t=n[e];w(a,t[0],c),w(o,t[t.length-1],c);let i=o[0]*a[1]-a[0]*o[1];for(let e=0;e<t.length-1;e++)w(a,t[e+1],c),w(o,t[e],c),i+=o[0]*a[1]-a[0]*o[1];l+=i}l=t(l,"square-meters",i),r.push(l/-2)}return r}function R(n,i="meters"){if(!n)throw new e("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(n.some((e=>!y(e.spatialReference))))throw new e("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const s=[];for(let e=0;e<n.length;e++){const r=n[e],{spatialReference:a}=r,o="polyline"===r.type?r.paths:r.rings;let c=0;for(let e=0;e<o.length;e++){const t=o[e];let n=0;for(let e=1;e<t.length;e++){const i=t[e-1][0],s=t[e][0],r=t[e-1][1],o=t[e][1];if(r!==o||i!==s){const e=new b;q(e,[i,r],[s,o],a),n+=e.distance}}c+=n}c=t(c,"meters",i),s.push(c)}return s}function z(t,i){if("polyline"!==t.type&&"polygon"!==t.type)throw new e("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:s}=t;if(!y(s))throw new e("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const r="polyline"===t.type?t.paths:t.rings,a=[],o=[0,0],c=new b;for(const e of r){const t=[];a.push(t),t.push([e[0][0],e[0][1]]);let n,r,l=e[0][0],h=e[0][1];for(let a=0;a<e.length-1;a++){if(n=e[a+1][0],r=e[a+1][1],l===n&&h===r)continue;const p=[l,h];q(c,[l,h],[n,r],s);const{azimuth:f,distance:u}=c,m=u/i;if(m>1){for(let e=1;e<=m-1;e++){j(o,p,f,e*i,s),t.push(o.slice(0))}j(o,p,f,(u+Math.floor(m-1)*i)/2,s),t.push(o.slice(0))}j(o,p,f,u,s),t.push(o.slice(0)),l=o[0],h=o[1]}}const f=n(l,s);return"polyline"===t.type?new h({paths:a,spatialReference:f}):new p({rings:a,spatialReference:f})}class b{constructor(e=0,t=void 0,n=void 0){this.distance=e,this.azimuth=t,this.reverseAzimuth=n}}function j(e,t,n,s,r){const a=t[0],o=t[1],c=a*i,l=o*i,h=(n??0)*i,{a:p,b:f,f:u}=d(r),m=Math.sin(h),g=Math.cos(h),M=(1-u)*Math.tan(l),w=1/Math.sqrt(1+M*M),y=M*w,v=Math.atan2(M,g),R=w*m,z=R*R,b=1-z,j=b*(p*p-f*f)/(f*f),q=1+j/16384*(4096+j*(j*(320-175*j)-768)),x=j/1024*(256+j*(j*(74-47*j)-128));let A,N,S,k,P=s/(f*q),F=2*Math.PI;for(;Math.abs(P-F)>1e-12;)S=Math.cos(2*v+P),A=Math.sin(P),N=Math.cos(P),k=x*A*(S+x/4*(N*(2*S*S-1)-x/6*S*(4*A*A-3)*(4*S*S-3))),F=P,P=s/(f*q)+k;const U=y*A-w*N*g,C=Math.atan2(y*N+w*A*g,(1-u)*Math.sqrt(z+U*U)),E=Math.atan2(A*m,w*N-y*A*g),G=u/16*b*(4+u*(4-3*b)),I=C/i,O=(c+(E-(1-G)*u*R*(P+G*A*(S+G*N*(2*S*S-1)))))/i;return e[0]=O,e[1]=I,e}function q(e,t,n,s){const r=t[0]*i,a=t[1]*i,o=n[0]*i,c=n[1]*i,{a:l,b:h,f:p,radius:f}=d(s),u=o-r,m=Math.atan((1-p)*Math.tan(a)),g=Math.atan((1-p)*Math.tan(c)),M=Math.sin(m),w=Math.cos(m),y=Math.sin(g),v=Math.cos(g);let R,z,b,j,q,x,A,N,S,k,P=1e3,F=u;do{if(A=Math.sin(F),N=Math.cos(F),b=Math.sqrt(v*A*(v*A)+(w*y-M*v*N)*(w*y-M*v*N)),0===b)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;q=M*y+w*v*N,x=Math.atan2(b,q),S=w*v*A/b,z=1-S*S,j=q-2*M*y/z,isNaN(j)&&(j=0),k=p/16*z*(4+p*(4-3*z)),R=F,F=u+(1-k)*p*S*(x+k*b*(j+k*q*(2*j*j-1)))}while(Math.abs(F-R)>1e-12&&--P>0);if(0===P){const t=f,n=Math.acos(Math.sin(a)*Math.sin(c)+Math.cos(a)*Math.cos(c)*Math.cos(o-r))*t,s=o-r,l=Math.sin(s)*Math.cos(c),h=Math.cos(a)*Math.sin(c)-Math.sin(a)*Math.cos(c)*Math.cos(s),p=Math.atan2(l,h);return e.azimuth=p/i,e.distance=n,e.reverseAzimuth=void 0,e}const U=z*(l*l-h*h)/(h*h),C=U/1024*(256+U*(U*(74-47*U)-128)),E=h*(1+U/16384*(4096+U*(U*(320-175*U)-768)))*(x-C*b*(j+C/4*(q*(2*j*j-1)-C/6*j*(4*b*b-3)*(4*j*j-3)))),G=Math.atan2(v*Math.sin(F),w*y-M*v*Math.cos(F)),I=Math.atan2(w*Math.sin(F),w*y*Math.cos(F)-M*v);return e.azimuth=G/i,e.distance=E,e.reverseAzimuth=I/i,e}function x(n,i,s="meters"){if(!n||!i)throw new e("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!n.spatialReference||!i.spatialReference)throw new e("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!a(n.spatialReference,i.spatialReference))throw new e("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");const{spatialReference:r}=n;if(!y(r))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(n.x===i.x&&n.y===i.y)return new b(0,0,0);const o=new b;return q(o,[n.x,n.y],[i.x,i.y],r),o.distance=t(o.distance,"meters",s),o.azimuth=M(o.azimuth),o.reverseAzimuth=M(o.reverseAzimuth),o}function A(t,n,i){if(!t||null==n||null==i)throw new e("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(i<0||i>360)throw new e("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0° to 360° degrees");if(!t.spatialReference)throw new e("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const{spatialReference:s}=t;if(!y(s))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");const r=[0,0];return j(r,[t.x,t.y],i,n,s),new f({x:r[0],y:r[1],spatialReference:s})}function N(e){return y(e)?e:o(e)?l.WGS84:null}export{b as InverseGeodeticSolverResult,j as directGeodeticSolver,v as geodesicAreas,N as geodesicCompatibleSpatialReference,z as geodesicDensify,x as geodesicDistance,R as geodesicLengths,q as inverseGeodeticSolver,y as isSupported,A as pointFromDistance};
package/interfaces.d.ts CHANGED
@@ -33729,12 +33729,24 @@ declare namespace __esri {
33729
33729
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryAttachments)
33730
33730
  */
33731
33731
  queryAttachments(attachmentQuery: AttachmentQuery | AttachmentQueryProperties, options?: SubtypeSublayerQueryAttachmentsOptions): Promise<any>;
33732
+ /**
33733
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the service and returns the number of features that satisfy the query.
33734
+ *
33735
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryFeatureCount)
33736
+ */
33737
+ queryFeatureCount(query?: Query | QueryProperties, options?: SubtypeSublayerQueryFeatureCountOptions): Promise<number>;
33732
33738
  /**
33733
33739
  * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves.
33734
33740
  *
33735
33741
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryFeatures)
33736
33742
  */
33737
33743
  queryFeatures(query?: Query | QueryProperties, options?: SubtypeSublayerQueryFeaturesOptions): Promise<FeatureSet>;
33744
+ /**
33745
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the service and returns an array of Object IDs for features that satisfy the input query.
33746
+ *
33747
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryObjectIds)
33748
+ */
33749
+ queryObjectIds(query?: Query | QueryProperties, options?: SubtypeSublayerQueryObjectIdsOptions): Promise<number[]>;
33738
33750
  /**
33739
33751
  * Updates an existing attachment for a feature.
33740
33752
  *
@@ -33953,6 +33965,15 @@ declare namespace __esri {
33953
33965
  signal?: AbortSignal;
33954
33966
  }
33955
33967
 
33968
+ export interface SubtypeSublayerQueryFeatureCountOptions {
33969
+ /**
33970
+ * Signal object that can be used to abort the asynchronous task.
33971
+ *
33972
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryFeatureCount)
33973
+ */
33974
+ signal?: AbortSignal;
33975
+ }
33976
+
33956
33977
  export interface SubtypeSublayerQueryFeaturesOptions {
33957
33978
  /**
33958
33979
  * Signal object that can be used to abort the asynchronous task.
@@ -33962,6 +33983,15 @@ declare namespace __esri {
33962
33983
  signal?: AbortSignal;
33963
33984
  }
33964
33985
 
33986
+ export interface SubtypeSublayerQueryObjectIdsOptions {
33987
+ /**
33988
+ * Signal object that can be used to abort the asynchronous task.
33989
+ *
33990
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryObjectIds)
33991
+ */
33992
+ signal?: AbortSignal;
33993
+ }
33994
+
33965
33995
  export interface TelemetryData extends Accessor, JSONSupport, Clonable {
33966
33996
  }
33967
33997
 
@@ -85892,7 +85922,7 @@ declare namespace __esri {
85892
85922
  */
85893
85923
  active: boolean;
85894
85924
  /**
85895
- * The direct line measurement analysis object associated with the analysis view.
85925
+ * The slice analysis object associated with the analysis view.
85896
85926
  *
85897
85927
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-SliceAnalysisView3D.html#analysis)
85898
85928
  */
@@ -91439,7 +91469,7 @@ declare namespace __esri {
91439
91469
  | Collection<IntersectItem>
91440
91470
  | IntersectItem;
91441
91471
  /**
91442
- * A list of layers and graphics to include for intersection testing.
91472
+ * A list of layers and graphics to exclude for intersection testing.
91443
91473
  *
91444
91474
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap)
91445
91475
  */
@@ -117399,7 +117429,7 @@ declare namespace __esri {
117399
117429
  /**
117400
117430
  * Color of the shadow cast.
117401
117431
  *
117402
- * @default [50, 50, 50, 0.7]
117432
+ * @default [0, 0, 255, 0.7]
117403
117433
  *
117404
117434
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ShadowCast-ShadowCastViewModel.html#durationOptions)
117405
117435
  */
@@ -117418,7 +117448,7 @@ declare namespace __esri {
117418
117448
  /**
117419
117449
  * Color of the shadow cast.
117420
117450
  *
117421
- * @default [50, 50, 50, 0.7]
117451
+ * @default [0, 0, 255, 0.7]
117422
117452
  *
117423
117453
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ShadowCast-ShadowCastViewModel.html#durationOptions)
117424
117454
  */
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{watch as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import a from"./Layer.js";import{BlendLayer as n}from"./mixins/BlendLayer.js";import{CustomParametersMixin as l}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as p}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as m}from"./mixins/OperationalLayer.js";import{PortalLayer as u}from"./mixins/PortalLayer.js";import{RefreshableLayer as c}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as d}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as f}from"./mixins/TemporalLayer.js";import{popupEnabled as h}from"./support/commonProperties.js";import y from"./support/Field.js";import v from"./support/rasterDatasets/WCSRaster.js";import{createPopupTemplate as g}from"../support/popupUtils.js";const j=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let I=class extends(n(d(m(u(l(p(f(c(r(a)))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._openRaster(t)),Promise.resolve(this)}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){return[new y({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})]}createPopupTemplate(e){return g({fields:this.rasterFields,title:this.title},e)}async _openRaster(e){const r=new v({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await r.open({signal:e}),!r.rasterInfo)throw r.destroy(),new t("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:o}=r;this._set("serviceRasterInfo",o),this._set("spatialReference",o.spatialReference),null==this.title&&this.setAtOrigin("title",r.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",r.coverageInfo.id,"service"),this.setAtOrigin("tileInfo",r.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=o;if(null!=i){const e=i.variables[0].dimensions.find((({name:e})=>"StdTime"===e));if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let r=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(r)&&(r=r[1]);const s=j.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:r},timeZone:null,interval:s?{value:e.interval,unit:s}:null})}}this.raster=r,this._configDefaultSettings(),this.addHandles(s((()=>this.customParameters),(e=>this.raster.ioConfig.customFetchParameters=e)))}};e([o({type:String,nonNullable:!0,json:{write:!0}})],I.prototype,"coverageId",void 0),e([o()],I.prototype,"coverageInfo",null),e([o()],I.prototype,"version",void 0),e([o()],I.prototype,"isReference",void 0),e([o()],I.prototype,"raster",void 0),e([o({readOnly:!0})],I.prototype,"type",void 0),e([o(h)],I.prototype,"popupEnabled",void 0),e([o()],I.prototype,"popupTemplate",void 0),e([o({readOnly:!0})],I.prototype,"defaultPopupTemplate",null),e([o({readOnly:!0,type:[y]})],I.prototype,"fields",void 0),e([o({readOnly:!0,type:[y]})],I.prototype,"rasterFields",null),I=e([i("esri.layers.WCSLayer")],I);const x=I;export{x as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{watch as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import n from"./Layer.js";import{BlendLayer as a}from"./mixins/BlendLayer.js";import{CustomParametersMixin as l}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as p}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as m}from"./mixins/OperationalLayer.js";import{PortalLayer as u}from"./mixins/PortalLayer.js";import{RefreshableLayer as c}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as d}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as f}from"./mixins/TemporalLayer.js";import{popupEnabled as h}from"./support/commonProperties.js";import v from"./support/Field.js";import y from"./support/rasterDatasets/WCSRaster.js";import{createPopupTemplate as g}from"../support/popupUtils.js";const j=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let I=class extends(a(d(m(u(l(p(f(c(r(n)))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._openRaster(t)),Promise.resolve(this)}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){return[new v({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})]}createPopupTemplate(e){return g({fields:this.rasterFields,title:this.title},e)}async _openRaster(e){const r=new y({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await r.open({signal:e}),!r.rasterInfo)throw r.destroy(),new t("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:o}=r;this._set("serviceRasterInfo",o),this._set("spatialReference",o.spatialReference),null==this.title&&this.setAtOrigin("title",r.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",r.coverageInfo.id,"service"),null==this.version&&r.version&&this.setAtOrigin("version",r.version,"service"),this.setAtOrigin("tileInfo",r.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=o;if(null!=i){const e=i.variables[0].dimensions.find((({name:e})=>"StdTime"===e));if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let r=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(r)&&(r=r[1]);const s=j.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:r},timeZone:null,interval:s?{value:e.interval,unit:s}:null})}}this.raster=r,this._configDefaultSettings(),this.addHandles(s((()=>this.customParameters),(e=>this.raster.ioConfig.customFetchParameters=e)))}};e([o({type:String,nonNullable:!0,json:{write:!0}})],I.prototype,"coverageId",void 0),e([o()],I.prototype,"coverageInfo",null),e([o()],I.prototype,"version",void 0),e([o()],I.prototype,"isReference",void 0),e([o()],I.prototype,"raster",void 0),e([o({readOnly:!0})],I.prototype,"type",void 0),e([o(h)],I.prototype,"popupEnabled",void 0),e([o()],I.prototype,"popupTemplate",void 0),e([o({readOnly:!0})],I.prototype,"defaultPopupTemplate",null),e([o({readOnly:!0,type:[v]})],I.prototype,"fields",void 0),e([o({readOnly:!0,type:[v]})],I.prototype,"rasterFields",null),I=e([i("esri.layers.WCSLayer")],I);const x=I;export{x as default};