@arcgis/core 5.0.0-next.54 → 5.0.0-next.56
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/Color.d.ts +12 -4
- package/Ground.d.ts +4 -6
- package/Ground.js +1 -1
- package/WebScene.js +1 -1
- package/applications/Components/SelectionOperation.d.ts +5 -0
- package/applications/Components/SketchTooltipControls.d.ts +5 -0
- package/applications/Components/actionUtils.d.ts +5 -0
- package/applications/Components/analysisUtils.d.ts +5 -0
- package/applications/Components/arcadeEditorUtils.d.ts +5 -0
- package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
- package/applications/Components/basemapUtils.d.ts +5 -0
- package/applications/Components/drawUtils.d.ts +13 -1
- package/applications/Components/featureUtils.d.ts +5 -0
- package/applications/Components/fontUtils.d.ts +5 -0
- package/applications/Components/formatUtils.d.ts +5 -0
- package/applications/Components/getDefaultUnits.d.ts +5 -0
- package/applications/Components/gfxUtils.d.ts +5 -0
- package/applications/Components/imageryUtils.d.ts +5 -0
- package/applications/Components/layerOriginUtils.d.ts +5 -0
- package/applications/Components/layersEffectsJsonUtils.d.ts +5 -0
- package/applications/Components/previewSymbol2D.d.ts +5 -0
- package/applications/Components/reactiveUtils.d.ts +6 -0
- package/applications/Components/sanitizerUtils.d.ts +5 -0
- package/applications/Components/stringUtils.d.ts +6 -2
- package/applications/Components/styleUtils.d.ts +5 -0
- package/applications/Components/svgUtils.d.ts +5 -0
- package/applications/Components/testUtils.d.ts +5 -0
- package/applications/Components/viewUtils.d.ts +5 -0
- package/applications/Components/webStyleSymbolUtils.d.ts +5 -0
- package/applications/Excalibur/videoViewUtils.d.ts +5 -0
- package/applications/ExperienceBuilder/sketchUtils.d.ts +5 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +10 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +10 -0
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
- package/applications/KnowledgeStudio/reshape.d.ts +5 -0
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +5 -0
- package/applications/MapViewer/layerUtils.d.ts +5 -0
- package/applications/MapViewer/mediaUtils.d.ts +5 -0
- package/applications/MapViewer/templateUtils.d.ts +5 -0
- package/applications/PortalApp/layerUtils.d.ts +5 -0
- package/applications/SceneViewer/colorUtils.d.ts +5 -0
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +5 -0
- package/applications/SceneViewer/layerUtils.d.ts +5 -0
- package/applications/SceneViewer/sceneViewerUtils.d.ts +6 -2
- package/applications/SceneViewer/symbolUtils.d.ts +5 -0
- package/applications/Urban/meshUtils.d.ts +5 -0
- package/applications/WebEditor/sketchUtils.d.ts +5 -0
- package/arcade.d.ts +22 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2e8abb556a380cc2941.js → 492d575894c7905bb70c.js} +1 -1
- package/assets/esri/core/workers/chunks/5340887a4a48bde3407a.js +1 -0
- package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
- package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +1 -0
- package/assets/esri/core/workers/chunks/8628bf45a33af786cd49.js +1 -0
- package/assets/esri/core/workers/chunks/{d63cf90d1356d1f10138.js → 8f4c480c418eba299c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa92a7c11befbad8739f.js → b4f944ef6c174b20b619.js} +1 -1
- package/assets/esri/core/workers/chunks/c531c0e3d420a1be0ad2.js +316 -0
- package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
- package/assets/esri/core/workers/chunks/{18cc131fd63d8c15df54.js → da2c41ac0f82f32013c1.js} +8 -8
- package/assets/esri/core/workers/chunks/{cc67f066c3c0c2a1a37c.js → dd99b77a7c0a052507bb.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +10 -9
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/Haze.glsl.js +4 -4
- package/chunks/LineCallout.glsl.js +2 -2
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/RasterColorizer.glsl.js +10 -10
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.d.ts +19 -1
- package/config.js +1 -1
- package/core/Error.d.ts +3 -4
- package/core/Error.js +1 -1
- package/core/Warning.js +1 -1
- package/core/accessorSupport/decorators.d.ts +11 -0
- package/core/accessorSupport/types.d.ts +2 -0
- package/core/has.js +1 -1
- package/core/lang.d.ts +6 -0
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/vec3.js +1 -1
- package/core/promiseUtils.d.ts +5 -0
- package/core/quantity.d.ts +5 -0
- package/core/reactiveUtils.d.ts +142 -0
- package/core/scheduling.d.ts +26 -5
- package/core/scheduling.js +1 -1
- package/core/sql/WhereClause.d.ts +2 -13
- package/core/sql/{WhereGrammar.d.ts → types.d.ts} +22 -1
- package/core/sql.d.ts +8 -0
- package/core/string.js +1 -1
- package/core/types.d.ts +30 -1
- package/core/units.d.ts +8 -0
- package/core/urlUtils.d.ts +7 -0
- package/core/workers/loaderConfig.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/core/workers.d.ts +26 -0
- package/form/elements/inputs.d.ts +55 -0
- package/form/elements.d.ts +43 -0
- package/geometry/coordinateFormatter.d.ts +33 -0
- package/geometry/geometryEngine.d.ts +16 -0
- package/geometry/operators/affineTransformOperator.d.ts +5 -0
- package/geometry/operators/alphaShapeOperator.d.ts +9 -0
- package/geometry/operators/areaOperator.d.ts +7 -0
- package/geometry/operators/autoCompleteOperator.d.ts +5 -0
- package/geometry/operators/boundaryOperator.d.ts +5 -0
- package/geometry/operators/bufferOperator.d.ts +11 -0
- package/geometry/operators/centroidOperator.d.ts +14 -0
- package/geometry/operators/clipOperator.d.ts +7 -0
- package/geometry/operators/containsOperator.d.ts +9 -0
- package/geometry/operators/convexHullOperator.d.ts +9 -0
- package/geometry/operators/crossesOperator.d.ts +7 -0
- package/geometry/operators/cutOperator.d.ts +18 -0
- package/geometry/operators/densifyOperator.d.ts +21 -0
- package/geometry/operators/differenceOperator.d.ts +7 -0
- package/geometry/operators/disjointOperator.d.ts +8 -0
- package/geometry/operators/distanceOperator.d.ts +8 -0
- package/geometry/operators/equalsOperator.d.ts +5 -0
- package/geometry/operators/extendOperator.d.ts +8 -0
- package/geometry/operators/generalizeOperator.d.ts +7 -0
- package/geometry/operators/geodesicBufferOperator.d.ts +13 -0
- package/geometry/operators/geodesicProximityOperator.d.ts +13 -0
- package/geometry/operators/geodeticAreaOperator.d.ts +11 -0
- package/geometry/operators/geodeticDensifyOperator.d.ts +12 -0
- package/geometry/operators/geodeticDistanceOperator.d.ts +14 -0
- package/geometry/operators/geodeticLengthOperator.d.ts +11 -0
- package/geometry/operators/geodeticUtilsOperator.d.ts +11 -0
- package/geometry/operators/graphicBufferOperator.d.ts +7 -0
- package/geometry/operators/integrateOperator.d.ts +9 -0
- package/geometry/operators/intersectionOperator.d.ts +7 -0
- package/geometry/operators/intersectsOperator.d.ts +9 -0
- package/geometry/operators/isNearOperator.d.ts +7 -0
- package/geometry/operators/labelPointOperator.d.ts +14 -0
- package/geometry/operators/lengthOperator.d.ts +7 -0
- package/geometry/operators/linesToPolygonsOperator.d.ts +5 -0
- package/geometry/operators/locateBetweenOperator.d.ts +10 -0
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +13 -0
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +7 -0
- package/geometry/operators/offsetOperator.d.ts +44 -0
- package/geometry/operators/overlapsOperator.d.ts +7 -0
- package/geometry/operators/polygonOverlayOperator.d.ts +6 -0
- package/geometry/operators/polygonSlicerOperator.d.ts +5 -0
- package/geometry/operators/projectOperator.d.ts +41 -0
- package/geometry/operators/proximityOperator.d.ts +8 -0
- package/geometry/operators/relateOperator.d.ts +7 -0
- package/geometry/operators/reshapeOperator.d.ts +5 -0
- package/geometry/operators/shapePreservingProjectOperator.d.ts +27 -0
- package/geometry/operators/simplifyOGCOperator.d.ts +8 -0
- package/geometry/operators/simplifyOperator.d.ts +9 -0
- package/geometry/operators/support/geographicTransformationUtils.d.ts +11 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +12 -0
- package/geometry/operators/touchesOperator.d.ts +7 -0
- package/geometry/operators/unionOperator.d.ts +7 -0
- package/geometry/operators/withinOperator.d.ts +9 -0
- package/geometry/projection/projectPointToVector.js +1 -1
- package/geometry/support/geodesicUtils.d.ts +8 -0
- package/geometry/support/jsonUtils.d.ts +7 -0
- package/geometry/support/meshUtils.d.ts +5 -0
- package/geometry/support/normalizeUtils.d.ts +7 -0
- package/geometry/support/webMercatorUtils.d.ts +12 -0
- package/geometry/types.d.ts +10 -1
- package/geometry.d.ts +38 -0
- package/interfaces.d.ts +52 -58
- package/intl.d.ts +111 -0
- package/kernel.d.ts +5 -0
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +1 -1
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +8 -4
- package/layers/GeoJSONLayer.d.ts +2 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/Layer.d.ts +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/OGCFeatureLayer.d.ts +1 -1
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SceneLayer.d.ts +2 -1
- package/layers/StreamLayer.d.ts +6 -5
- package/layers/SubtypeGroupLayer.d.ts +3 -4
- package/layers/VectorTileLayer.d.ts +1 -1
- package/layers/WFSLayer.d.ts +2 -1
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/catalog/catalogUtils.d.ts +6 -0
- package/layers/ogc/wcsUtils.d.ts +6 -0
- package/layers/ogc/wfsUtils.d.ts +6 -0
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +10 -0
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.d.ts +10 -0
- package/layers/orientedImagery/types.d.ts +1 -1
- package/layers/support/SubtypeSublayer.d.ts +13 -0
- package/layers/support/arcadeUtils.d.ts +5 -0
- package/layers/support/csvUtils.d.ts +6 -0
- package/layers/support/fieldUtils.d.ts +9 -0
- package/layers/support/parquetUtils.d.ts +6 -0
- package/layers/support/rasterFunctionConstants.d.ts +9 -0
- package/layers/support/rasterFunctionUtils.d.ts +7 -0
- package/package.json +1 -1
- package/pointCloudRenderers.d.ts +44 -0
- package/popup/content.d.ts +48 -0
- package/rasterRenderers.d.ts +46 -0
- package/renderers/support/AuthoringInfo.d.ts +1 -1
- package/renderers/support/jsonUtils.d.ts +7 -0
- package/renderers/support/utils.d.ts +5 -0
- package/renderers/visualVariables/SizeVariable.d.ts +0 -3
- package/renderers/visualVariables/VisualVariable.d.ts +1 -1
- package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +1 -1
- package/renderers.d.ts +46 -0
- package/request.d.ts +17 -0
- package/rest/closestFacility.d.ts +21 -0
- package/rest/featureService/utils.d.ts +5 -0
- package/rest/find.d.ts +21 -0
- package/rest/geometryService.d.ts +14 -0
- package/rest/geoprocessor.d.ts +16 -0
- package/rest/identify.d.ts +19 -0
- package/rest/imageService.d.ts +10 -0
- package/rest/knowledgeGraphService.d.ts +39 -0
- package/rest/lastMileDelivery.d.ts +12 -0
- package/rest/locator.d.ts +24 -0
- package/rest/networkService.d.ts +5 -0
- package/rest/networks/queryAssociations.d.ts +7 -0
- package/rest/networks/support/NetworkElement.d.ts +1 -1
- package/rest/networks/synthesizeAssociationGeometries.d.ts +7 -0
- package/rest/networks/trace.d.ts +6 -0
- package/rest/places.d.ts +34 -0
- package/rest/print.d.ts +74 -0
- package/rest/query.d.ts +33 -0
- package/rest/route.d.ts +18 -0
- package/rest/serviceArea.d.ts +18 -0
- package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
- package/rest/support/AttachmentQuery.d.ts +0 -1
- package/rest/support/AttributeBinsQuery.d.ts +3 -3
- package/rest/support/AutoIntervalBinParameters.d.ts +4 -4
- package/rest/support/DateBinParameters.d.ts +2 -2
- package/rest/support/DateBinTimeInterval.d.ts +1 -1
- package/rest/support/DensifyParameters.d.ts +1 -1
- package/rest/support/DirectionsFeature.d.ts +1 -1
- package/rest/support/GPMessage.d.ts +1 -1
- package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
- package/rest/support/QuantizationParameters.d.ts +3 -3
- package/rest/support/Query.d.ts +0 -1
- package/rest/support/QueryMixin.d.ts +1 -1
- package/rest/support/RelationshipQuery.d.ts +0 -1
- package/rest/support/interfaces.d.ts +1 -2
- package/rest/symbolService.d.ts +9 -0
- package/smartMapping/heuristics/binLevel.d.ts +12 -0
- package/smartMapping/heuristics/scaleRange.d.ts +15 -0
- package/smartMapping/heuristics/sizeRange.d.ts +12 -0
- package/smartMapping/labels/bins.d.ts +13 -0
- package/smartMapping/labels/clusters.d.ts +17 -1
- package/smartMapping/popup/clusters.d.ts +21 -0
- package/smartMapping/popup/templates.d.ts +18 -0
- package/smartMapping/raster/renderers/classBreaks.d.ts +7 -0
- package/smartMapping/raster/renderers/colormap.d.ts +7 -0
- package/smartMapping/raster/renderers/flow.d.ts +19 -0
- package/smartMapping/raster/renderers/rgb.d.ts +7 -0
- package/smartMapping/raster/renderers/shadedRelief.d.ts +7 -0
- package/smartMapping/raster/renderers/stretch.d.ts +7 -0
- package/smartMapping/raster/renderers/uniqueValue.d.ts +7 -0
- package/smartMapping/raster/renderers/vectorField.d.ts +20 -0
- package/smartMapping/raster/support/colorRamps.d.ts +7 -0
- package/smartMapping/raster/support/utils.d.ts +5 -0
- package/smartMapping/renderers/color.d.ts +17 -0
- package/smartMapping/renderers/dotDensity.d.ts +21 -0
- package/smartMapping/renderers/heatmap.d.ts +17 -0
- package/smartMapping/renderers/location.d.ts +10 -0
- package/smartMapping/renderers/opacity.d.ts +19 -0
- package/smartMapping/renderers/pieChart.d.ts +19 -0
- package/smartMapping/renderers/predominance.d.ts +27 -0
- package/smartMapping/renderers/relationship.d.ts +48 -0
- package/smartMapping/renderers/size.d.ts +18 -0
- package/smartMapping/renderers/support/rendererUtils.d.ts +8 -0
- package/smartMapping/renderers/support/spikeUtils.d.ts +6 -0
- package/smartMapping/renderers/type.d.ts +18 -0
- package/smartMapping/renderers/univariateColorSize.d.ts +29 -0
- package/smartMapping/statistics/classBreaks.d.ts +14 -0
- package/smartMapping/statistics/heatmapStatistics.d.ts +15 -0
- package/smartMapping/statistics/histogram.d.ts +17 -0
- package/smartMapping/statistics/predominantCategories.d.ts +6 -0
- package/smartMapping/statistics/summaryStatistics.d.ts +15 -0
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +8 -1
- package/smartMapping/statistics/support/ageUtils.d.ts +8 -0
- package/smartMapping/statistics/support/predominanceUtils.d.ts +8 -1
- package/smartMapping/statistics/types.d.ts +6 -1
- package/smartMapping/statistics/uniqueValues.d.ts +13 -0
- package/smartMapping/symbology/color.d.ts +8 -0
- package/smartMapping/symbology/dotDensity.d.ts +7 -0
- package/smartMapping/symbology/flow.d.ts +8 -0
- package/smartMapping/symbology/heatmap.d.ts +8 -0
- package/smartMapping/symbology/location.d.ts +8 -0
- package/smartMapping/symbology/pieChart.d.ts +7 -0
- package/smartMapping/symbology/predominance.d.ts +7 -0
- package/smartMapping/symbology/relationship.d.ts +7 -0
- package/smartMapping/symbology/size.d.ts +7 -0
- package/smartMapping/symbology/support/colorRamps.d.ts +7 -0
- package/smartMapping/symbology/type.d.ts +8 -0
- package/support/groundUtils.js +1 -1
- package/support/popupUtils.d.ts +5 -0
- package/support/revision.js +1 -1
- package/support/timeUtils.d.ts +9 -0
- package/symbols/CIMSymbol.d.ts +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -2
- package/symbols/FillSymbol3DLayer.d.ts +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +2 -2
- package/symbols/ObjectSymbol3DLayer.d.ts +2 -2
- package/symbols/PathSymbol3DLayer.d.ts +2 -2
- package/symbols/TextSymbol.d.ts +2 -2
- package/symbols/support/Symbol3DFillMaterial.d.ts +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DHalo.d.ts +8 -4
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/cimConversionUtils.d.ts +9 -0
- package/symbols/support/cimSymbolUtils.d.ts +10 -0
- package/symbols/support/jsonUtils.d.ts +7 -0
- package/symbols/support/symbolUtils.d.ts +5 -0
- package/symbols.d.ts +59 -0
- package/tables/elements.d.ts +41 -0
- package/time/TimeExtent.d.ts +1 -1
- package/time/TimeInterval.d.ts +1 -1
- package/unionTypes.d.ts +5 -0
- package/versionManagement/utils.d.ts +5 -0
- package/versionManagement/versionAdapters/utils.d.ts +5 -0
- package/views/2d/MapViewConstraints.d.ts +18 -10
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +5 -0
- package/views/2d/layers/types.d.ts +6 -0
- package/views/2d/types.d.ts +3 -1
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +5 -0
- package/views/3d/analysis/LineOfSight/types.d.ts +5 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -0
- package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
- package/views/3d/environment/types.d.ts +13 -0
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +4 -5
- package/views/3d/webgl/RenderNode.d.ts +1 -1
- package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +8 -8
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
- package/views/3d/webgl.d.ts +6 -0
- package/views/BreakpointsOwner.d.ts +16 -16
- package/views/IBreakpointsOwner.d.ts +15 -15
- package/views/MapView.d.ts +1 -1
- package/views/PopupView.d.ts +2 -2
- package/views/SceneView.d.ts +14 -17
- package/views/SelectionManager.d.ts +1 -0
- package/views/SelectionManager.js +1 -1
- package/views/VideoView.d.ts +1 -2
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +8 -11
- package/views/View2D.d.ts +1 -2
- package/views/analysis/AreaMeasurement/types.d.ts +6 -0
- package/views/analysis/DistanceMeasurement/types.d.ts +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -4
- package/views/analysis/ElevationProfile/types.d.ts +6 -0
- package/views/analysis/types.d.ts +5 -0
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/PolygonDrawAction.d.ts +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.d.ts +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/types.d.ts +3 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/Units.d.ts +5 -1
- package/views/interactive/snapping/GridSnappingEngine.js +1 -1
- package/views/layers/BuildingSceneLayerView.d.ts +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +2 -3
- package/views/layers/LayerView.d.ts +1 -1
- package/views/layers/support/highlightUtils.js +1 -1
- package/views/support/colorUtils.d.ts +5 -0
- package/views/support/selectionUtils.js +1 -1
- package/views/types.d.ts +69 -1
- package/views/ui/types.d.ts +12 -1
- package/webscene/Environment.d.ts +2 -2
- package/webscene/support/FeatureReference.d.ts +1 -1
- package/webscene/types.d.ts +10 -1
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -2
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -1
- package/widgets/CatalogLayerList.d.ts +1 -1
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -2
- package/widgets/Daylight.d.ts +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
- package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
- package/widgets/Directions.d.ts +1 -2
- package/widgets/Editor/EditorViewModel.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflowData.d.ts +1 -1
- package/widgets/Editor/types.d.ts +8 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +2 -3
- package/widgets/Feature/types.d.ts +5 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
- package/widgets/FeatureForm/FieldInput.d.ts +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTemplates.d.ts +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +2 -2
- package/widgets/Features.d.ts +1 -2
- package/widgets/FloorFilter.d.ts +1 -1
- package/widgets/Home/HomeViewModel.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList/types.d.ts +2 -2
- package/widgets/LayerList.d.ts +1 -1
- package/widgets/Legend.d.ts +1 -1
- package/widgets/Locate/LocateViewModel.d.ts +2 -2
- package/widgets/Locate.d.ts +1 -1
- package/widgets/Popup/types.d.ts +2 -0
- package/widgets/Popup.d.ts +1 -2
- package/widgets/Print.d.ts +1 -1
- package/widgets/Search/types.d.ts +5 -0
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +1 -1
- package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Sketch/types.d.ts +1 -1
- package/widgets/Slice.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather.d.ts +1 -1
- package/widgets/smartMapping/support/utils.d.ts +6 -0
- package/widgets/support/GoTo.d.ts +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/forms/types.d.ts +2 -0
- package/widgets/support/symbolPreviewUtils.js +1 -1
- package/widgets/support/{goToUtils.d.ts → types.d.ts} +8 -1
- package/widgets/support/widget.d.ts +11 -0
- package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +0 -316
- package/assets/esri/core/workers/chunks/316f3e93aa0db48ef129.js +0 -1
- package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +0 -1
- package/assets/esri/core/workers/chunks/cd2ea924cb91cdb6dde9.js +0 -1
- package/assets/esri/core/workers/chunks/d57577c02fb2932e8305.js +0 -1
- package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
- package/colorUtils.d.ts +0 -13
- package/core/Logger.d.ts +0 -29
- package/core/Message.d.ts +0 -2
- package/core/Message.js +0 -5
- package/core/accessorSupport/PropertyOrigin.d.ts +0 -2
- package/core/sql/sql92grammar.d.ts +0 -12
- package/core/string.d.ts +0 -3
- package/core/time.d.ts +0 -2
- package/core/timeUtils.d.ts +0 -2
- package/views/2d/ViewStateManager.d.ts +0 -2
- package/views/2d/layers/support/clusterUtils.d.ts +0 -6
- package/views/3d/environment/lightingUtils.d.ts +0 -4
- package/views/3d/environment/weather.d.ts +0 -9
- package/views/3d/glTF/internal/resourceUtils.d.ts +0 -10
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
- package/views/3d/support/QualityProfile.d.ts +0 -2
- package/views/SceneViewHitTestResult.d.ts +0 -64
- package/views/ViewingMode.d.ts +0 -2
- package/views/draw/DrawingMode.d.ts +0 -2
- package/views/draw/support/drawUtils.d.ts +0 -7
- package/views/ui/Padding.d.ts +0 -11
- package/views/viewType.d.ts +0 -2
- package/views/webgl/enums.d.ts +0 -38
- package/webscene/support/featureReferenceUtils.d.ts +0 -4
- package/widgets/DirectionalPad/constants.d.ts +0 -2
- package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
- package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
- package/widgets/Popup/actions.d.ts +0 -4
- package/widgets/ShadowCast/DurationMode.d.ts +0 -3
- package/widgets/support/Heading.d.ts +0 -7
- package/widgets/support/forms/formUtils.d.ts +0 -2
- /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
- /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
package/Color.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { TupleRgb, TupleRgba } from "./colorUtils.js";
|
|
2
1
|
import type { Color as ColorJSON } from "./portal/jsonTypes.js";
|
|
3
2
|
|
|
4
3
|
export interface HexOutputOptions {
|
|
@@ -88,7 +87,7 @@ export default class Color {
|
|
|
88
87
|
* @returns Returns a new Color object.
|
|
89
88
|
* @example let redColor = Color.fromArray([201, 0, 19]);
|
|
90
89
|
*/
|
|
91
|
-
static fromArray(a: ColorJSON |
|
|
90
|
+
static fromArray(a: ColorJSON | readonly number[], t?: Color): Color;
|
|
92
91
|
/**
|
|
93
92
|
* Creates a Color from hexadecimal string.
|
|
94
93
|
*
|
|
@@ -261,11 +260,20 @@ export default class Color {
|
|
|
261
260
|
*
|
|
262
261
|
* @returns A 3-component array of rgb values.
|
|
263
262
|
*/
|
|
264
|
-
toRgb():
|
|
263
|
+
toRgb(): [
|
|
264
|
+
number,
|
|
265
|
+
number,
|
|
266
|
+
number
|
|
267
|
+
];
|
|
265
268
|
/**
|
|
266
269
|
* Returns a 4-component array of rgba values that represent the Color instance.
|
|
267
270
|
*
|
|
268
271
|
* @returns A 4-component array of rgba values.
|
|
269
272
|
*/
|
|
270
|
-
toRgba():
|
|
273
|
+
toRgba(): [
|
|
274
|
+
number,
|
|
275
|
+
number,
|
|
276
|
+
number,
|
|
277
|
+
number
|
|
278
|
+
];
|
|
271
279
|
}
|
package/Ground.d.ts
CHANGED
|
@@ -40,9 +40,8 @@ export interface GroundProperties extends LoadableMixinProperties, JSONSupportMi
|
|
|
40
40
|
navigationConstraint?: NavigationConstraintProperties | null;
|
|
41
41
|
/**
|
|
42
42
|
* The color of the ground surface, displayed underneath the basemap.
|
|
43
|
-
* If this is null, a grid is displayed instead. The alpha value in the
|
|
44
|
-
*
|
|
45
|
-
* opacity of the ground.
|
|
43
|
+
* If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the
|
|
44
|
+
* [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
|
|
46
45
|
*
|
|
47
46
|
* @since 4.8
|
|
48
47
|
*/
|
|
@@ -148,9 +147,8 @@ export default class Ground extends GroundSuperclass {
|
|
|
148
147
|
accessor opacity: number;
|
|
149
148
|
/**
|
|
150
149
|
* The color of the ground surface, displayed underneath the basemap.
|
|
151
|
-
* If this is null, a grid is displayed instead. The alpha value in the
|
|
152
|
-
*
|
|
153
|
-
* opacity of the ground.
|
|
150
|
+
* If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the
|
|
151
|
+
* [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
|
|
154
152
|
*
|
|
155
153
|
* @since 4.8
|
|
156
154
|
*/
|
package/Ground.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as r}from"tslib";import e from"./Color.js";import
|
|
5
|
+
import{__decorate as r}from"tslib";import e from"./Color.js";import o from"./core/Collection.js";import t from"./core/CollectionFlattener.js";import{referenceSetter as s}from"./core/collectionUtils.js";import{typeCast as a}from"./core/compilerUtils.js";import i from"./core/Error.js";import has from"./core/has.js";import{JSONSupportMixin as n}from"./core/JSONSupport.js";import{clone as l}from"./core/lang.js";import{Loadable as p}from"./core/Loadable.js";import{loadAll as c}from"./core/loadAll.js";import u from"./core/Logger.js";import{destroyMaybe as y}from"./core/maybe.js";import{isAbortError as d,throwIfAborted as m}from"./core/promiseUtils.js";import{property as h,subclass as f}from"./core/accessorSupport/decorators.js";import{Integer as g}from"./core/accessorSupport/ensureType.js";import{NavigationConstraint as v}from"./ground/NavigationConstraint.js";import{GroundSymbol as j}from"./support/groundInstanceUtils.js";import{transparencyToOpacity as w,opacityToTransparency as C}from"./webdoc/support/opacityUtils.js";import{writer as L}from"./core/accessorSupport/decorators/writer.js";var S,I;let b=I=class extends(n(p)){static{S=j}constructor(r){super(r),this[S]=!0,this.parent=null,this.opacity=1,this.surfaceColor=null,this.undergroundColor=has("enable-feature:oit-ground")?void 0:new e("white"),this.navigationConstraint=null,this.layers=new o;const s=r=>{const{parent:e}=r;e&&e!==this&&"remove"in e&&e.remove?.(r),r.parent=this,"elevation"!==r.type&&"base-elevation"!==r.type&&u.getLogger(this).error(`Layer '${r.title}, id:${r.id}' of type '${r.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`)},a=r=>{r.parent=null};this.addHandles([this.layers.on("after-add",r=>s(r.item)),this.layers.on("after-remove",r=>a(r.item))]),this.allLayers=new t({getCollections:()=>[this.layers,this.parent?.basemap?.groundLayers]})}removeChildLayer(r){this.layers.remove(r)}initialize(){this.when().catch(r=>{d(r)||u.getLogger(this).error("#load()","Failed to load ground",r)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}get integratedMeshGround(){const r=this.parent?.basemap?.groundLayers.at(0);return r?.replacesTerrain?r:null}destroy(){const r=this.layers.removeAll();for(const e of r)y(e);this.layers.destroy()}normalizeCtorArgs(r){return r&&"resourceInfo"in r&&(this._set("resourceInfo",r.resourceInfo),delete(r={...r}).resourceInfo),r}get loaded(){return super.loaded}get layers(){return this._get("layers")}set layers(r){this._set("layers",s(r,this._get("layers")))}writeLayers(r,e,o,t){const s=[];r?(t={...t,layerContainerType:"ground"},r.forEach(r=>{if("write"in r){const e={};a(r)().write(e,t)&&s.push(e)}else t?.messages&&t.messages.push(new i("layer:unsupported",`Layers (${r.title}, ${r.id}) of type '${r.declaredClass}' cannot be persisted in the ground`,{layer:r}))}),e.layers=s):e.layers=s}load(r){return this.addResolvingPromise(this._loadFromSource(r)),Promise.resolve(this)}loadAll(){return c(this,r=>r(this.layers))}async queryElevation(r,e){await this.load({signal:e?.signal});const{queryAll:o}=await import("./layers/support/ElevationQuery.js");m(e);return o(this.layers.filter(A).toArray(),r,e)}async createElevationSampler(r,e){await this.load({signal:e?.signal});const{createSampler:o}=await import("./layers/support/ElevationQuery.js");m(e);return o(this.layers.filter(A).toArray(),r,e)}clone(){const r={opacity:this.opacity,surfaceColor:l(this.surfaceColor),undergroundColor:l(this.undergroundColor),navigationConstraint:l(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(r.loadStatus="loaded"),new I({resourceInfo:this.resourceInfo}).set(r)}read(r,e){this.resourceInfo||this._set("resourceInfo",{data:r,context:e}),super.read(r,e)}_loadFromSource(r){const e=this.resourceInfo;return e?this._loadLayersFromJSON(e.data,e.context,r):Promise.resolve()}async _loadLayersFromJSON(r,e,o){const t=e?.origin||"web-scene",s=e?.portal||null,a=e?.url||null,{populateOperationalLayers:i}=await import("./layers/support/layersCreator.js");m(o);const n=[];if(r.layers&&Array.isArray(r.layers)){const e={context:{origin:t,url:a,portal:s,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};n.push(i(this.layers,r.layers,e))}await Promise.allSettled(n)}};function A(r){return r&&"createElevationSampler"in r}r([h()],b.prototype,"parent",void 0),r([h()],b.prototype,"integratedMeshGround",null),r([h({json:{read:!1,write:{isRequired:!0}}})],b.prototype,"layers",null),r([h()],b.prototype,"allLayers",void 0),r([L("layers")],b.prototype,"writeLayers",null),r([h({readOnly:!0})],b.prototype,"resourceInfo",void 0),r([h({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:g,read:{reader:w,source:"transparency"},write:{writer:(r,e)=>{e.transparency=C(r)},target:"transparency"}}})],b.prototype,"opacity",void 0),r([h({type:e,json:{type:[g],write:(r,e)=>{e.surfaceColor=r.toJSON().slice(0,3)}}})],b.prototype,"surfaceColor",void 0),r([h({type:e})],b.prototype,"undergroundColor",void 0),r([h({type:v,json:{write:!0}})],b.prototype,"navigationConstraint",void 0),b=I=r([f("esri.Ground")],b);const _=b;export{_ as default};
|
package/WebScene.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./core/Collection.js";import o from"./core/Error.js";import{clone as s}from"./core/lang.js";import{LoadableMixin as a}from"./core/Loadable.js";import{loadAll as n}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as p}from"./core/maybe.js";import{MultiOriginJSONMixin as c,MultiOriginJSONSupport as d}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as u}from"./core/promiseUtils.js";import{on as m,watch as y}from"./core/reactiveUtils.js";import{urlToObject as w,addQueryParameter as f}from"./core/urlUtils.js";import g from"./core/Warning.js";import{property as b,subclass as v}from"./core/accessorSupport/decorators.js";import{updateOrigins as _}from"./core/accessorSupport/originUtils.js";import{readLoadable as S}from"./core/accessorSupport/read.js";import A from"./geometry/Extent.js";import I from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as j}from"./geometry/projectionUtils.js";import L from"./geometry/SpatialReference.js";import{validateWebSceneError as R}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as P}from"./geometry/support/jsonUtils.js";import{isEarth as U}from"./geometry/support/spatialReferenceUtils.js";import V from"./portal/Portal.js";import O from"./portal/PortalItem.js";import{createForItemWrite as M}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as E,typeKeyword as C}from"./portal/support/portalItemUtils.js";import{hasDeveloperBasemapLayer as T}from"./support/basemapUtils.js";import{ensureType as N}from"./support/groundUtils.js";import x from"./support/MapFloorInfo.js";import{WebSceneTag as G}from"./support/tagSymbols.js";import{createSchemaValidationError as F}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as W}from"./views/support/spatialReferenceSupport.js";import $ from"./webdoc/Widgets.js";import{updateItemWithResources as J,saveResources as k}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as B}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as q}from"./webdoc/support/thumbnailUtils.js";import{isCopyAllowed as H,initializeNewItem as D}from"./webdoc/support/webdocSaveUtils.js";import z from"./webscene/ApplicationProperties.js";import K from"./webscene/Environment.js";import Q from"./webscene/InitialViewProperties.js";import X from"./webscene/Presentation.js";import Y from"./webscene/TransportationNetwork.js";import{Version as Z}from"./webscene/Version.js";import{alphaCutoff as ee}from"./webscene/support/AlphaCutoff.js";import{getLoader as te}from"./webscene/support/schemaValidatorLoader.js";import{writer as re}from"./core/accessorSupport/decorators/writer.js";import{reader as ie}from"./core/accessorSupport/decorators/reader.js";var oe;const se=new Z(1,39),ae=()=>{const e=8,t=[],r=se.major;for(let i=e;i<=se.minor;i++)t.push(`${r}.${i}`);return t},ne="Web Scene";let le=class extends(a(h(c(r)))){static{oe=G}constructor(e){super(e),this[oe]=!0,this._layersIdGCTimeoutId=void 0,this._updateFromPromise=null,this._afterLoadHooks=[],this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=void 0,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new X,this.initialViewProperties=new Q,this.portalItem=null,this.resourceInfo=null,this.widgets=null,this._debouncedSaveOperations=u(async(e,t,r)=>{switch(e){case 0:return this._saveImpl(t);case 1:return this._saveAsImpl(r,t)}}),this._loadContext={origin:"web-scene",initiator:this,hooks:{onAfterLoad:e=>this._afterLoadHooks.push(e)}},this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch(e=>{l.getLogger(this).error("#load()","Failed to load web scene",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this.addHandles(m(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC(),this.presentation&&this.presentation.destroy(),this.portalItem=p(this.portalItem)}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){t[r]=this._layersToJSON(e,"operational-layers",i)}get loaded(){return super.loaded}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new Z(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${se.major}.${se.minor}`}writeTables(e,t,r,i){const o=this._layersToJSON(e,"tables",i);o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}get ground(){return this._get("ground")}set ground(e){const t=N(e);null!=t&&this._set("ground",t)}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t,r){const{viewingMode:i,spatialReference:o}=t,s=new Q,a={...t.initialState};return void 0!==o&&(a.spatialReference=o),void 0!==i&&(a.viewingMode=i),s.read(a,r),s}get spatialReference(){return this.initialViewProperties?.spatialReference??L.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){const t=this.ground;return this.addResolvingPromise(this._loadFromSource().then(()=>{t&&t!==this.ground&&t.destroy(),this._validateFeatureLayerSymbolVisibility()})),Promise.resolve(this)}loadAll(){return n(this,e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map(e=>e.basemap),this.tables)})}read(e,t){t??=this._loadContext,t.origin="web-scene";const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(S(this,e,t=>super.read(e,t),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion?.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map(e=>({id:e.id})),r=this.presentation.slides,i=t.filter(e=>!r.some(t=>t.visibleLayers.some(t=>t.id===e.id)));r.forEach(e=>e.visibleLayers.addMany(i))}}_writeBasemapElevationLayers(e){const t=e.ground?.layers;!e.baseMap&&t?.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=s(t))}_layersToJSON(e,t,r){const i={...r,layerContainerType:t};return e.map(e=>this._verifyWritableLayer(e,r)?e.write({},i):null).filter(e=>!!e).toArray()}_verifyWritableLayer(e,t){return!!e.persistenceEnabled&&("write"in e||(t?.messages?.push(new o("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1))}write(e,t){if("loaded"!==this.loadStatus){const e=new o("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages?.filter(e=>"web-document-write:property-required"===e.name)??[];if(e.length){const t=new o("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw l.getLogger(this).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(0,e)}async _saveImpl(e){if(!this.portalItem)throw new o("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==ne)throw new o("webscene:portal-item-wrong-type",`Portal item needs to have type "${ne}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(M(this.portalItem,"web-scene",!0)),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,0,e),this._updateTypeKeywords(this.portalItem),await J(this.portalItem,i,this._resourceReferences,r),_(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _saveAsImpl(e,t){let r=O.from(e);if(!r)throw new o("webscene:portal-item-required","saveAs requires a portal item to save to");r.id&&(r=r.clone(),r.id=null);const i=r.portal||V.getDefault();await this._ensureLoadBeforeSave(),r.type=ne,r.portal=i;const s=this._enableVerifyItemRelativeUrls(M(r,"web-scene",!0)),a=this.write({},s);await Promise.all(s.resources.pendingOperations),await this._verifySaveAs(a,s,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(r),await i.signIn();const p=this.portalItem,c={item:p,authenticated:!(!p?.id||!p.portal.user)},{copyAllowed:h,itemReloaded:u}=await H(c,i);if(c.authenticated||=u,!h)throw new o(`${s.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const m={...t,copyAllResources:!0};return await D(r,c,a,m)&&(this._resourceReferences.portalItem=r),await k(this._resourceReferences,s),this.portalItem=r,d.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl?w(r.itemUrl):void 0}),_(s),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),s.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl})),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}async _verifySave(e,t,r,i){if(!U(this.spatialReference))throw new o("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const{ignoreUnsupported:s,requiredPropertyChecksDisabled:a,strictSchemaValidationEnabled:n}=i||{};B(t,{errorName:"webscene:save"},{ignoreUnsupported:s,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const p=te();if(n&&p){const t=(await p()).validate(e);if(!t.length)return;const i=`webscene did not validate:\n${t.join("\n")}`;l.getLogger(this).error(`${1===r?"saveAs":"save"}(): ${i}`);const s=t.map(e=>new o("webscene:schema-validation",e));throw F(s)}}_verifySaveAs(e,t,r){return this._verifySave(e,t,1,r)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(){return!1}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=K.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,this.initialViewProperties.timeExtent=e.timeExtent?.clone()??null,this.initialViewProperties.analyses.updateFrom(e),null!=e.clippingArea?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}if(!t.widgetsExcluded)for(const r of e.persistableViewModels)r.updateWebDocument(this);(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this.updateThumbnail(e,{size:t.thumbnailSize})}async updateThumbnail(e,t){const r=q(e,t?.size),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}async _loadFromSource(){this.resourceInfo?await this._loadFromJSON(this.resourceInfo):this.portalItem?.id?await this._loadFromItem(this.portalItem):await this._loadObjectsWithLayers(),await this._afterLoad()}async _afterLoad(){for(;this._afterLoadHooks.length;){const e=this._afterLoadHooks.slice();this._afterLoadHooks.length=0,await Promise.allSettled(e.map(e=>e(this._loadContext)))}}_readAndLoadFromJSON(e){const t=this._loadContext,r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion?.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion?.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}async _loadFromJSON(e){const t=new i;await this._validateSpatialReference(),await this._validateHeightModelInfo();const{populateOperationalLayers:r}=await import("./layers/support/layersCreator.js"),{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...this._loadContext,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||V.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(t,s,e))}o&&o.length>0&&n.push(r(this.layers,o,l)),e.tables?.length&&n.push(r(this.tables,e.tables,{...l,context:{...l.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"})),await Promise.allSettled(n),await this._loadObjectsWithLayers(),this.ground.layers.addMany(t.filter(e=>"base-elevation"===e.type||"elevation"===e.type))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[],t=[...this.allLayers.items];for(const{basemap:r}of this.presentation.slides.items)r&&(t.push(...r.baseLayers.items),t.push(...r.groundLayers.items),t.push(...r.referenceLayers.items));for(const r of t)if("beforeSave"in r&&"function"==typeof r.beforeSave){const t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach(t=>{t.basemap&&e.push(t.basemap.load())}),await Promise.allSettled(e)}async _loadFromItem(e){if(await e.load().catch(e=>{throw new o("webscene:load-portal-item","Failed to load portal item",{error:e})}),"Web Scene"!==e.type)throw new o("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r=this._loadContext;r.url=w(e.itemUrl),r.portal=e.portal||V.getDefault(),r.portalItem=e,r.readResourcePaths=[],await this._readAndLoadFromJSON(t),this._resourceReferences={portalItem:e,paths:r.readResourcePaths??[]}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!W(t,1))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||j(e,t)}else{if(!W(t,2))return Promise.reject(new o("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e?.camera?.position.spatialReference??e?.targetGeometry?.spatialReference,s=e.viewpoint,a=i(s);if(a&&!r(a))return Promise.reject(new o("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find(e=>!r(i(e.viewpoint)));if(n){const r=i(n.viewpoint);return Promise.reject(new o("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=R(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateFeatureLayerSymbolVisibility(){this.sourceVersion?.greaterEqual(1,35)||this.layers.forEach(e=>{"feature"===e.type&&e.addHandles(y(()=>e.loaded,()=>{"on-the-ground"===e.elevationInfo?.mode&&"simple"===e.renderer?.type&&"polygon-3d"===e.renderer.symbol?.type&&e.renderer.symbol.symbolLayers.some(t=>"fill"===t.type&&null!=t.material&&((!t.material.color||t.material.color.a*e.opacity<ee)&&(e.loadWarnings.push(new g("feature-layer:invisible-draped-symbols","FeatureLayer has fully transparent symbols which will no longer render or highlight",{layer:e})),!0)))},{once:!0,sync:!0}))})}_validateJSON(e){const t=Z.parse(e.version||"","webscene");return se.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=L.WebMercator.toJSON()),e}_updateTypeKeywords(e){E(e,C.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),E(e,C.DEVELOPER_BASEMAP,T(this.basemap)||this.presentation.slides.some(({basemap:e})=>!!e&&T(e))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||L.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?w(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout(()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()},3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties?.viewing?.search,t=e=>this.allLayers.some(t=>t.id===e&&t.persistenceEnabled);e?.layers&&(e.layers=e.layers.filter(e=>t(e.id)));const r=this.presentation&&this.presentation.slides;r&&r.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>t(e.id)))})}static fromJSON(e){if(!e)throw new o("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}static{this.version=`${se.major}.${se.minor}`}};e([b({type:z,json:{write:!0}})],le.prototype,"applicationProperties",void 0),e([b({type:A,json:{read:{source:"clippingArea.geometry",reader:P},write:{target:"clippingArea.geometry"}}})],le.prototype,"clippingArea",void 0),e([re("clippingArea")],le.prototype,"writeClippingArea",null),e([b({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],le.prototype,"clippingEnabled",void 0),e([ie("clippingEnabled",["clippingArea"])],le.prototype,"readClippingEnabled",null),e([re("clippingEnabled")],le.prototype,"writeClippingEnabled",null),e([b({type:x,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],le.prototype,"floorInfo",void 0),e([b({type:I,json:{write:!0}})],le.prototype,"heightModelInfo",void 0),e([b({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],le.prototype,"layers",void 0),e([re("layers")],le.prototype,"writeLayers",null),e([b({readOnly:!0,type:Z,json:{type:ae(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],le.prototype,"sourceVersion",void 0),e([ie("sourceVersion",["version"])],le.prototype,"readSourceVersion",null),e([re("sourceVersion")],le.prototype,"writeSourceVersion",null),e([b({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],le.prototype,"tables",void 0),e([re("tables")],le.prototype,"writeTables",null),e([b()],le.prototype,"thumbnailUrl",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],le.prototype,"authoringApp",null),e([re("authoringApp")],le.prototype,"writeAuthoringApp",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],le.prototype,"authoringAppVersion",null),e([re("authoringAppVersion")],le.prototype,"writeAuthoringAppVersion",null),e([b({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],le.prototype,"ground",null),e([re("ground")],le.prototype,"writeGround",null),e([b({type:i.ofType(Y),json:{write:!0}})],le.prototype,"transportationNetworks",void 0),e([b({type:X,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],le.prototype,"presentation",void 0),e([b({type:Q,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new Q({viewingMode:"global",spatialReference:L.WebMercator})}})],le.prototype,"initialViewProperties",void 0),e([ie("initialViewProperties",["initialState","spatialReference","viewingMode"])],le.prototype,"readInitialViewProperties",null),e([b({type:L,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],le.prototype,"spatialReference",null),e([b({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],le.prototype,"viewingMode",null),e([b({type:O})],le.prototype,"portalItem",void 0),e([b()],le.prototype,"resourceInfo",void 0),e([b({type:$,json:{write:!0}})],le.prototype,"widgets",void 0),le=e([v("esri.WebScene")],le);const pe=le;export{pe as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"./Color.js";import{version as r}from"./kernel.js";import i from"./Map.js";import o from"./core/Collection.js";import s from"./core/Error.js";import{clone as a}from"./core/lang.js";import{LoadableMixin as n}from"./core/Loadable.js";import{loadAll as l}from"./core/loadAll.js";import p from"./core/Logger.js";import{destroyMaybe as d}from"./core/maybe.js";import{MultiOriginJSONMixin as c,MultiOriginJSONSupport as h}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as u}from"./core/Promise.js";import{debounce as m}from"./core/promiseUtils.js";import{on as y,watch as w}from"./core/reactiveUtils.js";import{urlToObject as f,addQueryParameter as g}from"./core/urlUtils.js";import b from"./core/Warning.js";import{property as v,subclass as _}from"./core/accessorSupport/decorators.js";import{updateOrigins as S}from"./core/accessorSupport/originUtils.js";import{readLoadable as A}from"./core/accessorSupport/read.js";import I from"./geometry/Extent.js";import j from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as L}from"./geometry/projectionUtils.js";import R from"./geometry/SpatialReference.js";import{validateWebSceneError as P}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as V}from"./geometry/support/spatialReferenceUtils.js";import O from"./portal/Portal.js";import M from"./portal/PortalItem.js";import{createForItemWrite as C}from"./portal/support/jsonContext.js";import{toggleTypeKeyword as E,typeKeyword as T}from"./portal/support/portalItemUtils.js";import{hasDeveloperBasemapLayer as N}from"./support/basemapUtils.js";import{ensureType as x}from"./support/groundUtils.js";import G from"./support/MapFloorInfo.js";import{WebSceneTag as F}from"./support/tagSymbols.js";import{createSchemaValidationError as W}from"./support/webSceneUtils.js";import{isSpatialReferenceSupported as $}from"./views/support/spatialReferenceSupport.js";import J from"./webdoc/Widgets.js";import{updateItemWithResources as k,saveResources as B}from"./webdoc/support/resourceUtils.js";import{evaluateWriteErrors as q}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as H}from"./webdoc/support/thumbnailUtils.js";import{isCopyAllowed as D,initializeNewItem as z}from"./webdoc/support/webdocSaveUtils.js";import K from"./webscene/ApplicationProperties.js";import Q from"./webscene/Environment.js";import X from"./webscene/InitialViewProperties.js";import Y from"./webscene/Presentation.js";import Z from"./webscene/TransportationNetwork.js";import{Version as ee}from"./webscene/Version.js";import{alphaCutoff as te}from"./webscene/support/AlphaCutoff.js";import{getLoader as re}from"./webscene/support/schemaValidatorLoader.js";import{writer as ie}from"./core/accessorSupport/decorators/writer.js";import{reader as oe}from"./core/accessorSupport/decorators/reader.js";var se;const ae=new ee(1,39),ne=()=>{const e=8,t=[],r=ae.major;for(let i=e;i<=ae.minor;i++)t.push(`${r}.${i}`);return t},le="Web Scene";let pe=class extends(n(u(c(i)))){static{se=F}constructor(e){super(e),this[se]=!0,this._layersIdGCTimeoutId=void 0,this._updateFromPromise=null,this._afterLoadHooks=[],this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=void 0,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new Y,this.initialViewProperties=new X,this.portalItem=null,this.resourceInfo=null,this.widgets=null,this._debouncedSaveOperations=m(async(e,t,r)=>{switch(e){case 0:return this._saveImpl(t);case 1:return this._saveAsImpl(r,t)}}),this._loadContext={origin:"web-scene",initiator:this,hooks:{onAfterLoad:e=>this._afterLoadHooks.push(e)}},this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch(e=>{p.getLogger(this).error("#load()","Failed to load web scene",e)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this.addHandles(y(()=>this.allLayers,"change",()=>this._scheduleLayersIdGC()))}destroy(){this._unscheduleLayersIdGC(),this.presentation&&this.presentation.destroy(),this.portalItem=d(this.portalItem)}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){t[r]=this._layersToJSON(e,"operational-layers",i)}get loaded(){return super.loaded}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new ee(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${ae.major}.${ae.minor}`}writeTables(e,t,r,i){const o=this._layersToJSON(e,"tables",i);o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,t){e&&this._isAuthoringAppVersionSetByUser?t.authoringAppVersion=e:t.authoringAppVersion=r}get ground(){return this._get("ground")}set ground(e){const t=x(e);null!=t&&this._set("ground",t)}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t,r){const{viewingMode:i,spatialReference:o}=t,s=new X,a={...t.initialState};return void 0!==o&&(a.spatialReference=o),void 0!==i&&(a.viewingMode=i),s.read(a,r),s}get spatialReference(){return this.initialViewProperties?.spatialReference??R.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){const t=this.ground;return this.addResolvingPromise(this._loadFromSource().then(()=>{t&&t!==this.ground&&t.destroy(),this._validateFeatureLayerSymbolVisibility(),this._validateUndergroundColor()})),Promise.resolve(this)}loadAll(){return l(this,e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map(e=>e.basemap),this.tables)})}read(e,t){t??=this._loadContext,t.origin="web-scene";const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(A(this,e,t=>super.read(e,t),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion?.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map(e=>({id:e.id})),r=this.presentation.slides,i=t.filter(e=>!r.some(t=>t.visibleLayers.some(t=>t.id===e.id)));r.forEach(e=>e.visibleLayers.addMany(i))}}_writeBasemapElevationLayers(e){const t=e.ground?.layers;!e.baseMap&&t?.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=a(t))}_layersToJSON(e,t,r){const i={...r,layerContainerType:t};return e.map(e=>this._verifyWritableLayer(e,r)?e.write({},i):null).filter(e=>!!e).toArray()}_verifyWritableLayer(e,t){return!!e.persistenceEnabled&&("write"in e||(t?.messages?.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw p.getLogger(this).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages?.filter(e=>"web-document-write:property-required"===e.name)??[];if(e.length){const t=new s("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw p.getLogger(this).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(0,e)}async _saveImpl(e){if(!this.portalItem)throw new s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==le)throw new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${le}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls(C(this.portalItem,"web-scene",!0)),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,0,e),this._updateTypeKeywords(this.portalItem),await k(this.portalItem,i,this._resourceReferences,r),S(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _saveAsImpl(e,t){let r=M.from(e);if(!r)throw new s("webscene:portal-item-required","saveAs requires a portal item to save to");r.id&&(r=r.clone(),r.id=null);const i=r.portal||O.getDefault();await this._ensureLoadBeforeSave(),r.type=le,r.portal=i;const o=this._enableVerifyItemRelativeUrls(C(r,"web-scene",!0)),a=this.write({},o);await Promise.all(o.resources.pendingOperations),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");this._updateTypeKeywords(r),await i.signIn();const p=this.portalItem,d={item:p,authenticated:!(!p?.id||!p.portal.user)},{copyAllowed:c,itemReloaded:u}=await D(d,i);if(d.authenticated||=u,!c)throw new s(`${o.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const m={...t,copyAllResources:!0};return await z(r,d,a,m)&&(this._resourceReferences.portalItem=r),await B(this._resourceReferences,o),this.portalItem=r,h.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl?f(r.itemUrl):void 0}),S(o),n&&(this.thumbnailUrl=l?g(n,"w","8192"):n),o.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl})),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}async _verifySave(e,t,r,i){if(!V(this.spatialReference))throw new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently.");const{ignoreUnsupported:o,requiredPropertyChecksDisabled:a,strictSchemaValidationEnabled:n}=i||{};q(t,{errorName:"webscene:save"},{ignoreUnsupported:o,supplementalUnsupportedErrors:["scenemodification:unsupported"],requiredPropertyChecksDisabled:a});const l=re();if(n&&l){const t=(await l()).validate(e);if(!t.length)return;const i=`webscene did not validate:\n${t.join("\n")}`;p.getLogger(this).error(`${1===r?"saveAs":"save"}(): ${i}`);const o=t.map(e=>new s("webscene:schema-validation",e));throw W(o)}}_verifySaveAs(e,t,r){return this._verifySave(e,t,1,r)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(){return!1}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=Q.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,this.initialViewProperties.timeExtent=e.timeExtent?.clone()??null,this.initialViewProperties.analyses.updateFrom(e),null!=e.clippingArea?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}if(!t.widgetsExcluded)for(const r of e.persistableViewModels)r.updateWebDocument(this);(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this.updateThumbnail(e,{size:t.thumbnailSize})}async updateThumbnail(e,t){const r=H(e,t?.size),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}async _loadFromSource(){this.resourceInfo?await this._loadFromJSON(this.resourceInfo):this.portalItem?.id?await this._loadFromItem(this.portalItem):await this._loadObjectsWithLayers(),await this._afterLoad()}async _afterLoad(){for(;this._afterLoadHooks.length;){const e=this._afterLoadHooks.slice();this._afterLoadHooks.length=0,await Promise.allSettled(e.map(e=>e(this._loadContext)))}}_readAndLoadFromJSON(e){const t=this._loadContext,r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion?.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion?.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}async _loadFromJSON(e){const t=new o;await this._validateSpatialReference(),await this._validateHeightModelInfo();const{populateOperationalLayers:r}=await import("./layers/support/layersCreator.js"),{operationalLayers:i,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...this._loadContext,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||O.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(r(t,s,e))}i&&i.length>0&&n.push(r(this.layers,i,l)),e.tables?.length&&n.push(r(this.tables,e.tables,{...l,context:{...l.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"})),await Promise.allSettled(n),await this._loadObjectsWithLayers(),this.ground.layers.addMany(t.filter(e=>"base-elevation"===e.type||"elevation"===e.type))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[],t=[...this.allLayers.items];for(const{basemap:r}of this.presentation.slides.items)r&&(t.push(...r.baseLayers.items),t.push(...r.groundLayers.items),t.push(...r.referenceLayers.items));for(const r of t)if("beforeSave"in r&&"function"==typeof r.beforeSave){const t=r.beforeSave();t&&e.push(t)}await Promise.allSettled(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach(t=>{t.basemap&&e.push(t.basemap.load())}),await Promise.allSettled(e)}async _loadFromItem(e){if(await e.load().catch(e=>{throw new s("webscene:load-portal-item","Failed to load portal item",{error:e})}),"Web Scene"!==e.type)throw new s("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r=this._loadContext;r.url=f(e.itemUrl),r.portal=e.portal||O.getDefault(),r.portalItem=e,r.readResourcePaths=[],await this._readAndLoadFromJSON(t),this._resourceReferences={portalItem:e,paths:r.readResourcePaths??[]}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!$(t,1))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||L(e,t)}else{if(!$(t,2))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e?.camera?.position.spatialReference??e?.targetGeometry?.spatialReference,o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find(e=>!r(i(e.viewpoint)));if(n){const r=i(n.viewpoint);return Promise.reject(new s("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=P(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateFeatureLayerSymbolVisibility(){this.sourceVersion?.greaterEqual(1,35)||this.layers.forEach(e=>{"feature"===e.type&&e.addHandles(w(()=>e.loaded,()=>{"on-the-ground"===e.elevationInfo?.mode&&"simple"===e.renderer?.type&&"polygon-3d"===e.renderer.symbol?.type&&e.renderer.symbol.symbolLayers.some(t=>"fill"===t.type&&null!=t.material&&((!t.material.color||t.material.color.a*e.opacity<te)&&(e.loadWarnings.push(new b("feature-layer:invisible-draped-symbols","FeatureLayer has fully transparent symbols which will no longer render or highlight",{layer:e})),!0)))},{once:!0,sync:!0}))})}_validateUndergroundColor(){void 0===this.ground.undergroundColor&&this.sourceVersion?.lessThan(1,39)&&(this.ground.undergroundColor=new t("white"))}_validateJSON(e){const t=ee.parse(e.version||"","webscene");return ae.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=R.WebMercator.toJSON()),e}_updateTypeKeywords(e){E(e,T.LOCAL_SCENE,"local"===this.initialViewProperties.viewingMode),E(e,T.DEVELOPER_BASEMAP,N(this.basemap)||this.presentation.slides.some(({basemap:e})=>!!e&&N(e))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||R.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?f(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout(()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()},3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties?.viewing?.search,t=e=>this.allLayers.some(t=>t.id===e&&t.persistenceEnabled);e?.layers&&(e.layers=e.layers.filter(e=>t(e.id)));const r=this.presentation&&this.presentation.slides;r&&r.forEach(e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter(e=>t(e.id)))})}static fromJSON(e){if(!e)throw new s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}static{this.version=`${ae.major}.${ae.minor}`}};e([v({type:K,json:{write:!0}})],pe.prototype,"applicationProperties",void 0),e([v({type:I,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],pe.prototype,"clippingArea",void 0),e([ie("clippingArea")],pe.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],pe.prototype,"clippingEnabled",void 0),e([oe("clippingEnabled",["clippingArea"])],pe.prototype,"readClippingEnabled",null),e([ie("clippingEnabled")],pe.prototype,"writeClippingEnabled",null),e([v({type:G,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],pe.prototype,"floorInfo",void 0),e([v({type:j,json:{write:!0}})],pe.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],pe.prototype,"layers",void 0),e([ie("layers")],pe.prototype,"writeLayers",null),e([v({readOnly:!0,type:ee,json:{type:ne(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],pe.prototype,"sourceVersion",void 0),e([oe("sourceVersion",["version"])],pe.prototype,"readSourceVersion",null),e([ie("sourceVersion")],pe.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:{enabled:!0,ignoreOrigin:!0}}})],pe.prototype,"tables",void 0),e([ie("tables")],pe.prototype,"writeTables",null),e([v()],pe.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],pe.prototype,"authoringApp",null),e([ie("authoringApp")],pe.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],pe.prototype,"authoringAppVersion",null),e([ie("authoringAppVersion")],pe.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,enabled:!0,overridePolicy:()=>({isRequired:!0,enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],pe.prototype,"ground",null),e([ie("ground")],pe.prototype,"writeGround",null),e([v({type:o.ofType(Z),json:{write:!0}})],pe.prototype,"transportationNetworks",void 0),e([v({type:Y,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],pe.prototype,"presentation",void 0),e([v({type:X,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new X({viewingMode:"global",spatialReference:R.WebMercator})}})],pe.prototype,"initialViewProperties",void 0),e([oe("initialViewProperties",["initialState","spatialReference","viewingMode"])],pe.prototype,"readInitialViewProperties",null),e([v({type:R,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],pe.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],pe.prototype,"viewingMode",null),e([v({type:M})],pe.prototype,"portalItem",void 0),e([v()],pe.prototype,"resourceInfo",void 0),e([v({type:J,json:{write:!0}})],pe.prototype,"widgets",void 0),pe=e([_("esri.WebScene")],pe);const de=pe;export{de as default};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analysis utility functions for Web Components.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
import type MapView from "../../views/MapView.js";
|
|
2
7
|
import type SceneView from "../../views/SceneView.js";
|
|
3
8
|
import type ElevationProfileAnalysisView2D from "../../views/2d/analysis/ElevationProfileAnalysisView2D.js";
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Draw utils for Components.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
import type Extent from "../../geometry/Extent.js";
|
|
7
|
+
import type Multipoint from "../../geometry/Multipoint.js";
|
|
8
|
+
import type Point from "../../geometry/Point.js";
|
|
9
|
+
import type Polygon from "../../geometry/Polygon.js";
|
|
10
|
+
import type Polyline from "../../geometry/Polyline.js";
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type MoveGeometries = Extent | Multipoint | Point | Polygon | Polyline;
|
|
2
14
|
|
|
3
15
|
/**
|
|
4
16
|
* performs translation of given geometry
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* String utils for Components.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* Escapes special characters in a string used in a regular expression.
|
|
@@ -20,7 +24,7 @@ export function escapeRegExpString(regExpString: string, except?: string): strin
|
|
|
20
24
|
* @returns A string with the keys replaced.
|
|
21
25
|
* @internal
|
|
22
26
|
*/
|
|
23
|
-
export function replace(template: string, map: object |
|
|
27
|
+
export function replace(template: string, map: object | ((substring: string) => string) | null | undefined): string;
|
|
24
28
|
|
|
25
29
|
/**
|
|
26
30
|
* Remove all HTML tags from a string, leaving plain text content.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utils for knowledge studio supporting access to utilities shared between Studio and the SDK
|
|
3
|
+
*
|
|
4
|
+
* NOTE TO DEVS
|
|
5
|
+
* MINIMIZE USE OF INTERNAL SDK ACCESS!
|
|
6
|
+
* To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
|
|
7
|
+
* PS/3rd party developers.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
1
11
|
import type Graphic from "../../Graphic.js";
|
|
2
12
|
import type FeatureLayer from "../../layers/FeatureLayer.js";
|
|
3
13
|
import type KnowledgeGraphLayer from "../../layers/KnowledgeGraphLayer.js";
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utils for knowledge studio supporting access to utilities shared between Studio and the SDK
|
|
3
|
+
*
|
|
4
|
+
* NOTE TO DEVS
|
|
5
|
+
* MINIMIZE USE OF INTERNAL SDK ACCESS!
|
|
6
|
+
* To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
|
|
7
|
+
* PS/3rd part developers.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
1
11
|
import type WebLinkChart from "../../WebLinkChart.js";
|
|
2
12
|
import type Extent from "../../geometry/Extent.js";
|
|
3
13
|
import type Point from "../../geometry/Point.js";
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utils for knowledge studio supporting access to internal layer properties needed for in-memory state serialization
|
|
3
|
+
*
|
|
4
|
+
* NOTE TO DEVS
|
|
5
|
+
* MINIMIZE USE OF INTERNAL SDK ACCESS!
|
|
6
|
+
* To the maximum extent possible, ArcGIS Knowledge Studio should use the same public interface as
|
|
7
|
+
* PS/3rd part developers.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
1
11
|
import type KnowledgeGraphLayer from "../../layers/KnowledgeGraphLayer.js";
|
|
2
12
|
import type LinkChartLayer from "../../layers/LinkChartLayer.js";
|
|
3
13
|
import type KnowledgeGraphSublayer from "../../layers/knowledgeGraph/KnowledgeGraphSublayer.js";
|
|
4
14
|
import type { InclusionListDefinition } from "./generalSharedKgUtils.js";
|
|
5
|
-
import type { OriginName } from "../../core/accessorSupport/
|
|
15
|
+
import type { OriginName } from "../../core/accessorSupport/types.js";
|
|
6
16
|
|
|
7
17
|
/**
|
|
8
18
|
* @param layer - The layer to get the inclusion definition from.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility method for getting a Reshape instance with support for connected reshaping.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
import type Graphic from "../../Graphic.js";
|
|
2
7
|
import type Point from "../../geometry/Point.js";
|
|
3
8
|
import type FeatureLayer from "../../layers/FeatureLayer.js";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @beta
|
|
3
|
+
* @since 4.32
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
import type KnowledgeGraph from "../../rest/knowledgeGraph/KnowledgeGraph.js";
|
|
2
7
|
import type { AbortOptions } from "../../core/promiseUtils.js";
|
|
3
8
|
import type { InclusionListDefinition } from "../../layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media layer utilities for the map viewer application.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
import type Extent from "../../geometry/Extent.js";
|
|
2
7
|
import type ControlPointsGeoreference from "../../layers/support/ControlPointsGeoreference.js";
|
|
3
8
|
import type MapView from "../../views/MapView.js";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table template utilities for the map viewer application.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
1
6
|
import type CSVLayer from "../../layers/CSVLayer.js";
|
|
2
7
|
import type FeatureLayer from "../../layers/FeatureLayer.js";
|
|
3
8
|
import type GeoJSONLayer from "../../layers/GeoJSONLayer.js";
|