@arcgis/core 5.0.0-next.67 → 5.0.0-next.68
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/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
- package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
- package/assets/esri/core/workers/chunks/{942fad4ec96295672ce8.js → 10e474d664b20adcd917.js} +1 -1
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/{0629087bd5bb8048493e.js → 14dedd80fb797303f91f.js} +1 -1
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- package/assets/esri/core/workers/chunks/2c2c0f66cffc521df736.js +1 -0
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
- package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
- package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
- package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +1 -1
- package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +1 -0
- package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
- package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
- package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
- package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
- package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +1 -0
- package/assets/esri/core/workers/chunks/{7bed14d9bcd7fc5e2eec.js → 4bcd74951477e8977ba1.js} +1 -1
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +1 -0
- package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
- package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
- package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
- package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
- package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +1 -0
- package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
- package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
- package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
- package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
- package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
- package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
- package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
- package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
- package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +1 -0
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
- package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +1 -0
- package/assets/esri/core/workers/chunks/b2a1e5e9182b643909eb.js +316 -0
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c623918e289a09905cd1.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +1 -0
- package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
- package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
- package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
- package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
- package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
- package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +1 -0
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/compilerUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/interfaces.d.ts +0 -1
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.d.ts +1 -1
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/raster/functions/focalStatUtils.js +1 -1
- package/layers/raster/functions/pixelTransformUtils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +2 -2
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/defaults.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/handlers/DoubleTapDragZoom.js +1 -1
- package/views/2d/input/handlers/KeyZoom.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/utils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/internal/fillDefaults.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +5 -0
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/VideoView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Uniform.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/055fdc5134d54174444d.js +0 -316
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/08359ae020238a565955.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.js +0 -1
- package/assets/esri/core/workers/chunks/0dc3a04ce717b7ddd957.js +0 -1
- package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
- package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
- package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
- package/assets/esri/core/workers/chunks/119822a646834c1cebc0.js +0 -1
- package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
- package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
- package/assets/esri/core/workers/chunks/1967239713b58dccfd81.js +0 -1
- package/assets/esri/core/workers/chunks/1c350a2c4014146dbcd9.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
- package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
- package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.js +0 -1
- package/assets/esri/core/workers/chunks/4773a358832f87963766.js +0 -1
- package/assets/esri/core/workers/chunks/492515860198f38dd698.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.js +0 -1
- package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
- package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.js +0 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6cb44cd319cb6c2539c8.js +0 -1
- package/assets/esri/core/workers/chunks/7f4fa2f2e85863d3cfb9.js +0 -1
- package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
- package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
- package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
- package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.js +0 -1
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
- package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
- package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
- package/assets/esri/core/workers/chunks/e4ba850e8344ac2c5fc0.js +0 -1
- package/assets/esri/core/workers/chunks/e705d041f6c1632bfbcc.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8824],{18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(31635),s=i(53966),n=i(91429),o=i(60694);const a=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},20615:(e,t,i)=>{i.d(t,{I:()=>o});var r=i(2272),s=i(80893),n=i(61956);function o(e,t,i,o){return(0,s.gW)((0,r.Dl)(e),n.A.from(t),i,o)}},27647:(e,t,i)=>{i.d(t,{Q:()=>n});var r=i(92722);function s(e,t){return e?t?4:3:t?3:2}function n(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:i,stride:s,hasZ:n,hasM:l}=e,u=new r.A([],[],n,!1),p=u.coords,c=[],m=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let d=0;for(const e of t){const t=o(m,i,d,e,n,l);t&&c.push(t),d+=e*s}if(c.sort((e,t)=>{let i=e[2]-t[2];return 0===i&&n&&(i=e[4]-t[4]),i}),c.length){let e=6*c[0][2];p[0]=c[0][0]/e,p[1]=c[0][1]/e,n&&(e=6*c[0][4],p[2]=0!==e?c[0][3]/e:0),(p[0]<m[0]||p[0]>m[1]||p[1]<m[2]||p[1]>m[3]||n&&(p[2]<m[4]||p[2]>m[5]))&&(p.length=0)}if(!p.length){const r=e.lengths[0]?a(i,0,t[0],n,l):null;if(!r)return null;p[0]=r[0],p[1]=r[1],n&&(p[2]=r[2]??0)}return u}function o(e,t,i,r,n,o){const a=s(n,o);let l=i,u=i+a,p=0,c=0,m=0,d=0,h=0;for(let i=0,s=r-1;i<s;i++,l+=a,u+=a){const i=t[l],r=t[l+1],s=t[l+2],o=t[u],a=t[u+1],y=t[u+2];let g=i*a-o*r;d+=g,p+=(i+o)*g,c+=(r+a)*g,n&&(g=i*y-o*s,m+=(s+y)*g,h+=g),i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),n&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),h>0&&(h*=-1),!d)return null;const y=[p,c,.5*d];return n&&(y[3]=m,y[4]=.5*h),y}function a(e,t,i,r,n){const o=s(r,n);let a=t,m=t+o,d=0,h=0,y=0,g=0;for(let t=0,s=i-1;t<s;t++,a+=o,m+=o){const t=e[a],i=e[a+1],s=e[a+2],n=e[m],o=e[m+1],f=e[m+2],w=r?u(t,i,s,n,o,f):l(t,i,n,o);if(w)if(d+=w,r){const e=c(t,i,s,n,o,f);h+=w*e[0],y+=w*e[1],g+=w*e[2]}else{const e=p(t,i,n,o);h+=w*e[0],y+=w*e[1]}}return d>0?r?[h/d,y/d,g/d]:[h/d,y/d]:i>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,i,r){const s=i-e,n=r-t;return Math.sqrt(s*s+n*n)}function u(e,t,i,r,s,n){const o=r-e,a=s-t,l=n-i;return Math.sqrt(o*o+a*a+l*l)}function p(e,t,i,r){return[e+.5*(i-e),t+.5*(r-t)]}function c(e,t,i,r,s,n){return[e+.5*(r-e),t+.5*(s-t),i+.5*(n-i)]}},33446:(e,t,i)=>{i.d(t,{C:()=>o,m:()=>n});var r=i(49186),s=i(74887);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(o),a}},43334:(e,t,i)=>{i.d(t,{N3:()=>a,Om:()=>o});var r=i(69397),s=i(27647),n=i(92722);class o{constructor(e=null,t={},i,r,s=0){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=s}static fromJSON(e){const t=e.geometry?n.A.fromJSON(e.geometry):null,i=e.centroid?n.A.fromJSON(e.centroid):null,r=e.objectId;return new o(t,e.attributes,i,r)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},56551:(e,t,i)=>{i.d(t,{H:()=>c});var r=i(31635),s=i(91429),n=i(69540),o=i(25482),a=i(56507),l=i(94359),u=i(93223);let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,r.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,r.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(s)for(const e of i.features)s(e.geometry)}},58512:(e,t,i)=>{i.d(t,{A:()=>r});class r{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},62815:(e,t,i)=>{i.d(t,{N:()=>o});var r=i(86211),s=i(73941),n=i(21325);function o(e,t,i){if(null==t||null==i||i.vcsWkid||(0,n.aI)(t,i)||(0,s.xP)(t)||(0,s.xP)(i))return;const o=(0,r.G9)(t)/(0,r.G9)(i);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>h,ez:()=>m,lM:()=>o,qK:()=>c});var r=i(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return p(e,8);let i=m;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+d:Array.isArray(t)?p(t,n):0:0),0)}function p(e,t){return m+e.length*t}const c=32,m=16,d=145,h=64},74379:(e,t,i)=>{i.d(t,{V:()=>r,t:()=>s});const r=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&r in e}},74910:(e,t,i)=>{i.d(t,{L:()=>a});var r=i(5443),s=i(2272),n=i(80893),o=i(61956);async function a(e,t,i){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...i}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:r.A.fromJSON(u)}}},78286:(e,t,i)=>{i.d(t,{V:()=>o});var r=i(2272),s=i(80893),n=i(61956);async function o(e,t,i,o){const a=(0,r.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),i,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},82371:(e,t,i)=>{i.d(t,{E9:()=>h,Tw:()=>m,X6:()=>d});var r=i(11254),s=i(5443),n=i(86738),o=i(16930),a=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},h=m?JSON.stringify(m.rasterFunctionDefinition||m):null,y=(0,u.lF)({...c.query,renderingRule:h,f:"json"}),g=(0,u.jV)(y,i);e=c.path;const f=d||await(0,r.A)(e,g).then(e=>e.data),w=f.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,g):null,v=f.hasColormap?(0,r.A)(`${e}/colormap`,g):null,R=f.hasHistograms?(0,r.A)(`${e}/histograms`,g):null,C=f.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,g):null,b=f.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,g):null,S=await Promise.allSettled([w,v,R,C,b]);let I=null;if(f.minValues&&f.minValues.length===f.bandCount){I=[];for(let e=0;e<f.minValues.length;e++)I.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const F=s.A.fromJSON(f.extent),M=Math.ceil(F.width/f.pixelSizeX-.1),x=Math.ceil(F.height/f.pixelSizeY-.1),A=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===S[0].status?S[0].value?.data:null,T=D?.features?.length?p.A.fromJSON(D):null,N="fulfilled"===S[1].status?S[1].value?.data.colormap:null,P=N?.length?N:null,O="fulfilled"===S[2].status?S[2].value?.data.histograms:null,Z=O?.[0]?.counts?.length?O:null,j="fulfilled"===S[3].status?S[3].value?.data??{}:{},_="fulfilled"===S[4].status?S[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:q,serviceDataType:E}=f;q&&q!==j.DefaultVariable&&(j.DefaultVariable=q),E?.includes("esriImageServiceDataTypeVector")&&!E.includes(j.DataType)&&(j.DataType=E.replace("esriImageServiceDataType",""));let J=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==J)&&(J=f.noDataValues);const G=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(M,x))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:M,height:x,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:I,attributeTable:T,colormap:P,histograms:Z,keyProperties:j,noDataValue:J,multidimensionalInfo:V,storageInfo:G})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function h(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},87772:(e,t,i)=>{i.r(t),i.d(t,{default:()=>hi});var r,s=i(31635),n=i(37838),o=i(69540),a=i(49186),l=i(53966),u=i(25728),p=i(74887),c=i(91429),m=i(89808),d=i(99959),h=i(74379);class y extends d.A{get[(r=h.V,m.Q)](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=i(4146),f=i(52106),w=i(11254),v=i(4718),R=i(36708),C=i(84952),b=i(56507),S=i(5443),I=i(39829),F=i(16930),M=i(21325),x=i(4366),A=i(20758),D=i(47520),T=i(34251),N=i(10873),P=i(45617),O=i(25482),Z=i(94778);const j={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var _=i(22796),V=i(67369),q=i(70274),E=i(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function L(e){return z.has(e.type)}function $(e,t){if(!e||!t)return(0,v.o8)(e||t);const i=(0,v.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),U(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(K(i.functionArguments).Raster=t);return i}function U(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&U(e[i].arguments,t))}function B(e){const t=(0,v.o8)(j[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=B(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=Y(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function K(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?K(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const i=J.has(t)?(0,Z.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,i=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return i?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function Y(e){const t=[],i=[];return e.forEach(e=>{t.push(e[0]),i.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:i}}var X=i(85675),ee=i(13868),te=i(43937);let ie=class extends O.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new X.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return $(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),this.requestRawData||!r||i||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&L(r)?$(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new _.A;r.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===Q.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===Q.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,r.outputPixelType=n):s===Q.minMax?r.outputPixelType=n:s===Q.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=a,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(i)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const i=(0,V.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach(e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new _.A({rasterFunctionDefinition:B(n)}):n}return i?new _.A({rasterFunctionDefinition:B(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))})});const i=a?k(n,a):n,r=new _.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:B(r)}):r}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});const c=a?k(n,a):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:B(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=H(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach(e=>{const i=e.value,r=W(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())});const r=e.field;r&&n.forEach(({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])})}}else for(let e=0;e<l.length;e++){const t=l[e],r=W(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?k(i,r):i,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:B(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?k(i,r):i,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:B(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new _.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(2===s?.length){const e=s.map(e=>e.toLowerCase());o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new E.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=B(i);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new _.A;const r=new _.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,V.hf)(e.colorRamp):o.Colormap=(0,V.R8)(e.colorRamp)),i?new _.A({rasterFunctionDefinition:B(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new _.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new _.A({rasterFunctionDefinition:B(r)}):r,$(r,e)}};(0,s.Cg)([(0,c.MZ)()],ie.prototype,"layer",void 0),(0,s.Cg)([(0,c.MZ)()],ie.prototype,"requestRawData",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],ie.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"bandIds",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"compression",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],ie.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],ie.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"format",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],ie.prototype,"interpolation",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"noData",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],ie.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,c.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],ie.prototype,"pixelType",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],ie.prototype,"writeLercVersion",null),(0,s.Cg)([(0,c.MZ)({type:Number})],ie.prototype,"version",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ie.prototype,"mosaicRule",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0,name:"renderingRule"}})],ie.prototype,"rasterFunction",null),ie=(0,s.Cg)([(0,c.$K)("esri.layers.support.ExportImageServiceParameters")],ie);var re=i(20437),se=i(95466),ne=i(33446),oe=i(43577),ae=i(14140),le=i(74797),ue=i(87186),pe=i(12711),ce=i(85676),me=i(94359),de=i(65864),he=i(17136),ye=i(2272),ge=i(86738);let fe=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,c.$K)("esri.rest.support.FindImagesParameters")],fe);const we=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"make",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"model",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"focalLength",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"rows",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],i.prototype,"cols",void 0),i=(0,s.Cg)([(0,c.$K)("esri.rest.support.CameraInfoMixin")],i),i};let ve=class extends(we(O.o)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"uri",write:!0}})],ve.prototype,"referenceUri",void 0),(0,s.Cg)([(0,c.MZ)({type:Date,json:{write:!0}})],ve.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],ve.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"cameraID",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],ve.prototype,"center",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],ve.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"orientation",void 0),ve=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageInspectionInfo")],ve);const Re=ve;let Ce=class extends O.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,c.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,c.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends O.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,v.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,c.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,c.MZ)({type:F.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,c.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAngleParameters")],Se);let Ie=class extends O.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"north",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"up",void 0),(0,s.Cg)([(0,c.MZ)({type:F.A,json:{write:!0}})],Ie.prototype,"spatialReference",void 0),Ie=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAngleResult")],Ie);var Fe=i(86211),Me=i(60408),xe=i(50498),Ae=i(66552);const De=new Ae.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Te=class extends O.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Ne;(0,s.Cg)([(0,c.MZ)()],Te.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Te.prototype,"measureOperation",void 0),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],Te.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],Te.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Te.prototype,"raster",void 0),Te=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureParameters")],Te);let Pe=Ne=class extends Te{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Ne((0,v.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"fromGeometry",read:!0,write:!0}})],Pe.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pe.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],Pe.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],Pe.prototype,"is3D",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Fe.Sk.read,write:Fe.Sk.write}})],Pe.prototype,"linearUnit",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Fe.dk.read,write:Fe.dk.write}})],Pe.prototype,"areaUnit",void 0),Pe=Ne=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAreaParameters")],Pe);let Oe=class extends O.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],Oe.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],Oe.prototype,"sensorName",void 0),Oe=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureResult")],Oe);var Ze=i(64108);let je=class extends O.o{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,c.MZ)({type:String})],je.prototype,"unit",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{read:!0,write:!0}})],je.prototype,"value",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],je.prototype,"displayValue",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{read:!0,write:!0}})],je.prototype,"uncertainty",void 0),je=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureResultValue")],je);const _e=je;let Ve=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Fe.dk.read,write:Fe.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Ze.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Fe.Sk.read,write:Fe.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends Oe{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,c.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,c.MZ)({type:F.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var Le=i(36005);let $e=class extends O.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?I.A.fromJSON(e):S.A.fromJSON(e)}};var Ue;(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],$e.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"shape",write:!0}})],$e.prototype,"geometry",void 0),(0,s.Cg)([(0,Le.w)("geometry")],$e.prototype,"readGeometry",null),$e=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageBoundaryResult")],$e);let Be=Ue=class extends Te{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Ue((0,v.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],Be.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Be.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],Be.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],Be.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],Be.prototype,"is3D",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Fe.Sk.read,write:Fe.Sk.write}})],Be.prototype,"linearUnit",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Fe.b$.read,write:Fe.b$.write}})],Be.prototype,"angularUnit",void 0),Be=Ue=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageDistanceParameters")],Be);let Ke=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Fe.b$.read,write:Fe.b$.write}})],Ke.prototype,"unit",void 0),Ke=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Ke);const Qe=Ke;let ke=class extends Oe{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,c.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,c.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=i(58174),We=i(79677),Ye=i(93223);let Xe=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{read:de.rS,write:!0}})],Xe.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Xe.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Xe.prototype,"objectIds",void 0),(0,s.Cg)([(0,Ye.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Xe.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,c.MZ)({type:We.A,json:{name:"time",write:!0}})],Xe.prototype,"timeExtent",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],Xe.prototype,"where",void 0),Xe=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfoParameters")],Xe);let et=class extends(we(O.o)){constructor(){super(...arguments),this.id=null}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,c.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let it=class extends O.o{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],it.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],it.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({type:Date,json:{write:!0}})],it.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],it.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],it.prototype,"cameraID",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],it.prototype,"center",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],it.prototype,"gps",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],it.prototype,"orientation",void 0),it=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfo")],it);const rt=it;let st=class extends O.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,c.MZ)({type:[rt],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,c.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfoResult")],st);let ot=nt=class extends Te{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,v.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0}})],ot.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],ot.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],ot.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],ot.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],ot.prototype,"operationType",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Fe.Sk.read,write:Fe.Sk.write}})],ot.prototype,"linearUnit",void 0),ot=nt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageHeightParameters")],ot);let at=class extends Oe{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],at.prototype,"height",void 0),at=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageHeightResult")],at);var lt,ut=i(22048);let pt=lt=class extends O.o{constructor(e){super(e),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=X.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new lt((0,v.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,c.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,c.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,c.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=i(22671);let mt=class extends O.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,c.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageIdentifyResult")],mt);let ht=dt=class extends O.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,c.MZ)({type:[ge.A],json:{write:!0}})],ht.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],ht.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:b.jz,json:{write:!0}})],ht.prototype,"rasterId",void 0),ht=dt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePixelLocationParameters")],ht);let yt=class extends O.o{constructor(e){super(e),this.geometries=null}};var gt;(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],yt.prototype,"geometries",void 0),yt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePixelLocationResult")],yt);let ft=gt=class extends Te{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new gt((0,v.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=gt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePointParameters")],ft);let wt=class extends Oe{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{name:"point.value",read:!0,write:!0}})],wt.prototype,"point",void 0),wt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePointResult")],wt);var vt=i(34606),Rt=i(51508);let Ct=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,Me.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,c.MZ)({types:[xe.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,c.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,c.MZ)({type:F.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,c.MZ)({type:F.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,c.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageUrlParameters")],St);let It=class extends O.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,c.MZ)({json:{name:"imageURL",write:!0}})],It.prototype,"url",void 0),It=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageUrlResult")],It);const Ft=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let Mt=class extends((0,o.OU)(O.o)){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,Me.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,c.MZ)({types:[xe.yR]})],Mt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Mt.prototype,"writeGeometries",null),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],Mt.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],Mt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Mt.prototype,"constantZ",void 0),(0,s.Cg)([(0,c.MZ)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],Mt.prototype,"baseType",void 0),Mt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolumeParameters")],Mt);let xt=class extends O.o{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"cut",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"fill",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"maxz",write:!0}})],xt.prototype,"maxZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"minz",write:!0}})],xt.prototype,"minZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"meanz",write:!0}})],xt.prototype,"meanZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"fillCellCount",void 0),xt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolume")],xt);const At=xt;let Dt=class extends O.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,c.MZ)({type:[At],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Tt=class extends((0,o.OU)(O.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e))}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Tt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Tt.prototype,"rasterId",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Tt.prototype,"visibleOnly",void 0),Tt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MapToImageParameters")],Tt);let Nt=class extends O.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),ge.A.fromJSON(e)}};var Pt;(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Length",write:!0}})],Nt.prototype,"length",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Area",write:!0}})],Nt.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{name:"Center",write:!0}})],Nt.prototype,"center",void 0),(0,s.Cg)([(0,Le.w)("center")],Nt.prototype,"readCenter",null),Nt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureAreaFromImageResult")],Nt);let Ot=Pt=class extends O.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,v.o8)({geometry:this.geometry,rasterId:this.rasterId});return new Pt(e)}};(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],Ot.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Ot.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Ot.prototype,"rasterId",void 0),Ot=Pt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureFromImageParameters")],Ot);let Zt=class extends O.o{constructor(e){super(e),this.geometry=null,this.length=null}};function jt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function _t(e,t,i){t=(0,b.PZ)(ut.A,t);const r=(0,ye.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,he.el)(s),o=t.toJSON();jt(o);const a=n?.[0];null!=a&&(o.geometry=Jt(a));const l=(0,ye.lF)({...r.query,f:"json",...o});return(0,ye.jV)(l,i)}async function Vt(e,t,i){t=(0,b.PZ)(pt,t);const r=(0,ye.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,he.el)(s).then(e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(Jt(n)));const o=(0,ye.lF)({...r.query,f:"json",...s}),a=(0,ye.jV)(o,i);return(0,w.A)(r.path+"/identify",a)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,i,r){const s=(0,ye.Dl)(e),n=await(0,he.el)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Jt(n[1])));const a=(0,ye.lF)({...s.query,f:"json",...o}),l=(0,ye.jV)(a,r),{data:u}=await(0,w.A)(s.path+"/measure",l);return u}async function Et(e,t,i){t=(0,b.PZ)(Ot,t);const r=(0,ye.Dl)(e),s=t.toJSON(),n=(0,ye.lF)({...r.query,f:"json",...s}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(r.path+"/measureFromImage",o);return a}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function zt(e,t){if(!e.imageCoordinateSystem)return(0,M.YX)(e);const i=Gt(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}(0,s.Cg)([(0,c.MZ)({types:xe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Zt.prototype,"geometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Length",write:!0}})],Zt.prototype,"length",void 0),Zt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureLengthFromImageResult")],Zt);var Lt=i(82371),$t=i(20223),Ut=i(20615),Bt=i(74910),Kt=i(78286),Qt=i(99199),kt=i(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=(0,b.Qp)(b.GB,{min:0,max:255}),Yt=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new ie({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?X.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=X.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?X.A.fromJSON(i):this._isMosaicRuleSupported(t)?X.A.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Wt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return(0,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),L(s)||l.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,le.DV)(i),s=(0,le.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,le.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,le.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?F.A.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=ee.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:o}=e;if(o&&"lerc"!==this.format&&(r??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(o||!this._isPicture())&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}async highlightPixels(e,t){const i=e.highlightOptions.map(e=>{const t={...e},i="bandId"in t?[t.bandId??0]:[t.xBandId,t.yBandId];for(let e=0;e<i.length;e++){const t=i[e];if(null==t)return;const r=this.bandIds?.length?this.bandIds.indexOf(t):t;if(r<0||r>2)return;i[e]=r}return"bandId"in t?t.bandId=i[0]:(t.xBandId=i[0],t.yBandId=i[1]),t}).filter(e=>null!=e);if(0===i.length)return;const r=this._rasterJobHandler;r?await r.highlightPixels({...e,highlightOptions:i},t):(0,D._F)({...e,highlightOptions:i})}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,v.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(t=(0,b.PZ)(Mt,t)).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...r}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(`${s.path}/calculateVolume`,o);return Dt.fromJSON({volumes:a.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new a.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Se,t),s=r.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),r?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(r.point.spatialReference)),r?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(r.spatialReference));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...s}),a=(0,ye.jV)(o,i),{data:l}=await(0,w.A)(`${n.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new F.A({wkid:0,imageCoordinateSystem:l.spatialReference}):F.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Ie(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(ht,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=Gt(s[e].spatialReference));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...r}),a=(0,ye.jV)(o,i),{data:l}=await(0,w.A)(`${n.path}/computePixelLocation`,a);return yt.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new a.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ye.Dl)(e),{data:n}=await(0,w.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new a.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ye.Dl)(e),{data:n}=await(0,w.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:o}=n;return o?.length&&o.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new a.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(ot,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return at.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(Pe,t),s=await qt(e,r,[r.geometry],i);return Ge.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(Be,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return ke.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(ft,t),s=await qt(e,r,[r.geometry],i);return wt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new a.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=await Et(e,t,i);return Zt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new a.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=await Et(e,t,i);return Nt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async internalFetchImage(e,t,i,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let o=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(o=!0,n.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(o&&(n.requestRawData=!1),null==a){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ae.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ae.A({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:a,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new ie({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,r.bandIds||delete n.bandIds,delete n.compressionQuality;const o={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:a}=await this._requestArrayBuffer(o);return a??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,w.A)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new a.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,w.A)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ye.Dl)(e),s=(0,ye.lF)({...r?.query,f:"json"}),n=(0,ye.jV)(s,i),o=`${r?.path}/${t}/info`,a=(0,w.A)(`${o}`,n),l=(0,w.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=S.A.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,f=new ge.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,R=new $t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:f,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:v,keyProperties:c,storageInfo:R})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,w.A)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i?.ics;if(!s)return;let n=null;try{n=(await(0,w.A)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,w.A)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,M.YX)(a),outSR:"0:"+e},u=(0,w.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,M.YX)(a),outSR:"0:"+e},y=(0,w.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then(e=>e.data).catch(()=>({})),g=await Promise.all([o,u,y]);let f=g[0].ipxf;if(null==f){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(f={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=S.A.fromJSON(g[1]?.geometries?.[0]);v&&(v.spatialReference=new F.A({wkid:0,imageCoordinateSystem:s}));const R=g[2].geometries?g[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:f,icsExtent:v,northDirection:null};let b=0,I=0,x=0,A=0;for(let e=0;e<C;e++)b+=R[e].x,I+=R[e].y,x+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const D=(C*A-b*I)/(C*x-b*b);let T=0;const N=R[4].x>R[0].x,P=R[4].y>R[0].y;return D===1/0?T=P?90:270:0===D?T=N?0:180:D>0?T=N?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(T=P?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:f,icsExtent:v,northDirection:T}}async generateRasterInfo(e,t){e=(0,b.PZ)(_.A,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,Lt.Tw)(r(this.parsedUrl),this.sourceJSON,i);const s=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(e);if(!s)throw new a.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const n=(0,Lt.X6)(r(this.parsedUrl),e,i);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,i,s,n){const o=zt((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));n??=this.exportImageServiceParameters;const a=n.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(a.noData=u.join(","));const h=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,s=h.timeExtent,a.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const y={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?y.time=""+e:null==e&&null==t||(y.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+i,...a,...y}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new a.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,v.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(t=(0,b.PZ)(vt.A,t)).toJSON();jt(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=Jt(n));const o=(0,ye.Dl)(e),a=(0,ye.lF)({...o.query,f:"json",...r}),l=(0,ye.jV)(a,i),{data:u}=await(0,w.A)(`${o.path}/getSamples`,l),p=u.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new a.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,v.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=I.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new a.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new a.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(bt,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=Jt(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...r}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(`${s.path}/imageToMap`,o);return(0,de.rS)(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new a.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(Ct,t)).toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...r}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(`${s.path}/imageToMapMultiray`,o);return(0,de.rS)(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new a.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(Tt,t)).toJSON(),s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=Jt(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=zt(o));const a=(0,ye.Dl)(e),l=(0,ye.lF)({...a.query,f:"json",...r}),u=(0,ye.jV)(l,i),{data:p}=await(0,w.A)(`${a.path}/mapToImage`,u);return(0,de.rS)(p)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new a.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(fe,t)).toJSON(),s=await(0,he.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=Jt(s[0]),s[0].spatialReference&&(r.inSR=zt(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=Jt(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...r}),a=(0,ye.jV)(o,i),{data:l}=await(0,w.A)(`${n.path}/find`,a);return Ce.fromJSON(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new a.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,b.PZ)(St,t)).toJSON(),s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...r}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(`${s.path}/getImageUrl`,o);return It.fromJSON(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new a.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){t=(0,b.PZ)(ze,t);const r=(0,ye.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=zt(t.outSpatialReference));const n=(0,ye.lF)({...r.query,f:"json",...s}),o=(0,ye.jV)(n,i),{data:a}=await(0,w.A)(r.path+"/queryBoundary",o);return $e.fromJSON(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const i=await(0,Qt.s)(this.url,e,t),r=this.graphicOrigin;return i.features.forEach(e=>{e.layer=this,e.origin=r}),i}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new a.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(t=(0,b.PZ)(Xe,t)).toJSON();jt(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=Jt(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=zt(o));const a=(0,ye.Dl)(e),l=(0,ye.lF)({...a.query,f:"json",...r}),u=(0,ye.jV)(l,i),{data:p}=await(0,w.A)(`${a.path}/queryGPSInfo`,u);return st.fromJSON(p)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Ut.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new a.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=le.F_.servicePixelValue.toLowerCase(),c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]});l=t.map(e=>new _.A({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some(e=>e.functionName===i.functionName)&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let h=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,x.Rp)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new a.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=I.A.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new pt(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await Vt(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!m&&i?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,x.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:h,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const c=this.objectIdField||"ObjectId",d=i.catalogItems?.features??[],g=d.map(e=>e.attributes?.[c]),f=new kt.A({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[c]}),v=await this.queryRasters(f);return v?.features?.length&&v.features.forEach(t=>{d.forEach(i=>{i.attributes[c]===t.attributes[c]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new a.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,w.A)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,w.A)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([i,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,x.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Lt.Tw)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Lt.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),l.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach(e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!c){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new P.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new a.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const i=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:i,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:s}=await(0,w.A)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new a.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,pe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??(0,pe.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,pe.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,A.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,w.A)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,w.A)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,ne.m)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),l=(0,w.A)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,A.g)(u)),!c)throw new a.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,A.D)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,x.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new X.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&(!c||s)){const e={};e[p]=0,u=[i],l=[new f.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:h}=le.F_,y=this.rasterFields.some(e=>e.name===d),g=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;y&&(t.attributes[d]=n),t.attributes[h]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:o;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=g,n&&this._updateFeatureWithDomainValues(t),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const i=`${le.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,x.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,x.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const o=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));o&&o[0]&&s.forEach(t=>{const i=le.ER+t.name;e.attributes[i]=o[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ae.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new S.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,T.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=o[0],e.attributes[le.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),a=t.includes("edit"),l=t.includes("mensuration")&&o,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),h=c&&e.fields&&e.fields.length>0,y=h&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&c,supportsImageToMapMultiray:i>=11.2&&c,supportsMapToImage:i>=11.2&&c,supportsFindImages:i>=11.2&&c,supportsGetImageUrl:i>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:m,supportsQuery:h,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:i>=10.7&&c,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&c,supportsAdd:a,supportsDelete:a,supportsEditing:a,supportsUpdate:a,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!y?.supportsStatistics,supportsOrderBy:!!y?.supportsOrderBy,supportsDistinct:!!y?.supportsDistinct,supportsPagination:!!y?.supportsPagination,supportsPaginationOnAggregatedQueries:!!y?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!y?.useStandardizedQueries,supportsPercentileStatistics:!!y?.supportsPercentileStatistics,supportsCentroid:!!y?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!y?.supportsQueryWithDistance,supportsExtent:!!y?.supportsReturningQueryExtent,supportsGeometryProperties:!!y?.supportsReturningGeometryProperties,supportsHavingClause:!!y?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:y?.supportsSqlExpression??!!y,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!y?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function r(e){return e?.path??""}return(0,s.Cg)([(0,c.MZ)({clonable:!1})],i.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Le.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],i.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,c.MZ)()],i.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,c.MZ)({type:[b.jz],json:{write:!0}})],i.prototype,"bandIds",void 0),(0,s.Cg)([(0,Le.w)("bandIds")],i.prototype,"readBandIds",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],i.prototype,"capabilities",void 0),(0,s.Cg)([(0,Le.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],i.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({type:Number})],i.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],i.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,c.MZ)({type:Number})],i.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],i.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],i.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Le.w)("defaultMosaicRule",["defaultMosaicMethod"])],i.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,constructOnly:!0})],i.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,c.MZ)()],i.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:[re.A]})],i.prototype,"fields",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"fieldsIndex",null),(0,s.Cg)([(0,c.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],i.prototype,"format",null),(0,s.Cg)([(0,Le.w)("service","format",["serviceDataType"])],i.prototype,"readFormat",null),(0,s.Cg)([(0,c.MZ)({type:S.A})],i.prototype,"fullExtent",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"maxImageHeight"}}})],i.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"maxImageWidth"}}})],i.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],i.prototype,"interpolation",void 0),(0,s.Cg)([(0,c.MZ)()],i.prototype,"minScale",void 0),(0,s.Cg)([(0,Le.w)("service","minScale")],i.prototype,"readMinScale",null),(0,s.Cg)([(0,c.MZ)()],i.prototype,"maxScale",void 0),(0,s.Cg)([(0,Le.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,s.Cg)([(0,c.MZ)({type:X.A})],i.prototype,"mosaicRule",null),(0,s.Cg)([(0,Le.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],i.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],i.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,c.MZ)()],i.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:oe.A,json:{write:!0}})],i.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,c.MZ)({json:{type:b.jz}})],i.prototype,"noData",void 0),(0,s.Cg)([(0,te.K)("noData")],i.prototype,"writeNoData",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],i.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],i.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Le.w)("objectIdField")],i.prototype,"readObjectIdField",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"geometryType",void 0),(0,s.Cg)([(0,c.MZ)({})],i.prototype,"typeIdField",void 0),(0,s.Cg)([(0,c.MZ)({})],i.prototype,"types",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"parsedUrl",null),(0,s.Cg)([(0,c.MZ)({type:Function})],i.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,c.MZ)()],i.prototype,"raster",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"sourceType",void 0),(0,s.Cg)([(0,Le.w)("sourceType",["serviceSourceType","fields"])],i.prototype,"readSourceType",null),(0,s.Cg)([(0,c.MZ)()],i.prototype,"viewId",void 0),(0,s.Cg)([(0,c.MZ)({types:me.uy})],i.prototype,"renderer",null),(0,s.Cg)([(0,c.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],i.prototype,"internalRenderer",null),(0,s.Cg)([(0,Le.w)("internalRenderer")],i.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],i.prototype,"writeRenderer",null),(0,s.Cg)([(0,c.MZ)({clonable:!1})],i.prototype,"symbolizer",void 0),(0,s.Cg)([(0,c.MZ)(N.ke)],i.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"rasterFields",null),(0,s.Cg)([(0,c.MZ)({constructOnly:!0})],i.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,c.MZ)({type:_.A,json:{name:"renderingRule"}})],i.prototype,"rasterFunction",null),(0,s.Cg)([(0,Le.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],i.prototype,"readRasterFunction",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:F.A})],i.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Le.w)("spatialReference",["spatialReference","extent"])],i.prototype,"readSpatialReference",null),(0,s.Cg)([(0,c.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],i.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],i.prototype,"writePixelType",null),(0,s.Cg)([(0,c.MZ)({constructOnly:!0,type:ue.A})],i.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,c.MZ)()],i.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)(N.OZ)],i.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],i.prototype,"version",void 0),(0,s.Cg)([(0,Le.w)("version",["currentVersion","fields","timeInfo"])],i.prototype,"readVersion",null),i=(0,s.Cg)([(0,c.$K)("esri.layers.mixins.ArcGISImageService")],i),i};var Xt=i(18768),ei=i(63074),ti=i(69208),ii=i(16131),ri=i(8303),si=i(63660),ni=i(56551),oi=i(54310),ai=i(25036),li=i(82935),ui=i(91908),pi=i(56776),ci=i(30291),mi=i(88625);let di=class extends((0,ei.dM)((0,li.e)((0,ai.j)((0,ii.q)((0,ri.A)((0,ni.H)(Yt((0,si.G)((0,oi.J)((0,ti.d)((0,Xt.b)((0,u.P)((0,o.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,p.sg)(async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return s(this,t);case 1:return n(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),o=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(o)||s&&t.startsWith(n)||i.add(e.name)}const a=(0,ci.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return a?.fieldInfos&&l&&(0,le.h4)(a.fieldInfos,l),a}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,ui.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}_validateElevationInfo(e){(0,pi.XF)(l.A.getLogger(this),(0,pi.$7)("Imagery layers","relative-to-scene",e)),(0,pi.XF)(l.A.getLogger(this),(0,pi.tW)("Imagery layers",e))}};(0,s.Cg)([(0,c.MZ)({type:mi.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],di.prototype,"elevationInfo",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],di.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,c.MZ)(N.fV)],di.prototype,"legendEnabled",null),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],di.prototype,"listMode",null),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],di.prototype,"isReference",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],di.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,te.K)("web-map","operationalLayerType")],di.prototype,"writeOperationalLayerType",null),(0,s.Cg)([(0,c.MZ)(N.M6)],di.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,c.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],di.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],di.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,c.MZ)(N.PY)],di.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],di.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],di.prototype,"_isPreviewLayer",null),di=(0,s.Cg)([(0,c.$K)("esri.layers.ImageryLayer")],di);const hi=di},91908:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},92722:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(69397);class s{constructor(e=[],t=[],i=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:r}){return new s(e,t,i||!1,r||!1)}static fromRect([e,t,i,r]){const n=i-e,o=r-t;return new s([5],[e,t,n,0,0,o,-n,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const i of this.lengths){if(i<3)continue;const{stride:r}=this;let s=this.coords[r*t],n=this.coords[r*t+1];for(let o=1;o<i;o+=1){const i=r*(t+o),a=this.coords[i],l=this.coords[i+1];e+=-.5*(a-s)*(l+n),s=a,n=l}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:i}=this;for(const r of this.lengths){for(let s=0;s<r;s++){const r=i*(t+s);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let r=0;const{stride:s}=this;for(const e of i){for(let i=1;i<e;i++){const e=s*(r+i);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}r+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:i,size:r}=this,n=this.coords.slice(0,r*i);return e?(e.set(n),new s(t,e)):new s(t,Array.from(n),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const i=new Array(t*e);for(let t=0,r=0;t<i.length;t+=e)i[r++]=this.coords[t],i[r++]=this.coords[t+1];return new s(this.lengths,i,!1,!1)}}},95466:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(49186),s=i(53966),n=i(91869),o=i(3330),a=i(12195),l=i(30524),u=i(98623),p=i(56400),c=i(28097);const m=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],f(e))}static fromLayerJSON(e){return new d(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const s=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):g.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?c.mQ.utcInstance:(0,n.tE)(m,t,()=>c.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const g=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,p.ZS)(s.dateFieldsTimeReference):a??u.n$:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,p.ZS)(r.timeReference):a:null,m=new Map([[h(s?.creationDateField??""),l],[h(s?.editDateField??""),l],[h(n),c],[h(o),c]]);for(const{name:r,type:s}of e.fields)if(g.has(s))t.set(r,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u.L5);else{const e=m.get(h(r??""))??a;t.set(r,e)}return t}},99199:(e,t,i)=>{i.d(t,{e:()=>l,s:()=>a});var r=i(2272),s=i(80893),n=i(22671),o=i(61956);async function a(e,t,i,r){const s=await l(e,t,i,r);return n.A.fromJSON(s)}function l(e,t,i,n){const a=(0,r.Dl)(e),l={...i},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8824],{18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(31635),s=r(53966),n=r(91429),o=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}},20615:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(2272),s=r(80893),n=r(61956);function o(e,t,r,o){return(0,s.gW)((0,i.Dl)(e),n.A.from(t),r,o)}},27647:(e,t,r)=>{r.d(t,{Q:()=>n});var i=r(92722);function s(e,t){return e?t?4:3:t?3:2}function n(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:s,hasZ:n,hasM:l}=e,u=new i.A([],[],n,!1),p=u.coords,c=[],m=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let d=0;for(const e of t){const t=o(m,r,d,e,n,l);t&&c.push(t),d+=e*s}if(c.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&n&&(r=e[4]-t[4]),r}),c.length){let e=6*c[0][2];p[0]=c[0][0]/e,p[1]=c[0][1]/e,n&&(e=6*c[0][4],p[2]=0!==e?c[0][3]/e:0),(p[0]<m[0]||p[0]>m[1]||p[1]<m[2]||p[1]>m[3]||n&&(p[2]<m[4]||p[2]>m[5]))&&(p.length=0)}if(!p.length){const i=e.lengths[0]?a(r,0,t[0],n,l):null;if(!i)return null;p[0]=i[0],p[1]=i[1],n&&(p[2]=i[2]??0)}return u}function o(e,t,r,i,n,o){const a=s(n,o);let l=r,u=r+a,p=0,c=0,m=0,d=0,h=0;for(let r=0,s=i-1;r<s;r++,l+=a,u+=a){const r=t[l],i=t[l+1],s=t[l+2],o=t[u],a=t[u+1],y=t[u+2];let g=r*a-o*i;d+=g,p+=(r+o)*g,c+=(i+a)*g,n&&(g=r*y-o*s,m+=(s+y)*g,h+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),h>0&&(h*=-1),!d)return null;const y=[p,c,.5*d];return n&&(y[3]=m,y[4]=.5*h),y}function a(e,t,r,i,n){const o=s(i,n);let a=t,m=t+o,d=0,h=0,y=0,g=0;for(let t=0,s=r-1;t<s;t++,a+=o,m+=o){const t=e[a],r=e[a+1],s=e[a+2],n=e[m],o=e[m+1],f=e[m+2],w=i?u(t,r,s,n,o,f):l(t,r,n,o);if(w)if(d+=w,i){const e=c(t,r,s,n,o,f);h+=w*e[0],y+=w*e[1],g+=w*e[2]}else{const e=p(t,r,n,o);h+=w*e[0],y+=w*e[1]}}return d>0?i?[h/d,y/d,g/d]:[h/d,y/d]:r>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,r,i){const s=r-e,n=i-t;return Math.sqrt(s*s+n*n)}function u(e,t,r,i,s,n){const o=i-e,a=s-t,l=n-r;return Math.sqrt(o*o+a*a+l*l)}function p(e,t,r,i){return[e+.5*(r-e),t+.5*(i-t)]}function c(e,t,r,i,s,n){return[e+.5*(i-e),t+.5*(s-t),r+.5*(n-r)]}},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(74887);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},43334:(e,t,r)=>{r.d(t,{N3:()=>a,Om:()=>o});var i=r(69397),s=r(27647),n=r(92722);class o{constructor(e=null,t={},r,i,s=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=s}static fromJSON(e){const t=e.geometry?n.A.fromJSON(e.geometry):null,r=e.centroid?n.A.fromJSON(e.centroid):null,i=e.objectId;return new o(t,e.attributes,r,i)}weakClone(){const e=new o(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new o(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,i.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},56551:(e,t,r)=>{r.d(t,{H:()=>c});var i=r(31635),s=r(91429),n=r(69540),o=r(25482),a=r(56507),l=r(94359),u=r(93223);let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,i.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,i.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],r.prototype,"activePresetRendererName",void 0),(0,i.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],r.prototype,"presetRenderers",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],r),r}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},62815:(e,t,r)=>{r.d(t,{N:()=>o});var i=r(86211),s=r(73941),n=r(21325);function o(e,t,r){if(null==t||null==r||r.vcsWkid||(0,n.aI)(t,r)||(0,s.xP)(t)||(0,s.xP)(r))return;const o=(0,i.G9)(t)/(0,i.G9)(r);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}},69397:(e,t,r)=>{r.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>h,ez:()=>m,lM:()=>o,qK:()=>c});var i=r(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=l(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return p(e,8);let r=m;for(let i=0;i<t;i++)r+=l(e[i]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=l(e[r]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?p(t,n):0:0),0)}function p(e,t){return m+e.length*t}const c=32,m=16,d=145,h=64},74379:(e,t,r)=>{r.d(t,{V:()=>i,t:()=>s});const i=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&i in e}},74910:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(5443),s=r(2272),n=r(80893),o=r(61956);async function a(e,t,r){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...r}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:i.A.fromJSON(u)}}},78286:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r,o){const a=(0,i.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),r,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},82371:(e,t,r)=>{r.d(t,{E9:()=>h,Tw:()=>m,X6:()=>d});var i=r(11254),s=r(5443),n=r(86738),o=r(16930),a=r(87186),l=r(20223),u=r(2272),p=r(22671);async function c(e,t,r){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},h=m?JSON.stringify(m.rasterFunctionDefinition||m):null,y=(0,u.lF)({...c.query,renderingRule:h,f:"json"}),g=(0,u.jV)(y,r);e=c.path;const f=d||await(0,i.A)(e,g).then(e=>e.data),w=f.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,g):null,v=f.hasColormap?(0,i.A)(`${e}/colormap`,g):null,R=f.hasHistograms?(0,i.A)(`${e}/histograms`,g):null,C=f.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,g):null,b=f.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,g):null,S=await Promise.allSettled([w,v,R,C,b]);let I=null;if(f.minValues&&f.minValues.length===f.bandCount){I=[];for(let e=0;e<f.minValues.length;e++)I.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const M=s.A.fromJSON(f.extent),x=Math.ceil(M.width/f.pixelSizeX-.1),A=Math.ceil(M.height/f.pixelSizeY-.1),F=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===S[0].status?S[0].value?.data:null,N=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===S[1].status?S[1].value?.data.colormap:null,P=T?.length?T:null,j="fulfilled"===S[2].status?S[2].value?.data.histograms:null,O=j?.[0]?.counts?.length?j:null,Z="fulfilled"===S[3].status?S[3].value?.data??{}:{},_="fulfilled"===S[4].status?S[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:q,serviceDataType:E}=f;q&&q!==Z.DefaultVariable&&(Z.DefaultVariable=q),E?.includes("esriImageServiceDataTypeVector")&&!E.includes(Z.DataType)&&(Z.DataType=E.replace("esriImageServiceDataType",""));let J=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==J)&&(J=f.noDataValues);const G=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:F}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(x,A))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:x,height:A,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:F,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:F}),pixelType:f.pixelType.toLowerCase(),statistics:I,attributeTable:N,colormap:P,histograms:O,keyProperties:Z,noDataValue:J,multidimensionalInfo:V,storageInfo:G})}function m(e,t,r){return c(e,{sourceJSON:t},r)}function d(e,t,r){return c(e,{rasterFunction:t},r)}function h(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},87772:(e,t,r)=>{r.r(t),r.d(t,{default:()=>hr});var i,s=r(31635),n=r(37838),o=r(69540),a=r(49186),l=r(53966),u=r(25728),p=r(74887),c=r(91429),m=r(89808),d=r(99959),h=r(74379);class y extends d.A{get[(i=h.V,m.Q)](){return this.layer}constructor(e){super(),this[i]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=r(4146),f=r(52106),w=r(11254),v=r(4718),R=r(36708),C=r(84952),b=r(56507),S=r(5443),I=r(39829),M=r(16930),x=r(21325),A=r(4366),F=r(20758),D=r(47520),N=r(34251),T=r(10873),P=r(45617),j=r(25482),O=r(94778);const Z={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var _=r(22796),V=r(67369),q=r(70274),E=r(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function L(e){return z.has(e.type)}function $(e,t){if(!e||!t)return(0,v.o8)(e||t);const r=(0,v.o8)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),U(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(B(r.functionArguments).Raster=t);return r}function U(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&U(e[r].arguments,t))}function K(e){const t=(0,v.o8)(Z[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=K(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=Y(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function B(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?B(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const r=J.has(t)?(0,O.hP)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,r=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return r?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function Y(e){const t=[],r=[];return e.forEach(e=>{t.push(e[0]),r.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:r}}var X=r(85675),ee=r(13868),te=r(43937);let re=class extends j.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new X.A({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return $(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),this.requestRawData||!i||r||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&L(i)?$(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new _.A;i.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===Q.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===Q.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,i.outputPixelType=n):s===Q.minMax?i.outputPixelType=n:s===Q.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=a,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(r)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const r=(0,V.hs)(s,!0);if(r)n.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach(e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new _.A({rasterFunctionDefinition:K(n)}):n}return r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))})});const r=a?k(n,a):n,i=new _.A;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(i)}):i}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});const c=a?k(n,a):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:K(d)}):d}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=H(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach(e=>{const r=e.value,i=W(e);null!=r&&i?.a&&t.set(String(r),i.toRgb())});const i=e.field;i&&n.forEach(({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])})}}else for(let e=0;e<l.length;e++){const t=l[e],i=W(t),s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i?k(r,i):r,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?k(r,i):r,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:K(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new _.A;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(2===s?.length){const e=s.map(e=>e.toLowerCase());o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new E.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const m=K(r);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new _.A;const i=new _.A;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,V.hf)(e.colorRamp):o.Colormap=(0,V.R8)(e.colorRamp)),r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new _.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new _.A({rasterFunctionDefinition:K(i)}):i,$(i,e)}};(0,s.Cg)([(0,c.MZ)()],re.prototype,"layer",void 0),(0,s.Cg)([(0,c.MZ)()],re.prototype,"requestRawData",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],re.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"bandIds",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"compression",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],re.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],re.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"format",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],re.prototype,"interpolation",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"noData",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],re.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,c.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],re.prototype,"pixelType",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],re.prototype,"writeLercVersion",null),(0,s.Cg)([(0,c.MZ)({type:Number})],re.prototype,"version",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],re.prototype,"mosaicRule",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0,name:"renderingRule"}})],re.prototype,"rasterFunction",null),re=(0,s.Cg)([(0,c.$K)("esri.layers.support.ExportImageServiceParameters")],re);var ie=r(20437),se=r(95466),ne=r(33446),oe=r(43577),ae=r(14140),le=r(74797),ue=r(87186),pe=r(12711),ce=r(85676),me=r(94359),de=r(65864),he=r(17136),ye=r(2272),ge=r(86738);let fe=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,c.$K)("esri.rest.support.FindImagesParameters")],fe);const we=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"make",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"model",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"focalLength",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"rows",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],r.prototype,"cols",void 0),r=(0,s.Cg)([(0,c.$K)("esri.rest.support.CameraInfoMixin")],r),r};let ve=class extends(we(j.o)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"uri",write:!0}})],ve.prototype,"referenceUri",void 0),(0,s.Cg)([(0,c.MZ)({type:Date,json:{write:!0}})],ve.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],ve.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"cameraID",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],ve.prototype,"center",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],ve.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],ve.prototype,"orientation",void 0),ve=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageInspectionInfo")],ve);const Re=ve;let Ce=class extends j.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,c.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,c.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends j.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,v.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,c.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,c.MZ)({type:M.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,c.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAngleParameters")],Se);let Ie=class extends j.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"north",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ie.prototype,"up",void 0),(0,s.Cg)([(0,c.MZ)({type:M.A,json:{write:!0}})],Ie.prototype,"spatialReference",void 0),Ie=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAngleResult")],Ie);var Me=r(86211),xe=r(60408),Ae=r(50498),Fe=r(66552);const De=new Fe.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Ne=class extends j.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Te;(0,s.Cg)([(0,c.MZ)()],Ne.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Ne.prototype,"measureOperation",void 0),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],Ne.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],Ne.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Ne.prototype,"raster",void 0),Ne=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureParameters")],Ne);let Pe=Te=class extends Ne{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Te((0,v.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"fromGeometry",read:!0,write:!0}})],Pe.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pe.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],Pe.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],Pe.prototype,"is3D",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],Pe.prototype,"linearUnit",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Me.dk.read,write:Me.dk.write}})],Pe.prototype,"areaUnit",void 0),Pe=Te=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAreaParameters")],Pe);let je=class extends j.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],je.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],je.prototype,"sensorName",void 0),je=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureResult")],je);var Oe=r(64108);let Ze=class extends j.o{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,c.MZ)({type:String})],Ze.prototype,"unit",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"value",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:!0,write:!0}})],Ze.prototype,"displayValue",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"uncertainty",void 0),Ze=(0,s.Cg)([(0,c.$K)("esri.rest.support.BaseImageMeasureResultValue")],Ze);const _e=Ze;let Ve=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Me.dk.read,write:Me.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Oe.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Me.Sk.read,write:Me.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends je{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,c.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,c.MZ)({type:M.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var Le=r(36005);let $e=class extends j.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?I.A.fromJSON(e):S.A.fromJSON(e)}};var Ue;(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],$e.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"shape",write:!0}})],$e.prototype,"geometry",void 0),(0,s.Cg)([(0,Le.w)("geometry")],$e.prototype,"readGeometry",null),$e=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageBoundaryResult")],$e);let Ke=Ue=class extends Ne{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Ue((0,v.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],Ke.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Ke.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],Ke.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],Ke.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],Ke.prototype,"is3D",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],Ke.prototype,"linearUnit",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Me.b$.read,write:Me.b$.write}})],Ke.prototype,"angularUnit",void 0),Ke=Ue=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageDistanceParameters")],Ke);let Be=class extends _e{constructor(){super(...arguments),this.unit=null}};(0,s.Cg)([(0,c.MZ)({json:{read:Me.b$.read,write:Me.b$.write}})],Be.prototype,"unit",void 0),Be=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Be);const Qe=Be;let ke=class extends je{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,c.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,c.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=r(58174),We=r(79677),Ye=r(93223);let Xe=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{read:de.rS,write:!0}})],Xe.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Xe.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Xe.prototype,"objectIds",void 0),(0,s.Cg)([(0,Ye.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Xe.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,c.MZ)({type:We.A,json:{name:"time",write:!0}})],Xe.prototype,"timeExtent",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],Xe.prototype,"where",void 0),Xe=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfoParameters")],Xe);let et=class extends(we(j.o)){constructor(){super(...arguments),this.id=null}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,c.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let rt=class extends j.o{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],rt.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],rt.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({type:Date,json:{write:!0}})],rt.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],rt.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],rt.prototype,"cameraID",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],rt.prototype,"center",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],rt.prototype,"gps",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],rt.prototype,"orientation",void 0),rt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfo")],rt);const it=rt;let st=class extends j.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,c.MZ)({type:[it],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,c.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageGPSInfoResult")],st);let ot=nt=class extends Ne{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,v.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0}})],ot.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],ot.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{read:!0,write:!0}})],ot.prototype,"toGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{write:De.write}})],ot.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],ot.prototype,"operationType",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],ot.prototype,"linearUnit",void 0),ot=nt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageHeightParameters")],ot);let at=class extends je{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,c.MZ)({type:Je,json:{read:!0,write:!0}})],at.prototype,"height",void 0),at=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageHeightResult")],at);var lt,ut=r(22048);let pt=lt=class extends j.o{constructor(e){super(e),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=X.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new lt((0,v.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,c.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,c.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,c.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=r(22671);let mt=class extends j.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,c.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageIdentifyResult")],mt);let ht=dt=class extends j.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,c.MZ)({type:[ge.A],json:{write:!0}})],ht.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],ht.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:b.jz,json:{write:!0}})],ht.prototype,"rasterId",void 0),ht=dt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePixelLocationParameters")],ht);let yt=class extends j.o{constructor(e){super(e),this.geometries=null}};var gt;(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],yt.prototype,"geometries",void 0),yt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePixelLocationResult")],yt);let ft=gt=class extends Ne{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new gt((0,v.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,c.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=gt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePointParameters")],ft);let wt=class extends je{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{name:"point.value",read:!0,write:!0}})],wt.prototype,"point",void 0),wt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImagePointResult")],wt);var vt=r(34606),Rt=r(51508);let Ct=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,r){t.geometries=e?.length?{geometryType:(0,xe.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,c.MZ)({types:[Ae.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,c.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,c.MZ)({type:M.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,c.MZ)({type:M.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,c.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageUrlParameters")],St);let It=class extends j.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,c.MZ)({json:{name:"imageURL",write:!0}})],It.prototype,"url",void 0),It=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageUrlResult")],It);const Mt=new Fe.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let xt=class extends((0,o.OU)(j.o)){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,r){e?.length&&(t.geometryType=(0,xe.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,c.MZ)({types:[Ae.yR]})],xt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],xt.prototype,"writeGeometries",null),(0,s.Cg)([(0,c.MZ)({type:X.A,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],xt.prototype,"constantZ",void 0),(0,s.Cg)([(0,c.MZ)({type:Mt.apiValues,json:{read:Mt.read,write:Mt.write}})],xt.prototype,"baseType",void 0),xt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolumeParameters")],xt);let At=class extends j.o{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],At.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],At.prototype,"cut",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],At.prototype,"fill",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"maxz",write:!0}})],At.prototype,"maxZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"minz",write:!0}})],At.prototype,"minZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"meanz",write:!0}})],At.prototype,"meanZ",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],At.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],At.prototype,"fillCellCount",void 0),At=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolume")],At);const Ft=At;let Dt=class extends j.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,c.MZ)({type:[Ft],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,c.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Nt=class extends((0,o.OU)(j.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e))}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Nt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],Nt.prototype,"rasterId",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Nt.prototype,"visibleOnly",void 0),Nt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MapToImageParameters")],Nt);let Tt=class extends j.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),ge.A.fromJSON(e)}};var Pt;(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"Shape",read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Length",write:!0}})],Tt.prototype,"length",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Area",write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,c.MZ)({type:ge.A,json:{name:"Center",write:!0}})],Tt.prototype,"center",void 0),(0,s.Cg)([(0,Le.w)("center")],Tt.prototype,"readCenter",null),Tt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureAreaFromImageResult")],Tt);let jt=Pt=class extends j.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,v.o8)({geometry:this.geometry,rasterId:this.rasterId});return new Pt(e)}};(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],jt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],jt.prototype,"writeGeometry",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],jt.prototype,"rasterId",void 0),jt=Pt=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureFromImageParameters")],jt);let Ot=class extends j.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Zt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function _t(e,t,r){t=(0,b.PZ)(ut.A,t);const i=(0,ye.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,he.el)(s),o=t.toJSON();Zt(o);const a=n?.[0];null!=a&&(o.geometry=Jt(a));const l=(0,ye.lF)({...i.query,f:"json",...o});return(0,ye.jV)(l,r)}async function Vt(e,t,r){t=(0,b.PZ)(pt,t);const i=(0,ye.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,he.el)(s).then(e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(Jt(n)));const o=(0,ye.lF)({...i.query,f:"json",...s}),a=(0,ye.jV)(o,r);return(0,w.A)(i.path+"/identify",a)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,r,i){const s=(0,ye.Dl)(e),n=await(0,he.el)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Jt(n[1])));const a=(0,ye.lF)({...s.query,f:"json",...o}),l=(0,ye.jV)(a,i),{data:u}=await(0,w.A)(s.path+"/measure",l);return u}async function Et(e,t,r){t=(0,b.PZ)(jt,t);const i=(0,ye.Dl)(e),s=t.toJSON(),n=(0,ye.lF)({...i.query,f:"json",...s}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(i.path+"/measureFromImage",o);return a}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function zt(e,t){if(!e.imageCoordinateSystem)return(0,x.YX)(e);const r=Gt(e),{icsid:i,icsns:s}=r;return null==i||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}(0,s.Cg)([(0,c.MZ)({types:Ae.yR,json:{name:"Shape",read:de.rS,write:!0}})],Ot.prototype,"geometry",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"Length",write:!0}})],Ot.prototype,"length",void 0),Ot=(0,s.Cg)([(0,c.$K)("esri.rest.support.MeasureLengthFromImageResult")],Ot);var Lt=r(82371),$t=r(20223),Ut=r(20615),Kt=r(74910),Bt=r(78286),Qt=r(99199),kt=r(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=(0,b.Qp)(b.GB,{min:0,max:255}),Yt=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new re({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?X.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=X.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?X.A.fromJSON(r):this._isMosaicRuleSupported(t)?X.A.fromJSON(t):null}writeMosaicRule(e,t,r){const{mosaicRule:i}=this;this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Wt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=r?.name}return e}get parsedUrl(){return(0,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const r=t?.find(({name:t})=>t===e);return r?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),L(s)||l.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const r=t?.multidimensionalInfo?.variables[0].unit?.trim(),i=(0,le.DV)(r),s=(0,le.y6)();e.push(i,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const r=(0,le.AL)(t.multidimensionalInfo);e.push(...r)}const r=t?.attributeTable;if(null!=r){const t=(0,le.jC)(r);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?M.A.fromJSON(r):null}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=ee.e8.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e,{renderer:i,symbolizer:s,pixelFilter:n}=this;const{isRawData:o}=e;if(o&&"lerc"!==this.format&&(i??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:i.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(o||!this._isPicture())&&i&&s&&!n){await this._updateSymbolizer(s,i);const{bandIds:n}=this;r=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return r}async highlightPixels(e,t){const r=e.highlightOptions.map(e=>{const t={...e},r="bandId"in t?[t.bandId??0]:[t.xBandId,t.yBandId];for(let e=0;e<r.length;e++){const t=r[e];if(null==t)return;const i=this.bandIds?.length?this.bandIds.indexOf(t):t;if(i<0||i>2)return;r[e]=i}return"bandId"in t?t.bandId=r[0]:(t.xBandId=r[0],t.yBandId=r[1]),t}).filter(e=>null!=e);if(0===r.length)return;const i=this._rasterJobHandler;i?await i.highlightPixels({...e,highlightOptions:r},t):(0,D._F)({...e,highlightOptions:r})}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,v.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,r){const i=(t=(0,b.PZ)(xt,t)).toJSON();i.geometries=JSON.stringify(i.geometries);const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...i}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(`${s.path}/calculateVolume`,o);return Dt.fromJSON({volumes:a.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new a.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Se,t),s=i.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),i?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(i.point.spatialReference)),i?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(i.spatialReference));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...s}),a=(0,ye.jV)(o,r),{data:l}=await(0,w.A)(`${n.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new M.A({wkid:0,imageCoordinateSystem:l.spatialReference}):M.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Ie(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(ht,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=Gt(s[e].spatialReference));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...i}),a=(0,ye.jV)(o,r),{data:l}=await(0,w.A)(`${n.path}/computePixelLocation`,a);return yt.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new a.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ye.Dl)(e),{data:n}=await(0,w.A)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new a.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ye.Dl)(e),{data:n}=await(0,w.A)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new a.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ot,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return at.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new a.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(Pe,t),s=await qt(e,i,[i.geometry],r);return Ge.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new a.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(Ke,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return ke.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new a.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,v.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ft,t),s=await qt(e,i,[i.geometry],r);return wt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new a.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,r){const i=await Et(e,t,r);return Ot.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new a.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,r){const i=await Et(e,t,r);return Tt.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async internalFetchImage(e,t,r,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let o=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(o=!0,n.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(o&&(n.requestRawData=!1),null==a){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ae.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ae.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:a,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,r,i={}){await this._initJobHandler(),i.applyRendering&&this._updateCurrentRasterInfo();const s=i.applyRendering?void 0:new re({layer:this,requestRawData:!0,interpolation:i.interpolation??"nearest",bandIds:i.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,r,i.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,i.bandIds||delete n.bandIds,delete n.compressionQuality;const o={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:i.signal},{pixelData:a}=await this._requestArrayBuffer(o);return a??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,w.A)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new a.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,w.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ye.Dl)(e),s=(0,ye.lF)({...i?.query,f:"json"}),n=(0,ye.jV)(s,r),o=`${i?.path}/${t}/info`,a=(0,w.A)(`${o}`,n),l=(0,w.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=S.A.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,f=new ge.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,R=new $t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:f,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:v,keyProperties:c,storageInfo:R})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,w.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,w.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,w.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,x.YX)(a),outSR:"0:"+e},u=(0,w.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,x.YX)(a),outSR:"0:"+e},y=(0,w.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then(e=>e.data).catch(()=>({})),g=await Promise.all([o,u,y]);let f=g[0].ipxf;if(null==f){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(f={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=S.A.fromJSON(g[1]?.geometries?.[0]);v&&(v.spatialReference=new M.A({wkid:0,imageCoordinateSystem:s}));const R=g[2].geometries?g[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:f,icsExtent:v,northDirection:null};let b=0,I=0,A=0,F=0;for(let e=0;e<C;e++)b+=R[e].x,I+=R[e].y,A+=R[e].x*R[e].x,F+=R[e].x*R[e].y;const D=(C*F-b*I)/(C*A-b*b);let N=0;const T=R[4].x>R[0].x,P=R[4].y>R[0].y;return D===1/0?N=P?90:270:0===D?N=T?0:180:D>0?N=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(N=P?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:f,icsExtent:v,northDirection:N}}async generateRasterInfo(e,t){e=(0,b.PZ)(_.A,e);const r={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,Lt.Tw)(i(this.parsedUrl),this.sourceJSON,r);const s=function(e){const t=JSON.stringify(e),r=t.includes('"rasterFunctionDefinition":{'),i=r?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=i?.map(e=>r?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(e);if(!s)throw new a.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const n=(0,Lt.X6)(i(this.parsedUrl),e,r);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,r,s,n){const o=zt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));n??=this.exportImageServiceParameters;const a=n.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(a.noData=u.join(","));const h=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(h.isOutSide)return null;a.mosaicRule=null!=h.mosaicRule?JSON.stringify(h.mosaicRule):null,s=h.timeExtent,a.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const y={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?y.time=""+e:null==e&&null==t||(y.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+r,...a,...y}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new a.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,v.o8)(e);const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=(t=(0,b.PZ)(vt.A,t)).toJSON();Zt(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=Jt(n));const o=(0,ye.Dl)(e),a=(0,ye.lF)({...o.query,f:"json",...i}),l=(0,ye.jV)(a,r),{data:u}=await(0,w.A)(`${o.path}/getSamples`,l),p=u.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new a.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,v.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=I.A.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new a.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new a.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(bt,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(i.geometry=Jt(t.geometry)),t.depthOffset&&t.adjust||delete i.options;const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...i}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(`${s.path}/imageToMap`,o);return(0,de.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new a.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(Ct,t)).toJSON();t.rasterIds?.length&&(i.rasterIds=t.rasterIds.join(","));const s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...i}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(`${s.path}/imageToMapMultiray`,o);return(0,de.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new a.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(Nt,t)).toJSON(),s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=Jt(n)),t.visibleOnly||delete i.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(i.inSR=zt(o));const a=(0,ye.Dl)(e),l=(0,ye.lF)({...a.query,f:"json",...i}),u=(0,ye.jV)(l,r),{data:p}=await(0,w.A)(`${a.path}/mapToImage`,u);return(0,de.rS)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new a.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(fe,t)).toJSON(),s=await(0,he.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(i.fromGeometry=Jt(s[0]),s[0].spatialReference&&(i.inSR=zt(s[0].spatialReference))),null!=s[1]&&(i.toGeometry=Jt(s[1])),t.objectIds?.length&&(i.objectIds=i.objectIds.join(","));const n=(0,ye.Dl)(e),o=(0,ye.lF)({...n.query,f:"json",...i}),a=(0,ye.jV)(o,r),{data:l}=await(0,w.A)(`${n.path}/find`,a);return Ce.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new a.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,b.PZ)(St,t)).toJSON(),s=(0,ye.Dl)(e),n=(0,ye.lF)({...s.query,f:"json",...i}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(`${s.path}/getImageUrl`,o);return It.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new a.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,r){t=(0,b.PZ)(ze,t);const i=(0,ye.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=zt(t.outSpatialReference));const n=(0,ye.lF)({...i.query,f:"json",...s}),o=(0,ye.jV)(n,r),{data:a}=await(0,w.A)(i.path+"/queryBoundary",o);return $e.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const r=await(0,Qt.s)(this.url,e,t),i=this.graphicOrigin;return r.features.forEach(e=>{e.layer=this,e.origin=i}),r}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new a.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,r){const i=(t=(0,b.PZ)(Xe,t)).toJSON();Zt(i),i.objectIds?.length&&(i.objectIds=i.objectIds.join(",")),i.geometry||i.objectIds||i.time||i.where||(i.where="1=1");const s=await(0,he.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=Jt(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(i.inSR=zt(o));const a=(0,ye.Dl)(e),l=(0,ye.lF)({...a.query,f:"json",...i}),u=(0,ye.jV)(l,r),{data:p}=await(0,w.A)(`${a.path}/queryGPSInfo`,u);return st.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Ut.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new a.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=le.F_.servicePixelValue.toLowerCase(),c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(p)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(p)&&e.length>p.length).map(e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]});l=t.map(e=>new _.A({functionName:e[0]})),u=t.map(e=>e[1]);const{rasterFunction:r}=this;0===l.length?r?.functionName?(l.push(r),u.push(r.functionName)):l=null:r?.functionName&&!l.some(e=>e.functionName===r.functionName)&&(l.push(r),u.push(r.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let h=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:r}=(0,A.Rp)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new a.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(h=r.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=I.A.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:r,returnCatalogItems:o,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new pt(f);try{await this._generateRasterInfo(this.rasterFunction);const r=await Vt(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata"),l=o&&!m&&r?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,A.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:h,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const c=this.objectIdField||"ObjectId",d=r.catalogItems?.features??[],g=d.map(e=>e.attributes?.[c]),f=new kt.A({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[c]}),v=await this.queryRasters(f);return v?.features?.length&&v.features.forEach(t=>{d.forEach(r=>{r.attributes[c]===t.attributes[c]&&t.geometry&&(r.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new a.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,w.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,w.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,A.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Lt.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Lt.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),l.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach(e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!c){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new P.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new a.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const r=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:r,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await(0,w.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new a.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,i=(0,pe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&r.bandCount>=3){const e=i?.bandIds??(0,pe.ci)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=i?.renderer??(0,pe.PD)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=r):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,F.D)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,w.A)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,w.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,ne.m)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),l=(0,w.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,F.g)(u)),!c)throw new a.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,F.D)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,A.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new X.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),m=[];if(r&&!l&&(!c||s)){const e={};e[p]=0,u=[r],l=[new f.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:h}=le.F_,y=this.rasterFields.some(e=>e.name===d),g=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=r){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===n.toLowerCase()&&!s)continue;y&&(t.attributes[d]=n),t.attributes[h]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:r:o;this.rasterFunction||(p=l?n:r),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=g,n&&this._updateFeatureWithDomainValues(t),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const r=`${le.F_.servicePixelValue}.${i[e]}`;t.attributes[r]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,A.Rp)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,A.Rp)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const o=i.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));o&&o[0]&&s.forEach(t=>{const r=le.ER+t.name;e.attributes[r]=o[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map(e=>parseFloat(e)),i=r.map(e=>[e]),s=r.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ae.A({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new S.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,N.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=o[0],e.attributes[le.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find(e=>e.code===r);i&&(e.attributes[t.name]=i.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach(e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:r}=this;r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:r,maxRecordCount:i}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),a=t.includes("edit"),l=t.includes("mensuration")&&o,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=r>=10.7&&n||r>=11.4&&(n||l&&u.includes("3d")),h=c&&e.fields&&e.fields.length>0,y=h&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:r>=11.2&&c,supportsImageToMapMultiray:r>=11.2&&c,supportsMapToImage:r>=11.2&&c,supportsFindImages:r>=11.2&&c,supportsGetImageUrl:r>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:r>=11.2,supportsDownload:m,supportsQuery:h,supportsGetSamples:r>=10.2&&s,supportsProject:r>=10.3&&s,supportsComputeStatisticsHistograms:r>=10.4&&s,supportsQueryBoundary:r>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:r>=10.7&&c,supportsComputeAngles:r>=10.91,supportsQueryGPSInfo:r>=11.2&&c,supportsAdd:a,supportsDelete:a,supportsEditing:a,supportsUpdate:a,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:i,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!y?.supportsStatistics,supportsOrderBy:!!y?.supportsOrderBy,supportsDistinct:!!y?.supportsDistinct,supportsPagination:!!y?.supportsPagination,supportsPaginationOnAggregatedQueries:!!y?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!y?.useStandardizedQueries,supportsPercentileStatistics:!!y?.supportsPercentileStatistics,supportsCentroid:!!y?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!y?.supportsQueryWithDistance,supportsExtent:!!y?.supportsReturningQueryExtent,supportsGeometryProperties:!!y?.supportsReturningGeometryProperties,supportsHavingClause:!!y?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:y?.supportsSqlExpression??!!y,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!y?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function i(e){return e?.path??""}return(0,s.Cg)([(0,c.MZ)({clonable:!1})],r.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Le.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],r.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,c.MZ)()],r.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,c.MZ)({type:[b.jz],json:{write:!0}})],r.prototype,"bandIds",void 0),(0,s.Cg)([(0,Le.w)("bandIds")],r.prototype,"readBandIds",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],r.prototype,"capabilities",void 0),(0,s.Cg)([(0,Le.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],r.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({type:Number})],r.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],r.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,c.MZ)({type:Number})],r.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],r.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],r.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Le.w)("defaultMosaicRule",["defaultMosaicMethod"])],r.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],r.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,constructOnly:!0})],r.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,c.MZ)()],r.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:[ie.A]})],r.prototype,"fields",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"fieldsIndex",null),(0,s.Cg)([(0,c.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],r.prototype,"format",null),(0,s.Cg)([(0,Le.w)("service","format",["serviceDataType"])],r.prototype,"readFormat",null),(0,s.Cg)([(0,c.MZ)({type:S.A})],r.prototype,"fullExtent",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"maxImageHeight"}}})],r.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"maxImageWidth"}}})],r.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],r.prototype,"interpolation",void 0),(0,s.Cg)([(0,c.MZ)()],r.prototype,"minScale",void 0),(0,s.Cg)([(0,Le.w)("service","minScale")],r.prototype,"readMinScale",null),(0,s.Cg)([(0,c.MZ)()],r.prototype,"maxScale",void 0),(0,s.Cg)([(0,Le.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,s.Cg)([(0,c.MZ)({type:X.A})],r.prototype,"mosaicRule",null),(0,s.Cg)([(0,Le.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],r.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],r.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,c.MZ)()],r.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:oe.A,json:{write:!0}})],r.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,c.MZ)({json:{type:b.jz}})],r.prototype,"noData",void 0),(0,s.Cg)([(0,te.K)("noData")],r.prototype,"writeNoData",null),(0,s.Cg)([(0,c.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],r.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],r.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Le.w)("objectIdField")],r.prototype,"readObjectIdField",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"geometryType",void 0),(0,s.Cg)([(0,c.MZ)({})],r.prototype,"typeIdField",void 0),(0,s.Cg)([(0,c.MZ)({})],r.prototype,"types",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,s.Cg)([(0,c.MZ)({type:Function})],r.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,c.MZ)()],r.prototype,"raster",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"sourceType",void 0),(0,s.Cg)([(0,Le.w)("sourceType",["serviceSourceType","fields"])],r.prototype,"readSourceType",null),(0,s.Cg)([(0,c.MZ)()],r.prototype,"viewId",void 0),(0,s.Cg)([(0,c.MZ)({types:me.uy})],r.prototype,"renderer",null),(0,s.Cg)([(0,c.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],r.prototype,"internalRenderer",null),(0,s.Cg)([(0,Le.w)("internalRenderer")],r.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],r.prototype,"writeRenderer",null),(0,s.Cg)([(0,c.MZ)({clonable:!1})],r.prototype,"symbolizer",void 0),(0,s.Cg)([(0,c.MZ)(T.ke)],r.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"rasterFields",null),(0,s.Cg)([(0,c.MZ)({constructOnly:!0})],r.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,c.MZ)({type:_.A,json:{name:"renderingRule"}})],r.prototype,"rasterFunction",null),(0,s.Cg)([(0,Le.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],r.prototype,"readRasterFunction",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:M.A})],r.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Le.w)("spatialReference",["spatialReference","extent"])],r.prototype,"readSpatialReference",null),(0,s.Cg)([(0,c.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],r.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],r.prototype,"writePixelType",null),(0,s.Cg)([(0,c.MZ)({constructOnly:!0,type:ue.A})],r.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,c.MZ)()],r.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)(T.OZ)],r.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,s.Cg)([(0,Le.w)("version",["currentVersion","fields","timeInfo"])],r.prototype,"readVersion",null),r=(0,s.Cg)([(0,c.$K)("esri.layers.mixins.ArcGISImageService")],r),r};var Xt=r(18768),er=r(63074),tr=r(69208),rr=r(16131),ir=r(8303),sr=r(63660),nr=r(56551),or=r(54310),ar=r(25036),lr=r(82935),ur=r(91908),pr=r(56776),cr=r(30291),mr=r(88625);let dr=class extends((0,er.dM)((0,lr.e)((0,ar.j)((0,rr.q)((0,ir.A)((0,nr.H)(Yt((0,sr.G)((0,or.J)((0,tr.d)((0,Xt.b)((0,u.P)((0,o.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,p.sg)(async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case 0:return s(this,t);case 1:return n(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,r=new Set,i=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),o=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===i||t.startsWith(o)||s&&t.startsWith(n)||r.add(e.name)}const a=(0,cr.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:l}=this;return a?.fieldInfos&&l&&(0,le.h4)(a.fieldInfos,l),a}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,ur.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}_validateElevationInfo(e){(0,pr.XF)(l.A.getLogger(this),(0,pr.$7)("Imagery layers","relative-to-scene",e)),(0,pr.XF)(l.A.getLogger(this),(0,pr.tW)("Imagery layers",e))}};(0,s.Cg)([(0,c.MZ)({type:mr.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],dr.prototype,"elevationInfo",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],dr.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,c.MZ)(T.fV)],dr.prototype,"legendEnabled",null),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],dr.prototype,"listMode",null),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dr.prototype,"isReference",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],dr.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,te.K)("web-map","operationalLayerType")],dr.prototype,"writeOperationalLayerType",null),(0,s.Cg)([(0,c.MZ)(T.M6)],dr.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,c.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],dr.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],dr.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,c.MZ)(T.PY)],dr.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],dr.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],dr.prototype,"_isPreviewLayer",null),dr=(0,s.Cg)([(0,c.$K)("esri.layers.ImageryLayer")],dr);const hr=dr},91908:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(60694);const s=[];function n(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},92722:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(69397);class s{constructor(e=[],t=[],r=!1,i=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:i}){return new s(e,t,r||!1,i||!1)}static fromRect([e,t,r,i]){const n=r-e,o=i-t;return new s([5],[e,t,n,0,0,o,-n,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:i}=this;let s=this.coords[i*t],n=this.coords[i*t+1];for(let o=1;o<r;o+=1){const r=i*(t+o),a=this.coords[r],l=this.coords[r+1];e+=-.5*(a-s)*(l+n),s=a,n=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const i of this.lengths){for(let s=0;s<i;s++){const i=r*(t+s);e(this.coords[i],this.coords[i+1])}t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;const{stride:s}=this;for(const e of r){for(let r=1;r<e;r++){const e=s*(i+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}i+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:r,size:i}=this,n=this.coords.slice(0,i*r);return e?(e.set(n),new s(t,e)):new s(t,Array.from(n),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,i=0;t<r.length;t+=e)r[i++]=this.coords[t],r[i++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}},99199:(e,t,r)=>{r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),n=r(22671),o=r(61956);async function a(e,t,r,i){const s=await l(e,t,r,i);return n.A.fromJSON(s)}function l(e,t,r,n){const a=(0,i.Dl)(e),l={...r},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}}}]);
|