@arcgis/core 4.27.0-next.20230317 → 4.27.0-next.20230321
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/TimeExtent.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05e47e78e258dd5ab6ea.js +1 -0
- package/assets/esri/core/workers/chunks/{b661d2c785333429aad3.js → 0b005e3502dd97562701.js} +1 -1
- package/assets/esri/core/workers/chunks/{8812629e07e5bf46caa7.js → 1d2271a36641f6834401.js} +1 -1
- package/assets/esri/core/workers/chunks/1d65a2bc91774fdbd690.js +1 -0
- package/assets/esri/core/workers/chunks/273a894ab44b76ee4488.js +1 -0
- package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +1 -0
- package/assets/esri/core/workers/chunks/{56ddde83f40cda0a8a5c.js → 2c0775541cfec9d43acb.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a1b8be3c2a59c4c925.js → 32f9b488915a4a8864e5.js} +1 -1
- package/assets/esri/core/workers/chunks/{790d62ea3c90ca076095.js → 403c18eaa30673b096fe.js} +1 -1
- package/assets/esri/core/workers/chunks/41bbf58417f4085657f4.js +1 -0
- package/assets/esri/core/workers/chunks/{c36efbdd0a84fe851bbb.js → 433686dfda9e2ff1f98b.js} +1 -1
- package/assets/esri/core/workers/chunks/4be7647605300e07e843.js +1 -0
- package/assets/esri/core/workers/chunks/5cc99e9e974fec32b597.js +1 -0
- package/assets/esri/core/workers/chunks/6062bc79ebd5047a473a.js +1 -0
- package/assets/esri/core/workers/chunks/{57aa75a10fb8bb3fa517.js → 622139ef8f7181e48cd0.js} +1 -1
- package/assets/esri/core/workers/chunks/6b14673a4afd6ef81487.js +1 -0
- package/assets/esri/core/workers/chunks/70ea44365021b665c213.js +1 -0
- package/assets/esri/core/workers/chunks/{7727e6a4338c831f272f.js → 7570ec6a64a88ddc0fdd.js} +1 -1
- package/assets/esri/core/workers/chunks/81a6f4b43e047c3395c0.js +1 -0
- package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +1 -0
- package/assets/esri/core/workers/chunks/8daa0523d49653cc5861.js +1 -0
- package/assets/esri/core/workers/chunks/{3ff3d67f1bc6e2b2f48e.js → 90e12cff7672f3d92ced.js} +1 -1
- package/assets/esri/core/workers/chunks/{f150bd21c3b9e098da57.js → 92951b85676df776961f.js} +56 -56
- package/assets/esri/core/workers/chunks/983b26414cc46d9c3105.js +1 -0
- package/assets/esri/core/workers/chunks/{19355af765993931a7c0.js → 9b196a726c6d175ca60f.js} +1 -1
- package/assets/esri/core/workers/chunks/a27951dbe83c63f9d01a.js +1 -0
- package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +1 -0
- package/assets/esri/core/workers/chunks/bfc2b40f1892970281c6.js +1 -0
- package/assets/esri/core/workers/chunks/c162d1e27e779732d494.js +1 -0
- package/assets/esri/core/workers/chunks/c5d872adce711ec61ede.js +1 -0
- package/assets/esri/core/workers/chunks/c5dd23d11fa91b0f318e.js +1 -0
- package/assets/esri/core/workers/chunks/{e97c4beb3a6cf1d91310.js → c6c2f771bca0e303b5c0.js} +1 -1
- package/assets/esri/core/workers/chunks/c8f019d13f6b22481f2e.js +1 -0
- package/assets/esri/core/workers/chunks/d34dbb49508a95588423.js +1 -0
- package/assets/esri/core/workers/chunks/e637e47000f4dc48054d.js +1 -0
- package/assets/esri/core/workers/chunks/e7093d27a31345953dca.js +1 -0
- package/assets/esri/core/workers/chunks/f1ab86dbbd5b04e2a96c.js +1 -0
- package/assets/esri/core/workers/chunks/f85a01429959e60a8713.js +1 -0
- package/assets/esri/core/workers/chunks/ff9efa829497557ec26a.js +1 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +3 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +18 -0
- package/assets/esri/themes/base/widgets/_ItemList.scss +13 -33
- 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/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
- package/chunks/ColorMaterial.glsl.js +16 -14
- package/core/domUtils.js +1 -1
- package/core/maybe.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/interfaces.d.ts +12 -214
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/support/FieldsIndex.js +1 -1
- package/layers/support/fieldType.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterFunctionConstants.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/CurvatureFunction.js +5 -0
- package/layers/support/rasterFunctions/CurvatureFunctionArguments.js +5 -0
- package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/processor/curvatureProcessor.js +5 -0
- package/views/2d/engine/imagery/processor/rasterProcessor.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/support/BinStore.js +1 -1
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/CloudsData.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/interfaces.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/buffer/workerHelper.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/widgets/Bookmarks/css.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Upload.js +5 -0
- package/widgets/Editor/UploadState.js +4 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/{InputField.js → FieldInput.js} +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm/GroupInput.js +5 -0
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/009348f65fab440f7752.js +0 -1
- package/assets/esri/core/workers/chunks/075ecd53fb229dfee53c.js +0 -1
- package/assets/esri/core/workers/chunks/1c77b92063ee36421914.js +0 -1
- package/assets/esri/core/workers/chunks/1ee774c3f29d8074da12.js +0 -1
- package/assets/esri/core/workers/chunks/262b6de5a29c713b4010.js +0 -1
- package/assets/esri/core/workers/chunks/281c0f936b5645a673ab.js +0 -1
- package/assets/esri/core/workers/chunks/2883a59fc1fc9e4d71af.js +0 -1
- package/assets/esri/core/workers/chunks/2e032a58ac6717313227.js +0 -1
- package/assets/esri/core/workers/chunks/4d4cbfe72835c0460b09.js +0 -1
- package/assets/esri/core/workers/chunks/5504dff4113dd74d2fa7.js +0 -1
- package/assets/esri/core/workers/chunks/5bded2588008117d0c35.js +0 -1
- package/assets/esri/core/workers/chunks/6caf8a0b49bd01906f32.js +0 -1
- package/assets/esri/core/workers/chunks/9cab04c71d8bccf0156d.js +0 -1
- package/assets/esri/core/workers/chunks/9f02a0670ad73718d8f9.js +0 -1
- package/assets/esri/core/workers/chunks/a265e454461edb306e2d.js +0 -1
- package/assets/esri/core/workers/chunks/a50ca44a62434bf18664.js +0 -1
- package/assets/esri/core/workers/chunks/bd090f9ec6cfe08e19a3.js +0 -1
- package/assets/esri/core/workers/chunks/c3338bdce8368731c4e9.js +0 -1
- package/assets/esri/core/workers/chunks/c54df59b2b3f73828a44.js +0 -1
- package/assets/esri/core/workers/chunks/ddebf3b5a131a6da5419.js +0 -1
- package/assets/esri/core/workers/chunks/de461c30aa24ec8bb212.js +0 -1
- package/assets/esri/core/workers/chunks/e23f56bee694a38da5b9.js +0 -1
- package/assets/esri/core/workers/chunks/ec73d16ef169adfc34fb.js +0 -1
- package/assets/esri/core/workers/chunks/ef884e2833868234c13c.js +0 -1
- package/assets/esri/core/workers/chunks/f3c99525fb1b0f719fe0.js +0 -1
- package/assets/esri/core/workers/chunks/fe314feede84dd688010.js +0 -1
- package/assets/esri/core/workers/chunks/ff15557dc7b74162ed75.js +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ar.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_bg.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_bs.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ca.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_cs.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_da.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_de.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_el.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_en.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_es.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_et.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_fi.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_fr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_he.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_hr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_hu.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_id.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_it.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ja.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ko.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_lt.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_lv.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_nb.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_nl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pt-BR.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pt-PT.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ro.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ru.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sk.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sv.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_th.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_tr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_uk.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_vi.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-CN.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-HK.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-TW.json +0 -1
- package/widgets/FeatureForm/InputField.d.ts +0 -4
- package/widgets/FeatureForm/InputFieldGroup.d.ts +0 -4
- package/widgets/FeatureForm/InputFieldGroup.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[450,9880],{41993:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=41993,e.exports=t},99880:(e,t,r)=>{"use strict";r.d(t,{V:()=>l});var s=r(68773),i=(r(3172),r(20102)),n=r(92604),o=r(17452);const a=n.Z.getLogger("esri.assets");function l(e){if(!s.Z.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(s.Z.assetsPath,e)}},32448:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(43697),i=r(15923),n=r(50758),o=r(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const s=this._target||this;return[...r].forEach((e=>{e.call(s,t)})),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,n.AL)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],s=r.indexOf(t);s>=0&&r.splice(s,1)}}}once(e,t){const r=this.on(e,(e=>{r.remove(),t.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,s._)([(0,o.j)("esri.core.Evented")],r),r};let r=class extends i.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,s._)([(0,o.j)("esri.core.Evented")],r),e.EventedAccessor=r}(a||(a={}));const l=a},609:(e,t,r)=>{"use strict";r.d(t,{D:()=>u,v:()=>c});var s,i,n=r(43697),o=r(15923),a=r(70586),l=r(95330),h=r(52011);(i=s||(s={}))[i.PENDING=0]="PENDING",i[i.RESOLVED=1]="RESOLVED",i[i.REJECTED=2]="REJECTED";class d{constructor(e){this.instance=e,this._resolver=(0,l.dD)(),this._status=s.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=s.RESOLVED,this._cleanUp()}),(()=>{this._status=s.REJECTED,this._cleanUp()}))}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===s.RESOLVED}isRejected(){return this._status===s.REJECTED}isFulfilled(){return this._status!==s.PENDING}abort(){this._resolver.reject((0,l.zE)())}when(e,t){return this._resolver.promise.then(e,t)}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,l.dD)(),t=[...this._resolvingPromises,(0,a.j0)(e.promise)],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,l.D_)(e)||this._resolver.reject(e)})),e.resolve()}}const c=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new d(this),this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return new Promise(((e,t)=>{this._promiseProps.when(e,t)})).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,n._)([(0,h.j)("esri.core.Promise")],t),t};let u=class extends(c(o.Z)){};u=(0,n._)([(0,h.j)("esri.core.Promise")],u)},17445:(e,t,r)=>{"use strict";r.d(t,{N1:()=>u,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>g,on:()=>c,tX:()=>_});var s=r(91460),i=r(50758),n=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.hw)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.hw)(d),r(e)}const p=l(e,((e,r)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,i.kB)((()=>{p.remove(),c()})),d}function u(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,i.AL)([(0,o.fu)(r,(()=>{l(),n((0,o.zE)())})),d(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(87538);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},41123:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},73660:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_t});var s=r(40330),i=r(43697),n=r(68773),o=r(3172),a=r(20102),l=r(32448),h=r(91460),d=r(22974),c=r(78286),u=r(95330),p=r(17445),f=r(17452),m=r(5600),g=(r(75215),r(52011)),_=(r(67676),r(80442)),v=r(940);r(2587),(()=>{if("function"==typeof Element.prototype.closest)return(e,t)=>e.closest(t);Element.prototype.matches||Element.prototype.msMatchesSelector})();var y=r(61247),w=r(92604),S=r(70586),I=r(609),k=r(41123),b=r(90578),A=r(58971),T=r(38805),U=r(8728),C=r(3894),x=r(50758);const P=new Map;function R(){P.clear()}function O(e){P.delete(e)}w.Z.getLogger("esri.widgets.support.widgetUtils");function D(e){const t=C.Z.acquire();for(let e=0;e<arguments.length;e++){const r=arguments[e],s=typeof r;if("string"===s)t.push(r);else if(Array.isArray(r))t.push.apply(t,r);else if("object"===s)for(const e in r)r[e]&&t.push(e)}const r=t.join(" ");return C.Z.release(t),r}function E(e){this[e.getAttribute("data-node-ref")]=e}(()=>{const e=new Map;new ResizeObserver((t=>{R();for(const r of t)e.get(r.target)?.(r)}))})();const N=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce(((e,t)=>(e[t]=[],e)),{}),L=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],j=new U.Z({whiteList:N,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(L.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),M="http://www.w3.org/",q=`${M}2000/svg`,F=`${M}1999/xlink`;let $=[],B=(e,t)=>{let r={};return Object.keys(e).forEach((t=>{r[t]=e[t]})),t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),r},V=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),Z=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},z=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(V(e[s],t))return s;return-1},H=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(V(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},J=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},W=[],G=!1,Y=e=>{(e.children||[]).forEach(Y),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},K=()=>{G=!1,W.forEach(Y),W.length=0},X=e=>{W.push(e),G||(G=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(K,{timeout:16}):setTimeout(K,16))},Q=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),X(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),X(e))},ee=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)ne(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(Z(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===q?"href"===n?e.setAttributeNS(F,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=j.sanitize(a):te(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function te(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let re,se=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)ie(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),ee(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},ie=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=B(s,{namespace:q})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}se(i,e,s)}},ne=(e,t,r)=>{t&&t.split(" ").forEach((t=>{t&&e.classList.toggle(t,r)}))};re=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=B(r,{namespace:q})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=((e,t,r,s,i)=>{if(r===s)return!1;s=s||$;let n,o=(r=r||$).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&V(a,c))d=re(a,c,i)||d,l++;else{let a=z(r,c,l+1);if(a>=0){for(n=l;n<a;n++)Q(r[n]),H(r,n,e,"removed");d=re(r[a],c,i)||d,l=a+1}else ie(c,t,l<o?r[l].domNode:void 0,i),J(c),H(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)Q(r[n]),H(r,n,e,"removed");return d})(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(ne(e,h,!1),ne(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(Z(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"===o){let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}else if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===q?"href"===o?e.setAttributeNS(F,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=j.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):te(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let oe=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,re(s,r,t)},domNode:e.domNode});const ae={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let le,he=e=>B(ae,e),de=(e,t,r)=>(r=he(r),ie(t,e,void 0,r),oe(t,r)),ce=(e,t,r)=>(r=he(r),ie(t,e.parentNode,e,r),oe(t,r)),ue=(e,t,r)=>(r=he(r),t.domNode=e,se(e,t,r),oe(t,r)),pe=(e,t,r)=>(r=he(r),ie(t,e.parentNode,e,r),e.parentNode.removeChild(e),oe(t,r));le=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const fe={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},me={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{e.style[t]=r}},ge=(e,t,r=!1)=>{let s=e;return t.forEach(((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,(t=>t.domNode===e)):void 0;r&&!n&&i!==t.length-1||(s=n)})),s};var _e=r(65161),ve=r(99880);let ye;(0,_.Z)("esri-disable-components-assets-path")||(ye="components/assets");const we=Symbol("widget"),Se=Symbol("widget-test-data"),Ie=[],ke={},be=new WeakMap;function Ae(e,t){let r=t.children;if(r&&r.length)for(let t=0;t<r.length;++t)r[t]=Ae(e,r[t]);else r=Ie;const s=t.vnodeSelector;if(xe(s)){const i=t.properties||ke,n=i.key||s;return{vnodeSelector:"div",properties:{key:n,afterCreate:Te,afterUpdate:Ue,afterRemoved:Ce,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}},children:void 0,text:void 0,domNode:null}}return t}function Te(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,be.set(e,o),o.afterCreate?.(o,e),s._internalHandles.add((0,x.kB)((()=>Ce(e))))}function Ue(e,t,r,{widgetProperties:s}){const i=be.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ce(e){const t=be.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),be.delete(e))}function xe(e){return"function"==typeof e&&e[we]}const Pe=new Set;var Re,Oe=r(70171),De=r(94443);let Ee=0;function Ne(e,t){for(const r in t)null!=e[r]&&("object"==typeof e[r]&&"object"==typeof t[r]?Ne(e[r],t?.[r]):e[r]=t[r]);return e}const Le=(e=>{let t;const r={...fe,...e},s=(n=r,{...me,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some((e=>customElements.get(e?.tagName?.toLowerCase())));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).filter((e=>e.getRootNode()===e.ownerDocument)).reverse();s=ge(a.getLastRender(),r,!0)}else n.reverse(),s=ge(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0),h[e].update(t),i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(de,e,t)},insertBefore:(e,t)=>{c(ce,e,t)},merge:(e,t)=>{c(ue,e,t)},replace:(e,t)=>{c(pe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(R(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let je=!1,Me=class extends((0,I.v)(l.Z.EventedAccessor)){constructor(e,t){super(e,t),this._attached=!1,this._internalHandles=new y.Z,this._projector=Le,this._readyForTrueRender=!1,this.iconClass="esri-icon-checkbox-unchecked",this.icon=null,this.key=this,this._loadLocale=(0,u.Ds)((async()=>{if(this._messageBundleProps&&this._messageBundleProps.length){const e=await(0,u.as)(this._messageBundleProps.map((async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,De.ME)(e);this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ne((0,d.d9)(r),this.uiStrings)),this[t]=r})));if(this.destroyed)return;for(const t of e)t.error&&w.Z.getLogger(this.declaredClass).error("widget-intl:locale-error",this.declaredClass,t.error)}await this.loadLocale()})),ye&&(0,_e.Y)((0,f.hF)((0,ve.V)(ye)));const r="esri-widget-uid-"+(0,k.D)(),s=this.render.bind(this);this._trackingTarget=new T.M((()=>this.scheduleRender()));const i=()=>{if(!this._readyForTrueRender||this.destroyed)return null;if(!this.visible)return{vnodeSelector:"div",properties:{key:r,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0};const e=s();let{properties:t}=e;t||(e.properties=t={});let{key:i,styles:n}=t;i||(t.key=r),n||(t.styles=n={}),n.display||(n.display="");let o=0;return e.children?.forEach((e=>{if(xe(e.vnodeSelector))return;let{properties:t}=e;t||(e.properties=t={}),t.key||(t.key=`${this.id}--${o++}`)})),Ae(this,e)};var n;this.render=()=>{if(je)return i();let e=function(e){return P.get(e)}(this)??null;if(e)return e;this._trackingTarget.clear(),je=!0;try{e=(0,A.LJ)(this._trackingTarget,i)}catch(e){throw console.error(e),e}finally{je=!1}return e&&function(e,t){P.set(e,t)}(this,e),e},this.addResolvingPromise(this._resourcesFetch=this.beforeFirstRender().then((()=>{this._readyForTrueRender=!0,this._postInitialize()}))),n=this._resourcesFetch,Pe.add(n),n.finally((()=>Pe.delete(n)))}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){return Promise.all([this.loadDependencies(),this._loadLocale()]).then((()=>{})).catch(u.H9)}async loadDependencies(){}async loadLocale(){}destroy(){this.destroyed||((0,S.SC)(this._trackingTarget),(0,S.SC)(this.viewModel),this._detach(this.container),this._set("container",null),this._internalHandles.destroy(),this._emitter.clear(),this.render=()=>null,this._projector=null,O(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return function(e){return"string"==typeof e?document.getElementById(e):e??null}(e)}get domNode(){return this.container}set domNode(e){this.container=e}get id(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+Ee++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Re=we,Se)](){return{projector:this._projector}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(O(this),this._projector.scheduleRender())}classes(...e){return D.apply(this,e)}renderNow(){O(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this._internalHandles.add((0,p.YP)((()=>this.viewModel),((e,t)=>{t&&this._internalHandles.remove("delegated-events"),e&&(0,h.vT)(e)&&this._internalHandles.add(this._delegatedEventNames.map((t=>(0,h.on)(e,t,(e=>{this.emit(t,e)})))),"delegated-events")}),p.nn)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(u.H9),this.scheduleRender()};this._internalHandles.add([(0,Oe.qe)(e),(0,p.YP)((()=>this.uiStrings),e),(0,p.gx)((()=>this.container),(e=>{this.destroyed||this._attach(e)}),{initial:!0,once:!0})])}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};Me[Re]=!0,(0,i._)([(0,m.Cb)()],Me.prototype,"_readyForTrueRender",void 0),(0,i._)([(0,m.Cb)({value:null})],Me.prototype,"container",null),(0,i._)([(0,b.p)("container")],Me.prototype,"castContainer",null),(0,i._)([(0,m.Cb)()],Me.prototype,"iconClass",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"icon",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"id",null),(0,i._)([(0,m.Cb)()],Me.prototype,"label",null),(0,i._)([(0,m.Cb)()],Me.prototype,"renderable",null),(0,i._)([(0,m.Cb)()],Me.prototype,"uiStrings",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"viewModel",void 0),(0,i._)([(0,m.Cb)({value:!0})],Me.prototype,"visible",null),(0,i._)([(0,m.Cb)()],Me.prototype,"key",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"children",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterCreate",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterUpdate",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterRemoved",void 0),Me=(0,i._)([(0,g.j)("esri.widgets.Widget")],Me);const qe=Me;function Fe(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}var $e=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Be=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Be(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=$e(i)),t.push(i))}},Ve=function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Be(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}};function Ze(e,t,...r){return"function"!=typeof e||xe(e)?Ve(e,t,...r):e(t,...r)}const ze="esri-identity-form",He={base:ze,group:`${ze}__group`,label:`${ze}__label`,footer:`${ze}__footer`,esriInput:"esri-input",esriButton:"esri-button",esriButtonSecondary:"esri-button--secondary"};let Je=class extends qe{constructor(e,t){super(e,t),this._usernameInputNode=null,this._passwordInputNode=null,this.signingIn=!1,this.server=null,this.resource=null,this.error=null,this.oAuthPrompt=!1}render(){const{error:e,server:t,resource:r,signingIn:s,oAuthPrompt:i,messages:n}=this,o=Ze("div",{class:He.group},(0,v.n)(i?n.oAuthInfo:n.info,{server:t&&/\.arcgis\.com/i.test(t)?"ArcGIS Online":t,resource:`(${r||n.lblItem})`})),a=i?null:Ze("div",{class:He.group,key:"username"},Ze("label",{class:He.label},n.lblUser,Ze("input",{value:"",required:!0,autocomplete:"off",spellcheck:!1,type:"text",bind:this,afterCreate:E,"data-node-ref":"_usernameInputNode",class:He.esriInput}))),l=i?null:Ze("div",{class:He.group,key:"password"},Ze("label",{class:He.label},n.lblPwd,Ze("input",{value:"",required:!0,type:"password",bind:this,afterCreate:E,"data-node-ref":"_passwordInputNode",class:He.esriInput}))),h=Ze("div",{class:this.classes(He.group,He.footer)},Ze("input",{type:"submit",disabled:!!s,value:s?n.lblSigning:n.lblOk,class:He.esriButton}),Ze("input",{type:"button",value:n.lblCancel,bind:this,onclick:this._cancel,class:this.classes(He.esriButton,He.esriButtonSecondary)})),d=e?Ze("div",null,e.details&&e.details.httpStatus?n.invalidUser:n.noAuthService):null;return Ze("form",{class:He.base,bind:this,onsubmit:this._submit},o,d,a,l,h)}_cancel(){this._set("signingIn",!1),this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode&&this._usernameInputNode.value,password:this._passwordInputNode&&this._passwordInputNode.value};this.emit("submit",t)}};(0,i._)([(0,m.Cb)(),Fe("esri/identity/t9n/identity")],Je.prototype,"messages",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"signingIn",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"server",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"resource",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"error",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"oAuthPrompt",void 0),Je=(0,i._)([(0,g.j)("esri.identity.IdentityForm")],Je);const We=Je;var Ge=r(44291);const Ye="esri-identity-modal",Ke={base:Ye,open:`${Ye}--open`,closed:`${Ye}--closed`,title:`${Ye}__title`,dialog:`${Ye}__dialog`,content:`${Ye}__content`,closeButton:`${Ye}__close-button`,iconClose:"esri-icon-close"};let Xe=class extends qe{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.content=null,this.open=!1,this._focusTrap=null,this._close=()=>{this.open=!1},document.body.appendChild(this.container),this.addHandles((0,p.YP)((()=>this.open),(()=>this._toggleFocusTrap())))}destroy(){this._destroyFocusTrap()}get title(){return this.messages?.auth.signIn}render(){const e=this.id,{open:t,content:r,title:s,messages:i}=this,n=t&&!!r,o={[Ke.open]:n,[Ke.closed]:!n},a=Ze("button",{class:Ke.closeButton,"aria-label":i.close,title:i.close,bind:this,onclick:this._close,type:"button"},Ze("span",{"aria-hidden":"true",class:Ke.iconClose})),l=`${e}_title`,h=`${e}_content`,d=s?Ze("h1",{id:l,class:Ke.title},s):null,c=n?Ze("div",{bind:this,class:Ke.dialog,role:"dialog","aria-labelledby":l,"aria-describedby":h,afterCreate:this._createFocusTrap},a,d,this._renderContent(h)):null;return Ze("div",{tabIndex:-1,class:this.classes(Ke.base,o)},c)}_destroyFocusTrap(){this._focusTrap?.deactivate({onDeactivate:()=>{}}),this._focusTrap=null}_toggleFocusTrap(){const{_focusTrap:e,open:t}=this;e&&(t?e.activate():e.deactivate())}_createFocusTrap(e){this._destroyFocusTrap();const t=requestAnimationFrame((()=>{this._focusTrap=(0,Ge.v)(e,{initialFocus:"input",onDeactivate:this._close}),this._toggleFocusTrap()}));this.addHandles((0,x.kB)((()=>cancelAnimationFrame(t))))}_renderContent(e){const t=this.content;return"string"==typeof t?Ze("div",{class:Ke.content,id:e,innerHTML:t}):function(e){return e&&"function"==typeof e.render}(t)?Ze("div",{class:Ke.content,id:e},t.render()):t instanceof HTMLElement?Ze("div",{class:Ke.content,id:e,bind:t,afterCreate:this._attachToNode}):null}_attachToNode(e){e.appendChild(this)}};(0,i._)([(0,m.Cb)({readOnly:!0})],Xe.prototype,"container",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"content",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"open",void 0),(0,i._)([(0,m.Cb)(),Fe("esri/t9n/common")],Xe.prototype,"messages",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"title",null),Xe=(0,i._)([(0,g.j)("esri.identity.IdentityModal")],Xe);const Qe=Xe,et="esriJSAPIOAuth";class tt{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(et,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t&&t.appId&&t.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",r=new FormData;if(r.append("f","json"),r.append("auth_token",this.refreshToken||this.token),r.append("client_id",t.appId),r.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),"function"==typeof navigator.sendBeacon)navigator.sendBeacon(e,r);else{const t=new XMLHttpRequest;t.open("POST",e),t.send(r)}}if(t&&t.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(et,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(et);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}tt.prototype.declaredClass="esri.identity.OAuthCredential";var rt,st=r(96674);let it=rt=class extends st.wq{constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return rt.fromJSON(this.toJSON())}};(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"appId",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"authNamespace",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"expiration",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"flowType",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"forceLogin",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"forceUserId",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"locale",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"minTimeUntilExpiration",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popup",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popupCallbackUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popupWindowFeatures",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"portalUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"preserveUrlHash",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"userId",void 0),it=rt=(0,i._)([(0,g.j)("esri.identity.OAuthInfo")],it);const nt=it;let ot=class extends st.wq{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"adminTokenServiceUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"currentVersion",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"hasPortal",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"hasServer",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"owningSystemUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"owningTenant",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"server",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"shortLivedTokenValidity",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"tokenServiceUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"webTierAuth",void 0),ot=(0,i._)([(0,g.j)("esri.identity.ServerInfo")],ot);const at=ot;var lt=r(19745);const ht={},dt=e=>{const t=new f.R9(e.owningSystemUrl).host,r=new f.R9(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},ct=(e,t)=>!!(dt(e)&&t&&t.some((t=>t.test(e.server))));let ut=null,pt=null;try{ut=window.localStorage,pt=window.sessionStorage}catch{}class ft extends l.Z{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.formConstructor=We,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,f.mN)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^\/]+\/[^\/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^\/]+)\/?.*/i,this._gwItem=/http.+\/items\/([^\/]+)\/?.*/i,this._gwGroup=/http.+\/groups\/([^\/]+)\/?.*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getOAuthLocationParams(),window.addEventListener("pageshow",(e=>{this._pageShowHandler(e)}))}registerServers(e){const t=this.serverInfos;t?(e=e.filter((e=>!this.findServerInfo(e.server))),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach((e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)}))}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new at,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new mt({userId:e.userId,server:i.server,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,d.yd)({serverInfos:this.serverInfos.map((e=>e.toJSON())),oAuthInfos:this.oAuthInfos.map((e=>e.toJSON())),credentials:this.credentials.map((e=>e.toJSON()))})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach((t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new at(t))})),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach((t=>{t.appId&&e.push(t.declaredClass?t:new nt(t))})),e.length&&this.registerOAuthInfos(e)}s&&s.forEach((e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new mt(e)).emitTokenChange(),this.credentials.push(e))}))}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s,i=!0;t&&(r=!!t.token,s=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,o=(0,u.hh)();if(t.signal&&(0,u.fu)(t.signal,(()=>{n.abort()})),(0,u.fu)(n,(()=>{o.reject(new a.Z("identity-manager:user-aborted","ABORTED"))})),(0,u.Hc)(n))return o.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=r?this.findCredential(e):null;let d;if(h&&s&&s.details&&498===s.details.httpStatus)h.destroy();else if(h)return d=new a.Z("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:s}),o.reject(d),o.promise;const c=this._findCredential(e,t);if(c)return o.resolve(c),o.promise;let p=this.findServerInfo(e);if(p)!p.hasServer&&this._isServerRsrc(e)&&(p._restInfoPms=this._getTokenSvcUrl(e),p.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new a.Z("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),o.reject(d),o.promise;p=new at,p.server=this._getServerInstanceRoot(e),"string"==typeof t?(p.tokenServiceUrl=t,p.hasPortal=!0):(p._restInfoPms=t,p.hasServer=!0),this.registerServers([p])}return p.hasPortal&&void 0===p._selfReq&&(i||(0,f.D6)(p.tokenServiceUrl,this._appOrigin)||this._gwDomains.some((e=>e.tokenServiceUrl===p.tokenServiceUrl)))&&(p._selfReq={owningTenant:t&&t.owningTenant,selfDfd:this._getPortalSelf(p.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,p,t,o,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new f.R9(this._appOrigin),n=e.shortLivedTokenValidity;let l,h,d,c,u,p,m,g;t&&(g=this.tokenValidity||n||this._defaultTokenValidity,g>n&&n>0&&(g=n)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,p=r.signal,m=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,u=new f.R9(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!m&&"http"===i.scheme&&((0,f.D6)(i.uri,c,!0)||"https"===u.scheme&&i.host===u.host&&"7080"===i.port&&"7443"===u.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const _={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:g,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:p,...r?.ioArgs};return s||(_.withCredentials=!1),(0,o.default)(c,_).then((r=>{const s=r.data;if(!s||!s.token)return new a.Z("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return ht[i]||(ht[i]={}),t&&(ht[i][t.username]=t.password),s.validity=g,s}))}isBusy(){return!!this._busy}checkSignInStatus(e){return this.checkAppAccess(e,"").then((e=>e.credential))}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then((i=>{let n;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r&&r.force))n=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};n=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};n=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,o.default)(n,{query:l,authMode:"anonymous"}).then((e=>{if(!1===e.data.valid)throw new a.Z("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}})).catch((e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details&&e.details.httpStatus;if(498===t)throw i.destroy(),new a.Z("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new a.Z("identity-manager:invalid-request");return{credential:i}}))})).then((e=>({credential:e.credential,viewOnly:s})))}setOAuthResponseHash(e){e&&("#"===e.charAt(0)&&(e=e.substring(1)),this._processOAuthPopupParams((0,f.u0)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,u.hh)(),i=()=>{l?.remove(),h?.remove(),d?.remove(),o?.destroy(),this.dialog?.destroy(),this.dialog=o=l=h=d=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new a.Z("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,u.fu)(r.signal,(()=>{n()}));let o=new this.formConstructor;o.resource=this.getResourceName(e),o.server=t.server,this.dialog=new Qe,this.dialog.content=o,this.dialog.open=!0,this.emit("dialog-create");let l=o.on("cancel",n),h=(0,p.YP)((()=>this.dialog.open),n),d=o.on("submit",(e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then((n=>{i();const o=new mt({userId:e.username,server:t.server,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)})).catch((e=>{o.error=e,o.signingIn=!1}))}));return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,u.hh)();const i=this._oAuthDfd;let n;s?.signal&&(0,u.fu)(s.signal,(()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&m()})),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const o=r._oAuthCred;if(o.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&!r.popup&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,f.rS)(e),o.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),o.stateUID=(0,f.rS)(e),o.save()||(o.codeVerifier=n=null)}else o.codeVerifier=null;let l,h,d,c;this._getCodeChallenge(n).then((i=>{const n=!s||!1!==s.oAuthPopupConfirmation;r.popup&&n?(l=new this.formConstructor,l.oAuthPrompt=!0,l.server=t.server,this.dialog=new Qe,this.dialog.content=l,this.dialog.open=!0,this.emit("dialog-create"),h=l.on("cancel",m),d=(0,p.YP)((()=>this.dialog.open),m),c=l.on("submit",(()=>{g(),this._doOAuthSignIn(e,t,r,i)}))):this._doOAuthSignIn(e,t,r,i)}));const m=()=>{g(),this._oAuthDfd=null,i.reject(new a.Z("identity-manager:user-aborted","ABORTED"))},g=()=>{h?.remove(),d?.remove(),c?.remove(),l?.destroy(),this.dialog?.destroy(),this.dialog=null};return i.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach((e=>{e.destroy()})),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,h.on)(window,"message",(t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then((e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)})).catch((e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)}))}}))}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){"#"===e.charAt(0)&&(e=e.substring(1));const t=(0,f.u0)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){"?"===t.charAt(0)&&(t=t.substring(1));const e=(0,f.u0)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach((e=>{delete t[e]}));const r=(0,f.B7)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,o.default)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then((e=>e.data))}_getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",t).then((e=>(0,f.rS)(new Uint8Array(e))))}return Promise.resolve(null)}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new a.Z("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t&&t.token,l=t&&t.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter((t=>this._hasSameServerInstance(t.server,e)&&t.scope===h));if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i&&i.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some((a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i&&i.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0)))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t&&t.isAdmin&&!(0,f.D6)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,f.D6)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new f.R9(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,lt.P)(t)||(r=t.indexOf("/sharing")),-1===r&&"/"===t.substr(-1)&&(r=t.length-1),r>-1?e.substring(0,r):e}_hasSameServerInstance(e,t){return"/"===e.substr(-1)&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=this._normalizeAGOLorgDomain(e),t=this._normalizeAGOLorgDomain(t),(e=e.substr(e.indexOf(":")))===t.substr(t.indexOf(":"))}_normalizeAGOLorgDomain(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,s=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):s.test(e)&&(e=e.replace(s,"https://qaext.arcgis.com")),e}_sanitizeUrl(e){const t=(n.Z.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.substring(r+t.length+1)),e=(0,f.Fv)(e),(0,f.mN)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replace(e,"$1")===i.replace(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new f.R9(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some((e=>e.regex.test(t.uri)));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||n.Z.portalUrl&&(s=(0,f.D6)(t,n.Z.portalUrl,!0)),s||(s=this._portals.some((e=>this._hasSameServerInstance(e,t.uri)))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach(((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)}));let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r&&r.owningSystemUrl;s&&dt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,o.default)(e=s+"/rest/info",{query:{f:"json"}}).then((e=>e.data)),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some((r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t))),t||this._portals.some((r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t))),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.substring(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new f.R9(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}if(e.toLowerCase().includes("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then((i=>{const n=new mt({userId:i.username,server:r.server,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ut:pt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n}))}const i=new mt({userId:e.username,server:r.server,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ut:pt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new a.Z(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then((e=>{t.resolve(e)})).catch((e=>{t.reject(e)}))}_setOAuthResponseQueryString(e){e&&("?"===e.charAt(0)&&(e=e.substring(1)),this._processOAuthPopupParams((0,f.u0)(e)))}_exchangeToken(e,t,r){return(0,o.default)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}}).then((e=>e.data.token))}_getPlatformSelf(e,t){return e=e.replace(/^http:/i,"https:"),(0,o.default)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0}).then((e=>e.data))}_getPortalSelf(e,t){let r;return this._gwDomains.some((t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r))),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,o.default)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then((e=>e.data)))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,f.D6)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,f.ed)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new a.Z("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,u.hh)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_&&e.options_.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach((e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}})),e.resolve(t),o.forEach((e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)})),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,o,l)=>{const d=e.sinfo_,c=!e.options_||!1!==e.options_.prompt,p=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let m,g;if(i)t(new mt({userId:i,server:d.server,token:o||null,expires:null!=l?Number(l):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,h.on)(window,"message",(e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new a.Z("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new mt(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new a.Z("identity-manager:credential-request-failed","Parent application's token has expired.")):r(a.Z.fromJSON(e.data.error))))}));(0,u.fu)(e.options_?.signal,(()=>{s.remove()}))}else if(p){let i=p._oAuthCred;if(!i){const e=new tt(p,ut),t=new tt(p,pt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,p._oAuthCred=i}if(i.isValid()){m=new mt({userId:i.userId,server:d.server,token:i.token,expires:i.expires,ssl:i.ssl,_oAuthCred:i});const r=p.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);r||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then((e=>(m.expires=Date.now()+1e3*e.expires_in,m.token=e.access_token,m))):Promise.resolve(m),e._pendingDfd.then((e=>r?this._exchangeToken(e.server,p.appId,e.token).then((t=>(e.token=t,e))).catch((()=>e)):e)).then((e=>{t(e)})).catch((()=>{i?.destroy(),s()}))):t(m)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(p.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,p,d).then((e=>{t(e)})).catch(r)}else{const s=()=>{c?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,p,e.options_).then(t,r):(g=new a.Z("identity-manager:not-authenticated","User is not signed in."),r(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,p.appId).then((e=>{(0,f.D6)(e.portalUrl,this._appOrigin,!0)?(m=new mt({userId:e.username,server:d.server,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(m)):s()})).catch(s):s()}}else if(c){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else g=new a.Z("identity-manager:not-authenticated","User is not signed in."),r(g)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(ct(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new mt(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then((r=>{t(new mt({userId:h?.userId,server:s.server,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))}),r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then((()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)}),(t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)}))};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,o=this._isServerRsrc(e.resUrl_),l=e.sinfo_._restInfoPms;l?l.promise.then((t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,c.hS)("authInfo.tokenServicesUrl",t)||(0,c.hS)("authInfo.tokenServiceUrl",t)||(0,c.hS)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,c.hS)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}o&&r.owningSystemUrl?i():s()}),(()=>{e.sinfo_._restInfoPms=null;const t=new a.Z("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)})):o&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then((t=>{const r={};let s,i,n,o;return t&&(s=t.user&&t.user.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch((()=>null)).then((e=>(r.portalToken=e&&e.token,r.tokenExpiration=e&&e.expires,r))):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch((()=>null)).then((()=>r)):r})).catch((()=>null)).then((t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()})):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=window.location.href;let e=r.indexOf("?");e>-1&&(r=r.slice(0,e)),e=r.search(/\/(apps|home)\//),r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.default)(r+"/sharing/rest",{query:{f:"json"}}).then((()=>{this._defaultOAuthInfo=new nt({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})}))):t=Promise.resolve(),t.then((()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,o.default)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,f.hF)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then((e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,f.D6)(s,this._appOrigin)||this._gwDomains.some((e=>e.regex.test(s)&&e.regex.test(this._appOrigin)))),this.oAuthInfos.push(t)}}))}))}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const o={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(o.force_login=!0),r.forceUserId&&r.userId&&(o.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(o.redirectToUserOrgUrl=!0),i.codeVerifier&&(o.code_challenge=s||i.codeVerifier,o.code_challenge_method=s?"S256":"plain");const l=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=l+"?"+(0,f.B7)(o);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval((()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new a.Z("identity-manager:user-aborted","ABORTED");e.reject(t)}}}),500),this._oAuthOnPopupHandle=(0,h.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],(e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)}));else{const e=new a.Z("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:o,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,f.hF)(e.popupCallbackUrl);if(t){const e=(0,f.mN)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach((t=>{delete e.query[t]})),(0,f.fl)(e.path,e.query)}return r}}ft.prototype.declaredClass="esri.identity.IdentityManagerBase";let mt=class extends l.Z.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e&&e._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){const e=s.id.findServerInfo(this.server),t=e&&e.owningSystemUrl,r=!!t&&"server"===this.scope,i=r&&ct(e,s.id._legacyFed),n=e.webTierAuth,o=n&&s.id.normalizeWebTierAuth,a=ht[this.server],l=a&&a[this.userId];let h,d=this.resources&&this.resources[0],c=r?s.id.findServerInfo(t):null,u={username:this.userId,password:l};if(n&&!o)return;r&&!c&&s.id.serverInfos.some((e=>(s.id._isIdProvider(t,e.server)&&(c=e),!!c)));const p=c?s.id.findCredential(c.server,this.userId):null;if(!r||p){if(!i){if(r)h={serverUrl:d,token:p&&p.token,ssl:p&&p.ssl};else if(o)u=null,h={ssl:this.ssl};else{if(!l){let t;return d&&(d=s.id._sanitizeUrl(d),this._enqueued=1,t=s.id._enqueue(d,e,null,null,this.isAdmin,this),t.then((()=>{this._enqueued=0,this.refreshServerTokens()})).catch((()=>{this._enqueued=0}))),t}this.isAdmin&&(h={isAdmin:!0})}return s.id.generateToken(r?c:e,r?null:u,h).then((e=>{this.token=e.token,this.expires=null!=e.expires?Number(e.expires):null,this.creationTime=Date.now(),this.validity=e.validity,this.emitTokenChange(),this.refreshServerTokens()})).catch((()=>{}))}p?.refreshToken()}}refreshServerTokens(){"portal"===this.scope&&s.id.credentials.forEach((e=>{const t=s.id.findServerInfo(e.server),r=t&&t.owningSystemUrl;e!==this&&e.userId===this.userId&&r&&"server"===e.scope&&(s.id._hasSameServerInstance(this.server,r)||s.id._isIdProvider(r,this.server))&&(ct(t,s.id._legacyFed)?(e.token=this.token,e.expires=this.expires,e.creationTime=this.creationTime,e.validity=this.validity,e.emitTokenChange()):e.refreshToken())}))}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=this.server&&s.id.findServerInfo(this.server),r=t&&t.owningSystemUrl,i=r&&s.id.findServerInfo(r);!1===e||r&&"portal"!==this.scope&&(!i||!i.webTierAuth||s.id.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id.credentials.indexOf(this);e>-1&&s.id.credentials.splice(e,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,d.yd)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,i._)([(0,m.Cb)()],mt.prototype,"creationTime",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"expires",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"isAdmin",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"oAuthState",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"resources",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"scope",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"server",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"ssl",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"token",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"tokenRefreshBuffer",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"userId",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"validity",void 0),mt=(0,i._)([(0,g.j)("esri.identity.Credential")],mt);class gt extends ft{}gt.prototype.declaredClass="esri.identity.IdentityManager";const _t=new gt;(0,s.qh)(_t)},2587:(e,t,r)=>{"use strict";r(90344),r(18848),r(940),r(70171);var s=r(94443),i=r(3172),n=r(20102);async function o(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",h=a[2],d=(0,s.Su)(i),c=`${l}${h}.json`,u=d?`${l}${h}_${d}.json`:c;let p;try{p=await o(e(u))}catch(t){if(u===c)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await o(e(c))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const l={};var h,d=r(99880);(0,s.tz)((h={pattern:"esri/",location:d.V},new a(h)))},90344:(e,t,r)=>{"use strict";r.d(t,{Ze:()=>g,p6:()=>_});var s=r(35454),i=r(70171);const n={year:"numeric",month:"numeric",day:"numeric"},o={year:"numeric",month:"long",day:"numeric"},a={year:"numeric",month:"short",day:"numeric"},l={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},d={...h,second:"numeric"},c={"short-date":n,"short-date-short-time":{...n,...h},"short-date-short-time-24":{...n,...h,hour12:!1},"short-date-long-time":{...n,...d},"short-date-long-time-24":{...n,...d,hour12:!1},"short-date-le":n,"short-date-le-short-time":{...n,...h},"short-date-le-short-time-24":{...n,...h,hour12:!1},"short-date-le-long-time":{...n,...d},"short-date-le-long-time-24":{...n,...d,hour12:!1},"long-month-day-year":o,"long-month-day-year-short-time":{...o,...h},"long-month-day-year-short-time-24":{...o,...h,hour12:!1},"long-month-day-year-long-time":{...o,...d},"long-month-day-year-long-time-24":{...o,...d,hour12:!1},"day-short-month-year":a,"day-short-month-year-short-time":{...a,...h},"day-short-month-year-short-time-24":{...a,...h,hour12:!1},"day-short-month-year-long-time":{...a,...d},"day-short-month-year-long-time-24":{...a,...d,hour12:!1},"long-date":l,"long-date-short-time":{...l,...h},"long-date-short-time-24":{...l,...h,hour12:!1},"long-date-long-time":{...l,...d},"long-date-long-time-24":{...l,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":d},u=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(u.apiValues,u.toJSON.bind(u),u.fromJSON.bind(u),{ar:"ar-u-nu-latn-ca-gregory"});let f=new WeakMap,m=c["short-date-short-time"];function g(e){return e?c[e]:null}function _(e,t){return function(e){const t=e||m;let r=f.get(t);if(!r){const e=(0,i.Kd)(),s=p[(0,i.Kd)()]||e;r=new Intl.DateTimeFormat(s,t),f.set(t,r)}return r}(t).format(e)}(0,i.Ze)((()=>{f=new WeakMap,m=c["short-date-short-time"]}))},70171:(e,t,r)=>{"use strict";let s;r.d(t,{Kd:()=>o,Ze:()=>d,qe:()=>l});const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function n(){return i??globalThis.navigator?.language??"en"}function o(){return void 0===s&&(s=n()),s}const a=[];function l(e){return a.push(e),{remove(){a.splice(a.indexOf(e),1)}}}const h=[];function d(e){return h.push(e),{remove(){a.splice(h.indexOf(e),1)}}}globalThis.addEventListener?.("languagechange",(function(){const e=n();s!==e&&(s=e,[...h].forEach((t=>{t.call(null,e)})),[...a].forEach((t=>{t.call(null,e)})))}))},94443:(e,t,r)=>{"use strict";r.d(t,{ME:()=>p,Su:()=>f,tz:()=>u});var s=r(20102),i=r(95330),n=r(70171);const o=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,a={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return a[e]??!1}const h=[],d=new Map;function c(e){for(const t of d.keys())m(e.pattern,t)&&d.delete(t)}function u(e){return h.includes(e)||(c(e),h.unshift(e)),{remove(){const t=h.indexOf(e);t>-1&&(h.splice(t,1),c(e))}}}async function p(e){const t=(0,n.Kd)();d.has(e)||d.set(e,async function(e,t){const r=[];for(const s of h)if(m(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=d.get(e);return r&&await g.add(r),r}function f(e){if(!o.test(e))return null;const t=o.exec(e);if(null===t)return null;const[,r,s]=t,i=r+(s?"-"+s.toUpperCase():"");return l(i)?i:l(r)?r:null}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ze)((()=>{d.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,i.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,r)=>{"use strict";r.d(t,{sh:()=>l,uf:()=>h});var s=r(70586),i=r(70171);const n={ar:"ar-u-nu-latn"};let o=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!o.has(t)){const r=(0,i.Kd)(),s=n[(0,i.Kd)()]||r;o.set(t,new Intl.NumberFormat(s,e))}return(0,s.j0)(o.get(t))}(t).format(e)}(0,i.Ze)((()=>{o=new WeakMap,a={}}))},940:(e,t,r)=>{"use strict";r.d(t,{n:()=>h});var s=r(92604),i=r(78286),n=r(19153),o=r(90344),a=r(18848);const l=s.Z.getLogger("esri.intl.substitute");function h(e,t,r={}){const{format:s={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let s,n;const o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),n=e.slice(o+1).trim()),!s)return"";const a=(0,i.hS)(s,t);if(null==a)return"";const l=(n?r?.[n]:null)??r?.[s];return l?d(a,l):n?c(a,n):u(a)}(e,t,s)))}function d(e,t){switch(t.type){case"date":return(0,o.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),u(e)}}function c(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.p6)(e):""}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8079],{78079:(e,t,n)=>{n.r(t),n.d(t,{loadGLTFMesh:()=>_});var r=n(22303),o=n(3172),l=n(30175),s=n(22021),u=n(70586),a=n(21787),c=n(46521),i=n(65617),f=n(88669),d=n(62540),m=n(60746),p=n(91024),x=n(71630),g=n(56481),y=n(20773),T=n(11077),b=n(79583);Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,n){const r=e.typedBuffer,o=e.typedBufferStride,l=t.typedBuffer,s=t.typedBufferStride,u=n?n.count:t.count;let a=(n&&n.dstIndex?n.dstIndex:0)*o,c=(n&&n.srcIndex?n.srcIndex:0)*s;for(let e=0;e<u;++e){for(let e=0;e<9;++e)r[a+e]=l[c+e];a+=o,c+=s}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,n){const r=e.typedBuffer,o=e.typedBufferStride,l=t.typedBuffer,s=t.typedBufferStride,u=n?n.count:t.count;let a=(n&&n.dstIndex?n.dstIndex:0)*o,c=(n&&n.srcIndex?n.srcIndex:0)*s;for(let e=0;e<u;++e){for(let e=0;e<16;++e)r[a+e]=l[c+e];a+=o,c+=s}}},Symbol.toStringTag,{value:"Module"})),n(93860);var w=n(10816),v=n(56067),h=n(75488);function C(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,b.n1)(e.ElementType)))}var B=n(66459),A=n(40270),E=n(91695),S=n(91911),M=n(15317),R=n(57758),I=n(35371);async function _(e,t,n){const l=new A.C(function(e){const t=e?.resolveFile;return t?{busy:!1,request:async(e,n,r)=>{const l=t(e),s="image"===n?"image":"binary"===n?"array-buffer":"json";return(await(0,o.default)(l,{responseType:s,signal:null!=r?r.signal:null})).data}}:null}(n)),s=(await(0,E.Q)(l,t,n,!0)).model,a=s.lods.shift(),c=new Map,d=new Map;s.textures.forEach(((e,t)=>c.set(t,function(e){return new p.Z({data:((0,M.$A)(e.data),e.data),wrap:j(e.parameters.wrap)})}(e)))),s.materials.forEach(((e,t)=>d.set(t,function(e,t){const n=new r.Z(function(e,t){return(0,f.f)(z(e[0]),z(e[1]),z(e[2]),t)}(e.color,e.opacity)),o=e.emissiveFactor?new r.Z(function(e){return(0,i.f)(z(e[0]),z(e[1]),z(e[2]))}(e.emissiveFactor)):null;return new m.Z({color:n,colorTexture:(0,u.yw)(e.textureColor,(e=>t.get(e))),normalTexture:(0,u.yw)(e.textureNormal,(e=>t.get(e))),emissiveColor:o,emissiveTexture:(0,u.yw)(e.textureEmissive,(e=>t.get(e))),occlusionTexture:(0,u.yw)(e.textureOcclusion,(e=>t.get(e))),alphaMode:F(e.alphaMode),alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,metallic:e.metallicFactor,roughness:e.roughnessFactor,metallicRoughnessTexture:(0,u.yw)(e.textureMetallicRoughness,(e=>t.get(e))),colorTextureTransform:e.colorTextureTransform,normalTextureTransform:e.normalTextureTransform,occlusionTextureTransform:e.occlusionTextureTransform,emissiveTextureTransform:e.emissiveTextureTransform,metallicRoughnessTextureTransform:e.metallicRoughnessTextureTransform})}(e,c))));const g=k(a);for(const e of g.parts)P(g,e,d);const{position:y,normal:T,tangent:b,color:w,texCoord0:v}=g.vertexAttributes,h={position:y.typedBuffer,normal:null!=T?T.typedBuffer:null,tangent:null!=b?b.typedBuffer:null,uv:null!=v?v.typedBuffer:null,color:null!=w?w.typedBuffer:null},C=(0,B.w1)(h,e,n);return{transform:C.transform,components:g.components,spatialReference:e.spatialReference,vertexAttributes:new x.Q({position:C.vertexAttributes.position,normal:C.vertexAttributes.normal,tangent:C.vertexAttributes.tangent,color:h.color,uv:h.uv})}}function $(e,t){if(null==e)return"-";const n=e.typedBuffer;return`${(0,l.s1)(t,n.buffer,(()=>t.size))}/${n.byteOffset}/${n.byteLength}`}function O(e){return null!=e?e.toString():"-"}function k(e){let t=0;const n={color:!1,tangent:!1,normal:!1,texCoord0:!1},r=new Map,o=new Map,s=[];for(const u of e.parts){const{attributes:{position:e,normal:a,color:c,tangent:i,texCoord0:f}}=u,d=`\n ${$(e,r)}/\n ${$(a,r)}/\n ${$(c,r)}/\n ${$(i,r)}/\n ${$(f,r)}/\n ${O(u.transform)}\n `;let m=!1;const p=(0,l.s1)(o,d,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),a&&(n.normal=!0),c&&(n.color=!0),i&&(n.tangent=!0),f&&(n.texCoord0=!0),s.push({gltf:u,writeVertices:m,region:p})}return{vertexAttributes:{position:C(g.fP,t),normal:n.normal?C(g.ct,t):null,tangent:n.tangent?C(g.ek,t):null,color:n.color?C(g.mc,t):null,texCoord0:n.texCoord0?C(g.Eu,t):null},parts:s,components:[]}}function P(e,t,n){t.writeVertices&&function(e,t){const{position:n,normal:r,tangent:o,color:l,texCoord0:u}=e.vertexAttributes,i=t.region.start,{attributes:f,transform:d}=t.gltf,m=f.position.count;if((0,y.c)(n.slice(i,m),f.position,d),null!=f.normal&&null!=r){const e=(0,a.b)((0,c.c)(),d),t=r.slice(i,m);(0,y.b)(t,f.normal,e),(0,s.oc)(e)&&(0,y.d)(t,t)}else null!=r&&(0,v.f)(r,0,0,1,{dstIndex:i,count:m});if(null!=f.tangent&&null!=o){const e=(0,a.b)((0,c.c)(),d),t=o.slice(i,m);(0,T.a)(t,f.tangent,e),(0,s.oc)(e)&&(0,T.n)(t,t)}else null!=o&&(0,h.f)(o,0,0,1,1,{dstIndex:i,count:m});if(null!=f.texCoord0&&null!=u?(0,w.a)(u.slice(i,m),f.texCoord0):null!=u&&(0,w.f)(u,0,0,{dstIndex:i,count:m}),null!=f.color&&null!=l){const e=f.color,t=l.slice(i,m);if(4===e.elementCount)e instanceof g.ek?(0,T.b)(t,e,255):e instanceof g.mc?(0,h.a)(t,e):e instanceof g.v6&&(0,T.b)(t,e,1/256);else{(0,h.f)(t,255,255,255,255);const n=g.ne.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof g.ct?(0,y.e)(n,e,255):e instanceof g.ne?(0,v.a)(n,e):e instanceof g.mw&&(0,y.e)(n,e,1/256)}}else null!=l&&(0,h.f)(l.slice(i,m),255,255,255,255)}(e,t);const{indices:r,attributes:o,primitiveType:l,material:u}=t.gltf;let i=(0,S.p)(r||o.position.count,l);const f=t.region.start;if(f){const e=i.slice();for(let t=0;t<i.length;t++)e[t]+=f;i=e}e.components.push(new d.Z({faces:i,material:n.get(u),trustSourceNormals:!0}))}function F(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function j(e){return{horizontal:Z(e.s),vertical:Z(e.t)}}function Z(e){switch(e){case I.e8.CLAMP_TO_EDGE:return"clamp";case I.e8.MIRRORED_REPEAT:return"mirror";case I.e8.REPEAT:return"repeat"}}function z(e){return e**(1/R.K)*255}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7483],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),l=i(70586),a=i(35463),o=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),c=i(30556);let d=s=class extends n.wq{static get allTime(){return f}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,l.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,l.R2)(this.start,-1/0,(e=>e.getTime())),i=(0,l.R2)(this.end,1/0,(e=>e.getTime())),r=(0,l.R2)(e.start,-1/0,(e=>e.getTime())),n=(0,l.R2)(e.end,1/0,(e=>e.getTime()));let a,o;if(r>=t&&r<=i?a=r:t>=r&&t<=n&&(a=t),i>=r&&i<=n?o=i:n>=t&&n<=i&&(o=n),null!=a&&null!=o&&!isNaN(a)&&!isNaN(o)){const e=new s;return e.start=a===-1/0?null:new Date(a),e.end=o===1/0?null:new Date(o),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,a.Nm)(r,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,u.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),g=d},5732:(e,t,i)=>{i.d(t,{c:()=>s});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46791:(e,t,i)=>{i.d(t,{Z:()=>O});var s,r=i(43697),n=i(3894),l=i(32448),a=i(22974),o=i(70586),h=i(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var u,c=i(1654),d=i(75215),f=i(58971),p=i(5600),g=i(52421),m=i(52011),y=i(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof L?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,i,s){const r=Math.min(e.length-i,t.length-s);let n=0;for(;n<r&&e[i+n]===t[s+n];)n++;return n}function E(e,t,i,s){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,i.call(s,t,r,n),i,s)}))}const A=new Set,M=new Set,D=new Set,I=new Map;let T=0,L=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:T++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,i.removed=!0,e.splice(e.indexOf(i),1)}}}return this._emitter.on(e,t)}once(e,t){const i=this.on(e,t);return{remove(){i.remove()}}}add(e,t){if((0,f.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,v(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const i=(0,o.j0)(this._splice(0,this.length)),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let i;return(0,f.it)(this._observable),i=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:i})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const i=[];return E(i,this,e,t),new u(i)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const i=this._items.map(e,t);return new u({items:i})}reorder(e,t=this.length-1){(0,f.it)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof u?e.toArray():e,i=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=i.indexOf(s);if(n>-1){const s=1+C(t,i,e+1,n+1),l=this._splice(n,s);l&&l.length>0&&r.push.apply(r,l),e+=s-1}}return this._emitAfterChanges(s.REMOVE),r}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=(0,o.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...i){(0,f.it)(this._observable);const r=(t?s.REMOVE:0)|(i.length?s.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=s.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=l.length;i<r;i++)n=l[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(i,1),s.splice(e,0,n),e+=1,i-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let i=0;i<t;i++)e.reset(l[i]),this.emit("after-remove",e);_.release(e)}}if(i&&i.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const a=_.acquire();a.target=this,a.cancellable=!1;for(const o of i)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),a.reset(o),this.emit("after-add",a));_.release(a),_.release(r)}else{if(l)for(const e of i)s.push(e);else s.splice(e,0,...i);this._set("length",s.length)}}return(i&&i.length||l&&l.length)&&this._notifyChangeEvent(i,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=_.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,_.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),M.clear(),D.clear();for(const{added:t,removed:i}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)A.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||A.add(e);if(i)if(0===D.size&&0===A.size)for(const e of i)M.add(e);else for(const e of i)A.has(e)?A.delete(e):(D.delete(e),M.add(e))}const i=n.Z.acquire();A.forEach((e=>{i.push(e)}));const s=n.Z.acquire();M.forEach((e=>{s.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(i.length||s.length||a.length)){const e={target:this,added:i,removed:s,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}n.Z.release(i),n.Z.release(s),n.Z.release(a)}A.clear(),M.clear(),D.clear()}};L.ofType=e=>{if(!e)return u;if(I.has(e))return I.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends u{};return(0,r._)([(0,g.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],i.prototype,"itemType",void 0),i=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],i),I.set(e,i),i},(0,r._)([(0,p.Cb)()],L.prototype,"length",void 0),(0,r._)([(0,p.Cb)()],L.prototype,"items",null),L=u=(0,r._)([(0,m.j)("esri.core.Collection")],L);const O=L},57435:(e,t,i)=>{i.d(t,{Z:()=>h});var s=i(43697),r=i(46791),n=(i(80442),i(20102),i(92604),i(26258),i(87538)),l=i(5600),a=i(52011);let o=class extends r.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new r.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(i(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],o);const h=o},52421:(e,t,i)=>{function s(e){return(t,i)=>{t[i]=e}}i.d(t,{c:()=>s})},70921:(e,t,i)=>{i.d(t,{R:()=>n,Z:()=>r});var s=i(46791);function r(e,t,i=s.Z){return t||(t=new i),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function n(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var s=i(66643),r=i(46791),n=i(83379);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?l(...t):r.Z.isCollection(t)?t.forEach((e=>l(e))):n.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,s.UI)(i,(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}},17445:(e,t,i)=>{i.d(t,{N1:()=>d,YP:()=>o,Z_:()=>g,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var s=i(91460),r=i(50758),n=i(70586),l=i(95330),a=i(26258);function o(e,t,i={}){return u(e,t,i,f)}function h(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let r=null;const l=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,l,i.sync,i.equals),i.initial){const t=e();l(t,t)}return r}function c(e,t,i,l={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),l.onListenerRemove?.(a),a=null,h=null)}function d(e){l.once&&l.once&&(0,n.hw)(u),i(e)}const f=o(e,((e,i)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,r.kB)((()=>{f.remove(),c()})),u}function d(e,t){return function(e,t,i){if((0,l.Hc)(i))return Promise.reject((0,l.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function o(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,l.fu)(i,(()=>{o(),n((0,l.zE)())})),u(e,(e=>{o(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(87538);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:l,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[l](s[n]()+t*a)}return s}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var s=i(43697),r=i(57435),n=i(68668),l=i(16453),a=i(17445),o=i(5600),h=(i(75215),i(67676),i(80442),i(1153)),u=i(52011),c=i(30556),d=i(87085),f=i(71612),p=i(38009),g=i(16859),m=i(72965),y=i(87344),_=i(46791),b=i(70921),v=i(92604),w=i(95330);function C(e,t,i){let s,r;if(e)for(let n=0,l=e.length;n<l;n++){if(s=e.getItemAt(n),s[t]===i)return s;if("group"===s?.type&&(r=C(s.layers,t,i),r))return r}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new _.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||v.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,b.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof d.Z){const s=e;s.parent===this?this.reorder(s,t):i.add(s,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):v.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;let s=i.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(i.add(e,s),s+=1):this.reorder(e,s)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,s._)([(0,o.Cb)()],t.prototype,"layers",null),t=(0,s._)([(0,u.j)("esri.support.LayersMixin")],t),t};function A(e,t,i){if(e)for(let s=0,r=e.length;s<r;s++){const r=e.getItemAt(s);if(r[t]===i)return r;if("group"===r?.type){const e=A(r.tables,t,i);if(e)return e}}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new _.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&v.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,b.Z)(e,this._get("tables")))}findTableById(e){return A(this.tables,"id",e)}findTableByUid(e){return A(this.tables,"uid",e)}};return(0,s._)([(0,o.Cb)()],t.prototype,"tables",null),t=(0,s._)([(0,u.j)("esri.support.TablesMixin")],t),t};var D=i(15650);let I=class extends((0,f.h)((0,m.M)((0,p.q)((0,g.I)(M(E((0,l.R)(d.Z)))))))){constructor(e){var t;super(e),this.allLayers=new r.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new r.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,i,s){const r=[];if(!e)return r;e.forEach((e=>{const t=(0,D.Nw)(e,s.webmap?s.webmap.getLayerJSONFromResourceInfo(e):null,s);null!=t&&t.layerType&&r.push(t)})),t.layers=r}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:y.T},e)),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,h.vw)(this).initialized)return;const i=this.layers;let s=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!s&&(s=i.getItemAt(0),s.visible=!0),this._turnOffOtherLayers(s);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,s._)([(0,o.Cb)({readOnly:!0,dependsOn:[]})],I.prototype,"allLayers",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],I.prototype,"allTables",void 0),(0,s._)([(0,o.Cb)()],I.prototype,"fullExtent",void 0),(0,s._)([(0,o.Cb)({json:{read:!0,write:!0}})],I.prototype,"blendMode",void 0),(0,s._)([(0,o.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],I.prototype,"layers",void 0),(0,s._)([(0,c.c)("layers")],I.prototype,"_writeLayers",null),(0,s._)([(0,o.Cb)({type:["GroupLayer"]})],I.prototype,"operationalLayerType",void 0),(0,s._)([(0,o.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"portalItem",null),(0,s._)([(0,o.Cb)()],I.prototype,"spatialReference",void 0),(0,s._)([(0,o.Cb)({json:{read:!1},readOnly:!0,value:"group"})],I.prototype,"type",void 0),(0,s._)([(0,o.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],I.prototype,"visibilityMode",null),I=(0,s._)([(0,u.j)("esri.layers.GroupLayer")],I);const T=I},16859:(e,t,i)=>{i.d(t,{I:()=>C});var s=i(43697),r=i(68773),n=i(40330),l=i(3172),a=i(66643),o=i(20102),h=i(92604),u=i(70586),c=i(95330),d=i(17452),f=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),g=i(52011),m=i(30556),y=i(84230),_=i(65587),b=i(15235),v=i(86082),w=i(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const s=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await s.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.Z.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===i.id;if(s&&i.portal.user)return(0,w.Ss)(i);let r,l;if(s)r=i.portal.url;else try{r=await(0,y.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,d.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await i.reload():(i=new b.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,r=_.Z.getDefault();if(r&&r.loaded&&(0,d.Fv)(r.restUrl)===(0,d.Fv)(s))return r.user;const o=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&s&&!(0,d.tm)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,f.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,s._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},15650:(e,t,i)=>{i.d(t,{Nw:()=>c});var s=i(20102),r=i(22974),n=i(78286),l=i(827),a=i(84230);const o=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),h=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","route","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale)??void 0)}function c(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new s.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?o:"operational-layers"===e.layerContainerType?h:null}(t);return null==i||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),s=i&&i[0]&&i[0].layerDefinition;s&&u(e,s)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,r.d9)(t)),t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8104],{98722:(t,e,n)=>{n.d(e,{Ue:()=>dn,G8:()=>mn});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(48526);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})=>"Slope"===t||"Aspect"===t));return{functions:e,hasBranches:r,hasSurfaceFunction: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.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.map((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)}};(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 b=x;var w=n(63342);let v=class extends b{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,w.M_)(e,{resolution:o})}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],v.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:m,json:{write:!0,name:"rasterFunctionArguments"}})],v.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],v.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],v.prototype,"isGCS",void 0),v=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.AspectFunction")],v);const _=v;var C=n(36030),A=n(35454);const R=new Set(["+","-","*","/","(",")"]);function P(t,e,n,s){if("number"==typeof n&&"number"==typeof s)return n+s;let r;if("number"==typeof n){r=s.length;const t=n;(n=new Float32Array(r)).fill(t)}else if(r=n.length,s.constructor===Number){const t=s;(s=new Float32Array(r)).fill(t)}const o=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(o[e]=n[e]+s[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(o[e]=n[e]-s[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(o[e]=n[e]*s[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&s[e]&&(o[e]=n[e]/s[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return o}function N(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 I(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 F=n(55914);const T=new A.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 S(t,e){if(!(0,F.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.replace(/ /g,"")).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}=I(r);if(s=P(t,r[n],o[e],o[e+1]),1===r.length)break;r=N(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 k(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 j=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}})],j.prototype,"bandIndexes",void 0),(0,i._)([(0,C.J)(T)],j.prototype,"method",void 0),j=B=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.BandArithmeticFunctionArguments")],j);const E=j,G=new Set(["vari","mtvi2","rtvi-core","evi"]);let D=class extends b{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0],e=t.clone();return e.pixelType=this.outputPixelType,e.statistics=null,e.histograms=null,e.bandCount="sultan"===this.functionArguments.method?t.bandCount:1,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 S(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=k([e[0],e[1],0]),s="ndxi";break;case"ndwi":n=k([e[1],e[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=k([e[0],e[1],0]),s="sr";break;case"ci-g":case"ci-re":n=k([e[0],e[1],0]),s="ci";break;case"savi":n=k([e[0],e[1],0]),s="savi",r[0]=t[2]+1;break;case"tsavi":n=k([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=k([e[0],e[1],0]),s="msavi";break;case"gemi":n=k([e[0],e[1],0]),s="gemi";break;case"pvi":n=k([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=k([e[0],e[1],e[2]]),s="vari";break;case"mtvi2":n=k([e[0],e[1],e[2]]),s="mtvi2";break;case"rtvi-core":n=k([e[0],e[1],e[2]]),s="rtvicore";break;case"evi":n=k([e[0],e[1],e[2]]),s="evi";break;case"wndwi":n=k([e[0],e[1],0]),s="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=k([e[1],e[0],0]),s="bai";break;default:n=k([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=G.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:E,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 O,Z=n(71715),V=n(93010),L=n(94593);let U=O=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return V.Oi.includes(e)?e:null}readColorRamp(t){return(0,L.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 O({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}})],U.prototype,"colormap",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],U.prototype,"colormapName",void 0),(0,i._)([(0,d.p)("colormapName")],U.prototype,"castColormapName",null),(0,i._)([(0,a.Cb)({types:L.V,json:{write:!0}})],U.prototype,"colorRamp",void 0),(0,i._)([(0,Z.r)("colorRamp")],U.prototype,"readColorRamp",null),(0,i._)([(0,a.Cb)({type:V.H0.apiValues,json:{type:V.H0.jsonValues,write:V.H0.write}})],U.prototype,"colorRampName",void 0),(0,i._)([(0,Z.r)("colorRampName")],U.prototype,"readColorRampName",null),U=O=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ColormapFunctionArguments")],U);const W=U,q=[[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]],X=[[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 H(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 J=class extends b{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=H([[0,0,191,191],[51,0,255,0],[102,255,255,0],[153,255,127,0],[204,191,127,63],[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=H([[0,38,54,41],[69,79,90,82],[131,156,156,156],[256,253,241,253]],[.268,.238,.495]);break;case"ndvi":e=q;break;case"ndvi2":e=function(){const t=H([[0,255,255,255],[70,0,0,255],[80,205,193,173],[100,150,150,150],[110,120,100,51],[130,120,200,100],[140,28,144,3],[160,6,55,0],[180,10,30,25],[201,6,27,7]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=X;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"}})],J.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:W,json:{write:!0,name:"rasterFunctionArguments"}})],J.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],J.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)()],J.prototype,"isNoopProcess",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],J.prototype,"indexedColormap",void 0),J=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ColormapFunction")],J);const Y=J;var $,K=n(30556);let Q=$=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 $({rasters:(0,o.d9)(this.rasters)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"rasters",void 0),(0,i._)([(0,K.c)("rasters")],Q.prototype,"writeRasters",null),Q=$=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")],Q);const tt=Q;let et=class extends b{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}return n.bandCount>1&&(n.colormap=null,n.attributeTable=null),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,F.Gd)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],et.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:tt,json:{write:!0,name:"rasterFunctionArguments"}})],et.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],et.prototype,"rasterArgumentNames",void 0),et=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.CompositeBandFunction")],et);const nt=et,st={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},rt={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},ot={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},it={setNull:50,conditional:78},at={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,...rt,...ot,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,...it};var lt=n(81578);const ut=new Map;function ct(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 pt(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}function ft(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]}}var ht;ut.set(st.none,[0,0,0,0,1,0,0,0,0]),ut.set(st.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),ut.set(st.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),ut.set(st.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),ut.set(st.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),ut.set(st.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),ut.set(st.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),ut.set(st.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),ut.set(st.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),ut.set(st.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),ut.set(st.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),ut.set(st.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),ut.set(st.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),ut.set(st.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]),ut.set(st.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),ut.set(st.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]),ut.set(st.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),ut.set(st.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]),ut.set(st.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),ut.set(st.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),ut.set(st.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),ut.set(st.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),ut.set(st.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let mt=ht=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=ut.get(t);if(!e||t===st.userDefined||t===st.none)return;const n=Math.sqrt(e.length);this._set("kernel",e),this._set("cols",n),this._set("rows",n)}clone(){return new ht({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}})],mt.prototype,"rows",void 0),(0,i._)([(0,a.Cb)({json:{type:Number,write:!0}})],mt.prototype,"cols",void 0),(0,i._)([(0,a.Cb)({json:{name:"type",type:Number,write:!0}})],mt.prototype,"convolutionType",null),(0,i._)([(0,a.Cb)({json:{type:[Number],write:!0}})],mt.prototype,"kernel",void 0),mt=ht=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")],mt);const dt=mt;let gt=class extends b{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:s}=this.functionArguments;if(!Object.values(st).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==st.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=[st.none,st.sharpen,st.sharpen2,st.sharpening3x3,st.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===st.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=ct(r[t],o,i,h,l,e,!0);a=ct(a,o,i,m,l,n,!1),s&&ft(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=pt(s[t],r,o,p,f,a,c);n&&ft(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,lt.r)(this.outputPixelType)}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],gt.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:dt,json:{write:!0,name:"rasterFunctionArguments"}})],gt.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],gt.prototype,"rasterArgumentNames",void 0),gt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ConvolutionFunction")],gt);const yt=gt;var xt;let bt=xt=class extends p{constructor(){super(...arguments),this.bandIds=[],this.missingBandAction=F.CD.bestMatch}clone(){return new xt({bandIds:[...this.bandIds],missingBandAction:this.missingBandAction})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],bt.prototype,"bandIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],bt.prototype,"missingBandAction",void 0),bt=xt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")],bt);const wt=bt;let vt=class extends b{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{bandIds:s,missingBandAction:r}=this.functionArguments;if(r===F.CD.fail&&s.some((t=>t<0||t>=n)))return{success:!1,supportsGPU:!1,error:"extract-band-function: invalid bandIds"};this.outputPixelType=this._getOutputPixelType("f32");const o=e.clone();o.pixelType=this.outputPixelType,o.bandCount=s.length;const{statistics:i,histograms:a}=o;return null!=i&&i.length&&(o.statistics=s.map((t=>i[t]||i[i.length-1]))),null!=a&&a.length&&(o.histograms=s.map((t=>a[t]||a[a.length-1]))),this.rasterInfo=o,{success:!0,supportsGPU:o.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:k(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map((t=>t>=e?e-1:t)).map((e=>t[e]))}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],vt.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:wt,json:{write:!0,name:"rasterFunctionArguments"}})],vt.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],vt.prototype,"rasterArgumentNames",void 0),vt=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.ExtractBandFunction")],vt);const _t=vt;var Ct;let At=Ct=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 Ct({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.d9)(this.rasters)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],At.prototype,"operation",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],At.prototype,"rasters",void 0),(0,i._)([(0,K.c)("rasters")],At.prototype,"writeRasters",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],At.prototype,"processAsMultiband",void 0),At=Ct=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.LocalFunctionArguments")],At);const Rt=At,Pt=new Map;Pt.set(ot.acos,[0,Math.PI]),Pt.set(ot.asin,[-Math.PI/2,Math.PI/2]),Pt.set(ot.atan,[-Math.PI/2,Math.PI/2]),Pt.set(ot.cos,[-1,1]),Pt.set(ot.sin,[-1,1]),Pt.set(rt.booleanAnd,[0,1]),Pt.set(rt.booleanNot,[0,1]),Pt.set(rt.booleanOr,[0,1]),Pt.set(rt.booleanXOr,[0,1]),Pt.set(rt.equalTo,[0,1]),Pt.set(rt.notEqual,[0,1]),Pt.set(rt.greaterThan,[0,1]),Pt.set(rt.greaterThanEqual,[0,1]),Pt.set(rt.lessThan,[0,1]),Pt.set(rt.lessThanEqual,[0,1]),Pt.set(rt.isNull,[0,1]);const Nt=[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 It(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 Ft(t,e,n){const[s]=t,r=s.length,o=g.Z.createEmptyBand("f32",r);return o.set(s),o}function Tt(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 St(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 kt(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 Mt(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 Bt(t,e,n){return Mt(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 Et(t,e,n,s){const r=t[0],o=r.length,i=g.Z.createEmptyBand(n,o);if(s===ot.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===ot.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 Gt(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 Dt(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 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 Ot(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 Zt(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 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 Lt(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,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 qt(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 Xt(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 Ht(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 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]=s[t]===r[t]?1:0);return i}function Yt(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 $t(t,e,n){return Yt(t,e,n,10)}function Kt(t,e,n){return Yt(t,e,n,2)}function Qt(t,e,n){return Yt(t,e,n,Math.E)}function te(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 ee(t,e,n){return te(t,e,n,Math.log10)}function ne(t,e,n){return te(t,e,n,Math.log2)}function se(t,e,n){return te(t,e,n,Math.log)}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,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 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]<=r[t]?1:0);return i}function le(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 ue(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 pe(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 fe(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 he(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 me(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 de(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 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);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 ye(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 xe(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 be(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 we(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 ve(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 _e(t,e,n){const s=t.length;if(s<=2)return ve(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 Ce(t,e,n){const s=t.length;if(s<=2)return ve(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 Ae(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 Re=new Map,Pe=new Map,Ne=new Map,Ie=new Map;function Fe(t,e,n,s){let[r,o]=(0,lt.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 Te=class extends b{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=Nt[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 Pt.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={}){Re.size||(Re.set(4,Math.sqrt),Re.set(6,Math.acos),Re.set(7,Math.asin),Re.set(8,Math.atan),Re.set(9,Math.atanh),Re.set(10,Math.abs),Re.set(21,Math.cos),Re.set(22,Math.cosh),Re.set(48,Math.floor),Re.set(49,Math.ceil),Re.set(51,Math.sin),Re.set(52,Math.sinh),Re.set(56,Math.tan),Re.set(57,Math.tanh),Re.set(59,Math.acosh),Re.set(60,Math.asinh),Re.set(65,Math.floor),Pe.set(5,Math.pow),Pe.set(61,Math.atan2),Ne.set(1,It),Ne.set(2,Tt),Ne.set(3,St),Ne.set(11,zt),Ne.set(12,Ot),Ne.set(12,Ot),Ne.set(13,Zt),Ne.set(14,Vt),Ne.set(15,Lt),Ne.set(16,Ut),Ne.set(17,Wt),Ne.set(18,qt),Ne.set(19,Xt),Ne.set(20,Ht),Ne.set(23,Mt),Ne.set(24,Jt),Ne.set(25,Qt),Ne.set(26,$t),Ne.set(27,Kt),Ne.set(28,re),Ne.set(29,oe),Ne.set(30,kt),Ne.set(31,le),Ne.set(32,Ft),Ne.set(33,ie),Ne.set(34,ae),Ne.set(35,se),Ne.set(36,ee),Ne.set(37,ne),Ne.set(44,ue),Ne.set(45,ce),Ne.set(46,pe),Ne.set(64,Bt),Ne.set(65,jt),Ne.set(76,he),Ne.set(78,he),Ie.set(38,_e),Ie.set(39,me),Ie.set(40,ye),Ie.set(41,we),Ie.set(42,de),Ie.set(43,Ce),Ie.set(47,ge),Ie.set(54,be),Ie.set(55,xe),Ie.set(58,Ae),Ie.set(66,_e),Ie.set(67,me),Ie.set(68,ye),Ie.set(69,we),Ie.set(70,de),Ie.set(71,Ce),Ie.set(72,ge),Ie.set(73,be),Ie.set(74,xe),Ie.set(75,Ae));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=!Ie.has(e)||n.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let n=0;n<i;n++){const i=Ie.has(e)&&!o?t.flatMap((t=>t.pixels)):t.map((t=>t.pixels[n]));let l,u=!0;if(e===it.setNull){const t=fe(i,s,r);l=t.band,s=t.mask,u=!1}else Ne.has(e)?l=Ne.get(e)(i,s,"f64"):Re.has(e)?l=e===ot.asin||e===ot.acos||e===ot.atanh?Et(i,s,"f64",e):Gt(i,s,"f64",Re.get(e)):Pe.has(e)?l=Dt(i,s,"f64",Pe.get(e)):Ie.has(e)?l=Ie.get(e)(i,s,"f64"):(l=i[0],u=!1);if(u&&e!==rt.isNull&&!Pt.has(e)){const t=g.Z.createEmptyBand(r,l.length);s||(s=new Uint8Array(l.length).fill(255)),Fe(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===rt.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=Nt[t],n=Object.keys(at).find((e=>at[e]===t))?.toLowerCase()??"undefined",s=this.outputPixelType??"f32";let[r,o]=(0,lt.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"}})],Te.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Rt,json:{write:!0,name:"rasterFunctionArguments"}})],Te.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Te.prototype,"rasterArgumentNames",void 0),Te=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.LocalFunction")],Te);const Se=Te;var ke,Me=n(22021);let Be=ke=class extends p{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=F.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 ke({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Be.prototype,"includedRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Be.prototype,"noDataValues",void 0),(0,i._)([(0,a.Cb)()],Be.prototype,"normalizedNoDataValues",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Be.prototype,"noDataInterpretation",void 0),Be=ke=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.MaskFunctionArguments")],Be);const je=Be;let Ee=class extends b{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,F.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*F.hd)&&(!s||o&&s[0].length<=F.hd)}}_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===F.DX.matchAll;return(0,F.sS)(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:a,lookups:s})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array(F.hd);n.fill(Me._3),e?.[0]?.length&&n.set(e[0]);const s=new Float32Array(F.hd);for(let e=0;e<s.length;e+=2)s[e]=t?.[e]??-Me._3,s[e+1]=t?.[e+1]??Me._3;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"}})],Ee.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ee.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ee.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ee.prototype,"lookups",void 0),Ee=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.MaskFunction")],Ee);const Ge=Ee;var De;let ze=De=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 De({visibleBandID:t,infraredBandID:e,scientificOutput:n})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],ze.prototype,"visibleBandID",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],ze.prototype,"infraredBandID",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],ze.prototype,"scientificOutput",void 0),ze=De=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.NDVIFunctionArguments")],ze);const Oe=ze;let Ze=class extends b{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const e=this.sourceRasterInfos[0].clone();e.pixelType=this.outputPixelType,e.colormap=null,e.histograms=null,e.bandCount=1;const[n,s,r,o]=t?[-1,1,0,.1]:[0,200,100,10];return e.statistics=[{min:n,max:s,avg:r,stddev:o}],this.rasterInfo=e,{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:k(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"}})],Ze.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:Oe,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.NDVIFunction")],Ze);const Ve=Ze;var Le;let Ue=Le=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Le({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Ue.prototype,"inputRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ue.prototype,"outputValues",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ue.prototype,"noDataRanges",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ue.prototype,"allowUnmatched",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ue.prototype,"isLastInputRangeInclusive",void 0),Ue=Le=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.RemapFunctionArguments")],Ue);const We=Ue;let qe=class extends b{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,F.oB)({srcPixelType:e,inputRanges:o,outputValues:r,noDataRanges:i,allowUnmatched:s,isLastInputRangeInclusive:a,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!r||r.length<=F.hd)&&(!i||i.length<=F.hd)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:n,outputPixelType:s}=this;if(n){const t=(0,F.XV)(e,{lut:[n.lut],offset:n.offset,outputPixelType:s});return null!=t&&n.mask&&(t.mask=(0,F.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,F.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*F.hd),r=1e-5,o=this.functionArguments.inputRanges??[],i=this.functionArguments.outputValues??[],a=i.length;for(let t=0;t<F.hd;t++)s[3*t]=o[2*t]??Me._3-1,s[3*t+1]=o[2*t+1]??Me._3,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*F.hd);return l.fill(Me._3),e?.length&&l.set(e),{allowUnmatched:t,rangeMaps:s,noDataRanges:l,clampRange:(0,lt.r)(this.outputPixelType)}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],qe.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:We,json:{write:!0,name:"rasterFunctionArguments"}})],qe.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],qe.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],qe.prototype,"lookup",void 0),qe=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.RemapFunction")],qe);const Xe=qe;var He;const Je=new A.X({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let Ye=He=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new He({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i._)([(0,C.J)(Je)],Ye.prototype,"slopeType",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],Ye.prototype,"zFactor",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"psPower",write:!0}})],Ye.prototype,"pixelSizePower",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"psZFactor",write:!0}})],Ye.prototype,"pixelSizeFactor",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],Ye.prototype,"removeEdgeEffect",void 0),Ye=He=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.SlopeFunctionArguments")],Ye);const $e=Ye;let Ke=class extends b{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,w.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?900900900900901e-20*t:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:s??0}}};(0,i._)([(0,a.Cb)({json:{write:!0,name:"rasterFunction"}})],Ke.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:$e,json:{write:!0,name:"rasterFunctionArguments"}})],Ke.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],Ke.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Ke.prototype,"isGCS",void 0),Ke=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.SlopeFunction")],Ke);const Qe=Ke;var tn;let en=tn=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 tn({statistics:(0,o.d9)(this.statistics),histograms:(0,o.d9)(this.histograms)})}};(0,i._)([(0,a.Cb)({json:{write:!0}})],en.prototype,"statistics",void 0),(0,i._)([(0,Z.r)("statistics")],en.prototype,"readStatistics",null),(0,i._)([(0,K.c)("statistics")],en.prototype,"writeStatistics",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],en.prototype,"histograms",void 0),en=tn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")],en);const nn=en;let sn=class extends b{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"}})],sn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:nn,json:{write:!0,name:"rasterFunctionArguments"}})],sn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],sn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],sn.prototype,"indexedColormap",void 0),(0,i._)([(0,a.Cb)()],sn.prototype,"isNoopProcess",void 0),sn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")],sn);const rn=sn;var on;const an=new A.X({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let ln=on=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 on({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}})],ln.prototype,"computeGamma",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"dra",write:!0}})],ln.prototype,"dynamicRangeAdjustment",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],ln.prototype,"gamma",void 0),(0,i._)([(0,a.Cb)()],ln.prototype,"histograms",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ln.prototype,"maxPercent",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ln.prototype,"minPercent",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ln.prototype,"numberOfStandardDeviations",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"max",write:!0}})],ln.prototype,"outputMax",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{name:"min",write:!0}})],ln.prototype,"outputMin",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ln.prototype,"sigmoidStrengthLevel",void 0),(0,i._)([(0,a.Cb)({json:{type:[[Number]],write:!0}})],ln.prototype,"statistics",void 0),(0,i._)([(0,K.c)("statistics")],ln.prototype,"writeStatistics",null),(0,i._)([(0,C.J)(an)],ln.prototype,"stretchType",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ln.prototype,"useGamma",void 0),ln=on=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StretchFunctionArguments")],ln);const un=ln;var cn=n(15612);let pn=class extends b{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,cn.AV)(n.toJSON(),{rasterInfo:t}),i=this._isOutputRoundingNeeded()?"round":"float";this.lookup=(0,cn.hE)({pixelType:e,...s,gamma:o?r:null,rounding:i}),this.cutOffs=s}else s||(this.cutOffs=(0,cn.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,F.XV)(e,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:s}=this,r=this.cutOffs||(0,cn.AV)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:e}),o=s.useGamma?s.gamma:null;return(0,cn.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,cn.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"}})],pn.prototype,"functionName",void 0),(0,i._)([(0,a.Cb)({type:un,json:{write:!0,name:"rasterFunctionArguments"}})],pn.prototype,"functionArguments",void 0),(0,i._)([(0,a.Cb)()],pn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],pn.prototype,"lookup",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],pn.prototype,"cutOffs",void 0),pn=(0,i._)([(0,l.j)("esri.layers.support.rasterFunctions.StretchFunction")],pn);const fn=pn,hn=new Map;function mn(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&&mn(t,e))}))}function dn(t,e){if(e=e??{},"function"in(t=(0,o.d9)(t))&&"arguments"in t&&t.arguments&&(t=function(t,e){e&&bn(t,e);const n={};return _n(t,n),n}(t,e)),"rasterFunction"in t)return xn(t=yn(t),e);throw new r.Z("raster-function-helper","unsupported raster function json.")}function gn(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function yn(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=>gn(t)?yn(t):t));else switch(gn(e)&&(e=yn(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 xn(t,e){const{rasterFunction:n,rasterFunctionArguments:s}=t,o=t.outputPixelType?.toLowerCase();if(null==n||!hn.has(n))throw new r.Z("raster-function-helper",`unsupported raster function: ${n}`);const i=hn.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=xn(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 bn(t,e){if(t&&e)for(const n in t){const s=t[n];s&&"object"==typeof s&&(s.function&&s.arguments?bn(s.arguments,e):"RasterFunctionVariable"===s.type&&null!=e[s.name]&&(s.value=e[s.name]))}}function wn(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t)&&0===t.length)return 0===t.length?null:["number","string"].includes(typeof t[0])?t:t.map((t=>wn(t)));if("value"in t&&["number","string","boolean"].includes(typeof t.value))return t.value;if(!("type"in t))return t;switch(t.type){case"Scalar":return t.value;case"AlgorithmicColorRamp":return vn(t);case"MultiPartColorRamp":return{type:"multipart",colorRamps:t.ArrayOfColorRamp.map(vn)};case"ArgumentArray":return t.elements?.length?"RasterStatistics"===t.elements[0].type?t.elements:"RasterFunctionVariable"===t.elements[0].type?t.elements.map((t=>null!=t.value?wn(t.value):t.name.toLowerCase().includes("raster")?"$$":null)):t:t.elements;default:return t}}function vn(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 _n(t,e){if(!t||!e)return;const{function:n,arguments:s}=t;if(!n||!s)return;e.rasterFunction=n.type.replace("Function",""),e.outputPixelType=n.pixelType;const r={};e.rasterFunctionArguments=r;for(const t in s){const n=s[t];"object"==typeof n&&("function"in n&&n.function&&n.arguments?(e.rasterFunctionArguments[t]={},_n(n,e.rasterFunctionArguments[t])):"value"in n&&(r[t]=wn(n.value)))}switch(r.DEM&&!r.Raster&&(r.Raster=r.DEM,delete r.DEM),e.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)}(r);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(r);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(r);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter((t=>""!==t)).map((t=>Number(t))))}(r)}}hn.set("Aspect",{desc:"Aspect Function",ctor:_,rasterArgumentNames:["raster"]}),hn.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:z,rasterArgumentNames:["raster"]}),hn.set("Colormap",{desc:"Colormap Function",ctor:Y,rasterArgumentNames:["raster"]}),hn.set("CompositeBand",{desc:"CompositeBand Function",ctor:nt,rasterArgumentNames:["rasters"]}),hn.set("Convolution",{desc:"Convolution Function",ctor:yt,rasterArgumentNames:["raster"]}),hn.set("ExtractBand",{desc:"ExtractBand Function",ctor:_t,rasterArgumentNames:["raster"]}),hn.set("Local",{desc:"Local Function",ctor:Se,rasterArgumentNames:["rasters"]}),hn.set("Mask",{desc:"Mask Function",ctor:Ge,rasterArgumentNames:["raster"]}),hn.set("NDVI",{desc:"NDVI Function",ctor:Ve,rasterArgumentNames:["raster"]}),hn.set("Remap",{desc:"Remap Function",ctor:Xe,rasterArgumentNames:["raster"]}),hn.set("Slope",{desc:"Slope Function",ctor:Qe,rasterArgumentNames:["raster"]}),hn.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:rn,rasterArgumentNames:["raster"]}),hn.set("Stretch",{desc:"Stretch Function",ctor:fn,rasterArgumentNames:["raster"]})},73506:(t,e,n)=>{n.d(e,{Hq:()=>Z,Mk:()=>m,P_:()=>V,Qp:()=>L,VO:()=>R,Wt:()=>E,kZ:()=>q,kr:()=>X,nF:()=>N,tB:()=>j,ut:()=>D,zD:()=>A}),n(66577);var s,r,o=n(20102),i=n(70586),a=n(67900),l=n(83305),u=n(44547),c=n(6570),p=n(94139),f=n(38913),h=n(82971);function m(t,e,n){return!(0,u.Up)(t,e,n)}function d(t,e,n){const s=m(t,e,n);if(s&&!(0,u.kR)())throw new o.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 g=(t,e,n,s=0)=>{if(1===n[0])return[0,0];let r=1,o=-1,i=1,a=-1;for(let e=0;e<t.length;e+=2)isNaN(t[e])||(r=r>t[e]?t[e]:r,o=o>t[e]?o:t[e],i=i>t[e+1]?t[e+1]:i,a=a>t[e+1]?a:t[e+1]);const{cols: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},y={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,b=4,w=b,v=new Map,_=new Map,C=500;async function A(){(0,u.kR)()||await(0,u.zD)()}function R(t,e,n,s=null){const r=t.spatialReference;if(r.equals(e))return t;d(r,e,s);const o=n.center,i=new c.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.iV)(i,e,s),p=D(e);let f;if(null==l||null!=p&&l.width>=p){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 P(t,e=.01){return(0,a.c9)(t)?e/(0,a.c9)(t):0}function N(t,e,n=null,s=!0){const r=t.spatialReference;if(r.equals(e))return t;d(r,e,n);const o=(0,u.iV)(t,e,n);return s&&o?(I([t],[o],r,e),o):o}function I(t,e,n,s){const r=z(n,!0),o=z(s,!0),i=P(n,C),a=P(s,C);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 F(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 f=[],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.iV)(new p.Z({x:o,y:m,spatialReference:i}),a);t<=e&&f.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([f[t],h[e]]);return d}(t);if(d(e,n,s)&&r){if(e.isGeographic)return T(t);if(null!=S(e))return T(t)}return function(t){const{points:e}=M(t,null),{inSR:n,outSR:s,datumTransformation:r}=t,o=e.map((t=>new p.Z(t[0],t[1],n))),i=(0,u.iV)(o,s,r);return r&&I(o,i,n,s),i.map((t=>t?[t.x,t.y]:[NaN,NaN]))}(t)}function T(t){const{inSR:e,outSR:n,datumTransformation:s}=t,r=S(e),{points:o,mask:i}=M(t,r);if(!e.isGeographic){const t=e.wkid?l.e.coordsys(e.wkid):l.e.fromString(e.isGeographic?l.f.PE_TYPE_GEOGCS:l.f.PE_TYPE_PROJCS,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.e.geogtran(t.wkid):l.e.fromString(l.f.PE_TYPE_GEOGTRAN,t.wkt);l.h.geogToGeog(e,o.length,o,null,t.isInverse?l.f.PE_TRANSFORM_2_TO_1:l.f.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=S(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.e.coordsys(n.wkid):l.e.fromString(n.isGeographic?l.f.PE_TYPE_GEOGCS:l.f.PE_TYPE_PROJCS,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 S(t,e=!1){let n=t.wkid||t.wkt;if(!n||t.isGeographic)return null;if(n=String(n),v.has(n)){const t=v.get(n);return e?t?.gcs:t?.pcs}const s=t.wkid?l.e.coordsys(t.wkid):l.e.fromString(t.isGeographic?l.f.PE_TYPE_GEOGCS:l.f.PE_TYPE_PROJCS,t.wkt),r=k(s,P(t,1e-4)),o=k(s,0,!0);return v.set(n,{pcs:r,gcs:o}),e?o:r}function k(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){const e=D(t[0].spatialReference);if(t.length<2||null==e)return t[0];const n=P(t[0].spatialReference);if(1===(t=t.filter((t=>t.width>n))).length)return t[0];let{xmin:s,xmax:r,ymin:o,ymax:i}=t[0];for(let n=1;n<t.length;n++){const s=t[n];r=s.xmax+e*n,o=Math.min(o,s.ymin),i=Math.max(i,s.ymax)}return new c.Z({xmin:s,xmax:r,ymin:o,ymax:i,spatialReference:t[0].spatialReference})}function j(t,e,n=null,r=!0){const o=t.spatialReference;if(o.equals(e))return t;const a=Z(t),l=D(o,!0),p=D(e);if(0===a||null==l||null==p){const i=G(t,e,n,r);if(null==l&&null!=p&&Math.abs(i.width-p)<P(e)&&(0,u.kR)()){const n=S(o);if(null!=n&&n.poleLocation===s.None&&t.width<(n.bbox[2]-n.bbox[0])/2)return function(t,e){const n=D(e);if(null==n)return null;let{xmin:s,ymin:r,xmax:o,ymax:i}=t;const a=t.spatialReference,l=new f.Z({spatialReference:a,rings:[[[s,r],[o,r],[o,i],[s,i],[s,r]]]}),p=(0,u.iV)(l,e);if(2!==p.rings.length||!p.rings[0].length||!p.rings[1].length)return null;const{rings:h}=p,m=P(a),d=new c.Z({spatialReference:e});for(let t=0;t<2;t++){s=o=h[t][0][0],r=i=h[t][0][1];for(let e=0;e<h[t].length;e++)s=s>h[t][e][0]?h[t][e][0]:s,o=o<h[t][e][0]?h[t][e][0]:o,r=r>h[t][e][1]?h[t][e][1]:r,i=i<h[t][e][1]?h[t][e][1]:i;if(0===t)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)||i}return i}const h=t.clone().normalize();if(1===h.length&&t.xmax<l&&t.xmax-l/2>P(o)){const{xmin:e,xmax:n}=t;for(let s=0;s<=a;s++){const r=0===s?e:-l/2,i=s===a?n-l*s:l/2;h[s]=new c.Z({xmin:r,xmax:i,ymin:t.ymin,ymax:t.ymax,spatialReference:o})}}return B(h.map((t=>G(t,e,n,r))).filter(i.pC))}function E(t,e,n){if("extent"===t.type){const{xmin:e,ymin:n,xmax:s,ymax:r,spatialReference:o}=t;t=new f.Z({rings:[[[e,r],[s,r],[s,n],[e,n],[e,r]]],spatialReference:o})}return t.spatialReference.equals(e)?t:(d(t.spatialReference,e,n),(0,u.iV)(t,e,n))}function G(t,e,n=null,s=!0,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;d(o,e,n);const i=(0,u.iV)(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=z(o,!0),l=z(e,!0);if(null==a||null==l)return i;const c=P(o,.001),f=P(o,C),h=P(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>f){i.xmin=l[0];const s=[];s.push(new p.Z(t.xmax,t.ymin,o)),s.push(new p.Z(t.xmax,(t.ymin+t.ymax)/2,o)),s.push(new p.Z(t.xmax,t.ymax,o));const r=s.map((t=>N(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmax=Math.max.apply(null,r)}if(r<c&&s>f){i.xmax=l[1];const s=[];s.push(new p.Z(t.xmin,t.ymin,o)),s.push(new p.Z(t.xmin,(t.ymin+t.ymax)/2,o)),s.push(new p.Z(t.xmin,t.ymax,o));const r=s.map((t=>N(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmin=Math.min.apply(null,r)}}else{const t=P(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 D(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*y[t.wkid]||null}function z(t,e=!1){if(t.isGeographic)return[-180,180];const n=D(t,e);return null!=n?[-n/2,n/2]:null}function O(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=D(t.spatialReference);if(null==n)return 0;const s=e?0:-n/2,r=P(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 O(o,s,n,!0)-O(i,s,n,!1)}function V(t){const e=t.storageInfo.origin.x,n=D(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 L(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]:g(s.offsets,r,n,w);const a=(i[0]+i[1])/2,u=t.projectedExtent.spatialReference,c=t.srcBufferExtent.spatialReference;if(e&&(o||a>w)&&(m(u,c,t.datumTransformation)&&(u.isGeographic||S(u)),n=[b,b],s=U({...t,spacing:n}),r={cols:s.size[0]+1,rows:s.size[1]+1},i=g(s.offsets,r,n,w)),s.error=i,n[0]>1&&(s.coefficients=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=S(u);if(null!=e&&!e.isEnvelope){const e=function(t){if(!t||t.isGeographic)return t;const e=String(t.wkid||t.wkt);let n;return _.has(e)?n=_.get(e):(n=(t.wkid?l.e.coordsys(t.wkid):l.e.fromString(l.f.PE_TYPE_PROJCS,t.wkt)).getGeogcs().getCode(),_.set(e,n)),new h.Z({wkid:n})}(u),i=j(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=d(i,a),{xmin:u,ymin:c,xmax:f,ymax:h}=e,m=D(a),g=null!=m&&(t.hasWrapAround||"gcs-shift"===o?.type),y=t.spacing||[x,x],w=y[0]*s.x,v=y[1]*s.y,_=1===y[0],A=Math.ceil((f-u)/w-.1/y[0])+(_?0:1),R=Math.ceil((h-c)/v-.1/y[1])+(_?0:1),N=F({cols:A,rows:R,xmin:u,ymax:h,xres:w,yres:v,inSR:i,outSR:a,datumTransformation:r,preferPE:y[0]<=b,usePixelCenter:_}),I=[];let T,k=0;const M=_?-1:NaN,{xmin:B,xmax:j,ymax:E,width:G,height:z}=n,O=P(a,C),Z=null!=m&&B>0&&j>m/2;let V=!1;if(l){const t=S(i);V=null!=t&&t.poleLocation>0}for(let t=0;t<A;t++){const e=[];for(let n=0;n<R;n++){let s=N[t*R+n];if(g&&s[0]>j&&s[0]>m/2-O?s[0]-=m:g&&0===t&&s[0]<0&&Z&&!o&&(s[0]+=m),!s||isNaN(s[0])||isNaN(s[1]))I.push(M),I.push(M),e.push(null),k++;else{if(o){const t=o.inverseTransform(new p.Z({x:s[0],y:s[1],spatialReference:a}));s=[t.x,t.y]}e.push(s),t>0&&g&&T[n]&&s[0]<T[n][0]&&(s[0]+=m,V&&s[0]>j&&s[0]>m&&(s[0]-=m)),I.push((s[0]-B)/G),I.push((E-s[1])/z)}}T=e}return{offsets:I,error:null,coefficients:null,outofBoundPointCount:k,spacing:y,size:_?[A,R]:[A-1,R-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,x=12*(n*(s-1)+e);for(let t=0;t<3;t++)o[x++]=i[y++]*u+i[y++]*p+i[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=i[y++]*c+i[y++]*f+i[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*u+a[y++]*h+a[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=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 e=t.clone().normalize();return 1===e.length?e[0]:B(e)}function X(t,e,n){const{storageInfo:s,pixelSize:r}=e;let o=0,i=!1;const{pyramidResolutions:l}=s;if(null!=l&&l.length){const s=(t.x+t.y)/2,u=l[l.length-1],c=(u.x+u.y)/2,f=(r.x+r.y)/2;if(s<=f)o=0;else if(s>=c)o=l.length,i=s/c>8;else{let t,e=f;for(let r=1;r<=l.length;r++){if(t=(l[r-1].x+l[r-1].y)/2,s<=t){s===t?o=r:"down"===n?(o=r-1,i=s/e>8):o="up"===n||s-e>t-s||s/e>2?r:r-1;break}e=t}}const h=0===o?r:l[o-1];return i&&Math.min(h.x,h.y)*(0,a.c9)(e.spatialReference)>19567&&(i=!1),{pyramidLevel:o,pyramidResolution:new p.Z({x:h.x,y:h.y,spatialReference:e.spatialReference}),excessiveReading:i}}const u=Math.log(t.x/r.x)/Math.LN2,c=Math.log(t.y/r.y)/Math.LN2,f=e.storageInfo.maximumPyramidLevel||0;o="down"===n?Math.floor(Math.min(u,c)):"up"===n?Math.ceil(Math.max(u,c)):Math.round((u+c)/2),o<0?o=0:o>f&&(i=o>f+3,o=f);const h=2**o;return{pyramidLevel:o,pyramidResolution:new p.Z({x:h*e.nativePixelSize.x,y:h*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:()=>u});var s=n(43697),r=n(5600),o=(n(75215),n(67676),n(80442),n(36030)),i=n(52011),a=n(48700);let l=class extends a.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)}};(0,s._)([(0,o.J)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,s._)([(0,r.Cb)()],l.prototype,"tolerance",void 0),l=(0,s._)([(0,i.j)("esri.layers.support.rasterTransforms.GCSShiftTransform")],l);const u=l},87390:(t,e,n)=>{n.d(e,{Z:()=>d});var s=n(43697),r=(n(66577),n(5600)),o=(n(75215),n(67676),n(80442),n(36030)),i=n(71715),a=n(52011),l=n(30556),u=n(48700),c=n(94139),p=n(6570);function f(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 h(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=>f(t,e,n)));const u=l.map((t=>t.x)),c=l.map((t=>t.y));return new p.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 m=class extends u.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=f(this.forwardCoefficients,t,this.polynomialOrder);return new c.Z({x:e.x,y:e.y,spatialReference:t.spatialReference})}return h(this.forwardCoefficients,t,this.polynomialOrder)}inverseTransform(t){if("point"===t.type){const e=f(this.inverseCoefficients,t,this.polynomialOrder);return new c.Z({x:e.x,y:e.y,spatialReference:t.spatialReference})}return h(this.inverseCoefficients,t,this.polynomialOrder)}};(0,s._)([(0,r.Cb)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,s._)([(0,r.Cb)()],m.prototype,"forwardCoefficients",void 0),(0,s._)([(0,i.r)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,s._)([(0,l.c)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,s._)([(0,r.Cb)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,s._)([(0,i.r)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,s._)([(0,l.c)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,s._)([(0,r.Cb)()],m.prototype,"affectsPixelSize",null),(0,s._)([(0,o.J)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=(0,s._)([(0,a.j)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const d=m},87521:(t,e,n)=>{n.d(e,{j:()=>h,c:()=>m});var s=n(29680),r=n(43697),o=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),i=n(52011),a=n(48700);let l=class extends a.Z{constructor(){super(...arguments),this.type="identity"}};(0,r._)([(0,o.J)({IdentityXform:"identity"})],l.prototype,"type",void 0),l=(0,r._)([(0,i.j)("esri.layers.support.rasterTransforms.IdentityTransform")],l);const u=l;var c=n(87390);const p={GCSShiftXform:s.Z,IdentityXform:u,PolynomialXform:c.Z},f=Object.keys(p);function h(t){const e=t?.type;return!t||f.includes(e)}function m(t){const e=t?.type;if(!e)return null;const n=p[t?.type];if(n){const e=new n;return e.read(t),e}return null}}}]);
|