@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923
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/Graphic.js +1 -1
- package/PopupTemplate.js +1 -1
- package/TimeExtent.js +1 -1
- package/arcade/ArcadeDate.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/featureset/support/StatsField.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstats.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/02156fd04279f4d0fd3f.js +1 -0
- package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
- package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
- package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
- package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
- package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
- package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
- package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
- package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
- package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
- package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
- package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
- package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
- package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
- package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
- package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
- package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
- package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
- package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
- package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
- package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
- package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
- package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
- package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
- package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
- package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
- package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
- package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
- package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
- package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
- package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
- package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
- package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
- package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
- package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
- package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
- package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
- package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
- package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
- package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
- package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
- package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
- package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
- package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
- package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
- package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
- package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
- package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
- package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
- package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
- package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
- package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
- package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
- package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
- package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
- package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
- package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
- package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
- package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
- package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/arcade.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/number.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql.js +1 -1
- package/core/timeUtils.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +48 -203
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +5 -0
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
- package/layers/orientedImagery/core/utils.js +5 -0
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/support/fieldProperties.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/request.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/support/DirectionsFeatureSet.js +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/ageUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/time/TimeReference.js +1 -1
- package/time/timeReferenceUtils.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/support/EditMomentStack.js +5 -0
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/ManagedCanvas.js +5 -0
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/GroupContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.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/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/featureEditing.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
- package/views/View.js +1 -1
- package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
- package/views/interactive/tooltip/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +1 -1
- package/views/interactive/tooltip/content/Fields.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/contextUtils.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions/components/SaveLayer.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile/components/Statistics.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/FeatureContentMixin.js +1 -1
- package/widgets/Feature/support/FeatureElementInfo.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/GroupInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesRelatedRecords.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Histogram.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/Classic.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
- package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
- package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
- package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom/IconButton.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ClassedColorSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSlider.js +1 -1
- package/widgets/smartMapping/HeatmapSlider.js +1 -1
- package/widgets/smartMapping/OpacitySlider.js +1 -1
- package/widgets/smartMapping/SizeSlider.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/DatePicker.js +1 -1
- package/widgets/support/Heading.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/MeasurementWidgetContent.js +1 -1
- package/widgets/support/Popover.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/TimePicker.js +1 -1
- package/widgets/support/TimezonePicker.js +1 -1
- package/widgets/support/UnitSelect.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
- package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
- package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
- package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
- package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
- package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
- package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
- package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
- package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
- package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
- package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
- package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
- package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
- package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
- package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
- package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
- package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
- package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
- package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
- package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
- package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
- package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
- package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
- package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
- package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
- package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
- package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
- package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
- package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
- package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
- package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
- package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
- package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
- package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
- package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
- package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
- package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
- package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
- package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
- package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
- package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
- package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
- package/core/watchUtils.d.ts +0 -4
- package/core/watchUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4386],{75517:(e,t,n)=>{function i(e,t){if(!t)return e;for(const n of t)e.add(n);return e}function r(e,t){const n=new Set;return i(n,e),i(n,t),n}function o(e,t){const n=new Set;for(const i of t)e.has(i)&&n.add(i);return n}function s(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const n of e)if(!t.has(n))return!1;return!0}function l(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function a(e,t){const n=new Set(e);for(const e of t)n.delete(e);return n}n.d(t,{G0:()=>r,e5:()=>a,fS:()=>l,ik:()=>s,jV:()=>o})},90578:(e,t,n)=>{n.d(t,{p:()=>a});var i=n(75215),r=n(7628);const o=Object.prototype.toString;function s(e){const t="__accessorMetadata__"in e?(0,i.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return l.apply(this,e)}}function l(e,t,n,i){(0,r.Oe)(e,t).cast=i}function a(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===o.call(e[0])?s(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,n)=>{(0,r.Oe)(t,e).cast=t[n]}}(e[0]):void 0}},71715:(e,t,n)=>{n.d(t,{r:()=>r});var i=n(5600);function r(e,t,n){let r,o;return void 0===t||Array.isArray(t)?(o=e,n=t,r=[void 0]):(o=t,r=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;r.forEach((r=>{const l=(0,i.CJ)(e,r,o);l.read&&"object"==typeof l.read||(l.read={}),l.read.reader=s[t],n&&(l.read.source=(l.read.source||[]).concat(n))}))}}},66577:(e,t,n)=>{n.d(t,{qM:()=>c});var i=n(75215),r=n(6570),o=n(9361),s=n(65091),l=n(94139),a=n(38913),u=n(58901);n(82971),n(86973),n(33955);const c={base:o.Z,key:"type",typeMap:{extent:r.Z,multipoint:s.Z,point:l.Z,polyline:u.Z,polygon:a.Z}};(0,i.N7)(c)},9361:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(43697),r=n(96674),o=n(5600),s=(n(75215),n(67676),n(80442),n(71715)),l=n(52011),a=n(82971);let u=class extends r.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=a.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof a.Z)return e;if(null!=e){const n=new a.Z;return n.read(e,t),n}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,i._)([(0,o.Cb)()],u.prototype,"type",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,i._)([(0,o.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,i._)([(0,o.Cb)({type:a.Z,json:{write:!0},value:a.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,i._)([(0,s.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,i._)([(0,l.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,n)=>{n.d(t,{Z:()=>_});var i,r=n(43697),o=n(92604),s=n(5600),l=n(90578),a=(n(67676),n(80442),n(71715)),u=n(52011),c=n(30556),d=n(75215),f=n(9361),p=n(82971),y=n(8744),h=n(40488);const m=[0,0];function g(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let b=i=class extends f.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const n=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,n,i,r){let s;if(Array.isArray(e))s=e,r=t,e=s[0],t=s[1],n=s[2],i=s[3];else if(e&&"object"==typeof e){if(s=e,e=null!=s.x?s.x:s.longitude,t=null!=s.y?s.y:s.latitude,n=s.z,i=s.m,(r=s.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new p.Z(r)),null!=s.longitude||null!=s.latitude)if(null==s.longitude)o.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==s.latitude)o.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!s.declaredClass&&r&&r.isWebMercator){const n=(0,h.hG)(s.longitude,s.latitude,m);e=n[0],t=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const l={x:e,y:t};return null==l.x&&null!=l.y?o.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==l.y&&null!=l.x&&o.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(l.spatialReference=r),null!=n&&(l.z=n),null!=i&&(l.m=i),l}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:n}=this;if(e){if(e.isWebMercator)return(0,h.R6)(t,n,m)[1];if(e.isGeographic)return n}return null}set latitude(e){const{spatialReference:t,x:n}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,h.hG)(n,e,m)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,h.R6)(e,t,m)[0];if(n.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:n}=this;null!=e&&n&&(n.isWebMercator?this._set("x",(0,h.hG)(e,t,m)[0]):n.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,n){t[n]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new i;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return i.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:n,z:i,m:r,spatialReference:o}=this,{z:s,m:l}=e;let{x:a,y:u,spatialReference:c}=e;if(!o.equals(c))if(o.isWebMercator&&c.isWGS84)[a,u]=(0,h.hG)(a,u),c=o;else{if(!o.isWGS84||!c.isWebMercator)return!1;[a,u]=(0,h.R6)(a,u),c=o}return t===a&&n===u&&i===s&&r===l&&o.wkid===c.wkid}offset(e,t,n){return this.x+=e,this.y+=t,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const e=(0,y.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[n,i]=e.valid,r=2*i;let o;return t>i?(o=Math.ceil(Math.abs(t-i)/r),t-=o*r):t<n&&(o=Math.ceil(Math.abs(t-n)/r),t+=o*r),this._set("x",t),this}distance(e){return function(e,t){const n=e.x-t.x,i=e.y-t.y,r=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,r._)([(0,s.Cb)({readOnly:!0})],b.prototype,"cache",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null),(0,r._)([(0,s.Cb)({type:Number})],b.prototype,"latitude",null),(0,r._)([(0,s.Cb)({type:Number})],b.prototype,"longitude",null),(0,r._)([(0,s.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,l.p)((e=>isNaN(e)?e:(0,d.q9)(e)))],b.prototype,"x",void 0),(0,r._)([(0,c.c)("x")],b.prototype,"writeX",null),(0,r._)([(0,a.r)("x")],b.prototype,"readX",null),(0,r._)([(0,s.Cb)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],b.prototype,"z",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],b.prototype,"m",void 0),b=i=(0,r._)([(0,u.j)("esri.geometry.Point")],b),b.prototype.toJSON.isDefaultToJSON=!0;const _=b},62155:(e,t,n)=>{var i;n.d(t,{R:()=>i}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(i={}))},33955:(e,t,n)=>{n.d(t,{Ji:()=>h,YX:()=>u,aW:()=>c,im:()=>y,l9:()=>f,oU:()=>p,q9:()=>g,wp:()=>d});var i=n(6570),r=n(9361),o=n(65091),s=n(94139),l=n(38913),a=n(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function f(e){return void 0!==e.paths}function p(e){return void 0!==e.rings}function y(e){return null==e?null:e instanceof r.Z?e:d(e)?s.Z.fromJSON(e):f(e)?a.Z.fromJSON(e):p(e)?l.Z.fromJSON(e):c(e)?o.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function h(e){return e?d(e)?"esriGeometryPoint":f(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const m={esriGeometryPoint:s.Z,esriGeometryPolyline:a.Z,esriGeometryPolygon:l.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:o.Z};function g(e){return e&&m[e]||null}},86973:(e,t,n)=>{n.d(t,{M:()=>r,P:()=>o});var i=n(35454);const r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),o=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,n)=>{n.d(t,{$:()=>_,Q8:()=>h,R6:()=>b,Sx:()=>v,hG:()=>g,iV:()=>m,mZ:()=>d});var i=n(22974),r=n(82971),o=n(68441),s=n(8744);const l=57.29577951308232,a=.017453292519943;function u(e){return e*l}function c(e){return e*a}function d(e){return Math.PI/2-2*Math.atan(Math.exp(-e/o.sv.radius))}function f(e){return null!=e.wkid||null!=e.wkt}const p=[0,0];function y(e,t,n,i,r){const o=e,s=r;if(s.spatialReference=n,"x"in o&&"x"in s)[s.x,s.y]=t(o.x,o.y,p,i);else if("xmin"in o&&"xmin"in s)[s.xmin,s.ymin]=t(o.xmin,o.ymin,p,i),[s.xmax,s.ymax]=t(o.xmax,o.ymax,p,i);else if("paths"in o&&"paths"in s||"rings"in o&&"rings"in s){const e="paths"in o?o.paths:o.rings,n=[];let r;for(let o=0;o<e.length;o++){const s=e[o];r=[],n.push(r);for(let e=0;e<s.length;e++)r.push(t(s[e][0],s[e][1],[0,0],i)),s[e].length>2&&r[e].push(s[e][2]),s[e].length>3&&r[e].push(s[e][3])}"paths"in s?s.paths=n:s.rings=n}else if("points"in o&&"points"in s){const e=o.points,n=[];for(let r=0;r<e.length;r++)n[r]=t(e[r][0],e[r][1],[0,0],i),e[r].length>2&&n[r].push(e[r][2]),e[r].length>3&&n[r].push(e[r][3]);s.points=n}return r}function h(e,t){const n=e&&(f(e)?e:e.spatialReference),i=t&&(f(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!n||!i)&&(!!(0,s.fS)(i,n)||(0,s.sS)(i)&&(0,s.oR)(n)||(0,s.sS)(n)&&(0,s.oR)(i))}function m(e,t){if(null==e)return null;const n=e.spatialReference,o=t&&(f(t)?t:t.spatialReference);return h(n,o)?(0,s.fS)(n,o)?(0,i.d9)(e):(0,s.sS)(o)?y(e,g,r.Z.WebMercator,!1,(0,i.d9)(e)):(0,s.oR)(o)?y(e,b,r.Z.WGS84,!1,(0,i.d9)(e)):null:null}function g(e,t,n=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=c(t);return n[0]=c(e)*o.sv.radius,n[1]=o.sv.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function b(e,t,n=[0,0],i=!1){const r=u(e/o.sv.radius);return n[0]=i?r:r-360*Math.floor((r+180)/360),n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/o.sv.radius))),n}function _(e,t=!1,n=(0,i.d9)(e)){return y(e,g,r.Z.WebMercator,t,n)}function v(e,t=!1,n=(0,i.d9)(e)){return y(e,b,r.Z.WGS84,t,n)}},35671:(e,t,n)=>{n.d(t,{io:()=>w,AB:()=>_,gd:()=>b,Q0:()=>g,YN:()=>p,UF:()=>h,O5:()=>F,CH:()=>S,os:()=>C,y2:()=>X,Hp:()=>I,Fv:()=>A,H7:()=>W,Ec:()=>oe,qN:()=>J,q6:()=>c,Pz:()=>Y,Lk:()=>v,Qc:()=>H,vP:()=>re}),n(20102);var i,r,o=n(78286),s=n(75517);(r=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",r.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var l=n(59266);const a=/^([0-9_])/,u=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){return null==e?null:e.trim().replaceAll(u,"_").replace(a,"F$1")||null}const d=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function p(e,t){if(null!=e&&null!=t)for(const n of Array.isArray(e)?e:[e])if(y(d,n,t),"visualVariables"in n&&n.visualVariables)for(const e of n.visualVariables)y(f,e,t)}function y(e,t,n){if(e)for(const i of e){const e=(0,o.hS)(i,t),r=e&&"function"!=typeof e&&n.get(e);r&&(0,o.RB)(i,r.name,t)}}function h(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const n=t.get(e.startField),i=t.get(e.endField);e.startField=n?.name??null,e.endField=i?.name??null}else{const n=t.get(e.startTimeField),i=t.get(e.endTimeField);e.startTimeField=n?.name??null,e.endTimeField=i?.name??null}}const m=new Set;function g(e,t){return e&&t?(m.clear(),b(m,e,t),Array.from(m).sort()):[]}function b(e,t,n){if(n)if(t?.fields?.length)if(n.includes("*"))for(const{name:n}of t.fields)e.add(n);else for(const i of n)_(e,t,i);else{if(n.includes("*"))return e.clear(),void e.add("*");for(const t of n)null!=t&&e.add(t)}}function _(e,t,n){if("string"==typeof n)if(t){const i=t.get(n);i&&e.add(i.name)}else e.add(n)}function v(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function w(e,t,n){if(!n)return;const{arcadeUtils:i}=await(0,l.LC)(),r=i.extractFieldNames(n,t?.fields?.map((e=>e.name)));for(const n of r)_(e,t,n)}function F({displayField:e,fields:t}){return e||(t&&t.length?x(t,"name-or-title")||x(t,"unique-identifier")||x(t,"type-or-category")||function(e){for(const t of e){if(!t||!t.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function x(e,t){for(const n of e)if(n&&n.valueType&&n.valueType===t)return n.name;return null}function S(e){return e?g(e.fieldsIndex,Z(e)):[]}const N=["oid","global-id","guid"],R=["oid","global-id"],G=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function Z(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:n,creatorField:i,editDateField:r,editorField:o}=t;return[n,i,r,o].filter(Boolean)}function M(e){return Z(e).map((e=>e.toLowerCase()))}function I(e,t){return e.editable&&!N.includes(e.type)&&!M(t).includes(e.name?.toLowerCase()??"")}function A(e,t){const n=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&n===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&n===t.globalIdField.toLowerCase()||function(e){const t=new Set;M(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?g(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const n=e&&"infoFor3D"in e?e.infoFor3D:void 0;return n&&(Object.values(n.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(n.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(n)||R.includes(e.type)||G.some((e=>e.test(n))))}function C(e){const t=e.defaultValue;return void 0!==t&&V(e,t)?t:e.nullable?null:void 0}function T(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function O(e){return null===e||T(e)}const $="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function E(e){return null===e||$(e)}function L(e){return null!=e&&"string"==typeof e}function P(e){return null===e||L(e)}function z(){return!0}function V(e,t){let n;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":n=e.nullable?E:$;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":n=e.nullable?O:T;break;case"string":case"esriFieldTypeString":n=e.nullable?P:L;break;default:n=z}return 1===arguments.length?n:n(t)}const D=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]),j=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),U=(0,s.G0)(D,j),k=new Set(["date","date-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimestampOffset"]);function W(e){return null!=e&&U.has(e.type)}function J(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function X(e){return null!=e&&k.has(e.type)}var q,B;function Y(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function H(e,t){return null==e||e.nullable&&null===t?null:W(e)&&!function(e,t){const n="string"==typeof e?Q(e):e;if(!n)return!1;const i=n.min,r=n.max;return n.isInteger?$(t)&&t>=i&&t<=r:t>=i&&t<=r}(e.type,Number(t))?q.OUT_OF_RANGE:V(e,t)?e.domain?function(e,t){switch(e.type){case"range":{const n="range"in e?e.range[0]:e.minValue,r="range"in e?e.range[1]:e.maxValue;if(null!=n&&+t<n||null!=r&&+t>r)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==t)))return i.INVALID_CODED_VALUE}return null}(e.domain,t):null:B.INVALID_TYPE}function Q(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return K;case"esriFieldTypeInteger":case"integer":return ee;case"esriFieldTypeBigInteger":case"big-integer":return te;case"esriFieldTypeSingle":case"single":return ne;case"esriFieldTypeDouble":case"double":return ie}}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(q||(q={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(B||(B={}));const K={min:-32768,max:32767,isInteger:!0},ee={min:-2147483648,max:2147483647,isInteger:!0},te={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},ne={min:-34e37,max:12e37,isInteger:!1},ie={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function re(e,t,n){switch(e){case i.INVALID_CODED_VALUE:return`Value ${n} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${n} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case B.INVALID_TYPE:return`Value ${n} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case q.OUT_OF_RANGE:{const{min:e,max:i}=Q(t.type);return`Value ${n} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${i}`}}}function oe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}},59266:(e,t,n)=>{n.d(t,{LC:()=>a,WW:()=>u,Yi:()=>c,mz:()=>f,pp:()=>d}),n(66577);var i=n(20102),r=n(92604),o=n(82971);const s=r.Z.getLogger("esri.support.arcadeOnDemand");let l;function a(){return l||(l=(async()=>{const e=await Promise.all([n.e(7126),n.e(8732),n.e(8522),n.e(4140)]).then(n.bind(n,20304));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),l}const u=(e,t,n)=>f.create(e,t,n,null,["$feature"],[]),c=(e,t,n)=>f.create(e,t,n,null,["$feature","$view"],[]),d=(e,t,n,i)=>f.create(e,t,n,i,["$feature","$view"],[]);class f{constructor(e,t,n,i,r,o,s){this.services=null,this.script=e,this.evaluate=i;const l=Array.isArray(o)?o:o.fields;this.fields=l,this._syntaxTree=n,this._arcade=t,this._arcadeFeature=r,this._spatialReference=s,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,n,r,l,u){const{arcade:c,Feature:d,Dictionary:p}=await a(),y=o.Z.fromJSON(t);let h;try{h=c.parseScript(e,u)}catch(t){return s.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})),null}const m=l.reduce(((e,t)=>({...e,[t]:null})),{});let g=null;null!=r&&(g=new p(r),g.immutable=!0,m.$config=null);const b=c.scriptUsesGeometryEngine(h),_=b&&c.enableGeometrySupport(),v=c.scriptUsesFeatureSet(h)&&c.enableFeatureSetSupport(),w=c.scriptIsAsync(h),F=w&&c.enableAsyncSupport(),x={vars:m,spatialReference:y,useAsync:!!F};await Promise.all([_,v,F]);const S=new Set;await c.loadDependentModules(S,h,null,w,b);const N=new p;N.immutable=!1,N.setField("scale",0);const R=c.compileScript(h,x);return new f(e,c,h,((e,t)=>("$view"in e&&e.$view&&(N.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=N),g&&(e.$config=g),R({vars:e,spatialReference:y,services:t}))),new d,n,y)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4386],{75517:(e,t,n)=>{function i(e,t){if(!t)return e;for(const n of t)e.add(n);return e}function r(e,t){const n=new Set;return i(n,e),i(n,t),n}function o(e,t){const n=new Set;for(const i of t)e.has(i)&&n.add(i);return n}function s(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const n of e)if(!t.has(n))return!1;return!0}function l(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function a(e,t){const n=new Set(e);for(const e of t)n.delete(e);return n}n.d(t,{G0:()=>r,e5:()=>a,fS:()=>l,ik:()=>s,jV:()=>o})},90578:(e,t,n)=>{n.d(t,{p:()=>a});var i=n(75215),r=n(7628);const o=Object.prototype.toString;function s(e){const t="__accessorMetadata__"in e?(0,i.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return l.apply(this,e)}}function l(e,t,n,i){(0,r.Oe)(e,t).cast=i}function a(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===o.call(e[0])?s(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,n)=>{(0,r.Oe)(t,e).cast=t[n]}}(e[0]):void 0}},71715:(e,t,n)=>{n.d(t,{r:()=>r});var i=n(5600);function r(e,t,n){let r,o;return void 0===t||Array.isArray(t)?(o=e,n=t,r=[void 0]):(o=t,r=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;r.forEach((r=>{const l=(0,i.CJ)(e,r,o);l.read&&"object"==typeof l.read||(l.read={}),l.read.reader=s[t],n&&(l.read.source=(l.read.source||[]).concat(n))}))}}},66577:(e,t,n)=>{n.d(t,{qM:()=>c});var i=n(75215),r=n(6570),o=n(9361),s=n(65091),l=n(94139),a=n(38913),u=n(58901);n(82971),n(86973),n(33955);const c={base:o.Z,key:"type",typeMap:{extent:r.Z,multipoint:s.Z,point:l.Z,polyline:u.Z,polygon:a.Z}};(0,i.N7)(c)},9361:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(43697),r=n(96674),o=n(5600),s=(n(75215),n(67676),n(80442),n(71715)),l=n(52011),a=n(82971);let u=class extends r.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=a.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof a.Z)return e;if(null!=e){const n=new a.Z;return n.read(e,t),n}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,i._)([(0,o.Cb)()],u.prototype,"type",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,i._)([(0,o.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,i._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,i._)([(0,o.Cb)({type:a.Z,json:{write:!0},value:a.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,i._)([(0,s.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,i._)([(0,l.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,n)=>{n.d(t,{Z:()=>_});var i,r=n(43697),o=n(92604),s=n(5600),l=n(90578),a=(n(67676),n(80442),n(71715)),u=n(52011),c=n(30556),d=n(75215),f=n(9361),p=n(82971),y=n(8744),h=n(40488);const m=[0,0];function g(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let b=i=class extends f.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const n=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,n,i,r){let s;if(Array.isArray(e))s=e,r=t,e=s[0],t=s[1],n=s[2],i=s[3];else if(e&&"object"==typeof e){if(s=e,e=null!=s.x?s.x:s.longitude,t=null!=s.y?s.y:s.latitude,n=s.z,i=s.m,(r=s.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new p.Z(r)),null!=s.longitude||null!=s.latitude)if(null==s.longitude)o.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==s.latitude)o.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!s.declaredClass&&r&&r.isWebMercator){const n=(0,h.hG)(s.longitude,s.latitude,m);e=n[0],t=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const l={x:e,y:t};return null==l.x&&null!=l.y?o.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==l.y&&null!=l.x&&o.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(l.spatialReference=r),null!=n&&(l.z=n),null!=i&&(l.m=i),l}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:n}=this;if(e){if(e.isWebMercator)return(0,h.R6)(t,n,m)[1];if(e.isGeographic)return n}return null}set latitude(e){const{spatialReference:t,x:n}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,h.hG)(n,e,m)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,h.R6)(e,t,m)[0];if(n.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:n}=this;null!=e&&n&&(n.isWebMercator?this._set("x",(0,h.hG)(e,t,m)[0]):n.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,n){t[n]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new i;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return i.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:n,z:i,m:r,spatialReference:o}=this,{z:s,m:l}=e;let{x:a,y:u,spatialReference:c}=e;if(!o.equals(c))if(o.isWebMercator&&c.isWGS84)[a,u]=(0,h.hG)(a,u),c=o;else{if(!o.isWGS84||!c.isWebMercator)return!1;[a,u]=(0,h.R6)(a,u),c=o}return t===a&&n===u&&i===s&&r===l&&o.wkid===c.wkid}offset(e,t,n){return this.x+=e,this.y+=t,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const e=(0,y.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[n,i]=e.valid,r=2*i;let o;return t>i?(o=Math.ceil(Math.abs(t-i)/r),t-=o*r):t<n&&(o=Math.ceil(Math.abs(t-n)/r),t+=o*r),this._set("x",t),this}distance(e){return function(e,t){const n=e.x-t.x,i=e.y-t.y,r=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,r._)([(0,s.Cb)({readOnly:!0})],b.prototype,"cache",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null),(0,r._)([(0,s.Cb)({type:Number})],b.prototype,"latitude",null),(0,r._)([(0,s.Cb)({type:Number})],b.prototype,"longitude",null),(0,r._)([(0,s.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,l.p)((e=>isNaN(e)?e:(0,d.q9)(e)))],b.prototype,"x",void 0),(0,r._)([(0,c.c)("x")],b.prototype,"writeX",null),(0,r._)([(0,a.r)("x")],b.prototype,"readX",null),(0,r._)([(0,s.Cb)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],b.prototype,"z",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],b.prototype,"m",void 0),b=i=(0,r._)([(0,u.j)("esri.geometry.Point")],b),b.prototype.toJSON.isDefaultToJSON=!0;const _=b},62155:(e,t,n)=>{var i;n.d(t,{R:()=>i}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(i={}))},33955:(e,t,n)=>{n.d(t,{Ji:()=>h,YX:()=>u,aW:()=>c,im:()=>y,l9:()=>f,oU:()=>p,q9:()=>g,wp:()=>d});var i=n(6570),r=n(9361),o=n(65091),s=n(94139),l=n(38913),a=n(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function f(e){return void 0!==e.paths}function p(e){return void 0!==e.rings}function y(e){return null==e?null:e instanceof r.Z?e:d(e)?s.Z.fromJSON(e):f(e)?a.Z.fromJSON(e):p(e)?l.Z.fromJSON(e):c(e)?o.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function h(e){return e?d(e)?"esriGeometryPoint":f(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const m={esriGeometryPoint:s.Z,esriGeometryPolyline:a.Z,esriGeometryPolygon:l.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:o.Z};function g(e){return e&&m[e]||null}},86973:(e,t,n)=>{n.d(t,{M:()=>r,P:()=>o});var i=n(35454);const r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),o=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,n)=>{n.d(t,{$:()=>_,Q8:()=>h,R6:()=>b,Sx:()=>v,hG:()=>g,iV:()=>m,mZ:()=>d});var i=n(22974),r=n(82971),o=n(68441),s=n(8744);const l=57.29577951308232,a=.017453292519943;function u(e){return e*l}function c(e){return e*a}function d(e){return Math.PI/2-2*Math.atan(Math.exp(-e/o.sv.radius))}function f(e){return null!=e.wkid||null!=e.wkt}const p=[0,0];function y(e,t,n,i,r){const o=e,s=r;if(s.spatialReference=n,"x"in o&&"x"in s)[s.x,s.y]=t(o.x,o.y,p,i);else if("xmin"in o&&"xmin"in s)[s.xmin,s.ymin]=t(o.xmin,o.ymin,p,i),[s.xmax,s.ymax]=t(o.xmax,o.ymax,p,i);else if("paths"in o&&"paths"in s||"rings"in o&&"rings"in s){const e="paths"in o?o.paths:o.rings,n=[];let r;for(let o=0;o<e.length;o++){const s=e[o];r=[],n.push(r);for(let e=0;e<s.length;e++)r.push(t(s[e][0],s[e][1],[0,0],i)),s[e].length>2&&r[e].push(s[e][2]),s[e].length>3&&r[e].push(s[e][3])}"paths"in s?s.paths=n:s.rings=n}else if("points"in o&&"points"in s){const e=o.points,n=[];for(let r=0;r<e.length;r++)n[r]=t(e[r][0],e[r][1],[0,0],i),e[r].length>2&&n[r].push(e[r][2]),e[r].length>3&&n[r].push(e[r][3]);s.points=n}return r}function h(e,t){const n=e&&(f(e)?e:e.spatialReference),i=t&&(f(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!n||!i)&&(!!(0,s.fS)(i,n)||(0,s.sS)(i)&&(0,s.oR)(n)||(0,s.sS)(n)&&(0,s.oR)(i))}function m(e,t){if(null==e)return null;const n=e.spatialReference,o=t&&(f(t)?t:t.spatialReference);return h(n,o)?(0,s.fS)(n,o)?(0,i.d9)(e):(0,s.sS)(o)?y(e,g,r.Z.WebMercator,!1,(0,i.d9)(e)):(0,s.oR)(o)?y(e,b,r.Z.WGS84,!1,(0,i.d9)(e)):null:null}function g(e,t,n=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=c(t);return n[0]=c(e)*o.sv.radius,n[1]=o.sv.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function b(e,t,n=[0,0],i=!1){const r=u(e/o.sv.radius);return n[0]=i?r:r-360*Math.floor((r+180)/360),n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/o.sv.radius))),n}function _(e,t=!1,n=(0,i.d9)(e)){return y(e,g,r.Z.WebMercator,t,n)}function v(e,t=!1,n=(0,i.d9)(e)){return y(e,b,r.Z.WGS84,t,n)}},35671:(e,t,n)=>{n.d(t,{io:()=>w,AB:()=>_,gd:()=>b,Q0:()=>g,YN:()=>p,UF:()=>h,O5:()=>F,CH:()=>S,os:()=>C,y2:()=>X,Hp:()=>I,Fv:()=>A,H7:()=>W,Ec:()=>se,qN:()=>J,d2:()=>q,q6:()=>c,Pz:()=>H,Lk:()=>v,Qc:()=>Q,vP:()=>oe}),n(20102);var i,r,o=n(78286),s=n(75517);(r=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",r.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var l=n(59266);const a=/^([0-9_])/,u=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){return null==e?null:e.trim().replaceAll(u,"_").replace(a,"F$1")||null}const d=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function p(e,t){if(null!=e&&null!=t)for(const n of Array.isArray(e)?e:[e])if(y(d,n,t),"visualVariables"in n&&n.visualVariables)for(const e of n.visualVariables)y(f,e,t)}function y(e,t,n){if(e)for(const i of e){const e=(0,o.hS)(i,t),r=e&&"function"!=typeof e&&n.get(e);r&&(0,o.RB)(i,r.name,t)}}function h(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const n=t.get(e.startField),i=t.get(e.endField);e.startField=n?.name??null,e.endField=i?.name??null}else{const n=t.get(e.startTimeField),i=t.get(e.endTimeField);e.startTimeField=n?.name??null,e.endTimeField=i?.name??null}}const m=new Set;function g(e,t){return e&&t?(m.clear(),b(m,e,t),Array.from(m).sort()):[]}function b(e,t,n){if(n)if(t?.fields?.length)if(n.includes("*"))for(const{name:n}of t.fields)e.add(n);else for(const i of n)_(e,t,i);else{if(n.includes("*"))return e.clear(),void e.add("*");for(const t of n)null!=t&&e.add(t)}}function _(e,t,n){if("string"==typeof n)if(t){const i=t.get(n);i&&e.add(i.name)}else e.add(n)}function v(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function w(e,t,n){if(!n)return;const{arcadeUtils:i}=await(0,l.LC)(),r=i.extractFieldNames(n,t?.fields?.map((e=>e.name)));for(const n of r)_(e,t,n)}function F({displayField:e,fields:t}){return e||(t&&t.length?x(t,"name-or-title")||x(t,"unique-identifier")||x(t,"type-or-category")||function(e){for(const t of e){if(!t||!t.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function x(e,t){for(const n of e)if(n&&n.valueType&&n.valueType===t)return n.name;return null}function S(e){return e?g(e.fieldsIndex,Z(e)):[]}const N=new Set(["oid","global-id","guid"]),R=new Set(["oid","global-id"]),G=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function Z(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:n,creatorField:i,editDateField:r,editorField:o}=t;return[n,i,r,o].filter(Boolean)}function M(e){return Z(e).map((e=>e.toLowerCase()))}function I(e,t){return e.editable&&!N.has(e.type)&&!M(t).includes(e.name?.toLowerCase()??"")}function A(e,t){const n=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&n===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&n===t.globalIdField.toLowerCase()||function(e){const t=new Set;M(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?g(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const n=e&&"infoFor3D"in e?e.infoFor3D:void 0;return n&&(Object.values(n.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(n.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(n)||R.has(e.type)||G.some((e=>e.test(n))))}function C(e){const t=e.defaultValue;return void 0!==t&&V(e,t)?t:e.nullable?null:void 0}function T(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function O(e){return null===e||T(e)}const $="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function E(e){return null===e||$(e)}function L(e){return null!=e&&"string"==typeof e}function P(e){return null===e||L(e)}function z(){return!0}function V(e,t){let n;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":n=e.nullable?E:$;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":n=e.nullable?O:T;break;case"string":case"esriFieldTypeString":n=e.nullable?P:L;break;default:n=z}return 1===arguments.length?n:n(t)}const D=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]),j=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),U=(0,s.G0)(D,j),k=new Set(["date","date-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimestampOffset"]);function W(e){return null!=e&&U.has(e.type)}function J(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function X(e){return null!=e&&k.has(e.type)}function q(e,t){return null===Q(e,t)}var B,Y;function H(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Q(e,t){return null==e||e.nullable&&null===t?null:W(e)&&!function(e,t){const n="string"==typeof e?K(e):e;if(!n)return!1;const i=n.min,r=n.max;return n.isInteger?$(t)&&t>=i&&t<=r:t>=i&&t<=r}(e.type,Number(t))?B.OUT_OF_RANGE:V(e,t)?e.domain?function(e,t){switch(e.type){case"range":{const n="range"in e?e.range[0]:e.minValue,r="range"in e?e.range[1]:e.maxValue;if(null!=n&&+t<n||null!=r&&+t>r)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==t)))return i.INVALID_CODED_VALUE}return null}(e.domain,t):null:Y.INVALID_TYPE}function K(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return ee;case"esriFieldTypeInteger":case"integer":return te;case"esriFieldTypeBigInteger":case"big-integer":return ne;case"esriFieldTypeSingle":case"single":return ie;case"esriFieldTypeDouble":case"double":return re}}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(B||(B={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(Y||(Y={}));const ee={min:-32768,max:32767,isInteger:!0},te={min:-2147483648,max:2147483647,isInteger:!0},ne={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},ie={min:-34e37,max:12e37,isInteger:!1},re={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function oe(e,t,n){switch(e){case i.INVALID_CODED_VALUE:return`Value ${n} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${n} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case Y.INVALID_TYPE:return`Value ${n} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case B.OUT_OF_RANGE:{const{min:e,max:i}=K(t.type);return`Value ${n} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${i}`}}}function se(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}},59266:(e,t,n)=>{n.d(t,{LC:()=>a,WW:()=>u,Yi:()=>c,mz:()=>f,pp:()=>d}),n(66577);var i=n(20102),r=n(92604),o=n(82971);const s=r.Z.getLogger("esri.support.arcadeOnDemand");let l;function a(){return l||(l=(async()=>{const e=await Promise.all([n.e(7126),n.e(8732),n.e(8522),n.e(4140)]).then(n.bind(n,20304));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),l}const u=(e,t,n)=>f.create(e,t,n,null,["$feature"],[]),c=(e,t,n)=>f.create(e,t,n,null,["$feature","$view"],[]),d=(e,t,n,i)=>f.create(e,t,n,i,["$feature","$view"],[]);class f{constructor(e,t,n,i,r,o,s){this.services=null,this.script=e,this.evaluate=i;const l=Array.isArray(o)?o:o.fields;this.fields=l,this._syntaxTree=n,this._arcade=t,this._arcadeFeature=r,this._spatialReference=s,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,n,r,l,u){const{arcade:c,Feature:d,Dictionary:p}=await a(),y=o.Z.fromJSON(t);let h;try{h=c.parseScript(e,u)}catch(t){return s.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})),null}const m=l.reduce(((e,t)=>({...e,[t]:null})),{});let g=null;null!=r&&(g=new p(r),g.immutable=!0,m.$config=null);const b=c.scriptUsesGeometryEngine(h),_=b&&c.enableGeometrySupport(),v=c.scriptUsesFeatureSet(h)&&c.enableFeatureSetSupport(),w=c.scriptIsAsync(h),F=w&&c.enableAsyncSupport(),x={vars:m,spatialReference:y,useAsync:!!F};await Promise.all([_,v,F]);const S=new Set;await c.loadDependentModules(S,h,null,w,b);const N=new p;N.immutable=!1,N.setField("scale",0);const R=c.compileScript(h,x);return new f(e,c,h,((e,t)=>("$view"in e&&e.$view&&(N.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=N),g&&(e.$config=g),R({vars:e,spatialReference:y,services:t}))),new d,n,y)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8324],{68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var s=r(66643),i=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,s.UI)(r,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},20697:(e,t,r)=>{r.r(t),r.d(t,{default:()=>we});var s=r(43697),i=r(2368),o=r(46791),n=r(20102),a=r(68668),l=r(16453),p=r(95330),u=r(17445),d=r(42033),y=r(17452),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),b=r(52011),f=r(31263),g=r(87085),m=r(54295),v=r(17287),w=r(71612),C=r(17017),S=r(54253),_=r(25113),F=r(38009),I=r(16859),A=r(34760),T=r(72965),E=r(28294),O=r(66677),x=r(21506),j=r(50957),R=r(53518),L=r(35671),P=r(51773),Q=r(16050),D=(r(12501),r(28756),r(92271),r(72529),r(5499)),Z=r(84382),M=r(81571),G=(r(91423),r(92604)),q=r(10699),k=r(22974),U=r(83379),V=r(78286),H=r(30556),N=r(63213),z=r(90100),B=r(70082),$=r(54306),K=r(30707),W=r(14165),J=r(32163),Y=r(28412);const X=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],ee={key:"type",base:D.Z,errorContext:"renderer",typeMap:{simple:Z.Z,"unique-value":M.Z,"class-breaks":Q.Z}},te=(0,R.v)(),re=(0,N.d)({types:ee});let se=0;function ie(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function oe(e){switch(e){case"point":case"multipoint":return Y.xA.clone();case"polyline":return Y.CJ.clone();case"polygon":case"multipatch":return Y.z3.clone();default:return null}}function ne(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ae(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const s={},i=ne(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)s[t]=e[t]}return s[t.subtypeField]=e,new B.Z({name:"New Feature",drawingTool:r,prototype:{attributes:s}})}const le="esri.layers.support.SubtypeSublayer";let pe=class extends((0,l.R)((0,i.J)((0,q.IG)(U.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${se++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:s,parent:i}=this;let o;if(s){o=[];let e=0;s.forEach((({name:t,alias:r,editable:s,visible:n})=>{if(!n)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),s!==a.editable&&(l.editable=s,p=!0),o.push(l),p&&e++})),0===e&&o.length===s.length&&(o=null)}else o=(0,k.d9)(e);o?.length&&(0,V.RB)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,s=e?.fields;if(!e||!s?.length)return null;const{subtypes:i,subtypeField:o}=e,n=i?.find((e=>e.code===r)),a=n?.defaultValues,l=n?.domains,p=[];for(const e of s){const s=e.clone(),{name:i}=s,n=t?.find((e=>e.name===i));if(s.visible=!t||!!n,n){const{alias:e,editable:t}=n;e&&(s.alias=e),!1===t&&(s.editable=!1)}const u=a?.[i]??null;s.defaultValue=i===o?r:u;const d=l?.[i]??null;s.domain=i===o?null:d?"inherited"===d.type?s.domain:d.clone():null,p.push(s)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||G.Z.getLogger(le).error(de("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new Z.Z({symbol:oe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const s=t.drawingInfo?.renderer,i=re(s,t,r);let o;const{subtypeCode:n}=this;if(null!=n&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(n)));e&&(o=new Z.Z({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const s=t?.layerDefinition?.drawingInfo?.renderer;if(!s)return;const i=s.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:re(s,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[ae(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ne(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw de("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:s}=this;if(!s)throw de("updateAttachment");if(e.getAttribute(s.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return s.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw de("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw de("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:s,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:n}=r;t={displayField:e,editFieldsInfo:o,fields:s,objectIdField:n,title:i}}return(0,J.eZ)(t,e)}createQuery(){if(!this.parent)throw de("createQuery");const e=(0,j.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return X.some((e=>this.originIdOf(e)===f.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw de("queryAttachments");const s=e.clone();return s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw de("queryFeatures");const s=W.Z.from(e)??r.createQuery();return null!=e&&(s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(s,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"effectiveCapabilities",null),(0,s._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],pe.prototype,"charts",void 0),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],pe.prototype,"editingEnabled",void 0),(0,s._)([(0,c.Cb)({type:Boolean,readOnly:!0})],pe.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],pe.prototype,"fieldOverrides",void 0),(0,s._)([(0,H.c)("fieldOverrides")],pe.prototype,"writeFieldOverrides",null),(0,s._)([(0,c.Cb)({...te.fields,readOnly:!0,json:{read:!1}})],pe.prototype,"fields",null),(0,s._)([(0,c.Cb)(te.fieldsIndex)],pe.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"floorInfo",null),(0,s._)([(0,c.Cb)({type:z.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"formTemplate",void 0),(0,s._)([(0,c.Cb)({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"id",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"geometryType",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"type",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.iR)))],pe.prototype,"labelsVisible",void 0),(0,s._)([(0,c.Cb)({type:[$.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:K.r},write:{ignoreOrigin:!0}}})],pe.prototype,"labelingInfo",void 0),(0,s._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],pe.prototype,"layerType",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.rn)))],pe.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:["show","hide"]})],pe.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,k.d9)(x.rO);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"minScale",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,k.d9)(x.u1);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"maxScale",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"objectIdField",null),(0,s._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"opacity",void 0),(0,s._)([(0,c.Cb)({clonable:!1})],pe.prototype,"parent",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.C_)))],pe.prototype,"popupEnabled",void 0),(0,s._)([(0,c.Cb)({type:P.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.Cb)({types:ee,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],pe.prototype,"renderer",null),(0,s._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],pe.prototype,"readRendererFromService",null),(0,s._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],pe.prototype,"readRenderer",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"subtypeCode",void 0),(0,s._)([(0,c.Cb)({type:[B.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],pe.prototype,"templates",void 0),(0,s._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],pe.prototype,"readTemplatesFromService",null),(0,s._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["subtypes"])],pe.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"url",null),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"userHasUpdateItemPrivileges",null),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],pe.prototype,"visible",void 0),pe=(0,s._)([(0,b.j)(le)],pe);const ue=(e,t,r)=>{const s=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return s.test(o)?o.replace(s,i):(0,d._)(i,o)},de=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),ye=pe;var ce=r(76259),he=r(60199),be=r(12259);const fe="SubtypeGroupLayer";function ge(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const me=(0,R.v)();let ve=class extends((0,_.B)((0,S.o1)((0,w.h)((0,E.n)((0,T.M)((0,A.Q)((0,v.Y)((0,F.q)((0,I.I)((0,l.R)((0,C.N)((0,m.V)((0,i.J)(g.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.Z.ofType(ye)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,p.Ds)((async(e,t,s)=>{const{save:i,saveAs:o}=await Promise.all([r.e(6569),r.e(6404),r.e(9238),r.e(3831)]).then(r.bind(r,32664));switch(e){case be.x.SAVE:return i(this,t);case be.x.SAVE_AS:return o(this,s,t)}})),this.addHandles((0,u.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),u.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(p.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,j.nU)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,j.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.a7)(this.url,t):t}async addAttachment(e,t){return(0,j.JD)(this,e,t,fe)}async updateAttachment(e,t,r){return(0,j.Y5)(this,e,t,r,fe)}async applyEdits(e,t){return(0,j.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,p.Hl)(Promise.all([r.e(4599),r.e(3919),r.e(8949)]).then(r.bind(r,73919)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,j.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,j.FV)(this,e,t,fe)}async fetchRecomputedExtents(e){return(0,j.Ci)(this,e,fe)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,j.SU)(this,e,t,fe)}async queryFeatures(e,t){const r=await this.load(),s=W.Z.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,j.tD)(this,e,t,fe)}async queryFeatureCount(e,t){return(0,j.VG)(this,e,t,fe)}async queryExtent(e,t){return(0,j.KE)(this,e,t,fe)}async queryRelatedFeatures(e,t){return(0,j.kp)(this,e,t,fe)}async queryRelatedFeaturesCount(e,t){return(0,j.C9)(this,e,t,fe)}async save(e){return this._debouncedSaveOperations(be.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(be.x.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:s,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==s)return i?.push(ge(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===s)return i?.push(ge(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,he.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,L.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,j.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"createQueryVersion",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"editingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({...me.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ve.prototype,"fields",void 0),(0,s._)([(0,c.Cb)(me.fieldsIndex)],ve.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)(x.id)],ve.prototype,"id",void 0),(0,s._)([(0,c.Cb)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ve.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],ve.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)(me.outFields)],ve.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({clonable:!1})],ve.prototype,"source",null),(0,s._)([(0,c.Cb)({type:o.Z.ofType(ye),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const s=e.map((({code:e})=>{const s=new ye({subtypeCode:e});return s.read(t,r),s}));return new(o.Z.ofType(ye))(s)}}}},name:"layers",write:{overridePolicy(e,t,r){const s=this.originOf("sublayers"),i=f.s3.PORTAL_ITEM;let o=!0;if((0,f.M9)(s)===i&&(0,f.M9)(r.origin)>i){const t=e.some((e=>e.hasUserOverrides()));o=this._sublayersCollectionChanged||t}return{enabled:o,ignoreOrigin:!0}}}}})],ve.prototype,"sublayers",void 0),(0,s._)([(0,c.Cb)({type:ce.Z})],ve.prototype,"timeInfo",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],ve.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["name"])],ve.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({json:{read:!1}})],ve.prototype,"type",void 0),ve=(0,s._)([(0,b.j)("esri.layers.SubtypeGroupLayer")],ve);const we=ve},54295:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var s=r(43697),i=r(92604),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,i.Z.getLogger(this)))}};return(0,s._)([(0,o.Cb)()],t.prototype,"title",null),(0,s._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var s=r(43697),i=r(92604),o=r(95330),n=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new u.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function b(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:b(t,e%t):0}let f=0,g=0;function m(){const e=Date.now();let t=!1;for(const r of y){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const s=r.deref();s&&(t=b(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(m,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),i=r(2368),o=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var s,i=r(43697),o=r(46791),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=s=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=s=(0,i._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},54275:(e,t,r)=>{r.d(t,{h:()=>d});var s=r(80442),i=r(66677);function o(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:b(e),operations:f(e.capabilities,e,t),query:g(e,t),queryRelated:m(e),queryTopFeatures:v(e),editing:w(e)}}function y(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function b(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function f(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,i.Qc)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),d=l&&s.includes("update");const y=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:y,supportsQuery:a,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,i.M8)(t),b=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(a,"allowOthersToQuery",!0),supportsHistoricMoment:o(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&b.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function m(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1)}}},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>n,lj:()=>u,qP:()=>a,wW:()=>p});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8324],{68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var s=r(66643),i=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,s.UI)(r,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},20697:(e,t,r)=>{r.r(t),r.d(t,{default:()=>we});var s=r(43697),i=r(2368),o=r(46791),n=r(20102),a=r(68668),l=r(16453),p=r(95330),u=r(17445),d=r(42033),y=r(17452),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),b=r(52011),f=r(31263),g=r(87085),m=r(54295),v=r(17287),w=r(71612),C=r(17017),S=r(54253),_=r(25113),F=r(38009),I=r(16859),A=r(34760),T=r(72965),E=r(28294),O=r(66677),x=r(21506),j=r(50957),R=r(53518),L=r(35671),P=r(51773),Q=r(16050),D=(r(12501),r(28756),r(92271),r(72529),r(5499)),Z=r(84382),M=r(81571),G=(r(91423),r(92604)),q=r(10699),k=r(22974),U=r(83379),V=r(78286),H=r(30556),N=r(63213),z=r(90100),B=r(70082),$=r(54306),K=r(30707),W=r(14165),J=r(32163),Y=r(28412);const X=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],ee={key:"type",base:D.Z,errorContext:"renderer",typeMap:{simple:Z.Z,"unique-value":M.Z,"class-breaks":Q.Z}},te=(0,R.v)(),re=(0,N.d)({types:ee});let se=0;function ie(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function oe(e){switch(e){case"point":case"multipoint":return Y.xA.clone();case"polyline":return Y.CJ.clone();case"polygon":case"multipatch":return Y.z3.clone();default:return null}}function ne(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ae(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const s={},i=ne(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)s[t]=e[t]}return s[t.subtypeField]=e,new B.Z({name:"New Feature",drawingTool:r,prototype:{attributes:s}})}const le="esri.layers.support.SubtypeSublayer";let pe=class extends((0,l.R)((0,i.J)((0,q.IG)(U.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${se++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:s,parent:i}=this;let o;if(s){o=[];let e=0;s.forEach((({name:t,alias:r,editable:s,visible:n})=>{if(!n)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let p=!1;r!==a.alias&&(l.alias=r,p=!0),s!==a.editable&&(l.editable=s,p=!0),o.push(l),p&&e++})),0===e&&o.length===s.length&&(o=null)}else o=(0,k.d9)(e);o?.length&&(0,V.RB)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,s=e?.fields;if(!e||!s?.length)return null;const{subtypes:i,subtypeField:o}=e,n=i?.find((e=>e.code===r)),a=n?.defaultValues,l=n?.domains,p=[];for(const e of s){const s=e.clone(),{name:i}=s,n=t?.find((e=>e.name===i));if(s.visible=!t||!!n,n){const{alias:e,editable:t}=n;e&&(s.alias=e),!1===t&&(s.editable=!1)}const u=a?.[i]??null;s.defaultValue=i===o?r:u;const d=l?.[i]??null;s.domain=i===o?null:d?"inherited"===d.type?s.domain:d.clone():null,p.push(s)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||G.Z.getLogger(le).error(de("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new Z.Z({symbol:oe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const s=t.drawingInfo?.renderer,i=re(s,t,r);let o;const{subtypeCode:n}=this;if(null!=n&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(n)));e&&(o=new Z.Z({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const s=t?.layerDefinition?.drawingInfo?.renderer;if(!s)return;const i=s.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:re(s,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[ae(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ne(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw de("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:s}=this;if(!s)throw de("updateAttachment");if(e.getAttribute(s.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return s.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw de("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw de("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:s,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:n}=r;t={displayField:e,editFieldsInfo:o,fields:s,objectIdField:n,title:i}}return(0,J.eZ)(t,e)}createQuery(){if(!this.parent)throw de("createQuery");const e=(0,j.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return X.some((e=>this.originIdOf(e)===f.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw de("queryAttachments");const s=e.clone();return s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw de("queryFeatures");const s=W.Z.from(e)??r.createQuery();return null!=e&&(s.where=ue(s.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(s,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"effectiveCapabilities",null),(0,s._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],pe.prototype,"charts",void 0),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],pe.prototype,"editingEnabled",void 0),(0,s._)([(0,c.Cb)({type:Boolean,readOnly:!0})],pe.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],pe.prototype,"fieldOverrides",void 0),(0,s._)([(0,H.c)("fieldOverrides")],pe.prototype,"writeFieldOverrides",null),(0,s._)([(0,c.Cb)({...te.fields,readOnly:!0,json:{read:!1}})],pe.prototype,"fields",null),(0,s._)([(0,c.Cb)(te.fieldsIndex)],pe.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"floorInfo",null),(0,s._)([(0,c.Cb)({type:z.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"formTemplate",void 0),(0,s._)([(0,c.Cb)({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"id",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"geometryType",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"type",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.iR)))],pe.prototype,"labelsVisible",void 0),(0,s._)([(0,c.Cb)({type:[$.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:K.r},write:{ignoreOrigin:!0}}})],pe.prototype,"labelingInfo",void 0),(0,s._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],pe.prototype,"layerType",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.rn)))],pe.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:["show","hide"]})],pe.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,k.d9)(x.rO);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"minScale",void 0),(0,s._)([(0,c.Cb)((()=>{const e=(0,k.d9)(x.u1);return e.json.origins.service.read=!1,ie(e)})())],pe.prototype,"maxScale",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"objectIdField",null),(0,s._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"opacity",void 0),(0,s._)([(0,c.Cb)({clonable:!1})],pe.prototype,"parent",void 0),(0,s._)([(0,c.Cb)(ie((0,k.d9)(x.C_)))],pe.prototype,"popupEnabled",void 0),(0,s._)([(0,c.Cb)({type:P.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.Cb)({types:ee,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],pe.prototype,"renderer",null),(0,s._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],pe.prototype,"readRendererFromService",null),(0,s._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],pe.prototype,"readRenderer",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"subtypeCode",void 0),(0,s._)([(0,c.Cb)({type:[B.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],pe.prototype,"templates",void 0),(0,s._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],pe.prototype,"readTemplatesFromService",null),(0,s._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["subtypes"])],pe.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"url",null),(0,s._)([(0,c.Cb)({readOnly:!0})],pe.prototype,"userHasUpdateItemPrivileges",null),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],pe.prototype,"visible",void 0),pe=(0,s._)([(0,b.j)(le)],pe);const ue=(e,t,r)=>{const s=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return s.test(o)?o.replace(s,i):(0,d._)(i,o)},de=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),ye=pe;var ce=r(76259),he=r(60199),be=r(12259);const fe="SubtypeGroupLayer";function ge(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const me=(0,R.v)();let ve=class extends((0,_.B)((0,S.o1)((0,w.h)((0,E.n)((0,T.M)((0,A.Q)((0,v.Y)((0,F.q)((0,I.I)((0,l.R)((0,C.N)((0,m.V)((0,i.J)(g.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.Z.ofType(ye)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,p.Ds)((async(e,t,s)=>{const{save:i,saveAs:o}=await Promise.all([r.e(6569),r.e(6404),r.e(9238),r.e(3831)]).then(r.bind(r,32664));switch(e){case be.x.SAVE:return i(this,t);case be.x.SAVE_AS:return o(this,s,t)}})),this.addHandles((0,u.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),u.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(p.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,j.nU)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,j.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.a7)(this.url,t):t}async addAttachment(e,t){return(0,j.JD)(this,e,t,fe)}async updateAttachment(e,t,r){return(0,j.Y5)(this,e,t,r,fe)}async applyEdits(e,t){return(0,j.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,p.Hl)(Promise.all([r.e(4599),r.e(9379),r.e(8949)]).then(r.bind(r,49379)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,j.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,j.FV)(this,e,t,fe)}async fetchRecomputedExtents(e){return(0,j.Ci)(this,e,fe)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,j.SU)(this,e,t,fe)}async queryFeatures(e,t){const r=await this.load(),s=W.Z.from(e)??r.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await r.source.queryFeatures(s,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,j.tD)(this,e,t,fe)}async queryFeatureCount(e,t){return(0,j.VG)(this,e,t,fe)}async queryExtent(e,t){return(0,j.KE)(this,e,t,fe)}async queryRelatedFeatures(e,t){return(0,j.kp)(this,e,t,fe)}async queryRelatedFeaturesCount(e,t){return(0,j.C9)(this,e,t,fe)}async save(e){return this._debouncedSaveOperations(be.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(be.x.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:s,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==s)return i?.push(ge(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===s)return i?.push(ge(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,he.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,L.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,j.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"createQueryVersion",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"editingEnabled",null),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"effectiveEditingEnabled",null),(0,s._)([(0,c.Cb)({...me.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ve.prototype,"fields",void 0),(0,s._)([(0,c.Cb)(me.fieldsIndex)],ve.prototype,"fieldsIndex",void 0),(0,s._)([(0,c.Cb)(x.id)],ve.prototype,"id",void 0),(0,s._)([(0,c.Cb)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ve.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],ve.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)(me.outFields)],ve.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],ve.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({clonable:!1})],ve.prototype,"source",null),(0,s._)([(0,c.Cb)({type:o.Z.ofType(ye),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const s=e.map((({code:e})=>{const s=new ye({subtypeCode:e});return s.read(t,r),s}));return new(o.Z.ofType(ye))(s)}}}},name:"layers",write:{overridePolicy(e,t,r){const s=this.originOf("sublayers"),i=f.s3.PORTAL_ITEM;let o=!0;if((0,f.M9)(s)===i&&(0,f.M9)(r.origin)>i){const t=e.some((e=>e.hasUserOverrides()));o=this._sublayersCollectionChanged||t}return{enabled:o,ignoreOrigin:!0}}}}})],ve.prototype,"sublayers",void 0),(0,s._)([(0,c.Cb)({type:ce.Z})],ve.prototype,"timeInfo",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],ve.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["name"])],ve.prototype,"readTitleFromService",null),(0,s._)([(0,c.Cb)({json:{read:!1}})],ve.prototype,"type",void 0),ve=(0,s._)([(0,b.j)("esri.layers.SubtypeGroupLayer")],ve);const we=ve},54295:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var s=r(43697),i=r(92604),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,i.Z.getLogger(this)))}};return(0,s._)([(0,o.Cb)()],t.prototype,"title",null),(0,s._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var s=r(43697),i=r(92604),o=r(95330),n=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new u.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function b(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:b(t,e%t):0}let f=0,g=0;function m(){const e=Date.now();let t=!1;for(const r of y){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const s=r.deref();s&&(t=b(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(m,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),i=r(2368),o=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var s,i=r(43697),o=r(46791),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=s=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=s=(0,i._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},54275:(e,t,r)=>{r.d(t,{h:()=>d});var s=r(80442),i=r(66677);function o(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:b(e),operations:f(e.capabilities,e,t),query:g(e,t),queryRelated:m(e),queryTopFeatures:v(e),editing:w(e)}}function y(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function b(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function f(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,i.Qc)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),d=l&&s.includes("update");const y=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:y,supportsQuery:a,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,i.M8)(t),b=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(a,"allowOthersToQuery",!0),supportsHistoricMoment:o(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&b.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function m(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1)}}},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>n,lj:()=>u,qP:()=>a,wW:()=>p});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4136],{5154:(t,e,n)=>{n.d(e,{Ue:()=>Vn,G8:()=>Ln});var s=n(3892),r=n(20102),o=n(22974),i=n(43697),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),u=(n(92604),n(96674));let c=class extends u.wq{constructor(){super(...arguments),this.raster=void 0}};(0,i._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"raster",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.AspectFunctionArguments")],c);const p=c;var f;let h=f=class extends p{clone(){return new f({raster:this.raster})}};h=f=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.AspectFunctionArguments")],h);const m=h;var d=n(90578),g=n(5847),y=n(25972);const b=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends u.wq{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const e=[t],{parameters:n}=t;let s=n.rasters||n.raster&&[n.raster];for(;s?.length;){e.unshift(...s);const t=[];for(let e=0;e<s.length;e++){const{parameters:n}=s[e],r=n.rasters||n.raster&&[n.raster];r?.length&&t.push(...r)}s=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let r=!1;for(let t=0;t<e.length;t++){const n=e[t];n.id=e.length-t-1;const{rasters:s}=n.parameters;r=r||null!=s&&s.length>1}const o=e.some((({name:t})=>b.has(t.toLowerCase())));return{functions:e,hasBranches:r,hasFocalFunction:o}}bind(t,e=!1,n=-1){this.id=n+1;const s=this._getRasterValues();let r=!0;for(let n=0;n<s.length;n++){const o=s[n];if(null!=o&&this._isRasterFunctionValue(o)){const s=o.bind(t,e,this.id+n);if(!s.success)return this._bindingResult=s,s;r=r&&s.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.success&&this._patchRasterInfo(),this._bindingResult.supportsGPU=r&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const e=this._getRasterValues(),n=0===e.length?t.pixelBlocks??t.primaryPixelBlocks:e.map((e=>this._readRasterValue(e,t)));return this._processPixels({...t,pixelBlocks:n})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let e;if(t.length>1){const e=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=e,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,e)=>t!==e));const n=t.filter((t=>"ExtractBand"===t.functionName));return n.length&&n.forEach(((t,e)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[e,e,e]})),this.rawInputBandIds}const n=t[0];if(n){if(e=n.processInputBandIds(),n.isInputBandIdsSwizzled)return this.rawInputBandIds=e,e}else{e=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let n=0;n<t;n++)e.push(n)}const s=this._getInputBandIds(e);return this.isInputBandIdsSwizzled=s.some(((t,e)=>t!==e)),this.rawInputBandIds=s,this.rawInputBandIds}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:n}=this.functionArguments;return n&&Array.isArray(n)&&n.length?(t.rasters=n.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:n,rasterIds:s}=t;if(0===e.length)return n;const r=e.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&s.includes(t)?n[s.indexOf(t)]:"number"!=typeof t?n[0]:void 0)),o=r.find((t=>t))??n[0];return r.forEach(((t,e)=>{void 0===t&&(r[e]=o)})),r}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,e=[],n=[]){for(let s=0;s<t.sourceRasters.length;s++){const r=t.sourceRasters[s];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,n);else{const t=r,s=this._getPrimaryRasterId(t);if(null==s)continue;n.includes(s)||(this.mainPrimaryRasterId===s?(e.unshift(t),n.unshift(s)):(e.push(t),n.push(s)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e){const{primaryPixelBlocks:n}=e;if(null==t||"$$"===t){const t=n[0];return null==t?null:t.clone()}if("string"==typeof t){const s=e.primaryRasterIds.indexOf(t);return-1===s?null:n[s]}if("number"==typeof t){const e=n[0];if(null==e)return null;const{width:s,height:r,pixelType:o,mask:i}=e,a=i?new Uint8Array(i):null,l=new Float32Array(s*r);l.fill(t);const u=this.sourceRasterInfos[0].bandCount,c=new Array(u).fill(l);return new g.Z({width:s,height:r,pixelType:o,pixels:c,mask:a})}return t.process(e)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:n,statistics:s,histograms:r}=t,o=n.BandProperties;o&&o.length!==e&&(t.keyProperties={...n,BandProperties:void 0}),s&&s.length!==e&&(t.statistics=s.length>e?s.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),n.BAND_COUNT&&Number(n.BAND_COUNT)!==e&&(t.keyProperties={...n,BAND_COUNT:"string"==typeof n.BAND_COUNT?String(e):e})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}}),(0,d.p)((t=>t?.toLowerCase()))],x.prototype,"outputPixelType",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"sourceRasters",void 0),(0,i._)([(0,a.Cb)({type:[y.Z],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"id",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"isNoopProcess",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"supportsGPU",null),(0,i._)([(0,a.Cb)()],x.prototype,"rawInputBandIds",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"isInputBandIdsSwizzled",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"swizzledBandSelection",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"isBranch",void 0),(0,i._)([(0,a.Cb)()],x.prototype,"flatWebGLFunctionChain",null),(0,i._)([(0,a.Cb)()],x.prototype,"_bindingResult",void 0),x=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.BaseRasterFunction")],x);const w=x;var v=n(63342);let _=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.histograms=null,e.colormap=null,e.attributeTable=null,e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{extent:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1});return(0,v.M_)(e,{resolution:o})}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],_.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:m,json:{write:!0,name:"rasterFunctionArguments"}})],_.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],_.prototype,"isGCS",void 0),_=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.AspectFunction")],_);const C=_;var A=n(36030),P=n(35454);const R=new Set(["+","-","*","/","(",")"]);function N(t,e,n,s){if("number"==typeof n&&"number"==typeof s)return n+s;let r,o,i;"number"==typeof n?(i=s,r=i.length,o=new Float32Array(r),o.fill(n)):(r=n.length,o=n,s.constructor===Number?(i=new Float32Array(r),i.fill(s)):i=s);const a=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]+i[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]-i[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]*i[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&i[e]&&(a[e]=o[e]/i[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function T(t,e){t.splice(e,1);let n=0,s=0;do{n=0,s=0;for(let e=0;e<t.length;e++)if("("===t[e])n=e;else if(")"===t[e]){s=e;break}s===n+1&&t.splice(n,2)}while(s===n+1);return t}function F(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,n=0;for(let s=0;s<t.length;s++)if("("===t[s])e=s;else if(")"===t[s]){n=s;break}const s=0===n?t:t.slice(e+1,n);let r=-1;for(let t=0;t<s.length;t++)if("*"===s[t]||"/"===s[t]){r=t;break}if(r>-1)n>0&&(r+=e+1);else{for(let t=0;t<s.length;t++)if("+"===s[t]||"-"===s[t]){r=t;break}n>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var k=n(55914);const I=new P.X({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function j(t,e){if(!(0,k.nk)(t))return t;const{equation:n,method:s}=e,r=e.bandIndexes.map((t=>t-1)),{pixels:o,mask:i}=t;let a;switch(s){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":a=M(i,o[r[0]],o[r[1]]);break;case"ndwi":a=M(i,o[r[1]],o[r[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,n){const s=e.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,n,s){const r=n.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=n[i],r=e[i],a=r+t+s;a&&(o[i]=(r-t)/a*(1+s))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,n,s,r,o){const i=n.length,a=new Float32Array(i),l=-r*s+o*(1+s*s);for(let o=0;o<i;o++)if(null==t||t[o]){const t=n[o],i=e[o],u=r*i+t+l;u&&(a[o]=s*(i-s*t-r)/u)}return[a]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1,r[4]+1);break;case"msavi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o];r[o]=.5*(2*(s+1)-Math.sqrt((2*s+1)**2-8*(s-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o];if(1!==t){const e=(2*(s*s-t*t)+1.5*s+.5*t)/(s+t+.5);r[o]=e*(1-.25*e)-(t-.125)/(1-t)}}return[r]}(i,o[r[0]],o[r[1]]);break;case"pvi":a=function(t,e,n,s,r){const o=n.length,i=new Float32Array(o),a=Math.sqrt(1+s*s);for(let l=0;l<o;l++)if(null==t||t[l]){const t=n[l],o=e[l];i[l]=(o-s*t-r)/a}return[i]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1);break;case"gvitm":a=function(t,e){const[n,s,r,o,i,a]=e,l=n.length,u=new Float32Array(l);for(let e=0;e<l;e++)(null==t||t[e])&&(u[e]=-.2848*n[e]-.2435*s[e]-.5436*r[e]+.7243*o[e]+.084*i[e]-1.18*a[e]);return[u]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"sultan":a=function(t,e){const[n,,s,r,o,i]=e,a=n.length,l=new Float32Array(a),u=new Float32Array(a),c=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(l[e]=i[e]?o[e]/i[e]*100:0,u[e]=n[e]?o[e]/n[e]*100:0,c[e]=r[e]?s[e]/r[e]*(o[e]/r[e])*100:0);return[l,u,c]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"vari":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=o+t-r[e];a&&(i[e]=(o-t)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"mtvi2":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e],l=Math.sqrt((2*t+1)**2-6*t-5*Math.sqrt(o)-.5);i[e]=1.5*(1.2*(t-a)-2.5*(o-a))*l}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e];i[e]=100*(t-o)-10*(t-a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"evi":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=t+6*o-7.5*r[e]+1;a&&(i[e]=2.5*(t-o)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"wndwi":a=function(t,e,n=.5){const[s,r,o]=e,i=r.length,a=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){const t=s[e],i=r[e],l=o[e],u=t+n*i+(1-n)*l;u&&(a[e]=(t-n*i-(1-n)*l)/u)}return[a]}(i,[o[r[0]],o[r[1]],o[r[2]]],r[3]?r[3]+1:.5);break;case"bai":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o])for(o=0;o<s;o++){const t=(.1-e[o])**2+(.06-n[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,n){let s,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1,t.length));const n=t.split(""),s=[],r=[];let o="";for(let t=0;t<n.length;t++){const i=n[t];if(R.has(i))""!==o&&r.push(parseFloat(o)),s.push(i),o="";else{if("b"===i.toLowerCase()){t++,o=i.concat(n[t]),r.push(e[parseInt(o[1],10)-1]),o="";continue}o=o.concat(i),t===n.length-1&&r.push(parseFloat(o))}}return{ops:s,nums:r}}(n,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const n=new Float32Array(e[0].length);return"number"==typeof t?n.fill(t):n.set(t),[n]}for(;r.length>0;){const{numIndex:e,opIndex:n}=F(r);if(s=N(t,r[n],o[e],o[e+1]),1===r.length)break;r=T(r,n),o.splice(e,2,s)}return[s]}(i,o,n);break;default:return t}const l=null!=i?new Uint8Array(i.length):null;null!=i&&null!=l&&l.set(i);const u=new g.Z({width:t.width,height:t.height,pixelType:"f32",pixels:a,mask:l});return u.updateStatistics(),u}function S(t){const e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function M(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o],i=t+s;i&&(r[o]=(t-s)/i)}return[r]}var B;let O=B=class extends p{constructor(){super(...arguments),this.method="custom"}clone(){return new B({method:this.method,bandIndexes:this.bandIndexes,raster:(0,o.d9)(this.raster)})}};(0,i._)([(0,a.Cb)({json:{type:String,write:!0}})],O.prototype,"bandIndexes",void 0),(0,i._)([(0,A.J)(I)],O.prototype,"method",void 0),O=B=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.BandArithmeticFunctionArguments")],O);const G=O,E=new Set(["vari","mtvi2","rtvi-core","evi"]);let D=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};const e=t.clone();return e.pixelType=this.outputPixelType,e.statistics=null,e.histograms=null,e.bandCount="sultan"===this.functionArguments.method?3:1,e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{method:n,bandIndexes:s}=this.functionArguments,r=s.split(" ").map((t=>parseFloat(t)));return j(e,{method:n,bandIndexes:r,equation:s})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map((t=>parseFloat(t)-1));2===t.length&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let n,s;const r=new Float32Array(3),{method:o}=this.functionArguments;switch(o){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":n=S([e[0],e[1],0]),s="ndxi";break;case"ndwi":n=S([e[1],e[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=S([e[0],e[1],0]),s="sr";break;case"ci-g":case"ci-re":n=S([e[0],e[1],0]),s="ci";break;case"savi":n=S([e[0],e[1],0]),s="savi",r[0]=t[2]+1;break;case"tsavi":n=S([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":n=S([e[0],e[1],0]),s="msavi";break;case"gemi":n=S([e[0],e[1],0]),s="gemi";break;case"pvi":n=S([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=S([e[0],e[1],e[2]]),s="vari";break;case"mtvi2":n=S([e[0],e[1],e[2]]),s="mtvi2";break;case"rtvi-core":n=S([e[0],e[1],e[2]]),s="rtvicore";break;case"evi":n=S([e[0],e[1],e[2]]),s="evi";break;case"wndwi":n=S([e[0],e[1],0]),s="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=S([e[1],e[0],0]),s="bai";break;default:n=S([0,1,2]),s="custom"}return{bandIndexMat3:n,indexType:s,adjustments:r}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;const e=this.functionArguments.bandIndexes.split(" ").map((t=>parseFloat(t)-1)),n=t.length,s=e.map((t=>t>=n?n-1:t)),r=E.has(this.functionArguments.method)?3:2,o=s.slice(0,r).map((e=>t[e]));return 2===o.length&&o.push(0),o}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],D.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:G,json:{write:!0,name:"rasterFunctionArguments"}})],D.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],D.prototype,"rasterArgumentNames",void 0),D=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.BandArithmeticFunction")],D);const z=D;var Z,L=n(71715),V=n(93010),U=n(94593);let W=Z=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return V.Oi.includes(e)?e:null}readColorRamp(t){return(0,U.i)(t)}readColorRampName(t,e){if(!t)return null;const n=V.H0.jsonValues.find((e=>e.toLowerCase()===t.toLowerCase()));return n?V.H0.fromJSON(n):null}clone(){return new Z({colormap:(0,o.d9)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,i._)([(0,a.Cb)({type:[[Number]],json:{write:!0}})],W.prototype,"colormap",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],W.prototype,"colormapName",void 0),(0,i._)([(0,d.p)("colormapName")],W.prototype,"castColormapName",null),(0,i._)([(0,a.Cb)({types:U.V,json:{write:!0}})],W.prototype,"colorRamp",void 0),(0,i._)([(0,L.r)("colorRamp")],W.prototype,"readColorRamp",null),(0,i._)([(0,a.Cb)({type:V.H0.apiValues,json:{type:V.H0.jsonValues,write:V.H0.write}})],W.prototype,"colorRampName",void 0),(0,i._)([(0,L.r)("colorRampName")],W.prototype,"readColorRampName",null),W=Z=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ColormapFunctionArguments")],W);const q=W,X=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],J=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function $(t,e){const n=[],s=[];for(let e=0;e<t.length-1;e++)n.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),s.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,V.XL)({type:"multipart",colorRamps:n},{numColors:r,weights:e=e??s})}let H=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:n,colorRamp:s,colorRampName:r}=this.functionArguments;if(!e?.length)if(s)e=(0,V.Jw)(s,{interpolateAlpha:!0});else if(r){const t=(0,V.B4)(r);t&&(e=(0,V.Jw)(t))}else n&&(e=function(t){let e;switch(t){case"elevation":e=$([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,V.XL)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=$([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=X;break;case"ndvi2":e=function(){const t=$([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=J;break;case"random":e=function(){const t=[];for(let e=0;e<256;e++){const e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map(((t,e)=>[e,...t])),e):null}(n));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};this.outputPixelType=this._getOutputPixelType("u8");const o=t.clone();return o.pixelType=this.outputPixelType,o.colormap=e,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],H.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:q,json:{write:!0,name:"rasterFunctionArguments"}})],H.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],H.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)()],H.prototype,"isNoopProcess",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],H.prototype,"indexedColormap",void 0),H=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ColormapFunction")],H);const Y=H;var K,Q=n(30556);let tt=K=class extends p{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map((t=>"number"==typeof t||"string"==typeof t?t:t.toJSON()))}clone(){return new K({rasters:(0,o.d9)(this.rasters)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],tt.prototype,"rasters",void 0),(0,i._)([(0,Q.c)("rasters")],tt.prototype,"writeRasters",null),tt=K=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")],tt);const et=tt;let nt=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();if(n.attributeTable=null,n.colormap=null,n.pixelType=this.outputPixelType,n.bandCount=t.map((({bandCount:t})=>t)).reduce(((t,e)=>t+e)),t.every((({statistics:t})=>null!=t&&t.length))){const e=[];t.forEach((({statistics:t})=>null!=t&&e.push(...t))),n.statistics=e}if(t.every((({histograms:t})=>null!=t&&t.length))){const e=[];t.forEach((({histograms:t})=>null!=t&&e.push(...t))),n.histograms=e}n.bandCount>1&&(n.colormap=null,n.attributeTable=null);const s=t.every((t=>t.keyProperties.BandProperties?.length))?t.flatMap((t=>t.keyProperties.BandProperties)):void 0;return n.keyProperties={...n.keyProperties,BandProperties:s},this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const n=e?.[0];return null==n?null:(0,k.Gd)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],nt.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:et,json:{write:!0,name:"rasterFunctionArguments"}})],nt.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],nt.prototype,"rasterArgumentNames",void 0),nt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CompositeBandFunction")],nt);const st=nt;var rt;let ot=rt=class extends p{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new rt({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],ot.prototype,"contrastOffset",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],ot.prototype,"brightnessOffset",void 0),ot=rt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ContrastBrightnessFunctionArguments")],ot);const it=ot;var at=n(15612);let lt=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const n=e.clone();n.colormap=null,n.statistics=null,n.histograms=null,this.rasterInfo=n;const{contrastOffset:s,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,at.gI)(s,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,k.XV)(e,{lut:e.pixels.map((()=>this.lookup)),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],lt.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:it,json:{write:!0,name:"rasterFunctionArguments"}})],lt.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],lt.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],lt.prototype,"lookup",void 0),lt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ContrastBrightnessFunction")],lt);const ut=lt,ct={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},pt={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},ft={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},ht={setNull:50,conditional:78},mt={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...pt,...ft,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...ht};var dt=n(81578);function gt(t,e,n,s,r){const o=Math.floor(s/2);for(let s=0;s<o;s++)for(let o=0;o<e;o++)t[s*e+o]=t[(r-1-s)*e+o],t[(n-1-s)*e+o]=t[(n-r+s)*e+o];const i=Math.floor(r/2);for(let s=0;s<n;s++){const n=s*e;for(let s=0;s<i;s++)t[n+s]=t[n+r-1-s],t[n+e-s-1]=t[n+e+s-r]}}const yt=new Map;function bt(t,e,n,s,r,o,i){const a=new Float32Array(e*n),l=o.length,u=i?0:s,c=i?s:0,p=i?1:e;for(let i=u;i<n-u;i++){const n=i*e;for(let i=c;i<e-c;i++){if(r&&!r[n+i])continue;let e=0;for(let r=0;r<l;r++)e+=t[n+i+(r-s)*p]*o[r];a[n+i]=e}}return a}function xt(t,e,n,s,r,o,i){const a=new Float32Array(e*n),l=Math.floor(s/2),u=Math.floor(r/2);for(let c=l;c<n-l;c++){const n=c*e;for(let c=u;c<e-u;c++){if(o&&!o[n+c])continue;let p=0;for(let o=0;o<s;o++)for(let s=0;s<r;s++)p+=t[n+c+(o-l)*e+s-u]*i[o*r+s];a[n+c]=p}}return a}var wt;yt.set(ct.none,[0,0,0,0,1,0,0,0,0]),yt.set(ct.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),yt.set(ct.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),yt.set(ct.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),yt.set(ct.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),yt.set(ct.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),yt.set(ct.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),yt.set(ct.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),yt.set(ct.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),yt.set(ct.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),yt.set(ct.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),yt.set(ct.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),yt.set(ct.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),yt.set(ct.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),yt.set(ct.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),yt.set(ct.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),yt.set(ct.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),yt.set(ct.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),yt.set(ct.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),yt.set(ct.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),yt.set(ct.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),yt.set(ct.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),yt.set(ct.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let vt=wt=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const e=yt.get(t);if(!e||t===ct.userDefined||t===ct.none)return;const n=Math.sqrt(e.length);this._set("kernel",e),this._set("cols",n),this._set("rows",n)}clone(){return new wt({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,o.d9)(this.raster)})}};(0,i._)([(0,a.Cb)({json:{type:Number,write:!0}})],vt.prototype,"rows",void 0),(0,i._)([(0,a.Cb)({json:{type:Number,write:!0}})],vt.prototype,"cols",void 0),(0,i._)([(0,a.Cb)({json:{name:"type",type:Number,write:!0}})],vt.prototype,"convolutionType",null),(0,i._)([(0,a.Cb)({json:{type:[Number],write:!0}})],vt.prototype,"kernel",void 0),vt=wt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")],vt);const _t=vt;let Ct=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:s}=this.functionArguments;if(!Object.values(ct).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==ct.none&&e*n!==s.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const o=r.clone();o.pixelType=this.outputPixelType;const i=[ct.none,ct.sharpen,ct.sharpen2,ct.sharpening3x3,ct.sharpening5x5];return"u8"===this.outputPixelType||i.includes(t)||(o.statistics=null,o.histograms=null),o.colormap=null,o.attributeTable=null,this.rasterInfo=o,{success:!0,supportsGPU:s.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===ct.none)return e;let{kernel:n,rows:s,cols:r}=this.functionArguments;const o=n.reduce(((t,e)=>t+e));return 0!==o&&1!==o&&(n=n.map((t=>t/o))),function(t,e){const n=function(t){const e=Math.sqrt(t.length),n=t.slice(0,e),s=[1];for(let n=1;n<e;n++){let r=null;for(let s=0;s<e;s++){const o=t[s+n*e],i=t[s];if(null==r)if(0===i){if(o)return{separable:!1,row:null,col:null}}else r=o/i;else if(o/i!==r)return{separable:!1,row:null,col:null}}if(null==r)return{separable:!1,row:null,col:null};s.push(r)}return{separable:!0,row:n,col:s}}(e.kernel),s=!1!==e.mirrorEdges,r=n.separable?function(t,e,n,s=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:l}=t,u=r.length,c=[],p=e.length,f=n.length,h=Math.floor(p/2),m=Math.floor(f/2);for(let t=0;t<u;t++){let a=bt(r[t],o,i,h,l,e,!0);a=bt(a,o,i,m,l,n,!1),s&>(a,o,i,p,f),c.push(a)}return new g.Z({width:o,height:i,pixelType:a,pixels:c,mask:l})}(t,n.row,n.col,s):function(t,e,n=!0){const{pixels:s,width:r,height:o,pixelType:i,mask:a}=t,l=s.length,u=[],{kernel:c,rows:p,cols:f}=e;for(let t=0;t<l;t++){const e=xt(s[t],r,o,p,f,a,c);n&>(e,r,o,p,f),u.push(e)}return new g.Z({width:r,height:o,pixelType:i,pixels:u,mask:a})}(t,e,s),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:n,rows:s,cols:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{kernel:t}=this.functionArguments;const e=t.reduce(((t,e)=>t+e));0!==e&&1!==e&&(t=t.map((t=>t/e)));const n=new Float32Array(25);return n.set(t),{kernelRows:this.functionArguments.rows,kernelCols:this.functionArguments.cols,kernel:n,clampRange:(0,dt.r)(this.outputPixelType)}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Ct.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:_t,json:{write:!0,name:"rasterFunctionArguments"}})],Ct.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ct.prototype,"rasterArgumentNames",void 0),Ct=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ConvolutionFunction")],Ct);const At=Ct;var Pt;const Rt=new P.X({0:"standard",1:"platform",2:"profile"},{useNumericKeys:!0});let Nt=Pt=class extends p{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return Rt.fromJSON(e.type??e.curvatureType??0)}clone(){return new Pt({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i._)([(0,a.Cb)({json:{write:{target:"type"}}}),(0,A.J)(Rt)],Nt.prototype,"curvatureType",void 0),(0,i._)([(0,L.r)("curvatureType",["type","curvatureType"])],Nt.prototype,"readCurvatureType",null),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],Nt.prototype,"zFactor",void 0),Nt=Pt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CurvatureFunctionArguments")],Nt);const Tt=Nt;let Ft=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,curvatureType:s}=this.functionArguments,{extent:r,primaryPixelSizes:o}=t,i=o?.[0],a=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),l=this.isGCS&&n>=1?n*v._p:n;return(0,v.Ne)(e,{zFactor:l,curvatureType:s,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*v._p:t}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Ft.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Tt,json:{write:!0,name:"rasterFunctionArguments"}})],Ft.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ft.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ft.prototype,"isGCS",void 0),Ft=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CurvatureFunction")],Ft);const kt=Ft;var It;let jt=It=class extends p{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=k.CD.bestMatch}clone(){return new It({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],jt.prototype,"bandIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],jt.prototype,"bandNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],jt.prototype,"bandWavelengths",void 0),(0,i._)([(0,A.J)({0:"name",1:"wavelength",2:"id"})],jt.prototype,"method",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],jt.prototype,"missingBandAction",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],jt.prototype,"wavelengthMatchTolerance",void 0),jt=It=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")],jt);const St=jt;let Mt=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,n=e[0],{method:s,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,l=r?.length&&("name"===s||"id"!==s&&!i?.length),u=o?.length&&("wavelength"===s||"id"!==s&&!i?.length),c=a===k.CD.fail,p=l?this._matchBandNames(n,r):u?this._matchBandWavelengths(n,o,c):this._matchBandIds(n,i,c);if(null==p)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":u?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=p,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const f=n.clone();f.pixelType=this.outputPixelType,f.bandCount=p.length;const{statistics:h,histograms:m}=f;null!=h&&h.length&&(f.statistics=p.map((t=>h[t]||h[h.length-1]))),null!=m&&m.length&&(f.histograms=p.map((t=>m[t]||m[m.length-1])));let d=f.keyProperties?.BandProperties;return d?.length&&(d=p.map((t=>t>=d.length?d[d.length-1]:d[t])),f.keyProperties={...f.keyProperties,BandProperties:d}),this.rasterInfo=f,{success:!0,supportsGPU:f.bandCount<=3}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const n=e.pixels.length,s=this.functionArguments.bandIds.map((t=>t>=n?n-1:t));return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:S(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map((t=>t>=e?e-1:t)).map((e=>t[e]))}_matchBandNames(t,e){const n=t.bandInfos.map((({name:t})=>t.toLowerCase())),s=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=n.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=n.findIndex((t=>t.startsWith("nearinfrared_1"))),-1===o&&(o=n.findIndex((t=>t.startsWith("nearinfrared"))))),-1===o)return null;s.push(o)}return s}_matchBandIds(t,e,n){const{bandCount:s}=t;return!e?.length||n&&e.some((t=>t<0||t>=s))?null:e}_matchBandWavelengths(t,e,n){const{bandInfos:s}=t,r=[];for(let t=0;t<s.length;t++){const{minWavelength:e,maxWavelength:n}=s[t];if(!e||!n)return null;r.push({minWavelength:e,maxWavelength:n})}const{wavelengthMatchTolerance:o}=this.functionArguments,i=[];for(let t=0;t<e.length;t++){const s=e[t];let a=!1,l=-1,u=Number.MAX_VALUE;for(let t=0;t<r.length;t++){const e=r[t],n=s>=e.minWavelength&&s<=e.maxWavelength,o=Math.abs(s-(e.minWavelength+e.maxWavelength)/2);n?o<u&&(a=!0,l=t,u=o):!a&&o<u&&(l=t,u=o)}if(!a&&o&&u<o&&(a=!0),!a&&n)return null;i.push(l)}return i}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Mt.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:St,json:{write:!0,name:"rasterFunctionArguments"}})],Mt.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Mt.prototype,"rasterArgumentNames",void 0),Mt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ExtractBandFunction")],Mt);const Bt=Mt;var Ot;let Gt=Ot=class extends p{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map((t=>"number"==typeof t||"string"==typeof t?t:t.toJSON()))}clone(){return new Ot({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.d9)(this.rasters)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Gt.prototype,"operation",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Gt.prototype,"rasters",void 0),(0,i._)([(0,Q.c)("rasters")],Gt.prototype,"writeRasters",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Gt.prototype,"processAsMultiband",void 0),Gt=Ot=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.LocalFunctionArguments")],Gt);const Et=Gt,Dt=new Map;Dt.set(ft.acos,[0,Math.PI]),Dt.set(ft.asin,[-Math.PI/2,Math.PI/2]),Dt.set(ft.atan,[-Math.PI/2,Math.PI/2]),Dt.set(ft.cos,[-1,1]),Dt.set(ft.sin,[-1,1]),Dt.set(pt.booleanAnd,[0,1]),Dt.set(pt.booleanNot,[0,1]),Dt.set(pt.booleanOr,[0,1]),Dt.set(pt.booleanXOr,[0,1]),Dt.set(pt.equalTo,[0,1]),Dt.set(pt.notEqual,[0,1]),Dt.set(pt.greaterThan,[0,1]),Dt.set(pt.greaterThanEqual,[0,1]),Dt.set(pt.lessThan,[0,1]),Dt.set(pt.lessThanEqual,[0,1]),Dt.set(pt.isNull,[0,1]);const zt=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function Zt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]+r[t]);return i}function Lt(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand("f32",r);return o.set(s),o}function Vt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]-r[t]);return i}function Ut(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]*r[t]);return i}function Wt(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(s[t])*Math.floor(Math.abs(s[t])));return o}function qt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]/r[t]);return i}function Xt(t,e,n){return qt(t,e,"f32")}function Jt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(s[t]/r[t]));return i}function $t(t,e,n,s){const r=t[0],o=r.length,i=g.Z.createEmptyBand(n,o);if(s===ft.atanh){for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>=1?e[t]=0:i[t]=Math.atanh(n)}return i}const a=s===ft.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>1?e[t]=0:i[t]=a(n)}return i}function Ht(t,e,n,s){const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s(r[t]));return i}function Yt(t,e,n,s){const[r,o]=t,i=r.length,a=g.Z.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s(r[t],o[t]));return a}function Kt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&r[t]);return i}function Qt(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<<r[t]);return i}function te(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~s[t]);return o}function ee(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]|r[t]);return i}function ne(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>>r[t]);return i}function se(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]^r[t]);return i}function re(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&&r[t]?1:0);return i}function oe(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]?0:1);return o}function ie(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]||r[t]?1:0);return i}function ae(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(s[t]?1:0)^(r[t]?1:0));return i}function le(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?1:0);return i}function ue(t,e,n,s){const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o),a=s===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):s**r[t]);return i}function ce(t,e,n){return ue(t,e,n,10)}function pe(t,e,n){return ue(t,e,n,2)}function fe(t,e,n){return ue(t,e,n,Math.E)}function he(t,e,n,s){const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=s(r[t]));return i}function me(t,e,n){return he(t,e,n,Math.log10)}function de(t,e,n){return he(t,e,n,Math.log2)}function ge(t,e,n){return he(t,e,n,Math.log)}function ye(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>r[t]?1:0);return i}function be(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>=r[t]?1:0);return i}function xe(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?1:0);return i}function we(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<=r[t]?1:0);return i}function ve(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand(n,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function _e(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]%r[t]);return i}function Ce(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-s[t]);return o}function Ae(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?0:1);return i}function Pe(t,e,n){const[s,r]=t,o=s.length,i=g.Z.createEmptyBand(n,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==s[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function Re(t,e,n){const[s,r,o]=t,i=s.length,a=g.Z.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s[t]?r[t]:o[t]);return a}function Ne(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e<s&&(e=s)}i[n]=e}return i}function Te(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e>s&&(e=s)}i[n]=e}return i}function Fe(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n],o=e;for(let r=1;r<s;r++){const s=t[r][n];o<s?o=s:e>s&&(e=s)}i[n]=o-e}return i}function ke(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=0;for(let r=0;r<s;r++)e+=t[r][n];i[n]=e/s}return i}function Ie(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n])for(let e=0;e<s;e++){const s=t[e];i[n]+=s[n]}return i}function je(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){const e=new Float32Array(s);let r=0;for(let o=0;o<s;o++){const s=t[o];r+=s[n],e[o]=s[n]}r/=s;let o=0;for(let t=0;t<s;t++)o+=(e[t]-r)**2;i[n]=Math.sqrt(o/s)}return i}function Se(t,e,n){const s=t.length;if(s<2)return t[0];const r=Math.floor(s/2),[o]=t,i=o.length,a=g.Z.createEmptyBand(n,i),l=new Float32Array(s),u=s%2==1;for(let n=0;n<i;n++)if(!e||e[n]){for(let e=0;e<s;e++)l[e]=t[e][n];l.sort(),a[n]=u?l[r]:(l[r]+l[r-1])/2}return a}function Me(t,e,n){const[s,r]=t;if(null==r)return s;const o=s.length,i=g.Z.createEmptyBand(n,o);for(let t=0;t<o;t++)e[t]&&(s[t]===r[t]?i[t]=s[t]:e[t]=0);return i}function Be(t,e,n){const s=t.length;if(s<=2)return Me(t,e,n);const r=t[0].length,o=g.Z.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){let e;i.clear();for(let r=0;r<s;r++)e=t[r][n],i.set(e,i.has(e)?i.get(e)+1:1);let r=0,a=0;for(const t of i.keys())r=i.get(t),r>a&&(a=r,e=t);o[n]=e}return o}function Oe(t,e,n){const s=t.length;if(s<=2)return Me(t,e,n);const r=t[0].length,o=g.Z.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){let e;i.clear();for(let r=0;r<s;r++)e=t[r][n],i.set(e,i.has(e)?i.get(e)+1:1);let r=0,a=t.length;for(const t of i.keys())r=i.get(t),r<a&&(a=r,e=t);o[n]=e}return o}function Ge(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.Z.createEmptyBand(n,o),a=new Set;for(let n=0;n<o;n++)if(!e||e[n]){let e;a.clear();for(let r=0;r<s;r++)e=t[r][n],a.add(e);i[n]=a.size}return i}const Ee=new Map,De=new Map,ze=new Map,Ze=new Map;function Le(t,e,n,s){let[r,o]=(0,dt.r)(n);const i=n.startsWith("u")||n.startsWith("s");i&&(r-=1e-5,o+=1e-5);for(let n=0;n<e.length;n++)if(e[n]){const a=t[n];isNaN(a)||a<r||a>o?e[n]=0:s[n]=i?Math.round(a):a}}let Ve=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{processAsMultiband:s}=this.functionArguments;if(t.some((t=>t.bandCount!==n)))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=zt[r];if(!(999===i||o.length===i||o.length<=1&&1===i))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};this.outputPixelType=this._getOutputPixelType("f32");const a=e.clone();a.pixelType=this.outputPixelType,a.statistics=null,a.histograms=null,a.colormap=null,a.attributeTable=null,a.bandCount=999!==i||s?n:1;const l=function(t){return Dt.get(t)}(r);if(l){a.statistics=[];for(let t=0;t<a.bandCount;t++)a.statistics[t]={min:l[0],max:l[1],avg:(l[0]+l[1])/2,stddev:(l[0]+l[1])/10}}return this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&i<=3&&(r<11||r>16)}}_processPixels(t){const{pixelBlocks:e}=t;return null==e||e.some((t=>null==t))?null:function(t,e,n={}){Ee.size||(Ee.set(4,Math.sqrt),Ee.set(6,Math.acos),Ee.set(7,Math.asin),Ee.set(8,Math.atan),Ee.set(9,Math.atanh),Ee.set(10,Math.abs),Ee.set(21,Math.cos),Ee.set(22,Math.cosh),Ee.set(48,Math.floor),Ee.set(49,Math.ceil),Ee.set(51,Math.sin),Ee.set(52,Math.sinh),Ee.set(56,Math.tan),Ee.set(57,Math.tanh),Ee.set(59,Math.acosh),Ee.set(60,Math.asinh),Ee.set(65,Math.floor),De.set(5,Math.pow),De.set(61,Math.atan2),ze.set(1,Zt),ze.set(2,Vt),ze.set(3,Ut),ze.set(11,Kt),ze.set(12,Qt),ze.set(13,te),ze.set(14,ee),ze.set(15,ne),ze.set(16,se),ze.set(17,re),ze.set(18,oe),ze.set(19,ie),ze.set(20,ae),ze.set(23,qt),ze.set(24,le),ze.set(25,fe),ze.set(26,ce),ze.set(27,pe),ze.set(28,ye),ze.set(29,be),ze.set(30,Wt),ze.set(31,ve),ze.set(32,Lt),ze.set(33,xe),ze.set(34,we),ze.set(35,ge),ze.set(36,me),ze.set(37,de),ze.set(44,_e),ze.set(45,Ce),ze.set(46,Ae),ze.set(64,Xt),ze.set(65,Jt),ze.set(76,Re),ze.set(78,Re),Ze.set(38,Be),Ze.set(39,Ne),Ze.set(40,ke),Ze.set(41,Se),Ze.set(42,Te),Ze.set(43,Oe),Ze.set(47,Fe),Ze.set(54,je),Ze.set(55,Ie),Ze.set(58,Ge),Ze.set(66,Be),Ze.set(67,Ne),Ze.set(68,ke),Ze.set(69,Se),Ze.set(70,Te),Ze.set(71,Oe),Ze.set(72,Fe),Ze.set(73,je),Ze.set(74,Ie),Ze.set(75,Ge));let s=function(t,e=!1){const n=t.map((t=>t.mask)),s=n.filter((t=>null!=t)),r=t[0].pixels[0].length;if(0===s.length)return new Uint8Array(r).fill(255);const o=s[0],i=new Uint8Array(o);if(1===s.length)return i;if(!e){for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}if(s.length!==n.length)return new Uint8Array(r).fill(255);for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)0===i[t]&&(i[t]=e[t]?255:0)}return i}(t,e>=66&&e<=75);const{outputPixelType:r="f32"}=n,o=!Ze.has(e)||n.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let n=0;n<i;n++){const i=Ze.has(e)&&!o?t.flatMap((t=>t.pixels)):t.map((t=>t.pixels[n]));let l,u=!0;if(e===ht.setNull){const t=Pe(i,s,r);l=t.band,s=t.mask,u=!1}else ze.has(e)?l=ze.get(e)(i,s,"f64"):Ee.has(e)?l=e===ft.asin||e===ft.acos||e===ft.atanh?$t(i,s,"f64",e):Ht(i,s,"f64",Ee.get(e)):De.has(e)?l=Yt(i,s,"f64",De.get(e)):Ze.has(e)?l=Ze.get(e)(i,s,"f64"):(l=i[0],u=!1);if(u&&e!==pt.isNull&&!Dt.has(e)){const t=g.Z.createEmptyBand(r,l.length);s||(s=new Uint8Array(l.length).fill(255)),Le(l,s,r,t),l=t}a.push(l)}const l=t[0];return new g.Z({width:l.width,height:l.height,pixelType:r,mask:e===pt.isNull?null:s,pixels:a})}(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=zt[t],n=Object.keys(mt).find((e=>mt[e]===t))?.toLowerCase()??"undefined",s=this.outputPixelType??"f32";let[r,o]=(0,dt.r)(s);const i=s.startsWith("u")||s.startsWith("s");return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:n,domainRange:[r,o],isOutputRounded:i}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Ve.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Et,json:{write:!0,name:"rasterFunctionArguments"}})],Ve.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ve.prototype,"rasterArgumentNames",void 0),Ve=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.LocalFunction")],Ve);const Ue=Ve;var We,qe=n(22021);let Xe=We=class extends p{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=k.DX.matchAny}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const n=t.map((t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter((t=>""!==t.trim())).map((t=>Number(t)));return e=e||n.length>0,0===n.length?null:n}return null}));return e?n:null}clone(){return new We({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Xe.prototype,"includedRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Xe.prototype,"noDataValues",void 0),(0,i._)([(0,a.Cb)()],Xe.prototype,"normalizedNoDataValues",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Xe.prototype,"noDataInterpretation",void 0),Xe=We=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.MaskFunctionArguments")],Xe);const Je=Xe;let $e=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:n,normalizedNoDataValues:s}=this.functionArguments;if(!n?.length&&!s?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let o=0;o<t.bandCount;o++){const t=(0,k.nA)(e,n?.slice(2*o,2*o+2),s?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=s&&s.every((t=>t?.length===s[0]?.length));return{success:!0,supportsGPU:(!n||n.length<=2*k.$f)&&(!s||o&&s[0].length<=k.$f)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:n,lookups:s}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments,a=o===k.DX.matchAll;return(0,k.sS)(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:a,lookups:s})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array(k.$f);n.fill(qe.F3),e?.[0]?.length&&n.set(e[0]);const s=new Float32Array(k.$f);for(let e=0;e<s.length;e+=2)s[e]=t?.[e]??-qe.F3,s[e+1]=t?.[e+1]??qe.F3;return t&&t.length&&s.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:s}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],$e.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Je,json:{write:!0,name:"rasterFunctionArguments"}})],$e.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],$e.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],$e.prototype,"lookups",void 0),$e=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.MaskFunction")],$e);const He=$e;var Ye;let Ke=Ye=class extends p{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this;return new Ye({visibleBandID:t,infraredBandID:e,scientificOutput:n})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Ke.prototype,"visibleBandID",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ke.prototype,"infraredBandID",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ke.prototype,"scientificOutput",void 0),Ke=Ye=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.NDVIFunctionArguments")],Ke);const Qe=Ke;let tn=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:n}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const s=this.sourceRasterInfos[0],r=Math.max(e,n);if(s.bandCount<2||r>=s.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};const o=s.clone();o.pixelType=this.outputPixelType,o.colormap=null,o.histograms=null,o.bandCount=1,o.keyProperties={...o.keyProperties,BandProperties:void 0};const[i,a,l,u]=t?[-1,1,0,.1]:[0,200,100,10];return o.statistics=[{min:i,max:a,avg:l,stddev:u}],this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{visibleBandID:n,infraredBandID:s,scientificOutput:r}=this.functionArguments;return function(t,e,n,s){const{mask:r,pixels:o,width:i,height:a}=t,l=o[n],u=o[e],c=u.length,p=s?new Uint8Array(c):new Float32Array(c),f=s?100:1,h=s?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=l[t],n=u[t],s=e+n;s&&(p[t]=(e-n)/s*f+h)}const m=new g.Z({width:i,height:a,mask:r,pixelType:s?"u8":"f32",pixels:[p]});return m.updateStatistics(),m}(e,n,s,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this.functionArguments;return{bandIndexMat3:S(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!n}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments;return[n,e,0].map((e=>t[e]))}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],tn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Qe,json:{write:!0,name:"rasterFunctionArguments"}})],tn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],tn.prototype,"rasterArgumentNames",void 0),tn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.NDVIFunction")],tn);const en=tn;var nn;let sn=nn=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new nn({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"inputRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"outputValues",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"noDataRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"allowUnmatched",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"isLastInputRangeInclusive",void 0),sn=nn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.RemapFunctionArguments")],sn);const rn=sn;let on=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,t.colormap=null,t.histograms=null,t.bandCount=1,t.attributeTable=null;const{statistics:n}=t,{allowUnmatched:s,outputValues:r,inputRanges:o,noDataRanges:i,isLastInputRangeInclusive:a}=this.functionArguments;if(null!=n&&n.length&&r?.length)if(s){const e=Math.min.apply(null,[...r,n[0].min]),s=Math.max.apply(null,[...r,n[0].max]);t.statistics=[{...n[0],min:e,max:s}]}else{let e=r[0],s=e;for(let t=0;t<r.length;t++)e=e>r[t]?r[t]:e,s=s>r[t]?s:r[t];t.statistics=[{...n[0],min:e,max:s}]}return this.rasterInfo=t,this.lookup=s?null:(0,k.oB)({srcPixelType:e,inputRanges:o,outputValues:r,noDataRanges:i,allowUnmatched:s,isLastInputRangeInclusive:a,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!r||r.length<=k.$f)&&(!i||i.length<=k.$f)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:n,outputPixelType:s}=this;if(n){const t=(0,k.XV)(e,{lut:[n.lut],offset:n.offset,outputPixelType:s});return null!=t&&n.mask&&(t.mask=(0,k.wV)(e.pixels[0],e.mask,n.mask,n.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:l}=this.functionArguments;return(0,k.a2)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:s,allowUnmatched:a,isLastInputRangeInclusive:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:n}=this.functionArguments,s=new Float32Array(3*k.$f),r=1e-5,o=this.functionArguments.inputRanges??[],i=this.functionArguments.outputValues??[],a=i.length;for(let t=0;t<k.$f;t++)s[3*t]=o[2*t]??qe.F3-1,s[3*t+1]=o[2*t+1]??qe.F3,s[3*t+2]=i[t]??0,t<a&&(t>0&&(s[3*t]-=r),(t<a-1||!n)&&(s[3*t+1]-=r));const l=new Float32Array(2*k.$f);return l.fill(qe.F3),e?.length&&l.set(e),{allowUnmatched:t,rangeMaps:s,noDataRanges:l,clampRange:(0,dt.r)(this.outputPixelType)}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],on.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:rn,json:{write:!0,name:"rasterFunctionArguments"}})],on.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],on.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],on.prototype,"lookup",void 0),on=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.RemapFunction")],on);const an=on;var ln;const un=new P.X({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let cn=ln=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new ln({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i._)([(0,A.J)(un)],cn.prototype,"slopeType",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],cn.prototype,"zFactor",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"psPower",write:!0}})],cn.prototype,"pixelSizePower",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"psZFactor",write:!0}})],cn.prototype,"pixelSizeFactor",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],cn.prototype,"removeEdgeEffect",void 0),cn=ln=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.SlopeFunctionArguments")],cn);const pn=cn;let fn=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o}=this.functionArguments,{isGCS:i}=this,{extent:a,primaryPixelSizes:l}=t,u=l?.[0],c=u??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,v.yg)(e,{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:n,pixelSizePower:s}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*v._p:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:s??0}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],fn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:pn,json:{write:!0,name:"rasterFunctionArguments"}})],fn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],fn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],fn.prototype,"isGCS",void 0),fn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.SlopeFunction")],fn);const hn=fn,mn=new P.X({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function dn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{statisticsType:l,kernelRows:u,kernelCols:c}=e,p="stddev"===l,f=r*o,h=new Float64Array(f),m=new Float64Array(f),d=new Uint32Array(f);for(let t=0;t<o;t++){const e=t*r;let n=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(n+=s[e+t],p&&(o+=s[e+t]**2),a++);h[e]=n,m[e]=o,d[e]=a;for(let t=1;t<=r-c;t++){const r=e+t-1,l=r+c;i?(i[r]&&(a--,n-=s[r],p&&(o-=s[r]**2)),i[l]&&(a++,n+=s[l],p&&(o+=s[l]**2))):(n-=s[r],n+=s[l],p&&(o-=s[r]**2,o+=s[l]**2)),h[e+t]=n,d[e+t]=a,p&&(m[e+t]=o)}}const g=new Float64Array(f),y=new Float64Array(f),b=new Uint32Array(f),x=u*r;for(let t=0;t<=r-c;t++){let e=0,n=0,s=0;for(let o=0;o<u;o++){const i=o*r+t;e+=h[i],s+=d[i],p&&(n+=m[i])}g[t]=e,y[t]=n,b[t]=s;for(let i=1;i<=o-u;i++){const o=(i-1)*r+t,a=o+x;e-=h[o],e+=h[a],s-=d[o],s+=d[a],p&&(n-=m[o],n+=m[a]),g[i*r+t]=e,y[i*r+t]=n,b[i*r+t]=s}}const w=Math.floor(u/2),v=Math.floor(c/2);for(let t=w;t<o-w;t++){const e=t*r;for(let s=v;s<r-v;s++){const o=(t-w)*r+s-v,l=b[o];if(0===l||n&&(!i||i[e+s]))continue;const u=g[o]/l,c=p?Math.sqrt((y[o]-g[o]*u)/l):u;a[e+s]=c,i&&(i[e+s]=255)}}}function gn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:l,kernelCols:u,statisticsType:c}=e,p=Math.floor(l/2),f=Math.floor(u/2),h="min"===c,m=a.slice(),d=new Uint32Array(r*o);for(let t=p;t<o-p;t++){const e=t*r;for(let t=f;t<r-f;t++){let n=h?Number.MAX_VALUE:-Number.MAX_VALUE,o=0;for(let a=0;a<l;a++)for(let l=0;l<u;l++){const u=e+t+(a-p)*r+l-f;i&&!i[u]||(n=h?Math.min(n,s[u]):Math.max(n,s[u]),o++)}i?(m[e+t]=0===o?0:n,d[e+t]=o):a[e+t]=0===o?0:n}}if(i)for(let t=p;t<o-p;t++){const e=t*r;for(let t=f;t<r-f;t++)if(d[e+t]){if(n&&i[e+t])continue;a[e+t]=m[e+t],i[e+t]=255}}}function yn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:l,kernelCols:u}=e,c=Math.floor(l/2),p=Math.floor(u/2),f=a.slice(),h=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i&&i[e+t])continue;const o=[];for(let n=0;n<l;n++)for(let a=0;a<u;a++){const l=e+t+(n-c)*r+a-p;i&&!i[l]||o.push(s[l])}o.length&&(o.sort(((t,e)=>t-e)),i?(f[e+t]=o[Math.floor((o.length-1)/2)],h[e+t]=o.length):a[e+t]=o[Math.floor((o.length-1)/2)])}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(h[e+t]){if(n&&i[e+t])continue;a[e+t]=f[e+t],i[e+t]=255}}}function bn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:l,kernelCols:u}=e,c=Math.floor(l/2),p=Math.floor(u/2),f="majority"===e.statisticsType,h=l*u,m=a.slice(),d=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i&&i[e+t])continue;const o=new Map;for(let n=0;n<l;n++)for(let a=0;a<u;a++){const l=e+t+(n-c)*r+a-p;if(i&&!i[l])continue;const u=s[l];o.set(u,o.has(u)?o.get(u)+1:1)}if(0===o.size)continue;let g=0,y=0,b=f?0:h+1;for(const t of o.keys())y=o.get(t),f===y>b&&(b=y,g=t);i?(m[e+t]=g,d[e+t]=o.size):a[e+t]=g}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(d[e+t]){if(n&&i[e+t])continue;a[e+t]=m[e+t],i[e+t]=255}}}var xn;let wn=xn=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new xn({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,o.d9)(this.raster)})}};(0,i._)([(0,a.Cb)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],wn.prototype,"rows",void 0),(0,i._)([(0,a.Cb)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],wn.prototype,"cols",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],wn.prototype,"fillNoDataOnly",void 0),(0,i._)([(0,a.Cb)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>mn.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,A.J)(mn)],wn.prototype,"statisticsType",void 0),wn=xn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsFunctionArguments")],wn);const vn=wn,_n=new Set(["min","max","mean","median","majority","minority"]);let Cn=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();n.pixelType=this.outputPixelType;const{statisticsType:s}=this.functionArguments;return _n.has(s)||(n.statistics=null,n.histograms=null,n.colormap=null,n.attributeTable=null),this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:n,rows:s,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:n}=t,{fillNoDataOnly:s}=e;if(s&&!n)return t;const{pixels:r,width:o,height:i,bandMasks:a,pixelType:l}=t,u=r.length,c=o*i,p=[],{kernelRows:f,kernelCols:h,statisticsType:m,mirrorEdges:d}=e;if(s&&!n)return t;const y=e.outputPixelType??l,b=[];for(let t=0;t<u;t++){const l=r[t],u=g.Z.createEmptyBand(y,c);s&&u.set(l);const x=a?.[t]??n,w=x?.slice()??null,v={band:l,width:o,height:i,mask:w,outBand:u};switch(m){case"min":case"max":gn(v,e);break;case"mean":case"stddev":dn(v,e);break;case"median":yn(v,e);break;case"majority":case"minority":bn(v,e)}d&&!s&>(u,o,i,f,h),p.push(u),w&&b.push(w)}let x=b[0]??n;if(b.length!==u&&(b.length=0),u>1&&a?.length){x=new Uint8Array(c),x.set(b[0]);for(let t=1;t<a.length;t++){const e=a[t];for(let t=0;t<e.length;t++)0===e[t]&&(x[t]=0)}}const w=new g.Z({pixelType:y,width:o,height:i,pixels:p,bandMasks:a&&b.length?b:null,mask:x});return w.updateStatistics(),w}(e,{kernelRows:s,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:n,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:n,fillNoDataOnly:s}=this.functionArguments;return{fillNoDataOnly:s,kernelRows:t,kernelCols:e,statisticsType:n,clampRange:(0,dt.r)(this.outputPixelType)}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Cn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:vn,json:{write:!0,name:"rasterFunctionArguments"}})],Cn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Cn.prototype,"rasterArgumentNames",void 0),Cn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsFunction")],Cn);const An=Cn;var Pn;let Rn=Pn=class extends p{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const n=[];return t.forEach((t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};n.push(e)})),n}writeStatistics(t,e,n){if(!t?.length)return;const s=[];t.forEach((t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,s.push(e)})),e[n]=s}clone(){return new Pn({statistics:(0,o.d9)(this.statistics),histograms:(0,o.d9)(this.histograms)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Rn.prototype,"statistics",void 0),(0,i._)([(0,L.r)("statistics")],Rn.prototype,"readStatistics",null),(0,i._)([(0,Q.c)("statistics")],Rn.prototype,"writeStatistics",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Rn.prototype,"histograms",void 0),Rn=Pn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")],Rn);const Nn=Rn;let Tn=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:n,histograms:s}=this.functionArguments;return s&&(e.histograms=s),n&&(e.statistics=n),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Tn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Nn,json:{write:!0,name:"rasterFunctionArguments"}})],Tn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Tn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Tn.prototype,"indexedColormap",void 0),(0,i._)([(0,a.Cb)()],Tn.prototype,"isNoopProcess",void 0),Tn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")],Tn);const Fn=Tn;var kn;const In=new P.X({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let jn=kn=class extends p{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,n){t?.length&&(Array.isArray(t[0])||(t=t.map((t=>[t.min,t.max,t.avg,t.stddev]))),e[n]=t)}clone(){return new kn({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,o.d9)(this.statistics),gamma:(0,o.d9)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,o.d9)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],jn.prototype,"computeGamma",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"dra",write:!0}})],jn.prototype,"dynamicRangeAdjustment",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],jn.prototype,"gamma",void 0),(0,i._)([(0,a.Cb)()],jn.prototype,"histograms",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],jn.prototype,"maxPercent",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],jn.prototype,"minPercent",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],jn.prototype,"numberOfStandardDeviations",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"max",write:!0}})],jn.prototype,"outputMax",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"min",write:!0}})],jn.prototype,"outputMin",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],jn.prototype,"sigmoidStrengthLevel",void 0),(0,i._)([(0,a.Cb)({json:{type:[[Number]],write:!0}})],jn.prototype,"statistics",void 0),(0,i._)([(0,Q.c)("statistics")],jn.prototype,"writeStatistics",null),(0,i._)([(0,A.J)(In)],jn.prototype,"stretchType",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],jn.prototype,"useGamma",void 0),jn=kn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StretchFunctionArguments")],jn);const Sn=jn;let Mn=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:n}=this,{dynamicRangeAdjustment:s,gamma:r,useGamma:o}=n;if(!s&&["u8","u16","s8","s16"].includes(e)){const s=(0,at.AV)(n.toJSON(),{rasterInfo:t}),i=this._isOutputRoundingNeeded()?"round":"float";this.lookup=(0,at.hE)({pixelType:e,...s,gamma:o?r:null,rounding:i}),this.cutOffs=s}else s||(this.cutOffs=(0,at.AV)(n.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();return i.pixelType=this.outputPixelType,i.statistics=null,i.histograms=null,i.colormap=null,i.attributeTable=null,"u8"===this.outputPixelType&&(i.keyProperties.DataType="processed"),this.rasterInfo=i,{success:!0,supportsGPU:!s}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{lookup:n}=this;if(n)return(0,k.XV)(e,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:s}=this,r=this.cutOffs||(0,at.AV)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:e}),o=s.useGamma?s.gamma:null;return(0,at.dy)(e,{...r,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:n,useGamma:s}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=s&&n&&n.length?(0,at.um)(r,n):[1,1,1],{minCutOff:i,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===i.length&&(i[1]=i[2]=i[0],a[1]=a[2]=a[0]);const l=new Float32Array(r);let u;for(u=0;u<r;u++)l[u]=(e-t)/(a[u]-i[u]);const c=this._isOutputRoundingNeeded();return{bandCount:r,outMin:t,outMax:e,minCutOff:i,maxCutOff:a,factor:l,useGamma:s,gamma:s&&n?n:[1,1,1],gammaCorrection:s&&o?o:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Mn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Sn,json:{write:!0,name:"rasterFunctionArguments"}})],Mn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Mn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Mn.prototype,"lookup",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Mn.prototype,"cutOffs",void 0),Mn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StretchFunction")],Mn);const Bn=Mn;var On;let Gn=On=class extends p{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new On({attributeTableAsRecordSet:(0,o.d9)(this.attributeTableAsRecordSet)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Gn.prototype,"attributeTableAsRecordSet",void 0),Gn=On=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.TableFunctionArguments")],Gn);const En=Gn;let Dn=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const n=t.clone();return n.pixelType=this.outputPixelType,n.bandCount=1,"thematic"!==n.dataType&&(n.keyProperties=n.keyProperties?{...n.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=n,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Dn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:En,json:{write:!0,name:"rasterFunctionArguments"}})],Dn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Dn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)()],Dn.prototype,"isNoopProcess",void 0),Dn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.TableFunction")],Dn);const zn=Dn,Zn=new Map;function Ln(t,e){const{rasterFunctionArguments:n}=t;n&&(n.rasters||[n.raster]).forEach((t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Ln(t,e))}))}function Vn(t,e){if(e=e??{},"function"in(t=(0,o.d9)(t))&&"arguments"in t&&t.arguments){const n=Hn(t,new Map,e);if(Kn(n),!n.renderingRule)throw new r.Z("raster-function-helper","Unsupported raster function json.");t=n.renderingRule}if("rasterFunction"in t)return qn(t=Wn(t),e);throw new r.Z("raster-function-helper","unsupported raster function json.")}function Un(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function Wn(t){const{rasterFunction:e,rasterFunctionArguments:n}=t,s={};for(const t in n){let e=n[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))s.rasters=e.map((t=>Un(t)?Wn(t):t));else switch(Un(e)&&(e=Wn(e)),r){case"dra":s.dra=e;break;case"pspower":s.psPower=e;break;case"pszfactor":s.psZFactor=e;break;case"bandids":s.bandIds=e;break;default:s[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||s.rasters?.length||(s.rasters=["$$"]),{...t,rasterFunctionArguments:s}}function qn(t,e){const{rasterFunction:n,rasterFunctionArguments:s}=t,o=t.outputPixelType?.toLowerCase();if(null==n||!Zn.has(n))throw new r.Z("raster-function-helper",`unsupported raster function: ${n}`);const i=Zn.get(n),a=("function"==typeof i.ctor?i.ctor:i.ctor.default).fromJSON({...t,outputPixelType:o}),{rasterArgumentNames:l}=a,u=[],c=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map((e=>t[e]))}(s,l),p="rasters"===l[0],f=[];for(let t=0;t<c.length;t++){const n=c[t];let s;null==n||"string"==typeof n&&n.startsWith("$")?u.push(e?.raster):"string"==typeof n?e[n]&&u.push(e[n]):"number"!=typeof n&&"rasterFunction"in n&&(s=qn(n,e),p||(a.functionArguments[l[t]]=s),u.push(s)),p&&f.push(s??n)}if(p&&(a.functionArguments.rasters=f),e){a.sourceRasters=u;const t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Xn(t,e){if(t&&e)for(const n in t){const s=t[n];s&&"object"==typeof s&&"type"in s&&("RasterFunctionTemplate"===s.type?Xn(s.arguments,e):"RasterFunctionVariable"===s.type&&null!=e[s.name]&&(s.value=e[s.name]))}}function Jn(t,e){if(!t||"object"!=typeof t)return t;const{value:n}=t;if(!n||"object"!=typeof n)return t.isDataset?"$$":n;if(Array.isArray(n))return 0===n.length?[]:n.map((t=>"object"==typeof t&&"RasterFunctionVariable"===t.type?Jn(t,e):t));if("value"in n&&["number","string","boolean"].includes(typeof n.value))return n.value;if(t.isDataset&&"Scalar"!==n.type)return"$$";if(!("type"in n))return n;let s=n;switch(n.type){case"Scalar":s=n.value;break;case"AlgorithmicColorRamp":s=$n(n);break;case"MultiPartColorRamp":s={type:"multipart",colorRamps:n.ArrayOfColorRamp.map($n)};break;case"ArgumentArray":if(n.elements?.length&&"RasterStatistics"!==n.elements[0].type){const t=[];for(let s=0;s<n.elements.length;s++){const o=n.elements[s],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:n}=Hn(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}else{if("RasterFunctionVariable"!==i)throw new r.Z("raster-function-helper","unsupported raster function json.");{const n=Jn(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}}else t.push(o)}s=t}else s=n.elements}return null!=n._object_id&&e.set(n._object_id,s),s}function $n(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:n,ToColor:r}=t;if(!Array.isArray(n)){const{r:t,g:e,b:r}=(0,s.xr)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,r,n.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:n}=(0,s.xr)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,n,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:n,toColor:r}}function Hn(t,e,n){n&&Xn(t,n);const s={renderingRule:{},templates:e};return Yn(t,s),s}function Yn(t,e){if(!t||!e.renderingRule)return;const{renderingRule:n,templates:s}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&s.set(i,n),n.rasterFunction=r.type.replace("Function",""),n.outputPixelType=r.pixelType;const a={};n.rasterFunctionArguments=a;for(const t in o){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;const e=o[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=Jn(e,s):(n.rasterFunctionArguments[t]={},Yn(e,{renderingRule:n.rasterFunctionArguments[t],templates:s})),null!=e._object_id&&s.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),n.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map((t=>[t.min,t.max,t.mean,t.standardDeviation]))),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter((t=>""!==t)).map((t=>Number(t))))}(a)}}function Kn(t){const{renderingRule:e,templates:n}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!n.size)return;const{rasterFunctionArguments:s}=e;for(const t in s){const e=s[t],o="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null==o)e&&"object"==typeof e&&(e.rasterFunctionArguments&&Kn({renderingRule:e,templates:n}),Array.isArray(e)&&e.forEach(((t,s)=>{if("object"==typeof t)if(null!=t._object_ref_id){if(!n.has(t._object_ref_id))throw new r.Z("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);const i=n.get(o);i&&"object"==typeof i?Object.assign(t,i):e[s]=i}else Kn({renderingRule:t,templates:n})})));else{if(!n.has(o))throw new r.Z("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=n.get(o);"_object_ref_id"!==t?s[t]=e:e&&"object"==typeof e&&Object.assign(s,e)}}}Zn.set("Aspect",{desc:"Aspect Function",ctor:C,rasterArgumentNames:["raster"]}),Zn.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:z,rasterArgumentNames:["raster"]}),Zn.set("Colormap",{desc:"Colormap Function",ctor:Y,rasterArgumentNames:["raster"]}),Zn.set("CompositeBand",{desc:"CompositeBand Function",ctor:st,rasterArgumentNames:["rasters"]}),Zn.set("Convolution",{desc:"Convolution Function",ctor:At,rasterArgumentNames:["raster"]}),Zn.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:ut,rasterArgumentNames:["raster"]}),Zn.set("ExtractBand",{desc:"ExtractBand Function",ctor:Bt,rasterArgumentNames:["raster"]}),Zn.set("Curvature",{desc:"Curvature Function",ctor:kt,rasterArgumentNames:["raster"]}),Zn.set("Local",{desc:"Local Function",ctor:Ue,rasterArgumentNames:["rasters"]}),Zn.set("Mask",{desc:"Mask Function",ctor:He,rasterArgumentNames:["raster"]}),Zn.set("NDVI",{desc:"NDVI Function",ctor:en,rasterArgumentNames:["raster"]}),Zn.set("Remap",{desc:"Remap Function",ctor:an,rasterArgumentNames:["raster"]}),Zn.set("Slope",{desc:"Slope Function",ctor:hn,rasterArgumentNames:["raster"]}),Zn.set("Statistics",{desc:"Focal Statistics Function",ctor:An,rasterArgumentNames:["raster"]}),Zn.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Fn,rasterArgumentNames:["raster"]}),Zn.set("Stretch",{desc:"Stretch Function",ctor:Bn,rasterArgumentNames:["raster"]}),Zn.set("Table",{desc:"Attribute Table Function",ctor:zn,rasterArgumentNames:["raster"]})},73506:(t,e,n)=>{n.d(e,{Fi:()=>q,Hq:()=>Z,Mk:()=>d,P_:()=>L,Qp:()=>V,VO:()=>R,Wt:()=>O,kr:()=>X,nF:()=>T,tB:()=>B,ut:()=>E,zD:()=>P}),n(66577);var s,r,o=n(67676),i=n(20102),a=n(67900),l=n(83305),u=n(73615),c=n(8744),p=n(6570),f=n(94139),h=n(38913),m=n(82971);function d(t,e,n){return!(0,u.canProjectWithoutEngine)(t,e,n)}function g(t,e,n){const s=d(t,e,n);if(s&&!(0,u.isLoaded)())throw new i.Z("rasterprojectionhelper-project","projection engine is not loaded");return s}(r=s||(s={}))[r.None=0]="None",r[r.North=1]="North",r[r.South=2]="South",r[r.Both=3]="Both";const y=(t,e,n,s=0)=>{if(1===n[0])return[0,0];let r=1,o=-1,i=1,a=-1;for(let e=0;e<t.length;e+=2)isNaN(t[e])||(r=r>t[e]?t[e]:r,o=o>t[e]?o:t[e],i=i>t[e+1]?t[e+1]:i,a=a>t[e+1]?a:t[e+1]);const{cols:l,rows:u}=e,c=(o-r)/l/n[0],p=(a-i)/u/n[1],f=2*s;let h=0,m=!1,d=[0,0];for(let e=0;e<l-3;e++){for(let n=0;n<u-3;n++){const s=e*u*2+2*n,r=(t[s]+t[s+4]+t[s+4*u]+t[s+4*u+4])/4,o=(t[s+1]+t[s+5]+t[s+4*u+1]+t[s+4*u+5])/4,i=Math.abs((r-t[s+2*u+2])/c),a=Math.abs((o-t[s+2*u+3])/p);if(i+a>h&&(h=i+a,d=[i,a]),f&&h>f){m=!0;break}}if(m)break}return d},b={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},x=32,w=4,v=w,_=new Map,C=new Map,A=500;async function P(){(0,u.isLoaded)()||await(0,u.load)()}function R(t,e,n,s=null){const r=t.spatialReference;if(r.equals(e))return t;g(r,e,s);const o=n.center,i=new p.Z({xmin:o.x-t.x/2,xmax:o.x+t.x/2,ymin:o.y-t.y/2,ymax:o.y+t.y/2,spatialReference:r}),l=(0,u.project)(i,e,s),c=E(e);let f;if(null==l||null!=c&&l.width>=c){const n=(0,a.c9)(r)/(0,a.c9)(e);f={x:t.x*n,y:t.y*n}}else f={x:l.width,y:l.height};return f}function N(t,e=.01){return(0,a.c9)(t)?e/(0,a.c9)(t):0}function T(t,e,n=null,s=!0){const r=t.spatialReference;if(r.equals(e))return t;g(r,e,n);const o=(0,u.project)(t,e,n);return s&&o?(F([t],[o],r,e),o):o}function F(t,e,n,s){const r=D(n,!0),o=D(s,!0),i=N(n,A),a=N(s,A);if(i&&null!=r&&null!=o)for(let n=0;n<t.length;n++){const s=e[n];if(!s)continue;const{x:l}=t[n],{x:u}=s;u>=o[1]-a&&Math.abs(l-r[0])<i?s.x-=o[1]-o[0]:u<=o[0]+a&&Math.abs(l-r[1])<i&&(s.x+=o[1]-o[0])}}function k(t){const{inSR:e,outSR:n,datumTransformation:s,preferPE:r}=t;if(e.equals(n)){const{points:e}=M(t,null);return e}if(e.isWebMercator&&n.isWGS84||e.isWGS84&&n.isWebMercator)return function(t){const{cols:e,rows:n,xres:s,yres:r,usePixelCenter:o,inSR:i,outSR:a}=t;let{xmin:l,ymax:c}=t;o&&(l+=s/2,c-=r/2);const p=[],h=[],m=Math.max(e,n);for(let t=0;t<m;t++){const o=l+s*Math.min(e,t),m=c-r*Math.min(n,t),d=(0,u.project)(new f.Z({x:o,y:m,spatialReference:i}),a);t<=e&&p.push(d.x),t<=n&&h.push(d.y)}const d=[];for(let t=0;t<e;t++)for(let e=0;e<n;e++)d.push([p[t],h[e]]);return d}(t);if(g(e,n,s)&&r){if(e.isGeographic)return I(t);if(null!=j(e))return I(t)}return function(t){const{points:e}=M(t,null),{inSR:n,outSR:s,datumTransformation:r}=t,o=e.map((t=>new f.Z(t[0],t[1],n))),i=(0,u.project)(o,s,r);return r&&F(o,i,n,s),i.map((t=>t?[t.x,t.y]:[NaN,NaN]))}(t)}function I(t){const{inSR:e,outSR:n,datumTransformation:s}=t,r=j(e),{points:o,mask:i}=M(t,r);if(!e.isGeographic){const t=e.wkid?l.P.coordsys(e.wkid):l.P.fromString(e.isGeographic?l.a.PE_TYPE_GEOGCS:l.a.PE_TYPE_PROJCS,e.wkt2||e.wkt);l.g.projToGeog(t,o.length,o)}if(null!=s&&s.steps.length){let t;const e=179.9955;if(n.isGeographic&&(t=o.map((([t])=>t>e?1:t<-e?-1:0))),s.steps.forEach((t=>{const e=t.wkid?l.P.geogtran(t.wkid):l.P.fromString(l.a.PE_TYPE_GEOGTRAN,t.wkt);l.h.geogToGeog(e,o.length,o,null,t.isInverse?l.a.PE_TRANSFORM_2_TO_1:l.a.PE_TRANSFORM_1_TO_2)})),t)for(let n=0;n<o.length;n++){const s=t[n],r=o[n][0],i=r>e?1:r<-e?-1:0;s&&i&&s!==i&&(o[n][0]=s>0?r+360:r-360)}}if(!n.isGeographic){const t=j(n,!0),e=null!=t&&t.isEnvelope?[t.bbox[1],t.bbox[3]]:[-90,90];!function(t,e){const[n,s]=e;for(let e=0;e<t.length;e++){const r=t[e][1];(r<n||r>s)&&(t[e]=[NaN,NaN])}}(o,e);const s=n.wkid?l.P.coordsys(n.wkid):l.P.fromString(n.isGeographic?l.a.PE_TYPE_GEOGCS:l.a.PE_TYPE_PROJCS,n.wkt2||n.wkt);l.g.geogToProj(s,o.length,o)}let a=o;if(i&&o.length!==i.length){a=[];for(let t=0,e=0;t<i.length;t++)i[t]?a.push(o[e++]):a.push([NaN,NaN])}return a}function j(t,e=!1){let n=t.wkid||t.wkt2||t.wkt;if(!n||t.isGeographic)return null;if(n=String(n),_.has(n)){const t=_.get(n);return e?t?.gcs:t?.pcs}const s=t.wkid?l.P.coordsys(t.wkid):l.P.fromString(t.isGeographic?l.a.PE_TYPE_GEOGCS:l.a.PE_TYPE_PROJCS,t.wkt2||t.wkt),r=S(s,N(t,1e-4)),o=S(s,0,!0);return _.set(n,{pcs:r,gcs:o}),e?o:r}function S(t,e=0,n=!1){const s=l.j.generate(t),r=n?t.horizonGcsGenerate():t.horizonPcsGenerate();if(!s||!r?.length)return null;let o=!1,i=r.find((t=>1===t.getInclusive()&&1===t.getKind()));if(!i){if(i=r.find((t=>1===t.getInclusive()&&0===t.getKind())),!i)return null;o=!0}const a=n?0:(2===s.getNorthPoleLocation()?1:0)|(2===s.getSouthPoleLocation()?2:0),u=s.isPannableRectangle(),c=i.getCoord();if(o)return{isEnvelope:o,isPannable:u,vertices:c,coef:null,bbox:[c[0][0]-e,c[0][1]-e,c[1][0]+e,c[1][1]+e],poleLocation:a};let p=0;const f=[];let[h,m]=c[0],[d,g]=c[0];for(let t=0,e=c.length;t<e;t++){p++,p===e&&(p=0);const[n,s]=c[t],[r,o]=c[p];if(o===s)f.push([n,r,s,o,2]);else{const t=(r-n)/(o-s||1e-4),e=n-t*s;s<o?f.push([t,e,s,o,0]):f.push([t,e,o,s,1])}h=h<n?h:n,m=m<s?m:s,d=d>n?d:n,g=g>s?g:s}return{isEnvelope:!1,isPannable:u,vertices:c,coef:f,bbox:[h,m,d,g],poleLocation:a}}function M(t,e){const n=[],{cols:s,rows:r,xres:o,yres:i,usePixelCenter:a}=t;let{xmin:l,ymax:u}=t;if(a&&(l+=o/2,u-=i/2),null==e){for(let t=0;t<s;t++)for(let e=0;e<r;e++)n.push([l+o*t,u-i*e]);return{points:n}}const c=new Uint8Array(s*r);if(e.isEnvelope){const{bbox:[t,a,p,f]}=e;for(let h=0,m=0;h<s;h++){const s=l+o*h,d=e.isPannable||s>=t&&s<=p;for(let t=0;t<r;t++,m++){const e=u-i*t;d&&e>=a&&e<=f&&(n.push([s,e]),c[m]=1)}}return{points:n,mask:c}}const p=e.coef,f=[];for(let t=0;t<r;t++){const e=u-i*t,n=[],s=[];for(let t=0;t<p.length;t++){const[r,o,i,a,l]=p[t];if(e===i&&i===a)n.push(r),n.push(o),s.push(2),s.push(2);else if(e>=i&&e<=a){const t=r*e+o;n.push(t),s.push(l)}}let r=n;if(n.length>2){let t=2===s[0]?0:s[0],e=n[0];r=[];for(let o=1;o<s.length;o++)2===s[o]&&o!==s.length-1||(s[o]!==t&&(r.push(0===t?Math.min(e,n[o-1]):Math.max(e,n[o-1])),t=s[o],e=n[o]),o===s.length-1&&r.push(0===s[o]?Math.min(e,n[o]):Math.max(e,n[o])));r.sort(((t,e)=>t-e))}else n[0]>n[1]&&(r=[n[1],n[0]]);f.push(r)}for(let t=0,e=0;t<s;t++){const s=l+o*t;for(let t=0;t<r;t++,e++){const r=u-i*t,o=f[t];if(2===o.length)s>=o[0]&&s<=o[1]&&(n.push([s,r]),c[e]=1);else if(o.length>2){let t=!1;for(let e=0;e<o.length;e+=2)if(s>=o[e]&&s<=o[e+1]){t=!0;break}t&&(n.push([s,r]),c[e]=1)}}}return{points:n,mask:c}}function B(t,e,n=null,r=!0){const i=t.spatialReference;if(i.equals(e))return t;const a=Z(t),l=E(i,!0),c=E(e);if(0===a||null==l||null==c){const o=G(t,e,n,r);if(null==l&&null!=c&&Math.abs(o.width-c)<N(e)&&(0,u.isLoaded)()){const n=j(i);if(null!=n&&n.poleLocation===s.None&&t.width<(n.bbox[2]-n.bbox[0])/2)return function(t,e){const n=E(e);if(null==n)return null;let{xmin:s,ymin:r,xmax:o,ymax:i}=t;const a=t.spatialReference,l=new h.Z({spatialReference:a,rings:[[[s,r],[o,r],[o,i],[s,i],[s,r]]]}),c=(0,u.project)(l,e);if(2!==c.rings.length||!c.rings[0].length||!c.rings[1].length)return null;const{rings:f}=c,m=N(a),d=new p.Z({spatialReference:e});for(let t=0;t<2;t++){s=o=f[t][0][0],r=i=f[t][0][1];for(let e=0;e<f[t].length;e++)s=s>f[t][e][0]?f[t][e][0]:s,o=o<f[t][e][0]?f[t][e][0]:o,r=r>f[t][e][1]?f[t][e][1]:r,i=i<f[t][e][1]?f[t][e][1]:i;if(0===t)d.ymin=r,d.ymax=i,d.xmin=s,d.xmax=o;else if(d.ymin=Math.min(d.ymin,r),d.ymax=Math.max(d.ymax,i),Math.abs(o-n/2)<m)d.xmin=s,d.xmax=d.xmax+n;else{if(!(Math.abs(s+n/2)<m))return null;d.xmax=o+n}}return d}(t,e)||o}return o}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>N(i)){const{xmin:e,xmax:n}=t;for(let s=0;s<=a;s++){const r=0===s?e:-l/2,o=s===a?n-l*s:l/2;f[s]=new p.Z({xmin:r,xmax:o,ymin:t.ymin,ymax:t.ymax,spatialReference:i})}}return function(t,e){const n=E(t[0].spatialReference);if(t.length<2||null==n)return t[0];if(e=e??N(t[0].spatialReference),1===(t=t.filter((t=>t.width>e))).length)return t[0];let{xmin:s,xmax:r,ymin:o,ymax:i}=t[0];for(let e=1;e<t.length;e++){const s=t[e];r=s.xmax+n*e,o=Math.min(o,s.ymin),i=Math.max(i,s.ymax)}return new p.Z({xmin:s,xmax:r,ymin:o,ymax:i,spatialReference:t[0].spatialReference})}(f.map((t=>G(t,e,n,r))).filter(o.pC))}function O(t,e,n){if("extent"===t.type){const{xmin:e,ymin:n,xmax:s,ymax:r,spatialReference:o}=t;t=new h.Z({rings:[[[e,r],[s,r],[s,n],[e,n],[e,r]]],spatialReference:o})}return t.spatialReference.equals(e)?t:(g(t.spatialReference,e,n),(0,u.project)(t,e,n))}function G(t,e,n=null,s=!0,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;g(o,e,n);const i=(0,u.project)(t,e,n);if(r&&e.isWebMercator&&i&&(i.ymax=Math.min(20037508.342787,i.ymax),i.ymin=Math.max(-20037508.342787,i.ymin),i.ymin>=i.ymax))return null;if(!s||!i)return i;const a=D(o,!0),l=D(e,!0);if(null==a||null==l)return i;const c=N(o,.001),p=N(o,A),h=N(e,.001);if(Math.abs(i.xmin-l[0])<h&&Math.abs(i.xmax-l[1])<h){const s=Math.abs(t.xmin-a[0]),r=Math.abs(a[1]-t.xmax);if(s<c&&r>p){i.xmin=l[0];const s=[];s.push(new f.Z(t.xmax,t.ymin,o)),s.push(new f.Z(t.xmax,(t.ymin+t.ymax)/2,o)),s.push(new f.Z(t.xmax,t.ymax,o));const r=s.map((t=>T(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmax=Math.max.apply(null,r)}if(r<c&&s>p){i.xmax=l[1];const s=[];s.push(new f.Z(t.xmin,t.ymin,o)),s.push(new f.Z(t.xmin,(t.ymin+t.ymax)/2,o)),s.push(new f.Z(t.xmin,t.ymax,o));const r=s.map((t=>T(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmin=Math.min.apply(null,r)}}else{const t=N(e,.001);Math.abs(i.xmin-l[0])<t&&(i.xmin=l[0]),Math.abs(i.xmax-l[1])<t&&(i.xmax=l[1])}return i}function E(t,e=!1){if(!t)return null;const n=e?20037508.342787:20037508.342788905;return t.isWebMercator?2*n:t.wkid&&t.isGeographic?360:2*b[t.wkid]||null}function D(t,e=!1){if(t.isGeographic)return[-180,180];const n=E(t,e);return null!=n?[-n/2,n/2]:null}function z(t,e,n,s){let r=(t-e)/n;return r-Math.floor(r)!=0?r=Math.floor(r):s&&(r-=1),r}function Z(t,e=!1){const n=E(t.spatialReference);if(null==n)return 0;const s=e?0:-n/2,r=N(t.spatialReference),o=!e&&Math.abs(t.xmax-n/2)<r?n/2:t.xmax,i=!e&&Math.abs(t.xmin+n/2)<r?-n/2:t.xmin;return z(o,s,n,!0)-z(i,s,n,!1)}function L(t){const e=t.storageInfo.origin.x,n=E(t.spatialReference,!0);if(null==n)return{originX:e,halfWorldWidth:null,pyramidsInfo:null};const s=n/2,{nativePixelSize:r,storageInfo:o,extent:i}=t,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:u}=o;let c=r.x;const p=[],f=null!=t.transform&&"gcs-shift"===t.transform.type,h=e+(f?0:s),m=f?n-e:s-e;for(let t=0;t<=a;t++){const t=(i.xmax-e)/c/l,n=t-Math.floor(t)==0?t:Math.ceil(t),s=m/c/l,r=s-Math.floor(s)==0?s:Math.ceil(s),o=Math.floor(h/c/l),a=Math.round(h/c)%l,f=(l-Math.round(m/c)%l)%l;p.push({resolutionX:c,blockWidth:l,datsetColumnCount:n,worldColumnCountFromOrigin:r,leftMargin:a,rightPadding:f,originColumnOffset:o}),c*=u}return{originX:e,halfWorldWidth:s,pyramidsInfo:p,hasGCSSShiftTransform:f}}function V(t){const e=t.isAdaptive&&null==t.spacing;let n=t.spacing||[x,x],s=U(t),r={cols:s.size[0]+1,rows:s.size[1]+1};const o=s.outofBoundPointCount>0&&s.outofBoundPointCount<s.offsets.length/2;let i=s.outofBoundPointCount===s.offsets.length/2||e&&o?[0,0]:y(s.offsets,r,n,v);const a=(i[0]+i[1])/2,u=t.projectedExtent.spatialReference,c=t.srcBufferExtent.spatialReference;if(e&&(o||a>v)&&(d(u,c,t.datumTransformation)&&(u.isGeographic||j(u)),n=[w,w],s=U({...t,spacing:n}),r={cols:s.size[0]+1,rows:s.size[1]+1},i=y(s.offsets,r,n,v)),s.error=i,n[0]>1&&(s.coefficients=W(s.offsets,r,o)),t.includeGCSGrid&&!u.isGeographic&&!u.isWebMercator)if(c.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:n};else{const e=j(u);if(null!=e&&!e.isEnvelope){const e=function(t){if(!t||t.isGeographic)return t;const e=String(t.wkid||t.wkt2||t.wkt);let n;return C.has(e)?n=C.get(e):(n=(t.wkid?l.P.coordsys(t.wkid):l.P.fromString(l.a.PE_TYPE_PROJCS,t.wkt2||t.wkt)).getGeogcs().getCode(),C.set(e,n)),new m.Z({wkid:n})}(u),i=B(t.projectedExtent,e),{offsets:a}=U({...t,srcBufferExtent:i,spacing:n}),c=W(a,r,o);s.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return s}function U(t){const{projectedExtent:e,srcBufferExtent:n,pixelSize:s,datumTransformation:r,rasterTransform:o}=t,i=e.spatialReference,a=n.spatialReference,l=g(i,a),{xmin:u,ymin:c,xmax:p,ymax:h}=e,m=E(a),d=null!=m&&(t.hasWrapAround||"gcs-shift"===o?.type),y=t.spacing||[x,x],b=y[0]*s.x,v=y[1]*s.y,_=1===y[0],C=Math.ceil((p-u)/b-.1/y[0])+(_?0:1),P=Math.ceil((h-c)/v-.1/y[1])+(_?0:1),R=k({cols:C,rows:P,xmin:u,ymax:h,xres:b,yres:v,inSR:i,outSR:a,datumTransformation:r,preferPE:y[0]<=w,usePixelCenter:_}),T=[];let F,I=0;const S=_?-1:NaN,{xmin:M,xmax:B,ymax:O,width:G,height:D}=n,z=N(a,A),Z=null!=m&&M>0&&B>m/2;let L=!1;if(l){const t=j(i);L=null!=t&&t.poleLocation>0}for(let t=0;t<C;t++){const e=[];for(let n=0;n<P;n++){let s=R[t*P+n];if(d&&s[0]>B&&s[0]>m/2-z?s[0]-=m:d&&0===t&&s[0]<0&&Z&&!o&&(s[0]+=m),!s||isNaN(s[0])||isNaN(s[1]))T.push(S),T.push(S),e.push(null),I++;else{if(o){const t=o.inverseTransform(new f.Z({x:s[0],y:s[1],spatialReference:a}));s=[t.x,t.y]}e.push(s),t>0&&d&&F[n]&&s[0]<F[n][0]&&(s[0]+=m,L&&s[0]>B&&s[0]>m&&(s[0]-=m)),T.push((s[0]-M)/G),T.push((O-s[1])/D)}}F=e}return{offsets:T,error:null,coefficients:null,outofBoundPointCount:I,spacing:y,size:_?[C,P]:[C-1,P-1]}}function W(t,e,n){const{cols:s,rows:r}=e,o=new Float32Array((s-1)*(r-1)*2*6),i=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let e=0;e<s-1;e++){for(let n=0;n<r-1;n++){let l=e*r*2+2*n;const u=t[l],c=t[l+1],p=t[l+2],f=t[l+3];l+=2*r;const h=t[l],m=t[l+1],d=t[l+2],g=t[l+3];let y=0,b=12*(n*(s-1)+e);for(let t=0;t<3;t++)o[b++]=i[y++]*u+i[y++]*p+i[y++]*d;y=0;for(let t=0;t<3;t++)o[b++]=i[y++]*c+i[y++]*f+i[y++]*g;y=0;for(let t=0;t<3;t++)o[b++]=a[y++]*u+a[y++]*h+a[y++]*d;y=0;for(let t=0;t<3;t++)o[b++]=a[y++]*c+a[y++]*m+a[y++]*g}if(n)for(let t=0;t<o.length;t++)isNaN(o[t])&&(o[t]=-1)}return o}function q(t){const{spatialReference:e}=t,n=(0,c.C5)(e);if(!n)return t;const[s,r]=n.valid,o=r-s;let i=0;if(t.xmin<s){const e=s-t.xmin;i=Math.ceil(e/o)}else if(t.xmin>r){const e=t.xmin-r;i=-Math.ceil(e/o)}return new p.Z({spatialReference:t.spatialReference,xmin:t.xmin+i*o,ymin:t.ymin,xmax:t.xmax+i*o,ymax:t.ymax})}function X(t,e,n){const{storageInfo:s,pixelSize:r}=e;let o=0,i=!1;const{pyramidResolutions:l}=s,u="mixed"===s.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,s.tileInfo.dpi/96)):1,c=(t.x+t.y)/2/u;if(null!=l&&l.length){const t=l[l.length-1],s=(t.x+t.y)/2,u=(r.x+r.y)/2;if(c<=u)o=0;else if(c>=s)o=l.length,i=c/s>8;else{let t,e=u;for(let s=1;s<=l.length;s++){if(t=(l[s-1].x+l[s-1].y)/2,c<=t){c===t?o=s:"down"===n?(o=s-1,i=c/e>8):o="up"===n||c-e>t-c||c/e>2?s:s-1;break}e=t}}const p=0===o?r:l[o-1];return i&&Math.min(p.x,p.y)*(0,a.c9)(e.spatialReference)>19567&&(i=!1),{pyramidLevel:o,pyramidResolution:new f.Z({x:p.x,y:p.y,spatialReference:e.spatialReference}),excessiveReading:i}}const p=Math.log(t.x/r.x)/Math.LN2,h=Math.log(t.y/r.y)/Math.LN2,m=e.storageInfo.maximumPyramidLevel||0;o="down"===n?Math.floor(Math.min(p,h)):"up"===n?Math.ceil(Math.max(p,h)):Math.round((p+h)/2),o<0?o=0:o>m&&(i=o>m+3,o=m);const d=2**o;return{pyramidLevel:o,pyramidResolution:new f.Z({x:d*e.nativePixelSize.x,y:d*e.nativePixelSize.y,spatialReference:e.spatialReference}),excessiveReading:i}}},48700:(t,e,n)=>{n.d(e,{Z:()=>l});var s=n(43697),r=n(96674),o=n(5600),i=(n(75215),n(67676),n(80442),n(52011));let a=class extends r.wq{get affectsPixelSize(){return!1}forwardTransform(t){return t}inverseTransform(t){return t}};(0,s._)([(0,o.Cb)()],a.prototype,"affectsPixelSize",null),(0,s._)([(0,o.Cb)({json:{write:!0}})],a.prototype,"spatialReference",void 0),a=(0,s._)([(0,i.j)("esri.layers.support.rasterTransforms.BaseRasterTransform")],a);const l=a},29680:(t,e,n)=>{n.d(e,{Z:()=>c});var s,r=n(43697),o=n(5600),i=(n(75215),n(67676),n(80442),n(36030)),a=n(52011),l=n(48700);let u=s=class extends l.Z{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(t){return"point"===(t=t.clone()).type?(t.x>180+this.tolerance&&(t.x-=360),t):(t.xmin>=180-this.tolerance?(t.xmax-=360,t.xmin-=360):t.xmax>180+this.tolerance&&(t.xmin=-180,t.xmax=180),t)}inverseTransform(t){return"point"===(t=t.clone()).type?(t.x<-this.tolerance&&(t.x+=360),t):(t.xmin<-this.tolerance&&(t.xmin+=360,t.xmax+=360),t)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,i.J)({GCSShiftXform:"gcs-shift"})],u.prototype,"type",void 0),(0,r._)([(0,o.Cb)()],u.prototype,"tolerance",void 0),u=s=(0,r._)([(0,a.j)("esri.layers.support.rasterTransforms.GCSShiftTransform")],u);const c=u},87390:(t,e,n)=>{n.d(e,{Z:()=>g});var s,r=n(43697),o=(n(66577),n(5600)),i=(n(75215),n(67676),n(80442),n(36030)),a=n(71715),l=n(52011),u=n(30556),c=n(48700),p=n(94139),f=n(6570);function h(t,e,n){const{x:s,y:r}=e;if(n<2)return{x:t[0]+s*t[2]+r*t[4],y:t[1]+s*t[3]+r*t[5]};if(2===n){const e=s*s,n=r*r,o=s*r;return{x:t[0]+s*t[2]+r*t[4]+e*t[6]+o*t[8]+n*t[10],y:t[1]+s*t[3]+r*t[5]+e*t[7]+o*t[9]+n*t[11]}}const o=s*s,i=r*r,a=s*r,l=o*s,u=o*r,c=s*i,p=r*i;return{x:t[0]+s*t[2]+r*t[4]+o*t[6]+a*t[8]+i*t[10]+l*t[12]+u*t[14]+c*t[16]+p*t[18],y:t[1]+s*t[3]+r*t[5]+o*t[7]+a*t[9]+i*t[11]+l*t[13]+u*t[15]+c*t[17]+p*t[19]}}function m(t,e,n){const{xmin:s,ymin:r,xmax:o,ymax:i,spatialReference:a}=e;let l=[];if(n<2)l.push({x:s,y:i}),l.push({x:o,y:i}),l.push({x:s,y:r}),l.push({x:o,y:r});else{let t=10;for(let e=0;e<t;e++)l.push({x:s,y:r+(i-r)*e/(t-1)}),l.push({x:o,y:r+(i-r)*e/(t-1)});t=8;for(let e=1;e<=t;e++)l.push({x:s+(o-s)*e/t,y:r}),l.push({x:s+(o-s)*e/t,y:i})}l=l.map((e=>h(t,e,n)));const u=l.map((t=>t.x)),c=l.map((t=>t.y));return new f.Z({xmin:Math.min.apply(null,u),xmax:Math.max.apply(null,u),ymin:Math.min.apply(null,c),ymax:Math.max.apply(null,c),spatialReference:a})}let d=s=class extends c.Z{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(t,e){const{coeffX:n,coeffY:s}=e;if(!n?.length||!s?.length||n.length!==s.length)return null;const r=[];for(let t=0;t<n.length;t++)r.push(n[t]),r.push(s[t]);return r}writeForwardCoefficients(t,e,n){const s=[],r=[];for(let e=0;e<t?.length;e++)e%2==0?s.push(t[e]):r.push(t[e]);e.coeffX=s,e.coeffY=r}get inverseCoefficients(){let t=this._get("inverseCoefficients");const e=this._get("forwardCoefficients");return!t&&e&&this.polynomialOrder<2&&(t=function(t){const[e,n,s,r,o,i]=t,a=s*i-o*r,l=o*r-s*i;return[(o*n-e*i)/a,(s*n-e*r)/l,i/a,r/l,-o/a,-s/l]}(e)),t}set inverseCoefficients(t){this._set("inverseCoefficients",t)}readInverseCoefficients(t,e){const{inverseCoeffX:n,inverseCoeffY:s}=e;if(!n?.length||!s?.length||n.length!==s.length)return null;const r=[];for(let t=0;t<n.length;t++)r.push(n[t]),r.push(s[t]);return r}writeInverseCoefficients(t,e,n){const s=[],r=[];for(let e=0;e<t?.length;e++)e%2==0?s.push(t[e]):r.push(t[e]);e.inverseCoeffX=s,e.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(t){if("point"===t.type){const e=h(this.forwardCoefficients,t,this.polynomialOrder);return new p.Z({x:e.x,y:e.y,spatialReference:t.spatialReference})}return m(this.forwardCoefficients,t,this.polynomialOrder)}inverseTransform(t){if("point"===t.type){const e=h(this.inverseCoefficients,t,this.polynomialOrder);return new p.Z({x:e.x,y:e.y,spatialReference:t.spatialReference})}return m(this.inverseCoefficients,t,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,o.Cb)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,r._)([(0,o.Cb)()],d.prototype,"forwardCoefficients",void 0),(0,r._)([(0,a.r)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,r._)([(0,u.c)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,r._)([(0,o.Cb)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,r._)([(0,a.r)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,r._)([(0,u.c)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,r._)([(0,o.Cb)()],d.prototype,"affectsPixelSize",null),(0,r._)([(0,i.J)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=s=(0,r._)([(0,l.j)("esri.layers.support.rasterTransforms.PolynomialTransform")],d);const g=d},87521:(t,e,n)=>{n.d(e,{j:()=>m,c:()=>d});var s,r=n(29680),o=n(43697),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),a=n(52011),l=n(48700);let u=s=class extends l.Z{constructor(){super(...arguments),this.type="identity"}clone(){return new s}};(0,o._)([(0,i.J)({IdentityXform:"identity"})],u.prototype,"type",void 0),u=s=(0,o._)([(0,a.j)("esri.layers.support.rasterTransforms.IdentityTransform")],u);const c=u;var p=n(87390);const f={GCSShiftXform:r.Z,IdentityXform:c,PolynomialXform:p.Z},h=Object.keys(f);function m(t){const e=t?.type;return!t||h.includes(e)}function d(t){const e=t?.type;if(!e)return null;const n=f[t?.type];if(n){const e=new n;return e.read(t),e}return null}}}]);
|