@arcgis/core 5.1.0-next.83 → 5.1.0-next.85

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 (296) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{e89dc473f46a5584d2ef.js → 004af103a94d21cb4889.js} +3 -3
  3. package/assets/esri/core/workers/chunks/53d13e13d8729bd4dcf2.js +1 -0
  4. package/assets/esri/core/workers/chunks/{45c83eb7c2a06166e3b0.js → 56717ff315c6ec874142.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{1e2c0c6d724f7639d4c1.js → 713ab619060bd5087479.js} +13 -13
  6. package/assets/esri/core/workers/chunks/{a9b5ce00323cd5574bf7.js → 7160e3e7340beb7fdb42.js} +1 -1
  7. package/assets/esri/core/workers/chunks/79eca9ccd4dc52da1d59.js +1 -0
  8. package/assets/esri/core/workers/chunks/{bd8cb64b6e08839398f3.js → c7da0981822182e15f3a.js} +1 -1
  9. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +596 -0
  10. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
  11. package/assets/esri/themes/dark/main.css +1 -1
  12. package/assets/esri/themes/light/main.css +1 -1
  13. package/assets/esri/themes/light/view.css +1 -1
  14. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  15. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  16. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  17. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  18. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  19. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  20. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  22. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  24. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  25. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  26. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  27. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  28. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  29. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  30. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  31. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  32. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  33. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  34. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  35. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  36. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  37. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  38. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  39. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  40. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  41. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  42. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  43. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  44. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  45. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  46. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  55. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  56. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  57. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  58. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  59. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  60. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  61. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  62. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  63. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  64. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  65. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  66. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  67. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  68. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  69. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  70. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  71. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  72. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  73. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  74. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  75. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  76. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  77. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  78. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  79. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  81. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  82. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  94. package/chunks/EdgeShader.glsl.js +13 -9
  95. package/chunks/Fog.glsl.js +1 -1
  96. package/chunks/GlowBlur.glsl.js +9 -13
  97. package/chunks/GlowComposition.glsl.js +10 -10
  98. package/chunks/ShadowCastVisualize.glsl.js +10 -10
  99. package/config.js +1 -1
  100. package/core/arrayUtils.js +1 -1
  101. package/core/has.js +1 -1
  102. package/core/screenUtils.js +1 -1
  103. package/form/types.d.ts +1 -1
  104. package/geohash/GeohashCell.js +1 -1
  105. package/geohash/GeohashTree.js +1 -1
  106. package/kernel.js +1 -1
  107. package/layers/scene/ModelFileInfo.js +1 -1
  108. package/layers/scene/modelQuerySupport.js +1 -1
  109. package/package.json +1 -1
  110. package/popup/Features.d.ts +10 -0
  111. package/popup/Features.js +1 -1
  112. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +4 -1
  113. package/support/revision.js +1 -1
  114. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  115. package/views/2d/FrameTask.js +1 -1
  116. package/views/2d/LabelManager.js +1 -1
  117. package/views/2d/engine/DisplayObject.js +1 -1
  118. package/views/2d/engine/Stage.js +1 -1
  119. package/views/2d/engine/flow/FlowContainer.js +1 -1
  120. package/views/2d/engine/flow/FlowView2D.js +1 -1
  121. package/views/2d/engine/flow/styles/AFlowResources.js +1 -1
  122. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  123. package/views/2d/engine/flow/styles/Particles.js +1 -1
  124. package/views/2d/engine/flow/styles/Stack.js +1 -1
  125. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  126. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  127. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  128. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  129. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  130. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  131. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  132. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  133. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  134. package/views/2d/engine/webgl/ResizableUint32Array.js +2 -0
  135. package/views/2d/engine/webgl/TileCpuState.js +2 -0
  136. package/views/2d/engine/webgl/TileGpuState.js +2 -0
  137. package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +2 -0
  138. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +2 -0
  139. package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +2 -0
  140. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugContainer.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  145. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  146. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  147. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  148. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  149. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  150. package/views/2d/layers/KMLLayerView2D.js +1 -1
  151. package/views/2d/layers/LayerView2D.js +1 -1
  152. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  153. package/views/2d/layers/MediaLayerView2D.js +1 -1
  154. package/views/2d/layers/RouteLayerView2D.js +1 -1
  155. package/views/2d/layers/TileLayerView2D.js +1 -1
  156. package/views/2d/layers/features/FeatureContainer.js +1 -1
  157. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  158. package/views/2d/layers/features/FeatureTilePresentStrategy.js +2 -0
  159. package/views/2d/layers/features/Processor.js +1 -1
  160. package/views/2d/layers/features/RenderState.js +1 -1
  161. package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
  162. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  163. package/views/2d/layers/features/aggregation/GridCell.js +1 -1
  164. package/views/2d/layers/features/aggregation/GridIndexCell.js +2 -0
  165. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  166. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  167. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  168. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  169. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  170. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  171. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  172. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  173. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  174. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  175. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  176. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  177. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  178. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  179. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  180. package/views/2d/layers/features/sources/FeatureSourceMessage.js +1 -1
  181. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  182. package/views/2d/layers/features/support/Hashed.js +2 -0
  183. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  184. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  185. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  186. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  187. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  188. package/views/2d/support/hitTestUtils.js +1 -1
  189. package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
  190. package/views/2d/tiling/TileCombinedCoverage.js +2 -0
  191. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  192. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +2 -0
  193. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  194. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  195. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  196. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +2 -0
  197. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  198. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  199. package/views/3d/analysis/Viewshed/ViewshedTool2.js +2 -0
  200. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +2 -0
  201. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  202. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  203. package/views/3d/environment/CloudyWeather.js +1 -1
  204. package/views/3d/environment/FoggyWeather.js +1 -1
  205. package/views/3d/environment/RainyWeather.js +1 -1
  206. package/views/3d/environment/SnowyWeather.js +1 -1
  207. package/views/3d/environment/SunnyWeather.js +1 -1
  208. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  209. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  210. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  211. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  212. package/views/3d/webgl/ManagedColorAttachment.js +1 -1
  213. package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
  214. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  215. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  216. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  217. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  218. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  219. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +11 -11
  220. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  221. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  222. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  223. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  224. package/views/3d/webgl-engine/effects/glow/Glow.js +2 -0
  225. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  226. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  227. package/views/3d/webgl-engine/effects/raymarching/{RayDistanceFalloff.glsl.js → DistanceFalloff.glsl.js} +2 -2
  228. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  229. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  230. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  231. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  232. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  233. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  234. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  235. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  236. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  237. package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
  238. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  239. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  240. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  241. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  242. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  243. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  244. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  245. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  246. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  247. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  248. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  249. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  250. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  251. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  252. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  253. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  254. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -7
  255. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  256. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
  257. package/views/VideoView.js +1 -1
  258. package/views/View2D.js +1 -1
  259. package/views/draw/support/GraphicMover.js +1 -1
  260. package/views/support/rasterHitTestUtils.js +1 -1
  261. package/views/support/waitForResources.js +1 -1
  262. package/views/video/VideoOperationalDataView.js +1 -1
  263. package/views/webgl/FramebufferObject.js +1 -1
  264. package/views/webgl/RenderingContext.js +1 -1
  265. package/views/webgl/Texture.js +1 -1
  266. package/views/webgl/textureUtils.js +1 -1
  267. package/widgets/BatchAttributeForm/css.js +1 -1
  268. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.d.ts +61 -0
  269. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +2 -0
  270. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  271. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  272. package/widgets/BatchAttributeForm/inputs/types.d.ts +9 -4
  273. package/widgets/BatchAttributeForm/templates/UtilityNetworkAssociationsElementTemplate.js +2 -0
  274. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  275. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  276. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  277. package/widgets/BatchAttributeForm.js +1 -1
  278. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  279. package/widgets/FeatureTable/Grid/Column.d.ts +17 -2
  280. package/widgets/FeatureTable/Grid/Column.js +1 -1
  281. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  282. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  283. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +7 -1
  284. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  285. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +9 -1
  286. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  287. package/widgets/FeatureTable/support/types.d.ts +8 -0
  288. package/widgets/FeatureTable.js +1 -1
  289. package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +0 -596
  290. package/assets/esri/core/workers/chunks/8f4cd30ce23e41c1a42c.js +0 -1
  291. package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +0 -1
  292. package/views/2d/engine/webgl/PooledUint32Array.js +0 -2
  293. package/views/2d/engine/webgl/cpuMapped/Buffer.js +0 -2
  294. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +0 -2
  295. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +0 -2
  296. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +0 -4
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951,5647],{28491(e,t,r){r.d(t,{D:()=>W,b:()=>A});var o=r(32680),a=r(49255),n=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),h=r(53466),m=r(92700),f=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(71651),b=r(32971),w=r(98619),y=r(62602),S=r(22393),M=r(59469),T=r(32482),C=r(51406),I=r(43259),_=r(58614),P=r(27950),z=r(77949),F=r(33079),O=r(71988),E=r(20304),D=r(31821),H=r(63761),B=r(27832),j=r(43616),R=r(26292),N=r(14113),G=r(49788);function A(e){const t=new N.N5,{attributes:r,vertex:A,fragment:W,varyings:L}=t,{output:V,normalType:k,offsetBackfaces:U,spherical:q,snowCover:$,pbrMode:Z,textureAlphaPremultiplied:Y,instancedDoublePrecision:J,hasVertexColors:X,hasVertexTangents:K,hasColorTexture:Q,hasNormalTexture:ee,hasNormalTextureTransform:te,hasColorTextureTransform:re}=e;if((0,z.NB)(A,e),r.add("position","vec3"),A.inputs.add("position",()=>"position"),L.add("vpos","vec3",{invariant:!0}),t.include(I.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(C.q2,e),!(0,a._o)(V))return t.include(v.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,z.yu)(A,e),t.include(u.Y,e),t.include(i.d);const oe=0===k||1===k;return oe&&U&&t.include(o.M),t.include(g.J,e),t.include(f.Mh,e),t.include(s.v,e),L.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(d.K,e),t.include(m.c,e),A.uniforms.add(new O.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),L.add("vcolorExt","vec4"),A.include(c.WD),A.include(c.oF),t.include(J?T.QH:T.LA,e),A.main.add(D.H`
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951,5647],{28491(e,t,r){r.d(t,{D:()=>W,b:()=>A});var o=r(32680),a=r(49255),n=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),h=r(53466),m=r(92700),f=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(71651),b=r(32971),w=r(98619),y=r(62602),S=r(22393),M=r(59469),T=r(32482),C=r(51406),I=r(43259),_=r(58614),P=r(27950),z=r(77949),F=r(33079),O=r(71988),E=r(20304),D=r(31821),H=r(63761),B=r(27832),j=r(43616),R=r(26292),N=r(14113),G=r(49788);function A(e){const t=new N.N5,{attributes:r,vertex:A,fragment:W,varyings:L}=t,{output:V,normalType:k,offsetBackfaces:U,spherical:$,snowCover:q,pbrMode:Z,textureAlphaPremultiplied:Y,instancedDoublePrecision:J,hasVertexColors:X,hasVertexTangents:K,hasColorTexture:Q,hasNormalTexture:ee,hasNormalTextureTransform:te,hasColorTextureTransform:re}=e;if((0,z.NB)(A,e),r.add("position","vec3"),A.inputs.add("position",()=>"position"),L.add("vpos","vec3",{invariant:!0}),t.include(I.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(C.q2,e),!(0,a._o)(V))return t.include(v.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,z.yu)(A,e),t.include(u.Y,e),t.include(i.d);const oe=0===k||1===k;return oe&&U&&t.include(o.M),t.include(g.J,e),t.include(f.Mh,e),t.include(s.v,e),L.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(d.K,e),t.include(m.c,e),A.uniforms.add(new O.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),L.add("vcolorExt","vec4"),A.include(c.WD),A.include(c.oF),t.include(J?T.QH:T.LA,e),A.main.add(D.H`
2
2
  forwardVertexColor();
3
3
 
4
4
  MaskedColor maskedColor =
@@ -49,9 +49,9 @@
49
49
  float opacity_ = layerOpacity * mixExternalOpacity(${(0,D.If)(X,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, opacityMixMode);
50
50
 
51
51
  ${ee?`mat3 tangentSpace = computeTangentSpace(${K?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${te?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
52
- vec3 normalGround = ${q?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
52
+ vec3 normalGround = ${$?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
53
53
 
54
- ${(0,D.If)($,D.H`
54
+ ${(0,D.If)(q,D.H`
55
55
  float snow = getSnow(normal, normalGround);
56
56
  albedo = mix(albedo, vec3(1), snow);
57
57
  shadingNormal = mix(shadingNormal, normal, snow);
@@ -61,10 +61,10 @@
61
61
 
62
62
  ${1===Z||2===Z?D.H`
63
63
  float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
64
- ${(0,D.If)($,"mrr = applySnowToMRR(mrr, snow);")}
64
+ ${(0,D.If)(q,"mrr = applySnowToMRR(mrr, snow);")}
65
65
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:D.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
66
66
  vec4 finalColor = vec4(shadedColor, opacity_);
67
- outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,D.If)($,", snow")});
67
+ outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,D.If)(q,", snow")});
68
68
  `),t}const W=Object.freeze(Object.defineProperty({__proto__:null,build:A},Symbol.toStringTag,{value:"Module"}))},587(e,t,r){r.d(t,{G:()=>x,a:()=>w,b:()=>b});var o=r(82048),a=r(92573),n=r(98619),i=r(96608),s=r(34845),l=r(20304),c=r(31821),u=r(58029),d=r(12791),h=r(63761),m=r(63907),f=r(65786),p=r(14113);const v=1/3,g=2/3;class x extends f.Y{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.frameCount=0}}function b(e){const t=new p.N5,r=t.fragment;return t.include(o.c),t.include(s.Ir),(0,n.Gc)(r),r.include(a.V),t.include(i.t,{highStepCount:!1,screenSpaceReflections:!0}),r.uniforms.add(new h.N("normalMap",e=>e.normalTexture),new h.N("depthMap",e=>e.depthTexture),new h.N("lastFrameColorTexture",(e,t)=>t.reprojection.lastFrameColor?.getTexture()),new h.N("lastFrameDepthTexture",(e,t)=>t.reprojection.lastFrameDepth?.attachment),new d.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new d.x("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(m.yI)),new u.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new u.F("view",e=>e.camera.viewMatrix),new l.m("accumulatedFramesGI",e=>e.accumulatedFrames),new l.m("frameCount",e=>e.frameCount),new l.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new h.N("blueNoiseTex",e=>e.noiseTexture)),e.hasEmission&&r.uniforms.add(new h.N("lastFrameEmissionTexture",(e,t)=>t.reprojection.lastFrameEmission?.attachment)),r.constants.add("timeSamplesSize","float",64),r.constants.add("blueNoiseGridSize","float",8),r.code.add(c.H`
69
69
  float computeIdleColorBlendWeight(float accumulatedFrames) {
70
70
  float idleColorBlendProgress = clamp(
@@ -449,9 +449,9 @@ weight11 * jointBilateralWeight11
449
449
  forwardLinearDepthToReadShadowMap();
450
450
  gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
451
451
  ${(0,z.If)(A,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
452
- `);const{hasColorTexture:U,hasColorTextureTransform:q}=e;return R.include(g.kA,e),R.include(v.n,e),t.include(M.S,e),R.include(n.HQ,e),t.include(H.D,e),(0,C.yu)(R,e),(0,x.Gc)(R),(0,g.a8)(R),(0,g.eU)(R),R.uniforms.add(j.uniforms.get("localOrigin"),j.uniforms.get("view"),new I.t("ambient",e=>e.ambient),new I.t("diffuse",e=>e.diffuse),new P.m("opacity",e=>e.opacity),new P.m("layerOpacity",e=>e.layerOpacity)),U&&R.uniforms.add(new F.N("tex",e=>e.texture)),t.include(w._,e),R.include(b.c,e),R.include(T.N),R.include(O.b,e),(0,x.O4)(R),R.main.add(z.H`
452
+ `);const{hasColorTexture:U,hasColorTextureTransform:$}=e;return R.include(g.kA,e),R.include(v.n,e),t.include(M.S,e),R.include(n.HQ,e),t.include(H.D,e),(0,C.yu)(R,e),(0,x.Gc)(R),(0,g.a8)(R),(0,g.eU)(R),R.uniforms.add(j.uniforms.get("localOrigin"),j.uniforms.get("view"),new I.t("ambient",e=>e.ambient),new I.t("diffuse",e=>e.diffuse),new P.m("opacity",e=>e.opacity),new P.m("layerOpacity",e=>e.layerOpacity)),U&&R.uniforms.add(new F.N("tex",e=>e.texture)),t.include(w._,e),R.include(b.c,e),R.include(T.N),R.include(O.b,e),(0,x.O4)(R),R.main.add(z.H`
453
453
  discardBySlice(vpos);
454
- vec4 texColor = ${U?`texture(tex, ${q?"colorUV":"vuv0"})`:" vec4(1.0)"};
454
+ vec4 texColor = ${U?`texture(tex, ${$?"colorUV":"vuv0"})`:" vec4(1.0)"};
455
455
  ${(0,z.If)(U,`${(0,z.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
456
456
  vec3 viewDirection = normalize(vpos - cameraPosition);
457
457
  applyPBRFactors();
@@ -588,7 +588,7 @@ return fallOffFunction(vv, vn, 0.1);
588
588
  vec2 uvOffset = uv + rf * blurSize;
589
589
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
590
590
  }
591
- fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>l,c:()=>s,d:()=>n,e:()=>m,f:()=>d,l:()=>u,n:()=>f,t:()=>i});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],w=r[14];let y=0,S=0;for(let r=0;r<l;r++){const r=t[y],a=t[y+1],i=t[y+2];e[S]=c*r+h*a+p*i+x,e[S+1]=u*r+m*a+v*i+b,e[S+2]=d*r+f*a+g*i+w,y+=n,S+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+p*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+f*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>c,fA:()=>n,o8:()=>a,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>w,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>y,aI:()=>M,hG:()=>p,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>S});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function y(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function S(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function M(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,I=c,_=f,P=p,z=v,F=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:_,distance:f,div:I,divide:c,dot:b,equals:M,exactEquals:S,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:w,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:F,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:y,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>I});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class p{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends p{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),f=(0,d.RS)([],c,u,s),p=(0,d.RS)([],h,f,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,u]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends p{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:f}){if(l)return e.push([...r]),e;const p=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<p?2*Math.asin(u/p):x,w=c>0&&c<=n?2*Math.acos(1-c/n):x,y=Math.min(b,w),S=Math.min(m,Math.max(f,Math.ceil(Math.abs(x/y)))),M=1/S;for(let t=1;t<S;t++){const r=t*M,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function w(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function y(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function S(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function M(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?w(e,t,r,o):(0,l.DA)(r)?y(e,t,r,o):S(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=f(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),M(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=_(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(6312)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=f(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?w(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?y(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?S(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function _(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>F,O7:()=>P,el:()=>_});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),f=r(31411),p=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),w=r(92300);const y=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function M(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,f,S,M,P,z=0;const F=[],O=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,S=c?102100:4326,m=u.j7[S].maxX,f=u.j7[S].minX,M=u.j7[S].plus180Line,P=u.j7[S].minus180Line),i)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(C(t.clone(),m,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,f)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);O.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,f)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(M)&&n!==m?(z=n>z?n:z,o=T(o,c),F.push(o),O.push("cut")):e.intersects(P)&&a!==f?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),F.push(o),O.push("cut")):O.push(o)}else O.push(t.clone());else O.push(t);else O.push(t);let E=(0,u.kd)(z,m),D=-90;const H=E,B=new l.A;for(;E>0;){const e=360*E-180;B.addPath([[e,D],[e,-1*D]]),D*=-1,E--}if(F.length>0&&H>0){const t=I(F,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,p.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,F,B,r)),o=[],n=[];for(let r=0;r<O.length;r++){const a=O[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,w.X)(t))}},{data:s}=await(0,p.A)(o.path+"/simplify",i);return(0,w.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const j=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)j.push(t);else{const e=F.shift();j.push(!0===c?(0,h.Gh)(e):e)}}return j}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const F=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>w,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>y,vE:()=>S,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=M){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,f=d*d+h*h+m*m,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=h*p,o[2]=m*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,a.t2)(m,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,a.Re)(v,m,f),(0,a.S8)(v,v),(0,a.Re)(g,f,p),(0,a.S8)(g,g),l=!(0,a.t2)(m,p)&&!(0,a.t2)(f,p)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,f,p,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),f=(0,n.vt)(),p=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(S(e,t.origin,t.vector,0,r))}function b(e,t){return y(e,t)>=0}function w(e,t){const r=(0,a.Om)(e,t.ray.direction),o=-y(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const n=o/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function y(e,t){return(0,a.Om)(e,t)+e[3]}function S(e,t,r,n,i){const s=(0,a.Om)(e,r),l=y(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const M=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,J8:()=>f,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64()),f=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),i}},5644(e,t,r){r.d(t,{fetch:()=>wt});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),w=r(21015),y=r(84498),S=r(51530),M=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:M.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class I{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var _=r(11254),P=r(60999),z=r(49186),F=r(53966),O=r(69397);class E{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new E;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var D=r(17676),H=r(46140),B=r(97146),j=r(31217),R=r(46610),N=r(63500),G=r(18845),A=r(49255),W=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,W.Gz)(this._texture),this._textureNormal=(0,W.Gz)(this._textureNormal),this._textureEmissive=(0,W.Gz)(this._textureEmissive),this._textureOcclusion=(0,W.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,W.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new q(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,W.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,D.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,W.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class q extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var $=r(11725),Z=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,m.vt)();function X(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Z.vA)(0===e.type),Q(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,w=(v+(3-x))%3,y=u[b]/u[g],S=u[w]/u[g],M=1/u[g],T=te,C=re,I=oe,{normalRequired:_}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.C)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.C)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.C)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(I,h[2],e);const m=T[b]-y*T[g],f=T[w]-S*T[g],p=C[b]-y*C[g],v=C[w]-S*C[g],x=I[b]-y*I[g],P=I[w]-S*I[g],z=x*v-P*p,F=m*P-f*x,O=p*f-v*m;if((z<0||F<0||O<0)&&(z>0||F>0||O>0))continue;const E=z+F+O;if(0===E)continue;const D=z*(M*T[g])+F*(M*C[g])+O*(M*I[g]);if(D*Math.sign(E)<0)continue;const H=D/E;H>=0&&c(H,_?ne(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const K=(0,h.vt)();function Q(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,K);if((0,m.Ne)(J,e.bbMin),(0,m.vI)(J,e.bbMax),null!=a&&a.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const w=i*a[r+1];let y=n[w],S=n[w+1],M=n[w+2];const T=i*a[r+2];let C=n[T],I=n[T+1],_=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[y,S,M]=l.applyToVertex(y,S,M,e),[C,I,_]=l.applyToVertex(C,I,_,e));const P=y-c,z=S-x,F=M-b,O=C-c,E=I-x,D=_-b,H=p*D-E*v,B=v*O-D*f,j=f*E-O*p,R=P*H+z*B+F*j;if(Math.abs(R)<=ce)continue;const N=d-c,G=h-x,A=m-b,W=N*H+G*B+A*j;if(R>0){if(W<0||W>R)continue}else if(W>0||W<R)continue;const L=G*F-z*A,V=A*P-F*N,k=N*z-P*G,U=f*L+p*V+v*k;if(R>0){if(U<0||W+U>R)continue}else if(U>0||W+U<R)continue;const q=(O*L+E*V+D*k)/R;q>=0&&u(q,g?ae(P,z,F,O,E,D,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const ee=(0,h.vt)();const te=(0,h.vt)(),re=(0,h.vt)(),oe=(0,h.vt)();function ae(e,t,r,o,a,n,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,a,n),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ne(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,h.vt)(),se=(0,h.vt)(),le=1e3,ce=1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()];var he=r(16396),me=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a,n){return(0,me.vJ)(r,o,this.layout,e,t,a,n)}}var pe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),we=r(4431),ye=r(1843),Se=r(72824),Me=r(13840),Te=r(98958),Ce=r(16943),Ie=r(33524),_e=r(56133),Pe=r(4576);r(66289);var ze=r(69622),Fe=r(65529),Oe=r(32728);class Ee{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let De=class extends ze.A{constructor(e,t){super(e),this.events=new Fe.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Be(He.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ae,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Ee(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=je,o=Re;t.localTransform.getMat(e,Ne),t.globalTransform.getMat(e,Ge);const a=(0,l.lw)(Ge,Ge,Ne);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Oe.wp)(je,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Re),r.modelOrigin.getVec(e,je),t[0]=Re[0],t[1]=Re[1],t[2]=Re[2],t[3]=0,t[4]=Re[3],t[5]=Re[4],t[6]=Re[5],t[7]=0,t[8]=Re[6],t[9]=Re[7],t[10]=Re[8],t[11]=0,t[12]=je[0],t[13]=je[1],t[14]=je[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(je,this,e),t*=Math.max(je[0],je[1],je[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(je,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(je[0],je[1],je[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ae,Math.floor(this._capacity*Pe.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Ee(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],De.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],De.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],De.prototype,"size",null),De=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],De);const He=(0,ye.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Be(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const je=(0,h.vt)(),Re=(0,s.vt)(),Ne=(0,c.vt)(),Ge=(0,c.vt)(),Ae=64,We=(0,ye.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Le=r(74810),Ve=r(28491),ke=r(90644),Ue=r(49788);class qe extends Se.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Le.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Ue.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Se.gy;let $e=class extends Te.w{constructor(e,t){let o=(0,we.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,we.U)(function(e){return Be(We.clone(),e)}(t)))),super(e,t,o),this.shader=new Me.r(Ve.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,Ie.Yf)(r,!1,e.emissionDimmingPass):null,culling:Ye(e)?(0,ke.Xt)(a):null,depthTest:(0,Ie.mt)(r,Ze(n)),depthWrite:(0,Ie.z5)(e),colorWrite:ke.kn,stencilWrite:i?_e.v0:null,stencilTest:i?t?_e.a9:_e.qh:null,polygonOffset:(0,pe.sG)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Ze(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,ye.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ce.E)()&&t.vec4u8("olidColor"),t}$e=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],$e);var Xe=r(51976),Ke=r(47724);class Qe extends Ke.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge.Cg)([(0,Xe.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Xe.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends $e{constructor(){super(...arguments),this.shader=new Me.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Xe.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Xe.W)()],rt.prototype,"receiveShadows",void 0);class ot extends $.i{constructor(e,t){super(e,nt),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,A.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,o,a,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case 1:n=(0,d.S8)(ct,dt);break;case 2:n=(0,d.C)(ct,lt)}const i=(0,d.Re)(ht,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(n,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(n,n,u),(0,d.ei)(ut,n,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),a=(0,d.Re)(st,a,ut)}n=(0,pe.b6)(n,this._configuration,o,a),X(e,r,o,a,(0,he.ou)(r.verticalOffset),n)}createGLMaterial(e){return new at(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:a,texture:n,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||a<1||(null!=n||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class at extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:$e,e)}}class nt extends qe{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const it=(0,h.vt)(),st=(0,h.vt)(),lt=(0,h.fA)(0,0,1),ct=(0,h.vt)(),ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.vt)(),mt=()=>F.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ft{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function pt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(mt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(mt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(mt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(mt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else mt().warn("Indexed geometries must specify faces"),o=!1;break}default:mt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(mt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(mt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new H.A(1,2,"wosr");async function wt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){mt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,j.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new ft(r,o,a+(0,O.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new E,i=e.resource,s=H.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!pt(i))continue;const s=xt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,B.tM)(x);p.push([e,new R.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,w=d&&d[b];if(w&&!f.has(b)){const{image:e,parameters:t}=w,r=new G.h(e,t);o.push(r),f.set(b,r)}const y=f.get(b),S=y?y.id:void 0,M=s.material;let T=n.get(M,b);if(null==T){const e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=w?gt(w.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:S,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:w?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new ot(o,t),n.set(M,b,T)}a.push(T);const C=new N.V(T,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));f=await e(new w.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:M,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,f=a.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),f=(0,h.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,w=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(f,m,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[w]=h,p[w+1]=h,p[w+2]=h,p[w+3]=1,w+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(p.buffer)}}}(e,f));const M=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:M,isSchematic:!1,treeRendering:w,mrrFactors:Le.SY}:{usePBR:M,isSchematic:!1,treeRendering:!1,mrrFactors:Le.mb},_={...t.materialParameters,treeRendering:w},P=new Array,z=new Map,F=new Map,O=a.lods.length,E=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(O>1&&0===s||O>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new I(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:f,tangent:p}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,S.x3)(e)?l.compressionOptions:void 0;s.set(t,new G.h((0,S.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,S.x3)(e)&&o,encoding:(0,S.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Le.Jr)(d),w=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Le.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const w=i.get(v);if(r.stageResources.materials.push(w),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(a,e,c,C,_,z,F,t,w),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(a,s,e.transform,3,l);const c=[["position",new R.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(yt,e.transform),(0,g.b)(t,a,yt,3,s),(0,n.or)(yt)&&(0,g.n)(t,t),c.push(["normal",new R.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(yt,e.transform),(0,x.t)(t,a,yt,4,s),(0,n.or)(yt)&&(0,g.n)(t,t,4),c.push(["tangent",new R.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new R.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new R.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new ot({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,m.iT)(E,f.bbMin),(0,m.iT)(E,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:E}}(f,t,s.specifiedLodIndex);return{lods:M,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const yt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
591
+ fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>l,c:()=>s,d:()=>n,e:()=>m,f:()=>d,l:()=>u,n:()=>f,t:()=>i});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],w=r[14];let y=0,S=0;for(let r=0;r<l;r++){const r=t[y],a=t[y+1],i=t[y+2];e[S]=c*r+h*a+p*i+x,e[S+1]=u*r+m*a+v*i+b,e[S+2]=d*r+f*a+g*i+w,y+=n,S+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+p*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+f*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>c,fA:()=>n,o8:()=>a,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>w,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>y,aI:()=>M,hG:()=>p,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>S});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function y(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function S(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function M(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,I=c,_=f,P=p,z=v,F=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:_,distance:f,div:I,divide:c,dot:b,equals:M,exactEquals:S,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:w,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:F,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:y,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>I});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class p{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends p{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),f=(0,d.RS)([],c,u,s),p=(0,d.RS)([],h,f,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,u]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends p{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:f}){if(l)return e.push([...r]),e;const p=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<p?2*Math.asin(u/p):x,w=c>0&&c<=n?2*Math.acos(1-c/n):x,y=Math.min(b,w),S=Math.min(m,Math.max(f,Math.ceil(Math.abs(x/y)))),M=1/S;for(let t=1;t<S;t++){const r=t*M,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function w(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function y(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function S(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function M(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?w(e,t,r,o):(0,l.DA)(r)?y(e,t,r,o):S(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=f(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),M(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=_(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(6312)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=f(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?w(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?y(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?S(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function _(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>F,O7:()=>P,el:()=>_});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),f=r(31411),p=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),w=r(92300);const y=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function M(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,f,S,M,P,z=0;const F=[],O=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,S=c?102100:4326,m=u.j7[S].maxX,f=u.j7[S].minX,M=u.j7[S].plus180Line,P=u.j7[S].minus180Line),i)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(C(t.clone(),m,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,f)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);O.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,f)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(M)&&n!==m?(z=n>z?n:z,o=T(o,c),F.push(o),O.push("cut")):e.intersects(P)&&a!==f?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),F.push(o),O.push("cut")):O.push(o)}else O.push(t.clone());else O.push(t);else O.push(t);let E=(0,u.kd)(z,m),D=-90;const H=E,B=new l.A;for(;E>0;){const e=360*E-180;B.addPath([[e,D],[e,-1*D]]),D*=-1,E--}if(F.length>0&&H>0){const t=I(F,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,p.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,F,B,r)),o=[],n=[];for(let r=0;r<O.length;r++){const a=O[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,w.X)(t))}},{data:s}=await(0,p.A)(o.path+"/simplify",i);return(0,w.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const j=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)j.push(t);else{const e=F.shift();j.push(!0===c?(0,h.Gh)(e):e)}}return j}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const F=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>w,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>y,vE:()=>S,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=M){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,f=d*d+h*h+m*m,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=h*p,o[2]=m*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,a.t2)(m,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,a.Re)(v,m,f),(0,a.S8)(v,v),(0,a.Re)(g,f,p),(0,a.S8)(g,g),l=!(0,a.t2)(m,p)&&!(0,a.t2)(f,p)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,f,p,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),f=(0,n.vt)(),p=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(S(e,t.origin,t.vector,0,r))}function b(e,t){return y(e,t)>=0}function w(e,t){const r=(0,a.Om)(e,t.ray.direction),o=-y(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const n=o/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function y(e,t){return(0,a.Om)(e,t)+e[3]}function S(e,t,r,n,i){const s=(0,a.Om)(e,r),l=y(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const M=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,J8:()=>f,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64()),f=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),i}},5644(e,t,r){r.d(t,{fetch:()=>wt});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),w=r(21015),y=r(84498),S=r(51530),M=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:M.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class I{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var _=r(11254),P=r(60999),z=r(49186),F=r(53966),O=r(69397);class E{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new E;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var D=r(17676),H=r(46140),B=r(97146),j=r(31217),R=r(46610),N=r(63500),G=r(18845),A=r(49255),W=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,W.Gz)(this._texture),this._textureNormal=(0,W.Gz)(this._textureNormal),this._textureEmissive=(0,W.Gz)(this._textureEmissive),this._textureOcclusion=(0,W.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,W.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new $(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,W.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,D.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,W.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class $ extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var q=r(11725),Z=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,m.vt)();function X(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Z.vA)(0===e.type),Q(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,w=(v+(3-x))%3,y=u[b]/u[g],S=u[w]/u[g],M=1/u[g],T=te,C=re,I=oe,{normalRequired:_}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.C)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.C)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.C)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(I,h[2],e);const m=T[b]-y*T[g],f=T[w]-S*T[g],p=C[b]-y*C[g],v=C[w]-S*C[g],x=I[b]-y*I[g],P=I[w]-S*I[g],z=x*v-P*p,F=m*P-f*x,O=p*f-v*m;if((z<0||F<0||O<0)&&(z>0||F>0||O>0))continue;const E=z+F+O;if(0===E)continue;const D=z*(M*T[g])+F*(M*C[g])+O*(M*I[g]);if(D*Math.sign(E)<0)continue;const H=D/E;H>=0&&c(H,_?ne(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const K=(0,h.vt)();function Q(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,K);if((0,m.Ne)(J,e.bbMin),(0,m.vI)(J,e.bbMax),null!=a&&a.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const w=i*a[r+1];let y=n[w],S=n[w+1],M=n[w+2];const T=i*a[r+2];let C=n[T],I=n[T+1],_=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[y,S,M]=l.applyToVertex(y,S,M,e),[C,I,_]=l.applyToVertex(C,I,_,e));const P=y-c,z=S-x,F=M-b,O=C-c,E=I-x,D=_-b,H=p*D-E*v,B=v*O-D*f,j=f*E-O*p,R=P*H+z*B+F*j;if(Math.abs(R)<=ce)continue;const N=d-c,G=h-x,A=m-b,W=N*H+G*B+A*j;if(R>0){if(W<0||W>R)continue}else if(W>0||W<R)continue;const L=G*F-z*A,V=A*P-F*N,k=N*z-P*G,U=f*L+p*V+v*k;if(R>0){if(U<0||W+U>R)continue}else if(U>0||W+U<R)continue;const $=(O*L+E*V+D*k)/R;$>=0&&u($,g?ae(P,z,F,O,E,D,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const ee=(0,h.vt)();const te=(0,h.vt)(),re=(0,h.vt)(),oe=(0,h.vt)();function ae(e,t,r,o,a,n,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,a,n),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ne(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,h.vt)(),se=(0,h.vt)(),le=1e3,ce=1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()];var he=r(16396),me=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a,n){return(0,me.vJ)(r,o,this.layout,e,t,a,n)}}var pe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),we=r(4431),ye=r(1843),Se=r(72824),Me=r(13840),Te=r(98958),Ce=r(16943),Ie=r(33524),_e=r(56133),Pe=r(4576);r(66289);var ze=r(69622),Fe=r(65529),Oe=r(32728);class Ee{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let De=class extends ze.A{constructor(e,t){super(e),this.events=new Fe.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Be(He.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ae,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Ee(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=je,o=Re;t.localTransform.getMat(e,Ne),t.globalTransform.getMat(e,Ge);const a=(0,l.lw)(Ge,Ge,Ne);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Oe.wp)(je,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Re),r.modelOrigin.getVec(e,je),t[0]=Re[0],t[1]=Re[1],t[2]=Re[2],t[3]=0,t[4]=Re[3],t[5]=Re[4],t[6]=Re[5],t[7]=0,t[8]=Re[6],t[9]=Re[7],t[10]=Re[8],t[11]=0,t[12]=je[0],t[13]=je[1],t[14]=je[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(je,this,e),t*=Math.max(je[0],je[1],je[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(je,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(je[0],je[1],je[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ae,Math.floor(this._capacity*Pe.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Ee(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],De.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],De.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],De.prototype,"size",null),De=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],De);const He=(0,ye.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Be(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const je=(0,h.vt)(),Re=(0,s.vt)(),Ne=(0,c.vt)(),Ge=(0,c.vt)(),Ae=64,We=(0,ye.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Le=r(74810),Ve=r(28491),ke=r(90644),Ue=r(49788);class $e extends Se.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Le.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Ue.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Se.gy;let qe=class extends Te.w{constructor(e,t){let o=(0,we.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,we.U)(function(e){return Be(We.clone(),e)}(t)))),super(e,t,o),this.shader=new Me.r(Ve.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,Ie.Yf)(r,!1,e.emissionDimmingPass):null,culling:Ye(e)?(0,ke.Xt)(a):null,depthTest:(0,Ie.mt)(r,Ze(n)),depthWrite:(0,Ie.z5)(e),colorWrite:ke.kn,stencilWrite:i?_e.v0:null,stencilTest:i?t?_e.Ax:_e.cP:null,polygonOffset:(0,pe.sG)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Ze(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,ye.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ce.E)()&&t.vec4u8("olidColor"),t}qe=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],qe);var Xe=r(51976),Ke=r(47724);class Qe extends Ke.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge.Cg)([(0,Xe.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Xe.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends qe{constructor(){super(...arguments),this.shader=new Me.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Xe.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Xe.W)()],rt.prototype,"receiveShadows",void 0);class ot extends q.i{constructor(e,t){super(e,nt),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,A.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,o,a,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case 1:n=(0,d.S8)(ct,dt);break;case 2:n=(0,d.C)(ct,lt)}const i=(0,d.Re)(ht,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(n,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(n,n,u),(0,d.ei)(ut,n,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),a=(0,d.Re)(st,a,ut)}n=(0,pe.b6)(n,this._configuration,o,a),X(e,r,o,a,(0,he.ou)(r.verticalOffset),n)}createGLMaterial(e){return new at(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:a,texture:n,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||a<1||(null!=n||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class at extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:qe,e)}}class nt extends $e{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const it=(0,h.vt)(),st=(0,h.vt)(),lt=(0,h.fA)(0,0,1),ct=(0,h.vt)(),ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.vt)(),mt=()=>F.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ft{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function pt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(mt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(mt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(mt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(mt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else mt().warn("Indexed geometries must specify faces"),o=!1;break}default:mt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(mt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(mt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new H.A(1,2,"wosr");async function wt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){mt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,j.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new ft(r,o,a+(0,O.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new E,i=e.resource,s=H.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!pt(i))continue;const s=xt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,B.tM)(x);p.push([e,new R.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,w=d&&d[b];if(w&&!f.has(b)){const{image:e,parameters:t}=w,r=new G.h(e,t);o.push(r),f.set(b,r)}const y=f.get(b),S=y?y.id:void 0,M=s.material;let T=n.get(M,b);if(null==T){const e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=w?gt(w.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:S,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:w?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new ot(o,t),n.set(M,b,T)}a.push(T);const C=new N.V(T,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));f=await e(new w.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:M,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,f=a.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),f=(0,h.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,w=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(f,m,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[w]=h,p[w+1]=h,p[w+2]=h,p[w+3]=1,w+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(p.buffer)}}}(e,f));const M=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:M,isSchematic:!1,treeRendering:w,mrrFactors:Le.SY}:{usePBR:M,isSchematic:!1,treeRendering:!1,mrrFactors:Le.mb},_={...t.materialParameters,treeRendering:w},P=new Array,z=new Map,F=new Map,O=a.lods.length,E=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(O>1&&0===s||O>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new I(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:f,tangent:p}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,S.x3)(e)?l.compressionOptions:void 0;s.set(t,new G.h((0,S.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,S.x3)(e)&&o,encoding:(0,S.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Le.Jr)(d),w=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Le.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const w=i.get(v);if(r.stageResources.materials.push(w),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(a,e,c,C,_,z,F,t,w),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(a,s,e.transform,3,l);const c=[["position",new R.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(yt,e.transform),(0,g.b)(t,a,yt,3,s),(0,n.or)(yt)&&(0,g.n)(t,t),c.push(["normal",new R.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(yt,e.transform),(0,x.t)(t,a,yt,4,s),(0,n.or)(yt)&&(0,g.n)(t,t,4),c.push(["tangent",new R.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new R.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new R.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new ot({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,m.iT)(E,f.bbMin),(0,m.iT)(E,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:E}}(f,t,s.specifiedLodIndex);return{lods:M,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const yt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
592
592
  void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
593
593
  `)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>n}),r(46686),r(62308);var o=r(77108),a=r(31821);function n(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
594
594
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
@@ -668,7 +668,7 @@ vuvRegion = uvRegion;
668
668
  vNormalWorld = ${(0,s.If)(i,s.H`normalModelTransformation() * `)}normalModel();
669
669
  vNormalView = transformNormalViewFromGlobal * vNormalWorld;
670
670
  }
671
- `);break}case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class d extends i.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class h extends i.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,o.vt)(),this.toMapSpace=(0,a.vt)()}}},62308(e,t,r){r.d(t,{EM:()=>s,dO:()=>i});var o=r(29242),a=r(51850);(r(26425),r(40710),r(33079),r(31821),r(74333)).n,r(98353),r(35644),r(58029),r(63761);var n=r(65786);class i extends n.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,a.vt)(),this.transformWorldFromViewTL=(0,a.vt)(),this.transformViewFromCameraRelativeRS=(0,o.vt)(),this.transformationTexture=null}}class s extends n.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,o.vt)(),this.transformWorldFromModelTH=(0,a.vt)(),this.transformWorldFromModelTL=(0,a.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>i});var o=r(53466),a=r(31821);function n(e){e.fragment.code.add(a.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
671
+ `);break}case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class d extends i.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class h extends i.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,o.vt)(),this.toMapSpace=(0,a.vt)()}}},62308(e,t,r){r.d(t,{EM:()=>s,dO:()=>i});var o=r(29242),a=r(51850);(r(26425),r(40710),r(33079),r(31821),r(74333)).n,r(98353),r(35644),r(58029),r(63761);var n=r(65786);class i extends n.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,a.vt)(),this.transformWorldFromViewTL=(0,a.vt)(),this.transformViewFromCameraRelativeRS=(0,o.vt)()}}class s extends n.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,o.vt)(),this.transformWorldFromModelTH=(0,a.vt)(),this.transformWorldFromModelTL=(0,a.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>i});var o=r(53466),a=r(31821);function n(e){e.fragment.code.add(a.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
672
672
  vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
673
673
  vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
674
674
  float maxdUV = 0.125;
@@ -797,14 +797,14 @@ vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),g&&r.code.a
797
797
  normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
798
798
  0.0, 0.0, 0.0 );
799
799
  rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
800
- }`))}(e,t)}},71651(e,t,r){r.d(t,{n:()=>E});var o=r(31821),a=r(12791),n=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(2016),m=r(48375);var f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var w=r(48163),y=r(65786);class S extends y.Y{constructor(){super(...arguments),this.projScale=1}}class M extends S{constructor(){super(...arguments),this.intensity=1}}class T extends y.Y{}class C extends T{constructor(){super(...arguments),this.blurSize=(0,w.vt)()}}let I=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};I=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],I);var _=r(63907),P=r(76284),z=r(67171);let F=class extends m.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=h.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new M,this._drawParameters=new C}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new z.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new P.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(I),this.techniques.precompile(b)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(_.nI);if(!r||!o)return;const a=this.techniques.getCompiled(I),n=this.techniques.getCompiled(b);if(!a||!n)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,m=u.camera,p=m.relativeElevation,v=(0,i.qE)((5e5-p)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/m.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*O/(0,f.g)(m)**6*x;const w=m.fullViewport[2],y=m.fullViewport[3],S=this.fboCache.acquire(w,y,"ssao input",2);s.bindFramebuffer(S.fbo),s.setViewport(0,0,w,y),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.screen.draw();const M=Math.round(w/2),T=Math.round(y/2),C=this.fboCache.acquire(M,T,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=S.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/y),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,T),s.screen.draw(),S.release();const P=this.fboCache.acquire(M,T,h.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(P.fbo),s.setViewport(0,0,w,y),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/w,0),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,T),s.screen.draw(),s.setViewport4fv(m.fullViewport),C.release(),g<1&&this.requestRender(2),P}};(0,n.Cg)([(0,u.MZ)()],F.prototype,"consumes",void 0),(0,n.Cg)([(0,u.MZ)()],F.prototype,"produces",void 0),F=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],F);const O=.5;function E(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new a.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
800
+ }`))}(e,t)}},71651(e,t,r){r.d(t,{n:()=>E});var o=r(31821),a=r(12791),n=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(2016),m=r(48375);var f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var w=r(48163),y=r(65786);class S extends y.Y{constructor(){super(...arguments),this.projScale=1}}class M extends S{constructor(){super(...arguments),this.intensity=1}}class T extends y.Y{}class C extends T{constructor(){super(...arguments),this.blurSize=(0,w.vt)()}}let I=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};I=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],I);var _=r(63907),P=r(21231),z=r(67171);let F=class extends m.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=h.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new M,this._drawParameters=new C}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new z.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new P.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(I),this.techniques.precompile(b)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(_.nI);if(!r||!o)return;const a=this.techniques.getCompiled(I),n=this.techniques.getCompiled(b);if(!a||!n)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,m=u.camera,p=m.relativeElevation,v=(0,i.qE)((5e5-p)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/m.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*O/(0,f.g)(m)**6*x;const w=m.fullViewport[2],y=m.fullViewport[3],S=this.fboCache.acquire(w,y,"ssao input",2);s.bindFramebuffer(S.fbo),s.setViewport(0,0,w,y),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.screen.draw();const M=Math.round(w/2),T=Math.round(y/2),C=this.fboCache.acquire(M,T,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=S.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/y),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,T),s.screen.draw(),S.release();const P=this.fboCache.acquire(M,T,h.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(P.fbo),s.setViewport(0,0,w,y),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/w,0),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,T),s.screen.draw(),s.setViewport4fv(m.fullViewport),C.release(),g<1&&this.requestRender(2),P}};(0,n.Cg)([(0,u.MZ)()],F.prototype,"consumes",void 0),(0,n.Cg)([(0,u.MZ)()],F.prototype,"produces",void 0),F=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],F);const O=.5;function E(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new a.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
801
801
  vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
802
802
  return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
803
803
  }
804
804
  float evaluateAmbientOcclusion() {
805
805
  return 1.0 - evaluateAmbientOcclusionInverse();
806
806
  }`)):e.code.add(o.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
807
- float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>q,a8:()=>k,eU:()=>U});var o=r(74333);class a extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,a)=>t.setUniform1fv(e,r(a),o),t)}}var n=r(31821);function i(e,t){e.uniforms.add(new a("shR",9,({lighting:e})=>e.sh.r),new a("shG",9,({lighting:e})=>e.sh.g),new a("shB",9,({lighting:e})=>e.sh.b)),e.code.add(n.H`vec3 calculateAmbientIrradiance(vec3 normal) {
807
+ float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>$,a8:()=>k,eU:()=>U});var o=r(74333);class a extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,a)=>t.setUniform1fv(e,r(a),o),t)}}var n=r(31821);function i(e,t){e.uniforms.add(new a("shR",9,({lighting:e})=>e.sh.r),new a("shG",9,({lighting:e})=>e.sh.g),new a("shB",9,({lighting:e})=>e.sh.b)),e.code.add(n.H`vec3 calculateAmbientIrradiance(vec3 normal) {
808
808
  vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
809
809
  vec4 sh1 = vec4(
810
810
  0.488603 * normal.x,
@@ -840,7 +840,7 @@ vec3 calculateAmbientRadiance()
840
840
  {
841
841
  vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
842
842
  return ambientLight *= skyTransmittance;
843
- }`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),f=r(5482),p=(r(44208),r(53966)),v=r(97768),g=r(17676),x=r(36708),b=r(91429),w=r(37585),y=r(31217),S=r(2016),M=r(48375),T=r(587),C=r(52516),I=r(13840),_=r(98958),P=r(90644);let z=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(C.a,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};z=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],z);let F=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(T.a,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};F=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],F);var O=r(51976);class E extends O.K{constructor(){super(...arguments),this.hasEmission=!1}}(0,f.Cg)([(0,O.W)()],E.prototype,"hasEmission",void 0);var D=r(50704);let H=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(D.a,()=>r.e(7891).then(r.bind(r,37891)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};H=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],H);var B=r(63907),j=r(76284),R=r(67171);let N=class extends M.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=S.OG.AMBIENT_ILLUMINATION,this._passParameters=new T.G,this._drawParameters=new C.G,this._drawParametersUpscale=new D.G,this._maxFrames=255,this._configuration=new E,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await r.e(5354).then(r.bind(r,45354))).data;(0,g.Te)(e),await this._loadBlueNoiseTexture(t,e),(0,g.Te)(e)}catch(e){(0,g.zf)(e)||p.A.getLogger(this).errorOnce("Failed to load blue noise texture:",e)}this.addHandles((0,x.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this.resetAccumulation(),this.requestRender(1)},x.pc))}precompile(){this._canRender&&(this._configuration.hasEmission=this.bindParameters.hasEmission,this.techniques.precompile(F,this._configuration),this.techniques.precompile(z),this._needsUpscalePass(this._mode)&&this.techniques.precompile(H))}destroy(){this._abortController=(0,v.DC)(this._abortController),this._passParameters.noiseTexture=(0,v.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(B.nI),a=this._mode;if(!r||!o)return this._emptyOutput;if(this.view.stage.renderView.updating&&this.resetAccumulation(),0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=n.hasEmission;const i=this.techniques.getCompiled(F,this._configuration),s=this.techniques.getCompiled(z),l=this._needsUpscalePass(a),c=l?.25:1,u=l?this.techniques.getCompiled(H):null;if(!i||!s||l&&!u)return this.requestRender(1),this._emptyOutput;const d=this.renderingContext,{camera:h}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:f}=h,p=Math.max(1,Math.floor(m*c)),v=Math.max(1,Math.floor(f*c)),g=this.fboCache.acquire(p,v,"global illumination input").acquireColor(B.yI,0);d.bindFramebuffer(g.fbo),d.setViewport(0,0,p,v),d.bindTechnique(i,n,this._passParameters,this._drawParameters),d.screen.draw();const x=g.obtainAttachment(B.yI),b=Math.max(1,Math.round(p/1)),y=Math.max(1,Math.round(v/1)),M=this.fboCache.acquire(b,y,"global illumination blur horizontal");d.bindFramebuffer(M.fbo),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=x.attachment,(0,w.hZ)(this._drawParameters.blurSize,0,1/v),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,b,y),d.screen.draw(),g.release();const T=l?"global illumination blur vertical":S.OG.AMBIENT_ILLUMINATION,C=this.fboCache.acquire(b,y,T);d.bindFramebuffer(C.fbo),d.setViewport(0,0,b,y),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=M.getTexture(),this._drawParameters.weightTexture=x.attachment,(0,w.hZ)(this._drawParameters.blurSize,1/b,0),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,b,y),d.screen.draw(),M.release(),C.attachColor(x,B.yI),x.release();let I=C;return u&&(I=this.fboCache.acquire(m,f,S.OG.AMBIENT_ILLUMINATION).acquireColor(B.yI,0),d.bindFramebuffer(I.fbo),d.setViewport(0,0,m,f),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=C.getTexture(),this._drawParametersUpscale.weightTexture=C.getTexture(B.yI),d.bindTechnique(u,n,this._passParameters,this._drawParametersUpscale),d.screen.draw(),C.release()),d.setViewport4fv(h.fullViewport),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this.requestRender(1),I}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,S.OG.AMBIENT_ILLUMINATION).acquireColor(B.yI,0);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),o}async _loadBlueNoiseTexture(e,t){(0,g.Te)(t);const r=await(0,y.D)(e,{signal:t});if((0,g.Te)(t),!r)return;const o=new R.R;o.internalFormat=B.H0.RGBA8,o.wrapMode=10497,o.isImmutable=!0,this._passParameters.noiseTexture=new j.A(this.renderingContext,o,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}resetAccumulation(){this._passParameters.accumulatedFrames=0}_needsUpscalePass(e){return 1===e}get test(){}};function G(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new h.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() {
843
+ }`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),f=r(5482),p=(r(44208),r(53966)),v=r(97768),g=r(17676),x=r(36708),b=r(91429),w=r(37585),y=r(31217),S=r(2016),M=r(48375),T=r(587),C=r(52516),I=r(13840),_=r(98958),P=r(90644);let z=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(C.a,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};z=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],z);let F=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(T.a,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};F=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],F);var O=r(51976);class E extends O.K{constructor(){super(...arguments),this.hasEmission=!1}}(0,f.Cg)([(0,O.W)()],E.prototype,"hasEmission",void 0);var D=r(50704);let H=class extends _.w{constructor(){super(...arguments),this.shader=new I.r(D.a,()=>r.e(7891).then(r.bind(r,37891)))}initializePipeline(){return(0,P.Ey)({colorWrite:P.kn})}};H=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],H);var B=r(63907),j=r(21231),R=r(67171);let N=class extends M.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=S.OG.AMBIENT_ILLUMINATION,this._passParameters=new T.G,this._drawParameters=new C.G,this._drawParametersUpscale=new D.G,this._maxFrames=255,this._configuration=new E,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await r.e(5354).then(r.bind(r,45354))).data;(0,g.Te)(e),await this._loadBlueNoiseTexture(t,e),(0,g.Te)(e)}catch(e){(0,g.zf)(e)||p.A.getLogger(this).errorOnce("Failed to load blue noise texture:",e)}this.addHandles((0,x.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this.resetAccumulation(),this.requestRender(1)},x.pc))}precompile(){this._canRender&&(this._configuration.hasEmission=this.bindParameters.hasEmission,this.techniques.precompile(F,this._configuration),this.techniques.precompile(z),this._needsUpscalePass(this._mode)&&this.techniques.precompile(H))}destroy(){this._abortController=(0,v.DC)(this._abortController),this._passParameters.noiseTexture=(0,v.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(B.nI),a=this._mode;if(!r||!o)return this._emptyOutput;if(this.view.stage.renderView.updating&&this.resetAccumulation(),0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=n.hasEmission;const i=this.techniques.getCompiled(F,this._configuration),s=this.techniques.getCompiled(z),l=this._needsUpscalePass(a),c=l?.25:1,u=l?this.techniques.getCompiled(H):null;if(!i||!s||l&&!u)return this.requestRender(1),this._emptyOutput;const d=this.renderingContext,{camera:h}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:f}=h,p=Math.max(1,Math.floor(m*c)),v=Math.max(1,Math.floor(f*c)),g=this.fboCache.acquire(p,v,"global illumination input").acquireColor(B.yI,0);d.bindFramebuffer(g.fbo),d.setViewport(0,0,p,v),d.bindTechnique(i,n,this._passParameters,this._drawParameters),d.screen.draw();const x=g.obtainAttachment(B.yI),b=Math.max(1,Math.round(p/1)),y=Math.max(1,Math.round(v/1)),M=this.fboCache.acquire(b,y,"global illumination blur horizontal");d.bindFramebuffer(M.fbo),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=x.attachment,(0,w.hZ)(this._drawParameters.blurSize,0,1/v),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,b,y),d.screen.draw(),g.release();const T=l?"global illumination blur vertical":S.OG.AMBIENT_ILLUMINATION,C=this.fboCache.acquire(b,y,T);d.bindFramebuffer(C.fbo),d.setViewport(0,0,b,y),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=M.getTexture(),this._drawParameters.weightTexture=x.attachment,(0,w.hZ)(this._drawParameters.blurSize,1/b,0),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,b,y),d.screen.draw(),M.release(),C.attachColor(x,B.yI),x.release();let I=C;return u&&(I=this.fboCache.acquire(m,f,S.OG.AMBIENT_ILLUMINATION).acquireColor(B.yI,0),d.bindFramebuffer(I.fbo),d.setViewport(0,0,m,f),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=C.getTexture(),this._drawParametersUpscale.weightTexture=C.getTexture(B.yI),d.bindTechnique(u,n,this._passParameters,this._drawParametersUpscale),d.screen.draw(),C.release()),d.setViewport4fv(h.fullViewport),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this.requestRender(1),I}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,S.OG.AMBIENT_ILLUMINATION).acquireColor(B.yI,0);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),o}async _loadBlueNoiseTexture(e,t){(0,g.Te)(t);const r=await(0,y.D)(e,{signal:t});if((0,g.Te)(t),!r)return;const o=new R.R;o.internalFormat=B.H0.RGBA8,o.wrapMode=10497,o.isImmutable=!0,this._passParameters.noiseTexture=new j.A(this.renderingContext,o,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}resetAccumulation(){this._passParameters.accumulatedFrames=0}_needsUpscalePass(e){return 1===e}get test(){}};function G(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new h.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() {
844
844
  if (!hasGlobalIlluminationTexture) {
845
845
  return vec3(1.0);
846
846
  }
@@ -889,7 +889,7 @@ float newPeak = 1.0 - d * d / ( peak + d - startCompression );
889
889
  color *= newPeak / peak;
890
890
  float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
891
891
  return mix( color, vec3( newPeak ), g );
892
- }`)}function k(e){e.constants.add("ambientBoostFactor","float",W.uH)}function U(e){e.uniforms.add(new A.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function q(e,t){const{pbrMode:r,spherical:o,hasColorTexture:a,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(G,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(V,t);const f=!(2===r&&!a);f&&e.include(L),k(e),U(e),(0,c.Gc)(e),e.code.add(n.H`
892
+ }`)}function k(e){e.constants.add("ambientBoostFactor","float",W.uH)}function U(e){e.uniforms.add(new A.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function $(e,t){const{pbrMode:r,spherical:o,hasColorTexture:a,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(G,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(V,t);const f=!(2===r&&!a);f&&e.include(L),k(e),U(e),(0,c.Gc)(e),e.code.add(n.H`
893
893
  float additionalDirectedAmbientLight(float lightAlignment) {
894
894
  return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
895
895
  }