@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.
- package/applications/Components/imageryUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f97a7cb367634353177d.js → 001a7a4cf6fe74432ed6.js} +1 -1
- package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +1 -0
- package/assets/esri/core/workers/chunks/04a0685ee53ef74883aa.js +1 -0
- package/assets/esri/core/workers/chunks/{c320a29df40e85fb4a8e.js → 15a0750c10b510564a42.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d95f38da21f97214f83.js → 1e0e7cef7ef947894bbe.js} +10 -10
- package/assets/esri/core/workers/chunks/20ad34f9d45c64392022.js +1 -0
- package/assets/esri/core/workers/chunks/23396a6318edf9264c1f.js +1 -0
- package/assets/esri/core/workers/chunks/{816227de5bd42b437df4.js → 233f9eb617f3d72995b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb9643b74cf35221ff98.js → 249504f7d356be80d214.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad891ac388fa6c1c9b94.js → 2b34a010f76e5f289868.js} +1 -1
- package/assets/esri/core/workers/chunks/2ef4c0092c59a98a5532.js +1 -0
- package/assets/esri/core/workers/chunks/35272810c2ed04eb403d.js +1 -0
- package/assets/esri/core/workers/chunks/{4f4d51181ae7db9fbe6d.js → 4404b6f931f681cca342.js} +1 -1
- package/assets/esri/core/workers/chunks/555a0ea44ba77819d493.js +1 -0
- package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +1 -0
- package/assets/esri/core/workers/chunks/{d1f4152b2b8d47cbf586.js → 72fbee59d5d909615408.js} +1 -1
- package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +1 -0
- package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +1 -0
- package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +1 -0
- package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +1 -0
- package/assets/esri/core/workers/chunks/{da517b4b07d4d27ce94c.js → 8e26831f71634288f834.js} +1 -1
- package/assets/esri/core/workers/chunks/{c367c7e553be3682f2db.js → 93c5f097bb7b380bb175.js} +1 -1
- package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +1 -0
- package/assets/esri/core/workers/chunks/9c7682b300b877f60095.js +1 -0
- package/assets/esri/core/workers/chunks/a2442549c5daf3653eb4.js +1 -0
- package/assets/esri/core/workers/chunks/a7cd795042ebb8585906.js +1 -0
- package/assets/esri/core/workers/chunks/{f3b3b193959db809c8c6.js → ab520fd1ae917daf07d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c9865e34f32fb5683e5.js → af8d6e6949930d0e6c7b.js} +1 -1
- package/assets/esri/core/workers/chunks/c9942ca57f542582ab4d.js +1 -0
- package/assets/esri/core/workers/chunks/ca1c65eb7f5900c60170.js +1 -0
- package/assets/esri/core/workers/chunks/cddce67919e13e2f365e.js +1 -0
- package/assets/esri/core/workers/chunks/da2ba40bc017bff0fe49.js +1 -0
- package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +1 -0
- package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +1 -0
- package/assets/esri/core/workers/chunks/e8a9971c8354569cb81d.js +1 -0
- package/assets/esri/core/workers/chunks/{96f798ee286b59396131.js → ea3cba01c60d9bc72719.js} +1 -1
- package/assets/esri/core/workers/chunks/ed550bf27f2bbf8d30fa.js +1 -0
- package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +1 -0
- package/assets/esri/core/workers/chunks/{1357cc637524cd254974.js → ffcdc7ae03b0570e0db8.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/core/PooledArray.js +1 -1
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/interfaces.d.ts +109 -37
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +5 -0
- package/layers/raster/datasets/CovJSONRaster.js +5 -0
- package/layers/raster/datasets/FunctionRaster.js +5 -0
- package/layers/raster/datasets/ImageAuxRaster.js +5 -0
- package/layers/raster/datasets/ImageServerRaster.js +5 -0
- package/layers/raster/datasets/InMemoryRaster.js +5 -0
- package/layers/raster/datasets/MRFRaster.js +5 -0
- package/layers/raster/datasets/RawBlockCache.js +5 -0
- package/layers/raster/datasets/TIFFRaster.js +5 -0
- package/layers/raster/datasets/WCSRaster.js +5 -0
- package/layers/raster/datasets/covJSONParser.js +5 -0
- package/layers/raster/datasets/multidimensionalUtils.js +5 -0
- package/layers/raster/datasets/pamParser.js +5 -0
- package/layers/raster/datasets/pixelReader.js +5 -0
- package/layers/raster/datasets/wcsCoverageParser.js +5 -0
- package/layers/raster/formats/Lerc.js +5 -0
- package/layers/raster/formats/Qb3.js +5 -0
- package/layers/raster/formats/RasterCodec.js +5 -0
- package/layers/raster/formats/TiffDecoder.js +5 -0
- package/layers/raster/functions/ArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunctionArguments.js +1 -1
- package/layers/raster/functions/BandArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/BandArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/BaseFunctionArguments.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapToRGBFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapToRGBFunctionArguments.js +1 -1
- package/layers/raster/functions/CompositeBandFunction.js +5 -0
- package/layers/raster/functions/CompositeBandFunctionArguments.js +5 -0
- package/layers/raster/functions/ComputeChangeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +5 -0
- package/layers/raster/functions/ConvolutionFunctionArguments.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunctionArguments.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/HillshadeFunctionArguments.js +1 -1
- package/layers/raster/functions/LocalFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/LocalFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunctionArguments.js +1 -1
- package/layers/raster/functions/RemapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/RemapFunctionArguments.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/SlopeFunctionArguments.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js +1 -1
- package/layers/raster/functions/StretchFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StretchFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunctionArguments.js +1 -1
- package/layers/raster/functions/bandIndexUtils.js +5 -0
- package/layers/raster/functions/changeDetectionUtils.js +5 -0
- package/layers/raster/functions/clipUtils.js +5 -0
- package/layers/raster/functions/conversionUtils.js +5 -0
- package/layers/raster/functions/convolutionUtils.js +5 -0
- package/layers/raster/functions/creators/createDataManagementFunctions.js +5 -0
- package/layers/raster/functions/creators/utils.js +5 -0
- package/layers/raster/functions/focalStatUtils.js +5 -0
- package/layers/raster/functions/localUtils.js +5 -0
- package/layers/raster/functions/pixelTransformUtils.js +5 -0
- package/layers/raster/functions/pixelUtils.js +5 -0
- package/layers/raster/functions/stretchUtils.js +5 -0
- package/layers/raster/functions/surfaceUtils.js +5 -0
- package/layers/raster/functions/vectorFieldUtils.js +5 -0
- package/layers/raster/transforms/BaseRasterTransform.js +5 -0
- package/layers/{support/rasterTransforms → raster/transforms}/GCSShiftTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/IdentityTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/PolynomialTransform.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/package.json +1 -1
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/locator/addressToLocations.js +1 -1
- package/rest/locator/addressesToLocations.js +1 -1
- package/rest/locator/suggestLocations.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/glTF/LoaderResult.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -10
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +9 -9
- package/views/DOMContainer.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/layers/ImageryLayerViewMixin.js +1 -1
- package/views/layers/ImageryTileLayerViewMixin.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/VertexElementDescriptor.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
- package/widgets/FeatureTable/support/TableTemplate.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/types.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0a5427127634738aa239.js +0 -1
- package/assets/esri/core/workers/chunks/110429583b28c28c36ee.js +0 -1
- package/assets/esri/core/workers/chunks/145c6a7cdcc9893efb27.js +0 -1
- package/assets/esri/core/workers/chunks/1bacdd17e199e22b5cd1.js +0 -1
- package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +0 -1
- package/assets/esri/core/workers/chunks/1f6ead46b723630db897.js +0 -1
- package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +0 -1
- package/assets/esri/core/workers/chunks/478def691ae6763686f3.js +0 -1
- package/assets/esri/core/workers/chunks/4c4a55be41ba105c091c.js +0 -1
- package/assets/esri/core/workers/chunks/4cbf5a97b2b3c6553f6f.js +0 -1
- package/assets/esri/core/workers/chunks/5dc0d853c21ccb6054c7.js +0 -1
- package/assets/esri/core/workers/chunks/613cbac9cb925cd20b48.js +0 -1
- package/assets/esri/core/workers/chunks/646f58b69d2354f1ef27.js +0 -1
- package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +0 -1
- package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +0 -1
- package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +0 -1
- package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +0 -1
- package/assets/esri/core/workers/chunks/ba59568e748f0ba53b78.js +0 -1
- package/assets/esri/core/workers/chunks/c4de24582c29fda5a033.js +0 -1
- package/assets/esri/core/workers/chunks/d786b17cc9062b1450ac.js +0 -1
- package/assets/esri/core/workers/chunks/d9958654c6438f28237b.js +0 -1
- package/assets/esri/core/workers/chunks/e6fa6f9c278589c8a713.js +0 -1
- package/assets/esri/core/workers/chunks/e7f4d135ef9665de1468.js +0 -1
- package/assets/esri/core/workers/chunks/f21cb5b34d4d1e3af1a9.js +0 -1
- package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +0 -1
- package/layers/support/rasterDatasets/BaseRaster.js +0 -5
- package/layers/support/rasterDatasets/CovJSONRaster.js +0 -5
- package/layers/support/rasterDatasets/FunctionRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageAuxRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageServerRaster.js +0 -5
- package/layers/support/rasterDatasets/InMemoryRaster.js +0 -5
- package/layers/support/rasterDatasets/MRFRaster.js +0 -5
- package/layers/support/rasterDatasets/RawBlockCache.js +0 -5
- package/layers/support/rasterDatasets/TIFFRaster.js +0 -5
- package/layers/support/rasterDatasets/WCSRaster.js +0 -5
- package/layers/support/rasterDatasets/covJSONParser.js +0 -5
- package/layers/support/rasterDatasets/multidimensionalUtils.js +0 -5
- package/layers/support/rasterDatasets/pamParser.js +0 -5
- package/layers/support/rasterDatasets/pixelReader.js +0 -5
- package/layers/support/rasterDatasets/wcsCoverageParser.js +0 -5
- package/layers/support/rasterFormats/Lerc.js +0 -5
- package/layers/support/rasterFormats/Qb3.js +0 -5
- package/layers/support/rasterFormats/RasterCodec.js +0 -5
- package/layers/support/rasterFormats/TiffDecoder.js +0 -5
- package/layers/support/rasterFunctions/ArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BaseRasterFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapToRGBFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/ComputeChangeFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/HillshadeFunction.js +0 -5
- package/layers/support/rasterFunctions/LocalFunction.js +0 -5
- package/layers/support/rasterFunctions/RemapFunction.js +0 -5
- package/layers/support/rasterFunctions/ShadedReliefFunction.js +0 -5
- package/layers/support/rasterFunctions/SlopeFunction.js +0 -5
- package/layers/support/rasterFunctions/StatisticsFunction.js +0 -5
- package/layers/support/rasterFunctions/StretchFunction.js +0 -5
- package/layers/support/rasterFunctions/bandIndexUtils.js +0 -5
- package/layers/support/rasterFunctions/changeDetectionUtils.js +0 -5
- package/layers/support/rasterFunctions/clipUtils.js +0 -5
- package/layers/support/rasterFunctions/conversionUtils.js +0 -5
- package/layers/support/rasterFunctions/convolutionUtils.js +0 -5
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +0 -5
- package/layers/support/rasterFunctions/creators/utils.js +0 -5
- package/layers/support/rasterFunctions/focalStatUtils.js +0 -5
- package/layers/support/rasterFunctions/localUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelTransformUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelUtils.js +0 -5
- package/layers/support/rasterFunctions/stretchUtils.js +0 -5
- package/layers/support/rasterFunctions/surfaceUtils.js +0 -5
- package/layers/support/rasterFunctions/vectorFieldUtils.js +0 -5
- package/layers/support/rasterTransforms/BaseRasterTransform.js +0 -5
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/lerc-wasm.wasm +0 -0
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/qb3-wasm.wasm +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/DBFParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/EphemeralBlockCache.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/RasterFactory.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/byteStreamUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/datasetUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/multipartParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/wcsCapabilitiesParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/xmlUtilities.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/ImageCanvasDecoder.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/JpgPlus.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Lzw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Raw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/pixelRangeUtils.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/tiffTag.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/utils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/colormaps.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createAppearenceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createBandIndexFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createChangeFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createConversionFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createLocalFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createMultiRasterAnalysisFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createStatisticsFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createSurfaceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/customBandIndexUtils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/mirror.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionHelper.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionSchema.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterProjectionHelper.js +0 -0
- /package/layers/{support/rasterTransforms → raster/transforms}/utils.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6049],{6049:(t,e,n)=>{n.d(e,{vt:()=>Zs,UD:()=>js});var s=n(85334),r=n(49186),o=n(4718),i=n(31635),a=n(91429),u=n(16019),l=n(25482);let c=class extends l.o{constructor(){super(...arguments),this.raster=void 0}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"raster",void 0),c=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.BaseFunctionArguments")],c);const p=c;var h;let m=h=class extends p{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ArithmeticFunctionArguments")],m);const f=m;var g=n(14140),d=n(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends l.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const e=[t],{parameters:n}=t;let s=n.rasters||n.raster&&[n.raster];for(;s?.length;){e.unshift(...s);const t=[];for(let e=0;e<s.length;e++){const{parameters:n}=s[e],r=n.rasters||n.raster&&[n.raster];r?.length&&t.push(...r)}s=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let r=!1;for(let t=0;t<e.length;t++){const n=e[t];n.id=e.length-t-1;const{rasters:s}=n.parameters;r=r||null!=s&&s.length>1}const o=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:i}=this;return{functions:e,hasBranches:r,hasFocalFunction:o,isSourceSingleBand:1===i?.[0]?.bandCount}}bind(t,e=!1,n=-1){this.id=n+1;const s=this._getRasterValues();let r=!0;for(let n=0;n<s.length;n++){const o=s[n];if(null!=o&&this._isRasterFunctionValue(o)){const s=o.bind(t,e,this.id+n);if(!s.success)return this._bindingResult=s,s;r=r&&s.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),r&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),r&&this.isRoot)&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(r=this.rawInputBandIds.length<=3)),this._bindingResult.supportsGPU=r,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}process(t){const e=this._getRasterValues(),n=0===e.length?t.pixelBlocks??t.primaryPixelBlocks:e.map(e=>this._readRasterValue(e,t));return this._processPixels({...t,pixelBlocks:n})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){const e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}const e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;const{bandCount:n}=this.sourceRasterInfos[0],s=Array.from({length:n},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(s),this.rawInputBandIds}swizzleInputBandIds(t){const e=this._getRasterValues().filter(this._isRasterFunctionValue);let n=!0;for(const s of e)n=s.swizzleInputBandIds(t)&&n;return!!n&&this._swizzleBandIds(t)}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:n}=this.functionArguments;return n&&Array.isArray(n)&&n.length?(t.rasters=n.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){const t=[];"Clip"===this.functionName&&t.push(this.functionArguments);const{raster:e,rasters:n}=this.functionArguments;if(n&&Array.isArray(n)&&n.length)n.forEach(e=>{if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}});else if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:n,rasterIds:s}=t;if(0===e.length)return n;const r=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&s.includes(t)?n[s.indexOf(t)]:"number"!=typeof t?n[0]:void 0),o=r.find(t=>t)??n[0];return r.forEach((t,e)=>{void 0===t&&(r[e]=o)}),r}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],n=[]){for(let s=0;s<t.sourceRasters.length;s++){const r=t.sourceRasters[s];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,n);else{const t=r,s=this._getPrimaryRasterId(t);if(null==s)continue;n.includes(s)||(this.mainPrimaryRasterId===s?(e.unshift(t),n.unshift(s)):(e.push(t),n.push(s)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e){const{primaryPixelBlocks:n}=e;if(null==t||"$$"===t){const t=n[0];return null==t?null:t.clone()}if("string"==typeof t){const s=e.primaryRasterIds.indexOf(t);return-1===s?null:n[s]}if("number"==typeof t){const e=n[0];if(null==e)return null;const{width:s,height:r,pixelType:o}=e,i=new Float32Array(s*r);i.fill(t);const a=this.sourceRasterInfos[0].bandCount,u=new Array(a).fill(i);return new g.A({width:s,height:r,pixelType:o,pixels:u})}return t.process(e)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:n,statistics:s,histograms:r}=t,o=n.BandProperties;o&&o.length!==e&&(t.keyProperties={...n,BandProperties:void 0}),s&&s.length!==e&&(t.statistics=s.length>e?s.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),n.BAND_COUNT&&Number(n.BAND_COUNT)!==e&&(t.keyProperties={...n,BAND_COUNT:"string"==typeof n.BAND_COUNT?String(e):e})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],x.prototype,"outputPixelType",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"sourceRasters",void 0),(0,i.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"supportsGPU",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rawInputBandIds",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rawSourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"isInputBandIdsSwizzled",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"swizzledBandSelection",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isBranch",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isRoot",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"flatWebGLFunctionChain",null),(0,i.Cg)([(0,a.MZ)()],x.prototype,"_bindingResult",void 0),x=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.BaseRasterFunction")],x);const w=x,A={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},v={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},b={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},C={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...v,...b,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...C},P=new Map([[b.acos,{domain:[0,Math.PI],isInteger:!1}],[b.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.cos,{domain:[-1,1],isInteger:!1}],[b.sin,{domain:[-1,1],isInteger:!1}],[v.booleanAnd,{domain:[0,1],isInteger:!0}],[v.booleanNot,{domain:[0,1],isInteger:!0}],[v.booleanOr,{domain:[0,1],isInteger:!0}],[v.booleanXOr,{domain:[0,1],isInteger:!0}],[v.equalTo,{domain:[0,1],isInteger:!0}],[v.notEqual,{domain:[0,1],isInteger:!0}],[v.greaterThan,{domain:[0,1],isInteger:!0}],[v.greaterThanEqual,{domain:[0,1],isInteger:!0}],[v.lessThan,{domain:[0,1],isInteger:!0}],[v.lessThanEqual,{domain:[0,1],isInteger:!0}],[v.isNull,{domain:[0,1],isInteger:!0}]]);function T(t){return P.get(t)}const R=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function N(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]+r[t]);return i}function F(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand("f32",r);return o.set(s),o}function k(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]*s[t]);return o}function I(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]-r[t]);return i}function S(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]*r[t]);return i}function _(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(s[t])*Math.floor(Math.abs(s[t])));return o}function B(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]/r[t]);return i}function j(t,e,n){return B(t,e,"f32")}function Z(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(s[t]/r[t]));return i}function G(t,e,n,s){const r=t[0],o=r.length,i=g.A.createEmptyBand(n,o);if(s===b.atanh){for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>=1?e[t]=0:i[t]=Math.atanh(n)}return i}const a=s===b.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>1?e[t]=0:i[t]=a(n)}return i}function z(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s(r[t]));return i}function O(t,e,n,s){const[r,o]=t,i=r.length,a=g.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s(r[t],o[t]));return a}function E(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&r[t]);return i}function D(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<<r[t]);return i}function V(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~s[t]);return o}function U(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]|r[t]);return i}function L(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>>r[t]);return i}function W(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]^r[t]);return i}function $(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&&r[t]?1:0);return i}function K(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]?0:1);return o}function H(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]||r[t]?1:0);return i}function q(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(s[t]?1:0)^(r[t]?1:0));return i}function J(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?1:0);return i}function X(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o),a=s===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):s**r[t]);return i}function Y(t,e,n){return X(t,e,n,10)}function Q(t,e,n){return X(t,e,n,2)}function tt(t,e,n){return X(t,e,n,Math.E)}function et(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=s(r[t]));return i}function nt(t,e,n){return et(t,e,n,Math.log10)}function st(t,e,n){return et(t,e,n,Math.log2)}function rt(t,e,n){return et(t,e,n,Math.log)}function ot(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>r[t]?1:0);return i}function it(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>=r[t]?1:0);return i}function at(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?1:0);return i}function ut(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<=r[t]?1:0);return i}function lt(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function ct(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]%r[t]);return i}function pt(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-s[t]);return o}function ht(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?0:1);return i}function mt(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==s[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function ft(t,e,n){const[s,r,o]=t,i=s.length,a=g.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s[t]?r[t]:o[t]);return a}function gt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e<s&&(e=s)}i[n]=e}return i}function dt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e>s&&(e=s)}i[n]=e}return i}function yt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n],o=e;for(let r=1;r<s;r++){const s=t[r][n];o<s?o=s:e>s&&(e=s)}i[n]=o-e}return i}function xt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=0;for(let r=0;r<s;r++)e+=t[r][n];i[n]=e/s}return i}function wt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n])for(let e=0;e<s;e++){const s=t[e];i[n]+=s[n]}return i}function At(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){const e=new Float32Array(s);let r=0;for(let o=0;o<s;o++){const s=t[o];r+=s[n],e[o]=s[n]}r/=s;let o=0;for(let t=0;t<s;t++)o+=(e[t]-r)**2;i[n]=Math.sqrt(o/s)}return i}function vt(t,e,n){const s=t.length;if(s<2)return t[0];const r=Math.floor(s/2),[o]=t,i=o.length,a=g.A.createEmptyBand(n,i),u=new Float32Array(s),l=s%2==1;for(let n=0;n<i;n++)if(!e||e[n]){for(let e=0;e<s;e++)u[e]=t[e][n];u.sort(),a[n]=l?u[r]:(u[r]+u[r-1])/2}return a}function bt(t,e,n){const[s,r]=t;if(null==r)return s;const o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?s[t]:r[t]);return i}function Ct(t,e,n){const s=t.length;if(s<=2)return bt(t,e,n);const r=t[0].length,o=g.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){i.clear();for(let e=0;e<s;e++){const s=t[e][n];i.set(s,i.has(s)?i.get(s)+1:1)}let e=0,r=0;const a=[];for(const t of i.keys())e=i.get(t),e>r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[n]=a[0]}return o}function Mt(t,e,n){const s=t.length;if(s<=2)return bt(t,e,n);const r=t[0].length,o=g.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){i.clear();for(let e=0;e<s;e++){const s=t[e][n];i.set(s,i.has(s)?i.get(s)+1:1)}let e=0,r=t.length;const a=[];for(const t of i.keys())e=i.get(t),e<r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[n]=a[0]}return o}function Pt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o),a=new Set;for(let n=0;n<o;n++)if(!e||e[n]){let e;a.clear();for(let r=0;r<s;r++)e=t[r][n],a.add(e);i[n]=a.size}return i}const Tt=new Map,Rt=new Map,Nt=new Map,Ft=new Map;function kt(t,e,n={}){Tt.size||(Tt.set(4,Math.sqrt),Tt.set(6,Math.acos),Tt.set(7,Math.asin),Tt.set(8,Math.atan),Tt.set(9,Math.atanh),Tt.set(10,Math.abs),Tt.set(21,Math.cos),Tt.set(22,Math.cosh),Tt.set(48,Math.floor),Tt.set(49,Math.ceil),Tt.set(51,Math.sin),Tt.set(52,Math.sinh),Tt.set(56,Math.tan),Tt.set(57,Math.tanh),Tt.set(59,Math.acosh),Tt.set(60,Math.asinh),Tt.set(65,Math.floor),Rt.set(5,Math.pow),Rt.set(61,Math.atan2),Nt.set(1,N),Nt.set(2,I),Nt.set(3,S),Nt.set(11,E),Nt.set(12,D),Nt.set(13,V),Nt.set(14,U),Nt.set(15,L),Nt.set(16,W),Nt.set(17,$),Nt.set(18,K),Nt.set(19,H),Nt.set(20,q),Nt.set(23,B),Nt.set(24,J),Nt.set(25,tt),Nt.set(26,Y),Nt.set(27,Q),Nt.set(28,ot),Nt.set(29,it),Nt.set(30,_),Nt.set(31,lt),Nt.set(32,F),Nt.set(33,at),Nt.set(34,ut),Nt.set(35,rt),Nt.set(36,nt),Nt.set(37,st),Nt.set(44,ct),Nt.set(45,pt),Nt.set(46,ht),Nt.set(53,k),Nt.set(64,j),Nt.set(65,Z),Nt.set(76,ft),Nt.set(78,ft),Ft.set(38,Ct),Ft.set(39,gt),Ft.set(40,xt),Ft.set(41,vt),Ft.set(42,dt),Ft.set(43,Mt),Ft.set(47,yt),Ft.set(54,At),Ft.set(55,wt),Ft.set(58,Pt),Ft.set(66,Ct),Ft.set(67,gt),Ft.set(68,xt),Ft.set(69,vt),Ft.set(70,dt),Ft.set(71,Mt),Ft.set(72,yt),Ft.set(73,At),Ft.set(74,wt),Ft.set(75,Pt));let s=function(t,e=!1){const n=t.map(t=>t.mask),s=n.filter(t=>null!=t),r=t[0].pixels[0].length;if(0===s.length||e&&s.length!==n.length)return new Uint8Array(r).fill(255);const o=s[0],i=new Uint8Array(o);if(1===s.length)return i;if(!e){for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)0===i[t]&&(i[t]=e[t]?255:0)}return i}(t,e>=66&&e<=75);const{outputPixelType:r="f32"}=n,o=!Ft.has(e)||n.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let n=0;n<i;n++){const i=Ft.has(e)&&!o?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[n]);let l,c=!0;if(e===C.setNull){const t=mt(i,s,r);l=t.band,s=t.mask,c=!1}else Nt.has(e)?l=Nt.get(e)(i,s,"f64"):Tt.has(e)?l=e===b.asin||e===b.acos||e===b.atanh?G(i,s,"f64",e):z(i,s,"f64",Tt.get(e)):Rt.has(e)?l=O(i,s,"f64",Rt.get(e)):Ft.has(e)?l=Ft.get(e)(i,s,"f64"):(l=i[0],c=!1);if(c&&e!==v.isNull&&!P.has(e)){const t=g.A.createEmptyBand(r,l.length);s||(s=new Uint8Array(l.length).fill(255)),(0,u.$p)(l,s),(0,u.yM)(l,s,r,t),l=t}a.push(l)}const l=t[0];return new g.A({width:l.width,height:l.height,pixelType:r,mask:e===v.isNull?null:s,pixels:a})}let It=class extends w{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};const e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,n){return kt(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:n})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],n=this.outputPixelType??"f32";let[s,r]=(0,u.hP)(n);const o=(0,u.zw)(n);return o&&(s-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[s,r],isOutputRounded:o}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],It.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:f,json:{write:!0,name:"rasterFunctionArguments"}})],It.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],It.prototype,"rasterArgumentNames",void 0),It=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ArithmeticFunction")],It);const St=It;var _t;let Bt=_t=class extends p{clone(){return new _t({raster:this.raster})}};Bt=_t=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.AspectFunctionArguments")],Bt);const jt=Bt;var Zt=n(39062);let Gt=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{extent:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1});return(0,Zt.di)(e,{resolution:o})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:jt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.AspectFunction")],Gt);const zt=Gt;var Ot=n(66552);n(44208);const Et=new Set(["+","-","*","/","(",")"]);function Dt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Vt(t,e,n,s){if("number"==typeof n&&"number"==typeof s)return n+s;let r,o,i;"number"==typeof n?(i=s,r=i.length,o=new Float32Array(r),o.fill(n)):(r=n.length,o=n,s.constructor===Number?(i=new Float32Array(r),i.fill(s)):i=s);const a=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]+i[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]-i[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]*i[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&i[e]&&(a[e]=o[e]/i[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function Ut(t,e){t.splice(e,1);let n=0,s=0;do{n=0,s=0;for(let e=0;e<t.length;e++)if("("===t[e])n=e;else if(")"===t[e]){s=e;break}s===n+1&&t.splice(n,2)}while(s===n+1);return t}function Lt(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,n=0;for(let s=0;s<t.length;s++)if("("===t[s])e=s;else if(")"===t[s]){n=s;break}const s=0===n?t:t.slice(e+1,n);let r=-1;for(let t=0;t<s.length;t++)if("*"===s[t]||"/"===s[t]){r=t;break}if(r>-1)n>0&&(r+=e+1);else{for(let t=0;t<s.length;t++)if("+"===s[t]||"-"===s[t]){r=t;break}n>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var Wt=n(28435);const $t=new Ot.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Kt(t,e){if(!(0,Wt.AB)(t))return t;const{equation:n,method:s}=e,r=e.bandIndexes.map(t=>t-1),{pixels:o,mask:i}=t;let a;switch(s){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":a=qt(i,o[r[0]],o[r[1]]);break;case"ndwi":a=qt(i,o[r[1]],o[r[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,n){const s=e.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,n,s){const r=n.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=n[i],r=e[i],a=r+t+s;a&&(o[i]=(r-t)/a*(1+s))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,n,s,r,o){const i=n.length,a=new Float32Array(i),u=-r*s+o*(1+s*s);for(let o=0;o<i;o++)if(null==t||t[o]){const t=n[o],i=e[o],l=r*i+t+u;l&&(a[o]=s*(i-s*t-r)/l)}return[a]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1,r[4]+1);break;case"msavi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o],i=2*s+1;r[o]=.5*(i-Math.sqrt(i*i-8*(s-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o];if(1!==t&&s+t+.5!==0){const e=(2*(s*s-t*t)+1.5*s+.5*t)/(s+t+.5);r[o]=e*(1-.25*e)-(t-.125)/(1-t)}}return[r]}(i,o[r[0]],o[r[1]]);break;case"pvi":a=function(t,e,n,s,r){const o=n.length,i=new Float32Array(o),a=1/Math.sqrt(1+s*s);for(let u=0;u<o;u++)if(null==t||t[u]){const t=n[u],o=e[u];i[u]=(o-s*t-r)*a}return[i]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1);break;case"gvitm":a=function(t,e){const[n,s,r,o,i,a]=e,u=n.length,l=new Float32Array(u);for(let e=0;e<u;e++)(null==t||t[e])&&(l[e]=-.2848*n[e]-.2435*s[e]-.5436*r[e]+.7243*o[e]+.084*i[e]-.18*a[e]);return[l]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"sultan":a=function(t,e){const[n,s,r,o,i]=e,a=n.length,u=new Float32Array(a),l=new Float32Array(a),c=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(u[e]=i[e]?o[e]/i[e]*100:0,l[e]=n[e]?o[e]/n[e]*100:0,c[e]=r[e]?s[e]/r[e]*(o[e]/r[e])*100:0);return[u,l,c]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]]]);break;case"vari":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=o+t-r[e];a&&(i[e]=(o-t)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"mtvi2":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e],u=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(o))-.5);if(u){const n=1.5*(1.2*(t-a)-2.5*(o-a));i[e]=n/u}}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e];i[e]=100*(t-o)-10*(t-a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"evi":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=t+6*o-7.5*r[e]+1;a&&(i[e]=2.5*(t-o)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"wndwi":a=function(t,e,n=.5){const[s,r,o]=e,i=r.length,a=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){const t=s[e],i=r[e],u=o[e],l=t+n*i+(1-n)*u;l&&(a[e]=(t-n*i-(1-n)*u)/l)}return[a]}(i,[o[r[0]],o[r[1]],o[r[2]]],r[3]?r[3]+1:.5);break;case"bai":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o])for(o=0;o<s;o++){const t=(.1-e[o])**2+(.06-n[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,n){let s,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));const n=t.split(""),s=[],r=[];let o="";for(let t=0;t<n.length;t++){const i=n[t];Et.has(i)?(o.length&&r.push(Dt(o,e)),s.push(i),o=""):o=o.concat(i)}return o.length&&r.push(Dt(o,e)),{ops:s,nums:r}}(n,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const n=new Float32Array(e[0].length);return"number"==typeof t?n.fill(t):n.set(t),[n]}for(;r.length>0;){const{numIndex:e,opIndex:n}=Lt(r);if(s=Vt(t,r[n],o[e],o[e+1]),1===r.length)break;r=Ut(r,n),o.splice(e,2,s)}return[s]}(i,o,n);break;default:return t}const{outputPixelType:l="f32"}=e,c=null!=l&&(0,u.zw)(l);let p;i?(p=new Uint8Array(t.width*t.height),p.set(i)):c&&(p=new Uint8Array(t.width*t.height).fill(255)),c&&(a=a.map(t=>{const e=g.A.createEmptyBand(l,t.length);return(0,u.yM)(t,p,l,e),e}));const h=new g.A({width:t.width,height:t.height,pixelType:l,pixels:a,mask:p});return h.updateStatistics(),h}function Ht(t){const e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function qt(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o],i=t+s;i&&(r[o]=(t-s)/i)}return[r]}var Jt,Xt=n(93223);let Yt=Jt=class extends p{constructor(){super(...arguments),this.method="custom"}clone(){return new Jt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,i.Cg)([(0,Xt.e)($t)],Yt.prototype,"method",void 0),Yt=Jt=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.BandArithmeticFunctionArguments")],Yt);const Qt=Yt,te=new Set(["vari","mtvi2","rtvi-core","evi"]);let ee=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};const e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{method:n,bandIndexes:s}=this.functionArguments,r=s.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this,e=te.has(this.functionArguments.method)?3:2,n=r.slice(0,e).map(e=>t.indexOf(e-1));r.splice(0,e,...n)}return Kt(e,{method:n,bandIndexes:r,equation:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let n,s;const r=new Float32Array(3),{method:o}=this.functionArguments;switch(o){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":n=Ht([e[0],e[1],0]),s="ndxi";break;case"ndwi":n=Ht([e[1],e[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=Ht([e[0],e[1],0]),s="sr";break;case"ci-g":case"ci-re":n=Ht([e[0],e[1],0]),s="ci";break;case"savi":n=Ht([e[0],e[1],0]),s="savi",r[0]=t[2]+1;break;case"tsavi":n=Ht([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":n=Ht([e[0],e[1],0]),s="msavi";break;case"gemi":n=Ht([e[0],e[1],0]),s="gemi";break;case"pvi":n=Ht([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=Ht([e[0],e[1],e[2]]),s="vari";break;case"mtvi2":n=Ht([e[0],e[1],e[2]]),s="mtvi";break;case"rtvi-core":n=Ht([e[0],e[1],e[2]]),s="rtvicore";break;case"evi":n=Ht([e[0],e[1],e[2]]),s="evi";break;case"wndwi":n=Ht([e[0],e[1],0]),s="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=Ht([e[1],e[0],0]),s="bai";break;default:n=Ht([0,1,2]),s="custom"}return{bandIndexMat3:n,indexType:s,adjustments:r,isOutputRounded:(0,u.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),n=t.length,s=e.map(t=>t>=n?n-1:t),r=te.has(this.functionArguments.method)?3:2,o=s.slice(0,r).map(e=>t[e]);return 2===o.length&&o.push(0),o}_swizzleBandIds(t){const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);const{method:n}=this.functionArguments,s=(["vari","mtvi2","rtvi-core","evi"].includes(n)?e.slice(0,3):"bai"===n||"ndwi"===n?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return s[2]??=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ee.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Qt,json:{write:!0,name:"rasterFunctionArguments"}})],ee.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ee.prototype,"rasterArgumentNames",void 0),ee=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.BandArithmeticFunction")],ee);const ne=ee;var se,re=n(65864),oe=n(50498);const ie=new Ot.J({1:"outside",2:"inside"},{useNumericKeys:!0});let ae=se=class extends p{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new se({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,i.Cg)([(0,a.MZ)({types:oe.yR,json:{read:re.rS,write:!0}})],ae.prototype,"clippingGeometry",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:ie.read,write:ie.write}})],ae.prototype,"clippingType",void 0),ae=se=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ClipFunctionArguments")],ae);const ue=ae;var le=n(77359),ce=n(70834);let pe=class extends w{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{functionArguments:e}=this,{clippingGeometry:n,clippingType:s}=e;if(!n)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===s)try{const{spatialReference:e}=t,s="extent"===n.type?(0,ce._l)(n,e):(0,ce.uk)(n,e).extent;s&&(0,le.Sd)(t,s)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){const{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],pe.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:ue,json:{write:!0,name:"rasterFunctionArguments"}})],pe.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"isNoopProcess",void 0),pe=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ClipFunction")],pe);const he=pe;var me,fe=n(67369),ge=n(95349),de=n(36005);let ye=me=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return fe.L7.includes(e)?e:null}readColorRamp(t){return(0,ge.r)(t)}readColorRampName(t,e){if(!t)return null;const n=fe.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return n?fe.kH.fromJSON(n):null}clone(){return new me({colormap:(0,o.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],ye.prototype,"colormap",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],ye.prototype,"colormapName",void 0),(0,i.Cg)([(0,a.wg)("colormapName")],ye.prototype,"castColormapName",null),(0,i.Cg)([(0,a.MZ)({types:ge.g,json:{write:!0}})],ye.prototype,"colorRamp",void 0),(0,i.Cg)([(0,de.w)("colorRamp")],ye.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:fe.kH.apiValues,json:{type:fe.kH.jsonValues,write:fe.kH.write}})],ye.prototype,"colorRampName",void 0),(0,i.Cg)([(0,de.w)("colorRampName")],ye.prototype,"readColorRampName",null),ye=me=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ColormapFunctionArguments")],ye);const xe=ye,we=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function ve(t,e){const n=[],s=[];for(let e=0;e<t.length-1;e++)n.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),s.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,fe.iv)({type:"multipart",colorRamps:n},{numColors:r,weights:e=e??s})}let be=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:n,colorRamp:s,colorRampName:r}=this.functionArguments;if(!e?.length)if(s)this.colorRamp=s,e=(0,fe.R8)(s,{interpolateAlpha:!0});else if(r){const t=(0,fe.M5)(r);t&&(e=(0,fe.R8)(t),this.colorRamp=(0,ge.r)(t))}else n&&(e=function(t){let e;switch(t){case"elevation":e=ve([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,fe.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=ve([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=we;break;case"ndvi2":e=function(){const t=ve([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=Ae;break;case"random":e=function(){const t=[];for(let e=0;e<256;e++){const e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(n));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};const o=this._getOutputPixelType(t.pixelType);this.outputPixelType=o.startsWith("f")?"s32":o;const i=t.clone();return i.pixelType=this.outputPixelType,i.colormap=e,i.bandCount=1,this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,u.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:xe,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ColormapFunction")],be);const Ce=be;var Me,Pe=n(4151);let Te=Me=class extends p{clone(){return new Me({raster:this.raster})}};Te=Me=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ColormapToRGBFunctionArguments")],Te);const Re=Te;var Ne=n(88178);let Fe=class extends w{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};const e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;const n=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:s,offset:r}=(0,Wt.zg)({colormap:n});return s?(this.lookup={indexedColormap:s,offset:r},{success:!0,supportsGPU:(0,Ne.WN)(s)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();const n=e.pixels[0],s=e.mask??new Uint8Array(n.length).fill(255),r=new Uint8Array(n.length),o=new Uint8Array(n.length),i=new Uint8Array(n.length),{indexedColormap:a,offset:u}=this.lookup,l=a.length;for(let t=0;t<n.length;t++)if(s[t]){let e=4*(n[t]-u);e<0||e>l-4?s[t]=0:(r[t]=a[e++],o[t]=a[e++],i[t]=a[e++])}return e.pixels=[r,o,i],e.statistics=[new Pe.z(0,255),new Pe.z(0,255),new Pe.z(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Re,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ColormapToRGBFunction")],Fe);const ke=Fe;var Ie,Se=n(43937);let _e=Ie=class extends p{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new Ie({rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_e.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],_e.prototype,"writeRasters",null),_e=Ie=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")],_e);const Be=_e;let je=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();if(n.attributeTable=null,n.colormap=null,n.pixelType=this.outputPixelType,n.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){const e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),n.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){const e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),n.histograms=e}n.multidimensionalInfo&&n.multidimensionalInfo.variables.forEach(e=>{const n=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),s=n.map(t=>t?.statistics?.length?t.statistics:null),r=n.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=s.every(t=>null!=t)?s.flat():null,e.histograms=r.every(t=>null!=t)?r.flat():null}),n.bandCount>1&&(n.colormap=null,n.attributeTable=null);const s=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return n.keyProperties={...n.keyProperties,BandProperties:s},this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const n=e?.[0];return null==n?null:(0,Wt.Wy)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],je.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Be,json:{write:!0,name:"rasterFunctionArguments"}})],je.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],je.prototype,"rasterArgumentNames",void 0),je=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.CompositeBandFunction")],je);const Ze=je;var Ge=n(20437);const ze=new Ot.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Ot.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var Ee;let De=Ee=class extends p{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new Ee({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,i.Cg)([(0,Xt.e)(ze)],De.prototype,"method",void 0),(0,i.Cg)([(0,Xt.e)(Oe)],De.prototype,"keepMethod",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],De.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],De.prototype,"rasters",null),De=Ee=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ComputeChangeFunctionArguments")],De);const Ve=De;let Ue=class extends w{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){const t=this.sourceRasterInfos.map(t=>t.attributeTable),n=this._getFieldNames(t,"value"),s=t.map(t=>this._getClassFieldName(t));if(null==n[0]||null==n[1]||null==s[0]||null==s[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,n,s)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){const{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;const{method:n}=this.functionArguments;return function(t,e,n,s){const[r,o]=t,i=(0,u.zw)(n)&&!(0,u.zw)(r.pixelType)&&!(0,u.zw)(o.pixelType),a=[r.mask,o.mask].filter(t=>t),l=g.A.combineBandMasks(a),c=t.map(t=>t.pixels[0]),{width:p,height:h}=r,m=g.A.createEmptyBand(n,p*h);switch(e){case"difference":case"relative-difference":!function(t){const{bands:[e,n],mask:s,isRelative:r,isRoundingNeeded:o,outBand:i}=t,a=e.length;for(let t=0;t<a;t++)if(!s||s[t]){let s=e[t]-n[t];if(r){const r=Math.max(Math.abs(e[t])-Math.abs(n[t]));s=r>0?s/r:0}i[t]=o?Math.round(s):s}}({bands:c,mask:l,outBand:m,isRoundingNeeded:i,isRelative:"relative-difference"===e});break;case"categorical":!function(t){const{bands:[e,n],categoryIndexLookups:[s,r],classNames:[o,i],mask:a,keepMethod:u,outBand:l}=t,c=e.length,p=o.length,h=i.length,m=p*h,f=m+1,g=m+2;for(let t=0;t<c;t++)if(!a||a[t]){const a=e[t],c=n[t],p=s[a],d=r[c],y=o[p],x=i[d];l[t]=null==p||null==d?m:"changed"===u&&y===x?f:"unchanged"===u&&y!==x?g:p*h+d}}({bands:c,mask:l,outBand:m,...s});break;case"euclidean-distance":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0;for(let r=0;r<i;r++){const o=e[r][t]-n[r][t];s+=o*o}r[t]=Math.sqrt(s)}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"angle-difference":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0,o=0,a=0;for(let r=0;r<i;r++){const i=e[r][t],u=n[r][t];s+=i*u,o+=i*i,a+=u*u}const u=Math.sqrt(o*a);r[t]=u?Math.acos(s/u):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"band-with-most-change":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0,o=0;for(let r=0;r<i;r++){const i=Math.abs(e[r][t]-n[r][t]);i>s&&(s=i,o=r)}r[t]=o}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m})}const f=new g.A({width:p,height:h,pixels:[m],pixelType:n,mask:l});return f.updateStatistics(),f}(e,n,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){const t=this.outputPixelType??"f32";let[e,n]=(0,u.hP)(t);const s=(0,u.zw)(t);return s&&(e-=1e-4,n+=1e-4),{method:this.functionArguments.method,domainRange:[e,n],isOutputRounded:s}}_updateAttributeTable(t,e,n){const s=this.sourceRasterInfos.map(t=>t.attributeTable),r=s.map((t,n)=>t.features.map(t=>t.attributes[e[n]])),o=s.map((t,e)=>t.features.map(t=>t.attributes[n[e]])),i=r.map(t=>{const e=[];return t.forEach((t,n)=>e[t]=n),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:i,classNames:o,keepMethod:a};const u=s[0].clone();u.fields=[new Ge.A({name:"OID",type:"oid"}),new Ge.A({name:"Value",type:"integer"}),new Ge.A({name:"ClassName",type:"string"}),new Ge.A({name:"Class_From",type:"string"}),new Ge.A({name:"Class_To",type:"string"})];const l=this._getFieldNames(s,"red"),c=this._getFieldNames(s,"green"),p=this._getFieldNames(s,"blue"),h=[],m=2===l.length&&2===c.length&&2===p.length;m&&(h.push(...s.map((t,e)=>t.features.map(t=>[t.attributes[l[e]],t.attributes[c[e]],t.attributes[p[e]]]))),u.fields.push(new Ge.A({name:"Red",type:"integer"}),new Ge.A({name:"Green",type:"integer"}),new Ge.A({name:"Blue",type:"integer"})));const f=u.features[0].clone();f.geometry=null;const g=[],[d,y]=r.map(t=>t.length);let x=1;for(let t=0;t<d;t++){const e=o[0][t];for(let n=0;n<y;n++){const s=o[1][n];if("changed"===a&&e===s||"unchanged"===a&&e!==s)continue;const r=f.clone();r.attributes={OID:x++,Value:t*y+n,ClassName:e===s?e:`${e} -> ${s}`,Class_From:e,Class_To:s},m&&(r.attributes.Red=h[0][t][0]+h[1][n][0]>>1,r.attributes.Green=h[0][t][1]+h[1][n][1]>>1,r.attributes.Blue=h[0][t][2]+h[1][n][2]>>1),g.push(r)}}if("changed"===a){const t=f.clone();t.attributes={OID:x++,Value:d*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){const t=f.clone();t.attributes={OID:x++,Value:d*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}u.features=g,t.attributeTable=u}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){const e=t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type);return e?.name}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ue.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Ue.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ue.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ue.prototype,"_categoryConfig",void 0),Ue=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ComputeChangeFunction")],Ue);const Le=Ue;var We;let $e=We=class extends p{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new We({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],$e.prototype,"contrastOffset",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],$e.prototype,"brightnessOffset",void 0),$e=We=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ContrastBrightnessFunctionArguments")],$e);const Ke=$e;var He=n(6952);let qe=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const n=e.clone();this._removeStatsHistColormapVAT(n),this.rasterInfo=n;const{contrastOffset:s,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,He.zj)(s,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,Wt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],qe.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ke,json:{write:!0,name:"rasterFunctionArguments"}})],qe.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],qe.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],qe.prototype,"lookup",void 0),qe=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ContrastBrightnessFunction")],qe);const Je=qe;function Xe(t,e,n,s,r){const o=Math.floor(s/2);for(let s=0;s<o;s++)for(let o=0;o<e;o++)t[s*e+o]=t[(r-1-s)*e+o],t[(n-1-s)*e+o]=t[(n-r+s)*e+o];const i=Math.floor(r/2);for(let s=0;s<n;s++){const n=s*e;for(let s=0;s<i;s++)t[n+s]=t[n+r-1-s],t[n+e-s-1]=t[n+e+s-r]}}const Ye=new Map;function Qe(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=o.length,l=i?0:s,c=i?s:0,p=i?1:e;for(let i=l;i<n-l;i++){const n=i*e;for(let i=c;i<e-c;i++){if(r&&!r[n+i])continue;let e=0;for(let r=0;r<u;r++)e+=t[n+i+(r-s)*p]*o[r];a[n+i]=e}}return a}function tn(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=Math.floor(s/2),l=Math.floor(r/2);for(let c=u;c<n-u;c++){const n=c*e;for(let c=l;c<e-l;c++){if(o&&!o[n+c])continue;let p=0;for(let o=0;o<s;o++)for(let s=0;s<r;s++)p+=t[n+c+(o-u)*e+s-l]*i[o*r+s];a[n+c]=p}}return a}var en;Ye.set(A.none,[0,0,0,0,1,0,0,0,0]),Ye.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(A.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(A.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(A.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let nn=en=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const e=Ye.get(t);if(!e||t===A.userDefined||t===A.none)return;const n=Math.sqrt(e.length);this._set("kernel",e),this._set("cols",n),this._set("rows",n)}clone(){return new en({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],nn.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],nn.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],nn.prototype,"convolutionType",null),(0,i.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],nn.prototype,"kernel",void 0),nn=en=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")],nn);const sn=nn;let rn=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,n=t.reduce((t,e)=>t+e);return-1===e||0===n||1===n?t:t.map(t=>t/n)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:s}=this.functionArguments;if(!Object.values(A).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==A.none&&e*n!==s.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const o=r.clone();o.pixelType=this.outputPixelType;const i=[A.none,A.sharpen,A.sharpen2,A.sharpening3x3,A.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!i.includes(t))&&(o.statistics=null,o.histograms=null),o.colormap=null,o.attributeTable=null,this.rasterInfo=o,{success:!0,supportsGPU:s.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===A.none)return e;const{rows:n,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;return function(t,e){const n=function(t){const e=Math.sqrt(t.length),n=t.slice(0,e),s=[1];for(let n=1;n<e;n++){let r=null;for(let s=0;s<e;s++){const o=t[s+n*e],i=t[s];if(null==r)if(0===i){if(o)return{separable:!1,row:null,col:null}}else r=o/i;else if(o/i!==r)return{separable:!1,row:null,col:null}}if(null==r)return{separable:!1,row:null,col:null};s.push(r)}return{separable:!0,row:n,col:s}}(e.kernel),s=!1!==e.mirrorEdges,r=n.separable?function(t,e,n,s=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:u}=t,l=r.length,c=[],p=e.length,h=n.length,m=Math.floor(p/2),f=Math.floor(h/2);for(let t=0;t<l;t++){let a=Qe(r[t],o,i,m,u,e,!0);a=Qe(a,o,i,f,u,n,!1),s&&Xe(a,o,i,p,h),c.push(a)}return new g.A({width:o,height:i,pixelType:a,pixels:c,mask:u})}(t,n.row,n.col,s):function(t,e,n=!0){const{pixels:s,width:r,height:o,pixelType:i,mask:a}=t,u=s.length,l=[],{kernel:c,rows:p,cols:h}=e;for(let t=0;t<u;t++){const e=tn(s[t],r,o,p,h,a,c);n&&Xe(e,r,o,p,h),l.push(e)}return new g.A({width:r,height:o,pixelType:i,pixels:l,mask:a})}(t,e,s),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:r,rows:n,cols:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(25),{rows:e,cols:n}=this.functionArguments,{_normalizedKernel:s}=this;for(let r=0;r<e;r++)for(let e=0;e<n;e++)t[5*r+e]=s[r*n+e];return{kernelRows:e,kernelCols:n,kernel:t,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],rn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:sn,json:{write:!0,name:"rasterFunctionArguments"}})],rn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],rn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],rn.prototype,"_normalizedKernel",null),rn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ConvolutionFunction")],rn);const on=rn;var an;const un=new Ot.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let ln=an=class extends p{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return un.fromJSON(e.type??e.curvatureType??0)}clone(){return new an({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Xt.e)(un)],ln.prototype,"curvatureType",void 0),(0,i.Cg)([(0,de.w)("curvatureType",["type","curvatureType"])],ln.prototype,"readCurvatureType",null),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ln.prototype,"zFactor",void 0),ln=an=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.CurvatureFunctionArguments")],ln);const cn=ln;let pn=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,curvatureType:s}=this.functionArguments,{extent:r,primaryPixelSizes:o}=t,i=o?.[0],a=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),u=this.isGCS&&n>=1?n*Zt.rk:n;return(0,Zt.E0)(e,{zFactor:u,curvatureType:s,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*Zt.rk:t}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],pn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:cn,json:{write:!0,name:"rasterFunctionArguments"}})],pn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],pn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],pn.prototype,"isGCS",void 0),pn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.CurvatureFunction")],pn);const hn=pn;var mn;let fn=mn=class extends p{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new mn({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fn.prototype,"bandIds",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fn.prototype,"bandNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fn.prototype,"bandWavelengths",void 0),(0,i.Cg)([(0,Xt.e)({0:"name",1:"wavelength",2:"id"})],fn.prototype,"method",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fn.prototype,"missingBandAction",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fn.prototype,"wavelengthMatchTolerance",void 0),fn=mn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")],fn);const gn=fn;let dn=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,n=e[0],{method:s,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,u=r?.length&&("name"===s||"id"!==s&&!i?.length),l=o?.length&&("wavelength"===s||"id"!==s&&!i?.length),c=1===a,p=u?function(t,e){const n=t.bandInfos.map(({name:t})=>t.toLowerCase()),s=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=n.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=n.findIndex(t=>t.startsWith("nearinfrared_1")),-1===o&&(o=n.findIndex(t=>t.startsWith("nearinfrared")))),-1===o)return null;s.push(o)}return s}(n,r):l?function(t,e,{wavelengthMatchTolerance:n},s){const{bandInfos:r}=t,o=[];for(let t=0;t<r.length;t++){const{minWavelength:e,maxWavelength:n}=r[t];if(!e||!n)return null;o.push({minWavelength:e,maxWavelength:n})}const i=[];for(let t=0;t<e.length;t++){const r=e[t];let a=!1,u=-1,l=Number.MAX_VALUE;for(let t=0;t<o.length;t++){const e=o[t],n=r>=e.minWavelength&&r<=e.maxWavelength,s=Math.abs(r-(e.minWavelength+e.maxWavelength)/2);n?s<l&&(a=!0,u=t,l=s):!a&&s<l&&(u=t,l=s)}if(!a&&n&&l<n&&(a=!0),!a&&s)return null;i.push(u)}return i}(n,o,this.functionArguments,c):function(t,e,n){const{bandCount:s}=t;return!e?.length||n&&e.some(t=>t<0||t>=s)?null:e}(n,i,c);if(null==p)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${u?"band names":l?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=p,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const h=n.clone();h.pixelType=this.outputPixelType,h.bandCount=p.length;const{statistics:m,histograms:f}=h;null!=m&&m.length&&(h.statistics=p.map(t=>m[t]||m[m.length-1])),null!=f&&f.length&&(h.histograms=p.map(t=>f[t]||f[f.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{const{statistics:e,histograms:n}=t;null!=e&&e.length&&(t.statistics=p.map(t=>e[t]||e[e.length-1])),null!=n&&n.length&&(t.histograms=p.map(t=>n[t]||n[n.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=p.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;n=n.map(e=>t.indexOf(e))}else{const t=e.pixels.length;n=n.map(e=>e>=t?t-1:e)}return e.extractBands(n)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:Ht(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){const e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],dn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:gn,json:{write:!0,name:"rasterFunctionArguments"}})],dn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],dn.prototype,"rasterArgumentNames",void 0),dn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ExtractBandFunction")],dn);const yn=dn;var xn;let wn=xn=class extends p{clone(){return new xn({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],wn.prototype,"conversionParameters",void 0),wn=xn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.GrayscaleFunctionArguments")],wn);const An=wn;let vn=class extends w{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const n=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:n}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,n){const{pixels:s,width:r,height:o,mask:i,bandMasks:a}=t,l=r*o,c=a?.length?g.A.combineBandMasks(a):i,p=Math.min(e.length,s.length),h=n.startsWith("f"),m=!h&&n!==t.pixelType,[f,d]=(0,u.hP)(n),y=g.A.createEmptyBand(n,l);for(let t=0;t<o;t++){let n=t*r;for(let t=0;t<r;t++,n++)if(!c||c[n]){let t=0;for(let r=0;r<p;r++)t+=e[r]*s[r][n];h||(t=Math.round(t),m&&(t=t>d?d:t<f?f:t)),y[n]=t}}const x=new g.A({width:r,height:o,pixels:[y],pixelType:n,mask:c});return x.updateStatistics(),x}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],vn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:An,json:{write:!0,name:"rasterFunctionArguments"}})],vn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],vn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],vn.prototype,"_normalizedWeights",null),vn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.GrayscaleFunction")],vn);const bn=vn;var Cn;const Mn=new Ot.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Pn=new Ot.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Tn=Cn=class extends p{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Cn({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Tn.prototype,"altitude",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Tn.prototype,"azimuth",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Xt.e)(Mn)],Tn.prototype,"hillshadeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Tn.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Tn.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Xt.e)(Pn)],Tn.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Tn.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Tn.prototype,"removeEdgeEffect",void 0),Tn=Cn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.HillshadeFunctionArguments")],Tn);const Rn=Tn;let Nn=class extends w{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e)return null;const{extent:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}),i=(0,Zt.PP)(this.functionArguments,o,this.isGCS),a=(0,Zt.fw)(e,i);return a.pixelType=this.outputPixelType,a}_getWebGLParameters(){const t=(0,Zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,Zt.ng)(t),{slopeType:n,zFactor:s,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===n,a=(0,u.zw)(this.outputPixelType);return{...e,zFactor:s,gcsFactor:this.isGCS?Zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,isOutputRounded:a}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Rn,json:{write:!0,name:"rasterFunctionArguments"}})],Nn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Nn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Nn.prototype,"isGCS",void 0),Nn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.HillshadeFunction")],Nn);const Fn=Nn;var kn;let In=kn=class extends p{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new kn({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],In.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],In.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],In.prototype,"writeRasters",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],In.prototype,"processAsMultiband",void 0),In=kn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.LocalFunctionArguments")],In);const Sn=In;let _n=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{processAsMultiband:s}=this.functionArguments;if(t.some(t=>t.bandCount!==n))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=R[r];if(!(999===i||o.length===i||o.length<=1&&1===i))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};const a=e.clone();return a.bandCount=999!==i||s?n:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&i<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:kt(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=R[t],n=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",s=this.outputPixelType??"f32";let[r,o]=(0,u.hP)(s);const i=(0,u.zw)(s);return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:n,domainRange:[r,o],isOutputRounded:i}}_updateStatistics(t){const e=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,s=T(n)?.domain;if(s){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:s[0],max:s[1],avg:(s[0]+s[1])/2,stddev:(s[0]+s[1])/10}}else 45===n&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null!=t.avg?-t.avg:void 0,stddev:null!=t.stddev?-t.stddev:void 0})))}_updatePixelType(t){const{statistics:e,pixelType:n}=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,{domain:r,isInteger:o}=T(s)??{domain:null,isInteger:!1};let i="f32";if(r&&o)i=(0,u.X1)(r[0],r[1]);else if(30===s){const t=e?.[0];i=t?(0,u.X1)(t.min,t.max):(0,u.zw)(n)?n:"s32"}else if(45===s&&(0,u.zw)(n)){const t=e?.map(({max:t})=>-t),s=e?.map(({min:t})=>-t),r=t?.length?Math.min(...t):null,o=s?.length?Math.min(...s):null;i=null!=r&&null!=o?(0,u.X1)(r,o):n.startsWith("s")?n.replace("s","u"):"u1"===n||"u2"===n||"u4"===n?"s8":"u8"===n?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_n.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Sn,json:{write:!0,name:"rasterFunctionArguments"}})],_n.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],_n.prototype,"rasterArgumentNames",void 0),_n=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.LocalFunction")],_n);const Bn=_n;var jn,Zn=n(34727);let Gn=jn=class extends p{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const n=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||n.length>0,0===n.length?null:n}return null});return e?n:null}clone(){return new jn({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gn.prototype,"includedRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gn.prototype,"noDataValues",void 0),(0,i.Cg)([(0,a.MZ)()],Gn.prototype,"normalizedNoDataValues",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gn.prototype,"noDataInterpretation",void 0),Gn=jn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.MaskFunctionArguments")],Gn);const zn=Gn;let On=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:n,normalizedNoDataValues:s}=this.functionArguments;if(!n?.length&&!s?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let o=0;o<t.bandCount;o++){const t=(0,Wt.Wt)(e,n?.slice(2*o,2*o+2),s?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=s&&s.every(t=>t?.length===s[0]?.length);return{success:!0,supportsGPU:(!n||n.length<=2*Wt.et)&&(!s||o&&s[0].length<=Wt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:n,lookups:s}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments;return(0,Wt.dK)(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:1===o,lookups:s})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array(Wt.et);n.fill(Zn.pq),e?.[0]?.length&&n.set(e[0]);const s=new Float32Array(6);for(let e=0;e<s.length;e+=2)s[e]=t?.[e]??-Zn.pq,s[e+1]=t?.[e+1]??Zn.pq;return t?.length&&s.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:s}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],On.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:zn,json:{write:!0,name:"rasterFunctionArguments"}})],On.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],On.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],On.prototype,"lookups",void 0),On=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.MaskFunction")],On);const En=On;var Dn;let Vn=Dn=class extends p{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this;return new Dn({visibleBandID:t,infraredBandID:e,scientificOutput:n})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Vn.prototype,"visibleBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Vn.prototype,"infraredBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Vn.prototype,"scientificOutput",void 0),Vn=Dn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.NDVIFunctionArguments")],Vn);const Un=Vn;let Ln=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:n}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const s=this.sourceRasterInfos[0],r=Math.max(e,n);if(s.bandCount<2||r>=s.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||n<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};const o=s.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),o.bandCount=1,o.keyProperties={...o.keyProperties,BandProperties:void 0};const[i,a,u,l]=t?[-1,1,0,.1]:[0,200,100,10];return o.statistics=[{min:i,max:a,avg:u,stddev:l}],this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:n,infraredBandID:s,scientificOutput:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;s=t.indexOf(s),n=t.indexOf(n)}return function(t,e,n,s){const{mask:r,pixels:o,width:i,height:a}=t,u=o[n],l=o[e],c=l.length,p=s?new Uint8Array(c):new Float32Array(c),h=s?100:1,m=s?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=u[t],n=l[t],s=e+n;s&&(p[t]=(e-n)/s*h+m)}const f=new g.A({width:i,height:a,mask:r,pixelType:s?"u8":"f32",pixels:[p]});return f.updateStatistics(),f}(e,n,s,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this.functionArguments;return{bandIndexMat3:Ht(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!n}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments;return[n,e,0].map(e=>t[e])}_swizzleBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments,s=[e,n].map(e=>t.indexOf(e));return s[2]=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ln.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Un,json:{write:!0,name:"rasterFunctionArguments"}})],Ln.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ln.prototype,"rasterArgumentNames",void 0),Ln=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.NDVIFunction")],Ln);const Wn=Ln;var $n;let Kn=$n=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new $n({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"inputRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"outputValues",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"noDataRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"allowUnmatched",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"replacementValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Kn.prototype,"isLastInputRangeInclusive",void 0),Kn=$n=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.RemapFunctionArguments")],Kn);const Hn=Kn;let qn=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;const{statistics:n}=t;this._removeStatsHistColormapVAT(t);const{allowUnmatched:s,replacementValue:r,outputValues:o,inputRanges:i,noDataRanges:a,isLastInputRangeInclusive:l}=this.functionArguments,c="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),o?.length){const i=n?.[0];if(s&&null==r){let e=i?.min??o[0],n=i?.max??o[0];e=Math.min.apply(null,[...o,e]),n=Math.max.apply(null,[...o,n]),t.statistics=[{min:e,max:n,avg:i?.avg??0,stddev:i?.stddev??-1}]}else{let e=o[0],n=e;for(let t=0;t<o.length;t++)e=e>o[t]?o[t]:e,n=n>o[t]?n:o[t];s&&null!=r&&(e=Math.min(e,r),n=Math.max(n,r)),t.statistics=[{min:e,max:n,avg:i?.avg??0,stddev:i?.stddev??-1}]}if(c){const{min:n,max:i}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],l=a.find(t=>{const[e,s]=(0,u.hP)(t);return n>=e&&i<=s})??"f64";o.some(t=>Math.floor(t)!==t)?this.outputPixelType="f64"===l?"f64":"f32":this.outputPixelType=s&&null==r&&a.indexOf(e)>a.indexOf(l)?e:l}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=s?null:(0,Wt.XU)({srcPixelType:e,inputRanges:i,outputValues:o,noDataRanges:a,allowUnmatched:s,isLastInputRangeInclusive:l,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!o||o.length<=Wt.et)&&(!a||a.length<=Wt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:n,outputPixelType:s}=this;if(n){const t=(0,Wt.eH)(e,{lut:[n.lut],offset:n.offset,outputPixelType:s});return null!=t&&n.mask&&(t.mask=(0,Wt.UK)(e.pixels[0],e.mask,n.mask,n.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l}=this.functionArguments;return(0,Wt.Ew)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:s,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:n}=this.functionArguments,s=this.functionArguments.inputRanges??[],r=this.functionArguments.outputValues??[],o=(0,Wt.bL)(s,r,n),i=new Float32Array(2*Wt.et);return i.fill(Zn.pq),e?.length&&i.set(e),{allowUnmatched:t,rangeMaps:o,noDataRanges:i,clampRange:(0,u.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],qn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Hn,json:{write:!0,name:"rasterFunctionArguments"}})],qn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],qn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],qn.prototype,"lookup",void 0),qn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.RemapFunction")],qn);const Jn=qn;var Xn;let Yn=Xn=class extends Rn{readColorRamp(t){if("string"==typeof t){const e=fe.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,fe.M5)(fe.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Xn({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Yn.prototype,"colorRamp",void 0),(0,i.Cg)([(0,de.w)("colorRamp")],Yn.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Yn.prototype,"colormap",void 0),Yn=Xn=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ShadedReliefFunctionArguments")],Yn);const Qn=Yn;let ts=class extends w{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:n}=this.functionArguments;if(!e&&!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");const s=t.clone();this._removeStatsHistColormapVAT(s),s.pixelType=this.outputPixelType,s.bandCount=3,s.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=s,this.isGCS=s.spatialReference?.isGeographic??!1,n?.length||(n=(0,fe.R8)(e,{interpolateAlpha:!0}));const{indexedColormap:r,offset:o}=(0,Wt.zg)({colormap:n});if(!r?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};const i=(0,fe.S2)(r);return this.lookup={indexedColormap:r,offset:o,hsvMap:i},{success:!0,supportsGPU:(0,Ne.WN)(r)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let n=t.primaryPixelSizes?.[0];if(null==n){const{extent:s}=t;n=s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}}const s=(0,Zt.PP)(this.functionArguments,n,this.isGCS),r=(0,Zt.fw)(e,s),o=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,Zt.SC)(r,e,this.lookup.hsvMap,o),r.pixelType=this.outputPixelType,r}_getWebGLParameters(){const t=(0,Zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,Zt.ng)(t),{slopeType:n,zFactor:s,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===n,{indexedColormap:a,offset:l}=this.lookup,c=this.sourceRasterInfos[0].statistics?.[0],p=(0,u.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:l,zFactor:s,gcsFactor:this.isGCS?Zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,minValue:c?.min??0,maxValue:c?.max??8e3,isOutputRounded:p}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ts.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Qn,json:{write:!0,name:"rasterFunctionArguments"}})],ts.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ts.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ts.prototype,"isGCS",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ts.prototype,"lookup",void 0),ts=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.ShadedReliefFunction")],ts);const es=ts;var ns;const ss=new Ot.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let rs=ns=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new ns({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,Xt.e)(ss)],rs.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],rs.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],rs.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],rs.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],rs.prototype,"removeEdgeEffect",void 0),rs=ns=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.SlopeFunctionArguments")],rs);const os=rs;let is=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o}=this.functionArguments,{isGCS:i}=this,{extent:a,primaryPixelSizes:u}=t,l=u?.[0],c=l??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,Zt.yy)(e,{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:n,pixelSizePower:s}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*Zt.rk:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:s??0,isOutputRounded:(0,u.zw)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],is.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:os,json:{write:!0,name:"rasterFunctionArguments"}})],is.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],is.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],is.prototype,"isGCS",void 0),is=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.SlopeFunction")],is);const as=is,us=new Ot.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function ls(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{statisticsType:u,kernelRows:l,kernelCols:c}=e,p="stddev"===u,h=r*o,m=new Float64Array(h),f=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<o;t++){const e=t*r;let n=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(n+=s[e+t],p&&(o+=s[e+t]**2),a++);m[e]=n,f[e]=o,g[e]=a;for(let t=1;t<=r-c;t++){const r=e+t-1,u=r+c;i?(i[r]&&(a--,n-=s[r],p&&(o-=s[r]**2)),i[u]&&(a++,n+=s[u],p&&(o+=s[u]**2))):(n-=s[r],n+=s[u],p&&(o-=s[r]**2,o+=s[u]**2)),m[e+t]=n,g[e+t]=a,p&&(f[e+t]=o)}}const d=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=l*r;for(let t=0;t<=r-c;t++){let e=0,n=0,s=0;for(let o=0;o<l;o++){const i=o*r+t;e+=m[i],s+=g[i],p&&(n+=f[i])}d[t]=e,y[t]=n,x[t]=s;for(let i=1;i<=o-l;i++){const o=(i-1)*r+t,a=o+w;e-=m[o],e+=m[a],s-=g[o],s+=g[a],p&&(n-=f[o],n+=f[a]),d[i*r+t]=e,y[i*r+t]=n,x[i*r+t]=s}}const A=Math.floor(l/2),v=Math.floor(c/2);for(let t=A;t<o-A;t++){const e=t*r;for(let s=v;s<r-v;s++){const o=(t-A)*r+s-v,u=x[o];if(0===u||n&&(!i||i[e+s]))continue;const l=d[o]/u,c=p?Math.sqrt((y[o]-d[o]*l)/u):l;a[e+s]=c,i&&(i[e+s]=255)}}}function cs(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l,statisticsType:c}=e,p=Math.floor(u/2),h=Math.floor(l/2),m="min"===c,f=a.slice(),g=new Uint32Array(r*o);for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++){let n=m?Number.MAX_VALUE:-Number.MAX_VALUE,o=0;for(let a=0;a<u;a++)for(let u=0;u<l;u++){const l=e+t+(a-p)*r+u-h;i&&!i[l]||(n=m?Math.min(n,s[l]):Math.max(n,s[l]),o++)}i?(f[e+t]=0===o?0:n,g[e+t]=o):a[e+t]=0===o?0:n}}if(i)for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++)if(g[e+t]){if(n&&i[e+t])continue;a[e+t]=f[e+t],i[e+t]=255}}}function ps(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h=a.slice(),m=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i?.[e+t])continue;const o=[];for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;i&&!i[u]||o.push(s[u])}o.length&&(o.sort((t,e)=>t-e),i?(h[e+t]=o[Math.floor((o.length-1)/2)],m[e+t]=o.length):a[e+t]=o[Math.floor((o.length-1)/2)])}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(m[e+t]){if(n&&i[e+t])continue;a[e+t]=h[e+t],i[e+t]=255}}}function hs(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h="majority"===e.statisticsType,m=u*l,f=a.slice(),g=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i?.[e+t])continue;const o=new Map;for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;if(i&&!i[u])continue;const l=s[u];o.set(l,o.has(l)?o.get(l)+1:1)}if(0===o.size)continue;let d=0,y=0,x=h?0:m+1;for(const t of o.keys())y=o.get(t),h===y>x&&(x=y,d=t);i?(f[e+t]=d,g[e+t]=o.size):a[e+t]=d}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(g[e+t]){if(n&&i[e+t])continue;a[e+t]=f[e+t],i[e+t]=255}}}var ms;let fs=ms=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new ms({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],fs.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],fs.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],fs.prototype,"fillNoDataOnly",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>us.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Xt.e)(us)],fs.prototype,"statisticsType",void 0),fs=ms=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StatisticsFunctionArguments")],fs);const gs=fs;let ds=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();n.pixelType=this.outputPixelType;const{statisticsType:s}=this.functionArguments;return"stddev"===s&&this._removeStatsHistColormapVAT(n),this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:n,rows:s,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:n}=t,{fillNoDataOnly:s}=e;if(s&&!n)return t;const{pixels:r,width:o,height:i,bandMasks:a,pixelType:u}=t,l=r.length,c=o*i,p=[],{kernelRows:h,kernelCols:m,statisticsType:f,mirrorEdges:d}=e;if(s&&!n)return t;const y=e.outputPixelType??u,x=[];for(let t=0;t<l;t++){const u=r[t],l=g.A.createEmptyBand(y,c);s&&l.set(u);const w=a?.[t]??n,A=w?.slice()??null,v={band:u,width:o,height:i,mask:A,outBand:l};switch(f){case"min":case"max":cs(v,e);break;case"mean":case"stddev":ls(v,e);break;case"median":ps(v,e);break;case"majority":case"minority":hs(v,e)}d&&!s&&Xe(l,o,i,h,m),p.push(l),A&&x.push(A)}let w=x[0]??n;x.length!==l&&(x.length=0),l>1&&a?.length&&(w=g.A.combineBandMasks(a));const A=new g.A({pixelType:y,width:o,height:i,pixels:p,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(e,{kernelRows:s,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:n,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:n,fillNoDataOnly:s}=this.functionArguments;return{fillNoDataOnly:s,kernelRows:t,kernelCols:e,statisticsType:n,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ds.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],ds.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ds.prototype,"rasterArgumentNames",void 0),ds=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StatisticsFunction")],ds);const ys=ds;var xs;let ws=xs=class extends p{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const n=[];return t.forEach(t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};n.push(e)}),n}writeStatistics(t,e,n){if(!t?.length)return;const s=[];t.forEach(t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,s.push(e)}),e[n]=s}clone(){return new xs({statistics:(0,o.o8)(this.statistics),histograms:(0,o.o8)(this.histograms)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ws.prototype,"statistics",void 0),(0,i.Cg)([(0,de.w)("statistics")],ws.prototype,"readStatistics",null),(0,i.Cg)([(0,Se.K)("statistics")],ws.prototype,"writeStatistics",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ws.prototype,"histograms",void 0),ws=xs=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")],ws);const As=ws;let vs=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:n,histograms:s}=this.functionArguments;return s&&(e.histograms=s),n&&(e.statistics=n),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],vs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:As,json:{write:!0,name:"rasterFunctionArguments"}})],vs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],vs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],vs.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],vs.prototype,"isNoopProcess",void 0),vs=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")],vs);const bs=vs;var Cs;const Ms=new Ot.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let Ps=Cs=class extends p{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,n){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[n]=t)}clone(){return new Cs({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,o.o8)(this.statistics),gamma:(0,o.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,o.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ps.prototype,"computeGamma",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],Ps.prototype,"dynamicRangeAdjustment",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],Ps.prototype,"gamma",void 0),(0,i.Cg)([(0,a.MZ)()],Ps.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ps.prototype,"maxPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ps.prototype,"minPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ps.prototype,"numberOfStandardDeviations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],Ps.prototype,"outputMax",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],Ps.prototype,"outputMin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ps.prototype,"sigmoidStrengthLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],Ps.prototype,"statistics",void 0),(0,i.Cg)([(0,Se.K)("statistics")],Ps.prototype,"writeStatistics",null),(0,i.Cg)([(0,Xt.e)(Ms)],Ps.prototype,"stretchType",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ps.prototype,"useGamma",void 0),Ps=Cs=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StretchFunctionArguments")],Ps);const Ts=Ps;let Rs=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:n}=this,{dynamicRangeAdjustment:s,gamma:r,useGamma:o}=n;if(!s&&["u8","u16","s8","s16"].includes(e)){const s=(0,He.DP)(n.toJSON(),{rasterInfo:t}),i=(0,u.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,He.RP)({pixelType:e,...s,gamma:o?r:null,rounding:i}),this.cutOffs=s}else s||(this.cutOffs=(0,He.DP)(n.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),"u8"===this.outputPixelType&&(i.keyProperties.DataType="processed");const{outputMin:a=0,outputMax:l=255}=this.functionArguments;i.statistics=[];for(let t=0;t<i.bandCount;t++)i.statistics[t]={min:a,max:l};return this.rasterInfo=i,{success:!0,supportsGPU:!s}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{lookup:n}=this;if(n)return(0,Wt.eH)(e,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:s}=this,r=this.cutOffs||(0,He.DP)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:e}),o=s.useGamma?s.gamma:null;return(0,He._N)(e,{...r,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:n,useGamma:s}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=s&&n?.length?(0,He.Nh)(r,n):[1,1,1],{minCutOff:i,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===i.length&&(i[1]=i[2]=i[0],a[1]=a[2]=a[0]);const l=a.map((n,s)=>(e-t)/(a[s]-i[s])),c=(0,u.zw)(this.outputPixelType),p=s&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],h=s?[o[0],o[1]??o[0],o[2]??o[0]]:[1,1,1];return{bandCount:r,minOutput:t,maxOutput:e,minCutOff:i,maxCutOff:a,factor:l,useGamma:s,gamma:p,gammaCorrection:h,stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ts,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"lookup",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"cutOffs",void 0),Rs=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.StretchFunction")],Rs);const Ns=Rs;var Fs;let ks=Fs=class extends p{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new Fs({attributeTableAsRecordSet:(0,o.o8)(this.attributeTableAsRecordSet)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"attributeTableAsRecordSet",void 0),ks=Fs=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.TableFunctionArguments")],ks);const Is=ks;let Ss=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const n=t.clone();return n.pixelType=this.outputPixelType,n.bandCount=1,"thematic"!==n.dataType&&(n.keyProperties=n.keyProperties?{...n.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=n,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ss.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Is,json:{write:!0,name:"rasterFunctionArguments"}})],Ss.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ss.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],Ss.prototype,"isNoopProcess",void 0),Ss=(0,i.Cg)([(0,a.$K)("esri.layers.support.rasterFunctions.TableFunction")],Ss);const _s=Ss,Bs=new Map;function js(t,e){const{rasterFunctionArguments:n}=t;n&&(n.rasters||[n.raster,n.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&js(t,e))})}function Zs(t,e){e=e??{};try{if("function"in(t=(0,o.o8)(t))&&"arguments"in t&&t.arguments){const n=Us(t,new Map,e);if(Ws(n),!n.renderingRule)throw new r.A("raster-function-helper","Unsupported raster function json.");t=n.renderingRule}if("rasterFunction"in t){const n=Os(t=zs(t),e);return n.isRoot=!0,n}}catch{}throw new r.A("raster-function-helper","unsupported raster function json.")}function Gs(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function zs(t){const{rasterFunction:e,rasterFunctionArguments:n}=t,s={};for(const t in n){let e=n[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))s.rasters=e.map(t=>Gs(t)?zs(t):t);else switch(Gs(e)&&(e=zs(e)),r){case"dra":s.dra=e;break;case"pspower":s.psPower=e;break;case"pszfactor":s.psZFactor=e;break;case"bandids":s.bandIds=e;break;default:s[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||s.rasters?.length||(s.rasters=["$$"]),{...t,rasterFunctionArguments:s}}function Os(t,e){const{rasterFunction:n,rasterFunctionArguments:s}=t,o=t.outputPixelType?.toLowerCase();if(null==n||!Bs.has(n))throw new r.A("raster-function-helper",`unsupported raster function: ${n}`);const i=Bs.get(n),a=("function"==typeof i.ctor?i.ctor:i.ctor.default).fromJSON({...t,outputPixelType:o}),{rasterArgumentNames:u}=a,l=[],c=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(s,u),p="rasters"===u[0]||u.length>1,h=[];for(let t=0;t<c.length;t++){const n=c[t];let s;null==n||"string"==typeof n&&n.startsWith("$")?l.push(e?.raster):"string"==typeof n?e[n]&&l.push(e[n]):"number"!=typeof n&&"rasterFunction"in n&&(s=Os(n,e),p||(a.functionArguments[u[t]]=s),l.push(s)),p&&h.push(s??n)}if(p&&("rasters"===u[0]?a.functionArguments.rasters=h:u.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=l;const t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Es(t,e){if(t&&e)for(const n in t){const s=t[n];s&&"object"==typeof s&&"type"in s&&("RasterFunctionTemplate"===s.type?Es(s.arguments,e):"RasterFunctionVariable"===s.type&&null!=e[s.name]&&(s.value=e[s.name]))}}function Ds(t,e){if(!t||"object"!=typeof t)return t;const{value:n}=t;if(!n||"object"!=typeof n)return t.isDataset?"$$":n;if(Array.isArray(n))return 0===n.length?[]:n.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Ds(t,e):t);if("value"in n&&["number","string","boolean"].includes(typeof n.value))return n.value;if(t.isDataset&&"Scalar"!==n.type)return"$$";if(!("type"in n))return n;let s=n;switch(n.type){case"Scalar":s=n.value;break;case"AlgorithmicColorRamp":s=Vs(n);break;case"MultiPartColorRamp":s={type:"multipart",colorRamps:n.ArrayOfColorRamp.map(Vs)};break;case"ArgumentArray":if(n.elements?.length&&"RasterStatistics"!==n.elements[0].type){const t=[];for(let s=0;s<n.elements.length;s++){const o=n.elements[s],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:n}=Us(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}else{if("RasterFunctionVariable"!==i)throw new r.A("raster-function-helper","unsupported raster function json.");{const n=Ds(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}}else t.push(o)}s=t}else s=n.elements}return null!=n._object_id&&e.set(n._object_id,s),s}function Vs(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:n,ToColor:r}=t;if(!Array.isArray(n)){const{r:t,g:e,b:r}=(0,s.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,r,n.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:n}=(0,s.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,n,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:n,toColor:r}}function Us(t,e,n){n&&Es(t,n);const s={renderingRule:{},templates:e};return Ls(t,s),s}function Ls(t,e){if(!t||!e.renderingRule)return;const{renderingRule:n,templates:s}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&s.set(i,n),n.rasterFunction=r.type.replace("Function",""),n.outputPixelType=r.pixelType;const a={};n.rasterFunctionArguments=a;for(const t in o){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;const e=o[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=Ds(e,s):(n.rasterFunctionArguments[t]={},Ls(e,{renderingRule:n.rasterFunctionArguments[t],templates:s})),null!=e._object_id&&s.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),n.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Ws(t){const{renderingRule:e,templates:n}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!n.size)return;const{rasterFunctionArguments:s}=e;for(const t in s){const e=s[t],o="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=o){if(!n.has(o))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=n.get(o);"_object_ref_id"!==t?s[t]=e:e&&"object"==typeof e&&Object.assign(s,e);continue}e&&"object"==typeof e&&(e.rasterFunctionArguments&&Ws({renderingRule:e,templates:n}),Array.isArray(e)&&e.forEach((t,s)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!n.has(t._object_ref_id))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);const i=n.get(o);i&&"object"==typeof i?Object.assign(t,i):e[s]=i}else Ws({renderingRule:t,templates:n})}))}}Bs.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),Bs.set("Aspect",{desc:"Aspect Function",ctor:zt,rasterArgumentNames:["raster"]}),Bs.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:ne,rasterArgumentNames:["raster"]}),Bs.set("Colormap",{desc:"Colormap Function",ctor:Ce,rasterArgumentNames:["raster"]}),Bs.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:ke,rasterArgumentNames:["raster"]}),Bs.set("CompositeBand",{desc:"CompositeBand Function",ctor:Ze,rasterArgumentNames:["rasters"]}),Bs.set("ComputeChange",{desc:"ComputeChange Function",ctor:Le,rasterArgumentNames:["rasters"]}),Bs.set("Convolution",{desc:"Convolution Function",ctor:on,rasterArgumentNames:["raster"]}),Bs.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Je,rasterArgumentNames:["raster"]}),Bs.set("ExtractBand",{desc:"ExtractBand Function",ctor:yn,rasterArgumentNames:["raster"]}),Bs.set("Curvature",{desc:"Curvature Function",ctor:hn,rasterArgumentNames:["raster"]}),Bs.set("Hillshade",{desc:"Hillshade Function",ctor:Fn,rasterArgumentNames:["raster"]}),Bs.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:es,rasterArgumentNames:["raster"]}),Bs.set("Grayscale",{desc:"Grayscale Function",ctor:bn,rasterArgumentNames:["raster"]}),Bs.set("Clip",{desc:"Clip Function",ctor:he,rasterArgumentNames:["raster"]}),Bs.set("Local",{desc:"Local Function",ctor:Bn,rasterArgumentNames:["rasters"]}),Bs.set("Mask",{desc:"Mask Function",ctor:En,rasterArgumentNames:["raster"]}),Bs.set("NDVI",{desc:"NDVI Function",ctor:Wn,rasterArgumentNames:["raster"]}),Bs.set("Remap",{desc:"Remap Function",ctor:Jn,rasterArgumentNames:["raster"]}),Bs.set("Slope",{desc:"Slope Function",ctor:as,rasterArgumentNames:["raster"]}),Bs.set("Statistics",{desc:"Focal Statistics Function",ctor:ys,rasterArgumentNames:["raster"]}),Bs.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:bs,rasterArgumentNames:["raster"]}),Bs.set("Stretch",{desc:"Stretch Function",ctor:Ns,rasterArgumentNames:["raster"]}),Bs.set("Table",{desc:"Attribute Table Function",ctor:_s,rasterArgumentNames:["raster"]})},70834:(t,e,n)=>{n.d(e,{DO:()=>L,FT:()=>E,Hh:()=>R,OM:()=>U,Ps:()=>H,Wo:()=>N,_I:()=>k,_l:()=>G,l0:()=>W,t$:()=>q,uk:()=>z});var s=n(4576),r=n(49186),o=n(74887),i=n(86211),a=n(5443),u=n(83290),l=n(86738),c=n(39829),p=n(91218),h=n(16930),m=n(21325);function f(){if(!T)throw new r.A("rasterprojectionhelper-project","projection operator is not loaded")}const g=(t,e,n,s=0)=>{if(1===n[0])return[0,0];let r=1,o=-1,i=1,a=-1;for(let e=0;e<t.length;e+=2)isNaN(t[e])||(r=r>t[e]?t[e]:r,o=o>t[e]?o:t[e],i=i>t[e+1]?t[e+1]:i,a=a>t[e+1]?a:t[e+1]);const{cols:u,rows:l}=e,c=(o-r)/u/n[0],p=(a-i)/l/n[1],h=2*s;let m=0,f=!1,g=[0,0];for(let e=0;e<u-3;e++){for(let n=0;n<l-3;n++){const s=e*l*2+2*n,r=(t[s]+t[s+4]+t[s+4*l]+t[s+4*l+4])/4,o=(t[s+1]+t[s+5]+t[s+4*l+1]+t[s+4*l+5])/4,i=Math.abs((r-t[s+2*l+2])/c),a=Math.abs((o-t[s+2*l+3])/p);if(i+a>m&&(m=i+a,g=[i,a]),h&&m>h){f=!0;break}}if(f)break}return g},d={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,x=4,w=x,A=new Map,v=new Map,b=500;let C,M,P,T=!1;async function R(){return C||(C=(0,o.Tw)(),M=await n.e(3276).then(n.bind(n,83276)),P=await n.e(2158).then(n.bind(n,12158)),M.isLoaded()||await M.load(),P.isLoaded()||await P.load(),T=!0,C.resolve()),C.promise}function N(t,e,n,s){const r=t.spatialReference;if(!r||!e||r.equals(e))return t;f();const o=n.center,u=new a.A({xmin:o.x-t.x/2,xmax:o.x+t.x/2,ymin:o.y-t.y/2,ymax:o.y+t.y/2,spatialReference:r}),l=M.execute(u,e,{geographicTransformation:s}),c=E(e);return null==l||null!=c&&l.width>=c?function(t,e,n){const s=(0,i.GA)(e)/(0,i.GA)(n);return{x:t.x*s,y:t.y*s}}(t,r,e):{x:l.width,y:l.height}}function F(t,e=.01){return(0,i.GA)(t)?e/(0,i.GA)(t):0}function k(t,e,n,s=!0){const r=t.spatialReference;if(r.equals(e))return t;f();const o=M.execute(t,e,{geographicTransformation:n});return s&&o?(I([t],[o],r,e),o):o}function I(t,e,n,s){const r=D(n,!0),o=D(s,!0),i=F(n,b),a=F(s,b);if(i&&null!=r&&null!=o)for(let n=0;n<t.length;n++){const s=e[n];if(!s)continue;const{x:u}=t[n],{x:l}=s;l>=o[1]-a&&Math.abs(u-r[0])<i?s.x-=o[1]-o[0]:l<=o[0]+a&&Math.abs(u-r[1])<i&&(s.x+=o[1]-o[0])}}function S(t){const{inSR:e,outSR:n,preferPE:s}=t;if(e.equals(n)){const{points:e}=Z(t,null);return e}if(e.isWebMercator&&n.isWGS84||e.isWGS84&&n.isWebMercator)return function(t){const{cols:e,rows:n,xres:s,yres:r,usePixelCenter:o,inSR:i,outSR:a}=t;let{xmin:u,ymax:c}=t;o&&(u+=s/2,c-=r/2);const h=[],m=[],f=Math.max(e,n);for(let t=0;t<f;t++){const o=u+s*Math.min(e,t),f=c-r*Math.min(n,t),g=(0,p.projectWithoutEngine)(new l.A({x:o,y:f,spatialReference:i}),i,a);t<=e&&h.push(g.x),t<=n&&m.push(g.y)}const g=[];for(let t=0;t<e;t++)for(let e=0;e<n;e++)g.push([h[t],m[e]]);return g}(t);if(s){if(e.isGeographic)return _(t);if(null!=B(e))return _(t)}return function(t){const{points:e}=Z(t,null),{inSR:n,outSR:s,datumTransformation:r}=t,o=e.map(t=>new l.A(t[0],t[1],n)),i=M.executeMany(o,s,{geographicTransformation:r});return r&&I(o,i,n,s),i.map(t=>t?[t.x,t.y]:[NaN,NaN])}(t)}function _(t){const{inSR:e,outSR:n,datumTransformation:s}=t,r=B(e),{points:o,mask:i}=Z(t,r);if(!e.isGeographic){const t=e.wkid?u.P.coordsys(e.wkid):u.P.fromString(e.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,e.wkt2||e.wkt);u.h.projToGeog(t,o.length,o)}if(null!=s&&s.steps.length){let t;const e=179.9955;if(n.isGeographic&&(t=o.map(([t])=>t>e?1:t<-e?-1:0)),s.steps.forEach(t=>{const e=t.wkid?u.P.geogtran(t.wkid):u.P.fromString(u.a.PE_TYPE_GEOGTRAN,t.wkt);u.j.geogToGeog(e,o.length,o,null,t.isInverse?u.a.PE_TRANSFORM_2_TO_1:u.a.PE_TRANSFORM_1_TO_2)}),t)for(let n=0;n<o.length;n++){const s=t[n],r=o[n][0],i=r>e?1:r<-e?-1:0;s&&i&&s!==i&&(o[n][0]=s>0?r+360:r-360)}}if(!n.isGeographic){const t=B(n,!0),e=null!=t&&t.isEnvelope?[t.bbox[1],t.bbox[3]]:[-90,90];!function(t,e){const[n,s]=e;for(let e=0;e<t.length;e++){const r=t[e][1];(r<n||r>s)&&(t[e]=[NaN,NaN])}}(o,e);const s=n.wkid?u.P.coordsys(n.wkid):u.P.fromString(n.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,n.wkt2||n.wkt);u.h.geogToProj(s,o.length,o)}let a=o;if(i&&o.length!==i.length){a=[];for(let t=0,e=0;t<i.length;t++)i[t]?a.push(o[e++]):a.push([NaN,NaN])}return a}function B(t,e=!1){let n=t.wkid||t.wkt2||t.wkt;if(!n||t.isGeographic)return null;if(n=String(n),A.has(n)){const t=A.get(n);return e?t?.gcs:t?.pcs}const s=t.wkid?u.P.coordsys(t.wkid):u.P.fromString(t.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt),r=j(s,F(t,1e-4)),o=j(s,0,!0);return A.set(n,{pcs:r,gcs:o}),e?o:r}function j(t,e=0,n=!1){const s=u.g.generate(t),r=n?t.horizonGcsGenerate():t.horizonPcsGenerate();if(!s||!r?.length)return null;let o=!1,i=r.find(t=>1===t.getInclusive()&&1===t.getKind());if(!i){if(i=r.find(t=>1===t.getInclusive()&&0===t.getKind()),!i)return null;o=!0}const a=n?0:(2===s.getNorthPoleLocation()?1:0)|(2===s.getSouthPoleLocation()?2:0),l=s.isPannableRectangle(),c=i.getCoord();if(o)return{isEnvelope:o,isPannable:l,vertices:c,coef:null,bbox:[c[0][0]-e,c[0][1]-e,c[1][0]+e,c[1][1]+e],poleLocation:a};let p=0;const h=[];let[m,f]=c[0],[g,d]=c[0];for(let t=0,e=c.length;t<e;t++){p++,p===e&&(p=0);const[n,s]=c[t],[r,o]=c[p];if(o===s)h.push([n,r,s,o,2]);else{const t=(r-n)/(o-s||1e-4),e=n-t*s;s<o?h.push([t,e,s,o,0]):h.push([t,e,o,s,1])}m=m<n?m:n,f=f<s?f:s,g=g>n?g:n,d=d>s?d:s}return{isEnvelope:!1,isPannable:l,vertices:c,coef:h,bbox:[m,f,g,d],poleLocation:a}}function Z(t,e){const n=[],{cols:s,rows:r,xres:o,yres:i,usePixelCenter:a}=t;let{xmin:u,ymax:l}=t;if(a&&(u+=o/2,l-=i/2),null==e){for(let t=0;t<s;t++)for(let e=0;e<r;e++)n.push([u+o*t,l-i*e]);return{points:n}}const c=new Uint8Array(s*r);if(e.isEnvelope){const{bbox:[t,a,p,h]}=e;for(let m=0,f=0;m<s;m++){const s=u+o*m,g=e.isPannable||s>=t&&s<=p;for(let t=0;t<r;t++,f++){const e=l-i*t;g&&e>=a&&e<=h&&(n.push([s,e]),c[f]=1)}}return{points:n,mask:c}}const p=e.coef,h=[];for(let t=0;t<r;t++){const e=l-i*t,n=[],s=[];for(let t=0;t<p.length;t++){const[r,o,i,a,u]=p[t];if(e===i&&i===a)n.push(r),n.push(o),s.push(2),s.push(2);else if(e>=i&&e<=a){const t=r*e+o;n.push(t),s.push(u)}}let r=n;if(n.length>2){let t=2===s[0]?0:s[0],e=n[0];r=[];for(let o=1;o<s.length;o++)2===s[o]&&o!==s.length-1||(s[o]!==t&&(r.push(0===t?Math.min(e,n[o-1]):Math.max(e,n[o-1])),t=s[o],e=n[o]),o===s.length-1&&r.push(0===s[o]?Math.min(e,n[o]):Math.max(e,n[o])));r.sort((t,e)=>t-e)}else n[0]>n[1]&&(r=[n[1],n[0]]);h.push(r)}for(let t=0,e=0;t<s;t++){const s=u+o*t;for(let t=0;t<r;t++,e++){const r=l-i*t,o=h[t];if(2===o.length)s>=o[0]&&s<=o[1]&&(n.push([s,r]),c[e]=1);else if(o.length>2){let t=!1;for(let e=0;e<o.length;e+=2)if(s>=o[e]&&s<=o[e+1]){t=!0;break}t&&(n.push([s,r]),c[e]=1)}}}return{points:n,mask:c}}function G(t,e,n=null,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;const i=U(t),u=E(o,!0),l=E(e);if(0===i||null==u||null==l){const s=O(t,e,n,r);if(s&&null==u&&null!=l&&Math.abs(s.width-l)<F(e)&&M.isLoaded()){const n=B(o);if(null!=n&&0===n.poleLocation&&t.width<(n.bbox[2]-n.bbox[0])/2)return function(t,e){const n=E(e);if(null==n)return null;let{xmin:s,ymin:r,xmax:o,ymax:i}=t;const u=t.spatialReference,l=new c.A({spatialReference:u,rings:[[[s,r],[o,r],[o,i],[s,i],[s,r]]]}),p=M.execute(l,e);if(2!==p.rings.length||!p.rings[0].length||!p.rings[1].length)return null;const{rings:h}=p,m=F(u),f=new a.A({spatialReference:e});for(let t=0;t<2;t++){s=o=h[t][0][0],r=i=h[t][0][1];for(let e=0;e<h[t].length;e++)s=s>h[t][e][0]?h[t][e][0]:s,o=o<h[t][e][0]?h[t][e][0]:o,r=r>h[t][e][1]?h[t][e][1]:r,i=i<h[t][e][1]?h[t][e][1]:i;if(0===t)f.ymin=r,f.ymax=i,f.xmin=s,f.xmax=o;else if(f.ymin=Math.min(f.ymin,r),f.ymax=Math.max(f.ymax,i),Math.abs(o-n/2)<m)f.xmin=s,f.xmax=f.xmax+n;else{if(!(Math.abs(s+n/2)<m))return null;f.xmax=o+n}}return f}(t,e)||s}return s}const p=t.clone().normalize();if(1===p.length&&t.xmax<u&&t.xmax-u/2>F(o)){const{xmin:e,xmax:n}=t;for(let s=0;s<=i;s++){const r=0===s?e:-u/2,l=s===i?n-u*s:u/2;p[s]=new a.A({xmin:r,xmax:l,ymin:t.ymin,ymax:t.ymax,spatialReference:o})}}const h=p.map(t=>O(t,e,n,r)).filter(s.Ru);return 0===h.length?null:function(t,e){const n=E(t[0].spatialReference);if(t.length<2||null==n)return t[0];if(e=e??F(t[0].spatialReference),1===(t=t.filter(t=>t.width>e)).length)return t[0];let{xmin:s,xmax:r,ymin:o,ymax:i}=t[0];for(let e=1;e<t.length;e++){const s=t[e];r=s.xmax+n*e,o=Math.min(o,s.ymin),i=Math.max(i,s.ymax)}return new a.A({xmin:s,xmax:r,ymin:o,ymax:i,spatialReference:t[0].spatialReference})}(h)}function z(t,e,n){if("extent"===t.type){const{xmin:e,ymin:n,xmax:s,ymax:r,spatialReference:o}=t;t=new c.A({rings:[[[e,r],[s,r],[s,n],[e,n],[e,r]]],spatialReference:o})}return t.spatialReference.equals(e)?t:(f(),M.execute(t,e,{geographicTransformation:n}))}function O(t,e,n,s=!0,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;f();const i=M.execute(t,e,{geographicTransformation:n});if(r&&e.isWebMercator&&i&&(i.ymax=Math.min(20037508.342787,i.ymax),i.ymin=Math.max(-20037508.342787,i.ymin),i.ymin>=i.ymax))return null;if(!s||!i)return i;const a=D(o,!0),u=D(e,!0);if(null==a||null==u)return i;const c=F(o,.001),p=F(o,b),h=F(e,.001);if(Math.abs(i.xmin-u[0])<h&&Math.abs(i.xmax-u[1])<h){const s=Math.abs(t.xmin-a[0]),r=Math.abs(a[1]-t.xmax);if(s<c&&r>p){i.xmin=u[0];const s=[];s.push(new l.A(t.xmax,t.ymin,o)),s.push(new l.A(t.xmax,(t.ymin+t.ymax)/2,o)),s.push(new l.A(t.xmax,t.ymax,o));const r=s.map(t=>k(t,e,n)).filter(t=>!isNaN(t?.x)).map(t=>t.x);i.xmax=Math.max.apply(null,r)}if(r<c&&s>p){i.xmax=u[1];const s=[];s.push(new l.A(t.xmin,t.ymin,o)),s.push(new l.A(t.xmin,(t.ymin+t.ymax)/2,o)),s.push(new l.A(t.xmin,t.ymax,o));const r=s.map(t=>k(t,e,n)).filter(t=>!isNaN(t?.x)).map(t=>t.x);i.xmin=Math.min.apply(null,r)}}else{const t=F(e,.001);Math.abs(i.xmin-u[0])<t&&(i.xmin=u[0]),Math.abs(i.xmax-u[1])<t&&(i.xmax=u[1])}return i}function E(t,e=!1){if(!t)return null;const n=e?20037508.342787:20037508.342788905;return t.isWebMercator?2*n:t.wkid&&t.isGeographic?360:2*d[t.wkid]||null}function D(t,e=!1){if(t.isGeographic)return[-180,180];const n=E(t,e);return null!=n?[-n/2,n/2]:null}function V(t,e,n,s){let r=(t-e)/n;return r-Math.floor(r)!==0?r=Math.floor(r):s&&(r-=1),r}function U(t,e=!1){const n=E(t.spatialReference);if(null==n)return 0;const s=e?0:-n/2,r=F(t.spatialReference),o=!e&&Math.abs(t.xmax-n/2)<r?n/2:t.xmax,i=!e&&Math.abs(t.xmin+n/2)<r?-n/2:t.xmin;return V(o,s,n,!0)-V(i,s,n,!1)}function L(t){const e=t.storageInfo.origin.x,n=E(t.spatialReference,!0);if(null==n)return{originX:e,halfWorldWidth:null,pyramidsInfo:null};const s=n/2,{nativePixelSize:r,storageInfo:o,extent:i}=t,{maximumPyramidLevel:a,blockWidth:u,pyramidScalingFactor:l}=o;let c=r.x;const p=[],h=null!=t.transform&&"gcs-shift"===t.transform.type,m=e+(h?0:s),f=h?n-e:s-e;for(let t=0;t<=a;t++){const t=(i.xmax-e)/c/u,n=t-Math.floor(t)===0?t:Math.ceil(t),s=f/c/u,r=s-Math.floor(s)===0?s:Math.ceil(s),o=Math.floor(m/c/u),a=Math.round(m/c)%u,h=(u-Math.round(f/c)%u)%u;p.push({resolutionX:c,blockWidth:u,datasetColumnCount:n,worldColumnCountFromOrigin:r,leftMargin:a,rightPadding:h,originColumnOffset:o}),c*=l}return{originX:e,halfWorldWidth:s,pyramidsInfo:p,hasGCSSShiftTransform:h}}function W(t){const e=t.isAdaptive&&null==t.spacing;let n=t.spacing||[y,y],s=$(t),r={cols:s.size[0]+1,rows:s.size[1]+1};const o=s.outofBoundPointCount>0&&s.outofBoundPointCount<s.offsets.length/2;let i=s.outofBoundPointCount===s.offsets.length/2||e&&o?[0,0]:g(s.offsets,r,n,w);const a=(i[0]+i[1])/2,l=t.projectedExtent.spatialReference,c=t.srcBufferExtent.spatialReference;if(e&&(o||a>w)&&(l.isGeographic||B(l),n=[x,x],s=$({...t,spacing:n}),r={cols:s.size[0]+1,rows:s.size[1]+1},i=g(s.offsets,r,n,w)),s.error=i,n[0]>1&&(s.coefficients=K(s.offsets,r,o)),t.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:n};else{const e=B(l);if(null!=e&&!e.isEnvelope){const e=function(t){if(!t||t.isGeographic)return t;const e=String(t.wkid||t.wkt2||t.wkt);let n;return v.has(e)?n=v.get(e):(n=(t.wkid?u.P.coordsys(t.wkid):u.P.fromString(u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt)).getGeogcs().getCode(),v.set(e,n)),new h.A({wkid:n})}(l),i=G(t.projectedExtent,e),{offsets:a}=$({...t,srcBufferExtent:i,spacing:n}),c=K(a,r,o);s.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return s}function $(t){const{projectedExtent:e,srcBufferExtent:n,pixelSize:s,datumTransformation:r,rasterTransform:o}=t,i=e.spatialReference,a=n.spatialReference;f();const{xmin:u,ymin:c,xmax:p,ymax:h}=e,m=E(a),g=null!=m&&(t.hasWrapAround||"gcs-shift"===o?.type),d=t.spacing||[y,y],w=d[0]*s.x,A=d[1]*s.y,v=1===d[0],C=Math.ceil((p-u)/w-.1/d[0])+(v?0:1),M=Math.ceil((h-c)/A-.1/d[1])+(v?0:1),P=S({cols:C,rows:M,xmin:u,ymax:h,xres:w,yres:A,inSR:i,outSR:a,datumTransformation:r,preferPE:d[0]<=x,usePixelCenter:v}),T=[];let R,N=0;const k=v?-1:NaN,{xmin:I,xmax:_,ymax:j,width:Z,height:G}=n,z=F(a,b),O=null!=m&&I>0&&_>m/2,D=B(i),V=null!=D&&D.poleLocation>0;for(let t=0;t<C;t++){const e=[];for(let n=0;n<M;n++){let s=P[t*M+n];if(g&&s[0]>_&&s[0]>m/2-z?s[0]-=m:g&&0===t&&s[0]<0&&O&&!o&&(s[0]+=m),!s||isNaN(s[0])||isNaN(s[1]))T.push(k),T.push(k),e.push(null),N++;else{if(o){const t=o.inverseTransform(new l.A({x:s[0],y:s[1],spatialReference:a}));s=[t.x,t.y]}e.push(s),t>0&&g&&R[n]&&s[0]<R[n][0]&&(s[0]+=m,V&&s[0]>_&&s[0]>m&&(s[0]-=m)),T.push((s[0]-I)/Z),T.push((j-s[1])/G)}}R=e}return{offsets:T,error:null,coefficients:null,outofBoundPointCount:N,spacing:d,size:v?[C,M]:[C-1,M-1]}}function K(t,e,n){const{cols:s,rows:r}=e,o=new Float32Array((s-1)*(r-1)*2*6),i=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let e=0;e<s-1;e++){for(let n=0;n<r-1;n++){let u=e*r*2+2*n;const l=t[u],c=t[u+1],p=t[u+2],h=t[u+3];u+=2*r;const m=t[u],f=t[u+1],g=t[u+2],d=t[u+3];let y=0,x=12*(n*(s-1)+e);for(let t=0;t<3;t++)o[x++]=i[y++]*l+i[y++]*p+i[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=i[y++]*c+i[y++]*h+i[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*l+a[y++]*m+a[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*c+a[y++]*f+a[y++]*d}if(n)for(let t=0;t<o.length;t++)isNaN(o[t])&&(o[t]=-1)}return o}function H(t){const{spatialReference:e}=t,n=(0,m.Vp)(e);if(!n)return t;const[s,r]=n.valid,o=r-s;let i=0;if(t.xmin<s){const e=s-t.xmin;i=Math.ceil(e/o)}else if(t.xmin>r){const e=t.xmin-r;i=-Math.ceil(e/o)}return new a.A({spatialReference:t.spatialReference,xmin:t.xmin+i*o,ymin:t.ymin,xmax:t.xmax+i*o,ymax:t.ymax})}function q(t,e,n){const{storageInfo:s,pixelSize:r}=e;let o=0,a=!1;const{pyramidResolutions:u}=s,c="mixed"===s.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,s.tileInfo.dpi/96)):1,p=(t.x+t.y)/2/c;if(null!=u&&u.length){const t=u[u.length-1],s=(t.x+t.y)/2,c=(r.x+r.y)/2;if(p<=c)o=0;else if(p>=s)o=u.length,a=p/s>8;else{let t,e=c;for(let s=1;s<=u.length;s++){if(t=(u[s-1].x+u[s-1].y)/2,p<=t){p===t?o=s:"down"===n?(o=s-1,a=p/e>8):o="up"===n||p-e>t-p||p/e>2?s:s-1;break}e=t}}const h=0===o?r:u[o-1];return a&&Math.min(h.x,h.y)*(0,i.GA)(e.spatialReference)>19567&&(a=!1),{pyramidLevel:o,pyramidResolution:new l.A({x:h.x,y:h.y,spatialReference:e.spatialReference}),excessiveReading:a}}const h=Math.log(t.x/r.x)/Math.LN2,m=Math.log(t.y/r.y)/Math.LN2,f=e.storageInfo.maximumPyramidLevel||0;o="down"===n?Math.floor(Math.min(h,m)):"up"===n?Math.ceil(Math.max(h,m)):Math.round((h+m)/2),o<0?o=0:o>f&&(a=o>f+3,o=f);const g=2**o;return{pyramidLevel:o,pyramidResolution:new l.A({x:g*e.nativePixelSize.x,y:g*e.nativePixelSize.y,spatialReference:e.spatialReference}),excessiveReading:a}}},77359:(t,e,n)=>{n.d(e,{$Q:()=>a,Sd:()=>u,b7:()=>l});var s=n(86211),r=n(5443),o=n(86738),i=n(14140);async function a(t,e,s){if("extent"===s.type)return function(t,e,n){const{width:s,height:r}=t,o=new Uint8Array(s*r),a=e.width/s,u=e.height/r;if(n.width/a<.5||n.height/u<.5)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});const{xmin:l,xmax:c,ymin:p,ymax:h}=e,{xmin:m,xmax:f,ymin:g,ymax:d}=n,y=Math.max(l,m),x=Math.min(c,f),w=Math.max(p,g),A=Math.min(h,d),v=.5*a,b=.5*u;if(x-y<v||A-w<b||x<l+v||y>c-v||w>h-b||A<p+b)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});const C=Math.max(0,(y-l)/a),M=Math.min(s,Math.max(0,(x-l)/a)),P=Math.max(0,(h-A)/u),T=Math.min(r,Math.max(0,(h-w)/u)),R=Math.round(C),N=Math.round(M)-1,F=Math.round(P),k=Math.round(T)-1;if(R===N&&C%1>.5&&M%1<.5||F===k&&P%1>.5&&T%1<.5)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});if(0===R&&0===F&&N===s&&k===r)return t;const I=t.mask;for(let t=F;t<=k;t++)for(let e=R;e<=N;e++){const n=t*s+e;o[n]=I?I[n]:255}return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]})}(t,e,s);const{width:r,height:o}=t,a=new Uint8Array(r*o);return(await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(807)]).then(n.bind(n,25275))).execute(e,s)?"polyline"===s.type?function(t,e,n){const{width:s,height:r}=t,o=new Uint8Array(s*r),a=e.width/s,u=e.height/r,{xmin:l,ymax:c}=e,{paths:p}=n,h=t.mask;for(let t=0;t<p.length;t++){const e=p[t];for(let t=0;t<e.length-1;t++){const[n,i]=e[t],[p,m]=e[t+1],f=Math.min(i,m),g=Math.max(i,m),d=Math.max(0,Math.floor((c-g)/u)),y=Math.min(r-1,Math.floor((c-f)/u));if(!(y<d))if(d===y){const t=Math.min(n,p),e=Math.max(n,p),r=Math.max(0,Math.floor((t-l)/a)),i=Math.min(s-1,Math.floor((e-l)/a));if(i<r)continue;const u=d*s;for(let t=u+r;t<=u+i;t++)o[t]=h?h[t]:255}else{const t=(n-l)/a,e=(p-n)/(m-i)/a,r=u*e;for(let n=d;n<=y;n++){const a=e*(c-n*u-i)+t,l=Math.max(0,Math.floor(r>0?a-r:a)),p=Math.min(s-1,Math.floor(r>0?a:a-r));if(p<l)continue;const m=n*s;for(let t=m+l;t<=m+p;t++)o[t]=h?h[t]:255}}}}return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]})}(t,e,s):(await Promise.all([n.e(3661),n.e(1878),n.e(9117),n.e(3299),n.e(5924)]).then(n.bind(n,30912))).execute(s,e)?t:function(t,e,n){if(!t)return t;const{width:s,height:r}=t,o=function(t){const{geometry:e,size:n,srcExtent:s,srcMask:r}=t,[o,i]=n;let a;const u=s.width/o,l=s.height/i,{xmin:c,ymax:p}=s;if("extent"===e.type){const t=(e.xmin-c)/u,n=(e.xmax-c)/u,s=(p-e.ymax)/l,r=(p-e.ymin)/l;a=[[[t,s],[t,r],[n,r],[n,s],[t,s]]]}else a=e.rings.map(t=>t.map(([t,e])=>[(t-c)/u,(p-e)/l]));return function(t,e,n){const[s,r]=e,o=new OffscreenCanvas(s,r).getContext("2d");o.fillStyle="#f00",o.beginPath(),t.forEach(t=>{o.moveTo(t[0][0],t[0][1]);for(let e=0;e<t.length;e++)o.lineTo(t[e][0],t[e][1]);o.closePath()}),o.fill();const i=o.getImageData(0,0,s,r).data,a=s*r,u=new Uint8Array(a);let l=!1;for(let t=0;t<a;t++)n&&!n[t]||(i[4*t+3]>127?u[t]=255:l=!0);return l||n?u:void 0}(a,n,r)}({geometry:n,size:[s,r],srcExtent:e,srcMask:t.mask});return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,maskIsAlpha:!1,pixels:[...t.pixels]})}(t,e,s):new i.A({pixelType:t.pixelType,width:r,height:o,mask:a,maskIsAlpha:!1,pixels:[...t.pixels]})}function u(t,e){const{extent:n}=l(t,e,new o.A({x:t.pixelSize.x,y:t.pixelSize.y,spatialReference:t.spatialReference})),{extent:s}=t.extent;if(n.xmax=Math.min(n.xmax,s.xmax),n.ymax=Math.min(n.ymax,s.ymax),n.xmin<n.xmax&&n.ymin<n.ymax){const{x:e,y:s}=t.pixelSize,r=Math.round(n.width/e),o=Math.round(n.height/s);t.extent=n,t.width=r,t.height=o}}function l(t,e,n,o=!0){const{spatialReference:i}=t,{x:a,y:u}=function(t,e){if(t.spatialReference.equals(e))return t;const n=(0,s.GA)(t.spatialReference),r=(0,s.GA)(e);if(n===r)return t;const o=n/r;return{x:t.x*o,y:t.y*o}}(n,i);let l,c,p;const h="extent"===e.type?e:e.extent;let{xmin:m,xmax:f,ymax:g,ymin:d}=h;const{xmin:y,ymax:x}=t.extent;return o?(m=y+(m>y?a*Math.round((m-y)/a):0),g=x-(g<x?u*Math.round((x-g)/u):0),f=y+(f>y?a*Math.round((f-y)/a):0),d=x-(d<x?u*Math.round((x-d)/u):0),l=new r.A({xmin:m,ymax:g,xmax:f,ymin:d,spatialReference:i}),c=Math.round(l.width/a),p=Math.round(l.height/u)):(c=Math.floor((f-m)/a+.8),p=Math.floor((g-d)/u+.8),m=y+(m>y?a*Math.floor((m-y)/a+.1):0),g=x-(g<x?u*Math.floor((x-g)/u+.1):0),f=m+c*a,d=g-p*u,l=new r.A({xmin:m,ymax:g,xmax:f,ymin:d,spatialReference:i})),{extent:l,width:c,height:p}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[563],{563:(t,e,s)=>{s.d(e,{QueueProcessor:()=>o,SharedConcurrency:()=>u});var r=s(97768),i=s(74887),n=s(9775),h=s(32587),l=s(76030),a=s(44794);class o{constructor(t){this._schedule=null,this._deferreds=new h.A,this._controllers=new h.A,this._processingItems=new h.A,this._pausedSignal=(0,a.v)(!1),this.process=t.process,this.concurrency=t.concurrency,this.sharedConcurrency=t.sharedConcurrency??d,this._queue=new n.A(t.peeker)}destroy(){this.clear(),this._schedule=(0,r.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(t){const e=this._controllers.get(t);e?.abort()}clear(){this._queue.clear();const t=Array.from(this._controllers.values());this._controllers.clear(),t.forEach(t=>t.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(t){this._deferreds.forEach((e,s)=>t(s))}_get(t){const e=this._deferreds.get(t);return e?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(t,e){const s=this._get(t);if(s)return s;const r=new AbortController,n=(0,i.Tw)(),h=e?(0,i.u7)(e,()=>r.abort()):null,l=(0,i.NY)(r.signal,()=>{const e=this._processingItems.get(t);e&&e.controller.abort(),a(),n.reject((0,i.NK)())}),a=()=>{l.remove(),h?.remove(),this._removeItem(t),this._queue.remove(t),this._scheduleNext()};return this._deferreds.set(t,n),this._controllers.set(t,r),n.promise.then(a,a),this._queue.push(t),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const t=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const e of t)this._queue.push(e.item),e.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const t=[];for(;this._queue.length;)t.push(this._queue.pop());return this.clear(),t}_removeItem(t){this._deferreds.delete(t),this._controllers.delete(t),this._processingItems.has(t)&&(this._processingItems.delete(t),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).resolve(e))}_processError(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).reject(e))}_canProcessFulfillment(t){return!!this._deferreds.get(t.item)&&this._processingItems.get(t.item)===t}_process(t){if(null==t)return;let e;const s=new AbortController,r=new c(t,s);this._processingItems.set(t,r),this.sharedConcurrency.current.value+=1;try{e=this.process(t,s.signal)}catch(t){this._processError(r,t)}(0,i.$X)(e)?(r.promise=e,e.then(t=>this._processResult(r,t),t=>this._processError(r,t))):this._processResult(r,e)}}class c{constructor(t,e){this.item=t,this.controller=e,this.promise=null}}class u{constructor(t){this.limit=t,this.current=(0,a.v)(0)}get full(){return this.current.value>=this.limit}}const d=new u(1/0)},9775:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new i.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,r.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},11406:(t,e,s)=>{s.d(e,{T:()=>h});var r=s(36563),i=s(4576);class n{constructor(t,e){this._observers=t,this._observer=e}remove(){(0,i.TF)(this._observers,this._observer)}}class h{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return l;null==this._observers&&(this._observers=[]);const e=this._observers;let s=!1,r=!1;const i=e.length;for(let n=0;n<i;++n){const i=e[n];if(i.destroyed)r=!0;else if(i===t){s=!0;break}}return s||(e.push(t),r&&this._removeDestroyedObservers()),new n(e,t)}_removeDestroyedObservers(){const t=this._observers;if(!t||0===t.length)return;const e=t.length;let s=0;for(let r=0;r<e;++r){for(;r+s<e&&t[r+s].destroyed;)++s;if(s>0){if(!(r+s<e))break;t[r]=t[r+s]}}t.length=e-s}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this._observers;if(null!=t){for(const e of t)e.onCommitted();this._observers=null}}}const l=(0,r.hA)()},15142:(t,e,s)=>{s.d(e,{A:()=>o});var r=s(4576),i=s(21818);const n=(t,e,s,r)=>{let i=e,n=e;const h=s>>>1,l=t[i-1];for(;n<=h;){n=i<<1,n<s&&r(t[n-1],t[n])<0&&++n;const e=t[n-1];if(r(e,l)<=0)break;t[i-1]=e,i=n}t[i-1]=l},h=(t,e)=>t<e?-1:t>e?1:0;function l(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r);const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r)}}function*a(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r),yield;const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r),yield}}class o{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new r.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=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let s=0;s<this._length;s++){const r=this.data[s];t(r)&&e.push(r)}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 s=this.data.indexOf(t,e);return-1!==s&&s<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 s=0;s<e;s++)this.data[this._length++]=t[s]}fill(t,e){for(let s=0;s<e;s++)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++,c(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,r.qh)(this.data,(0,i.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,r.qh)(this.data,(0,i.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,s){this.length=(0,r.mW)(this.data,t,this.length,e,this._hint,s),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 s=this.data[t];this.data[t]=this.data[e],this.data[e]=s}sort(t){l(this.data,0,this.length,t)}iterableSort(t){return a(this.data,0,this.length,t)}some(t,e){for(let s=0;s<this.length;++s)if(t.call(e,this.data[s],s,this.data))return!0;return!1}find(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)if(t.call(e,s[i]))return s[i]}filterInPlace(t,e){let s=0;for(let r=0;r<this._length;++r){const i=this.data[r];t.call(e,i,r,this.data)&&(this.data[r]=this.data[s],this.data[s]=i,s++)}if(this._deallocator)for(let t=s;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=s,this._shrink(),this}forAll(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)t.call(e,s[i],i,s)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const s=new Array(this.length);for(let r=0;r<this.length;++r)s[r]=t.call(e,this.data[r],r,this.data);return s}reduce(t,e){let s=e;for(let e=0;e<this.length;++e)s=t(s,this.data[e],e,this.data);return s}has(t){const e=this.length,s=this.data;for(let r=0;r<e;++r)if(s[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},26390:(t,e,s)=>{s.d(e,{d:()=>i});const r=[];function i(t){r.push(t),1===r.length&&queueMicrotask(()=>{const t=r.slice();r.length=0;for(const e of t)e()})}},32587:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(t)}get size(){return(0,r.gc)(this._observable),this._map.size}batch(t){try{this._batchDepth++,t()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(t){const e=this._map.delete(t);return e&&this._notify(),e}entries(){return(0,r.gc)(this._observable),this._map.entries()}forEach(t,e){(0,r.gc)(this._observable),this._map.forEach((s,r)=>t.call(e,s,r,this),e)}get(t){return(0,r.gc)(this._observable),this._map.get(t)}has(t){return(0,r.gc)(this._observable),this._map.has(t)}keys(){return(0,r.gc)(this._observable),this._map.keys()}set(t,e){return this._map.set(t,e),this._notify(),this}transformValues(t,e=this._map.keys()){this.batch(()=>{for(const s of e){if(!this._map.has(s))continue;const e=this._map.get(s),r=t(e,s);r!==e&&this.set(s,r)}})}values(){return(0,r.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,r.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},44794:(t,e,s)=>{s.d(e,{v:()=>l});var r=s(4718),i=s(62788),n=s(95488);class h{constructor(t,e){this._observable=new n.I,this._value=t,this._equalityFunction=e}get value(){return(0,i.gc)(this._observable),this._value}set value(t){this._equalityFunction(t,this._value)||(this._value=t,this._observable.notify())}mutate(t){t(this._value),this._observable.notify()}}function l(t,e=r.gh){return new h(t,e)}},47328:(t,e,s)=>{s.d(e,{i:()=>r});const r={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},62788:(t,e,s)=>{s.d(e,{F_:()=>_,Xr:()=>y,a:()=>d,fE:()=>m,gc:()=>o}),s(44208);var r=s(53966),i=s(88620),n=s(47328);const h=new(s(67867).R),l=[];let a=h;function o(t){a.onAccessed(t)}let c=!1,u=!1;function d(t,e,s){if(c)return f(t,e,s);let r=null;return g(t),r=e.call(s),p(),r}function _(t,e){return d(h,t,e)}function f(t,e,s){const i=c;c=!0,g(t);let n=null;try{n=e.call(s)}catch(t){u&&r.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return p(),c=i,n}function g(t){a=t,l.push(t)}function p(){const t=l.length;if(t>1){const e=l.pop();a=l[t-2],e.onTrackingEnd()}else if(1===t){const t=l.pop();a=h,t.onTrackingEnd()}else a=h}function m(t,e){if(e.flags&n.i.DepTrackingInitialized)return;e.flags|=n.i.DepTrackingInitialized;const s=u;u=!1,e.flags&n.i.AutoTracked?f(e.trackingTarget,e.metadata.get,t):y(t,e),u=s}const v=[];function y(t,e){e.flags&n.i.ExplicitlyTracking||(e.flags|=n.i.ExplicitlyTracking,f(e.trackingTarget,()=>{const s=e.metadata.dependsOn||v;for(const e of s)if("string"!=typeof e||e.includes(".")){const s=(0,i.AH)(e);for(let e=0,r=t;e<s.length&&null!=r&&"object"==typeof r;++e)r=b(r,s[e],e!==s.length-1)}else b(t,e,!1)}),e.flags&=~n.i.ExplicitlyTracking)}function b(t,e,s){const r=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const n=(0,i.oY)(t);if(n){const e=n.propertiesByName.get(r);e&&(o(e),m(t,e))}return s?t[r]:void 0}},67867:(t,e,s)=>{s.d(e,{R:()=>r});class r{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}}}},76030:(t,e,s)=>{s.d(e,{_:()=>p,$m:()=>I,NO:()=>w,md:()=>k});var r=s(26390);function i(t,e,s,r,i){console.timeStamp(t,e,s,i,r)}class n{constructor(t,e=30){this.name=t,this._counter=0,this._samples=new Array(e)}push(t){null!=t&&(this._samples[++this._counter%this._samples.length]=t)}set(t){null!=t&&(this._samples[this._counter%this._samples.length]=t)}get median(){return this._samples.slice().sort((t,e)=>t-e)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((t,e)=>t+e,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}var h=s(15142),l=s(74887),a=s(78659);class o{constructor(t){this.callback=t,this.isActive=!0}remove(){this.isActive=!1}}let c=0;const u={time:(0,a.l5)(0),deltaTime:(0,a.l5)(0),elapsedFrameTime:(0,a.l5)(0),frameDuration:(0,a.l5)(0)},d=["prepare","preRender","render","postRender","update","finish"],_=[],f=new h.A,g={frameTasks:f,willDispatch:!1,clearFrameTasks:function(t=!1){f.forAll(t=>{t.removed=!0}),t&&b()},dispatch:A,executeFrameTasks:function(t){const e=(0,a.l5)(t-c);c=t;const s=1e3/60,r=Math.max(0,e-s);u.time=t,u.frameDuration=(0,a.l5)(s-r);for(let s=0;s<d.length;s++){const r=performance.now(),n=d[s];f.forAll(r=>{r.paused||r.removed||(0===s&&r.ticks++,r.phases[n]&&(u.elapsedFrameTime=(0,a.l5)(performance.now()-t),u.deltaTime=0===r.ticks?(0,a.l5)(0):e,r.phases[n]?.call(r,u)))});const h=performance.now();T[s].push(h-r),i(n,r,h,"Maps SDK","Scheduling")}b();const n=performance.now();S.push(n-t),i("Animation Frame",t,n,"Maps SDK","Scheduling")},reschedule:function(){null!=m&&(cancelAnimationFrame(m),m=requestAnimationFrame(v))}};function p(t){const e=new o(t);return _.push(e),g.willDispatch||(g.willDispatch=!0,(0,r.d)(A)),e}let m=null;function v(){const t=performance.now();m=null;const e=f.some(t=>!t.paused&&!t.removed);m=e?requestAnimationFrame(v):null,g.executeFrameTasks(t)}const y=new h.A;function b(){f.forAll(t=>{t.removed&&y.push(t)}),f.removeUnorderedMany(y.data,y.length),y.clear()}function A(){for(;_.length;){const t=_.shift();t.isActive&&t.callback()}g.willDispatch=!1}function k(t=1,e){const s=(0,l.Tw)(),i=()=>{(0,l.G4)(e)?s.reject((0,l.NK)()):0===t?s():(--t,(0,r.d)(()=>i()))};return i(),s.promise}function w(t){return k(1,t)}async function I(t){await w(t),await new Promise(e=>requestAnimationFrame(()=>{t?.aborted||e()}))}const T=d.map(t=>new n(t)),S=new n("total")},78659:(t,e,s)=>{function r(t){return t}function i(t){return 1e3*t}function n(t){return t}s.d(e,{Kp:()=>n,gr:()=>i,l5:()=>r})},88620:(t,e,s)=>{s.d(e,{AH:()=>o,h1:()=>l,oY:()=>n,qg:()=>u,yh:()=>h});var r=s(36563),i=s(4718);function n(t){return t.__accessor__??null}function h(t,e){return null!=t?.metadata?.[e]}function l(t,e,s){return a(t,e,s?{policy:s,path:""}:null)}function a(t,e,s){return e?Object.keys(e).reduce((t,r)=>{const n=r;if("__proto__"===n)return t;let h=null,l="merge";if(s&&(h=s.path?`${s.path}.${r}`:r,l=s.policy(h)),"replace"===l)return t[n]=e[n],t;if("replace-arrays"===l&&Array.isArray(t[n]))return t[n]=e[n],t;if(void 0===t[n])return t[n]=(0,i.o8)(e[n]),t;let o=t[n],c=e[n];if(o===c)return t;if(Array.isArray(c)||Array.isArray(t))o=o?Array.isArray(o)?t[n]=o.slice():t[n]=[o]:t[n]=[],c&&(Array.isArray(c)||(c=[c]),c.forEach(t=>{o.includes(t)||o.push(t)}));else if(c&&"object"==typeof c)if(s){const e=s.path;s.path=h,t[n]=a(o,c,s),s.path=e}else t[n]=a(o,c,null);else t.hasOwnProperty(r)&&!e.hasOwnProperty(r)||(t[n]=c);return t},t||{}):t}function o(t){return Array.isArray(t)?t:t.split(".")}function c(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function u(t,e,s,i){const n=function(t){if(Array.isArray(t)){const e=[];for(const s of t)e.push(...c(s));return e}return c(t)}(e);if(1!==n.length){const e=n.map(e=>i(t,e,s));return(0,r.vE)(e)}return i(t,n[0],s)}},95488:(t,e,s)=>{s.d(e,{I:()=>i});var r=s(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[387],{1843:(t,e,r)=>{r.d(e,{BP:()=>f,l5:()=>_});var n=r(20498),i=r(13030),s=r(90239),o=r(4431),c=r(620),u=r(85079);class a{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fields.keys()){const r=t.fields.get(e);this[e]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const r=this[t];return r&&r.elementCount===e.ElementCount&&r.elementType===e.ElementType?r:null}slice(t,e){return new a(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e=0,r=0,n=t.count){const i=this.stride;if(i%4==0){const s=new Uint32Array(t.buffer,e*i,n*i/4);new Uint32Array(this.buffer,r*i,n*i/4).set(s)}else{const s=new Uint8Array(t.buffer,e*i,n*i);new Uint8Array(this.buffer,r*i,n*i).set(s)}return this}get usedMemory(){return this.byteLength}dispose(){}}class h{constructor(t){this._stride=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach(t=>this._fields.set(t[0],{...t[1],constructor:E(t[1].constructor)})))}freeze(){return this}get locations(){return(0,u.Xk)((0,o.U)(this))}vec2f16(t,e){return this._appendField(t,n.SX?i.ZD:i.gH,e),this}vec2f(t,e){return this._appendField(t,i.gH,e),this}vec2f64(t,e){return this._appendField(t,i.si,e),this}vec3f16(t,e){return this._appendField(t,n.SX?i.EC:i.xs,e),this}vec3f(t,e){return this._appendField(t,i.xs,e),this}vec3f64(t,e){return this._appendField(t,i.Xm,e),this}vec4f16(t,e){return this._appendField(t,n.SX?i.jz:i.Eq,e),this}vec4f(t,e){return this._appendField(t,i.Eq,e),this}vec4f64(t,e){return this._appendField(t,i.Aj,e),this}mat3f(t,e){return this._appendField(t,i.jZ,e),this}mat3f64(t,e){return this._appendField(t,i.j0,e),this}mat4f(t,e){return this._appendField(t,i.Sx,e),this}mat4f64(t,e){return this._appendField(t,i.E$,e),this}vec4u8(t,e){return this._appendField(t,i.XP,e),this}f16(t,e){return this._appendField(t,n.SX?i.XW:i.Y$,e),this}f32(t,e){return this._appendField(t,i.Y$,e),this}f64(t,e){return this._appendField(t,i.qB,e),this}u8(t,e){return this._appendField(t,i.SL,e),this}u16(t,e){return this._appendField(t,i.h,e),this}i8(t,e){return this._appendField(t,i.bf,e),this}vec2i8(t,e){return this._appendField(t,i.D6,e),this}vec2i16(t,e){return this._appendField(t,i.mJ,e),this}vec2u8(t,e){return this._appendField(t,i.LC,e),this}vec2u16(t,e){return this._appendField(t,i.Yi,e),this}vec4u16(t,e){return this._appendField(t,i.Uz,e),this}vec4i16(t,e){return this._appendField(t,i.E7,e),this}u32(t,e){return this._appendField(t,i.P,e),this}_appendField(t,e,r){this._fields.has(t)&&(0,c.vA)(!1,`${t} already added to vertex buffer layout`);const n=e.ElementCount*(0,s.GJ)(e.ElementType),i=this._stride;this._fields.set(t,{constructor:e,size:n,offset:i,optional:r}),this._alignFields()}_alignFields(){let t=0,e=1;this._fields.forEach(r=>{const n=(0,s.GJ)(r.constructor.ElementType);t=Math.floor((t+n-1)/n)*n,r.offset=t,t+=r.size,e=Math.max(e,n)}),t=Math.floor((t+e-1)/e)*e,this._stride=t}createBuffer(t){return new a(this,t)}createView(t){return new a(this,t)}clone(){const t=new h;return t._stride=this._stride,t._fields=new Map,this._fields.forEach((e,r)=>t._fields.set(r,e)),t.BufferType=this.BufferType,t}get stride(){return this._stride}get fields(){return this._fields}}function f(){return new h}class _{constructor(t){this.fields=new Array,t.fields.forEach((t,e)=>{const r={...t,constructor:l(t.constructor)};this.fields.push([e,r])}),this.stride=t.stride}}const d=[i.Y$,i.gH,i.xs,i.Eq,i.jZ,i.Sx,i.qB,i.si,i.Xm,i.Aj,i.j0,i.E$,i.SL,i.LC,i.eI,i.XP,i.h,i.Yi,i.nS,i.Uz,i.P,i.An,i.H$,i.ml,i.bf,i.D6,i.m8,i.TX,i.Qt,i.mJ,i.Vp,i.E7,i.My,i.UL,i.zD,i.Y4];function l(t){return`${t.ElementType}_${t.ElementCount}`}function E(t){return R.get(t)}const R=new Map;d.forEach(t=>R.set(l(t),t))},4341:(t,e,r)=>{r.d(e,{I:()=>i});var n=r(26390);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,s));t++)this._items.push(this._allocator())}}const s=1024},4431:(t,e,r)=>{r.d(e,{U:()=>s}),r(44208);var n=r(63907),i=r(74038);function s(t,e=0){const r=t.stride;return Array.from(t.fields.keys()).map(s=>{const o=t.fields.get(s),c=o.constructor.ElementCount,u=function(t){switch(t){case"u8":return n.pe.UNSIGNED_BYTE;case"u16":return n.pe.UNSIGNED_SHORT;case"u32":return n.pe.UNSIGNED_INT;case"i8":return n.pe.BYTE;case"i16":return n.pe.SHORT;case"i32":return n.pe.INT;case"f16":return n.pe.HALF_FLOAT;case"f32":return n.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(o.constructor.ElementType),a=o.offset,h=o.optional?.glNormalized??!1;return new i._(s,c,u,a,r,h,e)})}},11868:(t,e,r)=>{r.d(e,{Wz:()=>s,oe:()=>i});var n=r(34275);function i(t,e=!1){return t<=n.y9?e?new Array(t).fill(0):new Array(t):new Float32Array(t)}function s(t){return(Array.isArray(t)?t.length:t.byteLength/8)<=n.y9?Array.from(t):new Float32Array(t)}},11964:(t,e,r)=>{r.d(e,{Cr:()=>h,H6:()=>d,LV:()=>a,_I:()=>_,kb:()=>f,vt:()=>u});var n=r(34727),i=r(4341),s=r(38954),o=r(51850),c=r(32114);function u(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function a(t,e){const r=l.get();return r.origin=t,r.vector=e,r}function h(t,e,r=u()){return(0,s.d)(r.origin,t),(0,s.e)(r.vector,e,t),r}function f(t,e){const r=(0,s.e)(c.rq.get(),e,t.origin),i=(0,s.g)(t.vector,r),o=(0,s.g)(t.vector,t.vector),u=(0,n.qE)(i/o,0,1),a=(0,s.e)(c.rq.get(),(0,s.j)(c.rq.get(),t.vector,u),r);return(0,s.g)(a,a)}function _(t,e,r){return d(t,e,0,1,r)}function d(t,e,r,i,o){const{vector:u,origin:a}=t,h=(0,s.e)(c.rq.get(),e,a),f=(0,s.g)(u,h)/(0,s.E)(u);return(0,s.j)(o,u,(0,n.qE)(f,r,i)),(0,s.i)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)();const l=new i.I(()=>u())},63907:(t,e,r)=>{r.d(e,{$0:()=>f,CQ:()=>R,Fq:()=>l,H0:()=>s,SB:()=>u,WR:()=>n,XN:()=>o,iE:()=>c,ld:()=>a,nI:()=>E,pe:()=>i,r6:()=>_,vt:()=>h,yI:()=>d});const n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},i={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},s={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},o=Object.values(s),c={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},u={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},a={FLOAT:i.FLOAT,UNSIGNED_BYTE:i.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:i.BYTE,UNSIGNED_SHORT:i.UNSIGNED_SHORT,SHORT:i.SHORT,UNSIGNED_INT:i.UNSIGNED_INT,INT:i.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},h={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=0,_=36064,d=36065,l=36066,E=33306,R={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},71351:(t,e,r)=>{r.d(e,{C:()=>f,Cr:()=>_,LV:()=>h,fA:()=>d,kb:()=>l,oC:()=>E,vt:()=>u}),r(4576);var n=r(4341),i=(r(77690),r(29242)),s=r(38954),o=r(51850),c=r(32114);function u(t){return t?a((0,o.o8)(t.origin),(0,o.o8)(t.direction)):a((0,o.vt)(),(0,o.vt)())}function a(t,e){return{origin:t,direction:e}}function h(t,e){const r=R.get();return r.origin=t,r.direction=e,r}function f(t,e=u()){return d(t.origin,t.direction,e)}function _(t,e,r=u()){return(0,s.d)(r.origin,t),(0,s.e)(r.direction,e,t),r}function d(t,e,r=u()){return(0,s.d)(r.origin,t),(0,s.d)(r.direction,e),r}function l(t,e){const r=(0,s.f)(c.rq.get(),(0,s.n)(c.rq.get(),t.direction),(0,s.e)(c.rq.get(),e,t.origin));return(0,s.g)(r,r)}function E(t,e,r){const n=(0,s.g)(t.direction,(0,s.e)(r,e,t.origin));return(0,s.i)(r,t.origin,(0,s.j)(r,t.direction,n)),r}const R=new n.I(()=>u());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,i.vt)()},74038:(t,e,r)=>{r.d(e,{_:()=>n});class n{constructor(t,e,r,n,i,s=!1,o=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=s,this.divisor=o}}},82919:(t,e,r)=>{r.d(e,{DV:()=>A,C:()=>E,vt:()=>d,Qy:()=>l,ui:()=>R,ST:()=>S,bU:()=>T,pw:()=>p,m7:()=>g,c8:()=>v});var n=r(4341),i=r(58083),s=r(38954),o=r(51850),c=r(87317),u=r(91829),a=r(71351);function h(t){return t?{ray:(0,a.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,a.vt)(),c0:0,c1:Number.MAX_VALUE}}new n.I(()=>h());var f=r(27921),_=r(32114);function d(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function l(){return[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()]}function E(t,e){for(let r=0;r<N;r++)(0,f.C)(t[r],e[r]);return t}function R(t,e,r,n=C){const o=(0,i.lw)(_.Rc.get(),e,t);(0,i.B8)(o,o);for(let t=0;t<G;++t){const e=(0,c.t)(_.Km.get(),I[t],o);(0,s.h)(n[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}A(r,n)}function A(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}function g(t,e){for(let r=0;r<N;r++){const n=t[r];if(n[0]*e.center[0]+n[1]*e.center[1]+n[2]*e.center[2]+n[3]>=e.radius)return!1}return!0}function p(t,e){return y(t,function(t,e=h()){return(0,a.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,m.get()))}function S(t,e,r){return y(t,function(t,e,r=h()){const n=(0,s.b)(t.vector);return(0,a.fA)(t.origin,e,r.ray),r.c0=0,r.c1=n,r}(e,r,m.get()))}function T(t,e){for(let r=0;r<N;r++)if((0,f.mN)(t[r],e)>0)return!1;return!0}function y(t,e){for(let r=0;r<N;r++)if(!(0,f.$Q)(t[r],e))return!1;return!0}const v={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},N=6,G=8,I=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],m=new n.I(h),C=l()},85079:(t,e,r)=>{r.d(e,{Xk:()=>i,_u:()=>s});var n=r(21818);function i(t){let e=0;return(0,n.zI)(new Map(t.map(({name:t,count:r})=>{const n=[t,e];return 16===r?e+=4:9===r?e+=3:++e,n})))}function s(t){const e=new Map;let r=0;return t.forEach(t=>t.forEach(({name:t,count:n})=>{e.set(t,r),16===n?r+=4:9===n?r+=3:++r})),e}},90239:(t,e,r)=>{function n(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(e,{GJ:()=>n})},94008:(t,e,r)=>{r.d(e,{iy:()=>l,XG:()=>E}),r(44208),r(53966);var n=r(34727),i=r(34304),s=r(58083),o=r(38954),c=r(51850),u=r(91829),a=r(34275);var h=r(71351);function f(t,e){const r=(0,o.b)(t),i=(0,n.YN)(t[2]/r),s=Math.atan2(t[1]/r,t[0]/r);return(0,o.h)(e,r,i,s),e}var _=r(44280),d=r(32114);class l{constructor(t=0,e=0,r=0,n=0){this.radius=n,"number"==typeof t?this._center=(0,c.fA)(t,e,r):function(t){return e=t,(0,a.vZ)(e)&&e.length>=3||function(t){return((0,a.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,c.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,c.o8)(t.center),this.radius=t.radius)}get center(){return this._center}set center(t){(0,o.d)(this.center,t)}exactEquals(t){return(0,o.F)(this._center,t.center)&&this.radius===t.radius}copy(t){return t!==this&&((0,o.d)(this._center,t.center),this.radius=t.radius),this}clone(){return new l(this.center,this.radius)}toVec4(){return(0,u.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,o.s)(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,R))return!1;let{t0:r,t1:n}=R;if((r<0||n<r&&n>0)&&(r=n),r<0)return!1;if(e){const{origin:n,direction:i}=t;e[0]=n[0]+i[0]*r,e[1]=n[1]+i[1]*r,e[2]=n[2]+i[2]*r}return!0}intersectLine(t,e){const r=(0,h.Cr)(t,e);if(!this._intersect(r,R))return[];const{origin:n,direction:s}=r,{t0:u,t1:a}=R,f=t=>{const e=(0,c.vt)();return(0,o.c)(e,n,s,t),this.projectPoint(e,e)};return Math.abs(u-a)<(0,i.FD)()?[f(u)]:[f(u),f(a)]}_intersect(t,e){const{origin:r,direction:n}=t,i=A;i[0]=r[0]-this.center[0],i[1]=r[1]-this.center[1],i[2]=r[2]-this.center[2];const s=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(0===s)return!1;const o=2*(n[0]*i[0]+n[1]*i[1]+n[2]*i[2]),c=o*o-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(c<0)return!1;const u=Math.sqrt(c);return e.t0=(-o-u)/(2*s),e.t1=(-o+u)/(2*s),!0}projectPoint(t,e){const r=(0,o.e)(d.rq.get(),t,this.center),n=(0,o.j)(d.rq.get(),r,this.radius/(0,o.b)(r));return(0,o.i)(e,n,this.center)}closestPointOnSilhouette(t,e){const r=d.rq.get(),n=d.Rc.get();(0,o.f)(r,t.origin,t.direction),(0,o.f)(e,r,t.origin),(0,o.j)(e,e,1/(0,o.b)(e)*this.radius);const i=this._angleToSilhouette(t.origin),c=(0,_.g7)(t.origin,e);return(0,s.$0)(n,c+i,r),(0,o.p)(e,e,n),e}frustumCoverage(t,e,r){const n=this.radius,i=n*n,s=t+.5*Math.PI,o=e*e+i-2*Math.cos(s)*e*n,c=Math.sqrt(o),u=o-i;if(u<=0)return.5;const a=Math.sqrt(u),h=Math.acos(a/c)-Math.asin(n/(c/Math.sin(s)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(t){const e=(0,o.e)(d.rq.get(),t,this.center),r=(0,o.b)(e),i=this.radius,s=i+Math.abs(i-r);return(0,n.XM)(i/s)}union(t){const e=(0,o.C)(this._center,t.center),r=this.radius,n=t.radius;return e+n<r?this:e+r<n?(this.copy(t),this):((0,o.l)(this._center,this._center,t.center,(e+n-r)/(2*e)),this.radius=(e+r+n)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}}const E={create:t=>new l(t),copy:(t,e)=>e.copy(t),setExtent:(t,e,r)=>r.copy(t),getExtent:(t,e)=>e,elevate:(t,e,r)=>(r.copy(t),r.radius+=e,r),axisAt(t,e,r,n){const i=(0,o.e)(g,e,t.center);switch(r){case 0:{const t=f(i,g)[2];return(0,o.h)(n,-Math.sin(t),Math.cos(t),0)}case 1:{const t=f(i,g),e=t[1],r=t[2],s=Math.sin(e);return(0,o.h)(n,-s*Math.cos(r),-s*Math.sin(r),Math.cos(e))}case 2:return(0,o.n)(n,i);default:return}},altitudeAt(t,e){const r=(0,o.e)(p,e,t.center);return(0,o.b)(r)-t.radius},setAltitudeAt(t,e,r,n){const i=E.altitudeAt(t,e),s=E.axisAt(t,e,2,p),c=(0,o.j)(p,s,r-i);return(0,o.i)(n,e,c)},intersectRay:(t,e,r)=>t.intersectRay(e,r),closestPoint:(t,e,r)=>t.intersectRay(e,r)?r:((0,h.oC)(e,t.center,r),t.projectPoint(r,r)),intersectRayClosestSilhouette(t,e,r){if(t.intersectRay(e,r))return r;const n=t.closestPointOnSilhouette(e,d.rq.get());return(0,o.i)(r,e.origin,(0,o.j)(d.rq.get(),e.direction,(0,o.C)(e.origin,n)/(0,o.b)(e.direction))),r},closestPointOnSilhouette:(t,e,r)=>t.closestPointOnSilhouette(e,r),distanceToSilhouette(t,e){const r=(0,o.e)(d.rq.get(),e,t.center),n=(0,o.E)(r),i=t.radius**2;return Math.sqrt(Math.abs(n-i))}},R=(new l,{t0:0,t1:0}),A=(0,c.vt)(),g=(0,c.vt)(),p=(0,c.vt)()},97146:(t,e,r)=>{r.d(e,{Dg:()=>s,my:()=>o,tM:()=>h,uW:()=>i});var n=r(34275);function i(t){return s(t,!0)}function s(t,e){if(Array.isArray(t)){if(t.length<n.y9)return t}else if(t.length<n.y9)return Array.from(t);let r=!0,i=!0;return t.some((t,e)=>(r=r&&0===t,i=i&&t===e,!r&&!i)),r?function(t){if(1===t)return u;if(t<n.y9)return new Array(t).fill(0);if(t>_.length){const e=Math.max(2*_.length,t);_=new Uint8Array(e)}return new Uint8Array(_.buffer,0,t)}(t.length):i?h(t.length):(0,n.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(const r of t){if(r>=65536)return(0,n.iu)(t)?t:new Uint32Array(t);r>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function o(t){return t<=n.y9?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let c=f(131072);const u=[0],a=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function h(t){return 1===t?u:t<n.y9?Array.from(new Uint16Array(a.buffer,0,t)):t<a.length?new Uint16Array(a.buffer,0,t):(t>c.length&&(c=f(Math.max(2*c.length,t))),new Uint32Array(c.buffer,0,t))}function f(t){const e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let _=new Uint8Array(65536)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8243],{1843:(t,e,n)=>{n.d(e,{BP:()=>c,l5:()=>f});var r=n(20498),i=n(13030),s=n(90239),a=n(4431),h=n(620),o=n(85079);class u{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fields.keys()){const n=t.fields.get(e);this[e]=new n.constructor(this.buffer,n.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const n=this[t];return n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}slice(t,e){return new u(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e=0,n=0,r=t.count){const i=this.stride;if(i%4==0){const s=new Uint32Array(t.buffer,e*i,r*i/4);new Uint32Array(this.buffer,n*i,r*i/4).set(s)}else{const s=new Uint8Array(t.buffer,e*i,r*i);new Uint8Array(this.buffer,n*i,r*i).set(s)}return this}get usedMemory(){return this.byteLength}dispose(){}}class l{constructor(t){this._stride=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach(t=>this._fields.set(t[0],{...t[1],constructor:E(t[1].constructor)})))}freeze(){return this}get locations(){return(0,o.Xk)((0,a.U)(this))}vec2f16(t,e){return this._appendField(t,r.SX?i.ZD:i.gH,e),this}vec2f(t,e){return this._appendField(t,i.gH,e),this}vec2f64(t,e){return this._appendField(t,i.si,e),this}vec3f16(t,e){return this._appendField(t,r.SX?i.EC:i.xs,e),this}vec3f(t,e){return this._appendField(t,i.xs,e),this}vec3f64(t,e){return this._appendField(t,i.Xm,e),this}vec4f16(t,e){return this._appendField(t,r.SX?i.jz:i.Eq,e),this}vec4f(t,e){return this._appendField(t,i.Eq,e),this}vec4f64(t,e){return this._appendField(t,i.Aj,e),this}mat3f(t,e){return this._appendField(t,i.jZ,e),this}mat3f64(t,e){return this._appendField(t,i.j0,e),this}mat4f(t,e){return this._appendField(t,i.Sx,e),this}mat4f64(t,e){return this._appendField(t,i.E$,e),this}vec4u8(t,e){return this._appendField(t,i.XP,e),this}f16(t,e){return this._appendField(t,r.SX?i.XW:i.Y$,e),this}f32(t,e){return this._appendField(t,i.Y$,e),this}f64(t,e){return this._appendField(t,i.qB,e),this}u8(t,e){return this._appendField(t,i.SL,e),this}u16(t,e){return this._appendField(t,i.h,e),this}i8(t,e){return this._appendField(t,i.bf,e),this}vec2i8(t,e){return this._appendField(t,i.D6,e),this}vec2i16(t,e){return this._appendField(t,i.mJ,e),this}vec2u8(t,e){return this._appendField(t,i.LC,e),this}vec2u16(t,e){return this._appendField(t,i.Yi,e),this}vec4u16(t,e){return this._appendField(t,i.Uz,e),this}vec4i16(t,e){return this._appendField(t,i.E7,e),this}u32(t,e){return this._appendField(t,i.P,e),this}_appendField(t,e,n){this._fields.has(t)&&(0,h.vA)(!1,`${t} already added to vertex buffer layout`);const r=e.ElementCount*(0,s.GJ)(e.ElementType),i=this._stride;this._fields.set(t,{constructor:e,size:r,offset:i,optional:n}),this._alignFields()}_alignFields(){let t=0,e=1;this._fields.forEach(n=>{const r=(0,s.GJ)(n.constructor.ElementType);t=Math.floor((t+r-1)/r)*r,n.offset=t,t+=n.size,e=Math.max(e,r)}),t=Math.floor((t+e-1)/e)*e,this._stride=t}createBuffer(t){return new u(this,t)}createView(t){return new u(this,t)}clone(){const t=new l;return t._stride=this._stride,t._fields=new Map,this._fields.forEach((e,n)=>t._fields.set(n,e)),t.BufferType=this.BufferType,t}get stride(){return this._stride}get fields(){return this._fields}}function c(){return new l}class f{constructor(t){this.fields=new Array,t.fields.forEach((t,e)=>{const n={...t,constructor:_(t.constructor)};this.fields.push([e,n])}),this.stride=t.stride}}const d=[i.Y$,i.gH,i.xs,i.Eq,i.jZ,i.Sx,i.qB,i.si,i.Xm,i.Aj,i.j0,i.E$,i.SL,i.LC,i.eI,i.XP,i.h,i.Yi,i.nS,i.Uz,i.P,i.An,i.H$,i.ml,i.bf,i.D6,i.m8,i.TX,i.Qt,i.mJ,i.Vp,i.E7,i.My,i.UL,i.zD,i.Y4];function _(t){return`${t.ElementType}_${t.ElementCount}`}function E(t){return p.get(t)}const p=new Map;d.forEach(t=>p.set(_(t),t))},4431:(t,e,n)=>{n.d(e,{U:()=>s}),n(44208);var r=n(63907),i=n(74038);function s(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map(s=>{const a=t.fields.get(s),h=a.constructor.ElementCount,o=function(t){switch(t){case"u8":return r.pe.UNSIGNED_BYTE;case"u16":return r.pe.UNSIGNED_SHORT;case"u32":return r.pe.UNSIGNED_INT;case"i8":return r.pe.BYTE;case"i16":return r.pe.SHORT;case"i32":return r.pe.INT;case"f16":return r.pe.HALF_FLOAT;case"f32":return r.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(a.constructor.ElementType),u=a.offset,l=a.optional?.glNormalized??!1;return new i._(s,h,o,u,n,l,e)})}},11868:(t,e,n)=>{n.d(e,{Wz:()=>s,oe:()=>i});var r=n(34275);function i(t,e=!1){return t<=r.y9?e?new Array(t).fill(0):new Array(t):new Float32Array(t)}function s(t){return(Array.isArray(t)?t.length:t.byteLength/8)<=r.y9?Array.from(t):new Float32Array(t)}},15142:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(4576),i=n(21818);const s=(t,e,n,r)=>{let i=e,s=e;const a=n>>>1,h=t[i-1];for(;s<=a;){s=i<<1,s<n&&r(t[s-1],t[s])<0&&++s;const e=t[s-1];if(r(e,h)<=0)break;t[i-1]=e,i=s}t[i-1]=h},a=(t,e)=>t<e?-1:t>e?1:0;function h(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=a);for(let i=n>>>1;i>e;i--)s(t,i,n,r);const i=e+1;for(let a=n-1;a>e;a--){const n=t[e];t[e]=t[a],t[a]=n,s(t,i,a,r)}}function*o(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=a);for(let i=n>>>1;i>e;i--)s(t,i,n,r),yield;const i=e+1;for(let a=n-1;a>e;a--){const n=t[e];t[e]=t[a],t[a]=n,s(t,i,a,r),yield}}class u{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new r.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=()=>l(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let n=0;n<this._length;n++){const r=this.data[n];t(r)&&e.push(r)}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 n=this.data.indexOf(t,e);return-1!==n&&n<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 n=0;n<e;n++)this.data[this._length++]=t[n]}fill(t,e){for(let n=0;n<e;n++)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++,l(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,r.qh)(this.data,(0,i.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,r.qh)(this.data,(0,i.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,n){this.length=(0,r.mW)(this.data,t,this.length,e,this._hint,n),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 n=this.data[t];this.data[t]=this.data[e],this.data[e]=n}sort(t){h(this.data,0,this.length,t)}iterableSort(t){return o(this.data,0,this.length,t)}some(t,e){for(let n=0;n<this.length;++n)if(t.call(e,this.data[n],n,this.data))return!0;return!1}find(t,e){const{data:n,length:r}=this;for(let i=0;i<r;++i)if(t.call(e,n[i]))return n[i]}filterInPlace(t,e){let n=0;for(let r=0;r<this._length;++r){const i=this.data[r];t.call(e,i,r,this.data)&&(this.data[r]=this.data[n],this.data[n]=i,n++)}if(this._deallocator)for(let t=n;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=n,this._shrink(),this}forAll(t,e){const{data:n,length:r}=this;for(let i=0;i<r;++i)t.call(e,n[i],i,n)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const n=new Array(this.length);for(let r=0;r<this.length;++r)n[r]=t.call(e,this.data[r],r,this.data);return n}reduce(t,e){let n=e;for(let e=0;e<this.length;++e)n=t(n,this.data[e],e,this.data);return n}has(t){const e=this.length,n=this.data;for(let r=0;r<e;++r)if(n[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function l(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},63907:(t,e,n)=>{n.d(e,{$0:()=>c,CQ:()=>p,Fq:()=>_,H0:()=>s,SB:()=>o,WR:()=>r,XN:()=>a,iE:()=>h,ld:()=>u,nI:()=>E,pe:()=>i,r6:()=>f,vt:()=>l,yI:()=>d});const r={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},i={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},s={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(s),h={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},o={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},u={FLOAT:i.FLOAT,UNSIGNED_BYTE:i.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:i.BYTE,UNSIGNED_SHORT:i.UNSIGNED_SHORT,SHORT:i.SHORT,UNSIGNED_INT:i.UNSIGNED_INT,INT:i.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},l={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},c=0,f=36064,d=36065,_=36066,E=33306,p={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},71936:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});var r=n(1843);function i(t,e){return e.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var s=n(76216),a=n(93406),h=n(431);class o{async extract(t){const e=u(t),n=(0,h.o6)(e),r=[e.data.buffer];return{result:l(n,r),transferList:r}}async extractComponentsEdgeLocations(t){const e=u(t),n=(0,h.hx)(e.data,e.skipDeduplicate,e.indices,e.indicesLength),r=[];return{result:i((0,a.K)(n,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const e=u(t),n=(0,h.hx)(e.data,e.skipDeduplicate,e.indices,e.indicesLength),r=[];return{result:i((0,a.K)(n,c).regular.instancesData,r),transferList:r}}}function u(t){return{data:s.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,e){return e.push(t.regular.lodInfo.lengths.buffer),e.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:i(t.regular.instancesData,e),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:i(t.silhouette.instancesData,e),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const c=new class{allocate(t){return h.Jb.createBuffer(t)}trim(t,e){return t.slice(0,e)}write(t,e,n){t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1)}},f=new class{allocate(t){return h.HY.createBuffer(t)}trim(t,e){return t.slice(0,e)}write(t,e,n){t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex)}}},74038:(t,e,n)=>{n.d(e,{_:()=>r});class r{constructor(t,e,n,r,i,s=!1,a=0){this.name=t,this.count=e,this.type=n,this.offset=r,this.stride=i,this.normalized=s,this.divisor=a}}},85079:(t,e,n)=>{n.d(e,{Xk:()=>i,_u:()=>s});var r=n(21818);function i(t){let e=0;return(0,r.zI)(new Map(t.map(({name:t,count:n})=>{const r=[t,e];return 16===n?e+=4:9===n?e+=3:++e,r})))}function s(t){const e=new Map;let n=0;return t.forEach(t=>t.forEach(({name:t,count:r})=>{e.set(t,n),16===r?n+=4:9===r?n+=3:++n})),e}},87317:(t,e,n)=>{n.d(e,{a:()=>y,b:()=>c,c:()=>s,d:()=>g,e:()=>I,f:()=>i,g:()=>E,h:()=>S,i:()=>a,j:()=>p,l:()=>T,m:()=>l,n:()=>R,r:()=>f,s:()=>d,t:()=>A});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function s(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function a(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function h(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function o(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function l(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function f(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function _(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+s*s)}function E(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return n*n+r*r+i*i+s*s}function p(t){const e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function g(t){const e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function R(t,e){const n=e[0],r=e[1],i=e[2],s=e[3];let a=n*n+r*r+i*i+s*s;return a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=s*a),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function T(t,e,n,r){const i=e[0],s=e[1],a=e[2],h=e[3];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=a+r*(n[2]-a),t[3]=h+r*(n[3]-h),t}function A(t,e,n){const r=e[0],i=e[1],s=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*s+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*s+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*s+n[15]*a,t}function y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function I(t,e){const n=t[0],i=t[1],s=t[2],a=t[3],h=e[0],o=e[1],u=e[2],l=e[3],c=(0,r.FD)();return Math.abs(n-h)<=c*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-o)<=c*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(s-u)<=c*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(a-l)<=c*Math.max(1,Math.abs(a),Math.abs(l))}const N=h,m=o,M=u,G=_,U=E,b=p,F=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},copy:i,copyVec3:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},dist:G,distance:_,div:M,divide:u,dot:S,equals:I,exactEquals:y,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},len:b,length:p,lerp:T,max:c,min:l,mul:m,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},normalize:R,random:function(t,e=1){const n=r.Ov;let i,s,a,h,o,u;do{i=2*n()-1,s=2*n()-1,o=i*i+s*s}while(o>=1);do{a=2*n()-1,h=2*n()-1,u=a*a+h*h}while(u>=1);const l=Math.sqrt((1-o)/u);return t[0]=e*i,t[1]=e*s,t[2]=e*a*l,t[3]=e*h*l,t},round:f,scale:d,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},set:s,sqrDist:U,sqrLen:F,squaredDistance:E,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:N,subtract:h,transformMat4:A,transformQuat:function(t,e,n){const r=e[0],i=e[1],s=e[2],a=n[0],h=n[1],o=n[2],u=n[3],l=u*r+h*s-o*i,c=u*i+o*r-a*s,f=u*s+a*i-h*r,d=-a*r-h*i-o*s;return t[0]=l*u+d*-a+c*-o-f*-h,t[1]=c*u+d*-h+f*-a-l*-o,t[2]=f*u+d*-o+l*-h-c*-a,t[3]=e[3],t}},Symbol.toStringTag,{value:"Module"}))},90239:(t,e,n)=>{function r(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}n.d(e,{GJ:()=>r})},91829:(t,e,n)=>{function r(){return[0,0,0,0]}function i(t){return[t[0],t[1],t[2],t[3]]}function s(t,e,n,r){return[t,e,n,r]}function a(t,e,n,r){return[t,e,n,r]}function h(t,e=[0,0,0,0]){const n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function o(){return s(1,1,1,1)}function u(){return s(1,0,0,0)}function l(){return s(0,1,0,0)}function c(){return s(0,0,1,0)}function f(){return s(0,0,0,1)}n.d(e,{CN:()=>a,Un:()=>_,ci:()=>h,fA:()=>s,o8:()=>i,uY:()=>d,vt:()=>r});const d=[0,0,0,0],_=o(),E=u(),p=l(),g=c(),R=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:_,UNIT_W:R,UNIT_X:E,UNIT_Y:p,UNIT_Z:g,ZEROS:d,clone:i,create:r,freeze:a,fromArray:h,fromValues:s,ones:o,unitW:f,unitX:u,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},97146:(t,e,n)=>{n.d(e,{Dg:()=>s,my:()=>a,tM:()=>l,uW:()=>i});var r=n(34275);function i(t){return s(t,!0)}function s(t,e){if(Array.isArray(t)){if(t.length<r.y9)return t}else if(t.length<r.y9)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n=n&&0===t,i=i&&t===e,!n&&!i)),n?function(t){if(1===t)return o;if(t<r.y9)return new Array(t).fill(0);if(t>f.length){const e=Math.max(2*f.length,t);f=new Uint8Array(e)}return new Uint8Array(f.buffer,0,t)}(t.length):i?l(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(const n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t){return t<=r.y9?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let h=c(131072);const o=[0],u=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function l(t){return 1===t?o:t<r.y9?Array.from(new Uint16Array(u.buffer,0,t)):t<u.length?new Uint16Array(u.buffer,0,t):(t>h.length&&(h=c(Math.max(2*h.length,t))),new Uint32Array(h.buffer,0,t))}function c(t){const e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let f=new Uint8Array(65536)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
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]}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"}}}]);
|