@arcgis/core 5.1.0-next.114 → 5.1.0-next.115
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/Map.js +1 -1
- package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
- package/analysis/ShadowCastAnalysis.d.ts +1 -1
- package/arcgisGlobal.d.ts +4 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
- package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
- package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
- package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
- package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
- package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
- package/assets/esri/core/workers/chunks/{e87d02af6d6b05e19d93.js → 16713986893adfbc9331.js} +1 -1
- package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
- package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
- package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
- package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
- package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
- package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
- package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
- package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
- package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
- package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
- package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
- package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
- package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
- package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
- package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
- package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
- package/assets/esri/core/workers/chunks/{39987c06636e757d1f00.js → 62b5972d0ef9bf173308.js} +1 -1
- package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
- package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
- package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
- package/assets/esri/core/workers/chunks/{14a241b07baa67743248.js → 7c292f7b181f3b93352b.js} +1 -1
- package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
- package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
- package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
- package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
- package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
- package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
- package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{548c34ea88f113d03c93.js → 86229634bf008f53dad4.js} +1 -1
- package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
- package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
- package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
- package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
- package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
- package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
- package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
- package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
- package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
- package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
- package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
- package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
- package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
- package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
- package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
- package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
- package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
- package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
- package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
- package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
- package/assets/esri/core/workers/chunks/{2f99a95facddc44319a9.js → da3c54e27a808f4fcc18.js} +1 -1
- package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
- package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
- package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
- package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
- package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
- package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
- package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
- package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
- package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
- package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
- package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GlobalIllumination.glsl.js +22 -34
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/templates/TemplateListing.d.ts +32 -0
- package/editing/templates/TemplateListing.js +2 -0
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +14 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +42 -0
- package/layers/AnnotationLayer.js +2 -0
- package/layers/DimensionFeatureLayer.d.ts +36 -1
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/types.d.ts +1 -1
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +1 -1
- package/rest/support/OutDistance.js +1 -1
- package/rest/support/Query.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
- package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/AnnotationLayerView2D.js +2 -0
- package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
- package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
- package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
- package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
- package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
- package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
- package/views/2d/layers/support/annodime/fields.js +2 -0
- package/views/2d/layers/support/annodime/unsupported.js +2 -0
- package/views/2d/layers/support/annodime/utils.js +2 -0
- package/views/2d/layers/support/annodime/virtualFields.js +2 -0
- package/views/2d/support/clippingUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/types.d.ts +5 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +53 -61
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +23 -32
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
- package/views/PopupView.d.ts +3 -3
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/layers/AnnotationLayerView.d.ts +18 -0
- package/views/layers/AnnotationLayerView.js +2 -0
- package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
- package/views/layers/DimensionFeatureLayerView.js +2 -0
- package/views/layers/FeatureLikeLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
- package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +0 -1
- package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +0 -1
- package/assets/esri/core/workers/chunks/03c46880b69ce75a010f.js +0 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
- package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
- package/assets/esri/core/workers/chunks/0e549d942d6cba1608cf.js +0 -1
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
- package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
- package/assets/esri/core/workers/chunks/179ffa2168c42615ccf2.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
- package/assets/esri/core/workers/chunks/27d7c701306efeea6b82.js +0 -1
- package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
- package/assets/esri/core/workers/chunks/2bdfae998371e3aa9f2d.js +0 -1
- package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
- package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
- package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
- package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
- package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +0 -1
- package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
- package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
- package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +0 -1
- package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +0 -1
- package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
- package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
- package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +0 -1
- package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +0 -1
- package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
- package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
- package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +0 -1
- package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +0 -1
- package/assets/esri/core/workers/chunks/817fd88fe9a48caf69fb.js +0 -1
- package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
- package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +0 -1
- package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
- package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
- package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
- package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +0 -1
- package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
- package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
- package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
- package/assets/esri/core/workers/chunks/b684ff4bc93bd60d6a19.js +0 -1
- package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
- package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
- package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +0 -1
- package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
- package/assets/esri/core/workers/chunks/d39f5590022d910ee951.js +0 -1
- package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +0 -1
- package/assets/esri/core/workers/chunks/d41b847d08c42e5329d6.js +0 -262
- package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
- package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +0 -1
- package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +0 -1
- package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
- package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
- package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
- package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
- package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
- package/assets/esri/core/workers/chunks/f9f331c76c96743d8522.js +0 -1
- package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +0 -1
- package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
- package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
- package/views/layers/support/dimensionUtils.js +0 -2
package/views/SceneView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{ignoreAbortErrors as c,throwIfDestroyed as g,throwIfAborted as m,createAbortError as y}from"../core/promiseUtils.js";import f from"../core/ReactiveSet.js";import{on as w,watch as v,initial as _,sync as b,whenOnce as M,syncAndInitial as S}from"../core/reactiveUtils.js";import{setFrameDuration as V,cleanupScheduling as j}from"../core/scheduling.js";import{createScreenPoint as C,createScreenPointArray as T}from"../core/screenUtils.js";import{cleanupWhereClauseCache as R}from"../core/sql.js";import{getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as H}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as I}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as F}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as P}from"../core/accessorSupport/trackingUtils.js";import{create as D}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import z from"../geometry/Extent.js";import W from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Q}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Z}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as ee}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as te,isTiledLayer as ie,isVoxelLayer as re,isIntegratedMeshLayer as se,isGaussianSplatLayer as ne}from"../layers/support/layerUtils.js";import{TilemapCache as ae}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as oe}from"../portal/portalDefault.js";import{WebSceneTag as le}from"../support/tagSymbols.js";import{BreakpointsOwner as pe}from"./BreakpointsOwner.js";import{DOMContainer as he}from"./DOMContainer.js";import{PopupView as de}from"./PopupView.js";import ue from"./View.js";import ce from"./ViewAnimation.js";import{stringFromViewingMode as ge,viewingModeFromString as me}from"./ViewingMode.js";import{GroundView3D as ye}from"./3d/GroundView3D.js";import{layerView3DImporter as fe}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as we}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ve}from"./3d/camera/intersectionUtils.js";import _e from"./3d/constraints/Constraints.js";import be from"./3d/environment/Environment.js";import{EnvironmentManager as Me}from"./3d/environment/EnvironmentManager.js";import Se from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ve}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as je}from"./3d/layers/graphics/Labeler.js";import Ce from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Te}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as Re}from"./3d/state/ScreenSizePerspective.js";import xe from"./3d/state/ViewState.js";import{ViewStateManager as Ae,cleanupViewStateManager as Oe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ee}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Le}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as He}from"./3d/state/utils/navigationUtils.js";import Ie from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Pe}from"./3d/support/debugFlags.js";import{getElevationAtPoint as De}from"./3d/support/ElevationProvider.js";import{toMap as Ue,hitTest as Ge}from"./3d/support/hitTest.js";import{popupHitTest as ze}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as We,getQualityProfileSettings as qe}from"./3d/support/QualityProfile.js";import ke from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Be}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ne}from"./3d/support/ResourceController.js";import Qe from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ze}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ye}from"./3d/support/ViewSlice.js";import{PointsOfInterest as $e}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Je from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ke,getTiledLayerInfo as Xe,checkIfTileInfoSupportedForView as et}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as tt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as it}from"./3d/terrain/TileRenderer.js";import{Stage as rt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as st}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as nt}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as at}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ot}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as lt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as pt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ht from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as dt}from"./support/drapedUtils.js";import{occludeesSupported as ut}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ct,createScreenPointFromSupportedEvent as gt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as mt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as yt,destroyTextureCompressionWorker as ft}from"./support/TextureCompressionHelper.js";import wt from"./ui/DefaultUI.js";import vt from"./ui/3d/DefaultUI3D.js";import _t from"../webscene/Environment.js";import{clearVNodeCache as bt}from"../widgets/support/vnodeCache.js";var Mt;const St=Symbol(),Vt=Symbol();let jt=class extends(pe(de(he(ue)))){static{Mt=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ne(this),this.deconflictor=new Ve({view:this}),this.attribution3D=new Ie({view:this}),this.labeler=new je({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new _e,this._environment=new be,this.environmentManager=new Me,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ht({importAnalysisViewModule:e=>we(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new f,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new xe({view:this}),this.slice=new Ye,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new vt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([w(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),v(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Se({view:this}),this.stateManager=new Ae({view:this}),this.screenSizePerspective=new Re({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=yt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ye({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>V(e>0?1e3/Math.ceil(e):0),_),this.addHandles([v(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),b),v(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),b)])}destroy(){this.destroyed||(ft(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.basemapTerrain?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof z?this.spatialReference&&(t=Ct(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new z({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof be?e:e instanceof _t?this.environment?.cloneWithWebsceneEnvironment(e)??be.fromWebsceneEnvironment(e):L(be,e):new be}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Mt._layerToLayerview}static{this._layerToLayerview=ue._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&le in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=qe(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new ke(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||We()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?F(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?W.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ke(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(s?.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)s?.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ge(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ge(this.defaultsFromMap.viewingMode):mt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Qe(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ue(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=At,t.x=e.x,t.y=e.y,t.z=De(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Tt,this.renderSpatialReference),this.state.camera.projectToScreen(Tt,Rt),C(Rt[0],Rt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Tt,i);const r=this.state.camera.computeScreenPixelSizeAt(Tt);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ct(e)?gt(this,e):e;return Ge(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ze(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return c(this.goTo({zoomFactor:2}))}async zoomOut(){if(this.canZoomOut)return c(this.goTo({zoomFactor:.5}))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!st())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return fe.importLayerView(e)}hasLayerViewModule(e){return fe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?me(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!mt(e,i)&&(null==t||(!!te(t)||(!ie(t)||null!=Xe(t,e,i))&&(!re(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(te(t)&&(r||s)){return!s||2===i||null===et(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:N.WebMercator,viewingMode:i}]:[{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}return ie(t)||re(t)||!r&&!s?ie(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:N.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?N.WGS84:N.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ge(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&ut(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await M(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Ot[e]();if(t&&(g(this),m(i.signal),await t(i.signal)),this.destroyed)throw y();return m(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Je({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new $e({view:this})),this.addHandles([this.updatingHandles.add(()=>Pe.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Pe.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},S),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},S),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},b)],St),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Vt),this.removeHandles(St),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Be.create(this.state.viewingMode,i)),t||this.addHandles(v(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Z(e,this.groundView.spatialReference,xt,t)||(this.renderCoordsHelper.extent=xt)},b),Vt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Vt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(v(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),b),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Le(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new rt({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(at/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ze({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>M(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===me(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(w(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?I(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(lt);for(const t of this.allLayerViews)(se(t.layer)||ne(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(lt);for(const t of this.allLayerViews)se(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){bt(),P(),R(),pt(),Oe(),ve(),Te(),Q(),dt(),oe(),it(),ot(),Ee(),He(),U(),j(),nt(),tt(),Ce.cleanupI3SLodHandling(),ae.cleanupTilemapCache(),xe.cleanupViewstate(),Je.cleanupTerrainSurface()}};function Ct(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A()],jt.prototype,"_userClippingArea",void 0),e([A()],jt.prototype,"_resourceController",void 0),e([A()],jt.prototype,"stage",null),e([A({readOnly:!0})],jt.prototype,"deconflictor",void 0),e([A({readOnly:!0})],jt.prototype,"labeler",void 0),e([A({type:ce,readOnly:!0})],jt.prototype,"animation",null),e([A({readOnly:!0})],jt.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],jt.prototype,"overlayManager",null),e([A({readOnly:!0})],jt.prototype,"elevationProvider",void 0),e([A()],jt.prototype,"camera",null),e([A({type:t})],jt.prototype,"contentCamera",null),e([A({readOnly:!0})],jt.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],jt.prototype,"center",null),e([A({type:z})],jt.prototype,"clippingArea",null),e([A({type:_e,nonNullable:!0})],jt.prototype,"constraints",void 0),e([A({type:z,readOnly:!0})],jt.prototype,"renderDataExtent",null),e([A({readOnly:!0})],jt.prototype,"tileInfo",null),e([A({type:z,readOnly:!0})],jt.prototype,"dataExtent",null),e([A({type:z,readOnly:!0})],jt.prototype,"_groundAndLayersExtent",null),e([A({type:be})],jt.prototype,"environment",null),e([O("environment")],jt.prototype,"castEnvironment",null),e([A({readOnly:!0})],jt.prototype,"environmentManager",void 0),e([A({type:z})],jt.prototype,"extent",null),e([A({type:r})],jt.prototype,"floors",void 0),e([A()],jt.prototype,"screenCenter",null),e([A()],jt.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],jt.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],jt.prototype,"graphicsView",void 0),e([A()],jt.prototype,"analysisViewManager",void 0),e([A()],jt.prototype,"groundView",void 0),e([A({readOnly:!0})],jt.prototype,"layerviewCollections",null),e([A({type:Boolean})],jt.prototype,"initialExtentRequired",null),e([A()],jt.prototype,"defaultsFromMapSettings",null),e([A()],jt.prototype,"interacting",null),e([A()],jt.prototype,"stationary",null),e([A()],jt.prototype,"navigating",null),e([A()],jt.prototype,"map",void 0),e([A()],jt.prototype,"padding",null),e([A({type:$e,readOnly:!0})],jt.prototype,"pointsOfInterest",void 0),e([A()],jt.prototype,"_featureTiles",void 0),e([A()],jt.prototype,"featureTiles",null),e([A()],jt.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],jt.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],jt.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],jt.prototype,"state",void 0),e([A()],jt.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],jt.prototype,"inputManager",void 0),e([A({readOnly:!0})],jt.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],jt.prototype,"qualityProfile",null),e([A({type:ke,get(){let e=this._get("qualitySettings");if(!e){const t=qe(this.qualityProfile);e=new ke(t)}return e}})],jt.prototype,"qualitySettings",void 0),e([A()],jt.prototype,"slice",void 0),e([A({readOnly:!0})],jt.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],jt.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],jt.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],jt.prototype,"resolution",null),e([A({type:Number})],jt.prototype,"scale",null),e([A({readOnly:!0,type:Number})],jt.prototype,"terrainLevel",null),e([A()],jt.prototype,"heightModelInfo",null),e([A({type:N})],jt.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],jt.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],jt.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],jt.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],jt.prototype,"type",void 0),e([A(),O(e=>e instanceof wt?e:H(vt,e))],jt.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],jt.prototype,"updating",null),e([A()],jt.prototype,"_updatingObjects",null),e([A()],jt.prototype,"_updatingObjectsWithProgress",null),e([A({type:Number,readOnly:!0})],jt.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],jt.prototype,"viewingMode",null),e([A({type:i})],jt.prototype,"viewpoint",null),e([A({readOnly:!0})],jt.prototype,"visibleArea",null),e([A({type:Number})],jt.prototype,"zoom",null),e([A({readOnly:!0})],jt.prototype,"quality",null),e([A({readOnly:!0})],jt.prototype,"resolutionScale",null),e([A()],jt.prototype,"focusAreasView",void 0),e([A()],jt.prototype,"_defaultToMapOptions",null),e([A()],jt.prototype,"_defaultHitTestOptions",null),jt=Mt=e([E("esri.views.SceneView")],jt);const Tt=D(),Rt=T(),xt=J(),At=ee(0,0,0,N.WebMercator),Ot={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Et=jt;export{Et as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{ignoreAbortErrors as c,throwIfDestroyed as g,throwIfAborted as m,createAbortError as y}from"../core/promiseUtils.js";import f from"../core/ReactiveSet.js";import{on as w,watch as v,initial as _,sync as b,whenOnce as M,syncAndInitial as S}from"../core/reactiveUtils.js";import{setFrameDuration as V,cleanupScheduling as j}from"../core/scheduling.js";import{createScreenPoint as C,isScreenRect as T,createScreenPointArray as R}from"../core/screenUtils.js";import{cleanupWhereClauseCache as x}from"../core/sql.js";import{getMetersPerUnitForSR as A}from"../core/units.js";import{property as O,cast as E,subclass as L}from"../core/accessorSupport/decorators.js";import{ensureType as H,ensureClass as I}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as F}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as P}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as D}from"../core/accessorSupport/trackingUtils.js";import{create as U}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as G}from"../core/libs/rbush/PooledRBush.js";import{initialize as z}from"../core/workers/workers.js";import W from"../geometry/Extent.js";import q from"../geometry/HeightModelInfo.js";import k from"../geometry/Point.js";import{project as B,canProjectWithoutEngine as N}from"../geometry/projectionUtils.js";import Q from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Z}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Y}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as $}from"../geometry/projection/projectPointToVector.js";import{toExtent as J,create as K}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as X}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as ee}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as te}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as ie,isTiledLayer as re,isVoxelLayer as se,isIntegratedMeshLayer as ne,isGaussianSplatLayer as ae}from"../layers/support/layerUtils.js";import{TilemapCache as oe}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as le}from"../portal/portalDefault.js";import{WebSceneTag as pe}from"../support/tagSymbols.js";import{BreakpointsOwner as he}from"./BreakpointsOwner.js";import{DOMContainer as de}from"./DOMContainer.js";import{PopupView as ue}from"./PopupView.js";import ce from"./View.js";import ge from"./ViewAnimation.js";import{stringFromViewingMode as me,viewingModeFromString as ye}from"./ViewingMode.js";import{GroundView3D as fe}from"./3d/GroundView3D.js";import{layerView3DImporter as we}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as ve}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as _e}from"./3d/camera/intersectionUtils.js";import be from"./3d/constraints/Constraints.js";import Me from"./3d/environment/Environment.js";import{EnvironmentManager as Se}from"./3d/environment/EnvironmentManager.js";import Ve from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as je}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ce}from"./3d/layers/graphics/Labeler.js";import Te from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Re}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as xe}from"./3d/state/ScreenSizePerspective.js";import Ae from"./3d/state/ViewState.js";import{ViewStateManager as Oe,cleanupViewStateManager as Ee}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Le}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as He}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Ie}from"./3d/state/utils/navigationUtils.js";import Fe from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Pe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as De}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ue}from"./3d/support/ElevationProvider.js";import{toMap as Ge,hitTest as ze}from"./3d/support/hitTest.js";import{popupHitTest as We}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as qe,getQualityProfileSettings as ke}from"./3d/support/QualityProfile.js";import Be from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ne}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Qe}from"./3d/support/ResourceController.js";import Ze from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Ye}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as $e}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Je}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ke from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Xe,getTiledLayerInfo as et,checkIfTileInfoSupportedForView as tt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as it}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as rt}from"./3d/terrain/TileRenderer.js";import{Stage as st}from"./3d/webgl-engine/Stage.js";import{olidEnabled as nt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as at}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as ot}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as lt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as pt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as ht}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import dt from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as ut}from"./support/drapedUtils.js";import{occludeesSupported as ct}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as gt,createScreenPointFromSupportedEvent as mt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as yt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as ft,destroyTextureCompressionWorker as wt}from"./support/TextureCompressionHelper.js";import vt from"./ui/DefaultUI.js";import _t from"./ui/3d/DefaultUI3D.js";import bt from"../webscene/Environment.js";import{clearVNodeCache as Mt}from"../widgets/support/vnodeCache.js";var St;const Vt=Symbol(),jt=Symbol();let Ct=class extends(he(ue(de(ce)))){static{St=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Qe(this),this.deconflictor=new je({view:this}),this.attribution3D=new Fe({view:this}),this.labeler=new Ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=new Pe({view:this}),this._canvas=null,this.constraints=new be,this._environment=new Me,this.environmentManager=new Se,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new dt({importAnalysisViewModule:e=>ve(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new f,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Ae({view:this}),this.slice=new $e,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new _t,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,z();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([w(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),v(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ve({view:this}),this.stateManager=new Oe({view:this}),this.screenSizePerspective=new xe({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=ft(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new fe({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},_),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>V(e>0?1e3/Math.ceil(e):0),_),this.addHandles([v(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),b),v(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),b)])}destroy(){this.destroyed||(wt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.basemapTerrain?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=H(k,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof W?this.spatialReference&&(t=Tt(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Tt(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||Q.WGS84,i=Tt(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||Q.WGS84;let t;const i=i=>{const r=Tt(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new W({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof Me?e:e instanceof bt?this.environment?.cloneWithWebsceneEnvironment(e)??Me.fromWebsceneEnvironment(e):H(Me,e):new Me}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return St._layerToLayerview}static{this._layerToLayerview=ce._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=ke(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Be(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||qe()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?P(()=>ee(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?q.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Xe(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(s?.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)s?.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return me(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?me(this.defaultsFromMap.viewingMode):yt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Ze(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=gt(e)?mt(this,e):e;return Ge(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=Ot,t.x=e.x,t.y=e.y,t.z=Ue(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),$(t,Rt,this.renderSpatialReference),this.state.camera.projectToScreen(Rt,xt),C(xt[0],xt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;$(e,Rt,i);const r=this.state.camera.computeScreenPixelSizeAt(Rt);return t&&i!==t?r*A(i)/A(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=gt(e)?mt(this,e):e;return ze(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return T(e)&&(p.getLogger(this).warn("#fetchPopupFeatures()","rectangle isn't a supported input, using its center point instead"),e=C(e.x+e.width/2,e.y+e.height/2)),We(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return c(this.goTo({zoomFactor:2}))}async zoomOut(){if(this.canZoomOut)return c(this.goTo({zoomFactor:.5}))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!nt())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return we.importLayerView(e)}hasLayerViewModule(e){return we.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?ye(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!yt(e,i)&&(null==t||(!!ie(t)||(!re(t)||null!=et(t,e,i))&&(!se(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(ie(t)&&(r||s)){return!s||2===i||null===tt(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:Q.WebMercator,viewingMode:i}]:[{spatialReference:r?Q.WGS84:Q.WebMercator,viewingMode:i}]}return re(t)||se(t)||!r&&!s?re(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:Q.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?Q.WGS84:Q.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${me(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&ct(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await M(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Et[e]();if(t&&(g(this),m(i.signal),await t(i.signal)),this.destroyed)throw y();return m(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ke({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Je({view:this})),this.addHandles([this.updatingHandles.add(()=>De.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&De.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},S),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?B(J(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},S),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},b)],Vt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(jt),this.removeHandles(Vt),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=X(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ne.create(this.state.viewingMode,i)),t||this.addHandles(v(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Y(e,this.groundView.spatialReference,At,t)||(this.renderCoordsHelper.extent=At)},b),jt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(ot/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(jt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(v(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),b),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new He(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new st({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(ot/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Ye({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>M(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===ye(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(w(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?F(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(pt);for(const t of this.allLayerViews)(ne(t.layer)||ae(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(pt);for(const t of this.allLayerViews)ne(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){Mt(),D(),x(),ht(),Ee(),_e(),Re(),Z(),ut(),le(),rt(),lt(),Le(),Ie(),G(),j(),at(),it(),Te.cleanupI3SLodHandling(),oe.cleanupTilemapCache(),Ae.cleanupViewstate(),Ke.cleanupTerrainSurface()}};function Tt(e,t){return null!=e&&N(e.spatialReference,t)?B(e,t):null}e([O()],Ct.prototype,"_userClippingArea",void 0),e([O()],Ct.prototype,"_resourceController",void 0),e([O()],Ct.prototype,"stage",null),e([O({readOnly:!0})],Ct.prototype,"deconflictor",void 0),e([O({readOnly:!0})],Ct.prototype,"labeler",void 0),e([O({type:ge,readOnly:!0})],Ct.prototype,"animation",null),e([O({readOnly:!0})],Ct.prototype,"basemapTerrain",void 0),e([O({readOnly:!0})],Ct.prototype,"overlayManager",null),e([O({readOnly:!0})],Ct.prototype,"elevationProvider",void 0),e([O()],Ct.prototype,"camera",null),e([O({type:t})],Ct.prototype,"contentCamera",null),e([O({readOnly:!0})],Ct.prototype,"canvas",null),e([O({type:k,useTypeForAutocast:!1})],Ct.prototype,"center",null),e([O({type:W})],Ct.prototype,"clippingArea",null),e([O({type:be,nonNullable:!0})],Ct.prototype,"constraints",void 0),e([O({type:W,readOnly:!0})],Ct.prototype,"renderDataExtent",null),e([O({readOnly:!0})],Ct.prototype,"tileInfo",null),e([O({type:W,readOnly:!0})],Ct.prototype,"dataExtent",null),e([O({type:W,readOnly:!0})],Ct.prototype,"_groundAndLayersExtent",null),e([O({type:Me})],Ct.prototype,"environment",null),e([E("environment")],Ct.prototype,"castEnvironment",null),e([O({readOnly:!0})],Ct.prototype,"environmentManager",void 0),e([O({type:W})],Ct.prototype,"extent",null),e([O({type:r})],Ct.prototype,"floors",void 0),e([O()],Ct.prototype,"screenCenter",null),e([O()],Ct.prototype,"frustum",null),e([O({type:Number,readOnly:!0})],Ct.prototype,"fullOpacity",void 0),e([O({readOnly:!0})],Ct.prototype,"graphicsView",void 0),e([O()],Ct.prototype,"analysisViewManager",void 0),e([O()],Ct.prototype,"groundView",void 0),e([O({readOnly:!0})],Ct.prototype,"layerviewCollections",null),e([O({type:Boolean})],Ct.prototype,"initialExtentRequired",null),e([O()],Ct.prototype,"defaultsFromMapSettings",null),e([O()],Ct.prototype,"interacting",null),e([O()],Ct.prototype,"stationary",null),e([O()],Ct.prototype,"navigating",null),e([O()],Ct.prototype,"map",void 0),e([O()],Ct.prototype,"padding",null),e([O({type:Je,readOnly:!0})],Ct.prototype,"pointsOfInterest",void 0),e([O()],Ct.prototype,"_featureTiles",void 0),e([O()],Ct.prototype,"featureTiles",null),e([O()],Ct.prototype,"_featureTreeDebugger",void 0),e([O({constructOnly:!0})],Ct.prototype,"deactivatedWebGLExtensions",void 0),e([O({constructOnly:!0})],Ct.prototype,"debugWebGLExtensions",void 0),e([O({constructOnly:!0})],Ct.prototype,"renderCanvas",void 0),e([O({constructOnly:!0})],Ct.prototype,"state",void 0),e([O()],Ct.prototype,"screenSizePerspective",void 0),e([O({readOnly:!0})],Ct.prototype,"inputManager",void 0),e([O({readOnly:!0})],Ct.prototype,"stateManager",void 0),e([O({type:["low","medium","high"]})],Ct.prototype,"qualityProfile",null),e([O({type:Be,get(){let e=this._get("qualitySettings");if(!e){const t=ke(this.qualityProfile);e=new Be(t)}return e}})],Ct.prototype,"qualitySettings",void 0),e([O()],Ct.prototype,"slice",void 0),e([O({readOnly:!0})],Ct.prototype,"typeSpecificPreconditionsReady",null),e([O({readOnly:!0})],Ct.prototype,"renderCoordsHelper",void 0),e([O({readOnly:!0})],Ct.prototype,"sceneIntersectionHelper",void 0),e([O({type:Number,readOnly:!0})],Ct.prototype,"resolution",null),e([O({type:Number})],Ct.prototype,"scale",null),e([O({readOnly:!0,type:Number})],Ct.prototype,"terrainLevel",null),e([O()],Ct.prototype,"heightModelInfo",null),e([O({type:Q})],Ct.prototype,"spatialReference",void 0),e([O({type:Boolean,value:!1})],Ct.prototype,"alphaCompositingEnabled",null),e([O({constructOnly:!0})],Ct.prototype,"preserveDrawingBufferEnabled",void 0),e([O({type:Boolean})],Ct.prototype,"supersampleScreenshotsEnabled",void 0),e([O({readOnly:!0})],Ct.prototype,"type",void 0),e([O(),E(e=>e instanceof vt?e:I(_t,e))],Ct.prototype,"ui",void 0),e([O({type:Boolean,readOnly:!0})],Ct.prototype,"updating",null),e([O()],Ct.prototype,"_updatingObjects",null),e([O()],Ct.prototype,"_updatingObjectsWithProgress",null),e([O({type:Number,readOnly:!0})],Ct.prototype,"updatingProgress",void 0),e([O({type:["global","local"]})],Ct.prototype,"viewingMode",null),e([O({type:i})],Ct.prototype,"viewpoint",null),e([O({readOnly:!0})],Ct.prototype,"visibleArea",null),e([O({type:Number})],Ct.prototype,"zoom",null),e([O({readOnly:!0})],Ct.prototype,"quality",null),e([O({readOnly:!0})],Ct.prototype,"resolutionScale",null),e([O()],Ct.prototype,"focusAreasView",void 0),e([O()],Ct.prototype,"_defaultToMapOptions",null),e([O()],Ct.prototype,"_defaultHitTestOptions",null),Ct=St=e([L("esri.views.SceneView")],Ct);const Rt=U(),xt=R(),At=K(),Ot=te(0,0,0,Q.WebMercator),Et={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Lt=Ct;export{Lt as default};
|
package/views/View2D.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import f from"../layers/support/TileInfo.js";import{BreakpointsOwner as w}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as v}from"./PopupView.js";import M from"./View.js";import{Viewport2DBaseMixin as _}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as b}from"./Viewport2DMixin.js";import S from"./2d/AnimationManager.js";import{layerView2DImporter as R}from"./2d/layerViewModuleImportUtils.js";import j from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as T}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as O}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as k}from"./2d/engine/ManagedCanvas.js";import L from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{hitTest as D}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as P,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as A}from"./2d/support/Timeline.js";import E from"./navigation/Navigation.js";import I from"./navigation/NavigationActionMap.js";import U from"./support/AnalysisViewManager.js";import G from"./ui/DefaultUI.js";import F from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as q}from"./webgl/RenderingContextOptions.js";import{isWebMap as W}from"../webmap/utils.js";import N from"../webmap/background/ColorBackground.js";let B,H,Z,K,Q,J;async function X(){const[,{GraphicsView2D:e,GraphicContainer:t,MapViewNavigation:i,MagnifierView2D:r,GridView2D:s,Stage:a}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);H=e,Z=t,K=i,Q=r,J=s,B=a}let Y=class extends(b(_(w(v(V(M)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.navigation=new E({actionMap:new I({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new U({importAnalysisViewModule:e=>O(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new A,this.type="2d",this.view2dType=null,this.ui=new F,this.test={takeScreenshot:async e=>P(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new L(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return W(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){if(this.destroying||this.destroyed)return!1;const{analysisViewManager:e,allLayerViews:t,frameTask:i,graphicsView:r,inputManager:s,layerViewManager:a,magnifier:n,map:o,ready:l,rendering:p,selectionManager:h,stationary:g,toolViewManager:d,updatingHandles:u,stage:c}=this,m=o?.basemap,y=o?.ground,f="loading"===m?.loadStatus||"loading"===y?.loadStatus||!!o?.allLayers?.some(e=>e.parent!==y&&!e.isFulfilled()),w=!c||c.updating,V=!u||u.updating,v=!e||e.updating,M=!d||d.updating,_=!s||s.updating,b=!r||r.updating,S=!i||i.updating,R=!a||a.updating,j=!h||h.updating,T=!(!n.visible||null===n.position||!this._magnifierView?.updatingHandles.updating),O=t.some(e=>e.updating&&!e.destroyed&&!("layerViews"in e));return!l||!g||p||f||O||T||V||v||S||M||_||R||b||j||w}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return D(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return W(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return W(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return R.hasLayerViewModule(e)}importLayerView(e){return R.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtTarget"in e&&a.push({geometry:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return X()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&T(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=this._createFeaturesTilingScheme(),i=new k(this.surface),r=new B(this.surface,{canvas:this.renderCanvas,contextOptions:new q(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),featuresTilingScheme:t,renderingOptions:this.renderingOptions,timeline:this.timeline},i);this.stage=r,this._magnifierView=new Q,this._magnifierView.magnifier=this.magnifier,this._gridView=new J;const s=new S({view:this});this._set("animationManager",s);const a=new K({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(t),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>r.stationary=e,l),o(()=>this.background,e=>{r.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>r.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{r.highlightGradient=C(r.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>r.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(e=this._createFeaturesTilingScheme()){this._set("featuresTilingScheme",e),this.stage.labelManager.featuresTilingScheme=e;const t=new H({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new Z(e,!0)});this._set("graphicsView",t)}_createFeaturesTilingScheme(){return new j(f.create({spatialReference:this.spatialReference,size:512,numLODs:36}))}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p()],Y.prototype,"_magnifierView",void 0),e([p()],Y.prototype,"_gridView",void 0),e([p({constructOnly:!0})],Y.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],Y.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],Y.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],Y.prototype,"graphicsTileStore",null),e([p()],Y.prototype,"graphicsView",void 0),e([p()],Y.prototype,"constraintsInfo",null),e([p()],Y.prototype,"initialExtentRequired",null),e([p({type:E,nonNullable:!0})],Y.prototype,"navigation",void 0),e([p({constructOnly:!0})],Y.prototype,"renderCanvas",void 0),e([p()],Y.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],Y.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],Y.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],Y.prototype,"typeSpecificPreconditionsReady",null),e([p()],Y.prototype,"analysisViewManager",void 0),e([p({type:N})],Y.prototype,"background",null),e([p({type:c})],Y.prototype,"center",null),e([p({type:i})],Y.prototype,"floors",void 0),e([p()],Y.prototype,"grid",void 0),e([p()],Y.prototype,"map",void 0),e([p()],Y.prototype,"padding",null),e([p({readOnly:!0})],Y.prototype,"rendering",null),e([p({readOnly:!0})],Y.prototype,"resolution",null),e([p()],Y.prototype,"scale",null),e([p({type:Boolean,value:!1})],Y.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],Y.prototype,"tileInfo",null),e([p({type:A,readOnly:!0})],Y.prototype,"timeline",void 0),e([p({readOnly:!0})],Y.prototype,"type",void 0),e([p({type:Boolean,readOnly:!0})],Y.prototype,"updating",null),e([p({readOnly:!0})],Y.prototype,"view2dType",void 0),e([p({readOnly:!0})],Y.prototype,"visibleArea",null),e([p()],Y.prototype,"zoom",null),e([p({readOnly:!0})],Y.prototype,"navigating",null),e([p(),h(e=>e instanceof G?e:d(F,e))],Y.prototype,"ui",void 0),Y=e([g("esri.views.View2D")],Y);const $=Y;export{$ as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{isScreenPoint as p,screenRectToPolygon as h,createScreenPoint as g}from"../core/screenUtils.js";import{property as d,cast as u,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as m}from"../core/accessorSupport/ensureType.js";import{initialize as y}from"../core/workers/workers.js";import f from"../geometry/Point.js";import w from"../geometry/Polygon.js";import{isLoadedOrLoadFor as V}from"../geometry/projectionUtils.js";import v from"../layers/support/TileInfo.js";import{BreakpointsOwner as M}from"./BreakpointsOwner.js";import{DOMContainer as _}from"./DOMContainer.js";import{PopupView as b}from"./PopupView.js";import S from"./View.js";import{Viewport2DBaseMixin as R}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as j}from"./Viewport2DMixin.js";import T from"./2d/AnimationManager.js";import{layerView2DImporter as O}from"./2d/layerViewModuleImportUtils.js";import k from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as L}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as C}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as x}from"./2d/engine/ManagedCanvas.js";import D from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as P}from"./2d/layers/support/util.js";import{hitTest as z,getHitTestLayerViews as A}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as E,takeScreenshot as I}from"./2d/support/screenshotUtils.js";import{Timeline as U}from"./2d/support/Timeline.js";import G from"./navigation/Navigation.js";import F from"./navigation/NavigationActionMap.js";import q from"./support/AnalysisViewManager.js";import W from"./ui/DefaultUI.js";import N from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as B}from"./webgl/RenderingContextOptions.js";import{isWebMap as H}from"../webmap/utils.js";import Z from"../webmap/background/ColorBackground.js";let K,Q,J,X,Y,$;async function ee(){const[,{GraphicsView2D:e,GraphicContainer:t,MapViewNavigation:i,MagnifierView2D:r,GridView2D:s,Stage:a}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);Q=e,J=t,X=i,Y=r,$=s,K=a}let te=class extends(j(R(M(b(_(S)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.navigation=new G({actionMap:new F({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new q({importAnalysisViewModule:e=>C(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new U,this.type="2d",this.view2dType=null,this.ui=new N,this.test={takeScreenshot:async e=>E(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},y()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new D(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return V(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return H(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){if(this.destroying||this.destroyed)return!1;const{analysisViewManager:e,allLayerViews:t,frameTask:i,graphicsView:r,inputManager:s,layerViewManager:a,magnifier:n,map:o,ready:l,rendering:p,selectionManager:h,stationary:g,toolViewManager:d,updatingHandles:u,stage:c}=this,m=o?.basemap,y=o?.ground,f="loading"===m?.loadStatus||"loading"===y?.loadStatus||!!o?.allLayers?.some(e=>e.parent!==y&&!e.isFulfilled()),w=!c||c.updating,V=!u||u.updating,v=!e||e.updating,M=!d||d.updating,_=!s||s.updating,b=!r||r.updating,S=!i||i.updating,R=!a||a.updating,j=!h||h.updating,T=!(!n.visible||null===n.position||!this._magnifierView?.updatingHandles.updating),O=t.some(e=>e.updating&&!e.destroyed&&!("layerViews"in e));return!l||!g||p||f||O||T||V||v||S||M||_||R||b||j||w}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new w({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return z(this,e,t)}async takeScreenshot(e){return I(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return H(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return H(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return O.hasLayerViewModule(e)}importLayerView(e){return O.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=p(e)?this.toMap(e):h(this,e),i=p(e)?e:g(e.x+e.width/2,e.y+e.height/2),r=this.toMap(i),s=await this.hitTest(e),a=A(this,e,r),n=new globalThis.Map(a.map(e=>[e.layer.uid,e])),o=[];let l=0,d=0;for(;l<s.results.length||d<a.length;){const e=s.results.at(l);if(e&&"graphic"!==e.type){++l;continue}const i=n.get((e?.layer??e?.graphic.layer)?.uid);if((!e||i)&&d<a.length&&a.at(d)!==i){const e=a.at(d);"fetchPopupFeaturesAtTarget"in e&&o.push({geometry:t,layerView:e}),++d}else e&&(o.push({graphic:e.graphic,layerView:i}),++l)}return{hits:o,location:r}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return ee()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&L(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=this._createFeaturesTilingScheme(),i=new x(this.surface),r=new K(this.surface,{canvas:this.renderCanvas,contextOptions:new B(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),featuresTilingScheme:t,renderingOptions:this.renderingOptions,timeline:this.timeline},i);this.stage=r,this._magnifierView=new Y,this._magnifierView.magnifier=this.magnifier,this._gridView=new $;const s=new T({view:this});this._set("animationManager",s);const a=new X({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(t),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>r.stationary=e,l),o(()=>this.background,e=>{r.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>r.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{r.highlightGradient=P(r.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>r.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(e=this._createFeaturesTilingScheme()){this._set("featuresTilingScheme",e),this.stage.labelManager.featuresTilingScheme=e;const t=new Q({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new J(e,!0)});this._set("graphicsView",t)}_createFeaturesTilingScheme(){return new k(v.create({spatialReference:this.spatialReference,size:512,numLODs:36}))}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([d()],te.prototype,"_magnifierView",void 0),e([d()],te.prototype,"_gridView",void 0),e([d({constructOnly:!0})],te.prototype,"deactivatedWebGLExtensions",void 0),e([d({constructOnly:!0})],te.prototype,"debugWebGLExtensions",void 0),e([d({readOnly:!0})],te.prototype,"featuresTilingScheme",void 0),e([d({readOnly:!0})],te.prototype,"graphicsTileStore",null),e([d()],te.prototype,"graphicsView",void 0),e([d()],te.prototype,"constraintsInfo",null),e([d()],te.prototype,"initialExtentRequired",null),e([d({type:G,nonNullable:!0})],te.prototype,"navigation",void 0),e([d({constructOnly:!0})],te.prototype,"renderCanvas",void 0),e([d()],te.prototype,"renderingOptions",void 0),e([d({constructOnly:!0})],te.prototype,"supersampleScreenshotsEnabled",void 0),e([d()],te.prototype,"defaultsFromMapSettings",null),e([d({readOnly:!0})],te.prototype,"typeSpecificPreconditionsReady",null),e([d()],te.prototype,"analysisViewManager",void 0),e([d({type:Z})],te.prototype,"background",null),e([d({type:f})],te.prototype,"center",null),e([d({type:i})],te.prototype,"floors",void 0),e([d()],te.prototype,"grid",void 0),e([d()],te.prototype,"map",void 0),e([d()],te.prototype,"padding",null),e([d({readOnly:!0})],te.prototype,"rendering",null),e([d({readOnly:!0})],te.prototype,"resolution",null),e([d()],te.prototype,"scale",null),e([d({type:Boolean,value:!1})],te.prototype,"spatialReferenceLocked",null),e([d({readOnly:!0})],te.prototype,"tileInfo",null),e([d({type:U,readOnly:!0})],te.prototype,"timeline",void 0),e([d({readOnly:!0})],te.prototype,"type",void 0),e([d({type:Boolean,readOnly:!0})],te.prototype,"updating",null),e([d({readOnly:!0})],te.prototype,"view2dType",void 0),e([d({readOnly:!0})],te.prototype,"visibleArea",null),e([d()],te.prototype,"zoom",null),e([d({readOnly:!0})],te.prototype,"navigating",null),e([d(),u(e=>e instanceof W?e:m(N,e))],te.prototype,"ui",void 0),te=e([c("esri.views.View2D")],te);const ie=te;export{ie as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type AnnotationLayer from "../../layers/AnnotationLayer.js";
|
|
2
|
+
import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
|
|
6
|
+
* after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
|
|
7
|
+
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
8
|
+
*
|
|
9
|
+
* The AnnotationLayerView is responsible for rendering a [AnnotationLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
|
|
10
|
+
* features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
|
|
11
|
+
*
|
|
12
|
+
* @since 5.1
|
|
13
|
+
* @see [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
|
|
14
|
+
*/
|
|
15
|
+
export default abstract class AnnotationLayerView extends FeatureLikeLayerView {
|
|
16
|
+
/** The layer being viewed. */
|
|
17
|
+
get layer(): AnnotationLayer;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
|
|
2
|
+
import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
|
|
6
|
+
* after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
|
|
7
|
+
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
8
|
+
*
|
|
9
|
+
* The DimensionFeatureLayerView is responsible for rendering a [DimensionFeatureLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
|
|
10
|
+
* features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
|
|
11
|
+
*
|
|
12
|
+
* @since 5.1
|
|
13
|
+
* @see [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
|
|
14
|
+
*/
|
|
15
|
+
export default abstract class DimensionFeatureLayerView extends FeatureLikeLayerView {
|
|
16
|
+
/** The layer being viewed. */
|
|
17
|
+
get layer(): DimensionFeatureLayer;
|
|
18
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type Graphic from "../../Graphic.js";
|
|
2
|
+
import type AnnotationLayer from "../../layers/AnnotationLayer.js";
|
|
2
3
|
import type CSVLayer from "../../layers/CSVLayer.js";
|
|
3
4
|
import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
|
|
4
5
|
import type FeatureLayer from "../../layers/FeatureLayer.js";
|
|
@@ -43,7 +44,7 @@ import type { FeatureFilterProperties } from "../../layers/support/FeatureFilter
|
|
|
43
44
|
* @see [WFSLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/WFSLayerView/)
|
|
44
45
|
* @see [KnowledgeGraphSublayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/KnowledgeGraphSublayerView/)
|
|
45
46
|
*/
|
|
46
|
-
export type FeatureLikeLayerViewLayer = CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
|
|
47
|
+
export type FeatureLikeLayerViewLayer = AnnotationLayer | CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
|
|
47
48
|
|
|
48
49
|
/** @since 5.0 */
|
|
49
50
|
export default abstract class FeatureLikeLayerView extends LayerView {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as s,on as l,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as u}from"../../core/sql.js";import{property as d,subclass as p}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as h}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as m}from"../../layers/support/displayFilterUtils.js";import c from"../../layers/support/FeatureEffect.js";import F from"../../layers/support/FeatureFilter.js";import{getSignedInUser as g,layerRequiresGeometryZM as I}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as b,loadFeaturePopupArcadeModules as v}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as x,collectLabelingFields as E,collectElevationFields as R,collectFilterFields as q,collectFeatureReductionFields as _,collectOrderByInfos as j,collectFields as O,collectTrackInfoFields as C,collectDisplayFilterFields as k,collectField as P,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as T}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as L}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as Z}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as M}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as N,getRequiredFields as Q}from"./support/popupUtils.js";import{WhereClauseVisitor as H}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&Z(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...x(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?m(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?g(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=u(t.where,T(this))),this.displayFilterEnabled&&(t.where=u(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const i=[],r=new Set;for(const l of e){const e=f(l.origin),s=N(e,{...t,checkPopupEnabled:!0});s&&(i.push(l),r.add(s))}if(0===i.length||0===r.size)return[];const s=await this._createPopupQuery(r,t);return await b(this.layer,i,s,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new H(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,E(n,i),e&&"elevationInfo"in i?R(n,i):null,null!=this.filter?q(n,i,this.filter):null,e||null==this.featureEffect?null:q(n,i,this.featureEffect.filter),!e&&a?_(n,i,a):null,!e&&l?j(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?L(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&O(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;O(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||O(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&O(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&O(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&O(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&O(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||O(n,i.fieldsIndex,Z(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(k(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),O(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),E(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;O(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,y);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of h(M(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await I(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await v(a);i(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await Q(this.layer,a);i(t);for(const t of e)s.add(t)}return r.where="1=1",r.returnGeometry=l,r.returnZ=l,r.returnM=l,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=u(r.where,T(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([d()],B.prototype,"_updatingRequiredPromise",void 0),e([d()],B.prototype,"_defaultReturnZ",void 0),e([d({readOnly:!0})],B.prototype,"availableFields",null),e([d({readOnly:!0})],B.prototype,"hasZ",void 0),e([d({readOnly:!0})],B.prototype,"hasM",void 0),e([d({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([d({type:c})],B.prototype,"featureEffect",null),e([d({type:F})],B.prototype,"filter",void 0),e([d()],B.prototype,"layer",void 0),e([d({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],B.prototype,"requiresCurrentUser",void 0),e([d({readOnly:!0})],B.prototype,"requiredFields",void 0),e([d({readOnly:!0})],B.prototype,"signedInUser",null),e([d()],B.prototype,"view",void 0),B=e([p("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as a,whenOnce as n}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as U,collectField as P,featureHasFields as T}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as L}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as Z}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as M}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&M(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),a(()=>this.view?.floors,"change",()=>this._handleChange()),a(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),a(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,L(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const n of e){const e=i(l,n.origin,()=>{const e=h(n.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(n),s.add(e))}if(0===r.length||0===s.size)return[];const a=await this._createPopupQuery(s,t);return await v(this.layer,r,a,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([n(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,R(n,i),e&&"elevationInfo"in i?q(n,i):null,null!=this.filter?_(n,i,this.filter):null,e||null==this.featureEffect?null:_(n,i,this.featureEffect.filter),!e&&a?j(n,i,a):null,!e&&l?O(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?Z(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(n,i.fieldsIndex,[i.timeInfo.endField]),await k(n,i)}if("floorInfo"in i&&i.floorInfo&&C(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(n,i.fieldsIndex,M(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(U(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),R(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;C(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,m);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of y(D(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return T(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await w(a);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await H(this.layer,a);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,L(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);export{G as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,s){const{layer:
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,s,i){const{layer:a}=this;if(!s)throw new t("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:a});const{popupEnabled:l}=a,u=c(a,i);if(!l||null==u)return[];const y=await u.getRequiredFields(null,{index:new p(a.rasterFields),partitions:new Map([["$pixel",a.rasterFields.filter(e=>e.name.startsWith(n)).map(e=>e.name)],["$imageCollectionItem",a.fields.map(e=>e.name)]])});r(i);const f=new m;f.timeExtent=this.timeExtent,f.geometry=s,f.outFields=y,f.outSpatialReference=s.spatialReference;const{resolution:d,spatialReference:h}=this.view,w="2d"===this.view.type?new o(d,d,h):new o(.5*d,.5*d,h),{returnTopmostRaster:R,showNoDataRecords:x}=u.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},g={returnDomainValues:!0,returnTopmostRaster:R,pixelSize:w,showNoDataRecords:x,signal:i?.signal};return a.queryVisibleRasters(f,g)}async getSourceScale(){return await i(),await this.layer.load(),a(this.layer.serviceRasterInfo,this.view.spatialReference)}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}}e([s()],y.prototype,"layer",void 0),e([s()],y.prototype,"suspended",void 0),e([s({readOnly:!0})],y.prototype,"timeExtent",null),e([s()],y.prototype,"view",void 0);export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import y from"./LayerView.js";import{getFetchPopupTemplate as f}from"./support/popupUtils.js";class h extends y{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i,a){const{layer:n}=this;if(!i)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:n});const{popupEnabled:l}=n,o=f(n,a);if(!l||null==o)return[];"polygon"===i.type&&(i=i.extent?.center);const m=[],{value:y,magdirValue:h,processedValue:d}=await n.identify(i,{timeExtent:this.timeExtent,signal:a?.signal});let g="";if(y?.length){g="imagery-tile"===n.type&&n.hasStandardTime()&&null!=y[0]?y.map(t=>n.getStandardTimeValue(t)).join(", "):y.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===n.type&&s(n.raster)?d?.join(", "):g,t[p.rawServicePixelValue]=g;const r=n.raster?.rasterInfo??n.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const a=r?.dataType;"vector-magdir"!==a&&"vector-uv"!==a||(t[p.magnitude]=h?.[0],t[p.direction]=h?.[1]);const{multidimensionalDefinition:l}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(n.rasterFields,t,l);const{graphicOrigin:o}=n,f=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:n,origin:o,sourceLayer:n});m.push(f)}return m}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],h.prototype,"fullExtent",null),t([a()],h.prototype,"layer",void 0),t([a({readOnly:!0})],h.prototype,"timeExtent",null),t([a()],h.prototype,"tileInfo",void 0),t([a({readOnly:!0})],h.prototype,"hasTilingEffects",null),t([a()],h.prototype,"datumTransformation",null);export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as p}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as a}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let h=class extends n{initialize(){this.exportImageParameters=new p({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return a(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,r,s){const{layer:i}=this;if(!r)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without geometry",{layer:i});const{popupEnabled:p}=i;if(!p)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:p});const a=this.createFetchPopupFeaturesQuery("point"===r.type?r:r.extent?.center);if(!a)return[];const{extent:m,width:n,height:h,x:u,y}=a;if(!(m&&n&&h))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:m,width:n,height:h});const c=await i.fetchFeatureInfo(m,n,h,u,y);return o(s),c}};return e([s()],h.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],h.prototype,"exportImageVersion",null),e([s()],h.prototype,"layer",void 0),e([s({readOnly:!0})],h.prototype,"timeExtent",null),h=e([i("esri.views.layers.WMSLayerView")],h),h};export{m as WMSLayerView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as G,getFetchPopupTemplate as S}from"./popupUtils.js";let F=null;function j(e,t){return"tile"===t.type||"map-image"===t.type}let V=class extends r{constructor(e){super(e),this._featuresResolutions=new WeakMap,this.highlightGraphics=null,this.highlightGraphicUpdated=null,this.updateHighlightedFeatures=a(async e=>{this.destroyed||await this.updatingHandles.consumePromise(this._updateHighlightedFeaturesGeometries(e))})}initialize(){const e=e=>{for(const t of e){const{sourceLayer:e}=t;null!=e&&"geometryType"in e&&"point"===e.geometryType&&t.visible&&(t.visible=!1,this.highlightGraphicUpdated?.({graphic:t,property:"visible",oldValue:!0,newValue:!1}))}this.updatingHandles.consumePromise(this._updateHighlightedFeaturesSymbols(e)),n(this.updateHighlightedFeatures(this._highlightGeometriesResolution))};this.addHandles([p(()=>this.highlightGraphics,"change",t=>e(t.added),{onListenerAdd:t=>e(t)})])}async fetchPopupFeaturesAtTarget(e,t){const{layerView:{layer:r,view:{scale:i}}}=this,o=P(r.sublayers,i,t);if(!o.length)return[];if(await R(o))return this._fetchPopupFeaturesUsingQueries(e,o,t);if((r.capabilities?.operations?.supportsIdentify&&r.version>=10.5)??!0)return this._fetchPopupFeaturesUsingIdentify(e,o,t);throw new s("fetchPopupFeatures:not-supported","query operation is disabled for this service",{layer:r})}clearHighlights(){this.highlightGraphics?.removeAll()}async _updateHighlightedFeaturesSymbols(e){for(const t of e)this._updateSymbology(t)}_updateSymbology(e){if("point"===e.geometry?.type)return this._updatePointSymbology(e)}_setGraphicSymbol(e,t){if(!t)return;const r=e.symbol;e.symbol=t,this.highlightGraphicUpdated?.({graphic:e,property:"symbol",oldValue:r,newValue:t})}_updatePointSymbology(e){const r=e.sourceLayer&&"renderer"in e.sourceLayer&&e.sourceLayer.renderer,{highlightGraphicUpdated:i,highlightGraphics:s,layerView:{view:o}}=this,a=e=>{e.visible||(e.visible=!0,i?.({graphic:e,property:"visible",oldValue:!1,newValue:!0}))};r&&"getSymbolAsync"in r?r.getSymbolAsync(e).then(async i=>{i||=new _;let l=null;const n="visualVariables"in r?r.visualVariables?.find(e=>"size"===e.type):void 0;n&&(F||(F=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSize),l=F(n,e,{view:o.type,scale:o.scale,shape:"simple-marker"===i.type?i.style:null})),l||="width"in i&&"height"in i&&null!=i.width&&null!=i.height?Math.max(i.width,i.height):"size"in i?i.size:16,s?.includes(e)&&(this._setGraphicSymbol(e,new _({style:"square",size:l,color:new t([255,255,255,1/255]),xoffset:"xoffset"in i?i.xoffset:0,yoffset:"yoffset"in i?i.yoffset:0})),a(e))}):a(e)}get _updateContext(){const{layerView:{layer:e},highlightGraphics:t,highlightGraphicUpdated:r}=this;return r&&t?.length&&e.capabilities.operations.supportsQuery?{highlightGraphicUpdated:r,highlightGraphics:t}:null}get highlightFeaturesActive(){return!!this._updateContext}async _updateHighlightedFeaturesGeometries(e){this._highlightGeometriesResolution=e;const t=this._updateContext;if(!t)return;const r=this._getTargetResolution(e),i=new Map,{highlightGraphics:s,highlightGraphicUpdated:a}=t;for(const u of s)if(!this._featuresResolutions.has(u)||this._featuresResolutions.get(u)>r){const e=u.sourceLayer;o(i,e,()=>new Map).set(u.getObjectId(),u)}const{layerView:{view:l}}=this,n=Array.from(i,([e,t])=>{const i=e.createQuery();return i.objectIds=[...t.keys()],i.outFields=[e.objectIdField],i.returnGeometry=!0,i.maxAllowableOffset=r,i.outSpatialReference=l.spatialReference,e.queryFeatures(i)}),p=await Promise.all(n);if(!this.destroyed)for(const{features:o}of p)for(const e of o){const t=e.sourceLayer,o=i.get(t).get(e.getObjectId());if(o&&s.includes(o)){const t=o.geometry;o.geometry=e.geometry,a({graphic:o,property:"geometry",oldValue:t,newValue:o.geometry}),this._featuresResolutions.set(o,r)}}}_getTargetResolution(e){const t=e*c(this.layerView.view.spatialReference),r=t/16;return r<=10?0:e/t*r}async _fetchPopupFeaturesUsingIdentify(e,t,r){const i=await this._createIdentifyParameters(e,t,r);if(null==i)return[];const{results:s}=await w(this.layerView.layer.parsedUrl,i,r);return s.map(e=>e.feature)}async _createIdentifyParameters(e,t,r){const{floors:i,layer:s,timeExtent:o,view:{spatialReference:a,scale:l}}=this.layerView;if(!t.length)return null;let n,p;await Promise.all(t.map(({sublayer:e})=>e.load(r).catch(()=>{}))),"point"===e.type?(n=Math.min(has("mapservice-popup-identify-max-tolerance"),s.allSublayers.reduce((e,t)=>t.renderer?b({renderer:t.renderer,pointerType:r?.pointerType}):e,2)),p=this.createFetchPopupFeaturesQueryGeometry(e,n)):(n=2,p=e.extent);const u=m(l,a),c=Math.ceil(p.width/u),h=new d({xmin:p.center.x-u*c,ymin:p.center.y-u*c,xmax:p.center.x+u*c,ymax:p.center.y+u*c,spatialReference:p.spatialReference});return new v({floors:i,gdbVersion:"gdbVersion"in s?s.gdbVersion:void 0,geometry:e,height:c,layerOption:"popup",mapExtent:h,returnGeometry:!0,spatialReference:a,sublayers:s.sublayers,timeExtent:o,tolerance:n,width:c})}async _fetchPopupFeaturesUsingQueries(e,t,r){const{layerView:{floors:s,timeExtent:o,view:{scale:a,spatialReference:n}}}=this,p=t.map(async({sublayer:t,popupTemplate:i})=>{if(await t.load(r).catch(()=>{}),t.capabilities&&!t.capabilities.operations.supportsQuery)return[];const p=t.createQuery();let c;if("point"===e.type){const i=b({renderer:t.renderer,pointerType:r?.pointerType});c=this.createFetchPopupFeaturesQueryGeometry(e,i)}else c=e;const h=new Set,[y]=await Promise.all([G(t,i),t.renderer?.collectRequiredFields(h,t.fieldsIndex)]);l(r),f(h,t.fieldsIndex,y);const d=Array.from(h).sort();p.geometry=c,p.outFields=d,p.timeExtent=o;const w=g(s,t);if(p.where=u(p.where,w),t.capabilities?.query.supportsOrderBy&&t.orderBy?.[0]){const e=t.orderBy[0],r=!e.valueExpression&&e.field,i="ascending"===e.order?"asc":"desc";r&&(p.orderByFields=[`${r} ${i}`])}const v=await U(i);l(r);const x="point"===t.geometryType||v?.arcadeUtils.hasGeometryOperations(i)?0:this._getTargetResolution(m(a,n));x&&(p.maxAllowableOffset=x);let{features:_}=await t.queryFeatures(p,r);_=await A(t,_,r);for(const e of _)this._featuresResolutions.set(e,x);return _});return(await Promise.allSettled(p)).reduce((e,t)=>"fulfilled"===t.status?[...e,...t.value]:e,[]).filter(i)}};function P(e,t,r){const i=[];if(!e)return i;const s=e=>{const o=0===e.minScale||t<=e.minScale,a=0===e.maxScale||t>=e.maxScale;if(e.visible&&o&&a)if(e.sublayers)e.sublayers.forEach(s);else if(e.popupEnabled){const t=S(e,{...r,defaultPopupTemplateEnabled:!1});null!=t&&i.unshift({sublayer:e,popupTemplate:t})}};return e.map(s),i}function U(e){return e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type)?x():Promise.resolve()}async function R(e){return(await Promise.allSettled(e.map(({sublayer:e})=>e.load().catch(()=>{}).then(()=>e.capabilities?.operations?.supportsQuery??!1)))).every(e=>"fulfilled"===e.status&&e.value)}async function A(e,t,r){const i=e.renderer;return i&&"defaultSymbol"in i&&!i.defaultSymbol&&(t=i.valueExpression?await Promise.all(t.map(e=>i.getSymbolAsync(e,r).then(t=>t?e:null))).then(e=>e.filter(e=>null!=e)):t.filter(e=>null!=i.getSymbol(e))),t}e([h({constructOnly:!0})],V.prototype,"createFetchPopupFeaturesQueryGeometry",void 0),e([h({constructOnly:!0})],V.prototype,"layerView",void 0),e([h({constructOnly:!0})],V.prototype,"highlightGraphics",void 0),e([h({constructOnly:!0})],V.prototype,"highlightGraphicUpdated",void 0),e([h({constructOnly:!0})],V.prototype,"updatingHandles",void 0),e([h()],V.prototype,"_updateContext",null),V=e([y("esri.views.layers.support.MapServiceLayerViewHelper")],V);export{V as MapServiceLayerViewHelper,P as collectPopupProviders,j as isMapServiceLayerView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{watch as a,initial as i,whenOnce as s}from"../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{isLoaded as p,canProjectWithoutEngine as o,load as l}from"../../geometry/projectionUtils.js";import{equals as c}from"../../geometry/support/spatialReferenceUtils.js";import{basemapEnsureType as m}from"../../support/basemapEnsureType.js";import{findSpatialReference as f,getBasemapThumbnailUrl as d}from"../../support/basemapUtils.js";let u=class extends t{constructor(e){super(e),this._loadingProjectionEngine=!1,this.view=null,this.nextBasemap=m("hybrid")}initialize(){a(()=>this.nextBasemap,e=>{e&&!e.loaded&&e.load().catch(()=>{})},i)}destroy(){this.view=null}get _nextBasemapSpatialReferenceTask(){return f(this.view,this.nextBasemap)}get _viewSpatialReferenceLocked(){const{view:e}=this;return!e||!("spatialReferenceLocked"in e)||e.spatialReferenceLocked}get activeBasemap(){return m(this.view?.map?.basemap??"topo-vector")}get nextBasemap(){return this._get("nextBasemap")}set nextBasemap(e){this._set("nextBasemap",m(e))}get state(){const{view:e}=this;if(!e?.ready)return"disabled";if(this._nextBasemapSpatialReferenceTask.updating)return"disabled";const{spatialReference:t}=this._nextBasemapSpatialReferenceTask;return this._viewSpatialReferenceLocked&&null!=t&&!e.spatialReference.equals(t)?"incompatible-next-basemap":this._loadingProjectionEngine?"loading":"ready"}async toggle(){const{activeBasemap:e,nextBasemap:t,state:a,view:i}=this;if(!i||"disabled"===a||"incompatible-next-basemap"===a)return;const n=this._viewSpatialReferenceLocked;if(!n){if(await s(()=>!this._nextBasemapSpatialReferenceTask.updating),t!==this.nextBasemap||e!==this.activeBasemap)return;const{spatialReference:a}=this._nextBasemapSpatialReferenceTask;if(null==a||c(i.spatialReference,a)||p()||o(i.spatialReference,a)||(this._loadingProjectionEngine=!0,await l(),this._loadingProjectionEngine=!1),t!==this.nextBasemap||e!==this.activeBasemap)return}i.map.basemap=t,n||null==this._nextBasemapSpatialReferenceTask.spatialReference||c(i.spatialReference,this._nextBasemapSpatialReferenceTask.spatialReference)||(i.spatialReference=this._nextBasemapSpatialReferenceTask.spatialReference),this.nextBasemap=e}static getThumbnailUrl(e){return d(e)}};e([n()],u.prototype,"_loadingProjectionEngine",void 0),e([n({readOnly:!0})],u.prototype,"_nextBasemapSpatialReferenceTask",null),e([n({readOnly:!0})],u.prototype,"_viewSpatialReferenceLocked",null),e([n({readOnly:!0})],u.prototype,"activeBasemap",null),e([n()],u.prototype,"nextBasemap",null),e([n({readOnly:!0})],u.prototype,"state",null),e([n()],u.prototype,"view",void 0),e([n()],u.prototype,"toggle",null),u=e([r("esri.widgets.BasemapToggle.BasemapToggleViewModel")],u);const h=u;export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,
|
|
2
|
+
const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,l=`${t}__attachment-element`,i=`${t}__relationship-element-input`,n=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${l}-input`,attachmentElementLabel:`${l}-label`,attachmentElementList:`${l}-list`,attachmentElementListItem:`${l}-list-item`,attachmentElementListItemStart:`${l}-list-item-start`,attachmentElementListItemStagedIndicator:`${l}-list-item-staged-indicator`,attachmentElementListItemThumb:`${l}-list-item-thumb`,attachmentElementListItemIcon:`${l}-list-item-icon`,attachmentElementEmptyState:`${l}-empty-state`,attachmentElementEmptyAction:`${l}-empty-action`,attachmentElementAllPanel:`${l}-all-panel`,attachmentElementAddPanel:`${l}-add-panel`,attachmentElementFileInput:`${l}-file-input`,attachmentElementAddDropzone:`${l}-add-dropzone`,attachmentElementAddDropzoneIcon:`${l}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${l}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${l}-add-dropzone-detail`,attachmentElementDetail:`${l}-detail`,attachmentElementDetailPreview:`${l}-detail-preview`,attachmentElementDetailPreviewImage:`${l}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${l}-detail-preview-icon`,attachmentElementDetailActions:`${l}-detail-actions`,attachmentElementDetailMetadata:`${l}-detail-metadata`,attachmentElementDetailMetadataGroup:`${l}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${l}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${l}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${l}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${l}-detail-metadata-value`,relationshipElementInput:`${i}`,relatedRecordsHeader:`${i}_header`,relatedRecordsDescription:`${i}_description`,relatedRecordsLabel:`${i}_label`,relatedRecordsList:`${i}_list`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${n}`,multipleChoiceSelectAll:`${n}__select-all`,multipleChoiceOtherChoice:`${n}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${n}__other-choice--with-select-all`};export{m as css};
|