@arcgis/core 5.2.0-next.73 → 5.2.0-next.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/ViewshedAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
- package/assets/esri/core/workers/chunks/{d3be4d914fc99a1d686c.js → 075e65cc4275ac886f08.js} +1 -1
- package/assets/esri/core/workers/chunks/087bd698b80ca0cea71e.js +1 -0
- package/assets/esri/core/workers/chunks/{b6c7b7b7f87dce5de811.js → 0bf644f93c180a2bc2f8.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
- package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
- package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
- package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
- package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
- package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
- package/assets/esri/core/workers/chunks/1c49c9472167a2e0c923.js +1 -0
- package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
- package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
- package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
- package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
- package/assets/esri/core/workers/chunks/28f87daaba1ae3441364.js +1 -0
- package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
- package/assets/esri/core/workers/chunks/2c31648a4b95275516ee.js +1 -0
- package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
- package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +1 -0
- package/assets/esri/core/workers/chunks/305eea9c1fc4aee3309e.js +1 -0
- package/assets/esri/core/workers/chunks/30818b5ff0ce51b25d6f.js +1 -0
- package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
- package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
- package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
- package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
- package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
- package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
- package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
- package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
- package/assets/esri/core/workers/chunks/{36171c72a3c04b0d13ef.js → 43a65cab888d43954564.js} +1 -1
- package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
- package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
- package/assets/esri/core/workers/chunks/495f90fe3d0ad32bb82d.js +1 -0
- package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +1 -0
- package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
- package/assets/esri/core/workers/chunks/4fe2cca405180af23364.js +1 -0
- package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
- package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
- package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/552d6aecc7d88d16227b.js +1 -0
- package/assets/esri/core/workers/chunks/5627f562dea8bae2f346.js +1 -0
- package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
- package/assets/esri/core/workers/chunks/5e1d84e97de0e662aaa9.js +1 -0
- package/assets/esri/core/workers/chunks/64a1ffc221e5b63b43fb.js +1 -0
- package/assets/esri/core/workers/chunks/{31669511cfddf116d991.js → 66e60351aacbd162775f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c203df41f9d2e4b80889.js → 6743d726e45e7b660505.js} +1 -1
- package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
- package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
- package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
- package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
- package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
- package/assets/esri/core/workers/chunks/762be5d3e6aeaea33f74.js +29 -0
- package/assets/esri/core/workers/chunks/792303e4090c0c70c4ff.js +1 -0
- package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
- package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +1 -0
- package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
- package/assets/esri/core/workers/chunks/81130dbcb738d40f723b.js +1 -0
- package/assets/esri/core/workers/chunks/835af7b4fd92cb4e7af0.js +1 -0
- package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
- package/assets/esri/core/workers/chunks/{96d861265566854760cd.js → 88fd698b940dadcc6dc5.js} +1 -1
- package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
- package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
- package/assets/esri/core/workers/chunks/8f0d4aec8bd3cbfefc40.js +1 -0
- package/assets/esri/core/workers/chunks/{7f208ef75ef2ce0d7cf9.js → 910c93bbbf8113a4a51f.js} +1 -1
- package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +1 -0
- package/assets/esri/core/workers/chunks/{509cfac9e5d86a8ee449.js → 936d44c7bc3a181e64a3.js} +1 -1
- package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +1 -0
- package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +1 -0
- package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
- package/assets/esri/core/workers/chunks/a101152066dd56259619.js +1 -0
- package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +1 -0
- package/assets/esri/core/workers/chunks/a50421fe79f264ae3619.js +1 -0
- package/assets/esri/core/workers/chunks/a6a2a4a2bae0d327d7ed.js +1 -0
- package/assets/esri/core/workers/chunks/a7a7d3289d4ca95f545f.js +1 -0
- package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
- package/assets/esri/core/workers/chunks/aca5c524bd3c955e9243.js +1 -0
- package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
- package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +1 -0
- package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
- package/assets/esri/core/workers/chunks/b78f509fd8e95f728178.js +1 -0
- package/assets/esri/core/workers/chunks/b9c61b20bbc91cb63036.js +1 -0
- package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
- package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
- package/assets/esri/core/workers/chunks/bf3dc3ad8df8488da3f0.js +1 -0
- package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +1 -0
- package/assets/esri/core/workers/chunks/c374e5d5980db74c4aca.js +1 -0
- package/assets/esri/core/workers/chunks/{b9953277d0cd4a01bdc6.js → c37b28f200b704ae6002.js} +1 -1
- package/assets/esri/core/workers/chunks/c67e4a848d41038367b8.js +1 -0
- package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
- package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
- package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
- package/assets/esri/core/workers/chunks/d633e98b0dfa0490e4de.js +1 -0
- package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
- package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
- package/assets/esri/core/workers/chunks/de5013f89f0eae93978f.js +1 -0
- package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
- package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +1 -0
- package/assets/esri/core/workers/chunks/e59101f1d060d0a30a65.js +1 -0
- package/assets/esri/core/workers/chunks/{bee5e738ecf8680909c4.js → eaf26c1cc938789d5336.js} +1 -1
- package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
- package/assets/esri/core/workers/chunks/ee9eb381e675d2d01260.js +1 -0
- package/assets/esri/core/workers/chunks/{014f9fd2818e2c9d9a3b.js → f43a0edf58941e2ac78e.js} +1 -1
- package/assets/esri/core/workers/chunks/f4bc563c71c478d3912f.js +1 -0
- package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
- package/assets/esri/core/workers/chunks/fb0b89bbb4f8607d5f20.js +1 -0
- package/assets/esri/core/workers/chunks/ff890167ff2baabfc4ce.js +1 -0
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/GaussianSplatShadow.glsl.js +4 -5
- package/chunks/OccludedGeometryDepth.glsl.js +5 -0
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/config.js +1 -1
- package/core/importUtils.js +2 -0
- package/geometry/operators/importUtils.js +2 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +17 -15
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +22 -0
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttributeBins.js +1 -1
- package/rest/query/operations/queryPivot.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolylinePlugin.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawToolUtils.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/options/InteractiveToolOptions.d.ts +36 -0
- package/views/interactive/options/InteractiveToolOptions.js +2 -0
- package/views/interactive/sketch/SketchOptions.d.ts +4 -3
- package/views/interactive/sketch/SketchOptions.js +1 -1
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +0 -1
- package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +0 -29
- package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +0 -1
- package/assets/esri/core/workers/chunks/089f8c60e96d920a2cb2.js +0 -1
- package/assets/esri/core/workers/chunks/0c3c311400ee352187ea.js +0 -1
- package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
- package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
- package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
- package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +0 -1
- package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
- package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +0 -1
- package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +0 -1
- package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
- package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +0 -1
- package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +0 -1
- package/assets/esri/core/workers/chunks/259bdacfb7b0f866a8d0.js +0 -1
- package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
- package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
- package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +0 -1
- package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +0 -1
- package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +0 -1
- package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +0 -1
- package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
- package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +0 -1
- package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +0 -1
- package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +0 -1
- package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +0 -1
- package/assets/esri/core/workers/chunks/44b50d4716a2567ab6f1.js +0 -1
- package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
- package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +0 -1
- package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
- package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
- package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
- package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
- package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +0 -1
- package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +0 -1
- package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +0 -1
- package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
- package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
- package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
- package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
- package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +0 -1
- package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +0 -1
- package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +0 -1
- package/assets/esri/core/workers/chunks/73f228d966b89c73c9e9.js +0 -1
- package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
- package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +0 -1
- package/assets/esri/core/workers/chunks/7a143ca61c0a70306185.js +0 -1
- package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
- package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +0 -1
- package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
- package/assets/esri/core/workers/chunks/8c76f31a363dd0c3354d.js +0 -1
- package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
- package/assets/esri/core/workers/chunks/9c57161ad48d8d546dc7.js +0 -1
- package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
- package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
- package/assets/esri/core/workers/chunks/a7f42ada0aa69873a938.js +0 -1
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +0 -1
- package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +0 -1
- package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
- package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
- package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +0 -1
- package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +0 -1
- package/assets/esri/core/workers/chunks/bfb6566c27c09deb0929.js +0 -1
- package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
- package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
- package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +0 -1
- package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +0 -1
- package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +0 -1
- package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
- package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
- package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +0 -1
- package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +0 -1
- package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
- package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +0 -1
- package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
- package/assets/esri/core/workers/chunks/d901f8503a73277cfa58.js +0 -1
- package/assets/esri/core/workers/chunks/da484787bd9fd3b13d15.js +0 -1
- package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
- package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +0 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +0 -1
- package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
- package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
- package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +0 -1
- package/assets/esri/core/workers/chunks/ebd619533be077059494.js +0 -1
- package/assets/esri/core/workers/chunks/f475672ff4c2ec9367c2.js +0 -1
- package/assets/esri/core/workers/chunks/f69329b85b362b349a8c.js +0 -1
- package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
- package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
- package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +0 -1
- package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +0 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
|
@@ -253,4 +253,4 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
|
|
|
253
253
|
calculateOcclusionAndOutputHighlight();
|
|
254
254
|
${(0,c.If)(y,"outputObjectAndLayerIdColor();")}
|
|
255
255
|
}
|
|
256
|
-
`)}},26934(t,e,i){i.d(e,{Q:()=>n});var r=i(49788);function n(t){t.constants.add("alphaCutoff","float",r.Q),t.constants.add("opacityCutoff","float",r.v)}},58243(t,e,i){function r(t,e){e.useFloatBlend?t.code.add("float ditherNoise(vec4 color) { return 0.0; }"):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}i.d(e,{t:()=>r})},63666(t,e,i){i.d(e,{OG:()=>Dt,gP:()=>Rt});var r=i(5482),n=i(69540),s=i(91429);let o=class extends n.Pw{constructor(t){super(t),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(t){return null!=t&&this.row===t.row&&this.rows===t.rows&&this.column===t.column&&this.columns===t.columns}};(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"row",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"column",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"rows",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"columns",void 0),o=(0,r.Cg)([(0,s.$K)("esri.CameraLayout")],o);const a=o;var c=i(69052),h=i(25482),l=i(34727),u=i(56507),d=i(86738),f=i(43937),p=i(36005);let g=class extends((0,n.OU)(h.o)){constructor(...t){super(...t),this.position=new d.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(t,e,i,r){if(t&&"object"==typeof t&&("x"in t||Array.isArray(t))){const n={position:t};return null!=e&&(n.heading=e),null!=i&&(n.tilt=i),null!=r&&(n.fov=r),n}return t}writePosition(t,e,i,r){const n=t.clone();n.x=(0,u.GB)(t.x||0),n.y=(0,u.GB)(t.y||0),n.z=t.hasZ?(0,u.GB)(t.z||0):t.z,e[i]=n.write({},r)}readPosition(t,e){const i=new d.A;return i.read(t,e),i.x=(0,u.GB)(i.x||0),i.y=(0,u.GB)(i.y||0),i.z=i.hasZ?(0,u.GB)(i.z||0):i.z,i}equals(t){return null!=t&&this.tilt===t.tilt&&this.heading===t.heading&&this.fov===t.fov&&this.position.equals(t.position)&&this.layout.equals(t.layout)}};(0,r.Cg)([(0,s.MZ)({type:d.A,json:{write:{isRequired:!0}}})],g.prototype,"position",void 0),(0,r.Cg)([(0,f.K)("position")],g.prototype,"writePosition",null),(0,r.Cg)([(0,p.w)("position")],g.prototype,"readPosition",null),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>c.ie.normalize((0,u.GB)(t)))],g.prototype,"heading",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t),-180,180))],g.prototype,"tilt",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t,55),1,170))],g.prototype,"fov",void 0),(0,r.Cg)([(0,s.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],g.prototype,"layout",void 0),g=(0,r.Cg)([(0,s.$K)("esri.Camera")],g);var m=i(9093),_=i(35522),v=i(51850),y=i(16930),b=(i(48353),i(9762),i(65806)),x=i(27993),w=i(73941),C=(i(19419),i(82919)),M=i(71351);i(91712),i(49718),i(6867),i(16396),(0,v.vt)(),(0,v.vt)(),(0,v.vt)();var T=i(58083),S=i(48163),A=i(5443),E=i(39829),O=i(95108),R=i(37585);function P(t,e,i,r){const n=function(t,e){const i=0===e||2===e?0:1,r=t[e],n=0===e||1===e?1:-1,s=0===i?1:0;return(t,e,o)=>{if(e[i]<r&&o[i]<r)return 1===n?0:1;if(e[i]>r&&o[i]>r)return 1===n?1:0;const a=(o[s]-e[s])/(o[i]-e[i]),c=e[s]+a*(r-e[i]);return t[i]=r,t[s]=c,(e[i]<r?1:-1)*n>0?2:3}}(i,r);if(t.length=0,e.length){1===n(I,e[0],e[0])&&D(t,e[0]);for(let i=0;i<e.length;i++){const r=e[i===e.length-1?0:i+1];switch(n(I,e[i],r)){case 1:D(t,r);break;case 3:D(t,(0,S.o8)(I));break;case 2:D(t,(0,S.o8)(I)),D(t,r)}}}}function D(t,e){0!==t.length&&(0,R.aI)(t.at(-1),e)||t.push(e)}const I=(0,S.vt)();var F=i(11964),N=i(27921);const L=(0,v.vt)(),B=(0,v.vt)();function U(){return{direction:(0,v.vt)(),up:(0,v.vt)()}}function H(t,e,i,r,n){let s=(0,_.S8)(L,t),o=(0,_.Om)(s,r);const a=o>0;o=Math.abs(o),o>.99&&(o=Math.abs((0,_.Om)(e,r)),o<.99?((0,_.C)(s,e),a&&(0,_.hs)(s,s,-1)):s=null);let c=0;if(s){(0,_.hs)(B,r,(0,_.Om)(r,s)),(0,_.Re)(s,s,B);const t=(0,_.Om)(s,n)/((0,_.Bw)(s)*(0,_.Bw)(n));(0,_.$A)(B,s,n),c=((0,_.Om)(B,r)>0?1:-1)*(0,l.KJ)((0,l.XM)(t))}const h=(0,l.KJ)((0,l.XM)(-(0,_.Om)(r,t)/(0,_.Bw)(t)));return i?(i.heading=c,i.tilt=h,i):{heading:c,tilt:h}}function V(t,e,i,r){(0,_.Re)(z,i,e),(0,N.T7)(r,(0,F.LV)(e,z),t)||t===i||(0,_.C)(t,i)}const z=(0,v.vt)(),k=(0,v.fA)(0,1,0),Z=(0,v.fA)(0,0,1),$=(0,m.vt)(),W=(0,v.vt)(),j=(0,v.vt)();function G(t,e,i,r=U()){const{direction:n,up:s}=r;return(0,T.N9)($,-(0,l.kU)(e)),(0,T.eL)($,$,(0,l.kU)(i)),(0,_.Z0)(n,Z,$),(0,_.hs)(n,n,-1),(0,_.Z0)(s,k,$),r}function q(t,e,i,r,n){const s=e.lines[11].direction,o=(n-i.getAltitude(r))/s[2];(0,_.Ln)(t,r,s,o)}const X=(0,v.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){return H(e,i,r,Z,k)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n=G(0,i,r),s=(0,v.vt)();return(0,_.hs)(s,n.direction,-e),(0,_.WQ)(s,s,t),{up:n.up,eye:s,heading:i,tilt:r}},eyeTiltToLookAtTilt:function(t){return(0,l.kU)(t)},headingTiltToDirectionUp:G,lookAtTiltToEyeTilt:function(t){return(0,l.KJ)(t)},toArea:function(t,e){const i=t.frustum,{renderCoordsHelper:r}=t,n=r.getAltitude(e),s=t.spatialReference,o=t.state.camera.eye,a=[],c=i.planes[5];for(let t=0;t<4;t++){const e=i.lines[t];r.intersectInfiniteManifold((0,M.LV)(e.origin,e.direction),n,X)||q(X,i,r,e.endpoint,n),V(X,o,X,c),a.push((0,S.fA)(X[0],X[1]))}return function(t,e,i){const r=t.map(t=>((0,_.hZ)(X,t[0],t[1],0),e.fromRenderCoords(X,X,i),[X[0],X[1]]));return r.length<=2?new E.A({spatialReference:i}):(r.push(r[0].slice()),(0,O.$3)(r)||r.reverse(),new E.A({rings:[r],spatialReference:i}))}(function(t,e){const i=[],r=[];return P(i,t,e,0),P(r,i,e,1),P(i,r,e,2),P(r,i,e,3),r}(a,r.extent),r,s)},toExtent:function(t,e,i,r,n){const s=t.renderSpatialReference,o=t.spatialReference??e.spatialReference;return(0,b.g)(e,W,s),(0,b.g)(e,j,s),W[0]-=i/2,j[0]+=i/2,W[1]-=r/2,j[1]+=r/2,(0,x.F)(W,s,W,o),(0,x.F)(j,s,j,o),n?(n.xmin=W[0],n.ymin=W[1],n.xmax=j[0],n.ymax=j[1],n.spatialReference=o):n=new A.A(W[0],W[1],j[0],j[1],o),n}},Symbol.toStringTag,{value:"Module"}));var Y=i(78955),Q=i(91829),K=i(34304),J=i(17136),tt=i(94008),et=i(28735);class it{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(t){this.renderCoordsHelper=t,this.frustum=(0,C.vt)(),this._points=(0,C.Qy)(),this.lines=new Array(12),this._origin=(0,v.vt)(),this._direction=(0,v.vt)(),this._boundingSphere=new tt.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let t=0;t<12;t++)this.lines[t]={origin:null,direction:(0,v.vt)(),endpoint:null}}update(t){(0,C.ui)(t.viewMatrix,t.projectionMatrix,this.frustum,this._points),(0,_.C)(this._origin,t.eye),(0,_.C)(this._direction,t.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(t){for(let e=0;e<this._points.length;e++)(0,_.C)(this._points[e],t[e]);(0,C.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(t){return(0,C.m7)(this.frustum,t)}intersectsRay(t){return(0,C.pw)(this.frustum,t)}intersectsLineSegment(t,e){return(0,C.ST)(this.frustum,t,e)}intersectsPoint(t){return(0,C.bU)(this.frustum,t)}_updateLines(){const t=this._points;for(let e=0;e<4;e++){const i=e+4;rt(this.lines[e],t[e],t[i]),rt(this.lines[e+4],t[e],3===e?t[0]:t[e+1]),rt(this.lines[e+8],t[i],3===e?t[4]:t[i+1])}}_updateBoundingSphere(){const{origin:t}=this,e=st;(0,_.S8)(e,this.direction);const i=nt;(0,_.jb)(i,this.points[4],t);const r=.5*(0,_.Om)(i,i)/(0,_.Om)(e,i),n=this._boundingSphere,s=(0,_.Ln)(ot,t,e,r);n.center=s,n.radius=r}static{this.planePointIndices=C.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function rt(t,e,i){t.origin=e,t.endpoint=i,(0,_.oW)(t.direction,e,i)}const nt=(0,v.vt)(),st=(0,v.vt)(),ot=(0,v.vt)();i(86211);const at=(0,v.fA)(5802e-9,13558e-9,331e-7),ct=(0,v.fA)(65e-8*3,5643e-9,255e-9);(0,v.fA)(at[0]+ct[0],at[1]+ct[1],at[2]+ct[2]);class ht{constructor(t=1/0,e=-1/0){this.near=t,this.far=e}set(t,e){this.near=t,this.far=e}union(t){return null!=t&&(this.near=Math.min(this.near,t.near),this.far=Math.max(this.far,t.far)),this}within(t){return this.near<=t&&t<=this.far}equals(t){return this.near===t.near&&this.far===t.far}static{this.Zero=new ht(0,0)}static{this.Infinite=new ht}}(0,v.vt)(),(0,v.vt)(),new tt.iy,(0,M.vt)(),new A.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var lt=i(32728);const ut=(0,v.fA)(0,0,1),dt=(0,_.S8)((0,v.vt)(),(0,v.fA)(1,1,1)),ft=(0,m.vt)(),pt=(0,v.vt)(),gt=(0,v.vt)();function mt(t,e,i,r=U()){(0,_.$A)(pt,t,ut),0===(0,_.Om)(pt,pt)&&(0,_.$A)(pt,t,dt),(0,T.$0)(ft,-(0,l.kU)(e),t),(0,T.e$)(ft,ft,-(0,l.kU)(i),pt);const{up:n,direction:s}=r;return(0,_.$A)(n,pt,t),(0,_.S8)(n,n),(0,_.Z0)(n,n,ft),(0,_.S8)(s,t),(0,_.ze)(s,s),(0,_.Z0)(s,s,ft),r}function _t(t){const e=t[1];t[1]=-t[2],t[2]=e}function vt(t,e){const i=mt(e,t.heading,t.tilt);return t.up=i.up,t}function yt(t,e){const{renderCoordsHelper:i,state:r}=t;if(1!==r.viewingMode)return 1;const n=i.getAltitude(e),s=i.referenceEllipsoid.radius,o=1+(0,_.Io)(r.camera.eye,e)/(s+n),a=Math.sqrt(o*o-1),{minCurvature:c,maxCurvature:h,minSamples:u,maxSamples:d}=xt,f=(0,l.qE)((a-c)/(h-c),0,1);return Math.round((0,l.Cc)(u,d,f))}function bt(t,e){const i=[],r=[],n=(0,K.FD)();for(let s=0;s<t.length;s++){const o=t[s],a=s===t.length-1?t[0]:t[s+1],c=(0,F.Cr)(o,a,Et),h=(0,N.vE)(e,c.origin,c.vector,0,St);switch(h){case 2:i.push(o);break;case 3:r.push(o);break;case 0:case 1:{const[t,s,a]=0===h?[1,i,r]:[-1,r,i],c=(0,N.Qj)(e),l=(0,_.Ln)((0,v.vt)(),St,c,t*n),u=(0,_.Ln)((0,v.vt)(),St,c,t*-n);s.push(o),s.push(l),a.push(u)}}}const s=[];return i.length&&s.push(i),r.length&&s.push(r),s}const xt={minCurvature:(0,l.kU)(5),maxCurvature:(0,l.kU)(50),minSamples:1,maxSamples:6},wt=(0,v.fA)(1,0,0),Ct=(0,v.fA)(0,1,0),Mt=(0,v.vt)(),Tt=(0,v.vt)(),St=(0,v.vt)(),At=new tt.iy,Et=(0,F.vt)(),Ot=(0,Q.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){const n=pt,s=gt;return(0,_.S8)(n,t),(0,_.$A)(gt,n,ut),0===(0,_.Om)(gt,gt)&&(0,_.$A)(gt,n,dt),(0,_.$A)(s,gt,n),H(e,i,r,n,s)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n={eye:(0,v.vt)(),up:null,tilt:r,heading:i},s=pt;s[0]=t[0],s[1]=t[2],s[2]=-t[1];const o=e,a=(0,l.kU)(i),c=(0,l.kU)(r),h=Math.sin(a),u=Math.cos(a),d=Math.sin(c),f=Math.cos(c),p=(0,_.Bw)(s);let g;if(Math.abs(c)<1e-8)g=o+p;else{const t=p/d,e=(0,l.YN)(o/t),i=Math.PI-c-e;g=t*Math.sin(i)}const m=f*o,y=o*o*(d*d),b=u*u*y,x=g-m,w=x*x,C=b*(b+w-s[1]*s[1]);if(C<0)return(0,_.hs)(n.eye,s,g/p),n.tilt=0,vt(n,t);const M=Math.sqrt(C),T=s[1]*x,S=b+w;let A;if(A=u>0?-M+T:M+T,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=o):(0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t);n.eye[1]=A/S;const E=h*h*y,O=d*o,R=u*O*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,I=Math.sqrt(D),F=b*P+E-2*R*I*x+D*w;return Math.abs(F)<1e-8?((0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t)):(n.eye[0]=(D*(g*s[0]-m*s[0])-O*I*(s[0]*n.eye[1]*u+s[2]*h))/F,n.eye[2]=(D*(g*s[2]-m*s[2])-O*I*(s[2]*n.eye[1]*u-s[0]*h))/F,(0,_.hs)(n.eye,n.eye,g),_t(n.eye),vt(n,t))},eyeTiltToLookAtTilt:function(t,e,i){const r=(0,l.kU)(t),n=(0,_.Bw)(e);return(0,l.YN)(i/(n/Math.sin(r)))+r},getCurvatureSamples:yt,headingTiltToDirectionUp:mt,lookAtTiltToEyeTilt:function(t,e,i){const r=(0,_.Bw)(e),n=Math.sqrt(i*i+r*r-2*i*r*Math.cos(Math.PI-t)),s=(0,l.YN)(i/(n/Math.sin(t)));return(0,l.KJ)(t-s)},toArea:function(t,e){const{renderCoordsHelper:i}=t,r=t.state.camera.clone(),n=new it(i);r.near=2,n.update(r);const s=i.getAltitude(e),o=t.spatialReference,a=r.eye,c=function(t){const{renderCoordsHelper:e,state:i}=t,r=Math.abs(e.getAltitude(i.camera.center));return At.radius=e.referenceEllipsoid.radius+r,i.camera.sphereFrustumCoverage(At,e)}(t),h=yt(t,e),u=r.aboveGround,d=n.planes[5],f=[],p=(0,N.O_)(v.uY,wt,(0,N.vt)()),g=(0,N.O_)(v.uY,Ct,(0,N.vt)());(0,Y.hZ)(Ot,0,0,0,0);const m=t=>{};for(let t=0;t<4;t++){const e=1===t&&!u||3===t&&u?1-c:0,r=1===t&&u||3===t&&!u?c:1,o=n.lines[t],y=n.lines[3===t?0:t+1];for(let n=0;n<h;n++){const c=n/h,u=0===n?0:(0,l.Cc)(e,r,1===t?1-(1-c)**2:3===t?c**2:c),b=(0,_.Cc)(Tt,o.origin,y.origin,u),x=(0,lt.nu)(o.direction,y.direction,u,Mt);i.intersectManifoldClosestSilhouette((0,M.LV)(b,x),s,St),V(St,a,St,d),f.push((0,v.o8)(St)),0!==f.length&&m((0,_.lo)(f.at(-1),St));const w=((0,N.Tj)(p,St)?1:0)|((0,N.Tj)(g,St)?2:0);Ot[w]=1}}f.length>2&&(0,_.lo)(f[0],f.at(-1));const y=function(t,e,i){const r=2*(0,K.FD)();return t.map(t=>{const n=[];let s=!1;for(const o of t)e.fromRenderCoords(o,St,i),Math.abs(o[0])<r&&Math.abs(o[1])<r?(n.push([null,St[1]]),n.push([null,St[1]]),s=!0):n.push([St[0],St[1]]);if(s)for(let t=0;t<n.length;t++){const e=n[t];if(null!=e[0])continue;const i=n[t+1],r=n.at(0===t?-1:t-1);e[0]=r[0],t++;const s=n.at(t===n.length-1?0:t+1);i[0]=s[0]}return n.push(n[0]),(0,O.$3)(n)||n.reverse(),n})}((0,Y.m3)(Ot)>1?function(t,e){const i=[];for(const r of t)i.push(...bt(r,e));return i}(bt(f,p),g):[f],i,o);return new E.A({rings:y,spatialReference:o})},toExtent:function(t,e,i,r,n){let s,o,a,h;const u=e.latitude,d=(0,w.tO)(t.spatialReference).radius,f=e.longitude,p=function(t,e,i){const r=e/i,n=(0,l.kU)(t),s=Math.sin(r/2),o=Math.cos(n),a=2*(0,l.YN)(Math.sqrt(s*s/(o*o)));return(0,l.KJ)(a)}(u,i,d)/2;s=f-p,o=f+p;const g=(0,l.kU)(u),m=(1+Math.sin(g))/(1-Math.sin(g)),_=(m+1)*Math.tan(r/d/2),v=_*_;function b(t){const e=Math.PI/2;return(t=c.uC.normalize(t,-e))>e&&(t=Math.PI-t),t}if(a=1.5*Math.PI-2*Math.atan(.5*(_+Math.sqrt(4*m+v))),h=a+r/d,a=b(a),h=b(h),h<a){const t=h;h=a,a=t}if(a=Math.max((0,l.KJ)(a),-90),h=Math.min((0,l.KJ)(h),90),o=J.Y_.monotonic(s,o),o-s>180){const t=(o-s-180)/2;s+=t,o-=t}const x=t.spatialReference&&t.spatialReference.isGeographic?t.spatialReference:y.A.WGS84;return n?(n.xmin=s,n.ymin=a,n.xmax=o,n.ymax=h,n.spatialReference=x):n=new A.A(s,a,o,h,x),t.spatialReference&&t.spatialReference.isWebMercator&&(0,et.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Rt={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},Pt=[Rt.FINAL,Rt.COMPOSITE,Rt.OPAQUE,Rt.TRANSPARENT],Dt={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Dt)).concat(Pt),(0,v.vt)()},91712(t,e,i){i.d(e,{A:()=>T});var r=i(5482),n=i(69622),s=i(53966),o=i(34727),a=i(90629),c=i(91429),h=i(58083),l=i(9093),u=i(37585),d=i(48163),f=i(35522),p=i(51850),g=i(78955),m=i(91829),_=i(82919),v=i(71351),y=i(44280);function b(t,e,i){t.worldUpAtPosition(e,x),(0,f.Re)(w,i,e);const r=(0,f.Bw)(w);return 0===r?0:(0,o.XM)((0,f.Om)(w,x)/r)}const x=(0,p.vt)(),w=(0,p.vt)();var C;let M=C=class extends n.A{constructor(t){super(t),this._ray=(0,v.vt)(),this._viewport=(0,m.fA)(0,0,1,1),this._padding=(0,m.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,d.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,l.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,l.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,l.vt)(),this._frustumDirty=!0,this._frustum=(0,_.vt)(),this._fullViewport=(0,m.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,p.vt)(),this._up=(0,p.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return(0,f.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){(0,h.C)(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,h.Qw)((0,l.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,l.vt)()}get viewForward(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=(0,g.hs)((0,m.vt)(),this._viewport,1/this.pixelRatio),e=this._get("screenViewport");return e&&(0,g.aI)(t,e)?e:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=(0,g.hs)((0,m.vt)(),this._padding,1/this.pixelRatio),e=this._get("screenPadding");return e&&(0,g.aI)(t,e)?e:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){(0,g.t2)(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),(0,g.C)(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,h.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,h.B8)((0,l.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,l.vt)()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(e*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovX(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/e)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(i*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovY(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/i)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,f.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,h.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,h.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:e,far:i}=this;return 2*e*i/(i+e-t*(i-e))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,e=this.height,i=this.near*Math.tan(this.fovY/2)*2,r=i*this._aspect,n=i/this.rows,s=r/this.columns,o=-r/2+this.column*s,a=o+s,c=-i/2+this.row*n,u=c+n,d=(0,h.$h)((0,l.vt)(),o*(1+2*this._padding[3]/t),a*(1+2*this._padding[1]/t),c*(1+2*this._padding[2]/e),u*(1+2*this._padding[0]/e),this.near,this.far),f=this._get("projectionMatrix");return f&&(0,h.t2)(f,d)?f:d}copyFrom(t){(0,f.C)(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,(0,g.C)(this._viewport,t.viewport),this.notifyChange("_viewport"),(0,g.C)(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,u.C)(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const e=t;return this._viewDirty=e._viewDirty,this._viewDirty||((0,h.C)(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=e._frustumDirty,this._frustumDirty||((0,_.C)(this._frustum,t.frustum),this._frustumDirty=!1),e._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,h.C)(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new C).copyFrom(this)}equals(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&(0,g.t2)(this._viewport,t.viewport)&&(0,g.t2)(this._padding,t.padding)&&(0,u.t2)(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const e=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||(0,g.hG)(t.screenPadding,this.screenPadding)>=e||(0,g.hG)(this.screenViewport,t.screenViewport)>=e||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;(0,f.jb)(E,t.eye,t.center),(0,f.jb)(O,this.eye,this.center);const i=(0,f.Om)(E,O),r=(0,f.uE)(E),n=(0,f.uE)(O),s=5e-4;return i*i>=(1-1e-10)*r*n&&(0,f.lo)(t.eye,this.eye)<Math.max(r,n)*s*s}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs((0,y.gr)(this.viewForward,(0,f.Re)(E,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,e){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(e||1)))}getScreenCenter(t=(0,a.gs)()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,e=.5,i=.5){return t[0]=this.padding[3]+this.width*e,t[1]=this.padding[2]+this.height*i,t[2]=.5,t}setGLViewport(t){const e=this.viewport,i=this.padding;t.setViewport(e[0]-i[3],e[1]-i[2],e[2]+i[1]+i[3],e[3]+i[0]+i[2])}applyProjection(t,e){t!==S&&(0,f.C)(S,t),S[3]=1,(0,g.Z0)(S,S,this.projectionMatrix);const i=Math.abs(S[3]);(0,f.hs)(S,S,1/i);const r=this.fullViewport;e[0]=(0,o.Cc)(0,r[0]+r[2],.5+.5*S[0]),e[1]=(0,o.Cc)(0,r[1]+r[3],.5+.5*S[1]),e[2]=.5*(S[2]+1),e[3]=i}unapplyProjection(t,e){const i=this.fullViewport;S[0]=(t[0]/(i[0]+i[2])*2-1)*t[3],S[1]=(t[1]/(i[1]+i[3])*2-1)*t[3],S[2]=(2*t[2]-1)*t[3],S[3]=t[3],null!=this.inverseProjectionMatrix&&((0,g.Z0)(S,S,this.inverseProjectionMatrix),e[0]=S[0],e[1]=S[1],e[2]=S[2])}projectToScreen(t,e){return null==this.projectToRenderScreen(t,R)?null:(this.renderToScreen(R,e),e)}projectToRenderScreen(t,e){if(S[0]=t[0],S[1]=t[1],S[2]=t[2],S[3]=1,(0,g.Z0)(S,S,this.viewProjectionMatrix),0===S[3])return null;const i=S;(0,f.hs)(i,i,1/Math.abs(S[3]));const r=this.fullViewport,n=(0,o.Cc)(0,r[0]+r[2],.5+.5*i[0]),s=(0,o.Cc)(0,r[1]+r[3],.5+.5*i[1]);return"x"in e?(e.x=n,e.y=s):(e[0]=n,e[1]=s,e.length>2&&(e[2]=.5*(i[2]+1))),e}unprojectFromScreen(t,e){return this.unprojectFromRenderScreen(this.screenToRender(t,R),e)}unprojectFromRenderScreen(t,e){if((0,h.lw)(A,this.projectionMatrix,this.viewMatrix),!(0,h.B8)(A,A))return null;const i=this.fullViewport;return S[0]=2*(t[0]-i[0])/i[2]-1,S[1]=2*(t[1]-i[1])/i[3]-1,S[2]=2*t[2]-1,S[3]=1,(0,g.Z0)(S,S,A),0===S[3]?null:(e[0]=S[0]/S[3],e[1]=S[1]/S[3],e[2]=S[2]/S[3],e)}constrainWindowSize(t,e,i,r){const n=t*this.pixelRatio,s=e*this.pixelRatio,o=Math.max(n-i/2,0),a=Math.max(this.fullHeight-s-r/2,0),c=-Math.min(n-i/2,0),h=-Math.min(this.fullHeight-s-r/2,0),l=i-c- -Math.min(this.fullWidth-n-i/2,0),u=r-h- -Math.min(s-r/2,0);return[Math.round(o),Math.round(a),Math.round(l),Math.round(u)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,e){const i=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return e[0]=i,e[1]=r,e}renderToScreen(t,e){const i=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;e[0]=i,e[1]=r}sphereFrustumCoverage(t,e){const{center:i,eye:r,distance:n,fovY:s}=this,o=Math.abs(Math.PI/2-b(e,i,r));return t.frustumCoverage(o,n,s)}_computeUpGlobal(){(0,f.Re)(E,this.center,this.eye);const t=(0,f.Bw)(this.center);t<1?(0,f.t2)(this._up,p.Cb)&&((0,f.C)(this._up,p.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,f.Om)(E,this.center))>.9999*(0,f.Bw)(E)*t||((0,f.$A)(O,E,this.center),(0,f.$A)(O,O,E),(0,f.S8)(O,O),(0,f.t2)(this._up,O)||((0,f.C)(this._up,O),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,f.oW)(E,this.eye,this.center),Math.abs(E[2])<=.9999&&((0,f.hs)(E,E,E[2]),(0,f.hZ)(E,-E[0],-E[1],1-E[2]),(0,f.S8)(E,E),(0,f.t2)(this._up,E)||((0,f.C)(this._up,E),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,e,i){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?(0,f.t2)(t,e)||((0,f.C)(e,t),this._markViewDirty(),this.notifyChange(i)):s.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,_.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,h.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewport",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_padding",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_fov",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_nearFar",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewDirty",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewMatrix",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_pixelRatio",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"pixelRatio",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"row",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"column",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_rows",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"rows",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_columns",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"columns",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"eye",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"center",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_center",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"up",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_up",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseViewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewForward",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewUp",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewRight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"nearFar",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"near",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"far",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenViewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenPadding",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"x",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"y",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"width",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"height",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullWidth",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullHeight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_aspect",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"padding",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"projectionMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseProjectionMatrix",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fov",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovX",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovY",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewInverseTransposeMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_projectionMatrixInternal",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"relativeElevation",void 0),M=C=(0,r.Cg)([(0,c.$K)("esri.views.3d.webgl.RenderCamera")],M);const T=M,S=(0,m.vt)(),A=(0,l.vt)(),E=(0,p.vt)(),O=(0,p.vt)(),R=(0,a.r_)()},78607(t,e,i){i.d(e,{A:()=>D});var r=i(5482),n=i(69622),s=i(49186),o=i(36708),a=i(10107),c=i(64108),h=i(63666),l=i(44208),u=i(53966),d=(i(17676),i(94656)),f=i(63907);i(93637),i(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,l.A)("esri-tests-disable-gpu-memory-measurements"),(0,d.en)();(0,d.en)();i(90644);var p=i(25530),g=i(97768),m=i(48852),_=i(42293);const v=!!(0,l.A)("esri-tests-disable-gpu-memory-measurements");class y{constructor(t,e){this._context=t,this._descriptor=e,this.type=2,this._context.instanceCounter.increment(f.vt.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:r,height:n,internalFormat:s,multisampled:o}=e;o?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,s,r,n):i.renderbufferStorage(i.RENDERBUFFER,s,r,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const t=this._descriptor.samples,e=this._context.parameters.maxSamples;return t?Math.min(t,e):e}get usedMemory(){return v?0:(t=this._descriptor).width<=0||t.height<=0||null==t.internalFormat?0:t.width*t.height*(0,_.MW)(t.internalFormat);var t}resize(t,e){const i=this._descriptor;if(i.width===t&&i.height===e)return;i.width=t,i.height=e;const r=this._context.gl;this._context.bindRenderbuffer(this),i.multisampled?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,i.internalFormat,i.width,i.height):r.renderbufferStorage(r.RENDERBUFFER,i.internalFormat,i.width,i.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(f.vt.Renderbuffer,this),this._context=null)}}class b{constructor(t,e,i){if(this._context=t,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,t.instanceCounter.increment(f.vt.FramebufferObject,this),null!=e){const i=function(t,e){return x(e)||w(e)?e:C(e)?new p.A(t,e):function(t){return 3===M(t)||null!=t&&"samples"in t}(e)?new y(t,e):null}(t,e);null!=i&&(this._colorAttachments.set(36064,i),x(i)?this._validateTextureDescriptor(i.descriptor):this._validateRenderbufferDescriptor(i.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=i)if(function(t){return x(t)||C(t)}(i))this._depthStencilTexture=x(i)?i:new p.A(t,i),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=w(i)?i:new y(t,i);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(36064);return x(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((t,e)=>t+e.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(t){this._level!==t&&(this._level=t,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&x(e)?e:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(t,e=36064){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:i}=t;this._validateTextureDescriptor(i),this.detachColorTexture(e)?.dispose(),this._colorAttachments.set(e,t),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e))}detachColorTexture(t=36064){const e=this._colorAttachments.get(t);if(!e)return;const i=x(e);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(i)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),i?e:void 0}detachColorTextures(...t){if(0!==t.length){if(this._glName){const e=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{t.forEach(t=>{x(this._colorAttachments.get(t))?this._framebufferTexture2D(null,t):e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)})})}t.forEach(t=>this._colorAttachments.delete(t))}}setColorTextureTarget(t,e=36064,i=0){const r=this._colorAttachments.get(e);r&&(35866===t?this._framebufferTextureLayer(r.glName,e,36160,i):this._framebufferTexture2D(r.glName,e,t,36160))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:i,dataType:r}=e;34041===i||6402===i?34041!==i||r===f.ld.UNSIGNED_INT_24_8?6402!==i||r===f.ld.UNSIGNED_INT||r===f.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(i))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);const{gl:i}=this._context,r=this._getGLAttachmentPoint(e);i.framebufferRenderbuffer(36160,r,i.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._glName){const{_context:e}=this,i=e.boundFramebuffer;e.bindFramebuffer(this);const{gl:r}=e,n=this._getGLAttachmentPoint(t.descriptor);r.framebufferRenderbuffer(36160,n,r.RENDERBUFFER,null),e.bindFramebuffer(i)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebuffer(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,i,r,n,s,o){(t<0||e<0||n<0||s<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const a=o.descriptor;3553!==o.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||t+i>this.width||e+r>this.height||n+i>a.width||s+r>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,h=c.bindTexture(o,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,s,t,e,i,r),c.bindTexture(h,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,n,s,o){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),o||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,n,s,o)}async readPixelsAsync(t,e,i,r,n,s,o,a){const{gl:c}=this._context,h=m.g.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(h);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),c.readPixels(t,e,i,r,n,s,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l);try{await h.getSubDataAsync(o,void 0,void 0,void 0,a)}finally{h.dispose()}}resize(t,e){if(this.width===t&&this.height===e)return;const i={width:t,height:e};if(T(i,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(i.width,i.height)),this._depthStencilTexture?.resize(i.width,i.height),this._glName&&(T(i,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(i.width,i.height),(0,d.en)())){const{gl:t}=this._context;t.checkFramebufferStatus(36160)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(t=36160){const{gl:e}=this._context;this._glName?e.bindFramebuffer(t,this._glName):(this._glName&&e.deleteFramebuffer(this._glName),this._glName=e.createFramebuffer(),e.bindFramebuffer(t,this._glName),this._initializeAttachments(t))}_initializeAttachments(t=36160){const{gl:e}=this._context;if(this._colorAttachments.forEach((e,i)=>{if(x(e)){const r=S(e);35866===r?this._framebufferTextureLayer(e.glName,i,t):this._framebufferTexture2D(e.glName,i,r,t)}else if(w(e)){const r=this._context.gl;r.framebufferRenderbuffer(t,i,r.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const i=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,i,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,S(this._depthStencilTexture),t)}(0,d.en)()&&e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(t,e=36064,i=3553,r=36160){this._context.gl.framebufferTexture2D(r,e,i,t,this._level)}_framebufferTextureLayer(t,e=36064,i=36160,r=0){this._context.gl.framebufferTextureLayer(i,e,t,this._level,r)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=(0,g.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,g.WD)(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),T(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){T(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case f.SB.DEPTH_COMPONENT16:case f.SB.DEPTH_COMPONENT24:case f.SB.DEPTH_COMPONENT32F:return 36096;case f.iE.DEPTH24_STENCIL8:case f.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(t){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;b._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const e=t-36064;e+1>b._MAX_COLOR_ATTACHMENTS&&u.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(t){return 1===M(t)}function w(t){return 2===M(t)}function C(t){return 0===M(t)}function M(t){return null!=t&&"type"in t?t.type:null}function T(t,e){const i=Math.max(t.width,t.height);if(i>e){u.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const r=e/i;return t.width=Math.round(t.width*r),t.height=Math.round(t.height*r),!1}return!0}function S(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?36096:33306}i(67171),i(79785);var E=i(85079);const O=[new(i(74038)._)("position",2,f.pe.UNSIGNED_SHORT,0,4)];(0,E.Xk)(O),i(66289);const R=new Image;R.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",R.width=5,R.height=5,R.decode();let P=class extends n.A{constructor(t){super(t),this.view=null,this.consumes={required:[]},this.produces=h.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,o.wB)(()=>this.view.ready,t=>{t&&this.view.stage?.renderer.addRenderNode(this)},o.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new s.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const t=this._frameBuffer?.getTexture()?.descriptor,e=this.view.stage.renderer.fboCache.acquire(t?.width??640,t?.height??480,this.produces);return this._bind(e),e}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:t}){var e;t.initializeAndBind(),this.gl.drawBuffers((e=t)?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029])}requestRender(t){switch(t){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(t);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(t){return!!this._dirty&&(this._dirty=!1,!0)}doRender(t){this._frameBuffer=t.find(({name:t})=>t===this.produces);try{return this.render(t)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(t){return null}get input(){return this._frameBuffer}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,r.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,r.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},37957(t,e,i){const r={create:()=>[0,0,0,0,0,0,0,0,0],copy(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8]}};i.d(e,["P",0,r])},48852(t,e,i){i.d(e,{g:()=>f});var r=i(4576),n=i(44208),s=i(53966),o=i(17676),a=i(78659),c=i(34275),h=i(94656),l=i(63907);const u=()=>s.A.getLogger("esri.views.webgl.BufferObject"),d=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(t,e,i){return new f(t,34963,e,i)}static createUniform(t,e,i){return new f(t,35345,e,i)}static createPixelPack(t,e=35041,i){const r=new f(t,35051,e);return i&&r.setSize(i),r}static createPixelUnpack(t,e=35040,i){return new f(t,35052,e,i)}static createTransformFeedback(t,e=35044,i){const r=new f(t,35982,e);return r.setSize(i),r}constructor(t,e,i,r){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,t.instanceCounter.increment(l.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,h.Y2)(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case l.pe.UNSIGNED_INT:return this._sizeBytes/4;case l.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case l.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return d?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(l.vt.BufferObject,this),this._context=null):this._glName&&u().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(34963===this.bufferType&&null!=e)switch(this._indexType=e,e){case l.pe.UNSIGNED_SHORT:t*=2;break;case l.pe.UNSIGNED_INT:t*=4;case l.pe.UNSIGNED_BYTE:}this._setBufferData(t)}setData(t){if(!t)return;const e=t.byteLength;34963===this.bufferType&&((0,c.mg)(t)?this._indexType=l.pe.UNSIGNED_BYTE:(0,c.jq)(t)?this._indexType=l.pe.UNSIGNED_SHORT:(0,c.XJ)(t)&&(this._indexType=l.pe.UNSIGNED_INT)),this._setBufferData(e,t)}setIndexType(t){34963===this.bufferType&&(this._indexType=t)}_setBufferData(t,e=null){this._sizeBytes=t;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const r=this._context.gl;null!=e?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),(0,h.Y2)(r),this._isVAOAware&&this._context.bindVAO(i)}setSubData(t,e,i,r){if(!t)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:s}=this._context;s.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,r-i),(0,h.Y2)(s),this._isVAOAware&&this._context.bindVAO(n)}getSubData(t,e=0,i,n){if(i<0||n<0)return;const s=function(t){return(0,r.Xj)(t)}(t)?t.BYTES_PER_ELEMENT:1;if(s*((i??0)+(n??0))>t.byteLength)return;e+s*(n??0)>this.usedMemory&&u().warn("Potential problem getting subdata: requested data exceeds buffer size!");const o=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),o.getBufferSubData(35982,e,t,i,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),o.getBufferSubData(36662,e,t,i,n),this._context.unbindBuffer(36662))}async getSubDataAsync(t,e=0,i,r,n){if(await this._context.clientWaitAsync((0,a.l5)(10),n),!this._context||!this._glName)throw(0,o.NK)();this.getSubData(t,e,i,r)}}},14113(t,e,i){i.d(e,{Cy:()=>u,N5:()=>a});var r=i(49186),n=(i(44208),i(53966));const s=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(t,e){this._includedModules.has(t)?this._includedModules.get(t):(this._includedModules.set(t,e),t(this.builder,e))}}class a extends o{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new f,this.varyings=new p,this.outputs=new g}get attributeNames(){return this.attributes.names}get builder(){return this}generate(t,e=!1){const i=this.attributes.generateSource(t),r=this.varyings.generateSource(t),n="vertex"===t?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(e),c=this.debugName?`// ${this.debugName}\n`:"",h="vertex"===t?v:_,l=n.constants.generateSource(),u=this.outputs.generateSource(t);return`#version 300 es\n${c}\n${h}\n${l.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${r.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${a.join("\n")}`}generateBind(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return e=>{for(let n=0;n<r;++n)i[n](t,e)}}generateBindPass(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n)=>{for(let s=0;s<r;++s)i[s](t,n,e)}}generateBindDraw(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n,s)=>{for(let o=0;o<r;++o)i[o](t,s,e,n)}}}class c{constructor(t){this._stage=t,this._entries=new Map}add(...t){for(const e of t)this._add(e);return this._stage}get(t){return this._entries.get(t)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new r.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:t,arraySize:e,type:i})=>null!=e?`uniform ${i} ${t}[${e}];`:`uniform ${i} ${t};`)}get entries(){return Array.from(this._entries.values())}}class h{constructor(){this._entries=new Map}add(t,e){if(this._entries.has(t))throw new r.A("shaderbuilder:duplicate-input",`Duplicate input for ${t}`);this._entries.set(t,e)}get(t){const e=this._entries.get(t);if(null==e)throw new r.A("shaderbuilder:input-resolver-error",`No resolver for input ${t} found.`);return e()}}class l{constructor(t){this._stage=t,this._bodies=new Array}add(t){return this._bodies.push(t),this._stage}generateSource(t){if(this._bodies.length>0){const t=[];for(const e of this._bodies)"string"==typeof e?t.push(e):t.push(...e());return[`void main() {\n ${t.join("\n")||""} \n}`]}if(t)throw new r.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(t){this._stage=t,this._entries=new Array}add(t){return this._entries.push(t),this._stage}generateSource(){const t=[];for(const e of this._entries)"string"==typeof e?t.push(e):t.push(...e());return t}}class d extends o{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new m(this),this.inputs=new h}get builder(){return this}}class f{constructor(){this._entries=new Array}add(t,e){this._entries.push([t,e])}generateSource(t){return"fragment"===t?[]:this._entries.map(t=>`in ${t[1]} ${t[0]};`)}get names(){return this._entries.map(([t])=>t)}}class p{constructor(){this._entries=new Map}add(t,e,i){this._entries.has(t)?s().warn(`Ignoring duplicate varying ${e} ${t}`):this._entries.set(t,{type:e,invariant:i?.invariant??!1})}generateSource(t){const e=new Array;return this._entries.forEach((i,r)=>e.push((i.invariant&&"vertex"===t?"invariant ":"")+("int"===i.type?"flat ":"")+("vertex"===t?"out":"in")+` ${i.type} ${r};`)),e}}class g{constructor(){this._entries=new Map}add(t,e,i=0){const r=this._entries.get(i);r?.name!==t||r?.type!==e?this._entries.set(i,{name:t,type:e}):s().warn(`Fragment shader output location ${i} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(t){if("vertex"===t)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const e=new Array;return this._entries.forEach((t,i)=>e.push(`layout(location = ${i}) out ${t.type} ${t.name};`)),e}}class m{constructor(t){this._stage=t,this._entries=new Set}add(t,e,i){let r="ERROR_CONSTRUCTOR_STRING";switch(e){case"float":r=m._numberToFloatStr(i);break;case"int":r=m._numberToIntStr(i);break;case"uint":r=m._numberToUintStr(i);break;case"bool":r=i.toString();break;case"vec2":r=`vec2(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])})`;break;case"vec3":r=`vec3(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])})`;break;case"vec4":r=`vec4(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])}, ${m._numberToFloatStr(i[3])})`;break;case"ivec2":r=`ivec2(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])})`;break;case"ivec3":r=`ivec3(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])})`;break;case"ivec4":r=`ivec4(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])}, ${m._numberToIntStr(i[3])})`;break;case"uvec2":r=`uvec2(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])})`;break;case"uvec3":r=`uvec3(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])})`;break;case"uvec4":r=`uvec4(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])}, ${m._numberToUintStr(i[3])})`;break;case"mat2":case"mat3":case"mat4":r=`${e}(${Array.prototype.map.call(i,t=>m._numberToFloatStr(t)).join(", ")})`}return this._entries.add(`const ${e} ${t} = ${r};`),this._stage}static _numberToIntStr(t){return t.toFixed(0)}static _numberToUintStr(t){return`${t.toFixed(0)}u`}static _numberToFloatStr(t){return Number.isInteger(t)?t.toFixed(1):t.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},79785(t,e,i){i.d(e,{Z:()=>l});var r=i(21818),n=i(53966),s=i(97768),o=i(63907),a=i(42293),c=i(85079);const h=()=>n.A.getLogger("esri.views.webgl.VertexArrayObject");let l=class t{constructor(t,e,i,n,s){this._context=t,this._indexBuffer=i,this._buffers=e instanceof Map?e:new Map([["geometry",e]]),this._baseInstances=null==n?new Map:"number"==typeof n?new Map([["geometry",n]]):n,this.locations=s??(0,r.z)((0,c.Sk)(this._buffers))}get glName(){return this._glName}get context(){return this._context}get buffers(){return(0,r.z)(this._buffers)}buffer(t="geometry"){return this.buffers.get(t)}mutableBuffer(t="geometry"){return this._buffers.get(t)}get indexBuffer(){return this._indexBuffer}getByteLength(t){return this.buffer(t)?.sizeBytes??0}vertexCount(t){const e=this.buffer(t);return e?e.sizeBytes/e.layout[0].stride:0}get usedMemory(){return Array.from(this._buffers.values()).reduce((t,e)=>t+e.usedMemory,this._indexBuffer?.usedMemory??0+145*(this._buffers.size+(this._indexBuffer?1:0)))}dispose(){this._context?(this._buffers.forEach(t=>t.dispose()),this._buffers.clear(),this._indexBuffer=(0,s.WD)(this._indexBuffer),this.disposeVAOOnly()):(this._glName||this._buffers.size>0)&&h().warn("Leaked WebGL VAO")}disposeVAOOnly(){this._context?(this._context.getBoundVAO()===this&&this._context.bindVAO(null),this._glName&&(this._context.gl.deleteVertexArray(this._glName),this._glName=null,this._context.instanceCounter.decrement(o.vt.VertexArrayObject,this)),this._context=null):this._glName&&h().warn("Leaked WebGL VAO")}bind(t=this.locations){const e=this._context.gl;this._glName?e.bindVertexArray(this._glName):(this._context.instanceCounter.increment(o.vt.VertexArrayObject,this),this._glName=e.createVertexArray(),e.bindVertexArray(this._glName),this._bindLayout(t))}_bindLayout(t){const{_buffers:e,_indexBuffer:i}=this;if(e||h().error("Vertex buffer dictionary is empty!"),e.forEach((e,i)=>(0,a.yu)(this._context,t,e,this._baseInstances.get(i)??0)),null!=i){const t=this._context.gl;this._context.gl.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.glName)}}unbind(){this._context.gl.bindVertexArray(null)}shallowCloneWithBaseInstances(e){return new t(this._context,this._buffers,this._indexBuffer,e)}}},66289(t,e,i){i.d(e,{R:()=>n});var r=i(48852);class n extends r.g{constructor(t,e,i,r=35044){super(t,34962,r,i),this.layout=e}}},28449(t,e,i){function r(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],e[r]=s[0];return e}function n(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],s[1]=t[r]-s[0],e[r]=s[1];return e}i.d(e,{Zo:()=>r,jA:()=>n});const s=new Float32Array(2)},90644(t,e,i){function r(t,e,i=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}function n(t,e,i,r,n=32774,s=32774,o=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:r,opRgb:n,opAlpha:s,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}i.d(e,{Ey:()=>b,nk:()=>u,p3:()=>n}),i(4718);const s=r(0,771),o=(r(1,0),r(1,1),r(1,771)),a=n(770,1,771,771),c=n(0,0,768,0),h={face:1029,mode:2305},l={face:1028,mode:2305};function u(t,e,i){return{ref:t,readMask:e,stencilFront:i,stencilBack:i}}function d(t){return C.intern(t)}function f(t){return T.intern(t)}function p(t){return A.intern(t)}function g(t){return O.intern(t)}function m(t){return P.intern(t)}function _(t){return I.intern(t)}function v(t){return N.intern(t)}function y(t){return B.intern(t)}function b(t){return H.intern(t)}class x{constructor(t,e){this._makeKey=t,this._makeRef=e,this._interns=new Map}intern(t){if(!t)return null;const e=this._makeKey(t),i=this._interns;return i.has(e)||i.set(e,this._makeRef(t)),i.get(e)??null}}function w(t){return"["+t.join(",")+"]"}const C=new x(M,t=>({__tag:"Blending",...t}));function M(t){return t?w([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const T=new x(S,t=>({__tag:"Culling",...t}));function S(t){return t?w([t.face,t.mode]):null}const A=new x(E,t=>({__tag:"PolygonOffset",...t}));function E(t){return t?w([t.factor,t.units]):null}const O=new x(R,t=>({__tag:"DepthTest",...t}));function R(t){return t?w([t.func]):null}const P=new x(D,t=>({__tag:"StencilTest",...t}));function D(t){return t?w([t.ref,t.readMask,t.stencilFront.compare,t.stencilFront.fail,t.stencilFront.zFail,t.stencilFront.zPass,t.stencilBack.compare,t.stencilBack.fail,t.stencilBack.zFail,t.stencilBack.zPass]):null}const I=new x(F,t=>({__tag:"DepthWrite",...t}));function F(t){return t?w([t.zNear,t.zFar]):null}const N=new x(L,t=>({__tag:"ColorWrite",...t}));function L(t){return t?w([t.r,t.g,t.b,t.a]):null}const B=new x(U,t=>({__tag:"StencilWrite",...t}));function U(t){return t?w([t.mask]):null}const H=new x(function(t){return t?w([M(t.blending),S(t.culling),E(t.polygonOffset),R(t.depthTest),D(t.stencilTest),F(t.depthWrite),L(t.colorWrite),U(t.stencilWrite)]):null},t=>({blending:d(t.blending),culling:f(t.culling),polygonOffset:p(t.polygonOffset),depthTest:g(t.depthTest),stencilTest:m(t.stencilTest),depthWrite:_(t.depthWrite),colorWrite:v(t.colorWrite),stencilWrite:y(t.stencilWrite)}));i.d(e,["RC",0,o,"T8",0,a,"Uy",0,{zNear:0,zFar:1},"Xt",0,t=>2===t?h:1===t?l:null,"iD",0,s,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,c])},49788(t,e,i){const r=1/255.5,n=1-r;i.d(e,["Q",0,r,"v",0,n])}}]);
|
|
256
|
+
`)}},26934(t,e,i){i.d(e,{Q:()=>n});var r=i(49788);function n(t){t.constants.add("alphaCutoff","float",r.Q),t.constants.add("opacityCutoff","float",r.v)}},58243(t,e,i){function r(t,e){e.useFloatBlend?t.code.add("float ditherNoise(vec4 color) { return 0.0; }"):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}i.d(e,{t:()=>r})},63666(t,e,i){i.d(e,{OG:()=>Dt,gP:()=>Rt});var r=i(5482),n=i(69540),s=i(91429);let o=class extends n.Pw{constructor(t){super(t),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(t){return null!=t&&this.row===t.row&&this.rows===t.rows&&this.column===t.column&&this.columns===t.columns}};(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"row",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"column",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"rows",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],o.prototype,"columns",void 0),o=(0,r.Cg)([(0,s.$K)("esri.CameraLayout")],o);const a=o;var c=i(69052),h=i(25482),l=i(34727),u=i(56507),d=i(86738),f=i(43937),p=i(36005);let g=class extends((0,n.OU)(h.o)){constructor(...t){super(...t),this.position=new d.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new a}normalizeCtorArgs(t,e,i,r){if(t&&"object"==typeof t&&("x"in t||Array.isArray(t))){const n={position:t};return null!=e&&(n.heading=e),null!=i&&(n.tilt=i),null!=r&&(n.fov=r),n}return t}writePosition(t,e,i,r){const n=t.clone();n.x=(0,u.GB)(t.x||0),n.y=(0,u.GB)(t.y||0),n.z=t.hasZ?(0,u.GB)(t.z||0):t.z,e[i]=n.write({},r)}readPosition(t,e){const i=new d.A;return i.read(t,e),i.x=(0,u.GB)(i.x||0),i.y=(0,u.GB)(i.y||0),i.z=i.hasZ?(0,u.GB)(i.z||0):i.z,i}equals(t){return null!=t&&this.tilt===t.tilt&&this.heading===t.heading&&this.fov===t.fov&&this.position.equals(t.position)&&this.layout.equals(t.layout)}};(0,r.Cg)([(0,s.MZ)({type:d.A,json:{write:{isRequired:!0}}})],g.prototype,"position",void 0),(0,r.Cg)([(0,f.K)("position")],g.prototype,"writePosition",null),(0,r.Cg)([(0,p.w)("position")],g.prototype,"readPosition",null),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>c.ie.normalize((0,u.GB)(t)))],g.prototype,"heading",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t),-180,180))],g.prototype,"tilt",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,s.wg)(t=>(0,l.qE)((0,u.GB)(t,55),1,170))],g.prototype,"fov",void 0),(0,r.Cg)([(0,s.MZ)({type:a,nonNullable:!0,json:{read:!1,write:!1}})],g.prototype,"layout",void 0),g=(0,r.Cg)([(0,s.$K)("esri.Camera")],g);var m=i(9093),_=i(35522),v=i(51850),y=i(16930),b=(i(48353),i(9762),i(65806)),x=i(27993),w=i(73941),C=(i(19419),i(82919)),M=i(71351);i(91712),i(49718),i(6867),i(16396),(0,v.vt)(),(0,v.vt)(),(0,v.vt)();var T=i(58083),S=i(48163),A=i(5443),E=i(39829),O=i(95108),R=i(37585);function P(t,e,i,r){const n=function(t,e){const i=0===e||2===e?0:1,r=t[e],n=0===e||1===e?1:-1,s=0===i?1:0;return(t,e,o)=>{if(e[i]<r&&o[i]<r)return 1===n?0:1;if(e[i]>r&&o[i]>r)return 1===n?1:0;const a=(o[s]-e[s])/(o[i]-e[i]),c=e[s]+a*(r-e[i]);return t[i]=r,t[s]=c,(e[i]<r?1:-1)*n>0?2:3}}(i,r);if(t.length=0,e.length){1===n(I,e[0],e[0])&&D(t,e[0]);for(let i=0;i<e.length;i++){const r=e[i===e.length-1?0:i+1];switch(n(I,e[i],r)){case 1:D(t,r);break;case 3:D(t,(0,S.o8)(I));break;case 2:D(t,(0,S.o8)(I)),D(t,r)}}}}function D(t,e){0!==t.length&&(0,R.aI)(t.at(-1),e)||t.push(e)}const I=(0,S.vt)();var F=i(11964),N=i(27921);const L=(0,v.vt)(),B=(0,v.vt)();function U(){return{direction:(0,v.vt)(),up:(0,v.vt)()}}function H(t,e,i,r,n){let s=(0,_.S8)(L,t),o=(0,_.Om)(s,r);const a=o>0;o=Math.abs(o),o>.99&&(o=Math.abs((0,_.Om)(e,r)),o<.99?((0,_.C)(s,e),a&&(0,_.hs)(s,s,-1)):s=null);let c=0;if(s){(0,_.hs)(B,r,(0,_.Om)(r,s)),(0,_.Re)(s,s,B);const t=(0,_.Om)(s,n)/((0,_.Bw)(s)*(0,_.Bw)(n));(0,_.$A)(B,s,n),c=((0,_.Om)(B,r)>0?1:-1)*(0,l.KJ)((0,l.XM)(t))}const h=(0,l.KJ)((0,l.XM)(-(0,_.Om)(r,t)/(0,_.Bw)(t)));return i?(i.heading=c,i.tilt=h,i):{heading:c,tilt:h}}function V(t,e,i,r){(0,_.Re)(z,i,e),(0,N.T7)(r,(0,F.LV)(e,z),t)||t===i||(0,_.C)(t,i)}const z=(0,v.vt)(),k=(0,v.fA)(0,1,0),Z=(0,v.fA)(0,0,1),$=(0,m.vt)(),W=(0,v.vt)(),j=(0,v.vt)();function G(t,e,i,r=U()){const{direction:n,up:s}=r;return(0,T.N9)($,-(0,l.kU)(e)),(0,T.eL)($,$,(0,l.kU)(i)),(0,_.Z0)(n,Z,$),(0,_.hs)(n,n,-1),(0,_.Z0)(s,k,$),r}function q(t,e,i,r,n){const s=e.lines[11].direction,o=(n-i.getAltitude(r))/s[2];(0,_.Ln)(t,r,s,o)}const X=(0,v.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){return H(e,i,r,Z,k)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n=G(0,i,r),s=(0,v.vt)();return(0,_.hs)(s,n.direction,-e),(0,_.WQ)(s,s,t),{up:n.up,eye:s,heading:i,tilt:r}},eyeTiltToLookAtTilt:function(t){return(0,l.kU)(t)},headingTiltToDirectionUp:G,lookAtTiltToEyeTilt:function(t){return(0,l.KJ)(t)},toArea:function(t,e){const i=t.frustum,{renderCoordsHelper:r}=t,n=r.getAltitude(e),s=t.spatialReference,o=t.state.camera.eye,a=[],c=i.planes[5];for(let t=0;t<4;t++){const e=i.lines[t];r.intersectInfiniteManifold((0,M.LV)(e.origin,e.direction),n,X)||q(X,i,r,e.endpoint,n),V(X,o,X,c),a.push((0,S.fA)(X[0],X[1]))}return function(t,e,i){const r=t.map(t=>((0,_.hZ)(X,t[0],t[1],0),e.fromRenderCoords(X,X,i),[X[0],X[1]]));return r.length<=2?new E.A({spatialReference:i}):(r.push(r[0].slice()),(0,O.$3)(r)||r.reverse(),new E.A({rings:[r],spatialReference:i}))}(function(t,e){const i=[],r=[];return P(i,t,e,0),P(r,i,e,1),P(i,r,e,2),P(r,i,e,3),r}(a,r.extent),r,s)},toExtent:function(t,e,i,r,n){const s=t.renderSpatialReference,o=t.spatialReference??e.spatialReference;return(0,b.g)(e,W,s),(0,b.g)(e,j,s),W[0]-=i/2,j[0]+=i/2,W[1]-=r/2,j[1]+=r/2,(0,x.F)(W,s,W,o),(0,x.F)(j,s,j,o),n?(n.xmin=W[0],n.ymin=W[1],n.xmax=j[0],n.ymax=j[1],n.spatialReference=o):n=new A.A(W[0],W[1],j[0],j[1],o),n}},Symbol.toStringTag,{value:"Module"}));var Y=i(78955),Q=i(91829),K=i(34304),J=i(52039),tt=i(94008),et=i(28735);class it{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(t){this.renderCoordsHelper=t,this.frustum=(0,C.vt)(),this._points=(0,C.Qy)(),this.lines=new Array(12),this._origin=(0,v.vt)(),this._direction=(0,v.vt)(),this._boundingSphere=new tt.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let t=0;t<12;t++)this.lines[t]={origin:null,direction:(0,v.vt)(),endpoint:null}}update(t){(0,C.ui)(t.viewMatrix,t.projectionMatrix,this.frustum,this._points),(0,_.C)(this._origin,t.eye),(0,_.C)(this._direction,t.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(t){for(let e=0;e<this._points.length;e++)(0,_.C)(this._points[e],t[e]);(0,C.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(t){return(0,C.m7)(this.frustum,t)}intersectsRay(t){return(0,C.pw)(this.frustum,t)}intersectsLineSegment(t,e){return(0,C.ST)(this.frustum,t,e)}intersectsPoint(t){return(0,C.bU)(this.frustum,t)}_updateLines(){const t=this._points;for(let e=0;e<4;e++){const i=e+4;rt(this.lines[e],t[e],t[i]),rt(this.lines[e+4],t[e],3===e?t[0]:t[e+1]),rt(this.lines[e+8],t[i],3===e?t[4]:t[i+1])}}_updateBoundingSphere(){const{origin:t}=this,e=st;(0,_.S8)(e,this.direction);const i=nt;(0,_.jb)(i,this.points[4],t);const r=.5*(0,_.Om)(i,i)/(0,_.Om)(e,i),n=this._boundingSphere,s=(0,_.Ln)(ot,t,e,r);n.center=s,n.radius=r}static{this.planePointIndices=C.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function rt(t,e,i){t.origin=e,t.endpoint=i,(0,_.oW)(t.direction,e,i)}const nt=(0,v.vt)(),st=(0,v.vt)(),ot=(0,v.vt)();i(86211);const at=(0,v.fA)(5802e-9,13558e-9,331e-7),ct=(0,v.fA)(65e-8*3,5643e-9,255e-9);(0,v.fA)(at[0]+ct[0],at[1]+ct[1],at[2]+ct[2]);class ht{constructor(t=1/0,e=-1/0){this.near=t,this.far=e}set(t,e){this.near=t,this.far=e}union(t){return null!=t&&(this.near=Math.min(this.near,t.near),this.far=Math.max(this.far,t.far)),this}within(t){return this.near<=t&&t<=this.far}equals(t){return this.near===t.near&&this.far===t.far}static{this.Zero=new ht(0,0)}static{this.Infinite=new ht}}(0,v.vt)(),(0,v.vt)(),new tt.iy,(0,M.vt)(),new A.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var lt=i(32728);const ut=(0,v.fA)(0,0,1),dt=(0,_.S8)((0,v.vt)(),(0,v.fA)(1,1,1)),ft=(0,m.vt)(),pt=(0,v.vt)(),gt=(0,v.vt)();function mt(t,e,i,r=U()){(0,_.$A)(pt,t,ut),0===(0,_.Om)(pt,pt)&&(0,_.$A)(pt,t,dt),(0,T.$0)(ft,-(0,l.kU)(e),t),(0,T.e$)(ft,ft,-(0,l.kU)(i),pt);const{up:n,direction:s}=r;return(0,_.$A)(n,pt,t),(0,_.S8)(n,n),(0,_.Z0)(n,n,ft),(0,_.S8)(s,t),(0,_.ze)(s,s),(0,_.Z0)(s,s,ft),r}function _t(t){const e=t[1];t[1]=-t[2],t[2]=e}function vt(t,e){const i=mt(e,t.heading,t.tilt);return t.up=i.up,t}function yt(t,e){const{renderCoordsHelper:i,state:r}=t;if(1!==r.viewingMode)return 1;const n=i.getAltitude(e),s=i.referenceEllipsoid.radius,o=1+(0,_.Io)(r.camera.eye,e)/(s+n),a=Math.sqrt(o*o-1),{minCurvature:c,maxCurvature:h,minSamples:u,maxSamples:d}=xt,f=(0,l.qE)((a-c)/(h-c),0,1);return Math.round((0,l.Cc)(u,d,f))}function bt(t,e){const i=[],r=[],n=(0,K.FD)();for(let s=0;s<t.length;s++){const o=t[s],a=s===t.length-1?t[0]:t[s+1],c=(0,F.Cr)(o,a,Et),h=(0,N.vE)(e,c.origin,c.vector,0,St);switch(h){case 2:i.push(o);break;case 3:r.push(o);break;case 0:case 1:{const[t,s,a]=0===h?[1,i,r]:[-1,r,i],c=(0,N.Qj)(e),l=(0,_.Ln)((0,v.vt)(),St,c,t*n),u=(0,_.Ln)((0,v.vt)(),St,c,t*-n);s.push(o),s.push(l),a.push(u)}}}const s=[];return i.length&&s.push(i),r.length&&s.push(r),s}const xt={minCurvature:(0,l.kU)(5),maxCurvature:(0,l.kU)(50),minSamples:1,maxSamples:6},wt=(0,v.fA)(1,0,0),Ct=(0,v.fA)(0,1,0),Mt=(0,v.vt)(),Tt=(0,v.vt)(),St=(0,v.vt)(),At=new tt.iy,Et=(0,F.vt)(),Ot=(0,Q.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(t,e,i,r){const n=pt,s=gt;return(0,_.S8)(n,t),(0,_.$A)(gt,n,ut),0===(0,_.Om)(gt,gt)&&(0,_.$A)(gt,n,dt),(0,_.$A)(s,gt,n),H(e,i,r,n,s)},eyeForCenterWithHeadingTilt:function(t,e,i,r){const n={eye:(0,v.vt)(),up:null,tilt:r,heading:i},s=pt;s[0]=t[0],s[1]=t[2],s[2]=-t[1];const o=e,a=(0,l.kU)(i),c=(0,l.kU)(r),h=Math.sin(a),u=Math.cos(a),d=Math.sin(c),f=Math.cos(c),p=(0,_.Bw)(s);let g;if(Math.abs(c)<1e-8)g=o+p;else{const t=p/d,e=(0,l.YN)(o/t),i=Math.PI-c-e;g=t*Math.sin(i)}const m=f*o,y=o*o*(d*d),b=u*u*y,x=g-m,w=x*x,C=b*(b+w-s[1]*s[1]);if(C<0)return(0,_.hs)(n.eye,s,g/p),n.tilt=0,vt(n,t);const M=Math.sqrt(C),T=s[1]*x,S=b+w;let A;if(A=u>0?-M+T:M+T,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=o):(0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t);n.eye[1]=A/S;const E=h*h*y,O=d*o,R=u*O*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,I=Math.sqrt(D),F=b*P+E-2*R*I*x+D*w;return Math.abs(F)<1e-8?((0,_.hs)(n.eye,s,g/p),n.tilt=0,_t(n.eye),vt(n,t)):(n.eye[0]=(D*(g*s[0]-m*s[0])-O*I*(s[0]*n.eye[1]*u+s[2]*h))/F,n.eye[2]=(D*(g*s[2]-m*s[2])-O*I*(s[2]*n.eye[1]*u-s[0]*h))/F,(0,_.hs)(n.eye,n.eye,g),_t(n.eye),vt(n,t))},eyeTiltToLookAtTilt:function(t,e,i){const r=(0,l.kU)(t),n=(0,_.Bw)(e);return(0,l.YN)(i/(n/Math.sin(r)))+r},getCurvatureSamples:yt,headingTiltToDirectionUp:mt,lookAtTiltToEyeTilt:function(t,e,i){const r=(0,_.Bw)(e),n=Math.sqrt(i*i+r*r-2*i*r*Math.cos(Math.PI-t)),s=(0,l.YN)(i/(n/Math.sin(t)));return(0,l.KJ)(t-s)},toArea:function(t,e){const{renderCoordsHelper:i}=t,r=t.state.camera.clone(),n=new it(i);r.near=2,n.update(r);const s=i.getAltitude(e),o=t.spatialReference,a=r.eye,c=function(t){const{renderCoordsHelper:e,state:i}=t,r=Math.abs(e.getAltitude(i.camera.center));return At.radius=e.referenceEllipsoid.radius+r,i.camera.sphereFrustumCoverage(At,e)}(t),h=yt(t,e),u=r.aboveGround,d=n.planes[5],f=[],p=(0,N.O_)(v.uY,wt,(0,N.vt)()),g=(0,N.O_)(v.uY,Ct,(0,N.vt)());(0,Y.hZ)(Ot,0,0,0,0);const m=t=>{};for(let t=0;t<4;t++){const e=1===t&&!u||3===t&&u?1-c:0,r=1===t&&u||3===t&&!u?c:1,o=n.lines[t],y=n.lines[3===t?0:t+1];for(let n=0;n<h;n++){const c=n/h,u=0===n?0:(0,l.Cc)(e,r,1===t?1-(1-c)**2:3===t?c**2:c),b=(0,_.Cc)(Tt,o.origin,y.origin,u),x=(0,lt.nu)(o.direction,y.direction,u,Mt);i.intersectManifoldClosestSilhouette((0,M.LV)(b,x),s,St),V(St,a,St,d),f.push((0,v.o8)(St)),0!==f.length&&m((0,_.lo)(f.at(-1),St));const w=((0,N.Tj)(p,St)?1:0)|((0,N.Tj)(g,St)?2:0);Ot[w]=1}}f.length>2&&(0,_.lo)(f[0],f.at(-1));const y=function(t,e,i){const r=2*(0,K.FD)();return t.map(t=>{const n=[];let s=!1;for(const o of t)e.fromRenderCoords(o,St,i),Math.abs(o[0])<r&&Math.abs(o[1])<r?(n.push([null,St[1]]),n.push([null,St[1]]),s=!0):n.push([St[0],St[1]]);if(s)for(let t=0;t<n.length;t++){const e=n[t];if(null!=e[0])continue;const i=n[t+1],r=n.at(0===t?-1:t-1);e[0]=r[0],t++;const s=n.at(t===n.length-1?0:t+1);i[0]=s[0]}return n.push(n[0]),(0,O.$3)(n)||n.reverse(),n})}((0,Y.m3)(Ot)>1?function(t,e){const i=[];for(const r of t)i.push(...bt(r,e));return i}(bt(f,p),g):[f],i,o);return new E.A({rings:y,spatialReference:o})},toExtent:function(t,e,i,r,n){let s,o,a,h;const u=e.latitude,d=(0,w.tO)(t.spatialReference).radius,f=e.longitude,p=function(t,e,i){const r=e/i,n=(0,l.kU)(t),s=Math.sin(r/2),o=Math.cos(n),a=2*(0,l.YN)(Math.sqrt(s*s/(o*o)));return(0,l.KJ)(a)}(u,i,d)/2;s=f-p,o=f+p;const g=(0,l.kU)(u),m=(1+Math.sin(g))/(1-Math.sin(g)),_=(m+1)*Math.tan(r/d/2),v=_*_;function b(t){const e=Math.PI/2;return(t=c.uC.normalize(t,-e))>e&&(t=Math.PI-t),t}if(a=1.5*Math.PI-2*Math.atan(.5*(_+Math.sqrt(4*m+v))),h=a+r/d,a=b(a),h=b(h),h<a){const t=h;h=a,a=t}if(a=Math.max((0,l.KJ)(a),-90),h=Math.min((0,l.KJ)(h),90),o=J.Y_.monotonic(s,o),o-s>180){const t=(o-s-180)/2;s+=t,o-=t}const x=t.spatialReference&&t.spatialReference.isGeographic?t.spatialReference:y.A.WGS84;return n?(n.xmin=s,n.ymin=a,n.xmax=o,n.ymax=h,n.spatialReference=x):n=new A.A(s,a,o,h,x),t.spatialReference&&t.spatialReference.isWebMercator&&(0,et.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Rt={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},Pt=[Rt.FINAL,Rt.COMPOSITE,Rt.OPAQUE,Rt.TRANSPARENT],Dt={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Dt)).concat(Pt),(0,v.vt)()},91712(t,e,i){i.d(e,{A:()=>T});var r=i(5482),n=i(69622),s=i(53966),o=i(34727),a=i(90629),c=i(91429),h=i(58083),l=i(9093),u=i(37585),d=i(48163),f=i(35522),p=i(51850),g=i(78955),m=i(91829),_=i(82919),v=i(71351),y=i(44280);function b(t,e,i){t.worldUpAtPosition(e,x),(0,f.Re)(w,i,e);const r=(0,f.Bw)(w);return 0===r?0:(0,o.XM)((0,f.Om)(w,x)/r)}const x=(0,p.vt)(),w=(0,p.vt)();var C;let M=C=class extends n.A{constructor(t){super(t),this._ray=(0,v.vt)(),this._viewport=(0,m.fA)(0,0,1,1),this._padding=(0,m.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,d.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,l.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,l.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,l.vt)(),this._frustumDirty=!0,this._frustum=(0,_.vt)(),this._fullViewport=(0,m.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,p.vt)(),this._up=(0,p.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return(0,f.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){(0,h.C)(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,h.Qw)((0,l.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,l.vt)()}get viewForward(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,f.hZ)((0,p.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=(0,g.hs)((0,m.vt)(),this._viewport,1/this.pixelRatio),e=this._get("screenViewport");return e&&(0,g.aI)(t,e)?e:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=(0,g.hs)((0,m.vt)(),this._padding,1/this.pixelRatio),e=this._get("screenPadding");return e&&(0,g.aI)(t,e)?e:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){(0,g.t2)(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),(0,g.C)(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,h.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,h.B8)((0,l.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,l.vt)()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(e*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovX(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/e)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return t=this._fov,e=this.width,i=this.height,2*Math.atan(i*Math.tan(.5*t)/Math.sqrt(e*e+i*i));var t,e,i}set fovY(t){this._fov=function(t,e,i){return 2*Math.atan(Math.sqrt(e*e+i*i)*Math.tan(.5*t)/i)}(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,f.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,h.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,h.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:e,far:i}=this;return 2*e*i/(i+e-t*(i-e))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,e=this.height,i=this.near*Math.tan(this.fovY/2)*2,r=i*this._aspect,n=i/this.rows,s=r/this.columns,o=-r/2+this.column*s,a=o+s,c=-i/2+this.row*n,u=c+n,d=(0,h.$h)((0,l.vt)(),o*(1+2*this._padding[3]/t),a*(1+2*this._padding[1]/t),c*(1+2*this._padding[2]/e),u*(1+2*this._padding[0]/e),this.near,this.far),f=this._get("projectionMatrix");return f&&(0,h.t2)(f,d)?f:d}copyFrom(t){(0,f.C)(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,(0,g.C)(this._viewport,t.viewport),this.notifyChange("_viewport"),(0,g.C)(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,u.C)(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const e=t;return this._viewDirty=e._viewDirty,this._viewDirty||((0,h.C)(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=e._frustumDirty,this._frustumDirty||((0,_.C)(this._frustum,t.frustum),this._frustumDirty=!1),e._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,h.C)(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new C).copyFrom(this)}equals(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&(0,g.t2)(this._viewport,t.viewport)&&(0,g.t2)(this._padding,t.padding)&&(0,u.t2)(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return(0,f.t2)(this.eye,t.eye)&&(0,f.t2)(this.center,t.center)&&(0,f.t2)(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const e=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||(0,g.hG)(t.screenPadding,this.screenPadding)>=e||(0,g.hG)(this.screenViewport,t.screenViewport)>=e||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;(0,f.jb)(E,t.eye,t.center),(0,f.jb)(O,this.eye,this.center);const i=(0,f.Om)(E,O),r=(0,f.uE)(E),n=(0,f.uE)(O),s=5e-4;return i*i>=(1-1e-10)*r*n&&(0,f.lo)(t.eye,this.eye)<Math.max(r,n)*s*s}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs((0,y.gr)(this.viewForward,(0,f.Re)(E,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,e){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(e||1)))}getScreenCenter(t=(0,a.gs)()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,e=.5,i=.5){return t[0]=this.padding[3]+this.width*e,t[1]=this.padding[2]+this.height*i,t[2]=.5,t}setGLViewport(t){const e=this.viewport,i=this.padding;t.setViewport(e[0]-i[3],e[1]-i[2],e[2]+i[1]+i[3],e[3]+i[0]+i[2])}applyProjection(t,e){t!==S&&(0,f.C)(S,t),S[3]=1,(0,g.Z0)(S,S,this.projectionMatrix);const i=Math.abs(S[3]);(0,f.hs)(S,S,1/i);const r=this.fullViewport;e[0]=(0,o.Cc)(0,r[0]+r[2],.5+.5*S[0]),e[1]=(0,o.Cc)(0,r[1]+r[3],.5+.5*S[1]),e[2]=.5*(S[2]+1),e[3]=i}unapplyProjection(t,e){const i=this.fullViewport;S[0]=(t[0]/(i[0]+i[2])*2-1)*t[3],S[1]=(t[1]/(i[1]+i[3])*2-1)*t[3],S[2]=(2*t[2]-1)*t[3],S[3]=t[3],null!=this.inverseProjectionMatrix&&((0,g.Z0)(S,S,this.inverseProjectionMatrix),e[0]=S[0],e[1]=S[1],e[2]=S[2])}projectToScreen(t,e){return null==this.projectToRenderScreen(t,R)?null:(this.renderToScreen(R,e),e)}projectToRenderScreen(t,e){if(S[0]=t[0],S[1]=t[1],S[2]=t[2],S[3]=1,(0,g.Z0)(S,S,this.viewProjectionMatrix),0===S[3])return null;const i=S;(0,f.hs)(i,i,1/Math.abs(S[3]));const r=this.fullViewport,n=(0,o.Cc)(0,r[0]+r[2],.5+.5*i[0]),s=(0,o.Cc)(0,r[1]+r[3],.5+.5*i[1]);return"x"in e?(e.x=n,e.y=s):(e[0]=n,e[1]=s,e.length>2&&(e[2]=.5*(i[2]+1))),e}unprojectFromScreen(t,e){return this.unprojectFromRenderScreen(this.screenToRender(t,R),e)}unprojectFromRenderScreen(t,e){if((0,h.lw)(A,this.projectionMatrix,this.viewMatrix),!(0,h.B8)(A,A))return null;const i=this.fullViewport;return S[0]=2*(t[0]-i[0])/i[2]-1,S[1]=2*(t[1]-i[1])/i[3]-1,S[2]=2*t[2]-1,S[3]=1,(0,g.Z0)(S,S,A),0===S[3]?null:(e[0]=S[0]/S[3],e[1]=S[1]/S[3],e[2]=S[2]/S[3],e)}constrainWindowSize(t,e,i,r){const n=t*this.pixelRatio,s=e*this.pixelRatio,o=Math.max(n-i/2,0),a=Math.max(this.fullHeight-s-r/2,0),c=-Math.min(n-i/2,0),h=-Math.min(this.fullHeight-s-r/2,0),l=i-c- -Math.min(this.fullWidth-n-i/2,0),u=r-h- -Math.min(s-r/2,0);return[Math.round(o),Math.round(a),Math.round(l),Math.round(u)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,e){const i=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return e[0]=i,e[1]=r,e}renderToScreen(t,e){const i=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;e[0]=i,e[1]=r}sphereFrustumCoverage(t,e){const{center:i,eye:r,distance:n,fovY:s}=this,o=Math.abs(Math.PI/2-b(e,i,r));return t.frustumCoverage(o,n,s)}_computeUpGlobal(){(0,f.Re)(E,this.center,this.eye);const t=(0,f.Bw)(this.center);t<1?(0,f.t2)(this._up,p.Cb)&&((0,f.C)(this._up,p.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,f.Om)(E,this.center))>.9999*(0,f.Bw)(E)*t||((0,f.$A)(O,E,this.center),(0,f.$A)(O,O,E),(0,f.S8)(O,O),(0,f.t2)(this._up,O)||((0,f.C)(this._up,O),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,f.oW)(E,this.eye,this.center),Math.abs(E[2])<=.9999&&((0,f.hs)(E,E,E[2]),(0,f.hZ)(E,-E[0],-E[1],1-E[2]),(0,f.S8)(E,E),(0,f.t2)(this._up,E)||((0,f.C)(this._up,E),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,e,i){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?(0,f.t2)(t,e)||((0,f.C)(e,t),this._markViewDirty(),this.notifyChange(i)):s.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,_.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,h.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewport",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_padding",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_fov",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_nearFar",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewDirty",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_viewMatrix",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_pixelRatio",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"pixelRatio",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"row",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"column",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_rows",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"rows",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_columns",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"columns",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"eye",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"center",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_center",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"up",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"_up",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseViewMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewForward",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewUp",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"viewRight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"nearFar",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"near",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"far",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenViewport",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"screenPadding",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"x",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"y",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"width",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"height",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullWidth",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fullHeight",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_aspect",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"padding",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"projectionMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"inverseProjectionMatrix",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fov",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovX",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"fovY",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"viewInverseTransposeMatrix",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"_projectionMatrixInternal",null),(0,r.Cg)([(0,c.MZ)()],M.prototype,"relativeElevation",void 0),M=C=(0,r.Cg)([(0,c.$K)("esri.views.3d.webgl.RenderCamera")],M);const T=M,S=(0,m.vt)(),A=(0,l.vt)(),E=(0,p.vt)(),O=(0,p.vt)(),R=(0,a.r_)()},78607(t,e,i){i.d(e,{A:()=>D});var r=i(5482),n=i(69622),s=i(49186),o=i(36708),a=i(10107),c=i(64108),h=i(63666),l=i(44208),u=i(53966),d=(i(17676),i(94656)),f=i(63907);i(93637),i(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,l.A)("esri-tests-disable-gpu-memory-measurements"),(0,d.en)();(0,d.en)();i(90644);var p=i(25530),g=i(97768),m=i(48852),_=i(42293);const v=!!(0,l.A)("esri-tests-disable-gpu-memory-measurements");class y{constructor(t,e){this._context=t,this._descriptor=e,this.type=2,this._context.instanceCounter.increment(f.vt.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:r,height:n,internalFormat:s,multisampled:o}=e;o?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,s,r,n):i.renderbufferStorage(i.RENDERBUFFER,s,r,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const t=this._descriptor.samples,e=this._context.parameters.maxSamples;return t?Math.min(t,e):e}get usedMemory(){return v?0:(t=this._descriptor).width<=0||t.height<=0||null==t.internalFormat?0:t.width*t.height*(0,_.MW)(t.internalFormat);var t}resize(t,e){const i=this._descriptor;if(i.width===t&&i.height===e)return;i.width=t,i.height=e;const r=this._context.gl;this._context.bindRenderbuffer(this),i.multisampled?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,i.internalFormat,i.width,i.height):r.renderbufferStorage(r.RENDERBUFFER,i.internalFormat,i.width,i.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(f.vt.Renderbuffer,this),this._context=null)}}class b{constructor(t,e,i){if(this._context=t,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,t.instanceCounter.increment(f.vt.FramebufferObject,this),null!=e){const i=function(t,e){return x(e)||w(e)?e:C(e)?new p.A(t,e):function(t){return 3===M(t)||null!=t&&"samples"in t}(e)?new y(t,e):null}(t,e);null!=i&&(this._colorAttachments.set(36064,i),x(i)?this._validateTextureDescriptor(i.descriptor):this._validateRenderbufferDescriptor(i.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=i)if(function(t){return x(t)||C(t)}(i))this._depthStencilTexture=x(i)?i:new p.A(t,i),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=w(i)?i:new y(t,i);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(36064);return x(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((t,e)=>t+e.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(t){this._level!==t&&(this._level=t,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&x(e)?e:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(t,e=36064){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:i}=t;this._validateTextureDescriptor(i),this.detachColorTexture(e)?.dispose(),this._colorAttachments.set(e,t),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e))}detachColorTexture(t=36064){const e=this._colorAttachments.get(t);if(!e)return;const i=x(e);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(i)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),i?e:void 0}detachColorTextures(...t){if(0!==t.length){if(this._glName){const e=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{t.forEach(t=>{x(this._colorAttachments.get(t))?this._framebufferTexture2D(null,t):e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)})})}t.forEach(t=>this._colorAttachments.delete(t))}}setColorTextureTarget(t,e=36064,i=0){const r=this._colorAttachments.get(e);r&&(35866===t?this._framebufferTextureLayer(r.glName,e,36160,i):this._framebufferTexture2D(r.glName,e,t,36160))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:i,dataType:r}=e;34041===i||6402===i?34041!==i||r===f.ld.UNSIGNED_INT_24_8?6402!==i||r===f.ld.UNSIGNED_INT||r===f.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(i))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);const{gl:i}=this._context,r=this._getGLAttachmentPoint(e);i.framebufferRenderbuffer(36160,r,i.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._glName){const{_context:e}=this,i=e.boundFramebuffer;e.bindFramebuffer(this);const{gl:r}=e,n=this._getGLAttachmentPoint(t.descriptor);r.framebufferRenderbuffer(36160,n,r.RENDERBUFFER,null),e.bindFramebuffer(i)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebuffer(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,i,r,n,s,o){(t<0||e<0||n<0||s<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const a=o.descriptor;3553!==o.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||t+i>this.width||e+r>this.height||n+i>a.width||s+r>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,h=c.bindTexture(o,p.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,s,t,e,i,r),c.bindTexture(h,p.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,n,s,o){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),o||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,n,s,o)}async readPixelsAsync(t,e,i,r,n,s,o,a){const{gl:c}=this._context,h=m.g.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(h);const l=this._context.boundFramebuffer;this._context.bindFramebuffer(this),c.readPixels(t,e,i,r,n,s,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l);try{await h.getSubDataAsync(o,void 0,void 0,void 0,a)}finally{h.dispose()}}resize(t,e){if(this.width===t&&this.height===e)return;const i={width:t,height:e};if(T(i,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(i.width,i.height)),this._depthStencilTexture?.resize(i.width,i.height),this._glName&&(T(i,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(i.width,i.height),(0,d.en)())){const{gl:t}=this._context;t.checkFramebufferStatus(36160)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(t=36160){const{gl:e}=this._context;this._glName?e.bindFramebuffer(t,this._glName):(this._glName&&e.deleteFramebuffer(this._glName),this._glName=e.createFramebuffer(),e.bindFramebuffer(t,this._glName),this._initializeAttachments(t))}_initializeAttachments(t=36160){const{gl:e}=this._context;if(this._colorAttachments.forEach((e,i)=>{if(x(e)){const r=S(e);35866===r?this._framebufferTextureLayer(e.glName,i,t):this._framebufferTexture2D(e.glName,i,r,t)}else if(w(e)){const r=this._context.gl;r.framebufferRenderbuffer(t,i,r.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const i=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,i,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,S(this._depthStencilTexture),t)}(0,d.en)()&&e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(t,e=36064,i=3553,r=36160){this._context.gl.framebufferTexture2D(r,e,i,t,this._level)}_framebufferTextureLayer(t,e=36064,i=36160,r=0){this._context.gl.framebufferTextureLayer(i,e,t,this._level,r)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=(0,g.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,g.WD)(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),T(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){T(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case f.SB.DEPTH_COMPONENT16:case f.SB.DEPTH_COMPONENT24:case f.SB.DEPTH_COMPONENT32F:return 36096;case f.iE.DEPTH24_STENCIL8:case f.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(t){if(-1===b._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;b._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const e=t-36064;e+1>b._MAX_COLOR_ATTACHMENTS&&u.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${b._MAX_COLOR_ATTACHMENTS} color attachments`)}}function x(t){return 1===M(t)}function w(t){return 2===M(t)}function C(t){return 0===M(t)}function M(t){return null!=t&&"type"in t?t.type:null}function T(t,e){const i=Math.max(t.width,t.height);if(i>e){u.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const r=e/i;return t.width=Math.round(t.width*r),t.height=Math.round(t.height*r),!1}return!0}function S(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?36096:33306}i(67171),i(79785);var E=i(85079);const O=[new(i(74038)._)("position",2,f.pe.UNSIGNED_SHORT,0,4)];(0,E.Xk)(O),i(66289);const R=new Image;R.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",R.width=5,R.height=5,R.decode();let P=class extends n.A{constructor(t){super(t),this.view=null,this.consumes={required:[]},this.produces=h.gP.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([(0,o.wB)(()=>this.view.ready,t=>{t&&this.view.stage?.renderer.addRenderNode(this)},o.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new s.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const t=this._frameBuffer?.getTexture()?.descriptor,e=this.view.stage.renderer.fboCache.acquire(t?.width??640,t?.height??480,this.produces);return this._bind(e),e}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:t}){var e;t.initializeAndBind(),this.gl.drawBuffers((e=t)?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029])}requestRender(t){switch(t){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(t);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(t){return!!this._dirty&&(this._dirty=!1,!0)}doRender(t){this._frameBuffer=t.find(({name:t})=>t===this.produces);try{return this.render(t)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(t){return null}get input(){return this._frameBuffer}};(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"view",void 0),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"consumes",void 0),(0,r.Cg)([(0,a.MZ)()],P.prototype,"produces",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],P.prototype,"techniques",null),P=(0,r.Cg)([(0,c.$)("esri.views.3d.webgl.RenderNode")],P);const D=P},37957(t,e,i){const r={create:()=>[0,0,0,0,0,0,0,0,0],copy(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8]}};i.d(e,["P",0,r])},48852(t,e,i){i.d(e,{g:()=>f});var r=i(4576),n=i(44208),s=i(53966),o=i(17676),a=i(78659),c=i(34275),h=i(94656),l=i(63907);const u=()=>s.A.getLogger("esri.views.webgl.BufferObject"),d=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(t,e,i){return new f(t,34963,e,i)}static createUniform(t,e,i){return new f(t,35345,e,i)}static createPixelPack(t,e=35041,i){const r=new f(t,35051,e);return i&&r.setSize(i),r}static createPixelUnpack(t,e=35040,i){return new f(t,35052,e,i)}static createTransformFeedback(t,e=35044,i){const r=new f(t,35982,e);return r.setSize(i),r}constructor(t,e,i,r){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,t.instanceCounter.increment(l.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,h.Y2)(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case l.pe.UNSIGNED_INT:return this._sizeBytes/4;case l.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case l.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return d?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(l.vt.BufferObject,this),this._context=null):this._glName&&u().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(34963===this.bufferType&&null!=e)switch(this._indexType=e,e){case l.pe.UNSIGNED_SHORT:t*=2;break;case l.pe.UNSIGNED_INT:t*=4;case l.pe.UNSIGNED_BYTE:}this._setBufferData(t)}setData(t){if(!t)return;const e=t.byteLength;34963===this.bufferType&&((0,c.mg)(t)?this._indexType=l.pe.UNSIGNED_BYTE:(0,c.jq)(t)?this._indexType=l.pe.UNSIGNED_SHORT:(0,c.XJ)(t)&&(this._indexType=l.pe.UNSIGNED_INT)),this._setBufferData(e,t)}setIndexType(t){34963===this.bufferType&&(this._indexType=t)}_setBufferData(t,e=null){this._sizeBytes=t;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const r=this._context.gl;null!=e?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),(0,h.Y2)(r),this._isVAOAware&&this._context.bindVAO(i)}setSubData(t,e,i,r){if(!t)return;const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:s}=this._context;s.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,r-i),(0,h.Y2)(s),this._isVAOAware&&this._context.bindVAO(n)}getSubData(t,e=0,i,n){if(i<0||n<0)return;const s=function(t){return(0,r.Xj)(t)}(t)?t.BYTES_PER_ELEMENT:1;if(s*((i??0)+(n??0))>t.byteLength)return;e+s*(n??0)>this.usedMemory&&u().warn("Potential problem getting subdata: requested data exceeds buffer size!");const o=this._context.gl;35982===this.bufferType?(this._context.bindBuffer(this,35982),o.getBufferSubData(35982,e,t,i,n),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),o.getBufferSubData(36662,e,t,i,n),this._context.unbindBuffer(36662))}async getSubDataAsync(t,e=0,i,r,n){if(await this._context.clientWaitAsync((0,a.l5)(10),n),!this._context||!this._glName)throw(0,o.NK)();this.getSubData(t,e,i,r)}}},14113(t,e,i){i.d(e,{Cy:()=>u,N5:()=>a});var r=i(49186),n=(i(44208),i(53966));const s=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(t,e){this._includedModules.has(t)?this._includedModules.get(t):(this._includedModules.set(t,e),t(this.builder,e))}}class a extends o{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new f,this.varyings=new p,this.outputs=new g}get attributeNames(){return this.attributes.names}get builder(){return this}generate(t,e=!1){const i=this.attributes.generateSource(t),r=this.varyings.generateSource(t),n="vertex"===t?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(e),c=this.debugName?`// ${this.debugName}\n`:"",h="vertex"===t?v:_,l=n.constants.generateSource(),u=this.outputs.generateSource(t);return`#version 300 es\n${c}\n${h}\n${l.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${r.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${a.join("\n")}`}generateBind(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[0];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return e=>{for(let n=0;n<r;++n)i[n](t,e)}}generateBindPass(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[1];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n)=>{for(let s=0;s<r;++s)i[s](t,n,e)}}generateBindDraw(t){const e=new Map;this.vertex.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)}),this.fragment.uniforms.entries.forEach(t=>{const i=t.bind[2];i&&e.set(t.name,i)});const i=Array.from(e.values()),r=i.length;return(e,n,s)=>{for(let o=0;o<r;++o)i[o](t,s,e,n)}}}class c{constructor(t){this._stage=t,this._entries=new Map}add(...t){for(const e of t)this._add(e);return this._stage}get(t){return this._entries.get(t)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new r.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else s().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:t,arraySize:e,type:i})=>null!=e?`uniform ${i} ${t}[${e}];`:`uniform ${i} ${t};`)}get entries(){return Array.from(this._entries.values())}}class h{constructor(){this._entries=new Map}add(t,e){if(this._entries.has(t))throw new r.A("shaderbuilder:duplicate-input",`Duplicate input for ${t}`);this._entries.set(t,e)}get(t){const e=this._entries.get(t);if(null==e)throw new r.A("shaderbuilder:input-resolver-error",`No resolver for input ${t} found.`);return e()}}class l{constructor(t){this._stage=t,this._bodies=new Array}add(t){return this._bodies.push(t),this._stage}generateSource(t){if(this._bodies.length>0){const t=[];for(const e of this._bodies)"string"==typeof e?t.push(e):t.push(...e());return[`void main() {\n ${t.join("\n")||""} \n}`]}if(t)throw new r.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(t){this._stage=t,this._entries=new Array}add(t){return this._entries.push(t),this._stage}generateSource(){const t=[];for(const e of this._entries)"string"==typeof e?t.push(e):t.push(...e());return t}}class d extends o{constructor(){super(...arguments),this.uniforms=new c(this),this.main=new l(this),this.code=new u(this),this.constants=new m(this),this.inputs=new h}get builder(){return this}}class f{constructor(){this._entries=new Array}add(t,e){this._entries.push([t,e])}generateSource(t){return"fragment"===t?[]:this._entries.map(t=>`in ${t[1]} ${t[0]};`)}get names(){return this._entries.map(([t])=>t)}}class p{constructor(){this._entries=new Map}add(t,e,i){this._entries.has(t)?s().warn(`Ignoring duplicate varying ${e} ${t}`):this._entries.set(t,{type:e,invariant:i?.invariant??!1})}generateSource(t){const e=new Array;return this._entries.forEach((i,r)=>e.push((i.invariant&&"vertex"===t?"invariant ":"")+("int"===i.type?"flat ":"")+("vertex"===t?"out":"in")+` ${i.type} ${r};`)),e}}class g{constructor(){this._entries=new Map}add(t,e,i=0){const r=this._entries.get(i);r?.name!==t||r?.type!==e?this._entries.set(i,{name:t,type:e}):s().warn(`Fragment shader output location ${i} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(t){if("vertex"===t)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const e=new Array;return this._entries.forEach((t,i)=>e.push(`layout(location = ${i}) out ${t.type} ${t.name};`)),e}}class m{constructor(t){this._stage=t,this._entries=new Set}add(t,e,i){let r="ERROR_CONSTRUCTOR_STRING";switch(e){case"float":r=m._numberToFloatStr(i);break;case"int":r=m._numberToIntStr(i);break;case"uint":r=m._numberToUintStr(i);break;case"bool":r=i.toString();break;case"vec2":r=`vec2(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])})`;break;case"vec3":r=`vec3(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])})`;break;case"vec4":r=`vec4(${m._numberToFloatStr(i[0])}, ${m._numberToFloatStr(i[1])}, ${m._numberToFloatStr(i[2])}, ${m._numberToFloatStr(i[3])})`;break;case"ivec2":r=`ivec2(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])})`;break;case"ivec3":r=`ivec3(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])})`;break;case"ivec4":r=`ivec4(${m._numberToIntStr(i[0])}, ${m._numberToIntStr(i[1])}, ${m._numberToIntStr(i[2])}, ${m._numberToIntStr(i[3])})`;break;case"uvec2":r=`uvec2(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])})`;break;case"uvec3":r=`uvec3(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])})`;break;case"uvec4":r=`uvec4(${m._numberToUintStr(i[0])}, ${m._numberToUintStr(i[1])}, ${m._numberToUintStr(i[2])}, ${m._numberToUintStr(i[3])})`;break;case"mat2":case"mat3":case"mat4":r=`${e}(${Array.prototype.map.call(i,t=>m._numberToFloatStr(t)).join(", ")})`}return this._entries.add(`const ${e} ${t} = ${r};`),this._stage}static _numberToIntStr(t){return t.toFixed(0)}static _numberToUintStr(t){return`${t.toFixed(0)}u`}static _numberToFloatStr(t){return Number.isInteger(t)?t.toFixed(1):t.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},79785(t,e,i){i.d(e,{Z:()=>l});var r=i(21818),n=i(53966),s=i(97768),o=i(63907),a=i(42293),c=i(85079);const h=()=>n.A.getLogger("esri.views.webgl.VertexArrayObject");let l=class t{constructor(t,e,i,n,s){this._context=t,this._indexBuffer=i,this._buffers=e instanceof Map?e:new Map([["geometry",e]]),this._baseInstances=null==n?new Map:"number"==typeof n?new Map([["geometry",n]]):n,this.locations=s??(0,r.z)((0,c.Sk)(this._buffers))}get glName(){return this._glName}get context(){return this._context}get buffers(){return(0,r.z)(this._buffers)}buffer(t="geometry"){return this.buffers.get(t)}mutableBuffer(t="geometry"){return this._buffers.get(t)}get indexBuffer(){return this._indexBuffer}getByteLength(t){return this.buffer(t)?.sizeBytes??0}vertexCount(t){const e=this.buffer(t);return e?e.sizeBytes/e.layout[0].stride:0}get usedMemory(){return Array.from(this._buffers.values()).reduce((t,e)=>t+e.usedMemory,this._indexBuffer?.usedMemory??0+145*(this._buffers.size+(this._indexBuffer?1:0)))}dispose(){this._context?(this._buffers.forEach(t=>t.dispose()),this._buffers.clear(),this._indexBuffer=(0,s.WD)(this._indexBuffer),this.disposeVAOOnly()):(this._glName||this._buffers.size>0)&&h().warn("Leaked WebGL VAO")}disposeVAOOnly(){this._context?(this._context.getBoundVAO()===this&&this._context.bindVAO(null),this._glName&&(this._context.gl.deleteVertexArray(this._glName),this._glName=null,this._context.instanceCounter.decrement(o.vt.VertexArrayObject,this)),this._context=null):this._glName&&h().warn("Leaked WebGL VAO")}bind(t=this.locations){const e=this._context.gl;this._glName?e.bindVertexArray(this._glName):(this._context.instanceCounter.increment(o.vt.VertexArrayObject,this),this._glName=e.createVertexArray(),e.bindVertexArray(this._glName),this._bindLayout(t))}_bindLayout(t){const{_buffers:e,_indexBuffer:i}=this;if(e||h().error("Vertex buffer dictionary is empty!"),e.forEach((e,i)=>(0,a.yu)(this._context,t,e,this._baseInstances.get(i)??0)),null!=i){const t=this._context.gl;this._context.gl.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.glName)}}unbind(){this._context.gl.bindVertexArray(null)}shallowCloneWithBaseInstances(e){return new t(this._context,this._buffers,this._indexBuffer,e)}}},66289(t,e,i){i.d(e,{R:()=>n});var r=i(48852);class n extends r.g{constructor(t,e,i,r=35044){super(t,34962,r,i),this.layout=e}}},28449(t,e,i){function r(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],e[r]=s[0];return e}function n(t,e){const i=t.length;for(let r=0;r<i;++r)s[0]=t[r],s[1]=t[r]-s[0],e[r]=s[1];return e}i.d(e,{Zo:()=>r,jA:()=>n});const s=new Float32Array(2)},90644(t,e,i){function r(t,e,i=32774,r=[0,0,0,0]){return{srcRgb:t,srcAlpha:t,dstRgb:e,dstAlpha:e,opRgb:i,opAlpha:i,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}function n(t,e,i,r,n=32774,s=32774,o=[0,0,0,0]){return{srcRgb:t,srcAlpha:e,dstRgb:i,dstAlpha:r,opRgb:n,opAlpha:s,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}i.d(e,{Ey:()=>b,nk:()=>u,p3:()=>n}),i(4718);const s=r(0,771),o=(r(1,0),r(1,1),r(1,771)),a=n(770,1,771,771),c=n(0,0,768,0),h={face:1029,mode:2305},l={face:1028,mode:2305};function u(t,e,i){return{ref:t,readMask:e,stencilFront:i,stencilBack:i}}function d(t){return C.intern(t)}function f(t){return T.intern(t)}function p(t){return A.intern(t)}function g(t){return O.intern(t)}function m(t){return P.intern(t)}function _(t){return I.intern(t)}function v(t){return N.intern(t)}function y(t){return B.intern(t)}function b(t){return H.intern(t)}class x{constructor(t,e){this._makeKey=t,this._makeRef=e,this._interns=new Map}intern(t){if(!t)return null;const e=this._makeKey(t),i=this._interns;return i.has(e)||i.set(e,this._makeRef(t)),i.get(e)??null}}function w(t){return"["+t.join(",")+"]"}const C=new x(M,t=>({__tag:"Blending",...t}));function M(t){return t?w([t.srcRgb,t.srcAlpha,t.dstRgb,t.dstAlpha,t.opRgb,t.opAlpha,t.color.r,t.color.g,t.color.b,t.color.a]):null}const T=new x(S,t=>({__tag:"Culling",...t}));function S(t){return t?w([t.face,t.mode]):null}const A=new x(E,t=>({__tag:"PolygonOffset",...t}));function E(t){return t?w([t.factor,t.units]):null}const O=new x(R,t=>({__tag:"DepthTest",...t}));function R(t){return t?w([t.func]):null}const P=new x(D,t=>({__tag:"StencilTest",...t}));function D(t){return t?w([t.ref,t.readMask,t.stencilFront.compare,t.stencilFront.fail,t.stencilFront.zFail,t.stencilFront.zPass,t.stencilBack.compare,t.stencilBack.fail,t.stencilBack.zFail,t.stencilBack.zPass]):null}const I=new x(F,t=>({__tag:"DepthWrite",...t}));function F(t){return t?w([t.zNear,t.zFar]):null}const N=new x(L,t=>({__tag:"ColorWrite",...t}));function L(t){return t?w([t.r,t.g,t.b,t.a]):null}const B=new x(U,t=>({__tag:"StencilWrite",...t}));function U(t){return t?w([t.mask]):null}const H=new x(function(t){return t?w([M(t.blending),S(t.culling),E(t.polygonOffset),R(t.depthTest),D(t.stencilTest),F(t.depthWrite),L(t.colorWrite),U(t.stencilWrite)]):null},t=>({blending:d(t.blending),culling:f(t.culling),polygonOffset:p(t.polygonOffset),depthTest:g(t.depthTest),stencilTest:m(t.stencilTest),depthWrite:_(t.depthWrite),colorWrite:v(t.colorWrite),stencilWrite:y(t.stencilWrite)}));i.d(e,["RC",0,o,"T8",0,a,"Uy",0,{zNear:0,zFar:1},"Xt",0,t=>2===t?h:1===t?l:null,"iD",0,s,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,c])},49788(t,e,i){const r=1/255.5,n=1-r;i.d(e,["Q",0,r,"v",0,n])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,3470],{92474(t,e,r){r.d(e,{Zm:()=>y});var s=r(5482),o=r(49186),i=r(97768),l=r(61893),a=r(17676),n=r(67076),u=r(10107),p=r(64108);const d="loaded",h=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(t=>{const e=this.load.bind(this);this.load=r=>{const s=new Promise((t,e)=>{const s=(0,a.NY)(r,e);this.destroyed&&e(new o.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally(()=>{s&&s.remove()})});if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}).catch(()=>{})}return t(),s}})),this.when(()=>{this._set("loadStatus",d),this._loadController=null},t=>{this.destroyed||(this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null)})}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}async load(t){return this}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new o.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loaded",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loadError",void 0),(0,s.Cg)([(0,u.MZ)({clonable:!1})],r.prototype,"loadStatus",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],readOnly:!0})],r.prototype,"loadWarnings",null),r=(0,s.Cg)([(0,p.$)("esri.core.Loadable")],r),r},c=h(l.Z);function y(t){return!(!t||!t.load)}r.d(e,["WV",0,h,"x_",0,c])},61893(t,e,r){var s=r(5482),o=r(69622),i=r(36563),l=r(17676),a=r(64108);class n{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,l.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=Promise.withResolvers(),e=[...this._resolvingPromises,t.promise],r=this._allPromise=Promise.all(e);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},t=>{this.isFulfilled()||this._allPromise!==r||(0,l.zf)(t)||this._resolver.reject(t)}),t.resolve()}}const u=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),this._promiseProps=new n,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then(()=>this).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}addResolvingTask(t){t&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,i.rE)(t)),this._promiseProps.addResolvingPromise(t.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},p=u(o.A);r.d(e,["Z",0,p,"g",0,u])},20655(t,e,r){r.d(e,{A:()=>b});var s=r(5482),o=r(92602),i=r(70333),l=r(11254),a=r(49186),n=r(44208),u=r(25482),p=r(92474),d=r(97768),h=r(17676),c=r(91429),y=r(56507),m=r(5443),g=r(73444);let C;var f=r(96360),v=r(16405),M=r(69622);let Z=class extends M.A{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s.Cg)([(0,c.MZ)()],Z.prototype,"nextQueryParams",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"queryParams",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"results",void 0),(0,s.Cg)([(0,c.MZ)()],Z.prototype,"total",void 0),Z=(0,s.Cg)([(0,c.$K)("esri.portal.PortalQueryResult")],Z);var S,P=r(41318),w=r(926),_=r(36005);let O;const A={PortalGroup:()=>Promise.resolve({default:f.A}),PortalItem:()=>r.e(812).then(r.bind(r,80812)),PortalUser:()=>Promise.resolve({default:P.A})};let b=class extends((0,u.T)(p.x_)){static{S=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=o.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){G.unregister(this),this.defaultBasemap=(0,d.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,d.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,d.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,d.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)o.A.request.trustedServers.includes(e)||o.A.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=this.user?.orgId,e=!t||this.canSearchPublic;return this.id&&!e?`orgid:${this.id}`:null}get hasAPIKey(){return(0,w.Jn)(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.slice(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.A.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(812),r.e(3116)]).then(r.bind(r,83116)).then(({default:e})=>{(0,h.Te)(t),O=e}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t)).then(t=>{if(!this.hasAPIKey&&i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO&&this.authMode!==S.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}(new WeakRef(this))),G.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)});return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(8278),r.e(9953),r.e(812),r.e(2827),r.e(4198)]).then(r.bind(r,38732))).default;return t?t.map(t=>new e({id:t.id,url:t.url})):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&(0,n.A)("enable-feature:basemap-groundlayers")){const t=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,e);r.unshift(...t)}const s=await this._fetchBasemaps3D(t,e);r.unshift(...s)}return r}async fetchDefault3DBasemap(t){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const e=new v.A;e.query=this.default3DBasemapQuery,e.disableExtraQuery=!0;const r=(await this.queryItems(e,t)).results.find(t=>"Web Scene"===t.type);return r?new O({portalItem:r}):null}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then(t=>t.categorySchema):(0,h.G4)(t)?Promise.reject((0,h.NK)()):Promise.resolve([])}async fetchClassificationSchema(t){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",t).then(t=>t.classificationSchema):null}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new v.A({num:100,sortField:"title"});if(e?.length){const s=[];for(const t of e)s.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,t).then(t=>t.results)}return(0,h.G4)(t)?Promise.reject((0,h.NK)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,g.JK)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,g.JK)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return C&&!C.destroyed||(C=new S),C}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const s=this.restUrl+"/portals/self",o={authMode:t,query:{culture:(0,g.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===o.authMode&&(o.authMode="no-prompt"),e&&(o.query.default=!0),this.request(s,o)}queryPortal(t,e,r,s){const o=(0,y.dp)(v.A,e),i=e=>this.request(this.restUrl+t,{...o.toRequestOptions(this),...s}).then(t=>{const r=o.clone();return r.start=t.nextStart,new Z({nextQueryParams:r,queryParams:o,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,s)})}).then(t=>Promise.all(t.results.map(e=>"function"==typeof e.when?e.when():t)).then(()=>t,e=>((0,h.QP)(e),t)));return r&&A[r]?A[r]().then(({default:t})=>((0,h.Te)(s),i(t))):i()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new a.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===S.AUTH_MODE_ANONYMOUS||this.authMode===S.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new a.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate"))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate"))).then(t=>{t&&(this.sourceJSON=t,this.read(t))});return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==S.AUTH_MODE_NO_PROMPT}).then(e=>t(e)):t(this.credential)}normalizeUrl(t){const e=this.credential?.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then(t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map(e=>"function"==typeof e.when?e.when():t)).then(()=>e,()=>e)})}request(t,e={}){const r={f:"json",...e.query},{authMode:s=(this.authMode===S.AUTH_MODE_ANONYMOUS||this.authMode===S.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:o=null,cacheBust:i=!1,method:a="auto",responseType:n="json",signal:u}=e,p={authMode:s,body:o,cacheBust:i,method:a,query:r,responseType:n,timeout:0,signal:u};return e.withCredentials&&(p.withCredentials=!0),(0,l.A)(this._normalizeSSL(t),p).then(t=>t.data)}toJSON(){throw new a.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices?.[t];if(!e)throw new a.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new v.A;r.query=t||((0,w.Dd)()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const s=await this.queryGroups(r,e);if(!s.total)return[];const o=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc";const i=await o.queryItems(r,e);return i.total?i.results.filter(t=>"Web Map"===t.type).map(t=>new O({portalItem:t})):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];if((0,w.Dd)())return[];const s=new v.A({query:r,disableExtraQuery:!0}),o=await this.queryGroups(s,e);if(!o.total)return[];const i=o.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=i.sortField||"name",s.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(s,e);return l.total?l.results.filter(t=>"Web Scene"===t.type).map(t=>new O({portalItem:t})):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=O.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,s){let o;if(r){const i=null!=s?s.signal:null;o=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(o=o.map(r=>{const s=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof s.load&&s.load(i),s}))}else o=[];return o}};(0,s.Cg)([(0,c.MZ)()],b.prototype,"access",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"allSSL",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"authMode",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"authorizedCrossOriginDomains",void 0),(0,s.Cg)([(0,_.w)("authorizedCrossOriginDomains")],b.prototype,"readAuthorizedCrossOriginDomains",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"basemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],b.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"g3DTilesGalleryGroupQuery"}})],b.prototype,"g3DTilesGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"g3dTilesEnabled"}})],b.prototype,"g3dTilesEnabled",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"bingKey",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListApps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListData",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canListPreProvisionedItems",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canProvisionDirectPurchase",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSearchPublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canShareBingPublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSharePublic",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSignInArcGIS",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"canSignInIDP",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"colorSetsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"commentsEnabled",void 0),(0,s.Cg)([(0,c.MZ)({type:Date})],b.prototype,"created",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"credential",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"culture",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"currentVersion",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"customBaseUrl",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"default3DBasemapQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultBasemap")],b.prototype,"readDefaultBasemap",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultDevBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultDevBasemap")],b.prototype,"readDefaultDevBasemap",null),(0,s.Cg)([(0,c.MZ)({type:m.A})],b.prototype,"defaultExtent",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"defaultVectorBasemap",void 0),(0,s.Cg)([(0,_.w)("defaultVectorBasemap")],b.prototype,"readDefaultVectorBasemap",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"description",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"eueiEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"extraQuery",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"featuredGroups",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"featuredItemsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"galleryTemplatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"layoutGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"livingAtlasGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"hasAPIKey",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"hasCategorySchema",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"hasClassificationSchema",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helpBase",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helperServices",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"helpMap",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"homePageFeaturedContent",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"homePageFeaturedContentCount",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"httpPort",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"httpsPort",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"ipCntryCode",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"isOrganization",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"isPortal",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"isReadOnly",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"itemPageUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"layerTemplatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"maxTokenExpirationMinutes",void 0),(0,s.Cg)([(0,c.MZ)({type:Date})],b.prototype,"modified",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalHostname",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalMode",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"portalProperties",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"region",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"recycleBinEnabled",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"restUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"rotatorPanels",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"showHomePageDescription",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"staticImagesUrl",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"2DStylesGroupQuery"}})],b.prototype,"stylesGroupQuery2d",void 0),(0,s.Cg)([(0,c.MZ)({json:{name:"stylesGroupQuery"}})],b.prototype,"stylesGroupQuery3d",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"supportsHostedServices",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"symbolSetsGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"templatesGroupQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"thumbnail",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],b.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"units",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"urlKey",void 0),(0,s.Cg)([(0,_.w)("urlKey")],b.prototype,"readUrlKey",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"user",void 0),(0,s.Cg)([(0,_.w)("user")],b.prototype,"readUser",null),(0,s.Cg)([(0,c.MZ)()],b.prototype,"use3dBasemaps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useDefault3dBasemap",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useStandardizedQuery",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"useVectorBasemaps",void 0),(0,s.Cg)([(0,c.MZ)()],b.prototype,"vectorBasemapGalleryGroupQuery",void 0),b=S=(0,s.Cg)([(0,c.$K)("esri.portal.Portal")],b);const G=new FinalizationRegistry(t=>{t.remove()})},96360(t,e,r){r.d(e,{A:()=>p});var s,o=r(5482),i=r(49186),l=r(25482),a=r(91429),n=r(56507),u=r(16405);let p=s=class extends l.o{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.portal?.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then(e=>{const r=e.categorySchema||[];return r.some(t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source)?this._fetchCategorySchemaSet("LivingAtlas",t):r})}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new s({sourceJSON:t});return e.read(t),e}queryItems(t,e){let r=(0,n.dp)(u.A,t);const s=this.portal;return parseFloat(s.currentVersion)>5?(r=r||new u.A,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new u.A,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then(t=>{const s=t.contentCategorySetsGroupQuery;if(s){const t=new u.A({disableExtraQuery:!0,num:1,query:s});return r.queryGroups(t,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(r=>{if(r.total){const s=r.results[0],o=new u.A({num:1,query:`typekeywords:"${t}"`});return s.queryItems(o,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(t=>t.total?t.results[0].fetchData("json",e).then(t=>{const e=t?.categorySchema;return e?.length?e:[]}):[])}};(0,o.Cg)([(0,a.MZ)()],p.prototype,"access",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"created",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"isInvitationOnly",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"modified",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"owner",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"portal",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"snippet",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortField",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortOrder",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sourceJSON",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"tags",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"thumbnail",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o.Cg)([(0,a.MZ)()],p.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"url",null),p=s=(0,o.Cg)([(0,a.$K)("esri.portal.PortalGroup")],p)},16405(t,e,r){r.d(e,{A:()=>c});var s,o=r(5482),i=r(69622),l=r(66552),a=r(4718),n=r(91429),u=r(5443),p=r(16930),d=r(28735);const h=new l.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let c=s=class extends i.A{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new s({categories:this.categories?(0,a.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map(t=>Array.isArray(t)?JSON.stringify(t):t));let s="";if(this.extent){const t=(0,d.Cv)(this.extent,p.A.WGS84);null!=t&&(s=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let o=this.query;const i=t.extraQuery;!this.disableExtraQuery&&i&&(o=o?"("+o+") AND "+i:i);const l={categories:r,bbox:s,q:o,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(l.sortField=this.sortField.split(",").map(t=>h.toJSON(t.trim())).join(","),l.sortOrder=this.sortOrder),{query:{...e,...l}}}};(0,o.Cg)([(0,n.MZ)()],c.prototype,"categories",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"disableExtraQuery",void 0),(0,o.Cg)([(0,n.MZ)({type:u.A})],c.prototype,"extent",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"filter",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"num",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"query",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"sortField",void 0),(0,o.Cg)([(0,n.MZ)()],c.prototype,"sortOrder",null),(0,o.Cg)([(0,n.MZ)()],c.prototype,"start",void 0),c=s=(0,o.Cg)([(0,n.$K)("esri.portal.PortalQueryParams")],c)},41318(t,e,r){r.d(e,{A:()=>p});var s=r(5482),o=r(49186),i=r(25482),l=r(91429);let a=class extends i.o{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new o.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s.Cg)([(0,l.MZ)({type:Date})],a.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"title",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],a.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],a.prototype,"username",void 0),a=(0,s.Cg)([(0,l.$K)("esri.portal.PortalFolder")],a);var n,u=r(96360);let p=n=class extends i.o{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.id}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.id}`:null}addItem(t){const e=t&&t.item,r=t?.data,s=t?.folder,o={method:"post"};e&&(o.query=e.createPostQuery(),null!=r&&("string"==typeof r?o.query.text=r:"object"==typeof r&&(o.query.text=JSON.stringify(r))));let i=this.userContentUrl;return s&&(i+="/"+("string"==typeof s?s:s.id)),this.portal.request(i+"/addItem",o).then(t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load()))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const s=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:s}),t.id=null,t.portal=null}async deleteItems(t,e=!1){t=t.slice();const r=this.userContentUrl+"/deleteItems",s=[],i=t.map(t=>t.id);if(i.length){const l={method:"post",query:{items:i.join(","),permanentDelete:e}},a=await this.portal.request(r,l);for(const e of a.results){const r=t.find(t=>e.itemId===t.id),i=e.success;let l=null;i?(r.id=null,r.portal=null):e.error&&(l=new o.A("portal:delete-item-failed",e.error.message,e.error)),s.push({item:r,success:i,error:l})}}return s}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then(t=>{let e;return e=t&&t.folders?t.folders.map(t=>{const e=a.fromJSON(t);return e.portal=this.portal,e}):[],e})}fetchGroups(){return this.portal.request(this.url??"").then(t=>{let e;return e=t&&t.groups?t.groups.map(t=>{const e=u.A.fromJSON(t);return e.portal=this.portal,e}):[],e})}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:s}=await r.e(812).then(r.bind(r,80812)),o={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},i=await this.portal.request(e,{query:o});let l;return i?.items?(l=i.items.map(t=>{const e=s.fromJSON(t);return e.portal=this.portal,e}),await Promise.all(l.map(t=>t.load())),{items:l,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(t=>t.tags)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new u.A({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new o.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,s=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:s})}toJSON(){throw new o.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new n({sourceJSON:t});return e.read(t),e}};(0,s.Cg)([(0,l.MZ)()],p.prototype,"access",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"culture",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"email",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"favGroupId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"fullName",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"modified",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"orgId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"preferredView",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"privileges",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"region",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"role",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"roleId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"thumbnail",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"units",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"userContentUrl",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"username",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userLicenseTypeId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userType",void 0),p=n=(0,s.Cg)([(0,l.$K)("esri.portal.PortalUser")],p)},926(t,e,r){r.d(e,{Dd:()=>h,Jn:()=>c,Qc:()=>y,getApiKey:()=>p,getSessionToken:()=>d});var s=r(92602),o=r(11254),i=r(84952);const l=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),n=new Map;let u=null;function p(t){if(!y(t))return null;const e=e=>e instanceof RegExp?e.test(t):"string"==typeof e&&t.startsWith(e),r=s.A.apiKeys;if(Array.isArray(r.scopes))for(const t of r.scopes)if(Array.isArray(t.urls)){if(t.urls.some(e))return t.token}else if(e(t.urls))return t.token;return r.basemapStyles&&l.test(t)?r.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(t)?s.A.apiKey:null}async function d(t){if(!s.A.sessions?.basemap?.enabled||!l.test(t))return null;const e=p(t);if(!e)return null;u&&await u;const{styleFamily:r="arcgis",autoRefresh:i,duration:a=43200}=s.A.sessions.basemap,d=`${e}:${r}`,h=n.get(d);if(h&&(!i||h.endTime>Date.now()))return h.sessionToken;let c;u=(0,o.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:r,token:e}});try{c=(await u).data,c.endTime-=5e3,n.set(d,c)}finally{u=null}return c.sessionToken}function h(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function c(t,e){return e?y(t):null!=p(t)}function y(t){const e=(0,i.$z)(t,!0);return!!e&&!a.has(e)&&!t.endsWith("/sharing/rest/generateToken")}},94128(t,e,r){r.d(e,{D:()=>o});const s=Symbol("GraphicInstance");function o(t){return null!=t&&"object"==typeof t&&s in t}r.d(e,["Z",0,s])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6247,8628],{69052(t,e,n){n.d(e,{hr:()=>a});var r=n(34727);class a{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+i(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(r)?n:r}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,r,a=0,s=!1){return(r-=a)<e?r+=i(t,e-r):r>n&&(r-=i(t,r-n)),s&&r===n&&(r=e),r+a}function i(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const o=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360));n.d(e,["ie",0,l,"uC",0,o])},56512(t,e,n){function r(t){let e,n,r=[],a=!1;return function(...s){return a&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}(s,r)||(n=t.apply(this,s),e=this,r=s,a=!0),n}}n.d(e,{B:()=>r})},93146(t,e,n){n.d(e,{z:()=>a});class r{constructor(t){this._import=t,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async t=>(this.module=t,t))),this._promise}}function a(t){return new r(async()=>{const e=await t();return!1===e.isLoaded?.()&&await e.load(),e})}},31411(t,e,n){n.d(e,{GS:()=>E,gh:()=>I});var r=n(49186),a=n(56512),s=n(65864),i=n(4305),o=n(50954),l=n(52006),u=n(49663),d=n(46068),c=n(15507);const h=1e-6,p=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class m{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:n,maxSegmentsPerCurve:r,minSegmentsPerCurve:a}){const s=n*n,i=e*e,o=1/r,l=this.interpolate(0),u=this.interpolate(1);(0,c.kb)(this.curveStart,l)>h&&t.push(l),this.initialize(l,u);const d=1/a;for(let t=a-1;t>0;t--){const e=t*d;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===s||!isFinite(s)||(0,c.kb)(this.arcStart,this.arcEnd)<s)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,c.kb)(this.curveEnd,u)>h&&t.push([...this.curveEnd]),t}}class g extends m{constructor(t,e){const[n,r,a]=e.b;super(t,n),this._controlPointsStack=[],this._curveControlPoints=[r,a],this._arcControlPoints=[r,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:n,tStart:r,tEnd:a}=this,[s,i]=this._arcControlPoints,o=(t-r)/(a-r),l=(0,c.RS)([],e,s,o),u=(0,c.RS)(p,s,i,o),d=(0,c.RS)([],i,n,o),h=(0,c.RS)([],l,u,o),f=(0,c.RS)([],u,d,o),m=(0,c.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,d]),this.tEndStack.push(t),this.arcEndStack.push(m),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:n}=this,[r,a]=this._curveControlPoints;return(0,i.B4)(e,r,a,n,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[n,r]=this._arcControlPoints;return Math.max((0,c.yE)(n,t,e),(0,c.yE)(r,t,e))}}class y extends m{constructor(t,e){const[n]=e.a;super(t,n),this._derivedEllipse=(0,d.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,d.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,c.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function b(t,e,n,{cx:r,cy:a,radius:s,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:d,maxSegmentsPerCurve:p,minSegmentsPerCurve:f}){if(l)return t.push([...n]),t;const m=2*s,g=[r+s*Math.cos(i),a+s*Math.sin(i)],y=[r+s*Math.cos(o),a+s*Math.sin(o)];(0,c.kb)(e,g)>h&&t.push(g);const b=Math.abs(o-i),w=d>0&&d<m?2*Math.asin(d/m):b,S=u>0&&u<=s?2*Math.acos(1-u/s):b,F=Math.min(w,S),v=Math.min(p,Math.max(f,Math.ceil(Math.abs(b/F)))),A=1/v;for(let e=1;e<v;e++){const n=e*A,l=i*(1-n)+o*n;t.push([r+s*Math.cos(l),a+s*Math.sin(l)])}return t.push(y),(0,c.kb)(n,y)>h&&t.push([...n]),t}function w(t,e,n,r){return new g(e,n).densify(t,r)}function S(t,e,n,r){const a=(0,o.pM)(e,n),[s]=n.c;return b(t,e,s,a,r)}function F(t,e,n,r){const a=(0,u.io)(e,n),[s]=n.a;return b(t,e,s,a,r)}function v(t,e,n,r){const[a,s,i,o,l,u,d]=n.a;return 0===u||0===d?(t.push([...a]),t):new y(e,n).densify(t,r)}function A(t,e,n,r){return(0,l.Xq)(n)?(t.push([...n]),t):(0,l.n1)(n)?w(t,e,n,r):(0,l.aO)(n)?S(t,e,n,r):(0,l.DA)(n)?F(t,e,n,r):v(t,e,n,r)}function E(t,e={}){if(!(0,l.Ed)(t))return t;const n=f(e),r=(0,l.FD)(t),a=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const a=r+1,s=[...(0,l.yP)(t[r])];0===r&&e.push(s),A(e,s,t[a],n)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:a,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:a,spatialReference:t.spatialReference}}const M=(0,a.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(t,e,a){const i=new Set(e);return await async function(t,e,a){let s=null;for(const i of t)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,e)){const t=i.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=k(t);if(a.has(e))i.spatialReference=a.get(e);else{s||(s=await Promise.all([n.e(9187),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));const o=s.fromSpatialReference(t),l=o?.getTolerance();if(null==l)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=i.spatialReference.clone();u.read({xyTolerance:l}),i.spatialReference=u,a.set(e,u)}}}(t,i,a),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const n=t.spatialReference.xyTolerance;if(null==n)return t;const r=M(n);return(0,s.rS)(function(t,e,n){if(!(0,l.Ed)(t))return t;const r=new Set(e),a=f(n),s=(0,l.FD)(t),i=[];let o=!1;for(const t of s){const e=[];for(let n=0;n<t.length-1;n++){const s=n+1,i=[...(0,l.yP)(t[n])];0===n&&e.push(i);const u=t[s];(0,l.Xq)(u)?e.push([...u]):(0,l.n1)(u)&&!r.has("cubic-bezier")?w(e,i,u,a):(0,l.aO)(u)&&!r.has("circular-arc")?S(e,i,u,a):(0,l.DA)(u)&&!r.has("elliptic-arc")?F(e,i,u,a):(0,l.wY)(u)&&!r.has("elliptic-arc")?v(e,i,u,a):(e.push((0,l.tk)(u)),o=!0)}i.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:i}:{rings:i}}}(t,e,r))})}function k(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},52039(t,e,n){n.d(e,{O7:()=>c,el:()=>l});var r=n(69052),a=(n(49186),n(17676)),s=(n(5443),n(39829),n(82799),n(16930)),i=n(93146),o=(n(80754),n(21325));async function l(t,e,n){Array.isArray(t)||(t=[t]),null!=e&&"object"==typeof e&&"authMode"in e&&(n=e);let r=null;for(const e of t)r??=e?.spatialReference;if(!r)return t;const s=(0,o.Vp)(r);if(!s)return t;const[i,l]=s.valid;let c=!1;for(const e of t){if(!e)continue;if("point"===e.type){c||=e.x>=l,c||=e.x<=i;continue}const{extent:t}=e;if(null==t){c=!0;break}c||=t.xmin>=l,c||=t.xmin<=i,c||=t.xmax>=l,c||=t.xmax<=i}if(!c)return t;const[{foldInto360Range:h},p]=await(0,a.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),n),f=p.fromSpatialReference(r);return t.map(t=>{if(null==t||"mesh"===t.type)return t;const e=p.fromGeometry(t),n=p.toGeometry(h(e,f),r);return"extent"===t.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(n.bind(n,4144))),d=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));function c(t,e,n){const r=(0,o.Vp)(n);if(null==r)return t;const[a,s]=r.valid,i=2*s;let l=0,u=0;e>s?l=Math.ceil(Math.abs(e-s)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i)),t>s?u=Math.ceil(Math.abs(t-s)/i):t<a&&(u=-Math.ceil(Math.abs(t-a)/i));let d=t+(l-u)*i;const c=d-e;return c>s?d-=i:c<a&&(d+=i),d}function h(t){const e=(0,o.Vp)(t);if(null==e)return null;const[n,a]=e.valid;return new r.hr(n,a)}const p=h(s.A.WGS84);h(s.A.WebMercator),n.d(e,["Y_",0,p])},80754(t,e,n){n.d(e,{kS:()=>u,kd:()=>l});var r=n(82799),a=n(16930),s=n(60408),i=n(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){if((0,i.Ed)(t))for(const n of function(t){return(0,s.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of n){if((0,i.aO)(t)){const[n,r]=t.c;n[0]+=e,r[0]+=e;continue}if((0,i.FG)(t)){const[n,r]=t.a;n[0]+=e,r[0]+=e;continue}if((0,i.n1)(t)){const[n,r,a]=t.b;n[0]+=e,r[0]+=e,a[0]+=e;continue}t[0]+=e}for(const n of function(t){return(0,s.Bi)(t)?t.rings:t.paths}(t))for(const t of n)t[0]+=e;return t}n.d(e,["j7",0,o])},78628(t,e,n){n.d(e,{applyEdits:()=>S,uploadAssets:()=>k});var r=n(52106),a=n(7762),s=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(84952),d=n(13069),c=n(52039),h=n(21325),p=n(31411),f=n(47685),m=n(30524),g=n(20557),y=n(77548);function b(t){return null!=t?.applyEdits}const w=new WeakMap;async function S(t,e,n,r={}){let u;const c="gdbVersion"in t?t.gdbVersion:null,h=r.gdbVersion??c;if((0,f.Mk)(t)&&t.url)u=(0,f.Zk)(t.url,t.layerId,h,"original-and-current-features"===r.returnServiceEditsOption);else{u=Promise.withResolvers(),u.promise.then(e=>{(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length)&&t.emit("edits",e)},()=>{});const e={result:u.promise};t.emit("apply-edits",e)}try{const{results:c,edits:h}=await async function(t,e,n,r){if(await t.load(),!b(e))throw new s.A(`${t.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:t});if(!(0,y.tk)(t))throw new s.A(`${t.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:t});const{edits:i,options:u}=await async function(t,e,n){const r=(0,y.BR)(t),i=e&&(e.addFeatures||e.updateFeatures||e.deleteFeatures),u=e&&(e.addAttachments||e.updateAttachments||e.deleteAttachments),c=null!=t.infoFor3D;if(function(t,e,n,r,a,i){if(!(t&&(r||a)||n?.usingTelecomOperations))throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const o=e.editing.supportsGlobalId||n?.usingFeatureServiceEndpoint;if(!o&&n?.globalIdUsed)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!o&&a)throw new s.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&a)throw new s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(e,r,n,!!i,!!u,`${t.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new s.A(`${t.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const h={...n};if(null!=h.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(h.rollbackOnFailureEnabled=!0),h.rollbackOnFailureEnabled||"original-and-current-features"!==h.returnServiceEditsOption||(!1===h.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${t.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),h.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&h.returnServiceEditsInSourceSR)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(h.returnServiceEditsInSourceSR&&"original-and-current-features"!==h.returnServiceEditsOption)throw new s.A(`${t.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(t,e,n){const r=function(t){return{addFeatures:Array.from(t?.addFeatures??[]),updateFeatures:Array.from(t?.updateFeatures??[]),deleteFeatures:t&&a.A.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():t.deleteFeatures||[],addAttachments:t.addAttachments||[],updateAttachments:t.updateAttachments||[],deleteAttachments:t.deleteAttachments||[]}}(t);if(r.addFeatures?.length&&!e.operations.supportsAdd)throw new s.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!e.operations.supportsUpdate)throw new s.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!e.operations.supportsDelete)throw new s.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(M),r.updateFeatures=r.updateFeatures.map(M),r.addAssetFeatures=[],r}(e,r,`${t.type}-layer`),f=n?.globalIdUsed||c,m=t.fields.filter(t=>"big-integer"===t.type||"oid"===t.type&&(t.length||0)>=8);if(f){const{globalIdField:e}=t;if(null==e)throw new s.A(`${t.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach(t=>function(t,e){const{attributes:n}=t;null==n[e]&&(n[e]=(0,d.yS)())}(t,e))}p.addFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r),v(t,e)}(e,t,f,m)),p.updateFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r),v(t,e);const a=(0,y.BR)(e);if("geometry"in t&&null!=t.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.A(`${e.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(e,t,f,m)),p.deleteFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r)}(e,t,f,m)),p.addAttachments.forEach(e=>A(e,t)),p.updateAttachments.forEach(e=>A(e,t)),c&&await async function(t,e){const{infoFor3D:n}=e;if(null==n)return;if(!(0,g.JQ)(n))throw new s.A(`${e.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");t.addAssetFeatures??=[];const{addAssetFeatures:r}=t;for(const e of t.addFeatures??[])I(e)&&r.push(e);for(const e of t.updateFeatures??[])I(e)&&r.push(e)}(p,t);const b=(0,l.tE)(w,t,()=>new Map);return{edits:await E(p,r.data.supportedCurveTypes??[],b),options:h}}(t,n,r);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await e.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(t,e,n,r),p=t=>t.filter(t=>!t.error).map(i.o8),f={edits:h,addedFeatures:p(c.addFeatureResults),updatedFeatures:p(c.updateFeatureResults),deletedFeatures:p(c.deleteFeatureResults),addedAttachments:p(c.addAttachmentResults),updatedAttachments:p(c.updateAttachmentResults),deletedAttachments:p(c.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:c.editMoment?new Date(c.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return c.editedFeatureResults?.length&&(f.editedFeatures=c.editedFeatureResults),u.resolve(f),c}catch(t){throw u.reject(t),t}}function F(t,e,n,r){if(n){if("attributes"in t&&!t.attributes[e.globalIdField])throw new s.A(`${e.type}-layer:invalid-parameter`,`Feature should have '${e.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in t)&&!t.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in t)for(const n of r){const r=t.attributes[n.name];if(void 0!==r&&!(0,m.OG)(n,r))throw new s.A(`${e.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:t})}if("geometry"in t&&null!=t.geometry){if(t.geometry.hasZ&&!1===e.capabilities?.data.supportsZ)throw new s.A(`${e.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(t.geometry.hasM&&!1===e.capabilities?.data.supportsM)throw new s.A(`${e.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(t,e){if("geometry"in t&&"mesh"===t.geometry?.type&&null!=e.infoFor3D&&null!=e.spatialReference){const{geometry:n}=t,{spatialReference:r,vertexSpace:a}=n,i=e.spatialReference,o="local"===a.type,l=(0,h.EA)(i),u=(0,h.aI)(i,r),d=u||(0,h.oT)(i)&&((0,h.oT)(r)||(0,h.K8)(r));if(!(o&&l&&d||!o&&!l&&u))throw new s.A(`${e.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${a.type} vertex space and a spatial reference wkid:${r.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function A(t,e){const{feature:n,attachment:r}=t;if(!n||"attributes"in n&&!n.attributes[e.globalIdField])throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new s.A(`${e.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!e.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const t=(0,u.r$)(r.data);if(t&&!t.isBase64)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function E(t,e,n){const r=t.addFeatures??[],a=t.updateFeatures??[],s=r.concat(a).map(t=>t.geometry),i=await(0,p.gh)(s,e,n),o=await(0,c.el)(i),l=r.length,u=a.length;return o.slice(0,l).forEach((t,e)=>r[e].geometry=t),o.slice(l,l+u).forEach((t,e)=>a[e].geometry=t),t}function M(t){const e=new r.A;return t.attributes||(t.attributes={}),e.geometry=t.geometry,e.attributes=t.attributes,e}function I(t){return"mesh"===t?.geometry?.type}function k(t,e,n,r){if(!b(e))throw new s.A(`${t.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:t});if(!e.uploadAssets)throw new s.A(`${t.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:t});return e.uploadAssets(n,r)}},47685(t,e,n){n.d(e,{Mk:()=>p,Zk:()=>c});var r=n(5482),a=n(65529),s=n(4718),i=n(91429),o=n(20816);const l=new a.bk;function u(t){return l.on("apply-edits",new WeakRef(t))}function d(t){return l.on("update-moment",new WeakRef(t))}function c(t,e,n=null,r=!1){const a=Promise.withResolvers();return r=null==e||r,l.emit("apply-edits",{serviceUrl:t,layerId:e,gdbVersion:n,mayReceiveServiceEdits:r,result:a.promise}),a}const h=Symbol();function p(t){return null!=t&&"object"==typeof t&&h in t}function f(t){return null!=t&&"object"==typeof t&&"gdbVersion"in t}function m(t,e,n){const r=new URL(t).host,a=o.Z3.get(r),s=t=>!t||t===a;return s(e)&&s(n)||e===n}n.d(e,["w6",0,t=>{var e;const n=t;let a=class extends n{static{e=h}constructor(...t){super(...t),this[e]=!0,this._applyEditsHandler=t=>{const{serviceUrl:e,layerId:n,gdbVersion:r,mayReceiveServiceEdits:a,result:i}=t,o=e===this.url,l=null!=n&&null!=this.layerId&&n===this.layerId,u=null!=n&&this.relationships?.some(t=>t.relatedTableId===n),d=f(this),c=f(this)&&m(e,r,this.gdbVersion);if(!o||d&&!c||!l&&!u&&!a)return;const h=i.then(t=>{if(this.lastEditsEventDate=new Date,l&&(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length))return this.emit("edits",(0,s.o8)(t)),t;const n=t.editedFeatures?.find(({layerId:t})=>t===this.layerId);if(n){const{adds:e,updates:r,deletes:a}=n.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],deletedFeatures:a?a.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:t}})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],editedFeatures:(0,s.o8)(t.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(t.historicMoment)};return this.emit("edits",i),i}const a={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(t.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(t.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,a.historicMoment)&&this.emit("edits",a),a}).then(t=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,t.historicMoment)&&(this.historicMoment=t.historicMoment),t));h.catch(()=>{}),this.emit("apply-edits",{result:h})},this._updateMomentHandler=t=>{const{serviceUrl:e,gdbVersion:n,moment:r}=t,a=e===this.url,s=f(this),i=f(this)&&m(e,n,this.gdbVersion),o=f(this)&&!m(e,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(t,e,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,o.w5)(t,e)}};return(0,r.Cg)([(0,i.MZ)()],a.prototype,"lastEditsEventDate",void 0),a=(0,r.Cg)([(0,i.$K)("esri.layers.mixins.EditBusLayer")],a),a}])},20557(t,e,n){n.d(e,{Fm:()=>l,Hz:()=>g,JQ:()=>m,JZ:()=>M,ND:()=>b,R_:()=>i,U9:()=>f,_h:()=>S,be:()=>c,fE:()=>p,fu:()=>a,nr:()=>y,oF:()=>s,qv:()=>E,rP:()=>h,rq:()=>u,z$:()=>d});const r=[["binary","application/octet-stream","bin",""]];function a(t,e){return null!=F(e.name,t?.supportedFormats??[])}function s(t,e){if(!t)return!1;const n=u(e,t.supportedFormats??[]);return null!=n&&t.editFormats.includes(n)}function i(t,e){return v(function(t,e){const n=t.toLowerCase();return w(e).find(t=>A(t)===n)}(t,e))}function o(t,e){return v(F(t,e))}function l(t,e){return A(S(t,e))}function u(t,e){return o(t.name,e)??i(t.type,e)}function d(t,e,n){return i(t,n)??o(e,n)}function c(t,e){if(!t||!S(t,e))return;const n=/^3d_(.+)$/iu.exec(t)?.[1]?.toLowerCase();return n||void 0}function h(t,e){return(t??[]).map(t=>c(t,e)).filter(t=>!!t)}function p(t,e){return v(e.find(n=>c(v(n),e)===t))}function f({supportedFormats:t}){return d("model/gltf-binary","glb",t)}function m(t){const e=f(t);return null!=e&&t.editFormats.includes(e)}function g(t){if(!t)return null;const e=f(t),n=function({supportedFormats:t}){return d("model/gltf+json","gltf",t)}(t);let r=null;for(const a of t.queryFormats){if(a===e)return a;a===n&&(r=a)}return r}function y({supportedFormats:t}){return d("application/esri3do-SR_world","wld",t)}function b({supportedFormats:t}){return d("application/esri3do-SR_prj","prj",t)}function w(t){return[...r,...t]}function S(t,e){return w(e).find(e=>v(e)===t)}function F(t,e){const n=t.toLowerCase();return w(e).find(t=>E(t).some(t=>n.endsWith(t)))}function v(t){return t?.[0]}function A(t){return t?.[1].toLowerCase()}function E(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}function M(t){return t.tables?.find(t=>"assetMaps"===t.role)}},20816(t,e,n){n.d(e,{We:()=>o,ZJ:()=>l,w5:()=>u});var r=n(11254);const a=(0,n(13069).vD)(),s=new Map,i=new Map;async function o(t,e,n){if(!t||!n)return!1;if(!e)return!0;const a=new URL(t).host;let i=s.get(a);if(!i){const e=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");i=(await(0,r.A)(e,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return i===e}async function l(t,e,r=!1){if(!t||!e)return!0;const s=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=i.get(s)?.entries();if(o)for(const[t,i]of o)if(i.name===e){const e=!i.stack?.hasForwardEdits();if(!e&&r){const[{deleteForwardEdits:e},{default:r}]=await Promise.all([n.e(2186).then(n.bind(n,32186)),n.e(2558).then(n.bind(n,32558))]),o=await e(s,t,new r({sessionId:a,moment:i.moment}));return o.success&&i.stack?.clearForwardEdits(),o.success}return e}return!0}function u(t,e){if(!t)return!1;const n=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=i.get(n)?.entries();if(r)for(const[t,n]of r)if(n.name===e)return"edit"===n.lockType;return!1}new Map,n.d(e,["TA",0,a,"Z3",0,s])}}]);
|