@arcgis/core 5.0.0-next.42 → 5.0.0-next.44

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 (384) hide show
  1. package/applications/Components/imageryUtils.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{f97a7cb367634353177d.js → 001a7a4cf6fe74432ed6.js} +1 -1
  5. package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +1 -0
  6. package/assets/esri/core/workers/chunks/04a0685ee53ef74883aa.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c320a29df40e85fb4a8e.js → 15a0750c10b510564a42.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{9d95f38da21f97214f83.js → 1e0e7cef7ef947894bbe.js} +10 -10
  9. package/assets/esri/core/workers/chunks/20ad34f9d45c64392022.js +1 -0
  10. package/assets/esri/core/workers/chunks/23396a6318edf9264c1f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{816227de5bd42b437df4.js → 233f9eb617f3d72995b5.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{fb9643b74cf35221ff98.js → 249504f7d356be80d214.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ad891ac388fa6c1c9b94.js → 2b34a010f76e5f289868.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2ef4c0092c59a98a5532.js +1 -0
  15. package/assets/esri/core/workers/chunks/35272810c2ed04eb403d.js +1 -0
  16. package/assets/esri/core/workers/chunks/{4f4d51181ae7db9fbe6d.js → 4404b6f931f681cca342.js} +1 -1
  17. package/assets/esri/core/workers/chunks/555a0ea44ba77819d493.js +1 -0
  18. package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d1f4152b2b8d47cbf586.js → 72fbee59d5d909615408.js} +1 -1
  20. package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +1 -0
  21. package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +1 -0
  22. package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +1 -0
  23. package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +1 -0
  24. package/assets/esri/core/workers/chunks/{da517b4b07d4d27ce94c.js → 8e26831f71634288f834.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{c367c7e553be3682f2db.js → 93c5f097bb7b380bb175.js} +1 -1
  26. package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +1 -0
  27. package/assets/esri/core/workers/chunks/9c7682b300b877f60095.js +1 -0
  28. package/assets/esri/core/workers/chunks/a2442549c5daf3653eb4.js +1 -0
  29. package/assets/esri/core/workers/chunks/a7cd795042ebb8585906.js +1 -0
  30. package/assets/esri/core/workers/chunks/{f3b3b193959db809c8c6.js → ab520fd1ae917daf07d8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{2c9865e34f32fb5683e5.js → af8d6e6949930d0e6c7b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/c9942ca57f542582ab4d.js +1 -0
  33. package/assets/esri/core/workers/chunks/ca1c65eb7f5900c60170.js +1 -0
  34. package/assets/esri/core/workers/chunks/cddce67919e13e2f365e.js +1 -0
  35. package/assets/esri/core/workers/chunks/da2ba40bc017bff0fe49.js +1 -0
  36. package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +1 -0
  37. package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +1 -0
  38. package/assets/esri/core/workers/chunks/e8a9971c8354569cb81d.js +1 -0
  39. package/assets/esri/core/workers/chunks/{96f798ee286b59396131.js → ea3cba01c60d9bc72719.js} +1 -1
  40. package/assets/esri/core/workers/chunks/ed550bf27f2bbf8d30fa.js +1 -0
  41. package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +1 -0
  42. package/assets/esri/core/workers/chunks/{1357cc637524cd254974.js → ffcdc7ae03b0570e0db8.js} +1 -1
  43. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  44. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  45. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
  46. package/assets/esri/themes/dark/main.css +1 -1
  47. package/assets/esri/themes/light/main.css +1 -1
  48. package/assets/esri/themes/light/view.css +1 -1
  49. package/config.js +1 -1
  50. package/core/PooledArray.js +1 -1
  51. package/geometry/FlatGeometry.js +1 -1
  52. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  53. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  54. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  55. package/interfaces.d.ts +109 -37
  56. package/kernel.js +1 -1
  57. package/layers/ImageryTileLayer.js +1 -1
  58. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  59. package/layers/WCSLayer.js +1 -1
  60. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  61. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  62. package/layers/mixins/ArcGISImageService.js +1 -1
  63. package/layers/mixins/ImageryTileMixin.js +1 -1
  64. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  65. package/layers/ogc/wcsUtils.js +1 -1
  66. package/layers/raster/datasets/BaseRaster.js +5 -0
  67. package/layers/raster/datasets/CovJSONRaster.js +5 -0
  68. package/layers/raster/datasets/FunctionRaster.js +5 -0
  69. package/layers/raster/datasets/ImageAuxRaster.js +5 -0
  70. package/layers/raster/datasets/ImageServerRaster.js +5 -0
  71. package/layers/raster/datasets/InMemoryRaster.js +5 -0
  72. package/layers/raster/datasets/MRFRaster.js +5 -0
  73. package/layers/raster/datasets/RawBlockCache.js +5 -0
  74. package/layers/raster/datasets/TIFFRaster.js +5 -0
  75. package/layers/raster/datasets/WCSRaster.js +5 -0
  76. package/layers/raster/datasets/covJSONParser.js +5 -0
  77. package/layers/raster/datasets/multidimensionalUtils.js +5 -0
  78. package/layers/raster/datasets/pamParser.js +5 -0
  79. package/layers/raster/datasets/pixelReader.js +5 -0
  80. package/layers/raster/datasets/wcsCoverageParser.js +5 -0
  81. package/layers/raster/formats/Lerc.js +5 -0
  82. package/layers/raster/formats/Qb3.js +5 -0
  83. package/layers/raster/formats/RasterCodec.js +5 -0
  84. package/layers/raster/formats/TiffDecoder.js +5 -0
  85. package/layers/raster/functions/ArithmeticFunction.js +5 -0
  86. package/layers/{support/rasterFunctions → raster/functions}/ArithmeticFunctionArguments.js +1 -1
  87. package/layers/{support/rasterFunctions → raster/functions}/AspectFunction.js +1 -1
  88. package/layers/{support/rasterFunctions → raster/functions}/AspectFunctionArguments.js +1 -1
  89. package/layers/raster/functions/BandArithmeticFunction.js +5 -0
  90. package/layers/{support/rasterFunctions → raster/functions}/BandArithmeticFunctionArguments.js +1 -1
  91. package/layers/{support/rasterFunctions → raster/functions}/BaseFunctionArguments.js +1 -1
  92. package/layers/raster/functions/BaseRasterFunction.js +5 -0
  93. package/layers/{support/rasterFunctions → raster/functions}/ClipFunction.js +1 -1
  94. package/layers/{support/rasterFunctions → raster/functions}/ClipFunctionArguments.js +1 -1
  95. package/layers/raster/functions/ColormapFunction.js +5 -0
  96. package/layers/{support/rasterFunctions → raster/functions}/ColormapFunctionArguments.js +1 -1
  97. package/layers/raster/functions/ColormapToRGBFunction.js +5 -0
  98. package/layers/{support/rasterFunctions → raster/functions}/ColormapToRGBFunctionArguments.js +1 -1
  99. package/layers/raster/functions/CompositeBandFunction.js +5 -0
  100. package/layers/raster/functions/CompositeBandFunctionArguments.js +5 -0
  101. package/layers/raster/functions/ComputeChangeFunction.js +5 -0
  102. package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js +1 -1
  103. package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunction.js +1 -1
  104. package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js +1 -1
  105. package/layers/raster/functions/ConvolutionFunction.js +5 -0
  106. package/layers/raster/functions/ConvolutionFunctionArguments.js +5 -0
  107. package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunction.js +1 -1
  108. package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunctionArguments.js +1 -1
  109. package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunction.js +1 -1
  110. package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunctionArguments.js +1 -1
  111. package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunction.js +1 -1
  112. package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunctionArguments.js +1 -1
  113. package/layers/raster/functions/HillshadeFunction.js +5 -0
  114. package/layers/{support/rasterFunctions → raster/functions}/HillshadeFunctionArguments.js +1 -1
  115. package/layers/raster/functions/LocalFunction.js +5 -0
  116. package/layers/{support/rasterFunctions → raster/functions}/LocalFunctionArguments.js +1 -1
  117. package/layers/{support/rasterFunctions → raster/functions}/MaskFunction.js +1 -1
  118. package/layers/{support/rasterFunctions → raster/functions}/MaskFunctionArguments.js +1 -1
  119. package/layers/{support/rasterFunctions → raster/functions}/NDVIFunction.js +1 -1
  120. package/layers/{support/rasterFunctions → raster/functions}/NDVIFunctionArguments.js +1 -1
  121. package/layers/raster/functions/RemapFunction.js +5 -0
  122. package/layers/{support/rasterFunctions → raster/functions}/RemapFunctionArguments.js +1 -1
  123. package/layers/raster/functions/ShadedReliefFunction.js +5 -0
  124. package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js +1 -1
  125. package/layers/raster/functions/SlopeFunction.js +5 -0
  126. package/layers/{support/rasterFunctions → raster/functions}/SlopeFunctionArguments.js +1 -1
  127. package/layers/raster/functions/StatisticsFunction.js +5 -0
  128. package/layers/{support/rasterFunctions → raster/functions}/StatisticsFunctionArguments.js +1 -1
  129. package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunction.js +1 -1
  130. package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js +1 -1
  131. package/layers/raster/functions/StretchFunction.js +5 -0
  132. package/layers/{support/rasterFunctions → raster/functions}/StretchFunctionArguments.js +1 -1
  133. package/layers/{support/rasterFunctions → raster/functions}/TableFunction.js +1 -1
  134. package/layers/{support/rasterFunctions → raster/functions}/TableFunctionArguments.js +1 -1
  135. package/layers/raster/functions/bandIndexUtils.js +5 -0
  136. package/layers/raster/functions/changeDetectionUtils.js +5 -0
  137. package/layers/raster/functions/clipUtils.js +5 -0
  138. package/layers/raster/functions/conversionUtils.js +5 -0
  139. package/layers/raster/functions/convolutionUtils.js +5 -0
  140. package/layers/raster/functions/creators/createDataManagementFunctions.js +5 -0
  141. package/layers/raster/functions/creators/utils.js +5 -0
  142. package/layers/raster/functions/focalStatUtils.js +5 -0
  143. package/layers/raster/functions/localUtils.js +5 -0
  144. package/layers/raster/functions/pixelTransformUtils.js +5 -0
  145. package/layers/raster/functions/pixelUtils.js +5 -0
  146. package/layers/raster/functions/stretchUtils.js +5 -0
  147. package/layers/raster/functions/surfaceUtils.js +5 -0
  148. package/layers/raster/functions/vectorFieldUtils.js +5 -0
  149. package/layers/raster/transforms/BaseRasterTransform.js +5 -0
  150. package/layers/{support/rasterTransforms → raster/transforms}/GCSShiftTransform.js +1 -1
  151. package/layers/{support/rasterTransforms → raster/transforms}/IdentityTransform.js +1 -1
  152. package/layers/{support/rasterTransforms → raster/transforms}/PolynomialTransform.js +1 -1
  153. package/layers/save/imageryUtils.js +1 -1
  154. package/layers/support/PixelBlock.js +1 -1
  155. package/layers/support/RasterWorker.js +1 -1
  156. package/layers/support/imageryRendererUtils.js +1 -1
  157. package/layers/support/rasterFunctionUtils.js +1 -1
  158. package/package.json +1 -1
  159. package/renderers/VectorFieldRenderer.js +1 -1
  160. package/renderers/support/RasterSymbolizer.js +1 -1
  161. package/renderers/support/rasterRendererHelper.js +1 -1
  162. package/rest/locator/addressToLocations.js +1 -1
  163. package/rest/locator/addressesToLocations.js +1 -1
  164. package/rest/locator/suggestLocations.js +1 -1
  165. package/rest/networks/support/Association.js +1 -1
  166. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  167. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  168. package/support/revision.js +1 -1
  169. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  170. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  171. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
  172. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
  173. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  174. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  175. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  176. package/views/2d/engine/webgl/textureUtils.js +1 -1
  177. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  178. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  179. package/views/2d/layers/MediaLayerView2D.js +1 -1
  180. package/views/2d/layers/TileLayerView2D.js +1 -1
  181. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  182. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  183. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  184. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  185. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  186. package/views/3d/glTF/LoaderResult.js +1 -1
  187. package/views/3d/glTF/internal/Resource.js +1 -1
  188. package/views/3d/glTF/loader.js +1 -1
  189. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  190. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  191. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  192. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  193. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  195. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  196. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  197. package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
  198. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  199. package/views/3d/support/buffer/glUtil.js +1 -1
  200. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  201. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  202. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  203. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  204. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  205. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  206. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -10
  207. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
  209. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  210. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  211. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  212. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  213. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  214. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  215. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  216. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  217. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  218. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  219. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  220. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  221. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  222. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  223. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  224. package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
  225. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  226. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  227. package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
  228. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  229. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  230. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  231. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +9 -9
  232. package/views/DOMContainer.js +1 -1
  233. package/views/GroundView.js +1 -1
  234. package/views/VideoView.js +1 -1
  235. package/views/layers/ImageryLayerViewMixin.js +1 -1
  236. package/views/layers/ImageryTileLayerViewMixin.js +1 -1
  237. package/views/support/imageReprojection.js +1 -1
  238. package/views/webgl/ShaderBuilder.js +1 -1
  239. package/views/webgl/Util.js +1 -1
  240. package/views/webgl/VertexElementDescriptor.js +1 -1
  241. package/widgets/BatchAttributeForm.js +1 -1
  242. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  243. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  244. package/widgets/CoordinateConversion.js +1 -1
  245. package/widgets/DirectLineMeasurement3D.js +1 -1
  246. package/widgets/DistanceMeasurement2D.js +1 -1
  247. package/widgets/Editor/EditorViewModel.js +1 -1
  248. package/widgets/Editor.js +1 -1
  249. package/widgets/ElevationProfile.js +1 -1
  250. package/widgets/Feature.js +1 -1
  251. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  252. package/widgets/FeatureForm.js +1 -1
  253. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  254. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  255. package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
  256. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  257. package/widgets/FeatureTable.js +1 -1
  258. package/widgets/FeatureTemplates.js +1 -1
  259. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  260. package/widgets/Legend.js +1 -1
  261. package/widgets/LineOfSight.js +1 -1
  262. package/widgets/Locate.js +1 -1
  263. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  264. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  265. package/widgets/PanoramicViewer/support/importUtils.js +1 -1
  266. package/widgets/Print.js +1 -1
  267. package/widgets/ScaleBar.js +1 -1
  268. package/widgets/ScaleRangeSlider.js +1 -1
  269. package/widgets/Search/SearchResultRenderer.js +1 -1
  270. package/widgets/Search/SearchViewModel.js +1 -1
  271. package/widgets/Search/types.js +1 -1
  272. package/widgets/Search.js +1 -1
  273. package/widgets/ShadowCast.js +1 -1
  274. package/widgets/Sketch/SketchViewModel.js +1 -1
  275. package/widgets/Sketch.js +1 -1
  276. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  277. package/assets/esri/core/workers/chunks/0a5427127634738aa239.js +0 -1
  278. package/assets/esri/core/workers/chunks/110429583b28c28c36ee.js +0 -1
  279. package/assets/esri/core/workers/chunks/145c6a7cdcc9893efb27.js +0 -1
  280. package/assets/esri/core/workers/chunks/1bacdd17e199e22b5cd1.js +0 -1
  281. package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +0 -1
  282. package/assets/esri/core/workers/chunks/1f6ead46b723630db897.js +0 -1
  283. package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +0 -1
  284. package/assets/esri/core/workers/chunks/478def691ae6763686f3.js +0 -1
  285. package/assets/esri/core/workers/chunks/4c4a55be41ba105c091c.js +0 -1
  286. package/assets/esri/core/workers/chunks/4cbf5a97b2b3c6553f6f.js +0 -1
  287. package/assets/esri/core/workers/chunks/5dc0d853c21ccb6054c7.js +0 -1
  288. package/assets/esri/core/workers/chunks/613cbac9cb925cd20b48.js +0 -1
  289. package/assets/esri/core/workers/chunks/646f58b69d2354f1ef27.js +0 -1
  290. package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +0 -1
  291. package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +0 -1
  292. package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +0 -1
  293. package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +0 -1
  294. package/assets/esri/core/workers/chunks/ba59568e748f0ba53b78.js +0 -1
  295. package/assets/esri/core/workers/chunks/c4de24582c29fda5a033.js +0 -1
  296. package/assets/esri/core/workers/chunks/d786b17cc9062b1450ac.js +0 -1
  297. package/assets/esri/core/workers/chunks/d9958654c6438f28237b.js +0 -1
  298. package/assets/esri/core/workers/chunks/e6fa6f9c278589c8a713.js +0 -1
  299. package/assets/esri/core/workers/chunks/e7f4d135ef9665de1468.js +0 -1
  300. package/assets/esri/core/workers/chunks/f21cb5b34d4d1e3af1a9.js +0 -1
  301. package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +0 -1
  302. package/layers/support/rasterDatasets/BaseRaster.js +0 -5
  303. package/layers/support/rasterDatasets/CovJSONRaster.js +0 -5
  304. package/layers/support/rasterDatasets/FunctionRaster.js +0 -5
  305. package/layers/support/rasterDatasets/ImageAuxRaster.js +0 -5
  306. package/layers/support/rasterDatasets/ImageServerRaster.js +0 -5
  307. package/layers/support/rasterDatasets/InMemoryRaster.js +0 -5
  308. package/layers/support/rasterDatasets/MRFRaster.js +0 -5
  309. package/layers/support/rasterDatasets/RawBlockCache.js +0 -5
  310. package/layers/support/rasterDatasets/TIFFRaster.js +0 -5
  311. package/layers/support/rasterDatasets/WCSRaster.js +0 -5
  312. package/layers/support/rasterDatasets/covJSONParser.js +0 -5
  313. package/layers/support/rasterDatasets/multidimensionalUtils.js +0 -5
  314. package/layers/support/rasterDatasets/pamParser.js +0 -5
  315. package/layers/support/rasterDatasets/pixelReader.js +0 -5
  316. package/layers/support/rasterDatasets/wcsCoverageParser.js +0 -5
  317. package/layers/support/rasterFormats/Lerc.js +0 -5
  318. package/layers/support/rasterFormats/Qb3.js +0 -5
  319. package/layers/support/rasterFormats/RasterCodec.js +0 -5
  320. package/layers/support/rasterFormats/TiffDecoder.js +0 -5
  321. package/layers/support/rasterFunctions/ArithmeticFunction.js +0 -5
  322. package/layers/support/rasterFunctions/BandArithmeticFunction.js +0 -5
  323. package/layers/support/rasterFunctions/BaseRasterFunction.js +0 -5
  324. package/layers/support/rasterFunctions/ColormapFunction.js +0 -5
  325. package/layers/support/rasterFunctions/ColormapToRGBFunction.js +0 -5
  326. package/layers/support/rasterFunctions/CompositeBandFunction.js +0 -5
  327. package/layers/support/rasterFunctions/CompositeBandFunctionArguments.js +0 -5
  328. package/layers/support/rasterFunctions/ComputeChangeFunction.js +0 -5
  329. package/layers/support/rasterFunctions/ConvolutionFunction.js +0 -5
  330. package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +0 -5
  331. package/layers/support/rasterFunctions/HillshadeFunction.js +0 -5
  332. package/layers/support/rasterFunctions/LocalFunction.js +0 -5
  333. package/layers/support/rasterFunctions/RemapFunction.js +0 -5
  334. package/layers/support/rasterFunctions/ShadedReliefFunction.js +0 -5
  335. package/layers/support/rasterFunctions/SlopeFunction.js +0 -5
  336. package/layers/support/rasterFunctions/StatisticsFunction.js +0 -5
  337. package/layers/support/rasterFunctions/StretchFunction.js +0 -5
  338. package/layers/support/rasterFunctions/bandIndexUtils.js +0 -5
  339. package/layers/support/rasterFunctions/changeDetectionUtils.js +0 -5
  340. package/layers/support/rasterFunctions/clipUtils.js +0 -5
  341. package/layers/support/rasterFunctions/conversionUtils.js +0 -5
  342. package/layers/support/rasterFunctions/convolutionUtils.js +0 -5
  343. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +0 -5
  344. package/layers/support/rasterFunctions/creators/utils.js +0 -5
  345. package/layers/support/rasterFunctions/focalStatUtils.js +0 -5
  346. package/layers/support/rasterFunctions/localUtils.js +0 -5
  347. package/layers/support/rasterFunctions/pixelTransformUtils.js +0 -5
  348. package/layers/support/rasterFunctions/pixelUtils.js +0 -5
  349. package/layers/support/rasterFunctions/stretchUtils.js +0 -5
  350. package/layers/support/rasterFunctions/surfaceUtils.js +0 -5
  351. package/layers/support/rasterFunctions/vectorFieldUtils.js +0 -5
  352. package/layers/support/rasterTransforms/BaseRasterTransform.js +0 -5
  353. /package/assets/esri/layers/{support/rasterFormats → raster/formats}/lerc-wasm.wasm +0 -0
  354. /package/assets/esri/layers/{support/rasterFormats → raster/formats}/qb3-wasm.wasm +0 -0
  355. /package/layers/{support/rasterDatasets → raster/datasets}/DBFParser.js +0 -0
  356. /package/layers/{support/rasterDatasets → raster/datasets}/EphemeralBlockCache.js +0 -0
  357. /package/layers/{support/rasterDatasets → raster/datasets}/RasterFactory.js +0 -0
  358. /package/layers/{support/rasterDatasets → raster/datasets}/byteStreamUtils.js +0 -0
  359. /package/layers/{support/rasterDatasets → raster/datasets}/datasetUtils.js +0 -0
  360. /package/layers/{support/rasterDatasets → raster/datasets}/multipartParser.js +0 -0
  361. /package/layers/{support/rasterDatasets → raster/datasets}/wcsCapabilitiesParser.js +0 -0
  362. /package/layers/{support/rasterDatasets → raster/datasets}/xmlUtilities.js +0 -0
  363. /package/layers/{support/rasterFormats → raster/formats}/ImageCanvasDecoder.js +0 -0
  364. /package/layers/{support/rasterFormats → raster/formats}/JpgPlus.js +0 -0
  365. /package/layers/{support/rasterFormats → raster/formats}/Lzw.js +0 -0
  366. /package/layers/{support/rasterFormats → raster/formats}/Raw.js +0 -0
  367. /package/layers/{support/rasterFormats → raster/formats}/pixelRangeUtils.js +0 -0
  368. /package/layers/{support/rasterFormats → raster/formats}/tiffTag.js +0 -0
  369. /package/layers/{support/rasterFormats → raster/formats}/utils.js +0 -0
  370. /package/layers/{support/rasterFunctions → raster/functions}/colormaps.js +0 -0
  371. /package/layers/{support/rasterFunctions → raster/functions}/creators/createAppearenceFunctions.js +0 -0
  372. /package/layers/{support/rasterFunctions → raster/functions}/creators/createBandIndexFunctions.js +0 -0
  373. /package/layers/{support/rasterFunctions → raster/functions}/creators/createChangeFunctions.js +0 -0
  374. /package/layers/{support/rasterFunctions → raster/functions}/creators/createConversionFunctions.js +0 -0
  375. /package/layers/{support/rasterFunctions → raster/functions}/creators/createLocalFunctions.js +0 -0
  376. /package/layers/{support/rasterFunctions → raster/functions}/creators/createMultiRasterAnalysisFunctions.js +0 -0
  377. /package/layers/{support/rasterFunctions → raster/functions}/creators/createStatisticsFunctions.js +0 -0
  378. /package/layers/{support/rasterFunctions → raster/functions}/creators/createSurfaceFunctions.js +0 -0
  379. /package/layers/{support/rasterFunctions → raster/functions}/customBandIndexUtils.js +0 -0
  380. /package/layers/{support/rasterFunctions → raster/functions}/mirror.js +0 -0
  381. /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionHelper.js +0 -0
  382. /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionSchema.js +0 -0
  383. /package/layers/{support/rasterFunctions → raster/functions}/rasterProjectionHelper.js +0 -0
  384. /package/layers/{support/rasterTransforms → raster/transforms}/utils.js +0 -0
@@ -313,4 +313,4 @@ gl_Position = posProjCenter;
313
313
  gl_PointSize = 1.0;`),o.main.add(s.H`fragColor = vec4(1);
314
314
  if(discardByTerrainDepth()) {
315
315
  fragColor.g = 0.5;
316
- }`)}},64183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Bi});var i=r(31635),n=r(65529),s=r(74887),o=r(36708),a=r(91429),l=r(5443),c=r(91218),u=r(16930),d=r(56390),h=r(61956),f=r(65494);class p{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new p(e,e.createRenderCommandBuffer(),t)}}var m=r(68197),y=r(18574),g=r(87403),b=r(28975);function _(){return new y.A({material:new b.N({color:new m.A("red")})})}var v=r(9093),w=r(51850),x=r(91829),C=r(6847),S=r(86211),A=r(58083),T=r(87317),I=r(70328),P=r(19419),B=(r(12359),r(95108),r(27615),r(52106),r(44208));r(4718),r(34275),r(65864);var E=r(37585),M=r(48163),O=r(34727),R=r(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const D=[];{const e=16;for(let t=0;t<360;t+=360/e)D.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const F=Object.freeze({"bottom-left":(0,M.fA)(0,0),bottom:(0,M.fA)(.5,0),"bottom-right":(0,M.fA)(1,0),left:(0,M.fA)(0,.5),center:(0,M.fA)(.5,.5),right:(0,M.fA)(1,.5),"top-left":(0,M.fA)(0,1),top:(0,M.fA)(.5,1),"top-right":(0,M.fA)(1,1)});var j=r(9762),V=r(27993);function z(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function L(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function U(e,t){const r=t.viewSpatialReference,i=t.renderSpatialReference,{extent:n}=e,s=(0,P.gX)(n),o=(0,w.vt)();return(0,V.F)([s[0],s[1],0],r,o,i),o}var N=r(97146);function H(e){const t=new Map;for(const[r,i]of e)t.set(r,{...i,indices:(0,N.Dg)(i.indices)});return t}r(46859);var q=r(63907);const G=(0,x.CN)(.25,.25,.75,.75);function k(e){return"cross"===e||"x"===e}function $(e,t=128,r=.5*t,i=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return Q(e,X(r,r,t/2))}(t,r);case"square":return function(e,t){return Y(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return Z(e,t,!1,r)}(t,r,i);case"x":return function(e,t,r=0){return Z(e,t,!0,r)}(t,r,i);case"kite":return function(e,t){return Y(e,t,!0)}(t,r);case"triangle":return function(e,t){return Q(e,W(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,i=t/2,n=e/2,s=.8*r,o=X(n,(e-t)/2-s,Math.sqrt(s*s+i*i)),a=W(n,r,i);return Q(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,r)}}function Y(e,t,r){return r&&(t/=Math.SQRT2),Q(e,(i,n)=>{let s=i-.5*e+.25,o=.5*e-n-.75;if(r){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function Z(e,t,r,i=0){t-=i,r&&(t*=Math.SQRT2);const n=.5*t;return Q(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(r){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>n?Math.sqrt((a-n)*(a-n)+l*l):l:l>n?Math.sqrt(a*a+(l-n)*(l-n)):a,o-=i/2,o})}function X(e,t,r){return(i,n)=>{const s=i-e,o=n-t;return Math.sqrt(s*s+o*o)-r}}function W(e,t,r){const i=Math.sqrt(t*t+r*r);return(n,s)=>{const o=Math.abs(n-e)-r,a=s-e+t/2+.75,l=(t*o+r*a)/i,c=-a;return Math.max(l,c)}}function Q(e,t){const r=new Float32Array(e*e);for(let i=0;i<e;i++)for(let n=0;n<e;n++)r[n+e*i]=t(n,i)/e;return r}var J=r(46610);class K{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,r=.5*t,i=0){return{data:$(e,t,r,i),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,noUnpackFlip:!0,dataType:q.ld.FLOAT,pixelFormat:6403,internalFormat:q.H0.R16F,reloadable:!0}}}("circle"));this._iconTextureID=t;const r={anchorPosition:F.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:G,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:k("circle")},i=new Uint8Array(8),n=255;i[0]=0,i[1]=0,i[2]=0,i[3]=n,i[4]=n,i[5]=0,i[6]=n,i[7]=n,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const s=U(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,s,!0))}async _createGeometry(e){const{_materialId:t,_context:r}=this,{mainThreadDelegate:i}=r,{featureCount:n}=e;if(0===n||null==t)return null;const s=z(e),o=L(e),a=function(e,t){const r=e.length/3,i=t.viewSpatialReference,n=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,j.projectBuffer)(e,i,0,s,n,0,r))throw new Error("Failed to project coordinates");return s}(await i.applyElevationAlignmentTo(o),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0]),f=new Uint32Array(n);for(let e=0;e<n;++e)f[e]=e;const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=0;const m=[["position",new J.n(a,f,3,!0)],["normal",new J.n(l,p,3,!0)],["color",new J.n(c,p,4,!0)],["rotation",new J.n(h,p,1,!0)],["size",new J.n(u,p,2,!0)],["centerOffsetAndDistance",new J.n(d,p,4,!0)]],y=new Uint8Array(n);return e.getVisibilityArray(y),{attributes:H(m),olidColor:void 0,transformation:(0,v.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:s}=e;if(null==t||0===n)return r.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return r.createPipelineCommand();const a=U(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(s,o,a,!0))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):p.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,r=t?.outline?.color;if(null!=r){const t=m.A.toUnitRGB(r),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return te;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=ee){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,t=ee){const r=this._getCombinedOpacity(e,t);return function(e,t,r=null){const i=(0,x.o8)(x.Un);return null!=e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],e.length>3&&(i[3]=e[3])),null!=t&&(i[3]=t),r&&(0,T.s)(i,i,r),i}(null!=e?m.A.toUnitRGB(e):w.Un,r)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??C.r;var e}}const ee={hasIntrinsicColor:!1},te=x.uY;class re{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:r}=this,i=[];for(const n of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(n);null!=t&&(i.push(t.load()),r.push(t))}await Promise.all(i),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,r=[];for(const e of t)r.push(e.createDestroyCommand());const i=e.joinPipelineCommands(await Promise.all(r));return i.appendPipelineStateCommand(()=>this._destroy()),i}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(i))}}class ie{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createAddCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),i}async createRemoveCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createRemoveCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.delete(e)),i}async createUpdateVisibilityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,r=await this._provisionSymbol();if(null==r)return t.createPipelineCommand();const i=[];for(const t of e.values())i.push(r.createUpdateElevationCommand(t));const n=await Promise.all(i);return t.joinPipelineCommands(n)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:r}=this;if(!e)return t.createPipelineCommand();const i=[];for(const e of r.keys())i.push(this.createRemoveCommand(e));i.push(e.createDestroyCommand());const n=await Promise.all(i);return t.joinPipelineCommands(n)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var ne=r(48353),se=r(30809),oe=r(8887),ae=r(38954),le=r(72385),ce=(r(4197),r(11868)),ue=r(27921),de=r(71351),he=r(73941);function fe(e,t){const r=e[t],i=e[t+1],n=e[t+2];return Math.sqrt(r*r+i*i+n*n)}function pe(e,t){const r=e[t],i=e[t+1],n=e[t+2],s=1/Math.sqrt(r*r+i*i+n*n);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function me(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r}r(37539),r(20498),r(87170),(0,M.vt)(),(0,M.vt)();var ye=r(620);r(78754);const ge=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)ge[6*e+t]=e;const be=new Array(36);for(let e=0;e<6;e++)be[6*e]=0,be[6*e+1]=1,be[6*e+2]=2,be[6*e+3]=2,be[6*e+4]=3,be[6*e+5]=0;const _e=(0,le.fA)(-.5,0,-.5),ve=(0,le.fA)(.5,0,-.5),we=(0,le.fA)(0,0,.5),xe=(0,le.fA)(0,.5,0),Ce=(0,le.vt)(),Se=(0,le.vt)(),Ae=(0,le.vt)(),Te=(0,le.vt)(),Ie=(0,le.vt)();(0,ae.e)(Ce,_e,xe),(0,ae.e)(Se,_e,ve),(0,ae.f)(Ae,Ce,Se),(0,ae.n)(Ae,Ae),(0,ae.e)(Ce,ve,xe),(0,ae.e)(Se,ve,we),(0,ae.f)(Te,Ce,Se),(0,ae.n)(Te,Te),(0,ae.e)(Ce,we,xe),(0,ae.e)(Se,we,_e),(0,ae.f)(Ie,Ce,Se),(0,ae.n)(Ie,Ie),Ae[0],Ae[1],Ae[2],Te[0],Te[1],Te[2],Ie[0],Ie[1],Ie[2],(0,w.vt)();var Pe=r(4576),Be=r(69397);r(6867),r(87582);var Ee=r(57917);function Me(e,t){const r=(e,r,i=!1)=>({levels:e.map(e=>{const n=H(r(e.tesselation));return i&&function(e){const t=e,r=t.get("position").data,i=t.get("normal").data;if(i){const t=Oe(e,"normal").data;for(let e=0;e<i.length;e+=3){const r=i[e+1];t[e+1]=-i[e+2],t[e+2]=r}}if(r){const t=Oe(e,"position").data;for(let e=0;e<r.length;e+=3){const i=r[e+1];t[e+1]=-r[e+2],t[e+2]=i}}}(n),{components:[{attributes:n,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return r(Re,e=>function(e,t,r,i,n=!0,s=!0){let o=0;const a=t,l=e;let c=(0,le.fA)(0,o,0),u=(0,le.fA)(0,o+l,0),d=(0,le.fA)(0,-1,0),h=(0,le.fA)(0,1,0);i&&(o=l,u=(0,le.fA)(0,0,0),c=(0,le.fA)(0,o,0),d=(0,le.fA)(0,1,0),h=(0,le.fA)(0,-1,0));const f=[u,c],p=[d,h],m=r+2,y=Math.sqrt(l*l+a*a);if(i)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),i=(0,le.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,le.fA)(l*Math.cos(t)/y,-a/y,l*Math.sin(t)/y);p.push(n)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),i=(0,le.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,le.fA)(l*Math.cos(t)/y,a/y,l*Math.sin(t)/y);p.push(n)}const g=new Array,b=new Array;if(n){for(let e=3;e<f.length;e++)g.push(1),g.push(e-1),g.push(e),b.push(0),b.push(0),b.push(0);g.push(f.length-1),g.push(2),g.push(1),b.push(0),b.push(0),b.push(0)}if(s){for(let e=3;e<f.length;e++)g.push(e),g.push(e-1),g.push(0),b.push(e),b.push(e-1),b.push(1);g.push(0),g.push(2),g.push(f.length-1),b.push(1),b.push(2),b.push(p.length-1)}const _=(0,ce.oe)(3*m);for(let e=0;e<m;e++)_[3*e]=f[e][0],_[3*e+1]=f[e][1],_[3*e+2]=f[e][2];const v=(0,ce.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new J.n(_,g,3,!0)],["normal",new J.n(v,b,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return r([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,r){const i=e;let n,s;if(r)n=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=i*(1+Math.sqrt(5))/2;n=[-i,e,0,i,e,0,-i,-e,0,i,-e,0,0,-i,e,0,i,e,0,-i,-e,0,i,-e,e,0,-i,e,0,i,-e,0,-i,-e,0,i],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<n.length;t+=3)me(n,t,e/fe(n,t));let o={};function a(t,r){t>r&&([t,r]=[r,t]);const i=t.toString()+"."+r.toString();if(o[i])return o[i];let s=n.length;return n.length+=3,function(e,t,r,i,n,s=t){(n=n||e)[s]=e[t]+r[i],n[s+1]=e[t+1]+r[i+1],n[s+2]=e[t+2]+r[i+2]}(n,3*t,n,3*r,n,s),me(n,s,e/fe(n,s)),s/=3,o[i]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let r=0;r<e;r+=3){const e=s[r],i=s[r+1],n=s[r+2],o=a(e,i),l=a(i,n),c=a(n,e),u=4*r;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=i,t[u+4]=l,t[u+5]=o,t[u+6]=n,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,ce.Wz)(n);for(let e=0;e<l.length;e+=3)pe(l,e);return[["position",new J.n((0,ce.Wz)(n),s,3,!0)],["normal",new J.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Oe(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Ee.S)(r.data)},e.set(t,r)),r}const Re=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var De=r(2495),Fe=r(74810);class je{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let r={usePBR:!0,isSchematic:!0,mrrFactors:Fe.Bt,ambient:w.Un,diffuse:w.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(r.externalColor=x.Un,r.instanced=!0,this._isPrimitive){const e=new De.fs;e.layerOpacity=t,r={...r,cullFace:Ve((0,De.ty)(e))}}const i=await e.createMaterial({type:"default",parameters:r}),n=this._symbolLayer.resource;this._primitive=n&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(n?.primitive)?n.primitive:se.r;const s=Me(this._primitive,i);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=i,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:r}=this,i=r.renderCommandContext,n=[];return null!=e&&n.push(i.destroyLodRenderer(e)),null!=t&&n.push(i.destroyMaterial(t)),new p(i,i.mergeRenderCommandBuffers(n),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:i}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:n}=e;if(0===n)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||se.r,a=(0,I.vt)((0,oe.Fq)(o)),l=(0,w.ci)((0,I.Ej)(a)),c=(0,w.ci)((0,oe.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*n),d=new Float64Array(16*n),h=L(e),f=await i.applyElevationAlignmentTo(h);for(let e=0;e<n;++e){const t=e,r=f[3*e+0],i=f[3*e+1],n=f[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,Ue),o=this._computeLocalTransform(c,l,Le);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=z(e),m=new Uint8Array(n);e.getVisibilityArray(m);const y={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(r.addLodInstances(this._lodRendererId,e.id,y))}async createRemoveCommand(e){const{_context:t,_lodRendererId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.removeLodInstances(r,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,i=this._primitiveMaterialId;if(null==i)return t.createPipelineCommand();const n=this._getLayerOpacity();let s={layerOpacity:n};if(this._isPrimitive){const e=new De.fs;e.layerOpacity=n,s={...s,cullFace:Ve((0,De.ty)(e))}}return t.createPipelineCommand(r.updateMaterial({type:"default",materialId:i,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:r}=this,{renderCommandContext:i,mainThreadDelegate:n}=t,{featureCount:s,id:o}=e;if(null==r||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=L(e),c=await n.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],i=c[3*e+1],n=c[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,Ue);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(i.updateLodInstancesData(r,o,a))}_writeMatrixToTypedBuffer(e,t,r){let i=16*t;for(let t=0;t<16;t++)e[i++]=r[t]}_computeGlobalTransform(e,t,r,i,n){return ze[0]=e,ze[1]=t,ze[2]=r,(0,ne.l)(i,ze,n,this._context.renderSpatialReference),n}_computeLocalTransform(e,t,r){return(0,A.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const i=function(e=w.Un,t,r,i=1){const n=new Array(3);if(null==t||null==r)n[0]=1,n[1]=1,n[2]=1;else{let i,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!i&&!l,u=r[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(n[o]=d,i=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==n[e]?n[e]=i:0===n[e]&&(n[e]=.001*s)}for(let e=2;e>=0;e--)n[e]/=i;return(0,w.ci)(n)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===i[0]&&1===i[1]&&1===i[2]||(0,A.hs)(r,r,i)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function Ve(e){return e?0:2}const ze=(0,w.vt)(),Le=(0,v.vt)(),Ue=(0,v.vt)();class Ne{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new K(_(),this._context),this._symbols[1]=new je(new g.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=this._partition(e),i=await Promise.all(r.map(async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))})),n=t.joinPipelineCommands(i);return n.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,r)),n}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e);if(null==n)return new p(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})),o=r.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e.id);if(null==n)return new p(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))}));return r.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=[];for(let t=0;t<this._symbols.length;++t){const i=this._symbols[t];null!=i&&i.loaded&&r.push(i.createUpdateLayerViewOpacityCommand(e))}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))});r.push(...e)}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.keys())r.push(this.createRemoveCommand(t));for(const e of this._symbols)r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=z(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,i=[[],[]];for(let e=0;e<r;++e)i[t[e]%2].push(e);return i.map((t,r)=>new He(r,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class He{constructor(e,t){this.index=e,this.features=t}}class qe{constructor(e,t,r,i,n,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=r,this.renderCoordsHelper=i,this.renderCommandContext=n,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new Ge(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new p(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class Ge{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,f.L)(e??ke)??void 0;if(!t)throw new Error("Failed to create renderer");const r=t.type;switch(r){case"simple":return new ie(t,this.context);case"unique-value":return new Ne(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${r}`),this.createSymbolRendererFromJSON(ke)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new re(e,this.context);case"picture-marker":case"simple-marker":return new K(_(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new K(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const ke={type:"simple"};var $e=r(69622),Ye=r(60999),Ze=r(32587),Xe=r(76030),We=r(24326);function Qe(e=""){return`${e}${(0,We.c)()}`}new Float64Array(3);class Je{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Qe(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Be.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let i=0;i<r.length;++i)r[i]=t[e[i]];return new Je(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let i=0;i<t;++i)this.getEnabled(i)&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class Ke{constructor(e){this._tile=e,this.id=Qe(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Be.qK+(0,Be.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new Je(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const i of this._allFeatureIndices())t[i]&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:i}=this;for(const n of t)e[r++]=Number(i[n]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let et=class extends $e.A{constructor(e){super(e),this.extent=null,this._tileHandles=new Ze.A,this._wanted=new Ze.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,P.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,r=this._tileHandles;for(const i of t.values())null==r.get(i.id)?.featureData&&e.push(i);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Ye.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,Xe.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,r=new Array;for(const i of e)t.has(i.id)||r.push(i);const i=new Array;for(const r of t.values()){const{id:t}=r;e.every(e=>e.id!==t)&&i.push(r.descriptor)}const n=this._tileHandles,{_boundingRect:s}=this,o=null!=s?r.filter(e=>!e.extent||(0,P.HY)(s,e.extent)):r,a=this._wanted,l=new Array;for(const{id:e}of i)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of i){const{id:t}=e;if(c.some(t=>tt(t,e)||tt(e,t)))continue;const r=n.get(t);null!=r&&l.push(this._removeTile(r))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const r=t.featureData;null!=r&&e(r)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const r=await this.createRemoveCommand(t.id);await(r?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r){if(!it(r)||r.featureData.isFullyEnabled)return;return r.featureData.enableAll(),void await this._onTileLoad(r)}const i=new rt(e,(0,Ye.UT)(async t=>{const r=await this.loadTile(e,t);return(0,s.Te)(t),new Ke(r)}));this._tileHandles.set(i.id,i);try{await i.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!it(e))throw new Error})(i),await this._onTileLoad(i)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:r,_tileHandles:n,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of n.values()){if(t===e)continue;const{descriptor:i,id:c}=t;if(!r.has(c)&&!s.some(e=>tt(e,i)||tt(i,e))){n.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(it(t)){if(tt(o,i)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(tt(i,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,i.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,r=new Set(t.objectIds());for(const e of l)e.disableObjectIds(r),this._validateRemoval(e,r)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Pe.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}_validate(){if(!(0,B.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!it(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:i}=e[t];for(let n=t+1;n<e.length;++n){const{featureData:t,objectIds:s}=e[n];for(const e of s)if(i.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,B.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function tt({lij:[e,t,r]},{lij:[i,n,s]}){const o=i-e;return o>=0&&t===n>>o&&r===s>>o}(0,i.Cg)([(0,a.MZ)()],et.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"loadTile",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createAddCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createRemoveCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createUpdateCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"tileLocks",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_boundingRect",null),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_missingTiles",null),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_updateRequested",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_synchronizationTask",void 0),et=(0,i.Cg)([(0,a.$K)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],et);class rt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function it(e){return null!=e.featureData}var nt=r(36563);class st{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,r=e.map(e=>t.get(e)).filter(Pe.Ru),i=Promise.allSettled(r),n=(0,s.Tw)(),o=(0,nt.hA)(()=>n.resolve()),a=n.promise.finally(()=>{for(const r of e)t.get(r)===a&&t.delete(r)});for(const r of e)t.set(r,a);return await i,(0,nt.Bf)(o)}}var ot=r(75503),at=r(27647);class lt{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Be.qK+Be.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new ct(this._index,this._view,e)}}class ct extends lt{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,at.Q)(this._geometryOverride)}}class ut{constructor(e,t){this.featureData=e,this.bounds=t}}class dt{constructor(){this._tileBounds=new Map,this.events=new n.bk,this.featureAdapter=ht.shared}get usedMemory(){return Be.qK+Be.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new ot.wq(9,t=>e.getBounds(t)),i=new Array;for(let e=0;e<t;++e)i[e]=e;r.load(i),this._tileBounds.set(e.id,new ut(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all(r=>{t.getEnabled(r)&&e(new lt(r,t))})}forEachInBounds(e,t){ft.minX=e[0],ft.minY=e[1],ft.maxX=e[2],ft.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(ft,r=>{e.getEnabled(r)&&t(new lt(r,e))})}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,o),i=Math.min(i,a),n=Math.min(n,l)}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:e}}}class ht{static{this.shared=new ht}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const ft=new ot.EC;var pt=r(80893);class mt{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const i=Be.ez+t.reduce((e,{usedMemory:t})=>e+t,0),n=3*Be.RS;this.usedMemory=Be.qK+i+n,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttribute(i,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(i,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:i,featurePageIndex:n}=this._translateIndex(e);this._pages[i].getCoordinates(n,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getCentroid(i,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getObjectIdsArray(e,n,i);return i}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getCoordinatesArray(e,n,i);return i}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,i=new Array;for(const n of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(n);r!==e&&(0!==i.length&&t.push({pageIndex:r,indices:i}),r=e,i=[]),i.push(s)}0!==i.length&&t.push({pageIndex:r,indices:i})}const{_pages:r}=this;for(const{pageIndex:e,indices:i}of t)yield{page:r[e],indices:i}}}var yt=r(49186),gt=r(51624),bt=r(62577),_t=r(92722),vt=r(95466),wt=r(53655);class xt{constructor(e){this._reader=new gt.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Ct(e.getMessage());e.skip()}At()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:i}}=this,n=r.get(t)?.index;if(null==n)return;const s=i[e*r.fields.length+n],o=this._reader;return o.move(s),Tt(o)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,i=e*t.fields.length,n=this._reader,s={};for(const e of t.fields){const t=r[i+e.index];n.move(t),s[e.name]=Tt(n)}return s}getCoordinates(e,t,r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;i.move(s[e]),this._readCoordinates(o,a,t,r)}getOptimizedGeometry(e){const t=(0,w.vt)();return this.getCoordinates(e,t),new _t.A([],t,!0,!1)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,It);const[i,n,s]=It,o=[i,n];return t&&(o[3]=s),r&&(o[t?4:3]=0),new _t.A([],o,t,r)}getBounds(e){this.getCoordinates(e,It);const[t,r]=It,i=new ot.EC;return i.minX=t,i.minY=r,i.maxX=t,i.maxY=r,i}getBoundingBox(e){this.getCoordinates(e,It);const[t,r,i]=It;return(0,I.fA)(t,r,i,t,r,i)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{objectIdFieldName:n,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(n).index,l=o.fields.length;for(const n of t){const t=s[n*l+a];i.move(t),e[r++]=Tt(i)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;for(const n of t){const t=s[n];i.move(t),r=this._readCoordinates(o,a,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:i,fieldsIndex:n}=this._index,s=n.get(r).index,o=n.fields.length;for(const r of e){const e=i[r*o+s];t.move(e),yield Tt(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[i,n,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=i+e*l.getSInt64(),o[a++]=n+t*l.getSInt64(),o[a++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Ct(e){for(;e.next();){if(1===e.tag())return St(e.getMessage());e.skip()}At()}function St(e){let t,r,i=!1,n=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&At();break;case 9:i=e.getBool()??!1;break;case 12:t=(0,bt.Q1)(e.processMessage(wt.ae));break;case 13:{const t=e.processMessage(wt.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:n=e.getBool()??!1;break;default:e.skip()}const c=new vt.A(o);return null!=t&&n&&null!=r&&c.has(r)||At(),{transform:t,exceededTransferLimit:i,fieldsIndex:c,objectIdFieldName:r,featureIndices:a,attributeIndices:l}}function At(){const e=new yt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function Tt(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const It=(0,w.vt)();class Pt{constructor(e,t,r,i,n){this.spatialReference=e,this.url=r,this.objectIdField=i,this.capabilities=n;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[i],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:i}=this,n=(0,P.w1)(e.extent,r),o=this._baseQuery.clone();o.geometry=n;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let r=0;r<u;++r)e.push(this._fetchPage(o,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new mt(e,a,i)}async _fetchPage(e,t,r){const i=e.clone();i.start=t*this._pageSize;const n=await(0,pt.kS)(this.url,i,{signal:r});return(0,s.Te)(r),new xt(n)}}var Bt=r(29920),Et=r(77690),Mt=r(29242);var Ot=r(13030),Rt=r(78662),Dt=r(49255),Ft=r(40268),jt=r(25634),Vt=r(11725),zt=r(77194),Lt=r(59907),Ut=r(43616),Nt=r(13259),Ht=r(4431),qt=r(1843),Gt=r(13840),kt=r(42958),$t=r(16943),Yt=r(33524),Zt=r(90644),Xt=r(85079);let Wt=class extends kt.w{constructor(e,t){super(e,t,(0,Xt._u)([Jt,tr()].map(Ht.U))),this.shader=new Gt.r(Nt.H,()=>r.e(8241).then(r.bind(r,48241))),this.primitiveType=t.occlusionPass?q.WR.POINTS:q.WR.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:t,hasEmission:r,hasPolygonOffset:i,draped:n,output:s,depthTestEnabled:o,occlusionPass:a}=e,l=o&&!n&&!(1===t)&&!a&&!(8===s);return(0,Zt.Ey)({blending:(0,Dt._o)(s)?(0,Yt.Yf)(t,!0):null,depthTest:o&&!n?{func:515}:null,depthWrite:l?Zt.Uy:null,drawBuffers:(0,Yt.Sv)(t,r),colorWrite:Zt.kn,polygonOffset:i?Qt:null})}};Wt=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],Wt);const Qt={factor:0,units:-4},Jt=(0,qt.BP)().vec2u8("uv0",{glNormalized:!0}),Kt=(0,qt.BP)().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),er=Kt.clone().vec4u8("olidColor");function tr(){return(0,$t.E)()?er:Kt}var rr=r(51976),ir=r(2451);class nr extends ir.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,i.Cg)([(0,rr.W)()],nr.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occlusionTestEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"signedDistanceFieldEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVVSize",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVVColor",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVerticalOffset",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasScreenSizePerspective",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasRotation",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"debugDrawLabelBorder",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasPolygonOffset",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"depthTestEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"pixelSnappingEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"draped",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"terrainDepthTest",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"cullAboveTerrain",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occlusionPass",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occludedFragmentFade",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"horizonCullingEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"isFocused",void 0);var sr=r(49788);class or extends Vt.i{constructor(e,t){super(e,Er),this.produces=new Map([[14,e=>(0,Dt.dX)(e)&&!this.parameters.drawAsLabel],[15,e=>(0,Dt.dX)(e)&&this.parameters.drawAsLabel],[13,()=>this.parameters.occlusionTest],[19,e=>this.parameters.draped&&(0,Dt.dX)(e)]]),this._visible=!0,this._configuration=new nr(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=13===t.slot,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||13===t.slot,(0,Dt._o)(e)&&(this._configuration.debugDrawLabelBorder=!!R.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,i,n,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=r,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,x.ci)(h.data,Sr),{scaleX:p,scaleY:m}=Or(f,d,u.pixelRatio);(0,Et.z0)(br,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+r*r+i*i),d=1/Math.sqrt(n*n+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=r*u,e[2]=i*u,e[3]=n*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(br);const y=e.attributes.get("position"),g=e.attributes.get("size"),b=e.attributes.get("normal"),_=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,ye.vA)(y.size>=3);const C=(0,Nt.c)(d),S="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<y.data.length/y.size;e++){const i=e*y.size;(0,ae.h)(dr,y.data[i],y.data[i+1],y.data[i+2]),(0,ae.p)(dr,dr,t),(0,ae.p)(dr,dr,u.viewMatrix);const n=e*v.size;if((0,ae.h)(xr,v.data[n],v.data[n+1],v.data[n+2]),!S&&(dr[0]+=xr[0],dr[1]+=xr[1],0!==xr[2])){const e=xr[2];(0,ae.n)(xr,dr),(0,ae.e)(dr,dr,(0,ae.j)(xr,xr,e))}const o=e*b.size;if((0,ae.h)(hr,b.data[o],b.data[o+1],b.data[o+2]),lr(hr,br,u,Ar),Rr(this.parameters,dr,Ar,u,ur),u.applyProjection(dr,fr),fr[0]>-1){S&&(xr[0]||xr[1])&&(fr[0]+=xr[0]*u.pixelRatio,0!==xr[1]&&(fr[1]+=ur.alignmentEvaluator.apply(xr[1])*u.pixelRatio),u.unapplyProjection(fr,dr)),fr[0]+=this.parameters.screenOffset[0]*u.pixelRatio,fr[1]+=this.parameters.screenOffset[1]*u.pixelRatio,fr[0]=Math.floor(fr[0]),fr[1]=Math.floor(fr[1]);const t=e*g.size;Pr[0]=g.data[t],Pr[1]=g.data[t+1],ur.evaluator.applyVec2(Pr,Pr);const i=Tr*u.pixelRatio;let n=0;d.textureIsSignedDistanceField&&(n=Math.min(d.outlineSize,.5*Pr[0])*u.pixelRatio/2),Pr[0]*=p,Pr[1]*=m;const o=e*_.size,a=d.rotation+_.data[o];if(cr(c,fr[0],fr[1],Pr,i,n,a,d,C)){const e=r.ray;if((0,ae.p)(mr,dr,(0,A.B8)(vr,u.viewMatrix)),fr[0]=c[0],fr[1]=c[1],u.unprojectFromRenderScreen(fr,dr)){const t=(0,w.vt)();(0,ae.d)(t,e.direction);const r=1/(0,ae.b)(t);(0,ae.j)(t,t,r),s((0,ae.C)(e.origin,dr)*r,t,-1,mr)}}}}}intersectDraped(e,t,r,i,n){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,Nt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,x.ci)(u.data,Sr),{scaleX:h,scaleY:f}=Or(d,l,e.screenToWorldRatio),p=Ir*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],y=t*o.size;Pr[0]=o.data[y],Pr[1]=o.data[y+1];let g=0;l.textureIsSignedDistanceField&&(g=Math.min(l.outlineSize,.5*Pr[0])*e.screenToWorldRatio/2),Pr[0]*=h,Pr[1]*=f;const b=t*a.size,_=l.rotation+a.data[b];cr(r,d,m,Pr,p,g,_,l,c)&&i(n.distance,n.normal,-1)}}createBufferWriter(){return new Mr}applyShaderOffsetsView(e,t,r,i,n,s,o){const a=lr(t,r,n,Ar);return this._applyVerticalGroundOffsetView(e,a,n,o),Rr(this.parameters,o,a,n,s),this._applyPolygonOffsetView(o,a,i[3],n,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,r,i,n){return this._applyCenterOffsetNDC(e,t,r,i),null!=n&&(0,ae.d)(n,i),this._applyPolygonOffsetNDC(i,t,r,i),i}_applyPolygonOffsetView(e,t,r,i,n){const s=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,ae.d)(n,e);const l=(0,O.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/i.viewport[2];return(0,ae.j)(n,e,a>0?c:1/c),n}_applyVerticalGroundOffsetView(e,t,r,i){const n=(0,ae.b)(e),s=r.aboveGround?1:-1,o=r.computeRenderPixelSizeAtDist(n)*Ft.R,a=(0,ae.j)(dr,t.normal,s*o);return(0,ae.i)(i,e,a),i}_applyCenterOffsetView(e,t,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,ae.d)(r,e),i&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,ae.n)(hr,r),(0,ae.a)(r,r,(0,ae.j)(hr,hr,t[2])))),r}_applyCenterOffsetNDC(e,t,r,i){const n="screen"!==this.parameters.centerOffsetUnits;return i!==e&&(0,ae.d)(i,e),n||(i[0]+=t[0]/r.fullWidth*2,i[1]+=t[1]/r.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,r,i){const n=this.parameters.shaderPolygonOffset;if(e!==i&&(0,ae.d)(i,e),n){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);i[2]-=(s||e)*n}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,i=e[3]>=sr.Q||t>=sr.Q&&r[3]>=sr.Q;return this._visible&&i}createGLMaterial(e){return new ar(e)}calculateRelativeScreenBounds(e,t,r=(0,P.vt)()){return function(e,t,r,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class ar extends jt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Wt,e)}}function lr(e,t,r,i){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Et.z0)(_r,t)),(0,ae.t)(i.normal,e,t),(0,ae.p)(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=(0,ae.g)(pr,Br),i}function cr(e,t,r,i,n,s,o,a,l){let c=t-n-i[0]*l[0],u=c+i[0]+2*n,d=r-n-i[1]*l[1],h=d+i[1]+2*n;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=i[0]*f[0],d+=i[1]*f[1],u-=i[0]*(1-f[2]),h-=i[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,E.hZ)(gr,t,r),(0,E.e$)(yr,e,gr,(0,O.kU)(o)),yr[0]>c&&yr[0]<u&&yr[1]>d&&yr[1]<h}const ur=new zt.fc,dr=(0,w.vt)(),hr=(0,w.vt)(),fr=(0,x.vt)(),pr=(0,w.vt)(),mr=(0,w.vt)(),yr=(0,M.vt)(),gr=(0,M.vt)(),br=(0,Mt.vt)(),_r=(0,Mt.vt)(),vr=(0,v.vt)(),wr=(0,x.vt)(),xr=(0,w.vt)(),Cr=(0,w.vt)(),Sr=(0,x.vt)(),Ar={normal:pr,cosAngle:0},Tr=1,Ir=2,Pr=(0,M.fA)(0,0),Br=(0,w.fA)(0,0,1);class Er extends jt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,x.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,M.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,x.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,x.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Mr{constructor(){this.layout=Jt,this.instanceLayout=tr()}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,r,i,n,s){const{position:o,normal:a,color:l,size:c,rotation:u,centerOffsetAndDistance:d,featureAttribute:h,uvi:f}=n;(0,Lt.Hk)(r.get("position"),e,o,s),(0,Lt.p1)(r.get("normal"),t,a,s);const p=r.get("position").indices.length;let m=0,y=0,g=Nt.f,b=Nt.f;const _=r.get("uvi")?.data;_&&_.length>=4&&(m=_[0],y=_[1],g=_[2],b=_[3]);for(let e=0;e<p;++e){const t=s+e;f.setValues(t,m,y,g,b)}if((0,Lt.tb)(r.get("color"),4,l,s),(0,Lt.Ue)(r.get("size"),c,s),(0,Lt.uO)(r.get("rotation"),u,s),r.get("centerOffsetAndDistance")?(0,Lt.Ut)(r.get("centerOffsetAndDistance"),d,s):(0,Lt.Pq)(d,s,p),r.get("featureAttribute")?(0,Lt.Ut)(r.get("featureAttribute"),h,s):(0,Lt.Pq)(h,s,p),null!=i){const e=r.get("position")?.indices;if(e){const t=e.length,r=n.getField("olidColor",Ot.XP);(0,Lt.vx)(i,r,t,s)}}return{numVerticesPerItem:1,numItems:p}}writeBaseInstance(e,t){const{uv0:r}=t;(0,Lt.Ue)(e.get("uv0"),r,0)}intersect(e,t,r,i,n,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=i;if(!a||!l||c&&t.isLabel||!u)return;const h=this.instanceLayout.createView(e),{position:f,normal:p,rotation:m,size:y,featureAttribute:g,centerOffsetAndDistance:b}=h,_="screen"===t.centerOffsetUnits,v=(0,Nt.c)(t);if(null==f||null==p||null==m||null==y||null==b||null==d)return;const x=null==g?null:g.getVec(0,Sr),{scaleX:C,scaleY:S}=Or(x,t,d.pixelRatio),T=f.count;for(let e=0;e<T;e++){if(f.getVec(e,dr),null!=r&&(0,ae.i)(dr,dr,r),(0,ae.p)(dr,dr,d.viewMatrix),b.getVec(e,wr),(0,ae.h)(xr,wr[0],wr[1],wr[2]),!_&&(dr[0]+=xr[0],dr[1]+=xr[1],0!==xr[2])){const e=xr[2];(0,ae.n)(xr,dr),(0,ae.e)(dr,dr,(0,ae.j)(xr,xr,e))}if(p.getVec(e,hr),lr(hr,br,d,Ar),Rr(t,dr,Ar,d,ur),d.applyProjection(dr,fr),fr[0]>-1){_&&(xr[0]||xr[1])&&(fr[0]+=xr[0]*d.pixelRatio,0!==xr[1]&&(fr[1]+=ur.alignmentEvaluator.apply(xr[1])*d.pixelRatio),d.unapplyProjection(fr,dr)),fr[0]+=t.screenOffset[0]*d.pixelRatio,fr[1]+=t.screenOffset[1]*d.pixelRatio,fr[0]=Math.floor(fr[0]),fr[1]=Math.floor(fr[1]),y.getVec(e,Pr),ur.evaluator.applyVec2(Pr,Pr);const r=Tr*d.pixelRatio;let n=0;t.textureIsSignedDistanceField&&(n=Math.min(t.outlineSize,.5*Pr[0])*d.pixelRatio/2),Pr[0]*=C,Pr[1]*=S;const s=m.get(e),a=t.rotation+s;if(cr(u,fr[0],fr[1],Pr,r,n,a,t,v)){const t=i.ray;if((0,ae.p)(mr,dr,(0,A.B8)(vr,d.viewMatrix)),fr[0]=u[0],fr[1]=u[1],d.unprojectFromRenderScreen(fr,dr)){const r=(0,w.vt)();(0,ae.d)(r,t.direction);const i=1/(0,ae.b)(r);(0,ae.j)(r,r,i),o((0,ae.C)(t.origin,dr)*i,r,e,mr)}}}}}}function Or(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,Rt.VC)(Cr,t,e),{scaleX:Cr[0]*r,scaleY:Cr[1]*r})}function Rr(e,t,r,i,n){if(!e.verticalOffset?.screenLength){const i=(0,ae.b)(t);return n.update(r.cosAngle,i,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),t}const s=(0,ae.b)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,Ut.kE)(i,s,e.verticalOffset,r.cosAngle,o,e.screenSizePerspectiveMinPixelReferenceSize);return n.update(r.cosAngle,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),(0,ae.j)(r.normal,r.normal,a),(0,ae.i)(t,t,r.normal)}class Dr{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async createTexture(e){const{data:t,parameters:r}=e();return await this._mainThreadDelegate.createTexture(t,r)}async releaseTexture(e){const t=this._destroyTexture(e);return new p(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:r}=e,i=Qe("material");let n,s;switch(t){case"default":n=new De.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:i,parameters:e.parameters};break;case"hud":n=new or(r,this.globalViewingMode),s={type:t,materialId:i,parameters:e.parameters}}return this._bufferWriters.set(i,n.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),i}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.addDirectRendererGeometryBuffer(n,e,s,o,r)}updateDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.updateDirectRendererGeometryBuffer(n,e,s,o,r)}addDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Qe("lod-renderer"),r=new Set,i={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const i=(0,N.tM)(t.indices.length/3),n=new Bt.j(i,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:n.bbMax,bbMin:n.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,i,Array.from(r)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t,r){const{materialId:i,visibilities:n,objectIds:s}=e,o=this._bufferWriters.get(i);if(null==o)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,A.C)(Fr,e.transformation),Fr[12]-=t[0],Fr[13]-=t[1],Fr[14]-=t[2],a=Fr;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let l=null;a&&((0,A.B8)(jr,Fr),(0,A.mg)(jr,jr),l=jr);const c=e.attributes,u=o.elementCount(c),d=r?o.instanceLayout:o.layout;if(!d)throw new Error("Missing layout");const h=d.stride/4;u>Math.floor(Vr/h)&&console.warn("geometry with very large number of elements encountered");const f=d.createBuffer(u),p=o.write(a,l,c,e.olidColor,f,0);if(null==p)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==p.numItems||s.length!==p.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:f.buffer,elementCount:u},renderGeometryBufferItems:{objectIds:s,visibilities:n,ranges:{numVertices:p.numVerticesPerItem,numItems:p.numItems}}}}async setBaseInstance(e,t){await this._mainThreadDelegate.setBaseInstance(e,t)}}const Fr=(0,v.vt)(),jr=(0,v.vt)(),Vr=4194304;var zr=r(98764),Lr=r(65806);const Ur=(0,w.vt)();var Nr=r(53966),Hr=r(4341),qr=r(11964),Gr=r(44280),kr=r(32114);const $r=()=>Nr.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function Yr(e=di){return{plane:(0,ue.vt)(e.plane),origin:(0,w.o8)(e.origin),basis1:(0,w.o8)(e.basis1),basis2:(0,w.o8)(e.basis2)}}function Zr(e,t=Yr()){return Xr(e.origin,e.basis1,e.basis2,t)}function Xr(e,t,r,i=Yr()){return(0,ae.d)(i.origin,e),(0,ae.d)(i.basis1,t),(0,ae.d)(i.basis2,r),Wr(i),function(e,t){Math.abs((0,ae.g)(e.basis1,e.basis2)/((0,ae.b)(e.basis1)*(0,ae.b)(e.basis2)))>1e-6&&$r().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,ae.g)(e.basis1,oi(e)))>1e-6&&$r().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,ae.g)(oi(e),e.origin)-e.plane[3])>1e-6&&$r().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function Wr(e){(0,ue.mR)(e.basis2,e.basis1,e.origin,e.plane)}function Qr(e,t,r){e!==r&&Zr(e,r);const i=(0,ae.j)(kr.rq.get(),oi(e),t);return(0,ae.i)(r.origin,r.origin,i),r.plane[3]-=t,r}function Jr(e,t=Yr()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,ae.h)(t.origin,e[0]+r,e[1]+i,0),(0,ae.h)(t.basis1,r,0,0),(0,ae.h)(t.basis2,0,i,0),(0,ue.fA)(0,0,1,0,t.plane),t}function Kr(e,t,r){return!!(0,ue.Ui)(e.plane,t,r)&&ai(e,r)}function ei(e,t,r){const i=hi.get();ui(e,t,i,hi.get());let n=Number.POSITIVE_INFINITY;for(const s of yi){const o=ci(e,s,fi.get()),a=kr.rq.get();if((0,ue.T7)(i,o,a)){const e=(0,ae.D)(kr.rq.get(),t.origin,a),i=Math.abs((0,O.XM)((0,ae.g)(t.direction,e)));i<n&&(n=i,(0,ae.d)(r,a))}}return n===Number.POSITIVE_INFINITY?ti(e,t,r):r}function ti(e,t,r){if(Kr(e,t,r))return r;const i=hi.get(),n=hi.get();ui(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of yi){const a=ci(e,o,fi.get()),l=kr.rq.get();if((0,ue.gv)(i,a,l)){const e=(0,de.kb)(t,l);if(!(0,ue.Tj)(n,l))continue;e<s&&(s=e,(0,ae.d)(r,l))}}return ni(e,t.origin)<s&&ri(e,t.origin,r),r}function ri(e,t,r){const i=(0,ue._I)(e.plane,t,kr.rq.get()),n=(0,qr.H6)(li(e,e.basis1),i,-1,1,kr.rq.get()),s=(0,qr.H6)(li(e,e.basis2),i,-1,1,kr.rq.get());return(0,ae.e)(r,(0,ae.i)(kr.rq.get(),n,s),e.origin),r}function ii(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,ae.e)(kr.rq.get(),t,i),a=(0,Gr.gr)(n,o),l=(0,Gr.gr)(s,o),c=(0,Gr.gr)(oi(e),o);return(0,ae.h)(r,a,l,c)}function ni(e,t){const r=ii(e,t,kr.rq.get()),{basis1:i,basis2:n}=e,s=(0,ae.b)(i),o=(0,ae.b)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),c=r[2];return a*a+l*l+c*c}function si(e,t){const r=-e.plane[3];return(0,Gr.gr)(oi(e),t)-r}function oi(e){return(0,ue.Qj)(e.plane)}function ai(e,t){const r=(0,ae.e)(kr.rq.get(),t,e.origin),i=(0,ae.E)(e.basis1),n=(0,ae.E)(e.basis2),s=(0,ae.g)(e.basis1,r),o=(0,ae.g)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function li(e,t){const r=fi.get();return(0,ae.d)(r.origin,e.origin),(0,ae.d)(r.vector,t),r}function ci(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,ae.j)(kr.rq.get(),i,t.origin[0]),a=(0,ae.j)(kr.rq.get(),n,t.origin[1]);(0,ae.i)(r.origin,o,a),(0,ae.i)(r.origin,r.origin,s);const l=(0,ae.j)(kr.rq.get(),i,t.direction[0]),c=(0,ae.j)(kr.rq.get(),n,t.direction[1]);return(0,ae.j)(r.vector,(0,ae.i)(l,l,c),2),r}function ui(e,t,r,i){const n=oi(e);(0,ue.mR)(n,t.direction,t.origin,r),(0,ue.mR)((0,ue.Qj)(r),n,t.origin,i)}const di={plane:(0,ue.vt)(),origin:(0,w.fA)(0,0,0),basis1:(0,w.fA)(1,0,0),basis2:(0,w.fA)(0,1,0)},hi=new Hr.I(ue.vt),fi=new Hr.I(qr.vt),pi=(0,w.vt)(),mi=new Hr.I(()=>Yr()),yi=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],gi=(0,v.vt)(),bi=(0,v.vt)(),_i=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:si,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case 0:(0,ae.d)(r,e.basis1),(0,ae.n)(r,r);break;case 1:(0,ae.d)(r,e.basis2),(0,ae.n)(r,r);break;case 2:(0,ae.d)(r,oi(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:ti,closestPointOnSilhouette:ei,copy:Zr,copyWithoutVerify:function(e,t){(0,ae.d)(t.origin,e.origin),(0,ae.d)(t.basis1,e.basis1),(0,ae.d)(t.basis2,e.basis2),(0,ue.C)(t.plane,e.plane)},create:Yr,distance:function(e,t){return Math.sqrt(ni(e,t))},distance2:ni,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of yi){const n=ci(e,i,fi.get()),s=(0,qr.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:Qr,equals:function(e,t){return(0,ae.m)(e.basis1,t.basis1)&&(0,ae.m)(e.basis2,t.basis2)&&(0,ae.m)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,ue.Tj)(e.plane,t)&&ai(e,t)},fromAABoundingRect:Jr,fromValues:Xr,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,P.fA)(n-r,s-i,n+r,s+i,t)},intersectRay:Kr,intersectRayClosestSilhouette:function(e,t,r){if(Kr(e,t,r))return r;const i=ei(e,t,kr.rq.get());return(0,ae.i)(r,t.origin,(0,ae.j)(kr.rq.get(),t.direction,(0,ae.C)(t.origin,i)/(0,ae.b)(t.direction))),r},normal:oi,projectPoint:ri,projectPointLocal:ii,rotate:function(e,t,r,i){return e!==i&&Zr(e,i),(0,A.$0)(bi,t,r),(0,ae.p)(i.basis1,e.basis1,bi),(0,ae.p)(i.basis2,e.basis2,bi),Wr(i),i},setAltitudeAt:function(e,t,r,i){const n=si(e,t),s=(0,ae.j)(pi,oi(e),r-n);return(0,ae.i)(i,t,s),i},setExtent:function(e,t,r){return Jr(t,r),Qr(r,si(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&Zr(e,r),(0,A.B8)(gi,t),(0,A.mg)(gi,gi),(0,ae.p)(r.basis1,e.basis1,gi),(0,ae.p)(r.basis2,e.basis2,gi),(0,ae.p)((0,ue.Qj)(r.plane),(0,ue.Qj)(e.plane),gi),(0,ae.p)(r.origin,e.origin,t),(0,ue.mP)(r.plane,r.plane,r.origin),r},up:di,updateUnboundedPlane:Wr,wrap:function(e,t,r){const i=mi.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,ue.LV)(0,0,0,0),Wr(i),i}},Symbol.toStringTag,{value:"Module"}));var vi=r(94008);function wi(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const xi=2**50;function Ci(e,t,r,i){return e.operations.setAltitudeAt(e.value,t,r,i)}function Si(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Ai=(0,w.vt)();function Ti(e){return"point"===e.type}(0,w.vt)();class Ii{constructor(e,t,r,i){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=i,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(i),this.referenceEllipsoid=(0,he.tO)(t),this.sphericalPCPF=(0,zr.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,P.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Ci(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){var r,i,n,s;r=this._coordinateSystem,n=e,(i=t)!==(s=t)&&(0,A.C)(s,i),(0,ae.h)(Ai,s[12],s[13],s[14]),Ci(r,Ai,n,Ai),s[12]=Ai[0],s[13]=Ai[1],s[14]=Ai[2]}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,2,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,i){return e.operations.axisAt(e.value,t,r,i)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,0,kr.rq.get()),i=this.worldBasisAtPosition(e,1,kr.rq.get()),n=this.worldBasisAtPosition(e,2,kr.rq.get());return(0,A.hZ)(t,r[0],r[1],r[2],0,i[0],i[1],i[2],0,n[0],n[1],n[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,kr.rq.get()),i=this.worldBasisAtPosition(e,1,kr.rq.get()),n=(0,Gr.EJ)(t,i,r);return(0,O.KJ)(n)}intersectManifoldClosestSilhouette(e,t,r){return Si(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Si(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=kr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,i)?(0,ae.d)(r,i):null}intersectInfiniteManifold(e,t,r){if(1===this.viewingMode)return this.intersectManifold(e,t,r);Si(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=this._tmpCoordinateSystem.value,n=kr.rq.get();return(0,ue.Ui)(i.plane,e,n)?(0,ae.d)(r,n):null}toRenderCoords(e,t,r){return Ti(e)?(0,Lr.g)(e,t,this.spatialReference):(0,V.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ti(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,V.F)(e,t,Ur,r.spatialReference)&&(r.x=Ur[0],r.y=Ur[1],r.z=Ur[2],!0)}(e,this.spatialReference,t)?t:null):(0,V.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case 2:return new Ii(2,t,(0,S.GA)(t),wi(_i,Xr([0,0,0],[xi,0,0],[0,xi,0])));case 1:return new Ii(1,t,1,function(e){return wi(vi.XG,new vi.iy(0,0,0,(0,he.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,S.KX)(e)/(0,S.KX)(t)}}let Pi=class extends n.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new dt,this._tileLocks=new st,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:i,layerViewInfo:n}){const s=u.A.fromJSON(e);this._viewSpatialReference=s;const a=u.A.fromJSON(t);this._fetcher=new Pt(this._viewSpatialReference,h.A.fromJSON(i.baseQuery),i.url,i.objectIdField,i.capabilities),this._queryEngine=new d.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:i.objectIdField},fieldsIndex:i.fieldIndex,availableFields:[i.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:i.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const i={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",i,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})},setBaseInstance:async(e,t)=>{const r={rendererId:e,baseInstance:t};await this.remoteClient.invoke("setBaseInstance",r,{transferList:null!=t?[t.data]:void 0})}};const f=Ii.create(r,a),p=new Dr(r,this._mainThreadDelegate);this._renderCommandContext=p;const m=new qe(s,a,this._mainThreadDelegate,f,p,i,n);this._context=m,this._renderer=m.symbolRendererFactory.createSymbolRendererFromJSON(i.renderer),this._defaultQueryJSON=new h.A({outSpatialReference:s}).toJSON();let y=null;if(null!=i.fullExtent){const e=l.A.fromJSON(i.fullExtent);await(0,c.initializeProjection)(e.spatialReference,s),y=(0,c.project)(e,s)}return this._tileManager=new et({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:y}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),Ei}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async executeAttributeBinsQuery(e,t){return{result:await this._queryEngine.executeAttributeBinsQuery(e,t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(Ei)}async onElevationChange(e){return Ei}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return Ei;const i=await r.createUpdateLayerViewOpacityCommand(e);return await i.execute(),Ei}async onRendererChange(e){const{_context:t}=this,r=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await r.load();const n=this._renderer;this._renderer=r;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[n.createRemoveCommand(e.id),r.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}const a=await n.createDestroyCommand();return await a.execute(),Ei}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,i=this._renderer;let n;return n=null!=i?await i.createAddCommand(e):p.create(this._renderCommandContext),(0,s.Te)(t),n.appendPipelineStateCommand(()=>{r.addTile(e)}),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createRemoveCommand(e):p.create(this._renderCommandContext),i.appendPipelineStateCommand(()=>{t.removeTile(e)}),i}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let i;return i=null!=r?await r.createUpdateVisibilityCommand(e):p.create(this._renderCommandContext),(0,s.Te)(t),i}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,i.Cg)([(0,a.MZ)()],Pi.prototype,"updating",null),Pi=(0,i.Cg)([(0,a.$K)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Pi);const Bi=Pi,Ei={result:void 0}},65215:(e,t,r)=>{r.d(t,{H:()=>i,R:()=>n});class i{constructor(e){this.layerViewUid=e}}class n extends i{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>o});var i=r(67076),n=r(90360),s=r(41214);function o(e,t){return l(e,null,t)}const a=(0,n.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},72385:(e,t,r)=>{function i(){return new Float32Array(3)}function n(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const i=new Float32Array(3);return i[0]=e,i[1]=t,i[2]=r,i}function o(){return i()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>n,vt:()=>i});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:n,create:i,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(r,p);return new l(p,u,f,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,r)=>{r.d(t,{EC:()=>A,wq:()=>a});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),o=r(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const i=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,s=r.children.length;n<s;n++){const s=r.children[n],o=r.leaf?i(s):s;_(e,o)&&(r.leaf?t(s):b(e,o)?l(s,t):w.push(s))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],s=t.leaf?r(n):n;if(_(e,s)){if(t.leaf||b(e,s))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();r||C.length>0;){if(r||(r=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),C.push(r),this._condense(C),this;a||r.leaf||!b(r,l)?s?(o++,r=s.children[o],a=!1):r=null:(C.push(r),S.push(o),o=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){const n=r-t+1;let s=this._maxEntries;if(n<=s){const i=new I(e.slice(t,r+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));const o=new P([]);o.height=i;const a=Math.ceil(n/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){const t=Math.min(n+l-1,r);v(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,i-1))}}return c(o,this._toBBox),o}_insert(e,t,r){const i=this._toBBox,n=r?e:i(e);C.clear();const s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=y(e,o)-a;l<n?(n=l,i=a<i?a:i,r=o):l===n&&a<i&&(i=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,C);for(s.children.push(e),d(s,n);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,C,t)}_split(e,t){const r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);const s=this._chooseSplitIndex(r,n,i);if(!s)return;const o=r.children.splice(s,r.children.length-s),a=r.leaf?new I(o):new P(o);a.height=r.height,c(r,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let o=t;o<=r-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,r,this._toBBox),l=g(t,a),c=p(t)+p(a);l<i?(i=l,s=o,n=c<n?c:n):l===i&&c<n&&(n=c,s=o)}return s}_chooseSplitAxis(e,t,r){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const n=this._toBBox,s=u(e,0,t,n),o=u(e,r-t,r,n);let a=m(s)+m(o);for(let i=t;i<r-t;i++){const t=e.children[i];d(s,e.leaf?n(t):t),a+=m(s)}for(let i=r-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?n(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(x.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,n.zI)(e));else x.pushArray(r.children);r=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<r;o++)s=e.children[o],d(n,e.leaf?i(s):s);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,i,n){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=i)continue;const a=r+Math.ceil((t-r)/i/2)*i;(0,o.q)(e,a,r,t,n),s.push(r,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(66552),s=r(25482),o=r(91429),a=r(93223);const l=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],c)},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>f,BR:()=>h,wI:()=>d,G$:()=>m,$x:()=>p,Ov:()=>l,UC:()=>s,W_:()=>c,OP:()=>y,TU:()=>a,XX:()=>o,jy:()=>u});var i=r(70333),n=r(11254);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function c(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function h(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function f(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function p(e,t){return null}function m(e){return null}function y(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!y(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(25482),o=r(88930),a=r(91429),l=r(98623),c=r(36005),u=r(43937);let d=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return f}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,u.K)("start")],d.prototype,"writeStart",null),d=i=(0,n.Cg)([(0,a.$K)("esri.time.TimeExtent")],d);const h=new d,f=new d({start:void 0,end:void 0})},81961:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",2,(i,n,s)=>i.setUniform4fv(e,t(n,s),r))}}},87582:(e,t,r)=>{r(6867),r(65215).R},95696:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(69540),o=r(25482),a=r(91429),l=r(93223);let c=class extends((0,s.OU)(o.o)){static{i=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new i}};(0,n.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=i=(0,n.Cg)([(0,a.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},96576:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(4718),o=r(91429),a=r(92438),l=r(63988),c=r(49849),u=r(93223);let d=i=class extends((0,l.h)(a.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,n.Cg)([(0,o.MZ)(c.Wp)],d.prototype,"symbol",void 0),(0,n.Cg)([(0,u.e)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,n.Cg)([(0,o.$K)("esri.renderers.SimpleRenderer")],d)},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
316
+ }`)}},64183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Bi});var i=r(31635),n=r(65529),s=r(74887),o=r(36708),a=r(91429),l=r(5443),c=r(91218),u=r(16930),d=r(56390),h=r(61956),f=r(65494);class p{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new p(e,e.createRenderCommandBuffer(),t)}}var m=r(68197),y=r(18574),g=r(87403),b=r(28975);function _(){return new y.A({material:new b.N({color:new m.A("red")})})}var v=r(9093),w=r(51850),x=r(91829),C=r(6847),S=r(86211),A=r(58083),T=r(87317),I=r(70328),P=r(19419),B=(r(12359),r(95108),r(27615),r(52106),r(44208));r(4718),r(34275),r(65864);var E=r(37585),M=r(48163),O=r(34727),R=r(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const D=[];{const e=16;for(let t=0;t<360;t+=360/e)D.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const F=Object.freeze({"bottom-left":(0,M.fA)(0,0),bottom:(0,M.fA)(.5,0),"bottom-right":(0,M.fA)(1,0),left:(0,M.fA)(0,.5),center:(0,M.fA)(.5,.5),right:(0,M.fA)(1,.5),"top-left":(0,M.fA)(0,1),top:(0,M.fA)(.5,1),"top-right":(0,M.fA)(1,1)});var j=r(9762),V=r(27993);function z(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function L(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function U(e,t){const r=t.viewSpatialReference,i=t.renderSpatialReference,{extent:n}=e,s=(0,P.gX)(n),o=(0,w.vt)();return(0,V.F)([s[0],s[1],0],r,o,i),o}var N=r(97146);function H(e){const t=new Map;for(const[r,i]of e)t.set(r,{...i,indices:(0,N.Dg)(i.indices)});return t}r(46859);var q=r(63907);const G=(0,x.CN)(.25,.25,.75,.75);function k(e){return"cross"===e||"x"===e}function $(e,t=128,r=.5*t,i=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return Q(e,X(r,r,t/2))}(t,r);case"square":return function(e,t){return Y(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return Z(e,t,!1,r)}(t,r,i);case"x":return function(e,t,r=0){return Z(e,t,!0,r)}(t,r,i);case"kite":return function(e,t){return Y(e,t,!0)}(t,r);case"triangle":return function(e,t){return Q(e,W(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,i=t/2,n=e/2,s=.8*r,o=X(n,(e-t)/2-s,Math.sqrt(s*s+i*i)),a=W(n,r,i);return Q(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,r)}}function Y(e,t,r){return r&&(t/=Math.SQRT2),Q(e,(i,n)=>{let s=i-.5*e+.25,o=.5*e-n-.75;if(r){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function Z(e,t,r,i=0){t-=i,r&&(t*=Math.SQRT2);const n=.5*t;return Q(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(r){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>n?Math.sqrt((a-n)*(a-n)+l*l):l:l>n?Math.sqrt(a*a+(l-n)*(l-n)):a,o-=i/2,o})}function X(e,t,r){return(i,n)=>{const s=i-e,o=n-t;return Math.sqrt(s*s+o*o)-r}}function W(e,t,r){const i=Math.sqrt(t*t+r*r);return(n,s)=>{const o=Math.abs(n-e)-r,a=s-e+t/2+.75,l=(t*o+r*a)/i,c=-a;return Math.max(l,c)}}function Q(e,t){const r=new Float32Array(e*e);for(let i=0;i<e;i++)for(let n=0;n<e;n++)r[n+e*i]=t(n,i)/e;return r}var J=r(46610);class K{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,r=.5*t,i=0){return{data:$(e,t,r,i),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,noUnpackFlip:!0,dataType:q.ld.FLOAT,pixelFormat:6403,internalFormat:q.H0.R16F,reloadable:!0}}}("circle"));this._iconTextureID=t;const r={anchorPosition:F.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:G,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:k("circle")},i=new Uint8Array(8),n=255;i[0]=0,i[1]=0,i[2]=0,i[3]=n,i[4]=n,i[5]=0,i[6]=n,i[7]=n,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const s=U(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,s,!0))}async _createGeometry(e){const{_materialId:t,_context:r}=this,{mainThreadDelegate:i}=r,{featureCount:n}=e;if(0===n||null==t)return null;const s=z(e),o=L(e),a=function(e,t){const r=e.length/3,i=t.viewSpatialReference,n=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,j.projectBuffer)(e,i,0,s,n,0,r))throw new Error("Failed to project coordinates");return s}(await i.applyElevationAlignmentTo(o),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0]),f=new Uint32Array(n);for(let e=0;e<n;++e)f[e]=e;const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=0;const m=[["position",new J.n(a,f,3,!0)],["normal",new J.n(l,p,3,!0)],["color",new J.n(c,p,4,!0)],["rotation",new J.n(h,p,1,!0)],["size",new J.n(u,p,2,!0)],["centerOffsetAndDistance",new J.n(d,p,4,!0)]],y=new Uint8Array(n);return e.getVisibilityArray(y),{attributes:H(m),olidColor:void 0,transformation:(0,v.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:s}=e;if(null==t||0===n)return r.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return r.createPipelineCommand();const a=U(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(s,o,a,!0))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):p.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,r=t?.outline?.color;if(null!=r){const t=m.A.toUnitRGB(r),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return te;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=ee){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,t=ee){const r=this._getCombinedOpacity(e,t);return function(e,t,r=null){const i=(0,x.o8)(x.Un);return null!=e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],e.length>3&&(i[3]=e[3])),null!=t&&(i[3]=t),r&&(0,T.s)(i,i,r),i}(null!=e?m.A.toUnitRGB(e):w.Un,r)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??C.r;var e}}const ee={hasIntrinsicColor:!1},te=x.uY;class re{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:r}=this,i=[];for(const n of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(n);null!=t&&(i.push(t.load()),r.push(t))}await Promise.all(i),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,r=[];for(const e of t)r.push(e.createDestroyCommand());const i=e.joinPipelineCommands(await Promise.all(r));return i.appendPipelineStateCommand(()=>this._destroy()),i}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(i))}}class ie{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createAddCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),i}async createRemoveCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createRemoveCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.delete(e)),i}async createUpdateVisibilityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,r=await this._provisionSymbol();if(null==r)return t.createPipelineCommand();const i=[];for(const t of e.values())i.push(r.createUpdateElevationCommand(t));const n=await Promise.all(i);return t.joinPipelineCommands(n)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:r}=this;if(!e)return t.createPipelineCommand();const i=[];for(const e of r.keys())i.push(this.createRemoveCommand(e));i.push(e.createDestroyCommand());const n=await Promise.all(i);return t.joinPipelineCommands(n)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var ne=r(48353),se=r(30809),oe=r(8887),ae=r(38954),le=r(72385),ce=(r(4197),r(11868)),ue=r(27921),de=r(71351),he=r(73941);function fe(e,t){const r=e[t],i=e[t+1],n=e[t+2];return Math.sqrt(r*r+i*i+n*n)}function pe(e,t){const r=e[t],i=e[t+1],n=e[t+2],s=1/Math.sqrt(r*r+i*i+n*n);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function me(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r}r(37539),r(20498),r(87170),(0,M.vt)(),(0,M.vt)();var ye=r(620);r(78754);const ge=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)ge[6*e+t]=e;const be=new Array(36);for(let e=0;e<6;e++)be[6*e]=0,be[6*e+1]=1,be[6*e+2]=2,be[6*e+3]=2,be[6*e+4]=3,be[6*e+5]=0;const _e=(0,le.fA)(-.5,0,-.5),ve=(0,le.fA)(.5,0,-.5),we=(0,le.fA)(0,0,.5),xe=(0,le.fA)(0,.5,0),Ce=(0,le.vt)(),Se=(0,le.vt)(),Ae=(0,le.vt)(),Te=(0,le.vt)(),Ie=(0,le.vt)();(0,ae.e)(Ce,_e,xe),(0,ae.e)(Se,_e,ve),(0,ae.f)(Ae,Ce,Se),(0,ae.n)(Ae,Ae),(0,ae.e)(Ce,ve,xe),(0,ae.e)(Se,ve,we),(0,ae.f)(Te,Ce,Se),(0,ae.n)(Te,Te),(0,ae.e)(Ce,we,xe),(0,ae.e)(Se,we,_e),(0,ae.f)(Ie,Ce,Se),(0,ae.n)(Ie,Ie),Ae[0],Ae[1],Ae[2],Te[0],Te[1],Te[2],Ie[0],Ie[1],Ie[2],(0,w.vt)();var Pe=r(4576),Be=r(69397);r(6867),r(87582);var Ee=r(57917);function Me(e,t){const r=(e,r,i=!1)=>({levels:e.map(e=>{const n=H(r(e.tesselation));return i&&function(e){const t=e,r=t.get("position").data,i=t.get("normal").data;if(i){const t=Oe(e,"normal").data;for(let e=0;e<i.length;e+=3){const r=i[e+1];t[e+1]=-i[e+2],t[e+2]=r}}if(r){const t=Oe(e,"position").data;for(let e=0;e<r.length;e+=3){const i=r[e+1];t[e+1]=-r[e+2],t[e+2]=i}}}(n),{components:[{attributes:n,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return r(Re,e=>function(e,t,r,i,n=!0,s=!0){let o=0;const a=t,l=e;let c=(0,le.fA)(0,o,0),u=(0,le.fA)(0,o+l,0),d=(0,le.fA)(0,-1,0),h=(0,le.fA)(0,1,0);i&&(o=l,u=(0,le.fA)(0,0,0),c=(0,le.fA)(0,o,0),d=(0,le.fA)(0,1,0),h=(0,le.fA)(0,-1,0));const f=[u,c],p=[d,h],m=r+2,y=Math.sqrt(l*l+a*a);if(i)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),i=(0,le.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,le.fA)(l*Math.cos(t)/y,-a/y,l*Math.sin(t)/y);p.push(n)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),i=(0,le.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,le.fA)(l*Math.cos(t)/y,a/y,l*Math.sin(t)/y);p.push(n)}const g=new Array,b=new Array;if(n){for(let e=3;e<f.length;e++)g.push(1),g.push(e-1),g.push(e),b.push(0),b.push(0),b.push(0);g.push(f.length-1),g.push(2),g.push(1),b.push(0),b.push(0),b.push(0)}if(s){for(let e=3;e<f.length;e++)g.push(e),g.push(e-1),g.push(0),b.push(e),b.push(e-1),b.push(1);g.push(0),g.push(2),g.push(f.length-1),b.push(1),b.push(2),b.push(p.length-1)}const _=(0,ce.oe)(3*m);for(let e=0;e<m;e++)_[3*e]=f[e][0],_[3*e+1]=f[e][1],_[3*e+2]=f[e][2];const v=(0,ce.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new J.n(_,g,3,!0)],["normal",new J.n(v,b,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return r([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,r){const i=e;let n,s;if(r)n=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=i*(1+Math.sqrt(5))/2;n=[-i,e,0,i,e,0,-i,-e,0,i,-e,0,0,-i,e,0,i,e,0,-i,-e,0,i,-e,e,0,-i,e,0,i,-e,0,-i,-e,0,i],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<n.length;t+=3)me(n,t,e/fe(n,t));let o={};function a(t,r){t>r&&([t,r]=[r,t]);const i=t.toString()+"."+r.toString();if(o[i])return o[i];let s=n.length;return n.length+=3,function(e,t,r,i,n,s=t){(n=n||e)[s]=e[t]+r[i],n[s+1]=e[t+1]+r[i+1],n[s+2]=e[t+2]+r[i+2]}(n,3*t,n,3*r,n,s),me(n,s,e/fe(n,s)),s/=3,o[i]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let r=0;r<e;r+=3){const e=s[r],i=s[r+1],n=s[r+2],o=a(e,i),l=a(i,n),c=a(n,e),u=4*r;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=i,t[u+4]=l,t[u+5]=o,t[u+6]=n,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,ce.Wz)(n);for(let e=0;e<l.length;e+=3)pe(l,e);return[["position",new J.n((0,ce.Wz)(n),s,3,!0)],["normal",new J.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Oe(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Ee.S)(r.data)},e.set(t,r)),r}const Re=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var De=r(2495),Fe=r(74810);class je{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let r={usePBR:!0,isSchematic:!0,mrrFactors:Fe.Bt,ambient:w.Un,diffuse:w.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(r.externalColor=x.Un,r.instanced=!0,this._isPrimitive){const e=new De.fs;e.layerOpacity=t,r={...r,cullFace:Ve((0,De.ty)(e))}}const i=await e.createMaterial({type:"default",parameters:r}),n=this._symbolLayer.resource;this._primitive=n&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(n?.primitive)?n.primitive:se.r;const s=Me(this._primitive,i);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=i,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:r}=this,i=r.renderCommandContext,n=[];return null!=e&&n.push(i.destroyLodRenderer(e)),null!=t&&n.push(i.destroyMaterial(t)),new p(i,i.mergeRenderCommandBuffers(n),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:i}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:n}=e;if(0===n)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||se.r,a=(0,I.vt)((0,oe.Fq)(o)),l=(0,w.ci)((0,I.Ej)(a)),c=(0,w.ci)((0,oe.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*n),d=new Float64Array(16*n),h=L(e),f=await i.applyElevationAlignmentTo(h);for(let e=0;e<n;++e){const t=e,r=f[3*e+0],i=f[3*e+1],n=f[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,Ue),o=this._computeLocalTransform(c,l,Le);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=z(e),m=new Uint8Array(n);e.getVisibilityArray(m);const y={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(r.addLodInstances(this._lodRendererId,e.id,y))}async createRemoveCommand(e){const{_context:t,_lodRendererId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.removeLodInstances(r,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,i=this._primitiveMaterialId;if(null==i)return t.createPipelineCommand();const n=this._getLayerOpacity();let s={layerOpacity:n};if(this._isPrimitive){const e=new De.fs;e.layerOpacity=n,s={...s,cullFace:Ve((0,De.ty)(e))}}return t.createPipelineCommand(r.updateMaterial({type:"default",materialId:i,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:r}=this,{renderCommandContext:i,mainThreadDelegate:n}=t,{featureCount:s,id:o}=e;if(null==r||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=L(e),c=await n.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],i=c[3*e+1],n=c[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,Ue);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(i.updateLodInstancesData(r,o,a))}_writeMatrixToTypedBuffer(e,t,r){let i=16*t;for(let t=0;t<16;t++)e[i++]=r[t]}_computeGlobalTransform(e,t,r,i,n){return ze[0]=e,ze[1]=t,ze[2]=r,(0,ne.l)(i,ze,n,this._context.renderSpatialReference),n}_computeLocalTransform(e,t,r){return(0,A.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const i=function(e=w.Un,t,r,i=1){const n=new Array(3);if(null==t||null==r)n[0]=1,n[1]=1,n[2]=1;else{let i,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!i&&!l,u=r[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(n[o]=d,i=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==n[e]?n[e]=i:0===n[e]&&(n[e]=.001*s)}for(let e=2;e>=0;e--)n[e]/=i;return(0,w.ci)(n)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===i[0]&&1===i[1]&&1===i[2]||(0,A.hs)(r,r,i)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function Ve(e){return e?0:2}const ze=(0,w.vt)(),Le=(0,v.vt)(),Ue=(0,v.vt)();class Ne{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new K(_(),this._context),this._symbols[1]=new je(new g.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=this._partition(e),i=await Promise.all(r.map(async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))})),n=t.joinPipelineCommands(i);return n.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,r)),n}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e);if(null==n)return new p(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})),o=r.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e.id);if(null==n)return new p(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))}));return r.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=[];for(let t=0;t<this._symbols.length;++t){const i=this._symbols[t];null!=i&&i.loaded&&r.push(i.createUpdateLayerViewOpacityCommand(e))}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))});r.push(...e)}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.keys())r.push(this.createRemoveCommand(t));for(const e of this._symbols)r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=z(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,i=[[],[]];for(let e=0;e<r;++e)i[t[e]%2].push(e);return i.map((t,r)=>new He(r,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class He{constructor(e,t){this.index=e,this.features=t}}class qe{constructor(e,t,r,i,n,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=r,this.renderCoordsHelper=i,this.renderCommandContext=n,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new Ge(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new p(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class Ge{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,f.L)(e??ke)??void 0;if(!t)throw new Error("Failed to create renderer");const r=t.type;switch(r){case"simple":return new ie(t,this.context);case"unique-value":return new Ne(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${r}`),this.createSymbolRendererFromJSON(ke)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new re(e,this.context);case"picture-marker":case"simple-marker":return new K(_(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new K(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const ke={type:"simple"};var $e=r(69622),Ye=r(60999),Ze=r(32587),Xe=r(76030),We=r(24326);function Qe(e=""){return`${e}${(0,We.c)()}`}new Float64Array(3);class Je{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Qe(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Be.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let i=0;i<r.length;++i)r[i]=t[e[i]];return new Je(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let i=0;i<t;++i)this.getEnabled(i)&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class Ke{constructor(e){this._tile=e,this.id=Qe(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Be.qK+(0,Be.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new Je(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const i of this._allFeatureIndices())t[i]&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:i}=this;for(const n of t)e[r++]=Number(i[n]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let et=class extends $e.A{constructor(e){super(e),this.extent=null,this._tileHandles=new Ze.A,this._wanted=new Ze.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,P.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,r=this._tileHandles;for(const i of t.values())null==r.get(i.id)?.featureData&&e.push(i);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Ye.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,Xe.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,r=new Array;for(const i of e)t.has(i.id)||r.push(i);const i=new Array;for(const r of t.values()){const{id:t}=r;e.every(e=>e.id!==t)&&i.push(r.descriptor)}const n=this._tileHandles,{_boundingRect:s}=this,o=null!=s?r.filter(e=>!e.extent||(0,P.HY)(s,e.extent)):r,a=this._wanted,l=new Array;for(const{id:e}of i)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of i){const{id:t}=e;if(c.some(t=>tt(t,e)||tt(e,t)))continue;const r=n.get(t);null!=r&&l.push(this._removeTile(r))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const r=t.featureData;null!=r&&e(r)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const r=await this.createRemoveCommand(t.id);await(r?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r){if(!it(r)||r.featureData.isFullyEnabled)return;return r.featureData.enableAll(),void await this._onTileLoad(r)}const i=new rt(e,(0,Ye.UT)(async t=>{const r=await this.loadTile(e,t);return(0,s.Te)(t),new Ke(r)}));this._tileHandles.set(i.id,i);try{await i.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!it(e))throw new Error})(i),await this._onTileLoad(i)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:r,_tileHandles:n,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of n.values()){if(t===e)continue;const{descriptor:i,id:c}=t;if(!r.has(c)&&!s.some(e=>tt(e,i)||tt(i,e))){n.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(it(t)){if(tt(o,i)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(tt(i,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,i.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,r=new Set(t.objectIds());for(const e of l)e.disableObjectIds(r),this._validateRemoval(e,r)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Pe.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}_validate(){if(!(0,B.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!it(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:i}=e[t];for(let n=t+1;n<e.length;++n){const{featureData:t,objectIds:s}=e[n];for(const e of s)if(i.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,B.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function tt({lij:[e,t,r]},{lij:[i,n,s]}){const o=i-e;return o>=0&&t===n>>o&&r===s>>o}(0,i.Cg)([(0,a.MZ)()],et.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"loadTile",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createAddCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createRemoveCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"createUpdateCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],et.prototype,"tileLocks",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_boundingRect",null),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_missingTiles",null),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_updateRequested",void 0),(0,i.Cg)([(0,a.MZ)()],et.prototype,"_synchronizationTask",void 0),et=(0,i.Cg)([(0,a.$K)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],et);class rt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function it(e){return null!=e.featureData}var nt=r(36563);class st{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,r=e.map(e=>t.get(e)).filter(Pe.Ru),i=Promise.allSettled(r),n=(0,s.Tw)(),o=(0,nt.hA)(()=>n.resolve()),a=n.promise.finally(()=>{for(const r of e)t.get(r)===a&&t.delete(r)});for(const r of e)t.set(r,a);return await i,(0,nt.Bf)(o)}}var ot=r(75503),at=r(27647);class lt{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Be.qK+Be.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new ct(this._index,this._view,e)}}class ct extends lt{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,at.Q)(this._geometryOverride)}}class ut{constructor(e,t){this.featureData=e,this.bounds=t}}class dt{constructor(){this._tileBounds=new Map,this.events=new n.bk,this.featureAdapter=ht.shared}get usedMemory(){return Be.qK+Be.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new ot.wq(9,t=>e.getBounds(t)),i=new Array;for(let e=0;e<t;++e)i[e]=e;r.load(i),this._tileBounds.set(e.id,new ut(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all(r=>{t.getEnabled(r)&&e(new lt(r,t))})}forEachInBounds(e,t){ft.minX=e[0],ft.minY=e[1],ft.maxX=e[2],ft.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(ft,r=>{e.getEnabled(r)&&t(new lt(r,e))})}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,o),i=Math.min(i,a),n=Math.min(n,l)}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:e}}}class ht{static{this.shared=new ht}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const ft=new ot.EC;var pt=r(80893);class mt{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const i=Be.ez+t.reduce((e,{usedMemory:t})=>e+t,0),n=3*Be.RS;this.usedMemory=Be.qK+i+n,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttribute(i,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(i,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:i,featurePageIndex:n}=this._translateIndex(e);this._pages[i].getCoordinates(n,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getCentroid(i,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getObjectIdsArray(e,n,i);return i}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getCoordinatesArray(e,n,i);return i}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,i=new Array;for(const n of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(n);r!==e&&(0!==i.length&&t.push({pageIndex:r,indices:i}),r=e,i=[]),i.push(s)}0!==i.length&&t.push({pageIndex:r,indices:i})}const{_pages:r}=this;for(const{pageIndex:e,indices:i}of t)yield{page:r[e],indices:i}}}var yt=r(49186),gt=r(51624),bt=r(62577),_t=r(92722),vt=r(95466),wt=r(53655);class xt{constructor(e){this._reader=new gt.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Ct(e.getMessage());e.skip()}At()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:i}}=this,n=r.get(t)?.index;if(null==n)return;const s=i[e*r.fields.length+n],o=this._reader;return o.move(s),Tt(o)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,i=e*t.fields.length,n=this._reader,s={};for(const e of t.fields){const t=r[i+e.index];n.move(t),s[e.name]=Tt(n)}return s}getCoordinates(e,t,r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;i.move(s[e]),this._readCoordinates(o,a,t,r)}getOptimizedGeometry(e){const t=(0,w.vt)();return this.getCoordinates(e,t),new _t.A([],t,!0,!1)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,It);const[i,n,s]=It,o=[i,n];return t&&(o[3]=s),r&&(o[t?4:3]=0),new _t.A([],o,t,r)}getBounds(e){this.getCoordinates(e,It);const[t,r]=It,i=new ot.EC;return i.minX=t,i.minY=r,i.maxX=t,i.maxY=r,i}getBoundingBox(e){this.getCoordinates(e,It);const[t,r,i]=It;return(0,I.fA)(t,r,i,t,r,i)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{objectIdFieldName:n,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(n).index,l=o.fields.length;for(const n of t){const t=s[n*l+a];i.move(t),e[r++]=Tt(i)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;for(const n of t){const t=s[n];i.move(t),r=this._readCoordinates(o,a,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:i,fieldsIndex:n}=this._index,s=n.get(r).index,o=n.fields.length;for(const r of e){const e=i[r*o+s];t.move(e),yield Tt(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[i,n,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=i+e*l.getSInt64(),o[a++]=n+t*l.getSInt64(),o[a++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Ct(e){for(;e.next();){if(1===e.tag())return St(e.getMessage());e.skip()}At()}function St(e){let t,r,i=!1,n=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&At();break;case 9:i=e.getBool()??!1;break;case 12:t=(0,bt.Q1)(e.processMessage(wt.ae));break;case 13:{const t=e.processMessage(wt.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:n=e.getBool()??!1;break;default:e.skip()}const c=new vt.A(o);return null!=t&&n&&null!=r&&c.has(r)||At(),{transform:t,exceededTransferLimit:i,fieldsIndex:c,objectIdFieldName:r,featureIndices:a,attributeIndices:l}}function At(){const e=new yt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function Tt(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const It=(0,w.vt)();class Pt{constructor(e,t,r,i,n){this.spatialReference=e,this.url=r,this.objectIdField=i,this.capabilities=n;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[i],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:i}=this,n=(0,P.w1)(e.extent,r),o=this._baseQuery.clone();o.geometry=n;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let r=0;r<u;++r)e.push(this._fetchPage(o,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new mt(e,a,i)}async _fetchPage(e,t,r){const i=e.clone();i.start=t*this._pageSize;const n=await(0,pt.kS)(this.url,i,{signal:r});return(0,s.Te)(r),new xt(n)}}var Bt=r(29920),Et=r(77690),Mt=r(29242);var Ot=r(13030),Rt=r(78662),Dt=r(49255),Ft=r(40268),jt=r(25634),Vt=r(11725),zt=r(77194),Lt=r(59907),Ut=r(43616),Nt=r(13259),Ht=r(4431),qt=r(1843),Gt=r(13840),kt=r(42958),$t=r(16943),Yt=r(33524),Zt=r(90644),Xt=r(85079);let Wt=class extends kt.w{constructor(e,t){super(e,t,(0,Xt._u)([Jt,tr()].map(Ht.U))),this.shader=new Gt.r(Nt.H,()=>r.e(8241).then(r.bind(r,48241))),this.primitiveType=t.occlusionPass?q.WR.POINTS:q.WR.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:t,hasEmission:r,hasPolygonOffset:i,draped:n,output:s,depthTestEnabled:o,occlusionPass:a}=e,l=o&&!n&&!(1===t)&&!a&&!(8===s);return(0,Zt.Ey)({blending:(0,Dt._o)(s)?(0,Yt.Yf)(t,!0):null,depthTest:o&&!n?{func:515}:null,depthWrite:l?Zt.Uy:null,drawBuffers:(0,Yt.Sv)(t,r),colorWrite:Zt.kn,polygonOffset:i?Qt:null})}};Wt=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],Wt);const Qt={factor:0,units:-4},Jt=(0,qt.BP)().vec2u8("uv0",{glNormalized:!0}),Kt=(0,qt.BP)().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),er=Kt.clone().vec4u8("olidColor");function tr(){return(0,$t.E)()?er:Kt}var rr=r(51976),ir=r(2451);class nr extends ir.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,i.Cg)([(0,rr.W)()],nr.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occlusionTestEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"signedDistanceFieldEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVVSize",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVVColor",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasVerticalOffset",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasScreenSizePerspective",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasRotation",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"debugDrawLabelBorder",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"hasPolygonOffset",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"depthTestEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"pixelSnappingEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"draped",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"terrainDepthTest",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"cullAboveTerrain",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occlusionPass",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"occludedFragmentFade",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"horizonCullingEnabled",void 0),(0,i.Cg)([(0,rr.W)()],nr.prototype,"isFocused",void 0);var sr=r(49788);class or extends Vt.i{constructor(e,t){super(e,Er),this.produces=new Map([[14,e=>(0,Dt.Lc)(e)&&!this.parameters.drawAsLabel],[15,e=>(0,Dt.Lc)(e)&&this.parameters.drawAsLabel],[13,()=>this.parameters.occlusionTest],[19,e=>this.parameters.draped&&(0,Dt.Lc)(e)]]),this._visible=!0,this._configuration=new nr(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=13===t.slot,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||13===t.slot,(0,Dt._o)(e)&&(this._configuration.debugDrawLabelBorder=!!R.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,i,n,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=r,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,x.ci)(h.data,Sr),{scaleX:p,scaleY:m}=Or(f,d,u.pixelRatio);(0,Et.z0)(br,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+r*r+i*i),d=1/Math.sqrt(n*n+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=r*u,e[2]=i*u,e[3]=n*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(br);const y=e.attributes.get("position"),g=e.attributes.get("size"),b=e.attributes.get("normal"),_=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,ye.vA)(y.size>=3);const C=(0,Nt.c)(d),S="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<y.data.length/y.size;e++){const i=e*y.size;(0,ae.h)(dr,y.data[i],y.data[i+1],y.data[i+2]),(0,ae.p)(dr,dr,t),(0,ae.p)(dr,dr,u.viewMatrix);const n=e*v.size;if((0,ae.h)(xr,v.data[n],v.data[n+1],v.data[n+2]),!S&&(dr[0]+=xr[0],dr[1]+=xr[1],0!==xr[2])){const e=xr[2];(0,ae.n)(xr,dr),(0,ae.e)(dr,dr,(0,ae.j)(xr,xr,e))}const o=e*b.size;if((0,ae.h)(hr,b.data[o],b.data[o+1],b.data[o+2]),lr(hr,br,u,Ar),Rr(this.parameters,dr,Ar,u,ur),u.applyProjection(dr,fr),fr[0]>-1){S&&(xr[0]||xr[1])&&(fr[0]+=xr[0]*u.pixelRatio,0!==xr[1]&&(fr[1]+=ur.alignmentEvaluator.apply(xr[1])*u.pixelRatio),u.unapplyProjection(fr,dr)),fr[0]+=this.parameters.screenOffset[0]*u.pixelRatio,fr[1]+=this.parameters.screenOffset[1]*u.pixelRatio,fr[0]=Math.floor(fr[0]),fr[1]=Math.floor(fr[1]);const t=e*g.size;Pr[0]=g.data[t],Pr[1]=g.data[t+1],ur.evaluator.applyVec2(Pr,Pr);const i=Tr*u.pixelRatio;let n=0;d.textureIsSignedDistanceField&&(n=Math.min(d.outlineSize,.5*Pr[0])*u.pixelRatio/2),Pr[0]*=p,Pr[1]*=m;const o=e*_.size,a=d.rotation+_.data[o];if(cr(c,fr[0],fr[1],Pr,i,n,a,d,C)){const e=r.ray;if((0,ae.p)(mr,dr,(0,A.B8)(vr,u.viewMatrix)),fr[0]=c[0],fr[1]=c[1],u.unprojectFromRenderScreen(fr,dr)){const t=(0,w.vt)();(0,ae.d)(t,e.direction);const r=1/(0,ae.b)(t);(0,ae.j)(t,t,r),s((0,ae.C)(e.origin,dr)*r,t,-1,mr)}}}}}intersectDraped(e,t,r,i,n){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,Nt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,x.ci)(u.data,Sr),{scaleX:h,scaleY:f}=Or(d,l,e.screenToWorldRatio),p=Ir*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],y=t*o.size;Pr[0]=o.data[y],Pr[1]=o.data[y+1];let g=0;l.textureIsSignedDistanceField&&(g=Math.min(l.outlineSize,.5*Pr[0])*e.screenToWorldRatio/2),Pr[0]*=h,Pr[1]*=f;const b=t*a.size,_=l.rotation+a.data[b];cr(r,d,m,Pr,p,g,_,l,c)&&i(n.distance,n.normal,-1)}}createBufferWriter(){return new Mr}applyShaderOffsetsView(e,t,r,i,n,s,o){const a=lr(t,r,n,Ar);return this._applyVerticalGroundOffsetView(e,a,n,o),Rr(this.parameters,o,a,n,s),this._applyPolygonOffsetView(o,a,i[3],n,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,r,i,n){return this._applyCenterOffsetNDC(e,t,r,i),null!=n&&(0,ae.d)(n,i),this._applyPolygonOffsetNDC(i,t,r,i),i}_applyPolygonOffsetView(e,t,r,i,n){const s=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,ae.d)(n,e);const l=(0,O.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/i.viewport[2];return(0,ae.j)(n,e,a>0?c:1/c),n}_applyVerticalGroundOffsetView(e,t,r,i){const n=(0,ae.b)(e),s=r.aboveGround?1:-1,o=r.computeRenderPixelSizeAtDist(n)*Ft.R,a=(0,ae.j)(dr,t.normal,s*o);return(0,ae.i)(i,e,a),i}_applyCenterOffsetView(e,t,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,ae.d)(r,e),i&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,ae.n)(hr,r),(0,ae.a)(r,r,(0,ae.j)(hr,hr,t[2])))),r}_applyCenterOffsetNDC(e,t,r,i){const n="screen"!==this.parameters.centerOffsetUnits;return i!==e&&(0,ae.d)(i,e),n||(i[0]+=t[0]/r.fullWidth*2,i[1]+=t[1]/r.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,r,i){const n=this.parameters.shaderPolygonOffset;if(e!==i&&(0,ae.d)(i,e),n){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);i[2]-=(s||e)*n}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,i=e[3]>=sr.Q||t>=sr.Q&&r[3]>=sr.Q;return this._visible&&i}createGLMaterial(e){return new ar(e)}calculateRelativeScreenBounds(e,t,r=(0,P.vt)()){return function(e,t,r,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class ar extends jt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Wt,e)}}function lr(e,t,r,i){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Et.z0)(_r,t)),(0,ae.t)(i.normal,e,t),(0,ae.p)(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=(0,ae.g)(pr,Br),i}function cr(e,t,r,i,n,s,o,a,l){let c=t-n-i[0]*l[0],u=c+i[0]+2*n,d=r-n-i[1]*l[1],h=d+i[1]+2*n;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=i[0]*f[0],d+=i[1]*f[1],u-=i[0]*(1-f[2]),h-=i[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,E.hZ)(gr,t,r),(0,E.e$)(yr,e,gr,(0,O.kU)(o)),yr[0]>c&&yr[0]<u&&yr[1]>d&&yr[1]<h}const ur=new zt.fc,dr=(0,w.vt)(),hr=(0,w.vt)(),fr=(0,x.vt)(),pr=(0,w.vt)(),mr=(0,w.vt)(),yr=(0,M.vt)(),gr=(0,M.vt)(),br=(0,Mt.vt)(),_r=(0,Mt.vt)(),vr=(0,v.vt)(),wr=(0,x.vt)(),xr=(0,w.vt)(),Cr=(0,w.vt)(),Sr=(0,x.vt)(),Ar={normal:pr,cosAngle:0},Tr=1,Ir=2,Pr=(0,M.fA)(0,0),Br=(0,w.fA)(0,0,1);class Er extends jt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,x.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,M.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,x.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,x.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Mr{constructor(){this.layout=Jt,this.instanceLayout=tr()}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,r,i,n,s){const{position:o,normal:a,color:l,size:c,rotation:u,centerOffsetAndDistance:d,featureAttribute:h,uvi:f}=n;(0,Lt.Hk)(r.get("position"),e,o,s),(0,Lt.p1)(r.get("normal"),t,a,s);const p=r.get("position").indices.length;let m=0,y=0,g=Nt.f,b=Nt.f;const _=r.get("uvi")?.data;_&&_.length>=4&&(m=_[0],y=_[1],g=_[2],b=_[3]);for(let e=0;e<p;++e){const t=s+e;f.setValues(t,m,y,g,b)}if((0,Lt.tb)(r.get("color"),4,l,s),(0,Lt.Ue)(r.get("size"),c,s),(0,Lt.uO)(r.get("rotation"),u,s),r.get("centerOffsetAndDistance")?(0,Lt.Ut)(r.get("centerOffsetAndDistance"),d,s):(0,Lt.Pq)(d,s,p),r.get("featureAttribute")?(0,Lt.Ut)(r.get("featureAttribute"),h,s):(0,Lt.Pq)(h,s,p),null!=i){const e=r.get("position")?.indices;if(e){const t=e.length,r=n.getField("olidColor",Ot.XP);(0,Lt.vx)(i,r,t,s)}}return{numVerticesPerItem:1,numItems:p}}writeBaseInstance(e,t){const{uv0:r}=t;(0,Lt.Ue)(e.get("uv0"),r,0)}intersect(e,t,r,i,n,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=i;if(!a||!l||c&&t.isLabel||!u)return;const h=this.instanceLayout.createView(e),{position:f,normal:p,rotation:m,size:y,featureAttribute:g,centerOffsetAndDistance:b}=h,_="screen"===t.centerOffsetUnits,v=(0,Nt.c)(t);if(null==f||null==p||null==m||null==y||null==b||null==d)return;const x=null==g?null:g.getVec(0,Sr),{scaleX:C,scaleY:S}=Or(x,t,d.pixelRatio),T=f.count;for(let e=0;e<T;e++){if(f.getVec(e,dr),null!=r&&(0,ae.i)(dr,dr,r),(0,ae.p)(dr,dr,d.viewMatrix),b.getVec(e,wr),(0,ae.h)(xr,wr[0],wr[1],wr[2]),!_&&(dr[0]+=xr[0],dr[1]+=xr[1],0!==xr[2])){const e=xr[2];(0,ae.n)(xr,dr),(0,ae.e)(dr,dr,(0,ae.j)(xr,xr,e))}if(p.getVec(e,hr),lr(hr,br,d,Ar),Rr(t,dr,Ar,d,ur),d.applyProjection(dr,fr),fr[0]>-1){_&&(xr[0]||xr[1])&&(fr[0]+=xr[0]*d.pixelRatio,0!==xr[1]&&(fr[1]+=ur.alignmentEvaluator.apply(xr[1])*d.pixelRatio),d.unapplyProjection(fr,dr)),fr[0]+=t.screenOffset[0]*d.pixelRatio,fr[1]+=t.screenOffset[1]*d.pixelRatio,fr[0]=Math.floor(fr[0]),fr[1]=Math.floor(fr[1]),y.getVec(e,Pr),ur.evaluator.applyVec2(Pr,Pr);const r=Tr*d.pixelRatio;let n=0;t.textureIsSignedDistanceField&&(n=Math.min(t.outlineSize,.5*Pr[0])*d.pixelRatio/2),Pr[0]*=C,Pr[1]*=S;const s=m.get(e),a=t.rotation+s;if(cr(u,fr[0],fr[1],Pr,r,n,a,t,v)){const t=i.ray;if((0,ae.p)(mr,dr,(0,A.B8)(vr,d.viewMatrix)),fr[0]=u[0],fr[1]=u[1],d.unprojectFromRenderScreen(fr,dr)){const r=(0,w.vt)();(0,ae.d)(r,t.direction);const i=1/(0,ae.b)(r);(0,ae.j)(r,r,i),o((0,ae.C)(t.origin,dr)*i,r,e,mr)}}}}}}function Or(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,Rt.VC)(Cr,t,e),{scaleX:Cr[0]*r,scaleY:Cr[1]*r})}function Rr(e,t,r,i,n){if(!e.verticalOffset?.screenLength){const i=(0,ae.b)(t);return n.update(r.cosAngle,i,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),t}const s=(0,ae.b)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,Ut.kE)(i,s,e.verticalOffset,r.cosAngle,o,e.screenSizePerspectiveMinPixelReferenceSize);return n.update(r.cosAngle,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),(0,ae.j)(r.normal,r.normal,a),(0,ae.i)(t,t,r.normal)}class Dr{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async createTexture(e){const{data:t,parameters:r}=e();return await this._mainThreadDelegate.createTexture(t,r)}async releaseTexture(e){const t=this._destroyTexture(e);return new p(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:r}=e,i=Qe("material");let n,s;switch(t){case"default":n=new De.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:i,parameters:e.parameters};break;case"hud":n=new or(r,this.globalViewingMode),s={type:t,materialId:i,parameters:e.parameters}}return this._bufferWriters.set(i,n.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),i}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.addDirectRendererGeometryBuffer(n,e,s,o,r)}updateDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.updateDirectRendererGeometryBuffer(n,e,s,o,r)}addDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Qe("lod-renderer"),r=new Set,i={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const i=(0,N.tM)(t.indices.length/3),n=new Bt.j(i,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:n.bbMax,bbMin:n.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,i,Array.from(r)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t,r){const{materialId:i,visibilities:n,objectIds:s}=e,o=this._bufferWriters.get(i);if(null==o)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,A.C)(Fr,e.transformation),Fr[12]-=t[0],Fr[13]-=t[1],Fr[14]-=t[2],a=Fr;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let l=null;a&&((0,A.B8)(jr,Fr),(0,A.mg)(jr,jr),l=jr);const c=e.attributes,u=o.elementCount(c),d=r?o.instanceLayout:o.layout;if(!d)throw new Error("Missing layout");const h=d.stride/4;u>Math.floor(Vr/h)&&console.warn("geometry with very large number of elements encountered");const f=d.createBuffer(u),p=o.write(a,l,c,e.olidColor,f,0);if(null==p)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==p.numItems||s.length!==p.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:f.buffer,elementCount:u},renderGeometryBufferItems:{objectIds:s,visibilities:n,ranges:{numVertices:p.numVerticesPerItem,numItems:p.numItems}}}}async setBaseInstance(e,t){await this._mainThreadDelegate.setBaseInstance(e,t)}}const Fr=(0,v.vt)(),jr=(0,v.vt)(),Vr=4194304;var zr=r(98764),Lr=r(65806);const Ur=(0,w.vt)();var Nr=r(53966),Hr=r(4341),qr=r(11964),Gr=r(44280),kr=r(32114);const $r=()=>Nr.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function Yr(e=di){return{plane:(0,ue.vt)(e.plane),origin:(0,w.o8)(e.origin),basis1:(0,w.o8)(e.basis1),basis2:(0,w.o8)(e.basis2)}}function Zr(e,t=Yr()){return Xr(e.origin,e.basis1,e.basis2,t)}function Xr(e,t,r,i=Yr()){return(0,ae.d)(i.origin,e),(0,ae.d)(i.basis1,t),(0,ae.d)(i.basis2,r),Wr(i),function(e,t){Math.abs((0,ae.g)(e.basis1,e.basis2)/((0,ae.b)(e.basis1)*(0,ae.b)(e.basis2)))>1e-6&&$r().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,ae.g)(e.basis1,oi(e)))>1e-6&&$r().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,ae.g)(oi(e),e.origin)-e.plane[3])>1e-6&&$r().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function Wr(e){(0,ue.mR)(e.basis2,e.basis1,e.origin,e.plane)}function Qr(e,t,r){e!==r&&Zr(e,r);const i=(0,ae.j)(kr.rq.get(),oi(e),t);return(0,ae.i)(r.origin,r.origin,i),r.plane[3]-=t,r}function Jr(e,t=Yr()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,ae.h)(t.origin,e[0]+r,e[1]+i,0),(0,ae.h)(t.basis1,r,0,0),(0,ae.h)(t.basis2,0,i,0),(0,ue.fA)(0,0,1,0,t.plane),t}function Kr(e,t,r){return!!(0,ue.Ui)(e.plane,t,r)&&ai(e,r)}function ei(e,t,r){const i=hi.get();ui(e,t,i,hi.get());let n=Number.POSITIVE_INFINITY;for(const s of yi){const o=ci(e,s,fi.get()),a=kr.rq.get();if((0,ue.T7)(i,o,a)){const e=(0,ae.D)(kr.rq.get(),t.origin,a),i=Math.abs((0,O.XM)((0,ae.g)(t.direction,e)));i<n&&(n=i,(0,ae.d)(r,a))}}return n===Number.POSITIVE_INFINITY?ti(e,t,r):r}function ti(e,t,r){if(Kr(e,t,r))return r;const i=hi.get(),n=hi.get();ui(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of yi){const a=ci(e,o,fi.get()),l=kr.rq.get();if((0,ue.gv)(i,a,l)){const e=(0,de.kb)(t,l);if(!(0,ue.Tj)(n,l))continue;e<s&&(s=e,(0,ae.d)(r,l))}}return ni(e,t.origin)<s&&ri(e,t.origin,r),r}function ri(e,t,r){const i=(0,ue._I)(e.plane,t,kr.rq.get()),n=(0,qr.H6)(li(e,e.basis1),i,-1,1,kr.rq.get()),s=(0,qr.H6)(li(e,e.basis2),i,-1,1,kr.rq.get());return(0,ae.e)(r,(0,ae.i)(kr.rq.get(),n,s),e.origin),r}function ii(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,ae.e)(kr.rq.get(),t,i),a=(0,Gr.gr)(n,o),l=(0,Gr.gr)(s,o),c=(0,Gr.gr)(oi(e),o);return(0,ae.h)(r,a,l,c)}function ni(e,t){const r=ii(e,t,kr.rq.get()),{basis1:i,basis2:n}=e,s=(0,ae.b)(i),o=(0,ae.b)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),c=r[2];return a*a+l*l+c*c}function si(e,t){const r=-e.plane[3];return(0,Gr.gr)(oi(e),t)-r}function oi(e){return(0,ue.Qj)(e.plane)}function ai(e,t){const r=(0,ae.e)(kr.rq.get(),t,e.origin),i=(0,ae.E)(e.basis1),n=(0,ae.E)(e.basis2),s=(0,ae.g)(e.basis1,r),o=(0,ae.g)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function li(e,t){const r=fi.get();return(0,ae.d)(r.origin,e.origin),(0,ae.d)(r.vector,t),r}function ci(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,ae.j)(kr.rq.get(),i,t.origin[0]),a=(0,ae.j)(kr.rq.get(),n,t.origin[1]);(0,ae.i)(r.origin,o,a),(0,ae.i)(r.origin,r.origin,s);const l=(0,ae.j)(kr.rq.get(),i,t.direction[0]),c=(0,ae.j)(kr.rq.get(),n,t.direction[1]);return(0,ae.j)(r.vector,(0,ae.i)(l,l,c),2),r}function ui(e,t,r,i){const n=oi(e);(0,ue.mR)(n,t.direction,t.origin,r),(0,ue.mR)((0,ue.Qj)(r),n,t.origin,i)}const di={plane:(0,ue.vt)(),origin:(0,w.fA)(0,0,0),basis1:(0,w.fA)(1,0,0),basis2:(0,w.fA)(0,1,0)},hi=new Hr.I(ue.vt),fi=new Hr.I(qr.vt),pi=(0,w.vt)(),mi=new Hr.I(()=>Yr()),yi=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],gi=(0,v.vt)(),bi=(0,v.vt)(),_i=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:si,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case 0:(0,ae.d)(r,e.basis1),(0,ae.n)(r,r);break;case 1:(0,ae.d)(r,e.basis2),(0,ae.n)(r,r);break;case 2:(0,ae.d)(r,oi(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:ti,closestPointOnSilhouette:ei,copy:Zr,copyWithoutVerify:function(e,t){(0,ae.d)(t.origin,e.origin),(0,ae.d)(t.basis1,e.basis1),(0,ae.d)(t.basis2,e.basis2),(0,ue.C)(t.plane,e.plane)},create:Yr,distance:function(e,t){return Math.sqrt(ni(e,t))},distance2:ni,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of yi){const n=ci(e,i,fi.get()),s=(0,qr.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:Qr,equals:function(e,t){return(0,ae.m)(e.basis1,t.basis1)&&(0,ae.m)(e.basis2,t.basis2)&&(0,ae.m)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,ue.Tj)(e.plane,t)&&ai(e,t)},fromAABoundingRect:Jr,fromValues:Xr,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,P.fA)(n-r,s-i,n+r,s+i,t)},intersectRay:Kr,intersectRayClosestSilhouette:function(e,t,r){if(Kr(e,t,r))return r;const i=ei(e,t,kr.rq.get());return(0,ae.i)(r,t.origin,(0,ae.j)(kr.rq.get(),t.direction,(0,ae.C)(t.origin,i)/(0,ae.b)(t.direction))),r},normal:oi,projectPoint:ri,projectPointLocal:ii,rotate:function(e,t,r,i){return e!==i&&Zr(e,i),(0,A.$0)(bi,t,r),(0,ae.p)(i.basis1,e.basis1,bi),(0,ae.p)(i.basis2,e.basis2,bi),Wr(i),i},setAltitudeAt:function(e,t,r,i){const n=si(e,t),s=(0,ae.j)(pi,oi(e),r-n);return(0,ae.i)(i,t,s),i},setExtent:function(e,t,r){return Jr(t,r),Qr(r,si(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&Zr(e,r),(0,A.B8)(gi,t),(0,A.mg)(gi,gi),(0,ae.p)(r.basis1,e.basis1,gi),(0,ae.p)(r.basis2,e.basis2,gi),(0,ae.p)((0,ue.Qj)(r.plane),(0,ue.Qj)(e.plane),gi),(0,ae.p)(r.origin,e.origin,t),(0,ue.mP)(r.plane,r.plane,r.origin),r},up:di,updateUnboundedPlane:Wr,wrap:function(e,t,r){const i=mi.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,ue.LV)(0,0,0,0),Wr(i),i}},Symbol.toStringTag,{value:"Module"}));var vi=r(94008);function wi(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const xi=2**50;function Ci(e,t,r,i){return e.operations.setAltitudeAt(e.value,t,r,i)}function Si(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Ai=(0,w.vt)();function Ti(e){return"point"===e.type}(0,w.vt)();class Ii{constructor(e,t,r,i){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=i,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(i),this.referenceEllipsoid=(0,he.tO)(t),this.sphericalPCPF=(0,zr.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,P.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Ci(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){var r,i,n,s;r=this._coordinateSystem,n=e,(i=t)!==(s=t)&&(0,A.C)(s,i),(0,ae.h)(Ai,s[12],s[13],s[14]),Ci(r,Ai,n,Ai),s[12]=Ai[0],s[13]=Ai[1],s[14]=Ai[2]}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,2,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,i){return e.operations.axisAt(e.value,t,r,i)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,0,kr.rq.get()),i=this.worldBasisAtPosition(e,1,kr.rq.get()),n=this.worldBasisAtPosition(e,2,kr.rq.get());return(0,A.hZ)(t,r[0],r[1],r[2],0,i[0],i[1],i[2],0,n[0],n[1],n[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,kr.rq.get()),i=this.worldBasisAtPosition(e,1,kr.rq.get()),n=(0,Gr.EJ)(t,i,r);return(0,O.KJ)(n)}intersectManifoldClosestSilhouette(e,t,r){return Si(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Si(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=kr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,i)?(0,ae.d)(r,i):null}intersectInfiniteManifold(e,t,r){if(1===this.viewingMode)return this.intersectManifold(e,t,r);Si(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=this._tmpCoordinateSystem.value,n=kr.rq.get();return(0,ue.Ui)(i.plane,e,n)?(0,ae.d)(r,n):null}toRenderCoords(e,t,r){return Ti(e)?(0,Lr.g)(e,t,this.spatialReference):(0,V.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ti(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,V.F)(e,t,Ur,r.spatialReference)&&(r.x=Ur[0],r.y=Ur[1],r.z=Ur[2],!0)}(e,this.spatialReference,t)?t:null):(0,V.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case 2:return new Ii(2,t,(0,S.GA)(t),wi(_i,Xr([0,0,0],[xi,0,0],[0,xi,0])));case 1:return new Ii(1,t,1,function(e){return wi(vi.XG,new vi.iy(0,0,0,(0,he.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,S.KX)(e)/(0,S.KX)(t)}}let Pi=class extends n.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new dt,this._tileLocks=new st,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:i,layerViewInfo:n}){const s=u.A.fromJSON(e);this._viewSpatialReference=s;const a=u.A.fromJSON(t);this._fetcher=new Pt(this._viewSpatialReference,h.A.fromJSON(i.baseQuery),i.url,i.objectIdField,i.capabilities),this._queryEngine=new d.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:i.objectIdField},fieldsIndex:i.fieldIndex,availableFields:[i.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:i.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const i={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",i,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})},setBaseInstance:async(e,t)=>{const r={rendererId:e,baseInstance:t};await this.remoteClient.invoke("setBaseInstance",r,{transferList:null!=t?[t.data]:void 0})}};const f=Ii.create(r,a),p=new Dr(r,this._mainThreadDelegate);this._renderCommandContext=p;const m=new qe(s,a,this._mainThreadDelegate,f,p,i,n);this._context=m,this._renderer=m.symbolRendererFactory.createSymbolRendererFromJSON(i.renderer),this._defaultQueryJSON=new h.A({outSpatialReference:s}).toJSON();let y=null;if(null!=i.fullExtent){const e=l.A.fromJSON(i.fullExtent);await(0,c.initializeProjection)(e.spatialReference,s),y=(0,c.project)(e,s)}return this._tileManager=new et({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:y}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),Ei}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async executeAttributeBinsQuery(e,t){return{result:await this._queryEngine.executeAttributeBinsQuery(e,t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(Ei)}async onElevationChange(e){return Ei}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return Ei;const i=await r.createUpdateLayerViewOpacityCommand(e);return await i.execute(),Ei}async onRendererChange(e){const{_context:t}=this,r=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await r.load();const n=this._renderer;this._renderer=r;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[n.createRemoveCommand(e.id),r.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}const a=await n.createDestroyCommand();return await a.execute(),Ei}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,i=this._renderer;let n;return n=null!=i?await i.createAddCommand(e):p.create(this._renderCommandContext),(0,s.Te)(t),n.appendPipelineStateCommand(()=>{r.addTile(e)}),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createRemoveCommand(e):p.create(this._renderCommandContext),i.appendPipelineStateCommand(()=>{t.removeTile(e)}),i}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let i;return i=null!=r?await r.createUpdateVisibilityCommand(e):p.create(this._renderCommandContext),(0,s.Te)(t),i}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,i.Cg)([(0,a.MZ)()],Pi.prototype,"updating",null),Pi=(0,i.Cg)([(0,a.$K)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Pi);const Bi=Pi,Ei={result:void 0}},65215:(e,t,r)=>{r.d(t,{H:()=>i,R:()=>n});class i{constructor(e){this.layerViewUid=e}}class n extends i{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>o});var i=r(67076),n=r(90360),s=r(41214);function o(e,t){return l(e,null,t)}const a=(0,n.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},72385:(e,t,r)=>{function i(){return new Float32Array(3)}function n(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const i=new Float32Array(3);return i[0]=e,i[1]=t,i[2]=r,i}function o(){return i()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>n,vt:()=>i});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:n,create:i,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(r,p);return new l(p,u,f,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,r)=>{r.d(t,{EC:()=>A,wq:()=>a});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),o=r(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const i=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,s=r.children.length;n<s;n++){const s=r.children[n],o=r.leaf?i(s):s;_(e,o)&&(r.leaf?t(s):b(e,o)?l(s,t):w.push(s))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],s=t.leaf?r(n):n;if(_(e,s)){if(t.leaf||b(e,s))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();r||C.length>0;){if(r||(r=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),C.push(r),this._condense(C),this;a||r.leaf||!b(r,l)?s?(o++,r=s.children[o],a=!1):r=null:(C.push(r),S.push(o),o=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){const n=r-t+1;let s=this._maxEntries;if(n<=s){const i=new I(e.slice(t,r+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));const o=new P([]);o.height=i;const a=Math.ceil(n/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){const t=Math.min(n+l-1,r);v(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,i-1))}}return c(o,this._toBBox),o}_insert(e,t,r){const i=this._toBBox,n=r?e:i(e);C.clear();const s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=y(e,o)-a;l<n?(n=l,i=a<i?a:i,r=o):l===n&&a<i&&(i=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,C);for(s.children.push(e),d(s,n);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,C,t)}_split(e,t){const r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);const s=this._chooseSplitIndex(r,n,i);if(!s)return;const o=r.children.splice(s,r.children.length-s),a=r.leaf?new I(o):new P(o);a.height=r.height,c(r,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let o=t;o<=r-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,r,this._toBBox),l=g(t,a),c=p(t)+p(a);l<i?(i=l,s=o,n=c<n?c:n):l===i&&c<n&&(n=c,s=o)}return s}_chooseSplitAxis(e,t,r){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const n=this._toBBox,s=u(e,0,t,n),o=u(e,r-t,r,n);let a=m(s)+m(o);for(let i=t;i<r-t;i++){const t=e.children[i];d(s,e.leaf?n(t):t),a+=m(s)}for(let i=r-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?n(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(x.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,n.zI)(e));else x.pushArray(r.children);r=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<r;o++)s=e.children[o],d(n,e.leaf?i(s):s);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,i,n){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=i)continue;const a=r+Math.ceil((t-r)/i/2)*i;(0,o.q)(e,a,r,t,n),s.push(r,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(66552),s=r(25482),o=r(91429),a=r(93223);const l=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],c)},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>f,BR:()=>h,wI:()=>d,G$:()=>m,$x:()=>p,Ov:()=>l,UC:()=>s,W_:()=>c,OP:()=>y,TU:()=>a,XX:()=>o,jy:()=>u});var i=r(70333),n=r(11254);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function c(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function h(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function f(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function p(e,t){return null}function m(e){return null}function y(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!y(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(25482),o=r(88930),a=r(91429),l=r(98623),c=r(36005),u=r(43937);let d=class extends s.o{static{i=this}static get allTime(){return h}static get empty(){return f}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,u.K)("start")],d.prototype,"writeStart",null),d=i=(0,n.Cg)([(0,a.$K)("esri.time.TimeExtent")],d);const h=new d,f=new d({start:void 0,end:void 0})},81961:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",2,(i,n,s)=>i.setUniform4fv(e,t(n,s),r))}}},87582:(e,t,r)=>{r(6867),r(65215).R},95696:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),s=r(69540),o=r(25482),a=r(91429),l=r(93223);let c=class extends((0,s.OU)(o.o)){static{i=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new i}};(0,n.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=i=(0,n.Cg)([(0,a.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},96576:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(4718),o=r(91429),a=r(92438),l=r(63988),c=r(49849),u=r(93223);let d=i=class extends((0,l.h)(a.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,n.Cg)([(0,o.MZ)(c.Wp)],d.prototype,"symbol",void 0),(0,n.Cg)([(0,u.e)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,n.Cg)([(0,o.$K)("esri.renderers.SimpleRenderer")],d)},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9466],{7142:(t,e,r)=>{function n(t,e){return s(t,"any",e?.origin)}function o(t,e){return s(t,"read",e?.origin)}function i(t,e){return s(t,"write",e?.origin)}function s(t,e,r){let n=t?.json;if(n?.origins&&r){let t;t="link-chart"===r?n.origins[r]&&("any"===e||e in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],t&&("any"===e||e in t)&&(n=t)}return n}r.d(e,{N5:()=>o,k4:()=>i,xF:()=>n})},10107:(t,e,r)=>{r.d(e,{MZ:()=>c,rM:()=>l});var n=r(53966),o=r(56507),i=r(16649),s=r(96156),a=r(47821);function c(t={}){return(e,r)=>{if(e===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(e,r),l=(0,s.z4)(e,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in t&&n.A.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,t),l.value=t.value=c.value)),null!=t.readOnly&&(l.readOnly=t.readOnly);const u=t.aliasOf;if(u){const t="string"==typeof u?u:u.source,e="string"==typeof u?null:!0===u.overridable;let n;l.dependsOn=[t],l.get=function(){let e=(0,i.Jt)(this,t);if("function"==typeof e){n||(n=t.split(".").slice(0,-1).join("."));const r=(0,i.Jt)(this,n);r&&(e=e.bind(r))}return e},l.readOnly||(l.set=e?function(t){this._override(r,t)}:function(e){(0,a.h)(this,t,e)})}const f=t.type,h=t.types;if(!l.cast){let e;f&&!1!==t.useTypeForAutocast?e=function(t){let e=0,r=t;if((0,o.Zu)(t))return(0,o.Nd)(t);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],e++;const n=r;if((0,o.EK)(n))return 0===e?(0,o.MB)(n):(0,o._e)((0,o.MB)(n),e);if(1===e)return(0,o.eC)(n);if(e>1)return(0,o.e6)(n,e);const i=t;return i.from?i.from:(0,o.dp)(i)}(f):h&&(e=Array.isArray(h)?(0,o.wB)((0,o.aq)(h[0])):(0,o.aq)(h)),t.cast=function(t,e){if(t||e)return t?e?(r,n)=>e(t(r,n),n):t:e}(t.cast,e)}(0,s.CX)(l,t),t.range&&(l.cast=(0,o.Qp)(l.cast,t.range))}}function l(t,e,r){const n=(0,s.z4)(t,r);n.json||(n.json={});let o=n.json;return void 0!==e&&(o.origins||(o.origins={}),o.origins[e]||(o.origins[e]={}),o=o.origins[e]),o}},15142:(t,e,r)=>{r.d(e,{A:()=>l});var n=r(4576),o=r(21818);const i=(t,e,r,n)=>{let o=e,i=e;const s=r>>>1,a=t[o-1];for(;i<=s;){i=o<<1,i<r&&n(t[i-1],t[i])<0&&++i;const e=t[i-1];if(n(e,a)<=0)break;t[o-1]=e,o=i}t[o-1]=a},s=(t,e)=>t<e?-1:t>e?1:0;function a(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n);const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n)}}function*c(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n),yield;const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n),yield}}class l{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new n.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>u(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];t(n)&&e.push(n)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const r=this.data.indexOf(t,e);return-1!==r&&r<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let r=0;r<e;r++)this.data[this._length++]=t[r]}pushAll(t){for(const e of t)this.data[this._length++]=e}fill(t,e){for(let r=0;r<e;r++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,u(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,r){this.length=(0,n.mW)(this.data,t,this.length,e,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const r=this.data[t];this.data[t]=this.data[e],this.data[e]=r}sort(t){a(this.data,0,this.length,t)}iterableSort(t){return c(this.data,0,this.length,t)}some(t,e){for(let r=0;r<this.length;++r)if(t.call(e,this.data[r],r,this.data))return!0;return!1}find(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)if(t.call(e,r[o]))return r[o]}filterInPlace(t,e){let r=0;for(let n=0;n<this._length;++n){const o=this.data[n];t.call(e,o,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=o,r++)}if(this._deallocator)for(let t=r;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=r,this._shrink(),this}forAll(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)t.call(e,r[o],o,r)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=t.call(e,this.data[n],n,this.data);return r}reduce(t,e){let r=e;for(let e=0;e<this.length;++e)r=t(r,this.data[e],e,this.data);return r}has(t){const e=this.length,r=this.data;for(let n=0;n<e;++n)if(r[n]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function u(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},15903:(t,e,r)=>{function n(t){return!!t&&t.prototype?.declaredClass&&0===t.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(e,{P:()=>n})},16649:(t,e,r)=>{r.d(e,{Jt:()=>a,RP:()=>s,t2:()=>c});var n=r(88620);function o(t,e){const r=t.endsWith("?")?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(r,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,n.oY)(e);return(0,n.yh)(o,r)?o.get(r):e[r]}function i(t,e,r){if(null==t)return t;const n=o(e[r],t);return!n&&r<e.length-1?void 0:r===e.length-1?n:i(n,e,r+1)}function s(t,e,r=0){return"string"!=typeof e||e.includes(".")?i(t,(0,n.AH)(e),r):o(e,t)}function a(t,e){return s(t,e)}function c(t,e){return void 0!==s(e,t)}},24326:(t,e,r)=>{r.d(e,{c:()=>o});let n=0;function o(){return++n}},26390:(t,e,r)=>{r.d(e,{d:()=>o});const n=[];function o(t){n.push(t),1===n.length&&queueMicrotask(()=>{const t=n.slice();n.length=0;for(const e of t)e()})}},36005:(t,e,r)=>{r.d(e,{w:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e||Array.isArray(e)?(i=t,r=e,o=[void 0]):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;o.forEach(o=>{const a=(0,n.rM)(t,o,i);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=s[e],r&&(a.read.source=(a.read.source||[]).concat(r))})}}},43937:(t,e,r)=>{r.d(e,{K:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e?(i=t,o=[void 0]):"string"!=typeof e?(i=t,o=[void 0],r=e):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;for(const a of o){const o=(0,n.rM)(t,a,i);o.write&&"object"==typeof o.write||(o.write={}),r&&(o.write.target=r),o.write.writer=s[e]}}}},47328:(t,e,r)=>{r.d(e,{i:()=>n});const n={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},47821:(t,e,r)=>{r.d(e,{h:()=>s});var n=r(49186),o=r(44208),i=(r(53966),r(16649));function s(t,e,r){if(t&&e)if("object"==typeof e)for(const r of Object.getOwnPropertyNames(e))s(t,r,e[r]);else{if(e.includes(".")){const n=e.split("."),o=n.splice(-1,1)[0];return void s((0,i.Jt)(t,n),o,r)}const a=t.__accessor__;null!=a&&function(t,e){if((0,o.A)("esri-unknown-property-errors")&&!function(t,e){return null!=e.metadata[t]}(t,e))throw new n.A("set:unknown-property",function(t,e){return"setting unknown property '"+t+"' on instance of "+e.host.declaredClass}(t,e))}(e,a),t[e]=r}}},56454:(t,e,r)=>{r.d(e,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},56507:(t,e,r)=>{r.d(e,{EK:()=>S,GB:()=>l,GX:()=>c,MB:()=>T,Nd:()=>z,PZ:()=>v,Qp:()=>h,Uv:()=>E,Vr:()=>u,Zu:()=>C,_e:()=>k,aq:()=>M,dp:()=>A,e6:()=>N,eC:()=>j,gK:()=>P,jz:()=>$,wB:()=>m}),r(44208);var n=r(53966),o=r(91869);const i=()=>n.A.getLogger("esri.core.accessorSupport.ensureTypes");function s(t){if(null==t)return t;const e=new Date(t);return isNaN(e.getTime())?(i().error("Accessor#set",`Invalid date value: '${t}', falling back to current date`),new Date):e}function a(t){return null==t?t:!!t}function c(t){return null==t?t:t.toString()}function l(t,e=0){return null==t?t:(t=parseFloat(t),isNaN(t)?e:t)}function u(t){return null==t?t:Math.round(parseFloat(t))}function f(t){return null}function h(t,e){return r=>{let n=t(r);return null!=e.step&&(n=Math.round(n/e.step)*e.step),null!=e.min&&(n=Math.max(e.min,n)),null!=e.max&&(n=Math.min(e.max,n)),n}}function p(t){return t?.constructor&&void 0!==t.constructor.__accessorMetadata__}function d(t,e){return null!=e&&t&&!(e instanceof t)}function y(t){return t&&"isCollection"in t}function g(t){return t?.Type?"function"==typeof t.Type?t.Type:t.Type.base:null}function _(t,e){return!!p(e)&&(i().error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+w(t)+"'"),!0)}function v(t,e){return null==e?e:y(t)?function(t,e){if(!e?.constructor||!y(e.constructor))return _(t,e)?e:new t(e);const r=g(t.prototype.itemType),n=g(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(_(t,e),e):new t(e):e}(t,e):d(t,e)?_(t,e)?e:new t(e):e}function w(t){return t?.prototype?.declaredClass||"unknown"}const b=new WeakMap;function A(t,e){const r=function(t){switch(t){case Number:return t=>l(t);case $:return u;case Boolean:return a;case String:return c;case Date:return s;case E:return f;default:return(0,o.tE)(b,t,()=>v.bind(null,t))}}(t);return 1===arguments.length?r:r(e)}function m(t,e,r){return 1===arguments.length?m.bind(null,t):e?Array.isArray(e)?e.map(e=>t(e,r)):[t(e,r)]:e}function j(t,e){return 1===arguments.length?m(e=>A(t,e)):m(e=>A(t,e),e)}function O(t,e,r){return 0!==e&&Array.isArray(r)?r.map(r=>O(t,e-1,r)):t(r)}function k(t,e,r){if(2===arguments.length)return r=>k(t,e,r);if(!r)return r;r=O(t,e,r);let n=e,o=r;for(;n>0&&Array.isArray(o);)n--,o=o[0];if(void 0!==o)for(let t=0;t<n;t++)r=[r];return r}function N(t,e,r){return 2===arguments.length?k(e=>A(t,e),e):k(e=>A(t,e),e,r)}function S(t){return!!Array.isArray(t)&&!t.some(e=>{const r=typeof e;return!("string"===r||"number"===r||"function"===r&&t.length>1)})}function T(t,e){if(2===arguments.length)return T(t).call(null,e);const r=new Set,n=t.filter(t=>"function"!=typeof t),o=t.filter(t=>"function"==typeof t);for(const e of t)"string"!=typeof e&&"number"!=typeof e||r.add(e);let s=null,a=null;return(t,e)=>{if(null==t)return t;const c=typeof t,l="string"===c||"number"===c;return l&&(r.has(t)||o.some(t=>"string"===c&&t===String||"number"===c&&t===Number))||"object"===c&&o.some(e=>!d(e,t))?t:(l&&n.length?(s||(s=n.map(t=>"string"==typeof t?`'${t}'`:`${t}`).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, only the following values are valid: ${s}`)):"object"==typeof t&&o.length?(a||(a=o.map(t=>w(t)).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, value must be one of ${a}`)):i().error("Accessor#set",`'${t}' is not a valid value for this property`),e&&(e.valid=!1),null)}}function M(t,e){if(2===arguments.length)return M(t).call(null,e);const r={},n=[],o=[];for(const e in t.typeMap){const i=t.typeMap[e];r[e]=A(i),n.push(w(i)),o.push(e)}const s=()=>`'${n.join("', '")}'`,a=()=>`'${o.join("', '")}'`,c="string"==typeof t.key?e=>e[t.key]:t.key;return e=>{if(t.base&&!d(t.base,e))return e;if(null==e)return e;const n=c(e)||t.defaultKeyValue,o=r[n];if(!o)return i().error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(t.typeMap[n],e))return e;if("string"==typeof t.key&&!p(e)){const r={};for(const n in e)n!==t.key&&(r[n]=e[n]);return o(r)}return o(e)}}class ${}class E{}const P={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function C(t){if(!t||"object"!=typeof t&&"function"!=typeof t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function z(t){switch(t.type){case"native":return A(t.value);case"array":return m(z(t.value));case"one-of":return function(t){let e=null;return(r,n)=>D(r,t)?r:(null==e&&(e=I(t)),i().error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}(t);default:return null}}function I(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case $:return"integer";case Date:return"date";case E:return"null";default:return w(t.value)}case"array":return`array of ${I(t.value)}`;case"one-of":{const e=t.values.map(t=>I(t));return`one of ${e.slice(0,-1)} or ${e[e.length-1]}`}}return"unknown"}function D(t,e){if(null==t)return!0;switch(e.type){case"native":switch(e.value){case Number:case $:return"number"==typeof t;case Boolean:return"boolean"==typeof t;case String:return"string"==typeof t;case E:return null===t}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some(t=>!D(t,e.value));case"one-of":return e.values.some(e=>D(t,e))}}},62788:(t,e,r)=>{r.d(e,{F_:()=>p,Xr:()=>w,a:()=>h,fE:()=>_,gc:()=>l}),r(44208);var n=r(53966),o=r(88620),i=r(47328);const s=new(r(67867).R),a=[];let c=s;function l(t){c.onAccessed(t)}let u=!1,f=!1;function h(t,e,r){if(u)return d(t,e,r);let n=null;return y(t),n=e.call(r),g(),n}function p(t,e){return h(s,t,e)}function d(t,e,r){const o=u;u=!0,y(t);let i=null;try{i=e.call(r)}catch(t){f&&n.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return g(),u=o,i}function y(t){c=t,a.push(t)}function g(){const t=a.length;if(t>1){const e=a.pop();c=a[t-2],e.onTrackingEnd()}else if(1===t){const t=a.pop();c=s,t.onTrackingEnd()}else c=s}function _(t,e){if(e.flags&i.i.DepTrackingInitialized)return;e.flags|=i.i.DepTrackingInitialized;const r=f;f=!1,e.flags&i.i.AutoTracked?d(e.trackingTarget,e.metadata.get,t):w(t,e),f=r}const v=[];function w(t,e){e.flags&i.i.ExplicitlyTracking||(e.flags|=i.i.ExplicitlyTracking,d(e.trackingTarget,()=>{const r=e.metadata.dependsOn||v;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=(0,o.AH)(e);for(let e=0,n=t;e<r.length&&null!=n&&"object"==typeof n;++e)n=b(n,r[e],e!==r.length-1)}else b(t,e,!1)}),e.flags&=~i.i.ExplicitlyTracking)}function b(t,e,r){const n=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(n,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const i=(0,o.oY)(t);if(i){const e=i.propertiesByName.get(n);e&&(l(e),_(t,e))}return r?t[n]:void 0}},64108:(t,e,r)=>{r.d(e,{$:()=>A}),r(44208);var n=r(53966),o=r(56454),i=r(85537),s=r(96156),a=r(62788),c=r(56507),l=r(90360);function u(t){if(t.json||(t.json={}),h(t.json),p(t.json),f(t.json),t.json.origins)for(const e in t.json.origins)h(t.json.origins[e]),p(t.json.origins[e]),f(t.json.origins[e]);return!0}function f(t){t.name&&(t.read&&"object"==typeof t.read?void 0===t.read.source&&(t.read.source=t.name):t.read={source:t.name},t.write&&"object"==typeof t.write?void 0===t.write.target&&(t.write.target=t.name):t.write={target:t.name})}function h(t){"boolean"==typeof t.read?t.read={enabled:t.read}:"function"==typeof t.read?t.read={enabled:!0,reader:t.read}:t.read&&"object"==typeof t.read&&void 0===t.read.enabled&&(t.read.enabled=!0)}function p(t){"boolean"==typeof t.write?t.write={enabled:t.write}:"function"==typeof t.write?t.write={enabled:!0,writer:t.write}:t.write&&"object"==typeof t.write&&void 0===t.write.enabled&&(t.write.enabled=!0)}var d=r(67124);function y(t){return t.type?g(t):_(t)}function g(t){if(!t.type)return;let e=0,r=t.type;for(;Array.isArray(r)&&!(0,c.EK)(r);)r=r[0],e++;return{type:r,ndimArray:e}}function _(t){if(!t.types)return;let e=0,r=t.types;for(;Array.isArray(r);)r=r[0],e++;return{types:r,ndimArray:e}}function v(t){u(t)&&(function(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const t in r)if(e[t]){const n=e[t];r[t].forEach(t=>{e[t]=n}),delete e[t]}}}(t),function(t){const e=function(t){return t.json.types?_(t.json):t.type?g(t):_(t)}(t);if(t.json.origins)for(const r in t.json.origins){const n=t.json.origins[r],o=n.types?y(n):e;(0,l.v)(o,n,!1),n.types&&!n.write&&t.json.write?.enabled&&(n.write={...t.json.write}),(0,d.v)(o,n)}(0,l.v)(e,t.json,!0),(0,d.v)(e,t.json)}(t))}const w=new Set,b=new Set;function A(t){return e=>{t??="esri.core.Accessor",e.prototype.declaredClass=t,j(e);const r=[],n=[];let a=e.prototype;for(;a;)a.hasOwnProperty("initialize")&&!w.has(a.initialize)&&(w.add(a.initialize),r.push(a.initialize)),a.hasOwnProperty("destroy")&&!b.has(a.destroy)&&(b.add(a.destroy),n.push(a.destroy)),a=Object.getPrototypeOf(a);w.clear(),b.clear();const c=class extends e{constructor(...t){if(super(...t),this.constructor===c&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let t=r.length-1;t>=0;t--)r[t].call(this)}}),n.length){let t=!1;const e=this[o.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!t){this.__accessor__.lifecycle=i.v.DESTROYING,t=!0,e.call(this);for(let t=0;t<n.length;t++)n[t].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};c.__accessorMetadata__=(0,s.tD)(e.prototype),c.prototype.declaredClass=t;const l=(t||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(c,"name",{value:l,configurable:!0}),c}}function m(t,e){return null==e.get?function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0===r)return;e.mutable&&(0,a.gc)(r);const n=e.store;return n.has(t)?n.get(t):r.metadata.value}:function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0!==r)return r.getComputed(e)}}function j(t){const e=t.prototype,r=(0,s.tD)(e),n={};for(const t of Object.getOwnPropertyNames(r)){const e=r[t];v(e),n[t]={enumerable:!0,configurable:!0,get:m(t,e),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&e.readOnly?O("read-only",t):n.lifecycle===i.v.CONSTRUCTED&&e.constructOnly?O("construct-only",t):void n.set(t,r)}else Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(t.prototype,n)}const O=(t,e)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${e}'`)}},66552:(t,e,r)=>{r.d(e,{J:()=>o,O:()=>s});var n=r(93637);class o{constructor(t,e={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=t,this._options=e,this.apiValues=[],this.jsonValues=[],this._apiToJSON=function(t){const e={};for(const r in t)e[t[r]]=r;return e}(t),this.apiValues=i(this._apiToJSON),this.jsonValues=i(this._jsonToAPI),this.read=t=>this.fromJSON(t),this.write=(t,e,r)=>{const o=this.toJSON(t);void 0!==o&&(0,n.sM)(r,o,e)},this.write.isJSONMapWriter=!0}toJSON(t){if(null==t)return null;if(this._apiToJSON.hasOwnProperty(t)){const e=this._apiToJSON[t];return this._options.useNumericKeys?+e:e}return this._options.ignoreUnknown?null:t}fromJSON(t){return null!=t&&this._jsonToAPI.hasOwnProperty(t)?this._jsonToAPI[t]:this._options.ignoreUnknown?void 0:t}}function i(t){const e=[];for(const r in t)e.push(r);return e.sort(),e}function s(){return function(t,e){return new o(t,{ignoreUnknown:!0,...e})}}},67076:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(79907);class o extends n.A{constructor(t,e,r){super(t,e,r)}}o.prototype.type="warning"},67124:(t,e,r)=>{r.d(e,{B:()=>f,v:()=>a});var n=r(49186),o=r(53966),i=r(93637),s=r(15903);function a(t,e){if(!e.write||e.write.writer||!1===e.write.enabled&&!e.write.overridePolicy)return;const r=t?.ndimArray??0;t&&(1===r||"type"in t&&(0,s.P)(t.type))?e.write.writer=h:r>1?e.write.writer=function(t){return(e,r,n,o)=>{let s;if(null===e)s=null;else{s=p(e,o,t);let r=t,n=s;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let t=0;t<r;t++)s=[s]}(0,i.sM)(n,s,r)}}(r):e.types?Array.isArray(e.types)?e.write.writer=function(t){return(e,r,n,o)=>e&&Array.isArray(e)?l(e.filter(e=>c(e,t,o)),r,n,o):l(e,r,n,o)}(e.types[0]):e.write.writer=function(t){return(e,r,n,o)=>e?c(e,t,o)?l(e,r,n,o):void 0:l(e,r,n,o)}(e.types):e.write.writer=l}function c(t,e,r){for(const r in e.typeMap)if(t instanceof e.typeMap[r])return!0;if(r?.messages){const i=e.errorContext??"type",s=`Values of type '${("function"!=typeof e.key?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new n.A(`${i}:unsupported`,s,{definition:t,context:r})),o.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(s)}return!1}function l(t,e,r,n){(0,i.sM)(r,u(t,n),e)}function u(t,e){return t&&"function"==typeof t.write?t.write({},e):t&&"function"==typeof t.toJSON?t.toJSON():"number"==typeof t?f(t):t}function f(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function h(t,e,r,n){let o;null===t?o=null:t&&"function"==typeof t.map?(o=t.map(t=>u(t,n)),"function"==typeof o.toArray&&(o=o.toArray())):o=[u(t,n)],(0,i.sM)(r,o,e)}function p(t,e,r){return 0!==r&&Array.isArray(t)?t.map(t=>p(t,e,r-1)):u(t,e)}},67867:(t,e,r)=>{r.d(e,{R:()=>n});class n{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(t=>{this._handles.push(t.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},79901:(t,e,r)=>{r.d(e,{w:()=>c});var n=r(56507),o=r(96156);const i=Object.prototype.toString;function s(t){const e="__accessorMetadata__"in t?(0,n.dp)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,t)}}function a(t,e,r,n){(0,o.z4)(t,e).cast=n}function c(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===i.call(t[0])?s(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,r)=>{(0,o.z4)(e,t).cast=e[r]}}(t[0]):void 0}},85537:(t,e,r)=>{r.d(e,{v:()=>n});const n={INITIALIZING:0,CONSTRUCTING:1,CONSTRUCTED:2,DESTROYING:3,DESTROYED:4}},88620:(t,e,r)=>{r.d(e,{AH:()=>l,h1:()=>a,oY:()=>i,qg:()=>f,yh:()=>s});var n=r(36563),o=r(4718);function i(t){return t.__accessor__??null}function s(t,e){return null!=t?.metadata?.[e]}function a(t,e,r){return c(t,e,r?{policy:r,path:""}:null)}function c(t,e,r){return e?Object.keys(e).reduce((t,n)=>{const i=n;if("__proto__"===i)return t;let s=null,a="merge";if(r&&(s=r.path?`${r.path}.${n}`:n,a=r.policy(s)),"replace"===a)return t[i]=e[i],t;if("replace-arrays"===a&&Array.isArray(t[i]))return t[i]=e[i],t;if(void 0===t[i])return t[i]=(0,o.o8)(e[i]),t;let l=t[i],u=e[i];if(l===u)return t;if(Array.isArray(u)||Array.isArray(t))l=l?Array.isArray(l)?t[i]=l.slice():t[i]=[l]:t[i]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach(t=>{l.includes(t)||l.push(t)}));else if(u&&"object"==typeof u)if(r){const e=r.path;r.path=s,t[i]=c(l,u,r),r.path=e}else t[i]=c(l,u,null);else t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||(t[i]=u);return t},t||{}):t}function l(t){return Array.isArray(t)?t:t.split(".")}function u(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function f(t,e,r,o){const i=function(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...u(r));return e}return u(t)}(e);if(1!==i.length){const e=i.map(e=>o(t,e,r));return(0,n.vE)(e)}return o(t,i[0],r)}},90360:(t,e,r)=>{r.d(e,{C:()=>f,v:()=>u});var n=r(53966),o=r(93637),i=r(67076),s=r(96156),a=r(15903),c=r(7142);const l=()=>n.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function u(t,e,r){t&&(!r&&!e.read||e.read?.reader||!1===e.read?.enabled||function(t){return"types"in t?_(t.types):g(t.type)}(t)&&(0,o.sM)("read.reader",f(t),e))}function f(t){const e=t.ndimArray??0;if(e>1)return function(t){const e=h(t),r=p.bind(null,e),n=t.ndimArray??0;return(t,e,o)=>{if(null==t)return t;t=r(t,o,n);let i=n,s=t;for(;i>0&&Array.isArray(s);)i--,s=s[0];if(void 0!==s)for(let e=0;e<i;e++)t=[t];return t}}(t);if(1===e)return d(t);if("type"in t&&y(t.type)){const e=t.type.prototype?.itemType?.Type,r=d("function"==typeof e?{type:e}:{types:e});return(e,n,o)=>{const i=r(e,n,o);return i?new t.type(i):i}}return h(t)}function h(t){return"type"in t?function(t){return t.prototype.read?(e,r,n)=>{if(null==e)return e;const o=typeof e;if("object"!==o)return void l().error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${o}'`);const i=new t;return i.read(e,n),i}:t.fromJSON}(t.type):function(t){let e=null;const r=t.errorContext??"type",n=t.validate;return(o,a,u)=>{if(null==o)return o;const f=typeof o;if("object"!==f)return void l().error(`Expected JSON value of type 'object' to deserialize, but got '${f}'`);e||(e=function(t){const e={};for(const r in t.typeMap){const n=t.typeMap[r],o=(0,s.tD)(n.prototype);if("function"==typeof t.key)continue;const i=o[t.key];if(!i)continue;if(i.json?.type&&Array.isArray(i.json.type)&&1===i.json.type.length&&"string"==typeof i.json.type[0]){e[i.json.type[0]]=n;continue}const a=i.json?.write;if(!a?.writer){e[r]=n;continue}const c=a.target,l="string"==typeof c?c:t.key,u={};a.writer(r,u,l),u[l]&&(e[u[l]]=n)}return e}(t));const h=t.key;if("string"!=typeof h)return;const p=o[function(t,e,r){const n=Object.values(e)[0],o=(0,s.tD)(n.prototype)[t],i=(0,c.N5)(o,r),a=i?.read?.source;return a&&"string"==typeof a?a:t}(h,e,u)],d=p?e[p]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!d){const t=`Type '${p||"unknown"}' is not supported`;return u?.messages&&o&&u.messages.push(new i.A(`${r}:unsupported`,t,{definition:o,context:u})),void l().error(t)}const y=new d;return y.read(o,u),n?n(y):y}}(t.types)}function p(t,e,r,n){return 0!==n&&Array.isArray(e)?e.map(e=>p(t,e,r,n-1)):t(e,void 0,r)}function d(t){const e=h(t);return(t,r,n)=>{if(null==t)return t;if(Array.isArray(t)){const r=[];for(const o of t){const t=e(o,void 0,n);void 0!==t&&r.push(t)}return r}const o=e(t,void 0,n);return void 0!==o?[o]:void 0}}function y(t){if(!(0,a.P)(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&("function"==typeof e.Type?g(e.Type):_(e.Type))}function g(t){return!Array.isArray(t)&&!!t&&("object"==typeof t||"function"==typeof t)&&t.prototype&&("read"in t.prototype||"fromJSON"in t||y(t))}function _(t){for(const e in t.typeMap)if(!g(t.typeMap[e]))return!1;return!0}},91429:(t,e,r)=>{r.d(e,{wg:()=>c,MZ:()=>s,$K:()=>a});var n=r(10107),o=r(79901),i=r(64108);r(93223),r(36005),r(43937);const s=n.MZ,a=i.$;function c(...t){return(0,o.w)(...t)}},93223:(t,e,r)=>{r.d(e,{e:()=>i});var n=r(66552),o=r(10107);function i(t,e={}){const r=t instanceof n.J?t:new n.J(t,e),{alwaysWriteDefaults:i,default:s,ignoreUnknown:a=!0,name:c,nonNullable:l,readOnly:u=!1}=e;return(0,o.MZ)({type:a?r.apiValues:String,json:{type:r.jsonValues,default:s,name:c,read:!u&&{reader:r.read},write:{writer:r.write,alwaysWriteDefaults:i}},nonNullable:l,readOnly:u})}},93687:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(44208);class o{constructor(t,e,r,n=1,o=0){this._creator=t,this._acquireFunction=e,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(o),this._initialSize=o;for(let t=0;t<o;t++)this._pool[t]=this._creator();this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let e;if(o.test.disabled)e=this._creator();else{if(0===this._pool.length){const t=this.allocationSize;for(let e=0;e<t;e++)this._pool[e]=this._creator()}e=this._pool.pop()}return this._acquireFunction?this._acquireFunction(e,...t):function(t){return t?.acquire&&"function"==typeof t.acquire}(e)&&e.acquire(...t),e}release(t){var e;t&&!o.test.disabled&&(this._releaseFunction?this._releaseFunction(t):(e=t,e?.release&&"function"==typeof e.release&&t.release()),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let e=t;e<this._pool.length;++e){const t=this._pool[e];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}static{this.test={disabled:!!(0,n.A)("esri-tests-disable-memory-pools")}}}},96156:(t,e,r)=>{r.d(e,{CX:()=>a,tD:()=>i,z4:()=>s});var n=r(4718),o=r(88620);function i(t){let e=t.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(t.constructor,"__accessorMetadata__");if(e){if(!r){e=Object.create(e);for(const t in e)e[t]=(0,n.o8)(e[t]);Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0})}}else e={},Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0});return t.constructor.__accessorMetadata__}function s(t,e){const r=i(t);let n=r[e];return n||(n=r[e]={}),n}function a(t,e){return(0,o.h1)(t,e,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(t){return c.test(t)?"replace":"merge"}}}]);