@arcgis/core 6.0.0-next.57 → 6.0.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.d.ts +1 -0
- package/WebLinkChart.d.ts +0 -12
- package/WebLinkChart.js +1 -1
- package/applications/Components/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +74 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/applications/WebEditor/sketchUtils.js +1 -1
- package/arcade/arcadeCompiler.js +5 -5
- package/arcade/containerUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/075e6c60e741482e673f.js +1 -0
- package/assets/esri/core/workers/chunks/076c2098570ee885d117.js +1 -0
- package/assets/esri/core/workers/chunks/091ce6b3de590e1d9ff6.js +1 -0
- package/assets/esri/core/workers/chunks/099dec4103f6e7556eb0.js +1 -0
- package/assets/esri/core/workers/chunks/{77267e0807cbbc00496d.js → 0be55d9bab7c3510a7f2.js} +1 -1
- package/assets/esri/core/workers/chunks/{da69e8cd52aa77aa4c2c.js → 0fc1facd26c9ef96e081.js} +1 -1
- package/assets/esri/core/workers/chunks/{f97dc99afe3375fc8e16.js → 1179a3574c580f7ce390.js} +1 -1
- package/assets/esri/core/workers/chunks/129140104be2620c0382.js +1 -0
- package/assets/esri/core/workers/chunks/1295fcf866e7347b2d53.js +1 -0
- package/assets/esri/core/workers/chunks/16219f0c56d6f6213c24.js +1 -0
- package/assets/esri/core/workers/chunks/185b317eec95f3370970.js +1 -0
- package/assets/esri/core/workers/chunks/1bdef2e142e78341fec0.js +1 -0
- package/assets/esri/core/workers/chunks/1ce0bf4ff14af8a68a5c.js +1 -0
- package/assets/esri/core/workers/chunks/1f1515313baeecc095a2.js +1 -0
- package/assets/esri/core/workers/chunks/1f710c91a82f6fd3d0f6.js +1 -0
- package/assets/esri/core/workers/chunks/{1894c39dabc78e7a5af8.js → 1fad7a7211bb8c9b58e3.js} +1 -1
- package/assets/esri/core/workers/chunks/24374aaa6fb3e12960d1.js +1 -0
- package/assets/esri/core/workers/chunks/24aa7b81814b4e519b01.js +1 -0
- package/assets/esri/core/workers/chunks/{c8c79d21dfce5695a089.js → 2b69fdf51b6f0b2abb75.js} +1 -1
- package/assets/esri/core/workers/chunks/2ba9b3b4d49eb2740a42.js +1 -0
- package/assets/esri/core/workers/chunks/2eb3297014f063fb4bc9.js +1 -0
- package/assets/esri/core/workers/chunks/2eb3cec44ce7587980a4.js +1 -0
- package/assets/esri/core/workers/chunks/2ee3cd6b2e5274932d31.js +1 -0
- package/assets/esri/core/workers/chunks/31df02c6f5b04a143ae6.js +1 -0
- package/assets/esri/core/workers/chunks/3a1510650ce8de7edec8.js +1 -0
- package/assets/esri/core/workers/chunks/3b0933cea2a902a26bb7.js +1 -0
- package/assets/esri/core/workers/chunks/3d96676b94e8ecb6a4d1.js +1 -0
- package/assets/esri/core/workers/chunks/3edfd8ecf000b00a4a92.js +1 -0
- package/assets/esri/core/workers/chunks/{f053cbfe671bd14c7d5b.js → 419d8116d8e7faccfed5.js} +1 -1
- package/assets/esri/core/workers/chunks/41d57b45cc2361305af3.js +1 -0
- package/assets/esri/core/workers/chunks/42ee1f8732e644371ea9.js +1 -0
- package/assets/esri/core/workers/chunks/4309f3e72c6332e01d75.js +1 -0
- package/assets/esri/core/workers/chunks/44ca7a56fb28227fdcbf.js +1 -0
- package/assets/esri/core/workers/chunks/4537f0866e903d2e9bb9.js +1 -0
- package/assets/esri/core/workers/chunks/49f61832e0d3b24e1608.js +1 -0
- package/assets/esri/core/workers/chunks/4a45505fb9a40b503672.js +29 -0
- package/assets/esri/core/workers/chunks/4b456c1f26d70392f7d4.js +1 -0
- package/assets/esri/core/workers/chunks/{28fae7da8cc4ae7a83e4.js → 4c510b1caffeec80dc6b.js} +1 -1
- package/assets/esri/core/workers/chunks/4ce5c9b658ba79a0b668.js +1 -0
- package/assets/esri/core/workers/chunks/{41694ee8990e799da225.js → 4d8f23b2e6721fb5b289.js} +1 -1
- package/assets/esri/core/workers/chunks/4fb8708666a614df583d.js +1 -0
- package/assets/esri/core/workers/chunks/4feec96a312dcc137911.js +1 -0
- package/assets/esri/core/workers/chunks/52ad9306fd40d488376d.js +1 -0
- package/assets/esri/core/workers/chunks/5375bdf46b602b19fa86.js +1 -0
- package/assets/esri/core/workers/chunks/549a8e7313f75ea3f85b.js +1 -0
- package/assets/esri/core/workers/chunks/55f97942c58455f47975.js +1 -0
- package/assets/esri/core/workers/chunks/566d72534d694c318e30.js +1 -0
- package/assets/esri/core/workers/chunks/5ce00674305e5716d27b.js +1 -0
- package/assets/esri/core/workers/chunks/5e032d209df500fad321.js +1 -0
- package/assets/esri/core/workers/chunks/5ea8cdc28a81744913cd.js +1 -0
- package/assets/esri/core/workers/chunks/61565d4674cf77cbf1dd.js +1 -0
- package/assets/esri/core/workers/chunks/{d296c9561f6a6aeff973.js → 68b8dff748f1ef588653.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d99e7e1aa007a6f1039.js → 69316db52d7bed746879.js} +1 -1
- package/assets/esri/core/workers/chunks/69384a9703abee1903c5.js +1 -0
- package/assets/esri/core/workers/chunks/6992a7728451c5a7b673.js +1 -0
- package/assets/esri/core/workers/chunks/69e5efe1acbdaddee90d.js +1 -0
- package/assets/esri/core/workers/chunks/6b2e09e43f449020d5ad.js +1 -0
- package/assets/esri/core/workers/chunks/6b5f8bf8b3480910666d.js +1 -0
- package/assets/esri/core/workers/chunks/70fe8b90f174ec64db2e.js +1 -0
- package/assets/esri/core/workers/chunks/720356fc6d5e18008471.js +1 -0
- package/assets/esri/core/workers/chunks/{3869ea1be105eaad4a38.js → 7328aca34c95fd0fc752.js} +1 -1
- package/assets/esri/core/workers/chunks/{be0133fa63c5d6545a7f.js → 75667b1427a7f02f2cda.js} +33 -32
- package/assets/esri/core/workers/chunks/{b4018b21a03c0c909d23.js → 75a48b122254deb3ad59.js} +1 -1
- package/assets/esri/core/workers/chunks/789567124c4a15235952.js +1 -0
- package/assets/esri/core/workers/chunks/{a24dc5350af001db417a.js → 7affab0d0692bdb76036.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6e628b5d2643af4c19b.js → 7b4063f45b45ad8a7289.js} +1 -1
- package/assets/esri/core/workers/chunks/7c22d3669087f38c92b9.js +1 -0
- package/assets/esri/core/workers/chunks/7cb7bdc30f970eb9ff7f.js +1 -0
- package/assets/esri/core/workers/chunks/7d71cf65bbc1b3308856.js +1 -0
- package/assets/esri/core/workers/chunks/81cdb9705f7eee9e792f.js +1 -0
- package/assets/esri/core/workers/chunks/821003fe1be30d5d29aa.js +1 -0
- package/assets/esri/core/workers/chunks/822b9c1e172c835b9624.js +1 -0
- package/assets/esri/core/workers/chunks/{a7dfca326883384d2751.js → 823228f1fa6ba4e8bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/84021d57822f374217ef.js +1 -0
- package/assets/esri/core/workers/chunks/847ec6b337cfb2e4a15b.js +1 -0
- package/assets/esri/core/workers/chunks/84f41ddd7366bfbf5b25.js +1 -0
- package/assets/esri/core/workers/chunks/{c6e7c95391a54978402b.js → 893363ee500fc1288781.js} +1 -1
- package/assets/esri/core/workers/chunks/8b0cdbbf5c81283eae13.js +1 -0
- package/assets/esri/core/workers/chunks/{7850e306d7cd12653b23.js → 90de2f93b0ba1eb337fd.js} +1 -1
- package/assets/esri/core/workers/chunks/91b0035e3eae9e452fbc.js +1 -0
- package/assets/esri/core/workers/chunks/93262d3616ac0cc4b532.js +1 -0
- package/assets/esri/core/workers/chunks/956810d6f553c2198aae.js +1 -0
- package/assets/esri/core/workers/chunks/9748a0db6451336d51ef.js +1 -0
- package/assets/esri/core/workers/chunks/{69a09c6acb5ae03c67f6.js → 985ce51da8ae4984a4db.js} +1 -1
- package/assets/esri/core/workers/chunks/9bbff9230298b1bac46a.js +1 -0
- package/assets/esri/core/workers/chunks/9cae59db5b9cb37baea9.js +1 -0
- package/assets/esri/core/workers/chunks/{ed2626a895ca1d4a7216.js → 9dbb9e74754392b066a8.js} +1 -1
- package/assets/esri/core/workers/chunks/9dd3863b9d7c1a5ea20a.js +1 -0
- package/assets/esri/core/workers/chunks/9e62cfcb4e0188d51294.js +1 -0
- package/assets/esri/core/workers/chunks/a27c2edd7e043643cdd1.js +1 -0
- package/assets/esri/core/workers/chunks/a2a3edec2ee31273d609.js +1 -0
- package/assets/esri/core/workers/chunks/{d0e8d0f8b4e4cc13e837.js → a301aa62a03d3618eba9.js} +1 -1
- package/assets/esri/core/workers/chunks/a39d595fc11afedc1875.js +1 -0
- package/assets/esri/core/workers/chunks/a57b506c538e2186909d.js +1 -0
- package/assets/esri/core/workers/chunks/a722114f01e66a608cec.js +1 -0
- package/assets/esri/core/workers/chunks/{5bda285f6ecf725676b3.js → a7b4821fd3080cf2756f.js} +1 -1
- package/assets/esri/core/workers/chunks/a8d91c2654c5012400b4.js +1 -0
- package/assets/esri/core/workers/chunks/aa70d98e6bcbd06a8461.js +1 -0
- package/assets/esri/core/workers/chunks/add538f52c7bcfd154da.js +1 -0
- package/assets/esri/core/workers/chunks/ae0b0a562f0ab57e1883.js +1 -0
- package/assets/esri/core/workers/chunks/b2c3652c8ce9597dcf89.js +1 -0
- package/assets/esri/core/workers/chunks/b725d944ecd5da02fd9e.js +1 -0
- package/assets/esri/core/workers/chunks/b7fbbbeabaa5bfcdeabc.js +1 -0
- package/assets/esri/core/workers/chunks/{70ead4c231cba4084cf4.js → b856ef3a949ca06a4af5.js} +1 -1
- package/assets/esri/core/workers/chunks/{ae2cd50c2b938b39417b.js → b8b4f68305a4f654fa75.js} +1 -1
- package/assets/esri/core/workers/chunks/{97107e64407fa6825620.js → ba324fd300b6e6a584ae.js} +1 -1
- package/assets/esri/core/workers/chunks/bc40b96080346b91e507.js +1 -0
- package/assets/esri/core/workers/chunks/bd8ee0205f0a01d6d4d7.js +1 -0
- package/assets/esri/core/workers/chunks/c5ca8245113576b35acc.js +1 -0
- package/assets/esri/core/workers/chunks/{c7a0c4ca37ebd1d98cf1.js → c629a676b707138e7a1c.js} +1 -1
- package/assets/esri/core/workers/chunks/c8a1aa90ec6d455ff82d.js +1 -0
- package/assets/esri/core/workers/chunks/c8dd8b67100177109619.js +1 -0
- package/assets/esri/core/workers/chunks/c8eb8744f1ed9d1897dc.js +1 -0
- package/assets/esri/core/workers/chunks/ccc89208aad7206aabd9.js +1 -0
- package/assets/esri/core/workers/chunks/cebd6732fe573f79849c.js +1 -0
- package/assets/esri/core/workers/chunks/{c5ddf8b347c31fe772a3.js → d45769f8a02abe5d2917.js} +1 -1
- package/assets/esri/core/workers/chunks/d4b62e78bb27272a5f83.js +1 -0
- package/assets/esri/core/workers/chunks/d52b2a591e5e6abaa133.js +1 -0
- package/assets/esri/core/workers/chunks/{0978e12dd6a1cbc50b80.js → d572b125bed40a4d02b1.js} +1 -1
- package/assets/esri/core/workers/chunks/d65206fea850b1fc0712.js +1 -0
- package/assets/esri/core/workers/chunks/d6a42c936ead00ab7ad4.js +1 -0
- package/assets/esri/core/workers/chunks/d77887edc10d5be39ac9.js +1 -0
- package/assets/esri/core/workers/chunks/d7b9c16fe73f50a41099.js +1 -0
- package/assets/esri/core/workers/chunks/{423c7a981b9a06b76cbd.js → d833fc1fe63c9917ae3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b6fd287e7043ad50f4e.js → d9bf0be2323e9df55834.js} +1 -1
- package/assets/esri/core/workers/chunks/dab98890d77a6b0b2741.js +1 -0
- package/assets/esri/core/workers/chunks/dca6abf260c0bfb7c9c0.js +1 -0
- package/assets/esri/core/workers/chunks/e2ac387e154d68fd10ca.js +1 -0
- package/assets/esri/core/workers/chunks/{fc8cb947a677aa12348d.js → e38ffdb19132529beda7.js} +1 -1
- package/assets/esri/core/workers/chunks/e39259ff441fb67cd3e4.js +1 -0
- package/assets/esri/core/workers/chunks/e3c152eeaa1c95f0f2d2.js +1 -0
- package/assets/esri/core/workers/chunks/e4ae0fad312467f218df.js +1 -0
- package/assets/esri/core/workers/chunks/e50cc686db878d0a9399.js +1 -0
- package/assets/esri/core/workers/chunks/e7cd5eeb15d3783f803d.js +1 -0
- package/assets/esri/core/workers/chunks/e8042584e422044ca1d1.js +1 -0
- package/assets/esri/core/workers/chunks/e89640667b71c1bb4ee3.js +1 -0
- package/assets/esri/core/workers/chunks/e9649aa2d0fdd28d91ac.js +1 -0
- package/assets/esri/core/workers/chunks/ee31801144602ce816d3.js +1 -0
- package/assets/esri/core/workers/chunks/eff8a1a880e0eb1a6814.js +1 -0
- package/assets/esri/core/workers/chunks/f2b7c61462f530d812c4.js +1 -0
- package/assets/esri/core/workers/chunks/f56404d401dfbce29473.js +1 -0
- package/assets/esri/core/workers/chunks/f87416f2aa791cd1bebe.js +1 -0
- package/assets/esri/core/workers/chunks/{f3744b12a5d0d8ca8621.js → fa65aafac2b99478c32a.js} +1 -1
- package/assets/esri/core/workers/chunks/fb14a0c8d2edf868838c.js +1 -0
- package/assets/esri/core/workers/chunks/fb8a24aa04bd2fa43241.js +1 -0
- package/assets/esri/core/workers/chunks/fbb27d2cef962f725180.js +1 -0
- package/assets/esri/core/workers/chunks/{3c6e7dcb79d13e8aecc5.js → fc965ace82bef4c6111b.js} +1 -1
- package/assets/esri/core/workers/chunks/{5954f02c3901b28d8e73.js → fd9382e5207b6da74b91.js} +1 -1
- package/assets/esri/core/workers/chunks/fdb370546be4ad552959.js +1 -0
- package/assets/esri/core/workers/chunks/fefac70ebe29dff54b4c.js +1 -0
- package/chunks/BlurEmission.glsl.js +7 -20
- package/chunks/Bufferer-CclWhXVb.js +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/Component.glsl.js +1 -1
- package/chunks/EmissionComposite.glsl.js +2 -2
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/Fog.glsl.js +5 -5
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +2 -2
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/RealisticAtmosphere.glsl.js +7 -9
- package/chunks/RealisticAtmosphereCompositing.glsl.js +6 -10
- package/chunks/RibbonLine.glsl.js +154 -108
- package/chunks/Terrain.glsl.js +27 -27
- package/chunks/UPCPointRenderer.glsl.js +100 -0
- package/chunks/UnitFactory.js +1 -1
- package/chunks/Water.glsl.js +24 -24
- package/chunks/arcade.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +4 -4
- package/chunks/arcgis-knowledge-client-core.js +4 -4
- package/chunks/array.js +1 -1
- package/chunks/basis_encoder.js +3 -3
- package/chunks/basis_transcoder.js +2 -2
- package/chunks/draco_mesh_decoder.js +2 -2
- package/chunks/dxt_encoder.js +3 -3
- package/chunks/i3s.js +2 -2
- package/chunks/languageUtils.js +1 -1
- package/chunks/lclayout.js +3 -3
- package/chunks/lerc-wasm.js +1 -1
- package/chunks/lyr3DWorker.js +2 -2
- package/chunks/pe.js +1 -1
- package/chunks/projector.js +1 -1
- package/chunks/qb3-wasm.js +1 -1
- package/chunks/vxlLayer.js +2 -2
- package/colorUtils.js +1 -1
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/Clonable.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/MultiOriginJSONSupport.js +1 -1
- package/core/NumericIdentifiable.js +1 -1
- package/core/Promise.js +1 -1
- package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
- package/core/accessorSupport/metadata.js +1 -1
- package/core/accessorSupport/trackingUtils.js +1 -1
- package/core/asyncUtils.js +1 -1
- package/core/handleUtils.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/sql/SqlTimestampOffset.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/writeUtils.js +1 -1
- package/core/sql.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/workers.js +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/geometry/coordinateConversion/CoordinateConversionModel.d.ts +11 -56
- package/geometry/coordinateConversion/support/Conversion.d.ts +5 -17
- package/geometry/coordinateConversion/support/Format.d.ts +6 -30
- package/geometry/coordinateConversion/types.d.ts +15 -15
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/support/MeshMaterial.js +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/meshUtils/elevationSampler.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +1 -1
- package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
- package/graphic/BuildingGraphicOrigin.js +1 -1
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/GeoRSSGraphicOrigin.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +1 -1
- package/graphic/ImageryTileGraphicOrigin.js +1 -1
- package/graphic/KMLGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/MapNotesGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/PointCloudGraphicOrigin.js +1 -1
- package/graphic/SceneGraphicOrigin.js +1 -1
- package/graphic/SketchGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +1 -1
- package/graphic/VectorTileGraphicOrigin.js +1 -1
- package/graphic/VoxelGraphicOrigin.js +1 -1
- package/graphic/WCSGraphicOrigin.js +1 -1
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getLayerViewLayer.js +2 -0
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +8 -0
- package/kernel.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/LinkChartLayer.d.ts +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/PointCloudLayer.js +3 -3
- package/layers/VectorTileLayer.d.ts +17 -10
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/sources/CSVSource.js +1 -1
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
- package/layers/mixins/APIKeyMixin.js +1 -1
- package/layers/mixins/ArcGISCachedService.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/mixins/ArcGISService.js +1 -1
- package/layers/mixins/BlendLayer.js +1 -1
- package/layers/mixins/CustomParametersMixin.js +1 -1
- package/layers/mixins/DataElementMixin.js +1 -1
- package/layers/mixins/DataSeriesLayer.js +1 -1
- package/layers/mixins/DisplayFilteredLayer.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/FeatureEffectLayer.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/mixins/FeatureReductionLayer.js +1 -1
- package/layers/mixins/HeightModelInfoMixin.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/mixins/OrderedLayer.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/mixins/PublishableLayer.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/mixins/RasterPresetRendererMixin.js +1 -1
- package/layers/mixins/RefreshableLayer.js +1 -1
- package/layers/mixins/ReloadableLayer.js +1 -1
- package/layers/mixins/ScaleRangeLayer.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/mixins/TrackableLayer.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/raster/datasets/xmlUtilities.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/Qb3.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/formats/blosc.js +1 -1
- package/layers/raster/formats/tiffParser.js +1 -1
- package/layers/raster/formats/tiffSpatialReferenceUtils.js +2 -0
- package/layers/raster/formats/tiffTag.js +1 -1
- package/layers/raster/functions/colormaps.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/WMTSSublayer.js +1 -1
- package/layers/support/geospatialPDFUtils.js +1 -1
- package/layers/support/imageUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/video/VideoController.js +14 -14
- package/legend/ActiveLayerInfo.js +1 -1
- package/legend/support/sizeRampUtils.js +1 -1
- package/libs/basisu/BasisUEncoder.js +1 -1
- package/libs/basisu/BasisUTranscoder.js +1 -1
- package/libs/dracoMeshDecoder/dracoMeshDecoder.js +1 -1
- package/libs/dxtEncoder/DXTEncoder.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/libs/librust-parquet/loadParquetModule.js +1 -1
- package/libs/librust-text/loadTextModule.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/libs/maquette-advanced-projector/projector.js +1 -1
- package/package.json +2 -2
- package/popup/FeatureModel.js +1 -1
- package/popup/FeaturesModel.d.ts +6 -0
- package/popup/FeaturesModel.js +1 -1
- package/portal/PortalUser.js +1 -1
- package/renderers/mixins/VisualVariablesMixin.js +1 -1
- package/renderers/visualVariables/VisualVariableFactory.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
- package/rest/layerSources/utils.js +1 -1
- package/rest/networks/validateNetworkTopology.js +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +41 -1
- package/rest/support/AttributeBinsQuery.js +1 -1
- package/rest/support/CameraInfoMixin.js +1 -1
- package/rest/support/NormalizationBinParametersMixin.js +1 -1
- package/rest/support/Query.d.ts +1 -2
- package/rest/support/generateRendererUtils.js +1 -1
- package/rest/versionManagement/gdbVersion/post.js +1 -1
- package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
- package/rest/versionManagement/gdbVersion/serverVersionUtils.js +1 -1
- package/rest/versionManagement/gdbVersion/support/PostResult.d.ts +1 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileResult.d.ts +1 -1
- package/smartMapping/raster/renderers/vectorField.js +1 -1
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/statistics/histogram.js +1 -1
- package/smartMapping/statistics/types.d.ts +18 -0
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/symbology/color.js +1 -1
- package/smartMapping/symbology/support/Theme.js +1 -1
- package/support/BasemapStyle.js +1 -1
- package/support/LayersMixin.js +1 -1
- package/support/TablesMixin.js +1 -1
- package/support/actions/ActionBase.d.ts +14 -2
- package/support/actions/ActionBase.js +1 -1
- package/support/actions/ActionButton.js +1 -1
- package/support/actions/ActionToggle.js +1 -1
- package/support/loadArcade.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/tables/support/templateUtils.js +1 -1
- package/versionManagement/VersionManagementService.d.ts +47 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/support/PostJobInfo.d.ts +61 -0
- package/versionManagement/support/PostJobInfo.js +2 -0
- package/versionManagement/support/ReconcileJobInfo.d.ts +61 -0
- package/versionManagement/support/ReconcileJobInfo.js +2 -0
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/bitmapUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/BuildingSublayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/LayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/PointCloudIntersector.js +2 -0
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/UPCPointRenderer.js +2 -0
- package/views/3d/layers/UPCPointRendererNode.js +2 -0
- package/views/3d/layers/UpdatablePointCloudLayerView3D.js +2 -0
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/PointCloudHighlights.js +1 -1
- package/views/3d/layers/i3s/PointCloudNodeHighlights.js +2 -0
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/GraphicsProcessorLayerView3D.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +9 -9
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +19 -19
- package/views/3d/webgl-engine/core/shaderLibrary/outputEmission.glsl.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/{util/CloudsParallaxShading.glsl.js → renderClouds.glsl.js} +5 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +21 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +1 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/blendLayers.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +41 -59
- package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleRangeBVH.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +15 -15
- package/views/3d/webgl-engine/materials/renderers/BufferCache.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +12 -14
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/UPCPointRenderer.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/UPCPointRendererTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/UPCPointRendererTechniqueConfiguration.js +2 -0
- package/views/Attribution.js +2 -2
- package/views/BreakpointsOwner.js +1 -1
- package/views/DOMContainer.d.ts +3 -2
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.d.ts +29 -3
- package/views/View.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/Viewport2DMixin.js +1 -1
- package/views/animation/pointToPoint/Animation.js +1 -1
- package/views/interactive/Tooltip.d.ts +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
- package/views/layers/MapImageLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/layers/RefreshableLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/overlay/ViewOverlay.js +1 -1
- package/views/support/flow/utils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/types.d.ts +15 -0
- package/views/webgl/AllocationTracer.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderBuilder.js +23 -23
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/capabilities/DisjointTimerQuery.js +1 -1
- package/views/webgl/capabilities.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +1 -1
- package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -0
- package/widgets/CoordinateConversion/support/Format.d.ts +1 -0
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/FeatureContentMixin.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/DrawHandlerMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
- package/widgets/smartMapping/support/utils.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/GoTo.js +1 -1
- package/widgets/support/InteractiveToolViewModelMixin.js +1 -1
- package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +0 -1
- package/assets/esri/core/workers/chunks/04f09e1afda92cbe09f5.js +0 -1
- package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +0 -1
- package/assets/esri/core/workers/chunks/0b74d353f80974ff6fea.js +0 -1
- package/assets/esri/core/workers/chunks/0e100855bb3832a68e4b.js +0 -1
- package/assets/esri/core/workers/chunks/0ede8ba757fd0976d485.js +0 -1
- package/assets/esri/core/workers/chunks/0f39576806866cff777d.js +0 -1
- package/assets/esri/core/workers/chunks/0fea695721a818955abf.js +0 -1
- package/assets/esri/core/workers/chunks/10499abb7678e95d9f05.js +0 -1
- package/assets/esri/core/workers/chunks/110f78d5e78732750097.js +0 -1
- package/assets/esri/core/workers/chunks/1507297550c3cd1268e2.js +0 -1
- package/assets/esri/core/workers/chunks/21aa29039a95debd7f44.js +0 -1
- package/assets/esri/core/workers/chunks/29b74a3ff03d3c8b65dc.js +0 -1
- package/assets/esri/core/workers/chunks/2a84c9a81ec2bed3d4e5.js +0 -1
- package/assets/esri/core/workers/chunks/2ad6db80a508285a3e5d.js +0 -1
- package/assets/esri/core/workers/chunks/2b87d5b8931305b11ff6.js +0 -1
- package/assets/esri/core/workers/chunks/2f07dc632e51fddb2d48.js +0 -1
- package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +0 -1
- package/assets/esri/core/workers/chunks/3169d639ab54bf508e2c.js +0 -1
- package/assets/esri/core/workers/chunks/3354f1fa90f8ce4c8fde.js +0 -1
- package/assets/esri/core/workers/chunks/3809a8b3f31bb811d964.js +0 -1
- package/assets/esri/core/workers/chunks/38bba952c38af5a150e7.js +0 -1
- package/assets/esri/core/workers/chunks/3982409149571a827390.js +0 -1
- package/assets/esri/core/workers/chunks/3aea09191b737dc1de70.js +0 -1
- package/assets/esri/core/workers/chunks/3b11e4d2e69b7aea1d65.js +0 -1
- package/assets/esri/core/workers/chunks/3c1651e9e8d2e83d22df.js +0 -1
- package/assets/esri/core/workers/chunks/3df6631895d0a7109e00.js +0 -1
- package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +0 -1
- package/assets/esri/core/workers/chunks/3f8d66d8447036f122ae.js +0 -1
- package/assets/esri/core/workers/chunks/420c6a14107a77ddad36.js +0 -1
- package/assets/esri/core/workers/chunks/421b8244d01736d82e7a.js +0 -1
- package/assets/esri/core/workers/chunks/457bd1bd37c67b61efe8.js +0 -1
- package/assets/esri/core/workers/chunks/48b60ff59afbae865de1.js +0 -1
- package/assets/esri/core/workers/chunks/4953314fd9afd52b6eec.js +0 -1
- package/assets/esri/core/workers/chunks/4cf8bddc3e0619e34424.js +0 -1
- package/assets/esri/core/workers/chunks/4d0bb5e4a1d789cc0d75.js +0 -1
- package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +0 -1
- package/assets/esri/core/workers/chunks/5060be52a380fc4920f8.js +0 -1
- package/assets/esri/core/workers/chunks/5082cdc3e91e1c6d1070.js +0 -1
- package/assets/esri/core/workers/chunks/52ded087d19a93e29d93.js +0 -1
- package/assets/esri/core/workers/chunks/53bbb9aa6e4e4a0a8121.js +0 -1
- package/assets/esri/core/workers/chunks/54d3cb7d95d948998591.js +0 -1
- package/assets/esri/core/workers/chunks/560ebf5524ade7d1f85b.js +0 -1
- package/assets/esri/core/workers/chunks/5d75fcaded78f76efd3e.js +0 -1
- package/assets/esri/core/workers/chunks/5f7505ada0991cfbdd84.js +0 -1
- package/assets/esri/core/workers/chunks/601d668e70c5d72fe58c.js +0 -1
- package/assets/esri/core/workers/chunks/6737b2a4a70bbdafaf67.js +0 -1
- package/assets/esri/core/workers/chunks/6a202ef9ba9b89e09153.js +0 -1
- package/assets/esri/core/workers/chunks/6a339a47e765b9937dd7.js +0 -1
- package/assets/esri/core/workers/chunks/6c21964eb7c25c8b1e9a.js +0 -1
- package/assets/esri/core/workers/chunks/6fd10891506925560443.js +0 -29
- package/assets/esri/core/workers/chunks/71a05edd6f7f3197e621.js +0 -1
- package/assets/esri/core/workers/chunks/72b7e7b518c88b7569dd.js +0 -1
- package/assets/esri/core/workers/chunks/73918ca7fdf41272d941.js +0 -1
- package/assets/esri/core/workers/chunks/75274ac3ddf7c45f47d7.js +0 -1
- package/assets/esri/core/workers/chunks/7673217a688d739141e2.js +0 -1
- package/assets/esri/core/workers/chunks/76869c14dd7ffaae7eff.js +0 -1
- package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +0 -1
- package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +0 -1
- package/assets/esri/core/workers/chunks/7bd5a074d9f4ba137649.js +0 -1
- package/assets/esri/core/workers/chunks/7c13d7754fc914a87817.js +0 -1
- package/assets/esri/core/workers/chunks/7dc2e714234b2cee8701.js +0 -1
- package/assets/esri/core/workers/chunks/80d1267606383ae537f2.js +0 -1
- package/assets/esri/core/workers/chunks/835e0315661003caa71f.js +0 -1
- package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +0 -1
- package/assets/esri/core/workers/chunks/86578c191d76062157ec.js +0 -1
- package/assets/esri/core/workers/chunks/87d6e99d83db9a8cda7c.js +0 -1
- package/assets/esri/core/workers/chunks/8c9934d30655dd2c48da.js +0 -1
- package/assets/esri/core/workers/chunks/9117c9b720c9ba6e7a6e.js +0 -1
- package/assets/esri/core/workers/chunks/939fb9a8c301ace07186.js +0 -1
- package/assets/esri/core/workers/chunks/94a38c9b3d086b37242f.js +0 -1
- package/assets/esri/core/workers/chunks/98e1751f888975532afc.js +0 -1
- package/assets/esri/core/workers/chunks/9d61f10f2bef15b5811d.js +0 -1
- package/assets/esri/core/workers/chunks/9dcf5be203f8b1e47d9d.js +0 -1
- package/assets/esri/core/workers/chunks/9e372af03d62fa5ad10e.js +0 -1
- package/assets/esri/core/workers/chunks/9eb00bb8dab995c2dcb3.js +0 -1
- package/assets/esri/core/workers/chunks/9ed81757937fe08363ed.js +0 -1
- package/assets/esri/core/workers/chunks/9fe07947cf4ec44014e8.js +0 -1
- package/assets/esri/core/workers/chunks/a1d265614d038eb603f7.js +0 -1
- package/assets/esri/core/workers/chunks/a3d02885d6962b49eee4.js +0 -1
- package/assets/esri/core/workers/chunks/a66d6298236d59a615db.js +0 -1
- package/assets/esri/core/workers/chunks/a710c7a0584d9e45a469.js +0 -1
- package/assets/esri/core/workers/chunks/ab784764ddf9d7f693a1.js +0 -1
- package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +0 -1
- package/assets/esri/core/workers/chunks/b7426e5f290573cb9689.js +0 -1
- package/assets/esri/core/workers/chunks/b88e1084097a93a89f61.js +0 -1
- package/assets/esri/core/workers/chunks/baa5aa0670b23db86b50.js +0 -1
- package/assets/esri/core/workers/chunks/c0867890a84b4c98e0ba.js +0 -1
- package/assets/esri/core/workers/chunks/c1a551c4aa77f123d091.js +0 -1
- package/assets/esri/core/workers/chunks/c58f859dec9d6675dbd6.js +0 -1
- package/assets/esri/core/workers/chunks/c7425fb5e804f0f9d4dd.js +0 -1
- package/assets/esri/core/workers/chunks/c85184baccb4004bf42b.js +0 -1
- package/assets/esri/core/workers/chunks/ccf4b5fdcdace533bcb7.js +0 -1
- package/assets/esri/core/workers/chunks/d5bb6f479c0cdfc21d8a.js +0 -1
- package/assets/esri/core/workers/chunks/d689e7c685dd9a444d19.js +0 -1
- package/assets/esri/core/workers/chunks/d8b84d21144a58b6b911.js +0 -1
- package/assets/esri/core/workers/chunks/d8ffb1502def5c85740b.js +0 -1
- package/assets/esri/core/workers/chunks/db96d1d9f6d1a4d7fd2a.js +0 -1
- package/assets/esri/core/workers/chunks/de35baceeb815e6befd5.js +0 -1
- package/assets/esri/core/workers/chunks/e0341def2d81e679a200.js +0 -1
- package/assets/esri/core/workers/chunks/e164198dbb87ee202ba1.js +0 -1
- package/assets/esri/core/workers/chunks/e4eb6fdf5115bed48856.js +0 -1
- package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +0 -1
- package/assets/esri/core/workers/chunks/e59271f8b142a7602b7a.js +0 -1
- package/assets/esri/core/workers/chunks/eef3fa804e456beac4c1.js +0 -1
- package/assets/esri/core/workers/chunks/f319b59228b64e7f9008.js +0 -1
- package/assets/esri/core/workers/chunks/f42adcea81390fb21c66.js +0 -1
- package/assets/esri/core/workers/chunks/f4fcf87da4495584223d.js +0 -1
- package/assets/esri/core/workers/chunks/f52d081bbde5c95265cf.js +0 -1
- package/assets/esri/core/workers/chunks/f7ab4bf14ec8e986ef7c.js +0 -1
- package/assets/esri/core/workers/chunks/f92c92c0fd1b5b33ca21.js +0 -1
- package/assets/esri/core/workers/chunks/f989588dfdbb69056491.js +0 -1
- package/assets/esri/core/workers/chunks/fbd5f3b81cd9f061824d.js +0 -1
- package/assets/esri/core/workers/chunks/fc5b920f9756e11c2f88.js +0 -1
- package/assets/esri/core/workers/chunks/fdcc5fe4630a4ccf58de.js +0 -1
- package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +0 -1
- package/assets/esri/core/workers/chunks/ff225735eba7f9130e19.js +0 -1
package/views/PopupView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{createTask as r}from"../core/asyncUtils.js";import i from"../core/Error.js";import{generatorFlat as a,generatorFromPromises as o}from"../core/generatorUtils.js";import has from"../core/has.js";import s from"../core/Logger.js";import{allSettledValues as c,throwIfAborted as l,wrapAbortWithTimeout as u}from"../core/promiseUtils.js";import{watch as d,syncAndInitial as f,whenOnce as p}from"../core/reactiveUtils.js";import{ViewEventPriorities as m}from"./input/InputManager.js";import{addPopup as h,openPopupWithViewClick as g,isPopup as _,isPopupElement as v,openPopupWithOptions as y,closePopup as b}from"./popupAdapter.js";const x=x=>{let w=x,T=class extends w{constructor(...e){super(...e),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([d(()=>[this.ui,this.popup,this.popupElement],([e,t,n],r)=>{let[i,a,o]=r??[];h(this,[e,t,n],[i,a,o])},f),this.on(`click`,e=>{!this.popup||!this.popupEnabled||e.pointerType===`mouse`&&e.button!==0||e.native.ctrlKey||e.native.metaKey||g(this,e).catch(()=>{})},m.WIDGET)]),p(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import(`../widgets/Popup.js`))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get(`popup`)}set popup(e){this._set(`popup`,e)}async openPopup(e){if(_(this.popup))return this.popup.open(e);if(this.popupElement&&v(this.popupElement)){if(e){let{fetchFeatures:t,title:n,...r}=e;delete e.fetchFeatures,Object.assign(this.popupElement,r),n!==void 0&&(this.popupElement.heading=n)}this.popupElement.open=!0}try{if(await this.setupPopup(),!this.popup){s.getLogger(this).error(new i(`view:null-popup`,`Popup is null and can't be opened`));return}y(this,e)}catch{}}closePopup(){this._popupSetupTask?.abort(),b(this.popup,this.popupElement)}fetchPopupFeatures(e,t){let n=this.when().then(()=>this._getPopupHits(e,t)).then(n=>(t?.hitTestResolver?.resolve(),this._popupHitsToFeatureStream(e,n.hits,t)),e=>{throw t?.hitTestResolver?.reject(e),e});return n.catch(()=>void 0),(async function*(){yield*await n})()}async fetchPopupFeaturesLegacy(e,t){await this.when();let n=await this._getPopupHits(e,t),r=this._popupHitsToFeatures(e,n.hits,t);return{pendingFeatures:r,allGraphicsPromise:c(r).then(e=>e.filter(e=>!!e).flat()),location:n.location}}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!_(this.popup))return this._popupSetupTask=r(async e=>{if(!(this.popupEnabled&&v(this.popupElement))){if(this.dependencies.popup&&typeof this.dependencies.popup==`function`)await this.dependencies.popup(),l(e),customElements.get(`arcgis-popup`)||s.getLogger(this).error(new i(`view:undefined-popup-element`,"`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement(`arcgis-popup`);else{let{default:t}=await import(`../widgets/Popup.js`);if(l(e),!this.popup||_(this.popup))return;let n=this.popup;if(`open`in n||`close`in n){let{open:e,close:r,...i}=n;this.popup=new t({...i})}else this.popup=new t(n)}}}),this._popupSetupTask.promise}async*_popupHitsToFeatureStream(e,t,n){let r=this._popupHitsToFeatures(e,t,n);yield*a(o(r,n),n)}_popupHitsToFeatures(e,t,n){let r=[],i=[],a=!1,o=u(n,has(`popup-view-fetch-timeout`)??C),s=e=>{let t=new S(e);return i.push(t),r.push(t.promise),t},c=e=>{let t=i.at(-1);return t&&t.layerView===e&&!a?t:s(e)};for(let n of t)`graphic`in n?(c(n.layerView).graphics.push(n.graphic),a=!1):(r.push(n.layerView.fetchPopupFeaturesAtTarget(e,n.geometry,o)),a=!0);return i.forEach(e=>e.resolve(o)),r}async _getPopupHits(e,t){let{hits:n,location:r}=await this.popupHitTest(e);l(t);let i=[];for(let e of n)if(`graphic`in e){if(this._isValidPopupGraphic(e.graphic,t)){let t=this._isFeaturePatchingLayerView(e.layerView)?e.layerView:void 0;i.push({graphic:e.graphic,layerView:t})}}else this._isValidPopupLocationLayerView(e.layerView)&&i.push({geometry:e.geometry,layerView:e.layerView});return{hits:i,location:r}}_isValidPopupGraphic(e,t){return e&&!!e.getEffectivePopupTemplate(t?.defaultPopupTemplateEnabled)}_isFeaturePatchingLayerView(e){return!e||(!(`layer`in e)||!e.suspended)&&`patchFeaturesForPopup`in e}_isValidPopupLocationLayerView(e){return!e||(!(`layer`in e)||!e.suspended)&&`fetchPopupFeaturesAtTarget`in e}};return e([t()],T.prototype,`popup`,null),e([t()],T.prototype,`popupElement`,void 0),e([t()],T.prototype,`popupEnabled`,void 0),T=e([n(`esri.views.PopupView`)],T)
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{createTask as r}from"../core/asyncUtils.js";import i from"../core/Error.js";import{generatorFlat as a,generatorFromPromises as o}from"../core/generatorUtils.js";import has from"../core/has.js";import s from"../core/Logger.js";import{allSettledValues as c,throwIfAborted as l,wrapAbortWithTimeout as u}from"../core/promiseUtils.js";import{watch as d,syncAndInitial as f,whenOnce as p}from"../core/reactiveUtils.js";import{ViewEventPriorities as m}from"./input/InputManager.js";import{addPopup as h,openPopupWithViewClick as g,isPopup as _,isPopupElement as v,openPopupWithOptions as y,closePopup as b}from"./popupAdapter.js";const x=x=>{let w=x,T=class extends w{constructor(...e){super(...e),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([d(()=>[this.ui,this.popup,this.popupElement],([e,t,n],r)=>{let[i,a,o]=r??[];h(this,[e,t,n],[i,a,o])},f),this.on(`click`,e=>{!this.popup||!this.popupEnabled||e.pointerType===`mouse`&&e.button!==0||e.native.ctrlKey||e.native.metaKey||g(this,e).catch(()=>{})},m.WIDGET)]),p(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import(`../widgets/Popup.js`))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get(`popup`)}set popup(e){this._set(`popup`,e)}async openPopup(e){if(_(this.popup))return this.popup.open(e);if(this.popupElement&&v(this.popupElement)){if(e){let{fetchFeatures:t,title:n,...r}=e;delete e.fetchFeatures,Object.assign(this.popupElement,r),n!==void 0&&(this.popupElement.heading=n)}this.popupElement.open=!0}try{if(await this.setupPopup(),!this.popup){s.getLogger(this).error(new i(`view:null-popup`,`Popup is null and can't be opened`));return}y(this,e)}catch{}}closePopup(){this._popupSetupTask?.abort(),b(this.popup,this.popupElement)}fetchPopupFeatures(e,t){let n=this.when().then(()=>this._getPopupHits(e,t)).then(n=>(t?.hitTestResolver?.resolve(),this._popupHitsToFeatureStream(e,n.hits,t)),e=>{throw t?.hitTestResolver?.reject(e),e});return n.catch(()=>void 0),(async function*(){yield*await n})()}async fetchPopupFeaturesLegacy(e,t){await this.when();let n=await this._getPopupHits(e,t),r=this._popupHitsToFeatures(e,n.hits,t);return{pendingFeatures:r,allGraphicsPromise:c(r).then(e=>e.filter(e=>!!e).flat()),location:n.location}}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!_(this.popup))return this._popupSetupTask=r(async e=>{if(!(this.popupEnabled&&v(this.popupElement))){if(this.dependencies.popup&&typeof this.dependencies.popup==`function`)await this.dependencies.popup(),l(e),customElements.get(`arcgis-popup`)||s.getLogger(this).error(new i(`view:undefined-popup-element`,"`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement(`arcgis-popup`);else{let{default:t}=await import(`../widgets/Popup.js`);if(l(e),!this.popup||_(this.popup))return;let n=this.popup;if(`open`in n||`close`in n){let{open:e,close:r,...i}=n;this.popup=new t({...i})}else this.popup=new t(n)}}}),this._popupSetupTask.promise}async*_popupHitsToFeatureStream(e,t,n){let r=this._popupHitsToFeatures(e,t,n);yield*a(o(r,n),n)}_popupHitsToFeatures(e,t,n){let r=[],i=[],a=!1,o=u(n,has(`popup-view-fetch-timeout`)??C),s=e=>{let t=new S(e);return i.push(t),r.push(t.promise),t},c=e=>{let t=i.at(-1);return t&&t.layerView===e&&!a?t:s(e)};for(let n of t)`graphic`in n?(c(n.layerView).graphics.push(n.graphic),a=!1):(r.push(n.layerView.fetchPopupFeaturesAtTarget(e,n.geometry,o)),a=!0);return i.forEach(e=>e.resolve(o)),r}async _getPopupHits(e,t){let{hits:n,location:r}=await this.popupHitTest(e);l(t);let i=[];for(let e of n)if(`graphic`in e){if(this._isValidPopupGraphic(e.graphic,t)){let t=this._isFeaturePatchingLayerView(e.layerView)?e.layerView:void 0;i.push({graphic:e.graphic,layerView:t})}}else this._isValidPopupLocationLayerView(e.layerView)&&i.push({geometry:e.geometry,layerView:e.layerView});return{hits:i,location:r}}_isValidPopupGraphic(e,t){return e&&!!e.getEffectivePopupTemplate(t?.defaultPopupTemplateEnabled)}_isFeaturePatchingLayerView(e){return!e||(!(`layer`in e)||!e.suspended)&&`patchFeaturesForPopup`in e}_isValidPopupLocationLayerView(e){return!e||(!(`layer`in e)||!e.suspended)&&`fetchPopupFeaturesAtTarget`in e}};return e([t()],T.prototype,`popup`,null),e([t()],T.prototype,`popupElement`,void 0),e([t()],T.prototype,`popupEnabled`,void 0),T=e([n(`esri.views.PopupView`)],T)};class S{constructor(e){this.layerView=e,this._resolver=Promise.withResolvers(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(e){let{layerView:t,graphics:n,_resolver:r}=this;if(!t)return r.resolve(n),r.promise;let i;return t.patchFeaturesForPopup(n,e).catch(e=>(i=e,null)).then(e=>{e?r.resolve(e):r.reject(i)}),r.promise}}const C=5e3;export{x as PopupView};
|
package/views/SceneView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Camera.js";import{property as n,cast as r,subclass as i}from"../core/accessorSupport/decorators.js";import{ensureType as a,ensureClass as o}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as s}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as c}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ee}from"../core/accessorSupport/trackingUtils.js";import l from"../core/Collection.js";import{byId as te}from"../core/domUtils.js";import u from"../core/Error.js";import{on as ne}from"../core/events.js";import{destroyHandle as re,makeHandle as d}from"../core/handleUtils.js";import has from"../core/has.js";import{create as ie}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ae}from"../core/libs/rbush/PooledRBush.js";import f from"../core/Logger.js";import{mapCollectionAsync as oe}from"../core/mapCollectionUtils.js";import{destroyMaybe as p,maybeProperty as se}from"../core/maybe.js";import{throwIfDestroyed as ce,throwIfAborted as le,createAbortError as ue}from"../core/promiseUtils.js";import de from"../core/ReactiveSet.js";import{on as fe,watch as m,initial as pe,sync as h,whenOnce as g,syncAndInitial as _}from"../core/reactiveUtils.js";import{cleanupScheduling as me}from"../core/scheduling.js";import{createScreenPoint as he,createScreenPointArray as ge}from"../core/screenUtils.js";import{cleanupWhereClauseCache as _e}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as ve,getMetersPerUnitForSR as v}from"../core/units.js";import{initialize as ye}from"../core/workers/workers.js";import y from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import b from"../geometry/Point.js";import{projectBoundingRect as xe}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as x}from"../geometry/projection/projectPointToVector.js";import{project as S,canProjectWithoutEngine as Se}from"../geometry/projectionUtils.js";import C from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Ce}from"../geometry/spatialReferenceEllipsoidUtils.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{IntegratedMeshSemantics as w}from"../layers/support/IntegratedMeshSemantics.js";import{isImageryTileLayer as T,isTiledLayer as E,isVoxelLayer as D,isIntegratedMeshLayer as O,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import Fe from"../Viewpoint.js";import Ie from"../webscene/Environment.js";import{clearVNodeCache as Le}from"../widgets/support/vnodeCache.js";import{importAnalysisViewModule as Re}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ze}from"./3d/camera/intersectionUtils.js";import k from"./3d/constraints/Constraints.js";import A from"./3d/environment/Environment.js";import{EnvironmentView as Be}from"./3d/environment/EnvironmentView.js";import{GroundView3D as Ve}from"./3d/GroundView3D.js";import He from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ue}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as We}from"./3d/layers/graphics/Labeler.js";import Ge from"./3d/layers/i3s/I3SLodHandling.js";import{layerView3DImporter as j}from"./3d/layerViewModuleImportUtils.js";import{Navigation3D as Ke}from"./3d/navigation/Navigation3D.js";import{cleanupPointToPointAnimationController as qe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Je}from"./3d/state/helpers/SceneIntersectionHelper.js";import{ScreenSizePerspective as Ye}from"./3d/state/ScreenSizePerspective.js";import{cleanupNavigationUtils as Xe}from"./3d/state/utils/navigationUtils.js";import M from"./3d/state/ViewState.js";import{ViewStateManager as Ze,cleanupViewStateManager as Qe}from"./3d/state/ViewStateManager.js";import $e from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as et}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as N}from"./3d/support/debugFlags.js";import{getElevationAtPoint as tt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as nt}from"./3d/support/GroundAndIMSurface.js";import{toMap as rt,hitTest as it}from"./3d/support/hitTest.js";import{PointsOfInterest as P}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import{popupHitTest as at}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as ot,getQualityProfileSettings as F}from"./3d/support/QualityProfile.js";import I from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as st}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ct}from"./3d/support/ResourceController.js";import lt from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as ut}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as dt}from"./3d/support/ViewSlice.js";import L from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as ft,getTiledLayerInfo as pt,checkIfTileInfoSupportedForView as mt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as ht}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as gt}from"./3d/terrain/TileRenderer.js";import{createWebGLContext as _t}from"./3d/webgl-engine/createWebGLContext.js";import{olidEnabled as vt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as yt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{cleanupEdgeProcessing as bt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import{defaultTolerance as R}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as z}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{Stage as St}from"./3d/webgl-engine/Stage.js";import{BreakpointsOwner as Ct}from"./BreakpointsOwner.js";import{DOMContainer as wt}from"./DOMContainer.js";import B from"./interactive/options/ViewOptions.js";import{PopupView as Tt}from"./PopupView.js";import Et from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as Dt}from"./support/drapedUtils.js";import{occludeesSupported as Ot}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as V,createScreenPointFromSupportedEvent as H}from"./support/screenUtils.js";import{isSpatialReferenceSupported as U}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as kt,destroyTextureCompressionWorker as At}from"./support/TextureCompressionHelper.js";import W from"./ui/3d/DefaultUI3D.js";import jt from"./ui/DefaultUI.js";import G from"./View.js";import Mt from"./ViewAnimation.js";import{stringFromIsGlobal as K,isGlobalFromString as q}from"./ViewingMode.js";var J;const Nt=Symbol(),Y=Symbol();function Pt(e){let t=o(B,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let X=class extends Ct(Tt(wt(G))){static{J=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new B({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=ct(this),this.deconflictor=new Ue({view:this}),this.attribution3D=new $e({view:this}),this.labeler=new We({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new Ke({view:this}),this.basemapTerrain=null,this.elevationProvider=new et({view:this}),this._canvas=null,this.constraints=new k,this._environment=new A,this.environmentView=new Be,this.floors=new l,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Et({importAnalysisViewModule:e=>Re(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new de,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new M({view:this}),this.slice=new dt,this.renderCoordsHelper=new st,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new W,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(re(oe(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([fe(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),m(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new He({view:this}),this.stateManager=new Ze({view:this}),this.screenSizePerspective=new Ye({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=kt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new Ve({view:this}),this.groundAndIMSurface=new nt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},pe),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},pe),this.addHandles([m(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),m(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(At(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set(`labeler`,p(this.labeler)),this._set(`deconflictor`,p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set(`stateManager`,p(this.stateManager)),this._set(`inputManager`,p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,p(this.environmentView)),this._set(`environment`,p(this.environment)),this.groundView=p(this.groundView),this.groundAndIMSurface.destroy(),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.groundView?.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=a(b,e))}get clippingArea(){if(this.state.isGlobal)return null;let e=this.map,t=this._userClippingArea||se(e,`clippingArea`);return!(this._userClippingArea||se(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof y?this.spatialReference&&(t=Z(t,this.spatialReference),t==null)?(f.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),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):(f.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.state.isGlobal&&e!=null?f.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.isGlobal)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:Z(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||C.WGS84,n=Z(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||C.WGS84,t,n=n=>{let r=Z(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new y({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)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);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof A?e:e instanceof Ie?this.environment?.cloneWithWebsceneEnvironment(e)??A.fromWebsceneEnvironment(e):a(A,e):new A}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 J._layerToLayerview}static{this._layerToLayerview=G._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){let t=F(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new I(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||ot()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?c(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=ve(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&f.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;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||ft(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return N.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return N.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedGlobalMode;if(e!=null)return K(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?K(this.defaultsFromMap.viewingMode===1):U(t,!0)?`global`:`local`:`global`}set viewingMode(e){this.ready?f.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 lt(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return f.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=V(e)?H(this,e):e;return rt(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return f.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=It,t.x=e.x,t.y=e.y,t.z=tt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),x(t,Q,this.renderSpatialReference),this.state.camera.projectToScreen(Q,$),he($[0],$[1])}pixelSizeAt(e,t){if(!this.ready)return f.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;x(e,Q,n);let r=this.state.camera.computeScreenPixelSizeAt(Q);return t&&n!==t?r*v(n)/v(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return f.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=V(e)?H(this,e):e;return it(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return at(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new u(`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){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!vt())throw new u(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),a=await this._completeSettings(e);return a.format=`png`,[i,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new u(`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 j.importLayerView(e)}hasLayerViewModule(e){return j.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedGlobalMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:q(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedGlobalMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n==null?[...r(!0)??[],...r(!1)??[]]:r(n);return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return U(e,n)?t==null||T(t)?!0:!(E(t)&&pt(t,e,n)==null||D(t)&&n):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,isGlobal:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?C.WGS84:C.WebMercator:new C({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return T(t)&&(i||a)?!(a&&r!==!1)||mt(t.tileInfo,t.fullExtent,e,!0)===null?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:n}]:[{spatialReference:c(),isGlobal:n}]:!E(t)&&!D(t)&&(i||a)?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:n}]:E(t)&&i&&!n?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:!1}]:[{spatialReference:e,isGlobal:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedGlobalMode;return t||(n==null?e.isGeographic&&f.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):f.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${K(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return f.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),d(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return f.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Ot(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),d(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await g(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),d(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await Lt[e]();if(t&&(ce(this),le(n.signal),await t(n.signal)),this.destroyed)throw ue();return le(n.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 L({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{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 P({view:this})),this.addHandles([this.updatingHandles.add(()=>N.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&N.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=p(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?S(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=p(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let 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(Y),this.removeHandles(Nt),this._featureTiles=p(this.featureTiles),this._set(`pointsOfInterest`,p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this.renderCoordsHelper.isGlobal=this.state.isGlobal,this.renderCoordsHelper.spatialReference=n,t||this.addHandles(m(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&xe(e,this.groundView.spatialReference,Ft,t)&&(this.renderCoordsHelper.extent=Ft)},h),Y),this.sceneIntersectionHelper?.setTolerance(R/this.renderCoordsHelper.unitInMeters))}}_exitCoordinateSystem(){this.removeHandles(Y)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(m(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(e){let t={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,context:e,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},n=new Je(this.state.isGlobal,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,n);let r=te(this.surface);this._stage=new St({view:this,options:t,container:r}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),ne(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new u(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.sceneIntersectionHelper.setTolerance(R/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=p(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface();let e=_t(this.renderCanvas,{alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled});this._initStage(e),this._initGlobe(),this.sharedSymbolResources=new ut({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`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>g(()=>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=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){q(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(fe(()=>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`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?s(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(z);for(let t of this.allLayerViews)(O(t.layer)&&w.shouldIntersectAsGround(t.layer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(z);for(let t of this.allLayerViews)O(t.layer)&&w.shouldIntersectAsGround(t.layer)&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Le(),ee(),_e(),bt(),Qe(),ze(),Ce(),Dt(),Ne(),gt(),xt(),qe(),Xe(),ae(),me(),yt(),ht(),Ge.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),M.cleanupViewstate(),L.cleanupTerrainSurface()}};e([n({nonNullable:!0}),r(Pt)],X.prototype,`options`,void 0),e([n()],X.prototype,`_userClippingArea`,void 0),e([n()],X.prototype,`_resourceController`,void 0),e([n()],X.prototype,`stage`,null),e([n({readOnly:!0})],X.prototype,`deconflictor`,void 0),e([n({readOnly:!0})],X.prototype,`labeler`,void 0),e([n()],X.prototype,`navigation`,void 0),e([n({type:Mt,readOnly:!0})],X.prototype,`animation`,null),e([n({readOnly:!0})],X.prototype,`basemapTerrain`,void 0),e([n({readOnly:!0})],X.prototype,`overlayManager`,null),e([n({readOnly:!0})],X.prototype,`elevationProvider`,void 0),e([n()],X.prototype,`camera`,null),e([n({type:t})],X.prototype,`contentCamera`,null),e([n({readOnly:!0})],X.prototype,`canvas`,null),e([n({type:b,useTypeForAutocast:!1})],X.prototype,`center`,null),e([n({type:y})],X.prototype,`clippingArea`,null),e([n({type:k,nonNullable:!0})],X.prototype,`constraints`,void 0),e([n({type:y,readOnly:!0})],X.prototype,`renderDataExtent`,null),e([n({readOnly:!0})],X.prototype,`tileInfo`,null),e([n({type:y,readOnly:!0})],X.prototype,`dataExtent`,null),e([n({type:y,readOnly:!0})],X.prototype,`_groundAndLayersExtent`,null),e([n({type:A})],X.prototype,`environment`,null),e([r(`environment`)],X.prototype,`castEnvironment`,null),e([n({readOnly:!0})],X.prototype,`environmentView`,void 0),e([n({type:y})],X.prototype,`extent`,null),e([n({type:l})],X.prototype,`floors`,void 0),e([n()],X.prototype,`screenCenter`,null),e([n()],X.prototype,`frustum`,null),e([n({type:Number,readOnly:!0})],X.prototype,`fullOpacity`,void 0),e([n({readOnly:!0})],X.prototype,`graphicsView`,void 0),e([n()],X.prototype,`analysisViewManager`,void 0),e([n()],X.prototype,`groundView`,void 0),e([n({readOnly:!0})],X.prototype,`layerviewCollections`,null),e([n({type:Boolean})],X.prototype,`initialExtentRequired`,null),e([n()],X.prototype,`defaultsFromMapSettings`,null),e([n()],X.prototype,`interacting`,null),e([n()],X.prototype,`stationary`,null),e([n()],X.prototype,`navigating`,null),e([n()],X.prototype,`map`,void 0),e([n()],X.prototype,`padding`,null),e([n({type:P,readOnly:!0})],X.prototype,`pointsOfInterest`,void 0),e([n()],X.prototype,`_featureTiles`,void 0),e([n()],X.prototype,`featureTiles`,null),e([n()],X.prototype,`_featureTreeDebugger`,void 0),e([n({constructOnly:!0})],X.prototype,`deactivatedWebGLExtensions`,void 0),e([n({constructOnly:!0})],X.prototype,`debugWebGLExtensions`,void 0),e([n({constructOnly:!0})],X.prototype,`renderCanvas`,void 0),e([n({constructOnly:!0})],X.prototype,`state`,void 0),e([n()],X.prototype,`screenSizePerspective`,void 0),e([n({readOnly:!0})],X.prototype,`inputManager`,void 0),e([n({readOnly:!0})],X.prototype,`stateManager`,void 0),e([n({type:[`low`,`medium`,`high`]})],X.prototype,`qualityProfile`,null),e([n({type:I,get(){let e=this._get(`qualitySettings`);if(!e){let t=F(this.qualityProfile);e=new I(t)}return e}})],X.prototype,`qualitySettings`,void 0),e([n()],X.prototype,`slice`,void 0),e([n({readOnly:!0})],X.prototype,`typeSpecificPreconditionsReady`,null),e([n({readOnly:!0})],X.prototype,`sceneIntersectionHelper`,void 0),e([n({type:Number,readOnly:!0})],X.prototype,`resolution`,null),e([n({type:Number})],X.prototype,`scale`,null),e([n({readOnly:!0,type:Number})],X.prototype,`terrainLevel`,null),e([n()],X.prototype,`heightModelInfo`,null),e([n({type:C})],X.prototype,`spatialReference`,void 0),e([n({type:Boolean,value:!1})],X.prototype,`alphaCompositingEnabled`,null),e([n({constructOnly:!0})],X.prototype,`preserveDrawingBufferEnabled`,void 0),e([n({type:Boolean})],X.prototype,`supersampleScreenshotsEnabled`,void 0),e([n({readOnly:!0})],X.prototype,`type`,void 0),e([n(),r(e=>e instanceof jt?e:o(W,e))],X.prototype,`ui`,void 0),e([n({type:Boolean,readOnly:!0})],X.prototype,`updating`,null),e([n()],X.prototype,`_updatingObjects`,null),e([n()],X.prototype,`_updatingObjectsWithProgress`,null),e([n()],X.prototype,`_updatingObjectsToDebug`,null),e([n({type:Number,readOnly:!0})],X.prototype,`updatingProgress`,void 0),e([n({type:[`global`,`local`]})],X.prototype,`viewingMode`,null),e([n({type:Fe})],X.prototype,`viewpoint`,null),e([n({readOnly:!0})],X.prototype,`visibleArea`,null),e([n({type:Number})],X.prototype,`zoom`,null),e([n({readOnly:!0})],X.prototype,`quality`,null),e([n({readOnly:!0})],X.prototype,`resolutionScale`,null),e([n()],X.prototype,`focusAreasView`,void 0),e([n()],X.prototype,`_defaultToMapOptions`,null),e([n()],X.prototype,`_defaultHitTestOptions`,null),X=J=e([i(`esri.views.SceneView`)],X);function Z(e,t){return e!=null&&Se(e.spatialReference,t)?S(e,t):null}const Q=ie(),$=ge(),Ft=Te(),It=Ae(0,0,0,C.WebMercator),Lt={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Rt=X;export{Rt as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Camera.js";import{property as n,cast as r,subclass as i}from"../core/accessorSupport/decorators.js";import{ensureType as a,ensureClass as o}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as s}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as c}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ee}from"../core/accessorSupport/trackingUtils.js";import l from"../core/Collection.js";import{byId as te}from"../core/domUtils.js";import u from"../core/Error.js";import{on as ne}from"../core/events.js";import{destroyHandle as re,makeHandle as d}from"../core/handleUtils.js";import has from"../core/has.js";import{create as ie}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ae}from"../core/libs/rbush/PooledRBush.js";import f from"../core/Logger.js";import{mapCollectionAsync as oe}from"../core/mapCollectionUtils.js";import{destroyMaybe as p,maybeProperty as se}from"../core/maybe.js";import{throwIfDestroyed as ce,throwIfAborted as le,createAbortError as ue}from"../core/promiseUtils.js";import de from"../core/ReactiveSet.js";import{on as fe,watch as m,initial as pe,sync as h,whenOnce as g,syncAndInitial as _}from"../core/reactiveUtils.js";import{cleanupScheduling as me}from"../core/scheduling.js";import{createScreenPoint as he,createScreenPointArray as ge}from"../core/screenUtils.js";import{cleanupWhereClauseCache as _e}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as ve,getMetersPerUnitForSR as v}from"../core/units.js";import{initialize as ye}from"../core/workers/workers.js";import y from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import b from"../geometry/Point.js";import{projectBoundingRect as xe}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as x}from"../geometry/projection/projectPointToVector.js";import{project as S,canProjectWithoutEngine as Se}from"../geometry/projectionUtils.js";import C from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Ce}from"../geometry/spatialReferenceEllipsoidUtils.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{IntegratedMeshSemantics as w}from"../layers/support/IntegratedMeshSemantics.js";import{isImageryTileLayer as T,isTiledLayer as E,isVoxelLayer as D,isIntegratedMeshLayer as O,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import Fe from"../Viewpoint.js";import Ie from"../webscene/Environment.js";import{clearVNodeCache as Le}from"../widgets/support/vnodeCache.js";import{importAnalysisViewModule as Re}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ze}from"./3d/camera/intersectionUtils.js";import k from"./3d/constraints/Constraints.js";import A from"./3d/environment/Environment.js";import{EnvironmentView as Be}from"./3d/environment/EnvironmentView.js";import{GroundView3D as Ve}from"./3d/GroundView3D.js";import He from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ue}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as We}from"./3d/layers/graphics/Labeler.js";import Ge from"./3d/layers/i3s/I3SLodHandling.js";import{layerView3DImporter as j}from"./3d/layerViewModuleImportUtils.js";import{Navigation3D as Ke}from"./3d/navigation/Navigation3D.js";import{cleanupPointToPointAnimationController as qe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Je}from"./3d/state/helpers/SceneIntersectionHelper.js";import{ScreenSizePerspective as Ye}from"./3d/state/ScreenSizePerspective.js";import{cleanupNavigationUtils as Xe}from"./3d/state/utils/navigationUtils.js";import M from"./3d/state/ViewState.js";import{ViewStateManager as Ze,cleanupViewStateManager as Qe}from"./3d/state/ViewStateManager.js";import $e from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as et}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as N}from"./3d/support/debugFlags.js";import{getElevationAtPoint as tt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as nt}from"./3d/support/GroundAndIMSurface.js";import{toMap as rt,hitTest as it}from"./3d/support/hitTest.js";import{PointsOfInterest as P}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import{popupHitTest as at}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as ot,getQualityProfileSettings as F}from"./3d/support/QualityProfile.js";import I from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as st}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ct}from"./3d/support/ResourceController.js";import lt from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as ut}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as dt}from"./3d/support/ViewSlice.js";import L from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as ft,getTiledLayerInfo as pt,checkIfTileInfoSupportedForView as mt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as ht}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as gt}from"./3d/terrain/TileRenderer.js";import{createWebGLContext as _t}from"./3d/webgl-engine/createWebGLContext.js";import{olidEnabled as vt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as yt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{cleanupEdgeProcessing as bt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import{defaultTolerance as R}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as z}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{Stage as St}from"./3d/webgl-engine/Stage.js";import{BreakpointsOwner as Ct}from"./BreakpointsOwner.js";import{DOMContainer as wt}from"./DOMContainer.js";import B from"./interactive/options/ViewOptions.js";import{PopupView as Tt}from"./PopupView.js";import Et from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as Dt}from"./support/drapedUtils.js";import{occludeesSupported as Ot}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as V,createScreenPointFromSupportedEvent as H}from"./support/screenUtils.js";import{isSpatialReferenceSupported as U}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as kt,destroyTextureCompressionWorker as At}from"./support/TextureCompressionHelper.js";import W from"./ui/3d/DefaultUI3D.js";import jt from"./ui/DefaultUI.js";import G from"./View.js";import Mt from"./ViewAnimation.js";import{stringFromIsGlobal as K,isGlobalFromString as q}from"./ViewingMode.js";var J;const Nt=Symbol(),Y=Symbol();function Pt(e){let t=o(B,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let X=class extends Ct(Tt(wt(G))){static{J=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new B({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=ct(this),this.deconflictor=new Ue({view:this}),this.attribution3D=new $e({view:this}),this.labeler=new We({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new Ke({view:this}),this.basemapTerrain=null,this.elevationProvider=new et({view:this}),this._canvas=null,this.constraints=new k,this._environment=new A,this.environmentView=new Be,this.floors=new l,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Et({importAnalysisViewModule:e=>Re(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new de,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new M({view:this}),this.slice=new dt,this.renderCoordsHelper=new st,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new W,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(re(oe(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([fe(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),m(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new He({view:this}),this.stateManager=new Ze({view:this}),this.screenSizePerspective=new Ye({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=kt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new Ve({view:this}),this.groundAndIMSurface=new nt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},pe),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},pe),this.addHandles([m(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),m(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(At(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set(`labeler`,p(this.labeler)),this._set(`deconflictor`,p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set(`stateManager`,p(this.stateManager)),this._set(`inputManager`,p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,p(this.environmentView)),this._set(`environment`,p(this.environment)),this.groundView=p(this.groundView),this.groundAndIMSurface.destroy(),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.groundView?.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=a(b,e))}get clippingArea(){if(this.state.isGlobal)return null;let e=this.map,t=this._userClippingArea||se(e,`clippingArea`);return!(this._userClippingArea||se(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof y?this.spatialReference&&(t=Z(t,this.spatialReference),t==null)?(f.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),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):(f.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.state.isGlobal&&e!=null?f.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.isGlobal)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:Z(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this.groundAndLayersExtent,t=this.spatialReference||C.WGS84,n=Z(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get groundAndLayersExtent(){let e=this.spatialReference||C.WGS84,t,n=n=>{let r=Z(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new y({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)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);let s=this._get(`groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof A?e:e instanceof Ie?this.environment?.cloneWithWebsceneEnvironment(e)??A.fromWebsceneEnvironment(e):a(A,e):new A}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 J._layerToLayerview}static{this._layerToLayerview=G._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){let t=F(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new I(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||ot()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?c(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=ve(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&f.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;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||ft(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return N.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return N.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedGlobalMode;if(e!=null)return K(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?K(this.defaultsFromMap.viewingMode===1):U(t,!0)?`global`:`local`:`global`}set viewingMode(e){this.ready?f.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 lt(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return f.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=V(e)?H(this,e):e;return rt(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return f.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=It,t.x=e.x,t.y=e.y,t.z=tt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),x(t,Q,this.renderSpatialReference),this.state.camera.projectToScreen(Q,$),he($[0],$[1])}pixelSizeAt(e,t){if(!this.ready)return f.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;x(e,Q,n);let r=this.state.camera.computeScreenPixelSizeAt(Q);return t&&n!==t?r*v(n)/v(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return f.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=V(e)?H(this,e):e;return it(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return at(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new u(`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){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!vt())throw new u(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),a=await this._completeSettings(e);return a.format=`png`,[i,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new u(`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 j.importLayerView(e)}hasLayerViewModule(e){return j.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedGlobalMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:q(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedGlobalMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n==null?[...r(!0)??[],...r(!1)??[]]:r(n);return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return U(e,n)?t==null||T(t)?!0:!(E(t)&&pt(t,e,n)==null||D(t)&&n):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,isGlobal:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?C.WGS84:C.WebMercator:new C({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return T(t)&&(i||a)?!(a&&r!==!1)||mt(t.tileInfo,t.fullExtent,e,!0)===null?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:n}]:[{spatialReference:c(),isGlobal:n}]:!E(t)&&!D(t)&&(i||a)?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:n}]:E(t)&&i&&!n?[{spatialReference:e,isGlobal:n},{spatialReference:c(),isGlobal:!1}]:[{spatialReference:e,isGlobal:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedGlobalMode;return t||(n==null?e.isGeographic&&f.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):f.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${K(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return f.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),d(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return f.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Ot(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),d(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await g(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),d(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await Lt[e]();if(t&&(ce(this),le(n.signal),await t(n.signal)),this.destroyed)throw ue();return le(n.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 L({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{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 P({view:this})),this.addHandles([this.updatingHandles.add(()=>N.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&N.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=p(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?S(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=p(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let 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(Y),this.removeHandles(Nt),this._featureTiles=p(this.featureTiles),this._set(`pointsOfInterest`,p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this.renderCoordsHelper.isGlobal=this.state.isGlobal,this.renderCoordsHelper.spatialReference=n,t||this.addHandles(m(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&xe(e,this.groundView.spatialReference,Ft,t)&&(this.renderCoordsHelper.extent=Ft)},h),Y),this.sceneIntersectionHelper?.setTolerance(R/this.renderCoordsHelper.unitInMeters))}}_exitCoordinateSystem(){this.removeHandles(Y)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(m(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(e){let t={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,context:e,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},n=new Je(this.state.isGlobal,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,n);let r=te(this.surface);this._stage=new St({view:this,options:t,container:r}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),ne(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new u(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.sceneIntersectionHelper.setTolerance(R/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=p(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface();let e=_t(this.renderCanvas,{alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled});this._initStage(e),this._initGlobe(),this.sharedSymbolResources=new ut({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`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>g(()=>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=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){q(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(fe(()=>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`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?s(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(z);for(let t of this.allLayerViews)(O(t.layer)&&w.shouldIntersectAsGround(t.layer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(z);for(let t of this.allLayerViews)O(t.layer)&&w.shouldIntersectAsGround(t.layer)&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Le(),ee(),_e(),bt(),Qe(),ze(),Ce(),Dt(),Ne(),gt(),xt(),qe(),Xe(),ae(),me(),yt(),ht(),Ge.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),M.cleanupViewstate(),L.cleanupTerrainSurface()}};e([n({nonNullable:!0}),r(Pt)],X.prototype,`options`,void 0),e([n()],X.prototype,`_userClippingArea`,void 0),e([n()],X.prototype,`_resourceController`,void 0),e([n()],X.prototype,`stage`,null),e([n({readOnly:!0})],X.prototype,`deconflictor`,void 0),e([n({readOnly:!0})],X.prototype,`labeler`,void 0),e([n()],X.prototype,`navigation`,void 0),e([n({type:Mt,readOnly:!0})],X.prototype,`animation`,null),e([n({readOnly:!0})],X.prototype,`basemapTerrain`,void 0),e([n({readOnly:!0})],X.prototype,`overlayManager`,null),e([n({readOnly:!0})],X.prototype,`elevationProvider`,void 0),e([n()],X.prototype,`camera`,null),e([n({type:t})],X.prototype,`contentCamera`,null),e([n({readOnly:!0})],X.prototype,`canvas`,null),e([n({type:b,useTypeForAutocast:!1})],X.prototype,`center`,null),e([n({type:y})],X.prototype,`clippingArea`,null),e([n({type:k,nonNullable:!0})],X.prototype,`constraints`,void 0),e([n({type:y,readOnly:!0})],X.prototype,`renderDataExtent`,null),e([n({readOnly:!0})],X.prototype,`tileInfo`,null),e([n({type:y,readOnly:!0})],X.prototype,`dataExtent`,null),e([n({type:y,readOnly:!0})],X.prototype,`groundAndLayersExtent`,null),e([n({type:A})],X.prototype,`environment`,null),e([r(`environment`)],X.prototype,`castEnvironment`,null),e([n({readOnly:!0})],X.prototype,`environmentView`,void 0),e([n({type:y})],X.prototype,`extent`,null),e([n({type:l})],X.prototype,`floors`,void 0),e([n()],X.prototype,`screenCenter`,null),e([n()],X.prototype,`frustum`,null),e([n({type:Number,readOnly:!0})],X.prototype,`fullOpacity`,void 0),e([n({readOnly:!0})],X.prototype,`graphicsView`,void 0),e([n()],X.prototype,`analysisViewManager`,void 0),e([n()],X.prototype,`groundView`,void 0),e([n({readOnly:!0})],X.prototype,`layerviewCollections`,null),e([n({type:Boolean})],X.prototype,`initialExtentRequired`,null),e([n()],X.prototype,`defaultsFromMapSettings`,null),e([n()],X.prototype,`interacting`,null),e([n()],X.prototype,`stationary`,null),e([n()],X.prototype,`navigating`,null),e([n()],X.prototype,`map`,void 0),e([n()],X.prototype,`padding`,null),e([n({type:P,readOnly:!0})],X.prototype,`pointsOfInterest`,void 0),e([n()],X.prototype,`_featureTiles`,void 0),e([n()],X.prototype,`featureTiles`,null),e([n()],X.prototype,`_featureTreeDebugger`,void 0),e([n({constructOnly:!0})],X.prototype,`deactivatedWebGLExtensions`,void 0),e([n({constructOnly:!0})],X.prototype,`debugWebGLExtensions`,void 0),e([n({constructOnly:!0})],X.prototype,`renderCanvas`,void 0),e([n({constructOnly:!0})],X.prototype,`state`,void 0),e([n()],X.prototype,`screenSizePerspective`,void 0),e([n({readOnly:!0})],X.prototype,`inputManager`,void 0),e([n({readOnly:!0})],X.prototype,`stateManager`,void 0),e([n({type:[`low`,`medium`,`high`]})],X.prototype,`qualityProfile`,null),e([n({type:I,get(){let e=this._get(`qualitySettings`);if(!e){let t=F(this.qualityProfile);e=new I(t)}return e}})],X.prototype,`qualitySettings`,void 0),e([n()],X.prototype,`slice`,void 0),e([n({readOnly:!0})],X.prototype,`typeSpecificPreconditionsReady`,null),e([n({readOnly:!0})],X.prototype,`sceneIntersectionHelper`,void 0),e([n({type:Number,readOnly:!0})],X.prototype,`resolution`,null),e([n({type:Number})],X.prototype,`scale`,null),e([n({readOnly:!0,type:Number})],X.prototype,`terrainLevel`,null),e([n()],X.prototype,`heightModelInfo`,null),e([n({type:C})],X.prototype,`spatialReference`,void 0),e([n({type:Boolean,value:!1})],X.prototype,`alphaCompositingEnabled`,null),e([n({constructOnly:!0})],X.prototype,`preserveDrawingBufferEnabled`,void 0),e([n({type:Boolean})],X.prototype,`supersampleScreenshotsEnabled`,void 0),e([n({readOnly:!0})],X.prototype,`type`,void 0),e([n(),r(e=>e instanceof jt?e:o(W,e))],X.prototype,`ui`,void 0),e([n({type:Boolean,readOnly:!0})],X.prototype,`updating`,null),e([n()],X.prototype,`_updatingObjects`,null),e([n()],X.prototype,`_updatingObjectsWithProgress`,null),e([n()],X.prototype,`_updatingObjectsToDebug`,null),e([n({type:Number,readOnly:!0})],X.prototype,`updatingProgress`,void 0),e([n({type:[`global`,`local`]})],X.prototype,`viewingMode`,null),e([n({type:Fe})],X.prototype,`viewpoint`,null),e([n({readOnly:!0})],X.prototype,`visibleArea`,null),e([n({type:Number})],X.prototype,`zoom`,null),e([n({readOnly:!0})],X.prototype,`quality`,null),e([n({readOnly:!0})],X.prototype,`resolutionScale`,null),e([n()],X.prototype,`focusAreasView`,void 0),e([n()],X.prototype,`_defaultToMapOptions`,null),e([n()],X.prototype,`_defaultHitTestOptions`,null),X=J=e([i(`esri.views.SceneView`)],X);function Z(e,t){return e!=null&&Se(e.spatialReference,t)?S(e,t):null}const Q=ie(),$=ge(),Ft=Te(),It=Ae(0,0,0,C.WebMercator),Lt={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Rt=X;export{Rt as default};
|
package/views/View.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type ViewAnimation from "./ViewAnimation.js";
|
|
|
6
6
|
import type Collection from "../core/Collection.js";
|
|
7
7
|
import type EsriError from "../core/Error.js";
|
|
8
8
|
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
9
|
-
import type
|
|
9
|
+
import type Map from "../Map.js";
|
|
10
10
|
import type TimeExtent from "../time/TimeExtent.js";
|
|
11
11
|
import type BasemapView from "./BasemapView.js";
|
|
12
12
|
import type Input from "./input/Input.js";
|
|
@@ -17,9 +17,10 @@ import type SelectionManager from "./SelectionManager.js";
|
|
|
17
17
|
import type HighlightOptions from "./support/HighlightOptions.js";
|
|
18
18
|
import type Theme from "./Theme.js";
|
|
19
19
|
import type { ReadonlyArrayOrCollection, ReadonlyCollection } from "../core/Collection.js";
|
|
20
|
+
import type { ResourceHandle } from "../core/Handles.js";
|
|
20
21
|
import type { ScreenRect } from "../core/types.js";
|
|
21
22
|
import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
|
|
22
|
-
import type { SceneViewEventTypes,
|
|
23
|
+
import type { PersistableComponent, SceneViewEventTypes, ViewHighlightOptions } from "./types.js";
|
|
23
24
|
import type { ViewPadding } from "./ui/types.js";
|
|
24
25
|
import type { EventedMixin } from "../core/Evented.js";
|
|
25
26
|
import type { EsriPromise } from "../core/Promise.js";
|
|
@@ -571,7 +572,7 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
|
|
|
571
572
|
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). See the [class description](https://developers.arcgis.com/javascript/latest/references/core/views/View/)
|
|
572
573
|
* for examples demonstrating the relationship between the map and the view.
|
|
573
574
|
*/
|
|
574
|
-
get map():
|
|
575
|
+
get map(): Map | null | undefined;
|
|
575
576
|
set map(value: MapProperties | null | undefined);
|
|
576
577
|
/**
|
|
577
578
|
* Indicates whether the view is being navigated (for example when panning).
|
|
@@ -816,6 +817,31 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
|
|
|
816
817
|
* @see [WebScene.destroy()](https://developers.arcgis.com/javascript/latest/references/core/WebScene/#destroy)
|
|
817
818
|
*/
|
|
818
819
|
destroy(): void;
|
|
820
|
+
/**
|
|
821
|
+
* Highlights graphics from one or more layers in the view.
|
|
822
|
+
*
|
|
823
|
+
* If a layer view is still being created, the highlight is applied when it is ready.
|
|
824
|
+
* Graphics that the view cannot highlight are skipped.
|
|
825
|
+
*
|
|
826
|
+
* @param graphics - A graphic or an array of graphics to highlight.
|
|
827
|
+
* @param options - The named highlight style to use from the view's [highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection.
|
|
828
|
+
* @returns A handle whose `remove()` method clears active highlights and cancels pending highlights created by this call.
|
|
829
|
+
* @since 6.0
|
|
830
|
+
* @example
|
|
831
|
+
* ```js
|
|
832
|
+
* await view.when();
|
|
833
|
+
* let highlight;
|
|
834
|
+
*
|
|
835
|
+
* view.on("click", async (event) => {
|
|
836
|
+
* const { results } = await view.hitTest(event, { include: featureLayer });
|
|
837
|
+
* const graphics = results.map(({ graphic }) => graphic);
|
|
838
|
+
*
|
|
839
|
+
* highlight?.remove();
|
|
840
|
+
* highlight = graphics.length ? view.highlight(graphics, { name: "temporary" }) : undefined;
|
|
841
|
+
* });
|
|
842
|
+
* ```
|
|
843
|
+
*/
|
|
844
|
+
highlight(graphics: Graphic | Graphic[], options?: ViewHighlightOptions): ResourceHandle;
|
|
819
845
|
/**
|
|
820
846
|
* Registers a component with the view so that it can participate in web document persistence.
|
|
821
847
|
*
|
package/views/View.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{createTask as r}from"../core/asyncUtils.js";import i from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{referenceSetter as o}from"../core/collectionUtils.js";import s from"../core/Error.js";import{EventedMixin as ee}from"../core/Evented.js";import c from"../core/Handles.js";import{makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as u}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as f,abortMaybe as p}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as h}from"../core/promiseUtils.js";import te from"../core/ReactiveSet.js";import{watch as g,sync as _,whenOnce as v,when as y,syncAndInitial as b}from"../core/reactiveUtils.js";import{owningCollectionProperty as x}from"../core/support/OwningCollection.js";import{UpdatingHandles as ne}from"../core/support/UpdatingHandles.js";import S from"../geometry/Extent.js";import C from"../geometry/HeightModelInfo.js";import w from"../geometry/SpatialReference.js";import{equals as T}from"../geometry/support/spatialReferenceUtils.js";import E from"../Map.js";import{AnalysesCollection as D}from"../support/AnalysesCollection.js";import{GraphicsCollection as O}from"../support/GraphicsCollection.js";import{system as k}from"../time/constants.js";import A from"../time/TimeExtent.js";import{isTimeZoneValid as j}from"../time/timeZoneUtils.js";import{GlyphMosaic as M}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as N}from"./3d/support/DefaultHighlights.js";import P from"./BasemapView.js";import F from"./input/Input.js";import{ViewEvents as I}from"./input/ViewEvents.js";import L from"./interactive/options/ViewOptions.js";import R from"./Magnifier.js";import z from"./navigation/Navigation.js";import B from"./SelectionManager.js";import{deduplicateAttributionItems as V}from"./support/attributionUtils.js";import{DefaultsFromMap as H}from"./support/DefaultsFromMap.js";import{defaultHighlightName as U}from"./support/HighlightDefaults.js";import W from"./support/HighlightOptions.js";import G from"./support/LayerViewManager.js";import K from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as q}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as J}from"./support/WebGLRequirements.js";import Y from"./Theme.js";import{ToolViewManager as X}from"./ToolViewManager.js";var Z;let Q=class extends ee(m){static{Z=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new c,this.updatingHandles=new ne,this.allLayerViews=new a({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new O,this.typeSpecificPreconditionsReady=!0,this.layerViews=new i,this.magnifier=new R,this.options=new L,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new i,this._highPriorityCursorHandles=new i,this.input=new F,this.navigation=new z,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new I(this),this.requiredFieldsOptions=new K,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new te,this.handles.add(g(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Z.views.add(this)):(this._lockedSpatialReference=null,Z.views.remove(this)),this.notifyChange(`spatialReference`),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(e){queueMicrotask(()=>{this.fatalError=new s(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new M(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},_)),this.analyses=new D}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,v(()=>this.ready)))),this.basemapView=new P({view:this}),this.layerViewManager=new G({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new X({view:this}),this.selectionManager=new B({view:this}),this.addHandles([y(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{d.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),g(()=>[this.defaultsFromMap,this.initialExtentRequired],([e,t])=>{e&&(e.required={...e.required,extent:t})},b),g(()=>[this.defaultsFromMap,this.ready],([e,t])=>{e&&(e.viewReady=t)},_),g(()=>[this.defaultsFromMap,this.defaultsFromMapInputSpatialReference()],([e,t])=>{e&&(e.inputSpatialReference=t)},b),g(()=>[this.defaultsFromMap,this.defaultsFromMapInputHeightModelInfo()],([e,t])=>{e&&(e.inputHeightModelInfo=t)},b)])}get _layerToLayerviewMapping(){return Z._layerToLayerview}static{this._layerToLayerview=[[`view.map.basemap.baseLayers`,`view.basemapView.baseLayerViews`],[`view.map.basemap.groundLayers`,`view.basemapView.groundLayerViews`],[`view.map.basemap.referenceLayers`,`view.basemapView.referenceLayerViews`],[`view.map.layers`,`view.layerViews`]]}destroy(){this.destroyed||(Z.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=f(this.graphics),this.analyses=f(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=f(this.analysisViewManager),this.toolViewManager=f(this.toolViewManager),this.layerViewManager=f(this.layerViewManager),this.selectionManager=f(this.selectionManager),this.basemapView=f(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=f(this.map),this.updatingHandles.destroy())}_startup(){this._set(`ready`,!0)}_teardown(){this._set(`ready`,!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error(`#toMap()`,`Not implemented on this instance of View`),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get(`analyses`)}set analyses(e){this._set(`analyses`,e)}get animation(){return this._get(`animation`)}set animation(e){this._set(`animation`,e)}get focusRegion(){return null}get attributionItems(){return this.suspended?[]:V(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new H({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get(`extent`)}set extent(e){this._set(`extent`,e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get(`highlights`)??N()}set highlights(e){this._set(`highlights`,o(e,this._get(`highlights`),i.ofType(W)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===U)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!u(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(d.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),u(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set(`map`,e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get(`readyState`);if(!this.map)return`missing-map`;if(`container`in this&&!this.container)return`missing-container`;if(this.fatalError)return`rendering-error`;if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){let e=!(`loaded`in this.map)||this.map.loaded,t=this.map.ground.loaded,n=this.map.basemap?.loaded??!0;return e&&n&&t&&!this.map?.allLayers.length?`empty-map`:(this._readyStateWaitingTask||(this._readyStateWaitingTask=r(e=>h(has(`view-readyState-waiting-delay`),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,`ready-state-task`)),this._readyStateWaitingTask?.finished?`map-content-error`:`loading`)}return this._readyStateWaitingTask=p(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!T(e,this._get(`spatialReference`));this._set(`_userSpatialReference`,e),t&&(this._set(`spatialReference`,e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??k}set timeZone(e){this._userTimeZone=e,j(e)||d.getLogger(this).warn(`#timeZone`,`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??`default`}acquireCursor(e,t=`low`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=l(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new Y}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&`heightModelInfo`in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new s(`view:importLayerView-missing`,`importLayerView() not implemented`)}hasLayerViewModule(e){return!1}async validate(){let e=J(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn(`#validate()`,e.message),e;let t=await q();if(t)throw d.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn(`#when()`,`Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead.`),super.when(e,t)}forceReadyCycle(){this.ready&&(y(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new i}_displayWebGLError(){let e=document.createElement(`div`);e.setAttribute(`style`,`display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let r=document.createElement(`a`);r.innerHTML=`https://esriurl.com/webgl-faq`,r.target=`_blank`,r.setAttribute(`style`,`font-size: 18px;`),r.href=`https://esriurl.com/webgl-faq`,e.appendChild(t),e.appendChild(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([t()],Q.prototype,`_userSpatialReference`,void 0),e([t()],Q.prototype,`activeTool`,null),e([t({readOnly:!0})],Q.prototype,`allLayerViews`,void 0),e([t({readOnly:!0})],Q.prototype,`layerviewCollections`,null),e([t(x(D,`analyses`))],Q.prototype,`analyses`,null),e([t()],Q.prototype,`animation`,null),e([t()],Q.prototype,`animationsEnabled`,void 0),e([t()],Q.prototype,`focusRegionVisible`,void 0),e([t()],Q.prototype,`focusRegionShortcutEnabled`,void 0),e([t()],Q.prototype,`focusRegion`,null),e([t({readOnly:!0})],Q.prototype,`attributionItems`,null),e([t()],Q.prototype,`attributionVisible`,void 0),e([t()],Q.prototype,`basemapView`,void 0),e([t()],Q.prototype,`center`,null),e([t()],Q.prototype,`defaultsFromMapSettings`,null),e([t()],Q.prototype,`defaultsFromMap`,null),e([t()],Q.prototype,`dependencies`,void 0),e([t()],Q.prototype,`displayFilterEnabled`,void 0),e([t({type:S})],Q.prototype,`extent`,null),e([t()],Q.prototype,`fatalError`,void 0),e([t(x(O,`graphics`))],Q.prototype,`graphics`,void 0),e([t({readOnly:!0,type:C})],Q.prototype,`heightModelInfo`,null),e([t({type:i.ofType(W)})],Q.prototype,`highlights`,null),e([t({readOnly:!0})],Q.prototype,`interacting`,null),e([t({constructOnly:!0})],Q.prototype,`layerViewFilter`,void 0),e([t({readOnly:!0})],Q.prototype,`navigating`,null),e([t({readOnly:!0})],Q.prototype,`preconditionsReady`,null),e([t({readOnly:!0})],Q.prototype,`typeSpecificPreconditionsReady`,void 0),e([t({type:i,readOnly:!0})],Q.prototype,`layerViews`,void 0),e([t()],Q.prototype,`resolution`,null),e([t({type:R})],Q.prototype,`magnifier`,void 0),e([t({nonNullable:!0,type:L})],Q.prototype,`options`,void 0),e([t({value:null,type:E})],Q.prototype,`map`,null),e([t()],Q.prototype,`padding`,void 0),e([t({readOnly:!0})],Q.prototype,`ready`,void 0),e([t({readOnly:!0})],Q.prototype,`canZoomIn`,null),e([t({readOnly:!0})],Q.prototype,`canZoomOut`,null),e([t()],Q.prototype,`_readyStateWaitingTask`,void 0),e([t({readOnly:!0})],Q.prototype,`readyState`,null),e([t({type:w})],Q.prototype,`spatialReference`,null),e([t()],Q.prototype,`stationary`,null),e([t({type:A})],Q.prototype,`timeExtent`,null),e([t({type:String,nonNullable:!0})],Q.prototype,`timeZone`,null),e([t()],Q.prototype,`tools`,null),e([t()],Q.prototype,`toolViewManager`,void 0),e([t({readOnly:!0})],Q.prototype,`type`,void 0),e([t({type:Number})],Q.prototype,`scale`,void 0),e([t({readOnly:!0})],Q.prototype,`updating`,void 0),e([t({readOnly:!0})],Q.prototype,`initialExtentRequired`,void 0),e([t({readOnly:!0})],Q.prototype,`initialExtent`,null),e([t()],Q.prototype,`cursor`,null),e([t({readOnly:!0})],Q.prototype,`input`,void 0),e([t({type:z,nonNullable:!0})],Q.prototype,`navigation`,void 0),e([t()],Q.prototype,`layerViewManager`,void 0),e([t()],Q.prototype,`analysisViewManager`,void 0),e([t()],Q.prototype,`selectionManager`,void 0),e([t()],Q.prototype,`width`,void 0),e([t()],Q.prototype,`height`,void 0),e([t({readOnly:!0})],Q.prototype,`resizing`,void 0),e([t({value:null,readOnly:!0})],Q.prototype,`size`,null),e([t({readOnly:!0})],Q.prototype,`suspended`,void 0),e([t({readOnly:!0})],Q.prototype,`viewEvents`,void 0),e([t()],Q.prototype,`_isValid`,void 0),e([t()],Q.prototype,`_readyCycleForced`,void 0),e([t()],Q.prototype,`_lockedSpatialReference`,void 0),e([t()],Q.prototype,`_userTimeZone`,void 0),e([t()],Q.prototype,`_lockedTimeZone`,void 0),e([t()],Q.prototype,`_userTimeExtent`,void 0),e([t()],Q.prototype,`_lockedTimeExtent`,void 0),e([t({type:Y})],Q.prototype,`theme`,void 0),e([t({readOnly:!0,type:Y})],Q.prototype,`effectiveTheme`,null),e([t({readOnly:!0})],Q.prototype,`registeredComponents`,void 0),Q=Z=e([n(`esri.views.View`)],Q);const $=globalThis.$arcgis;$&&!$.views&&Object.defineProperty($,"views",{configurable:!1,enumerable:!0,writable:!1,value:Q.views});function re(e){return e.layerViews}export{Q as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{createTask as r,asyncHandle as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import o from"../core/CollectionFlattener.js";import{referenceSetter as s}from"../core/collectionUtils.js";import c from"../core/Error.js";import{EventedMixin as l}from"../core/Evented.js";import ee from"../core/Handles.js";import{makeHandle as u,handlesGroup as te}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as d}from"../core/Loadable.js";import f from"../core/Logger.js";import{indexCollection as ne}from"../core/mapCollectionUtils.js";import{destroyMaybe as p,abortMaybe as re}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as h,whenOrAbort as g}from"../core/promiseUtils.js";import _ from"../core/ReactiveSet.js";import{watch as v,sync as y,whenOnce as b,when as x,syncAndInitial as S}from"../core/reactiveUtils.js";import{owningCollectionProperty as C}from"../core/support/OwningCollection.js";import{UpdatingHandles as ie}from"../core/support/UpdatingHandles.js";import ae from"../geometry/Extent.js";import oe from"../geometry/HeightModelInfo.js";import w from"../geometry/SpatialReference.js";import{equals as T}from"../geometry/support/spatialReferenceUtils.js";import{getLayerViewLayer as E}from"../graphic/getLayerViewLayer.js";import D from"../Map.js";import{AnalysesCollection as O}from"../support/AnalysesCollection.js";import{GraphicsCollection as k}from"../support/GraphicsCollection.js";import{system as A}from"../time/constants.js";import j from"../time/TimeExtent.js";import{isTimeZoneValid as M}from"../time/timeZoneUtils.js";import{GlyphMosaic as N}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as P}from"./3d/support/DefaultHighlights.js";import F from"./BasemapView.js";import I from"./input/Input.js";import{ViewEvents as L}from"./input/ViewEvents.js";import R from"./interactive/options/ViewOptions.js";import z from"./Magnifier.js";import B from"./navigation/Navigation.js";import V from"./SelectionManager.js";import{deduplicateAttributionItems as H}from"./support/attributionUtils.js";import{DefaultsFromMap as U}from"./support/DefaultsFromMap.js";import{defaultHighlightName as W}from"./support/HighlightDefaults.js";import G from"./support/HighlightOptions.js";import K from"./support/LayerViewManager.js";import{highlightsSupported as q}from"./support/layerViewUtils.js";import se from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as ce}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as le}from"./support/WebGLRequirements.js";import J from"./Theme.js";import{ToolViewManager as ue}from"./ToolViewManager.js";var Y;let X=class extends l(m){static{Y=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new ee,this.updatingHandles=new ie,this.allLayerViews=new o({getCollections:()=>this.layerviewCollections,getChildrenFunction:Q}),this.animationsEnabled=!0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new k,this.typeSpecificPreconditionsReady=!0,this.layerViews=new a,this.magnifier=new z,this.options=new R,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new a,this._highPriorityCursorHandles=new a,this.input=new I,this.navigation=new B,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new L(this),this.requiredFieldsOptions=new se,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new _,this.handles.add(v(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Y.views.add(this)):(this._lockedSpatialReference=null,Y.views.remove(this)),this.notifyChange(`spatialReference`),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(e){queueMicrotask(()=>{this.fatalError=new c(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new N(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},y)),this.analyses=new O}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,b(()=>this.ready)))),this.basemapView=new F({view:this}),this.layerViewManager=new K({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new ue({view:this}),this.selectionManager=new V({view:this}),this.addHandles([x(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{f.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),v(()=>[this.defaultsFromMap,this.initialExtentRequired],([e,t])=>{e&&(e.required={...e.required,extent:t})},S),v(()=>[this.defaultsFromMap,this.ready],([e,t])=>{e&&(e.viewReady=t)},y),v(()=>[this.defaultsFromMap,this.defaultsFromMapInputSpatialReference()],([e,t])=>{e&&(e.inputSpatialReference=t)},S),v(()=>[this.defaultsFromMap,this.defaultsFromMapInputHeightModelInfo()],([e,t])=>{e&&(e.inputHeightModelInfo=t)},S)])}get _layerToLayerviewMapping(){return Y._layerToLayerview}static{this._layerToLayerview=[[`view.map.basemap.baseLayers`,`view.basemapView.baseLayerViews`],[`view.map.basemap.groundLayers`,`view.basemapView.groundLayerViews`],[`view.map.basemap.referenceLayers`,`view.basemapView.referenceLayerViews`],[`view.map.layers`,`view.layerViews`]]}destroy(){this.destroyed||(Y.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=p(this.graphics),this.analyses=p(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=p(this.analysisViewManager),this.toolViewManager=p(this.toolViewManager),this.layerViewManager=p(this.layerViewManager),this.selectionManager=p(this.selectionManager),this.basemapView=p(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=p(this.map),this.updatingHandles.destroy())}_startup(){this._set(`ready`,!0)}_teardown(){this._set(`ready`,!1)}whenReady(){return Promise.resolve(this)}toMap(){return f.getLogger(this).error(`#toMap()`,`Not implemented on this instance of View`),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get(`analyses`)}set analyses(e){this._set(`analyses`,e)}get animation(){return this._get(`animation`)}set animation(e){this._set(`animation`,e)}get focusRegion(){return null}get attributionItems(){return this.suspended?[]:H(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new U({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get(`extent`)}set extent(e){this._set(`extent`,e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get(`highlights`)??P()}set highlights(e){this._set(`highlights`,s(e,this._get(`highlights`),a.ofType(G)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===W)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!d(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(f.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),d(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set(`map`,e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get(`readyState`);if(!this.map)return`missing-map`;if(`container`in this&&!this.container)return`missing-container`;if(this.fatalError)return`rendering-error`;if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){let e=!(`loaded`in this.map)||this.map.loaded,t=this.map.ground.loaded,n=this.map.basemap?.loaded??!0;return e&&n&&t&&!this.map?.allLayers.length?`empty-map`:(this._readyStateWaitingTask||(this._readyStateWaitingTask=r(e=>h(has(`view-readyState-waiting-delay`),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,`ready-state-task`)),this._readyStateWaitingTask?.finished?`map-content-error`:`loading`)}return this._readyStateWaitingTask=re(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!T(e,this._get(`spatialReference`));this._set(`_userSpatialReference`,e),t&&(this._set(`spatialReference`,e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??A}set timeZone(e){this._userTimeZone=e,M(e)||f.getLogger(this).warn(`#timeZone`,`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??`default`}acquireCursor(e,t=`low`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=u(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new J}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}highlight(e,t){if(this.destroyed)return u();let n=this._getHighlightLayerViews(),{map:r,layerViewManager:i}=this,a=r?.allLayers,o=globalThis.Map.groupBy(Array.isArray(e)?e:[e],({layer:e,origin:t})=>e?.type===`graphics`?n.has(e)||a?.includes(e)?e:void 0:t?E(t):void 0),s=[];for(let[e,r]of o){if(e==null)continue;let o=n.get(e);if(o&&!o.destroyed&&o.layer===e&&q(o)){s.push(o.highlight(r,t));continue}let c=a?.find(t=>t===e);i&&c&&$(c)&&s.push(this._deferHighlight(c,r,t))}return s.length>0?te(s):u()}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&`heightModelInfo`in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new c(`view:importLayerView-missing`,`importLayerView() not implemented`)}hasLayerViewModule(e){return!1}async validate(){let e=le(this.type);if(e)throw this._displayWebGLError(),f.getLogger(this).warn(`#validate()`,e.message),e;let t=await ce();if(t)throw f.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}when(e,t){return this.isResolved()&&!this.ready&&f.getLogger(this).warn(`#when()`,`Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead.`),super.when(e,t)}forceReadyCycle(){this.ready&&(x(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new a}_getHighlightLayerViews(){if(!this._highlightLayerViews){let e=ne(this.allLayerViews,e=>q(e)&&$(e.layer)?e.layer:void 0);this.addHandles(e),this._highlightLayerViews=e.index}return this._highlightLayerViews}_deferHighlight(e,t,n){return i(async r=>{let i=await g(this.whenLayerView(e),r).catch(e=>{if(!(e==null||typeof e==`object`&&`name`in e&&(e.name===`view:no-layerview-for-layer`||e.name===`cancelled:layerview-create`||e.name===`layerview:create-error`)))throw e});if(!(this.destroyed||r.aborted||!i||i.destroyed||!q(i)))return i.highlight(t,n)},{onError:e=>f.getLogger(this).error(`#highlight()`,e)})}_displayWebGLError(){let e=document.createElement(`div`);e.setAttribute(`style`,`display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let r=document.createElement(`a`);r.innerHTML=`https://esriurl.com/webgl-faq`,r.target=`_blank`,r.setAttribute(`style`,`font-size: 18px;`),r.href=`https://esriurl.com/webgl-faq`,e.appendChild(t),e.appendChild(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([t()],X.prototype,`_userSpatialReference`,void 0),e([t()],X.prototype,`activeTool`,null),e([t({readOnly:!0})],X.prototype,`allLayerViews`,void 0),e([t({readOnly:!0})],X.prototype,`layerviewCollections`,null),e([t(C(O,`analyses`))],X.prototype,`analyses`,null),e([t()],X.prototype,`animation`,null),e([t()],X.prototype,`animationsEnabled`,void 0),e([t()],X.prototype,`focusRegionVisible`,void 0),e([t()],X.prototype,`focusRegionShortcutEnabled`,void 0),e([t()],X.prototype,`focusRegion`,null),e([t({readOnly:!0})],X.prototype,`attributionItems`,null),e([t()],X.prototype,`attributionVisible`,void 0),e([t()],X.prototype,`basemapView`,void 0),e([t()],X.prototype,`center`,null),e([t()],X.prototype,`defaultsFromMapSettings`,null),e([t()],X.prototype,`defaultsFromMap`,null),e([t()],X.prototype,`dependencies`,void 0),e([t()],X.prototype,`displayFilterEnabled`,void 0),e([t({type:ae})],X.prototype,`extent`,null),e([t()],X.prototype,`fatalError`,void 0),e([t(C(k,`graphics`))],X.prototype,`graphics`,void 0),e([t({readOnly:!0,type:oe})],X.prototype,`heightModelInfo`,null),e([t({type:a.ofType(G)})],X.prototype,`highlights`,null),e([t({readOnly:!0})],X.prototype,`interacting`,null),e([t({constructOnly:!0})],X.prototype,`layerViewFilter`,void 0),e([t({readOnly:!0})],X.prototype,`navigating`,null),e([t({readOnly:!0})],X.prototype,`preconditionsReady`,null),e([t({readOnly:!0})],X.prototype,`typeSpecificPreconditionsReady`,void 0),e([t({type:a,readOnly:!0})],X.prototype,`layerViews`,void 0),e([t()],X.prototype,`resolution`,null),e([t({type:z})],X.prototype,`magnifier`,void 0),e([t({nonNullable:!0,type:R})],X.prototype,`options`,void 0),e([t({value:null,type:D})],X.prototype,`map`,null),e([t()],X.prototype,`padding`,void 0),e([t({readOnly:!0})],X.prototype,`ready`,void 0),e([t({readOnly:!0})],X.prototype,`canZoomIn`,null),e([t({readOnly:!0})],X.prototype,`canZoomOut`,null),e([t()],X.prototype,`_readyStateWaitingTask`,void 0),e([t({readOnly:!0})],X.prototype,`readyState`,null),e([t({type:w})],X.prototype,`spatialReference`,null),e([t()],X.prototype,`stationary`,null),e([t({type:j})],X.prototype,`timeExtent`,null),e([t({type:String,nonNullable:!0})],X.prototype,`timeZone`,null),e([t()],X.prototype,`tools`,null),e([t()],X.prototype,`toolViewManager`,void 0),e([t({readOnly:!0})],X.prototype,`type`,void 0),e([t({type:Number})],X.prototype,`scale`,void 0),e([t({readOnly:!0})],X.prototype,`updating`,void 0),e([t({readOnly:!0})],X.prototype,`initialExtentRequired`,void 0),e([t({readOnly:!0})],X.prototype,`initialExtent`,null),e([t()],X.prototype,`cursor`,null),e([t({readOnly:!0})],X.prototype,`input`,void 0),e([t({type:B,nonNullable:!0})],X.prototype,`navigation`,void 0),e([t()],X.prototype,`layerViewManager`,void 0),e([t()],X.prototype,`analysisViewManager`,void 0),e([t()],X.prototype,`selectionManager`,void 0),e([t()],X.prototype,`width`,void 0),e([t()],X.prototype,`height`,void 0),e([t({readOnly:!0})],X.prototype,`resizing`,void 0),e([t({value:null,readOnly:!0})],X.prototype,`size`,null),e([t({readOnly:!0})],X.prototype,`suspended`,void 0),e([t({readOnly:!0})],X.prototype,`viewEvents`,void 0),e([t()],X.prototype,`_isValid`,void 0),e([t()],X.prototype,`_readyCycleForced`,void 0),e([t()],X.prototype,`_lockedSpatialReference`,void 0),e([t()],X.prototype,`_userTimeZone`,void 0),e([t()],X.prototype,`_lockedTimeZone`,void 0),e([t()],X.prototype,`_userTimeExtent`,void 0),e([t()],X.prototype,`_lockedTimeExtent`,void 0),e([t({type:J})],X.prototype,`theme`,void 0),e([t({readOnly:!0,type:J})],X.prototype,`effectiveTheme`,null),e([t({readOnly:!0})],X.prototype,`registeredComponents`,void 0),X=Y=e([n(`esri.views.View`)],X);const Z=globalThis.$arcgis;Z&&!Z.views&&Object.defineProperty(Z,"views",{configurable:!1,enumerable:!0,writable:!1,value:X.views});function Q(e){return e.layerViews}function $({type:e}){return e!==`media`&&e!==`imagery-tile`&&e!==`geospatial-pdf`}export{X as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{watch as r,sync as i}from"../core/reactiveUtils.js";import a from"../Viewpoint.js";import o from"./2d/FrameTask.js";import s from"./2d/MapViewConstraints.js";import{StationaryManager as c}from"./2d/support/StationaryManager.js";import{ViewStateManager as l}from"./2d/ViewStateManager.js";import{ViewEvents as u}from"./input/ViewEvents.js";const d=d=>{let f=d,p=class extends f{constructor(...e){super(...e),this.fullOpacity=1,this.stateManager=new l({constraints:new s({view:this})}),this.stationaryManager=new c,this.mapViewNavigation=null,this.renderingOptions={samplingMode:`dynamic`,edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new o(this),this.viewEvents=new u(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([r(()=>this.viewpoint,()=>this.stationaryManager.flip(),i)])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(e){this.stateManager.extent=e}get state(){return this.stateManager.state}get interacting(){return!1}get stationary(){return!this.animation&&this.stationaryManager.stationary}set animation(e){let t=this._get(`animation`);if(e===t)return;if(t&&t.stop(),this.animationManager&&e!==this.animationManager.animation&&this.animationManager.stop(),!e||e.isFulfilled()){this._set(`animation`,null);return}this._set(`animation`,e);let n=()=>{this.destroyed||e===this._get(`animation`)&&(this._set(`animation`,null),this.frameTask?.requestFrame())};e.when(n,n)}get canZoomIn(){if(!this.ready)return!1;let e=this.constraints?.effectiveMaxScale,t=this.animation?.target,n=(t&&`then`in t?void 0:t?.scale)??this.scale??0;return e===0||n>e}get canZoomOut(){if(!this.ready)return!1;let e=this.constraints?.effectiveMinScale,t=this.animation?.target,n=(t&&`then`in t?void 0:t?.scale)??this.scale??0;return e===0||n<e}get constraints(){return this.stateManager?.constraints}set constraints(e){e.view=this;let t=this.stateManager.constraints;this.stateManager.constraints=e,t?.destroy()}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(e){this.stateManager.resizeAlign=e}get rotation(){return this.stateManager.rotation??0}set rotation(e){let{rotationEnabled:t}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=e,this.constraints.rotationEnabled=t}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(e){this.stateManager.viewpoint=e,this.frameTask.requestFrame()}async zoomIn(){if(this.canZoomIn)return this.mapViewNavigation.zoomIn()}async zoomOut(){if(this.canZoomOut)return this.mapViewNavigation.zoomOut()}_getOrCreateRenderCanvas(){let e=this.renderCanvas||document.createElement(`canvas`);return this.surface.contains(e)||this.surface.appendChild(e),e}};return e([t({readOnly:!0})],p.prototype,`animationManager`,void 0),e([t({readOnly:!0})],p.prototype,`fullOpacity`,void 0),e([t()],p.prototype,`stateManager`,void 0),e([t()],p.prototype,`constraintsInfo`,null),e([t()],p.prototype,`extent`,null),e([t({readOnly:!0})],p.prototype,`state`,null),e([t({readOnly:!0})],p.prototype,`mapViewNavigation`,void 0),e([t()],p.prototype,`renderingOptions`,void 0),e([t({constructOnly:!0})],p.prototype,`renderCanvas`,void 0),e([t({readOnly:!0})],p.prototype,`interacting`,null),e([t()],p.prototype,`stationary`,null),e([t()],p.prototype,`animation`,null),e([t({readOnly:!0})],p.prototype,`canZoomIn`,null),e([t({readOnly:!0})],p.prototype,`canZoomOut`,null),e([t({type:s})],p.prototype,`constraints`,null),e([t()],p.prototype,`padding`,null),e([t()],p.prototype,`resizeAlign`,null),e([t()],p.prototype,`rotation`,null),e([t({readOnly:!0})],p.prototype,`viewEvents`,void 0),e([t({type:a})],p.prototype,`viewpoint`,null),p=e([n(`esri.views.Viewport2DBaseMixin`)],p)
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{watch as r,sync as i}from"../core/reactiveUtils.js";import a from"../Viewpoint.js";import o from"./2d/FrameTask.js";import s from"./2d/MapViewConstraints.js";import{StationaryManager as c}from"./2d/support/StationaryManager.js";import{ViewStateManager as l}from"./2d/ViewStateManager.js";import{ViewEvents as u}from"./input/ViewEvents.js";const d=d=>{let f=d,p=class extends f{constructor(...e){super(...e),this.fullOpacity=1,this.stateManager=new l({constraints:new s({view:this})}),this.stationaryManager=new c,this.mapViewNavigation=null,this.renderingOptions={samplingMode:`dynamic`,edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new o(this),this.viewEvents=new u(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([r(()=>this.viewpoint,()=>this.stationaryManager.flip(),i)])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(e){this.stateManager.extent=e}get state(){return this.stateManager.state}get interacting(){return!1}get stationary(){return!this.animation&&this.stationaryManager.stationary}set animation(e){let t=this._get(`animation`);if(e===t)return;if(t&&t.stop(),this.animationManager&&e!==this.animationManager.animation&&this.animationManager.stop(),!e||e.isFulfilled()){this._set(`animation`,null);return}this._set(`animation`,e);let n=()=>{this.destroyed||e===this._get(`animation`)&&(this._set(`animation`,null),this.frameTask?.requestFrame())};e.when(n,n)}get canZoomIn(){if(!this.ready)return!1;let e=this.constraints?.effectiveMaxScale,t=this.animation?.target,n=(t&&`then`in t?void 0:t?.scale)??this.scale??0;return e===0||n>e}get canZoomOut(){if(!this.ready)return!1;let e=this.constraints?.effectiveMinScale,t=this.animation?.target,n=(t&&`then`in t?void 0:t?.scale)??this.scale??0;return e===0||n<e}get constraints(){return this.stateManager?.constraints}set constraints(e){e.view=this;let t=this.stateManager.constraints;this.stateManager.constraints=e,t?.destroy()}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(e){this.stateManager.resizeAlign=e}get rotation(){return this.stateManager.rotation??0}set rotation(e){let{rotationEnabled:t}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=e,this.constraints.rotationEnabled=t}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(e){this.stateManager.viewpoint=e,this.frameTask.requestFrame()}async zoomIn(){if(this.canZoomIn)return this.mapViewNavigation.zoomIn()}async zoomOut(){if(this.canZoomOut)return this.mapViewNavigation.zoomOut()}_getOrCreateRenderCanvas(){let e=this.renderCanvas||document.createElement(`canvas`);return this.surface.contains(e)||this.surface.appendChild(e),e}};return e([t({readOnly:!0})],p.prototype,`animationManager`,void 0),e([t({readOnly:!0})],p.prototype,`fullOpacity`,void 0),e([t()],p.prototype,`stateManager`,void 0),e([t()],p.prototype,`constraintsInfo`,null),e([t()],p.prototype,`extent`,null),e([t({readOnly:!0})],p.prototype,`state`,null),e([t({readOnly:!0})],p.prototype,`mapViewNavigation`,void 0),e([t()],p.prototype,`renderingOptions`,void 0),e([t({constructOnly:!0})],p.prototype,`renderCanvas`,void 0),e([t({readOnly:!0})],p.prototype,`interacting`,null),e([t()],p.prototype,`stationary`,null),e([t()],p.prototype,`animation`,null),e([t({readOnly:!0})],p.prototype,`canZoomIn`,null),e([t({readOnly:!0})],p.prototype,`canZoomOut`,null),e([t({type:s})],p.prototype,`constraints`,null),e([t()],p.prototype,`padding`,null),e([t()],p.prototype,`resizeAlign`,null),e([t()],p.prototype,`rotation`,null),e([t({readOnly:!0})],p.prototype,`viewEvents`,void 0),e([t({type:a})],p.prototype,`viewpoint`,null),p=e([n(`esri.views.Viewport2DBaseMixin`)],p)};export{d as Viewport2DBaseMixin};
|
package/views/Viewport2DMixin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{GoToManager as r}from"./2d/GoToManager.js";import i from"./2d/input/MapViewInputManager.js";import{isSupportedScreenPointEvent as a,createScreenPointFromSupportedEvent as o}from"./support/screenUtils.js";const s=s=>{let c=s,l=class extends c{constructor(...e){super(...e),this.goToManager=new r({view:this}),this.inputManager=new i({view:this}),this.addHandles([this.on(`resize`,e=>this.stateManager.resize(e.width,e.height))])}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager?.stationary}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}goTo(e,t){return this.goToManager.goTo(e,t)}toMap(e){if(!this.ready)return null;let t=a(e)?o(this,e):e;return this.stateManager.toMap(t)}};return e([t()],l.prototype,`goToManager`,void 0),e([t({readOnly:!0})],l.prototype,`interacting`,null),e([t()],l.prototype,`stationary`,null),e([t({readOnly:!0})],l.prototype,`inputManager`,void 0),l=e([n(`esri.views.Viewport2DMixin`)],l)
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../core/accessorSupport/decorators.js";import{GoToManager as r}from"./2d/GoToManager.js";import i from"./2d/input/MapViewInputManager.js";import{isSupportedScreenPointEvent as a,createScreenPointFromSupportedEvent as o}from"./support/screenUtils.js";const s=s=>{let c=s,l=class extends c{constructor(...e){super(...e),this.goToManager=new r({view:this}),this.inputManager=new i({view:this}),this.addHandles([this.on(`resize`,e=>this.stateManager.resize(e.width,e.height))])}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager?.stationary}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}goTo(e,t){return this.goToManager.goTo(e,t)}toMap(e){if(!this.ready)return null;let t=a(e)?o(this,e):e;return this.stateManager.toMap(t)}};return e([t()],l.prototype,`goToManager`,void 0),e([t({readOnly:!0})],l.prototype,`interacting`,null),e([t()],l.prototype,`stationary`,null),e([t({readOnly:!0})],l.prototype,`inputManager`,void 0),l=e([n(`esri.views.Viewport2DMixin`)],l)};export{s as Viewport2DMixin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Milliseconds as e,millisecondsFromSeconds as t,Seconds as n}from"../../../core/time.js";import{inOutCoastQuad as r,outExpo as i}from"../easing.js";import{Path as a}from"./apex/Path.js";import{Definition as o}from"./Definition.js";import{InterpolateComponents as s}from"./InterpolateComponents.js";import{defaultSettings as c}from"./Settings.js";const l=new s;let u=class{get time(){return this._time}get isLinear(){return this.path.segments.length===1}constructor(t){this._time=e(0),this._easing=r,this.definition=new o(t),this.path=new a}update(e,a,o){this.definition.update(e,a,o),this.path.update(this.definition,o),this._time=this._applyTimeSettings(t(isFinite(this.path.time)?this.path.time:n(0)),o),this._easing=o.easing??(this._time>=1e3?r:i)}cameraAt(e,t){e=Math.min(Math.max(0,e),1),e=this._normalizedEasing(e);let n=this.path.interpolateComponentsAt(e,l);t.interpolate(this.definition.source,this.definition.target,n)}_normalizedEasing(e){let t=this._easing(0,this._time),n=this._easing(1,this._time);return(this._easing(e,this._time)-t)/(n-t)}_applyTimeSettings(t,n){let r=n.speedFactor==null?1:n.speedFactor,i=n.minDuration??c.minDuration/r,a=n.maxDuration??c.maxDuration/r;return t=n.duration==null?e(Math.min(Math.max(t/r,i),a)):e(n.duration)
|
|
2
|
+
import{Milliseconds as e,millisecondsFromSeconds as t,Seconds as n}from"../../../core/time.js";import{inOutCoastQuad as r,outExpo as i}from"../easing.js";import{Path as a}from"./apex/Path.js";import{Definition as o}from"./Definition.js";import{InterpolateComponents as s}from"./InterpolateComponents.js";import{defaultSettings as c}from"./Settings.js";const l=new s;let u=class{get time(){return this._time}get isLinear(){return this.path.segments.length===1}constructor(t){this._time=e(0),this._easing=r,this.definition=new o(t),this.path=new a}update(e,a,o){this.definition.update(e,a,o),this.path.update(this.definition,o),this._time=this._applyTimeSettings(t(isFinite(this.path.time)?this.path.time:n(0)),o),this._easing=o.easing??(this._time>=1e3?r:i)}cameraAt(e,t){e=Math.min(Math.max(0,e),1),e=this._normalizedEasing(e);let n=this.path.interpolateComponentsAt(e,l);t.interpolate(this.definition.source,this.definition.target,n)}_normalizedEasing(e){let t=this._easing(0,this._time),n=this._easing(1,this._time);return(this._easing(e,this._time)-t)/(n-t)}_applyTimeSettings(t,n){let r=n.speedFactor==null?1:n.speedFactor,i=n.minDuration??c.minDuration/r,a=n.maxDuration??c.maxDuration/r;return t=n.duration==null?e(Math.min(Math.max(t/r,i),a)):e(n.duration)}};export{u as Animation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../core/Evented.js";import{on as n}from"../../core/events.js";import{makeHandle as r}from"../../core/handleUtils.js";import{destroyMaybe as i}from"../../core/maybe.js";import{watch as a,syncAndInitial as o,initial as s,sync as c,when as l}from"../../core/reactiveUtils.js";import{cloneScreenPoint as u,createScreenPoint as d}from"../../core/screenUtils.js";import{property as f,subclass as p}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import{setCalciteModeClass as h}from"../../support/modeUtils.js";import g from"./options/TooltipOptions.js";import{base as _}from"./tooltip/css.js";import{tooltipContentFactory as v}from"./tooltip/content/tooltipContentFactory.js";import{isRTL as y}from"../../widgets/support/widgetUtils.js";const b={base:`${_}`,ltr:`${_}--ltr`,rtl:`${_}--rtl`,debug:`${_}--debug`},x=`bottom-end`,S={topStart:`top-start`,topEnd:`top-end`,bottomStart:`bottom-start`,bottomEnd:`bottom-end`};let C=class extends t{constructor(e){super(e),this.info=null,this.position=null,this.inputModePosition=null,this.content=null,this._focused=!1,this.hidden=!1,this.outerContainer=document.createElement(`div`),this.debug=!1,this._updatingHandles=new m,this._lastPosition=null,this._rtl=!1,this._prevXY=[0,0]}initialize(){let{outerContainer:e}=this,{ownerDocument:t}=e,u=null,d=new MutationObserver(()=>{u&&!e.contains(u)&&(u=null,this._focused=!1,this.mode===`input`&&t.activeElement===t.body&&this.exitInputMode())});this.addHandles([r(()=>d.disconnect()),a(()=>this.view.overlay?.surface,t=>{e.remove(),t?.appendChild(e),this._rtl=y(t)},o),a(()=>this.info,(t,n)=>{if(this.content!=null&&t!=null&&n!=null&&t.type===n.type)this.content.info=t;else{i(this.content);let n=v(this,t);n?(this.content=n,n.container&&e.appendChild(n.container),this.exitInputMode({focusOnView:!1})):(this.content=null,this._releaseInputModePosition())}},o),a(()=>({container:this.outerContainer,style:this._outerContainerStyle}),({container:e,style:t})=>{Object.assign(e.style,t)},s),a(()=>({outerContainer:this.outerContainer,placement:this.effectivePlacement,effectiveOffset:this._effectiveOffset,rtl:this._rtl,debug:this.debug}),({outerContainer:e,placement:t,effectiveOffset:n,rtl:r,debug:i})=>{let{classList:a}=e;a.add(b.base),a.toggle(b.rtl,r),a.toggle(b.ltr,!r),a.toggle(b.debug,i),this.outerContainer.style.setProperty(`--offset`,`${n}px`),h(e),D(e,t)},s),a(()=>this.mode,t=>{t===`input`?d.observe(e,{childList:!0,subtree:!0}):(d.disconnect(),u=null,this._releaseInputModePosition())},c),l(()=>this.mode===`input`&&this.info?.inputModeAvailable===!1,()=>void this.exitInputMode({focusOnView:e.matches(`:focus-within`)||u!=null&&t.activeElement===t.body}),c),n(this.outerContainer,`paste`,e=>{this.emit(`paste`,e)}),n(this.outerContainer,[`focusin`,`focusout`],n=>{let r=e.getRootNode(),{activeElement:i}=r instanceof ShadowRoot?r:t;if(this._focused=this.content?.container?.contains(i)??!1,this.mode===`input`){if(n.type===`focusin`)u=i;else if(n.relatedTarget)u=null;else{let t=u;queueMicrotask(()=>{u===t&&e.contains(t)&&(u=null)})}}})])}destroy(){this.info=null,this.content=i(this.content),this.outerContainer.remove(),this._updatingHandles.destroy()}get options(){return this._get(`options`)}set options(e){this._set(`options`,e)}get isInInputMode(){return!!this.inputModePosition}get mode(){return this.content?.mode??`feedback`}get focused(){return this._focused}get visible(){return this._outerContainerStyle.display!==`none`}get contentContainer(){return this.content?.container}get effectivePlacement(){let e=this.options?.placement;return e===`auto`?O(this.view.inputManager?.latestPenInfo)??x:e??x}get updating(){return this._updatingHandles.updating}get _screenPoint(){let{inputManager:e}=this.view;return e?.multiTouchActive?null:e?.latestPointerInfo?.location}get _effectiveOffset(){return this.options?.offset??20}get _outerContainerStyle(){let e=this.inputModePosition??this.position??this._screenPoint;return this._lastPosition=u(e),e!=null&&this.content!=null&&(!this.hidden||this.inputModePosition)?{display:`block`,transform:`translate(${Math.round(e.x)}px, ${Math.round(e.y)}px)`}:{display:`none`,transform:`none`}}clear(){this.info=null}async enterInputMode(e,t){let{content:n}=this;if(!n||t?.aborted)return!1;let r=this.position??this._lastPosition??this._screenPoint,i=this.inputModePosition=u(r),{effectivePlacement:a}=this;return this._override(`effectivePlacement`,a),this._updatingHandles.addPromise(n.enterInputMode(e,()=>{i&&(this.inputModePosition=w(this.contentContainer,i,this._effectiveOffset,this.view),Object.assign(this.outerContainer.style,this._outerContainerStyle))},t))}async exitInputMode(e){this.mode===`feedback`&&this._releaseInputModePosition(),await this._updatingHandles.addPromise(this.content?.exitInputMode(e))}_releaseInputModePosition(){this.inputModePosition=null,this._clearOverride(`effectivePlacement`)}onDragStart(e,t){this._prevXY=[e,t]}onDrag(e,t){let n=e-this._prevXY[0],r=t-this._prevXY[1];this._prevXY=[e,t];let{inputModePosition:i}=this;if(i){let{view:a}=this,o=e-a.position[0],s=t-a.position[1];if(o<0||o>a.width||s<0||s>a.height-16)return;this.inputModePosition=d(i.x+n,i.y+r)}}onDragEnd(){this._prevXY=[0,0]}};e([f({nonNullable:!0})],C.prototype,`view`,void 0),e([f()],C.prototype,`info`,void 0),e([f({type:g})],C.prototype,`options`,null),e([f()],C.prototype,`position`,void 0),e([f()],C.prototype,`inputModePosition`,void 0),e([f()],C.prototype,`isInInputMode`,null),e([f()],C.prototype,`content`,void 0),e([f({readOnly:!0})],C.prototype,`mode`,null),e([f()],C.prototype,`_focused`,void 0),e([f({readOnly:!0})],C.prototype,`focused`,null),e([f()],C.prototype,`hidden`,void 0),e([f({readOnly:!0})],C.prototype,`outerContainer`,void 0),e([f({readOnly:!0})],C.prototype,`contentContainer`,null),e([f({readOnly:!0})],C.prototype,`effectivePlacement`,null),e([f()],C.prototype,`debug`,void 0),e([f()],C.prototype,`updating`,null),e([f()],C.prototype,`_lastPosition`,void 0),e([f()],C.prototype,`_screenPoint`,null),e([f()],C.prototype,`_rtl`,void 0),e([f()],C.prototype,`_effectiveOffset`,null),e([f()],C.prototype,`_outerContainerStyle`,null),C=e([p(`esri.views.interactive.Tooltip`)],C);function w(e,t,n,r){if(!e||!r.container)return t;let i=e.getBoundingClientRect(),{left:a,top:o}=r.container.getBoundingClientRect(),{x:s,y:c}=t,l=i.left-a-n;l<0&&(s-=l);let u=i.right-a+n-r.width;u>0&&(s-=u);let f=i.top-o-n;f<0&&(c-=f);let p=i.bottom-o+n-r.height;return p>0&&(c-=p),d(s,c)}const T=[`top`,`bottom`,`leading`,`trailing`].flatMap(e=>[E(`${e}-start`),E(e),E(`${e}-end`)]);function E(e){return`${b.base}--${e}`}function D({classList:e},t){T.forEach(t=>e.remove(t)),e.add(E(t))}function O(e){if(e==null)return null;let{tiltX:t,tiltY:n}=e;return t<0&&n<0?S.bottomEnd:t<0&&n>0?S.topEnd:t>0&&n>0?S.topStart:t>0&&n<0?S.bottomStart:null}export{C as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{watch as r}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{loadCalciteComponents as a}from"../../../../widgets/support/componentsUtils.js";import{tsx as o,tsxFragment as s}from"../../../../widgets/support/widget.js";import c from"../../../../widgets/Widget.js";import{tooltipKeys as l}from"../../keybindings.js";import{notAvailableString as u}from"../constants.js";import{base as d}from"../css.js";import{ElevationModeSelect as f}from"./ElevationModeSelect.js";const p=`${d}-editable-field`,m={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputAction:`${p}__input-action`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},h={lock:`lock`,unlock:`unlock`};let g=class extends c{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.context.toolOptions.isTooltipFieldVisible(this.field.name)&&this.field.toggleLock(this.context)},this._onLockAfterCreate=e=>{this._lock=e},this._onLockAfterRemoved=()=>{this._lock=null},this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{watch as r}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{loadCalciteComponents as a}from"../../../../widgets/support/componentsUtils.js";import{tsx as o,tsxFragment as s}from"../../../../widgets/support/widget.js";import c from"../../../../widgets/Widget.js";import{tooltipKeys as l}from"../../keybindings.js";import{notAvailableString as u}from"../constants.js";import{base as d}from"../css.js";import{ElevationModeSelect as f}from"./ElevationModeSelect.js";const p=`${d}-editable-field`,m={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputAction:`${p}__input-action`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},h={lock:`lock`,unlock:`unlock`};let g=class extends c{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.context.toolOptions.isTooltipFieldVisible(this.field.name)&&this.field.toggleLock(this.context)},this._onLockAfterCreate=e=>{this._lock=e},this._onLockAfterRemoved=()=>{this._lock=null},this._onInputKeyDown=e=>{let t=this._input;if(t&&e.target===t)switch(e.key){case l.commit:return this.field.onCommit(`commit-and-exit`,t,this.context);case l.next:{e.preventDefault(),e.stopPropagation();let n=e.shiftKey?`commit-and-previous`:`commit-and-next`;return this.field.onCommit(n,t,this.context)}}},this._onInput=e=>{this.field.onInput(e.currentTarget.value)},this._onInputBlur=e=>{let t=this._input;t&&e.relatedTarget!==this._lock&&this.field.onCommit(`commit-on-blur`,t,this.context)},this._selectText=()=>{let e=()=>{(this._input===document.activeElement||this._input===document.activeElement?.shadowRoot?.activeElement)&&this._input?.selectText()};e(),i().then(e)},this._onAfterCreate=e=>{this._input=e,e.addEventListener(`paste`,this._onPaste),e.addEventListener(`beforeinput`,this._onBeforeInput)},this._onAfterRemoved=e=>{e.removeEventListener(`paste`,this._onPaste),e.removeEventListener(`beforeinput`,this._onBeforeInput),this._input===e&&(this._input=null)},this._onPaste=e=>{let t=e.clipboardData?.getData(`text`);t&&this.field.parse(t,this.context)!=null&&(e.stopPropagation(),this.field.onInput(t))},this._onBeforeInput=e=>{e.inputType!==`historyUndo`&&e.inputType!==`historyRedo`||this.field.dirty||e.preventDefault()}}initialize(){this.addHandles(r(()=>this._rawDisplayValue,()=>{let{committed:e,inputValue:t}=this.field;!e&&!t&&this._input===document.activeElement&&this._selectText()}))}loadDependencies(){return a({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`)})}render(){let{field:e,mode:t}=this,n=t===`input`;return o(`div`,{class:this.classes({[m.base]:!0,[m.feedbackMode]:t===`feedback`,[m.inputMode]:t===`input`,[m.locked]:e.locked,[m.readOnly]:e.readOnly})},o(`div`,{class:m.title,key:`title`},this._title),o(`div`,{class:m.value,key:`value`},n?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||u}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){let{title:e}=this.field;return typeof e==`string`?e:e(this.context)}get _messages(){return this.context?.messages.sketch??{}}get _elevationModeSelect(){return this.field.name===`elevation`&&this.context.elevationModeContext&&this.context.toolOptions.isTooltipFieldVisible(`elevationMode`)?o(f,{context:this.context,key:`elevation-mode`,mode:this.mode}):null}_renderValueFeedbackMode(){return o(s,null,o(`div`,{class:m.valueContent,key:`value-feedback`},this._formattedValue,this._elevationModeSelect),this.field.locked&&this.mode!==`input`?o(`calcite-icon`,{class:m.lockIcon,icon:h.lock,key:`icon`,scale:`s`}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return o(`div`,{class:this.classes(m.valueContent,m.valueContentReadOnly),key:`value-read-only`},this._formattedValue,this._elevationModeSelect)}_renderValueWritable(){let{field:e}=this,t=this._messages,{name:n}=e,r=e.invalid;return o(s,null,o(`div`,{class:m.inputWrapper,key:`value-input`},o(`calcite-input`,{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:m.input,"data-field-id":e.id,"data-field-name":n,"data-testid":`tooltip-field-${n}`,key:`input`,scale:`s`,status:r?`invalid`:`idle`,type:`text`,value:this._rawDisplayValue??u,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown},this._elevationModeSelect?o(`div`,{class:m.inputAction,slot:`action`},this._elevationModeSelect):null)),o(`div`,{class:m.inputSuffix,key:`suffix`},this._suffix),this._renderedLockButton,r?o(`calcite-notice`,{appearance:`transparent`,class:m.inputMessage,key:`input-message`,kind:`danger`,open:!0,role:`alert`,scale:`s`},o(`span`,{slot:`message`},t.invalidValue)):null)}get _renderedLockButton(){let{lockDisabled:e,locked:t,lockable:n,name:r}=this.field;if(!n)return o(`div`,{key:`no-lock-button`});let i=this._messages,a=t?i.unlockConstraint:i.lockConstraint;return o(`calcite-button`,{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:`center`,appearance:`transparent`,class:m.button,"data-testid":`tooltip-field-${r}-lock`,disabled:e,iconStart:t?h.lock:h.unlock,key:`lock-button`,kind:`neutral`,label:a,scale:`s`,tabIndex:-1,title:a,onclick:this._onLockClick})}};e([t()],g.prototype,`field`,void 0),e([t()],g.prototype,`context`,void 0),e([t()],g.prototype,`mode`,void 0),e([t()],g.prototype,`_input`,void 0),e([t()],g.prototype,`_lock`,void 0),e([t()],g.prototype,`_formattedValue`,null),e([t()],g.prototype,`_rawDisplayValue`,null),e([t()],g.prototype,`_suffix`,null),e([t()],g.prototype,`_title`,null),e([t()],g.prototype,`_messages`,null),e([t()],g.prototype,`_elevationModeSelect`,null),e([t()],g.prototype,`_renderedLockButton`,null),g=e([n(`esri.views.interactive.tooltip.components.TooltipEditableField`)],g);export{g as TooltipEditableField};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{prefersReducedMotion as t}from"../../../../core/a11yUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{on as i}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as a}from"../../../../core/memoize.js";import{throwIfAborted as o,throwIfNotAbortError as s,after as c}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as l,waitTick as u}from"../../../../core/scheduling.js";import{unitName as d}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as f,defaultVerticalLengthUnit as p,defaultLengthUnit as m}from"../../../../core/units.js";import{getDefaultUnitForView as h}from"../../../../support/getDefaultUnitForView.js";import{loadCalciteComponents as g}from"../../../../widgets/support/componentsUtils.js";import{tsx as _,tsxFragment as v,classes as y,messageBundle as b}from"../../../../widgets/support/widget.js";import x from"../../../../widgets/Widget.js";import{tooltipKeys as S}from"../../keybindings.js";import{table as C,contentHeader as w,contentHeaderSpacer as T,contentHeaderActions as E,contentInputMode as D,content as O,helpMessageText as k,helpMessageIcon as A,helpMessage as j,drawContentHeaderActions as M}from"../css.js";import{getFormatters as N}from"../fields/parsingAndFormattingUtils.js";const P=Symbol(`dragHandles`);let F=class extends x{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode=`feedback`,this._getFormatters=a(N),this._onHeaderPointerDown=e=>{let t=e.target;if(!(t instanceof HTMLElement)||t?.tagName?.toLowerCase()===`calcite-button`)return;this.removeHandles(P),e.preventDefault(),e.stopPropagation();let n=process.env.NODE_ENV!==`test`;n&&t.setPointerCapture(e.pointerId),this.tooltip.onDragStart(e.clientX,e.clientY),this.addHandles([i(t,`pointermove`,({clientX:e,clientY:t})=>{this.tooltip.onDrag(e,t)}),i(t,[`pointerup`,`pointercancel`],r=>{this.removeHandles(P),n&&t.releasePointerCapture(e.pointerId),this.tooltip.onDragEnd()}),i(t,`touchstart`,e=>e.preventDefault())],P)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit(`discard`),this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{prefersReducedMotion as t}from"../../../../core/a11yUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{on as i}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as a}from"../../../../core/memoize.js";import{throwIfAborted as o,throwIfNotAbortError as s,after as c}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as l,waitTick as u}from"../../../../core/scheduling.js";import{unitName as d}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as f,defaultVerticalLengthUnit as p,defaultLengthUnit as m}from"../../../../core/units.js";import{getDefaultUnitForView as h}from"../../../../support/getDefaultUnitForView.js";import{loadCalciteComponents as g}from"../../../../widgets/support/componentsUtils.js";import{tsx as _,tsxFragment as v,classes as y,messageBundle as b}from"../../../../widgets/support/widget.js";import x from"../../../../widgets/Widget.js";import{tooltipKeys as S}from"../../keybindings.js";import{table as C,contentHeader as w,contentHeaderSpacer as T,contentHeaderActions as E,contentInputMode as D,content as O,helpMessageText as k,helpMessageIcon as A,helpMessage as j,drawContentHeaderActions as M}from"../css.js";import{getFormatters as N}from"../fields/parsingAndFormattingUtils.js";const P=Symbol(`dragHandles`);let F=class extends x{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._exitInputModePromise=null,this._transitionInfo=null,this._mode=`feedback`,this._getFormatters=a(N),this._onHeaderPointerDown=e=>{let t=e.target;if(!(t instanceof HTMLElement)||t?.tagName?.toLowerCase()===`calcite-button`)return;this.removeHandles(P),e.preventDefault(),e.stopPropagation();let n=process.env.NODE_ENV!==`test`;n&&t.setPointerCapture(e.pointerId),this.tooltip.onDragStart(e.clientX,e.clientY),this.addHandles([i(t,`pointermove`,({clientX:e,clientY:t})=>{this.tooltip.onDrag(e,t)}),i(t,[`pointerup`,`pointercancel`],r=>{this.removeHandles(P),n&&t.releasePointerCapture(e.pointerId),this.tooltip.onDragEnd()}),i(t,`touchstart`,e=>e.preventDefault())],P)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit(`discard`),this.exitInputMode())},this._onCommit=(e,t)=>{if(this.destroyed)return;if(this.tooltip.emit(`commit`,{type:t}),t===`commit-and-exit`){this.exitInputMode();return}if(t===`commit-on-blur`)return;let n=this._getFocusableElements(),r=n.length,i=n.indexOf(e);if(i===-1){this.exitInputMode();return}let a=((i+(t===`commit-and-next`?1:-1))%r+r)%r;I(n.at(a))},this._onKeyDown=e=>{switch(e.key){case S.next:return this._onNextKey(e);case S.discard:return e.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){let{displayUnits:e}=this.info.toolOptions.values,t=h(this.tooltip.view);return{length:e.length??t,verticalLength:e.verticalLength??t,area:e.area??t}}get _inputUnitInfos(){let e=this._messagesUnits,t=t=>({unit:t,abbreviation:d(e,t,`abbr`)}),{inputUnits:n}=this.info.toolOptions.values,r=h(this.tooltip.view),i=n.length??r,a=n.verticalLength??r,o=n.area??r;return{length:t(m(i)),verticalLength:t(p(a)),area:t(f(o)),angle:t(`degrees`)}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get _elevationModeContext(){let{elevationModeContext:e}=this.info;return e&&{get mode(){return e.mode},get disabled(){return e.disabled},onChange:t=>{for(let e of this.info.editableFields){let t=this.domNode?.querySelector(`[data-field-id="${e.id}"]`);e.dirty&&t&&e.onCommit(`commit-on-blur`,t,this.fieldContext)}this.info.editableFields.some(e=>e.invalid)||e.onChange(t)}}}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,elevationModeContext:this._elevationModeContext,topLayerDisabled:this.topLayerDisabled,onCommit:this._onCommit}}render(){let{toolOptions:e}=this.info,t=this._renderedContent,n=this._renderedActions,r=this._renderedHelpMessage,i=t.length>0,a=i||!!r,o=this.mode===`input`;return _(`div`,{class:y(O,o&&D),tabIndex:-1,onkeydown:this._onKeyDown},o&&a&&e.isTooltipFieldVisible(`header`)?_(`div`,{class:w,"data-testid":`tooltip-header`,key:`header`,onpointerdown:this._onHeaderPointerDown},_(`calcite-button`,{appearance:`transparent`,"data-testid":`tooltip-back-button`,iconFlipRtl:`both`,iconStart:`chevron-left`,key:`discard-button`,kind:`neutral`,scale:`s`,tabIndex:-1,onclick:this._onDiscard}),n.length>0?_(v,null,_(`div`,{class:T,key:`spacer`}),_(`div`,{class:E,key:`actions`},n)):null):null,i?_(`div`,{class:C,key:`content`},...t):null,r)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return g({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`)})}async enterInputMode(e,t,n){this._focusAbortController.abort(),this._focusAbortController=new AbortController,this._exitInputModePromise=null;let r=n?AbortSignal.any([this._focusAbortController.signal,n]):this._focusAbortController.signal;try{await this._transitionTo(`input`,t,r),o(r);let n=await this._focusField(r,e);return o(r),n||await this.exitInputMode({focusOnView:!1}),n}catch(e){return s(e),!1}}async exitInputMode({focusOnView:e=!0}={}){if(this._exitInputModePromise)return this._exitInputModePromise;let t=this._exitInputModePromise=this._exitInputMode(e);try{await t}finally{this._exitInputModePromise===t&&(this._exitInputModePromise=null)}}async _exitInputMode(e){let t=this._focusAbortController;try{let{container:n,info:r}=this,i=e?n?.closest(`.esri-view`)?.querySelector(`.esri-view-surface`):null,a=n?.ownerDocument,o=n?.getRootNode(),s=o instanceof ShadowRoot?o:a,c=s?.activeElement,l=a?.activeElement;t.abort(),r.clearInputValues(),await this._transitionTo(`feedback`),i instanceof HTMLElement&&!this.destroyed&&t===this._focusAbortController&&(a?.activeElement===a?.body||l===a?.activeElement&&c===s?.activeElement)&&i.focus()}catch(e){s(e)}}_onNextKey(e){let t=this._getFocusableElements(),n=t.at(0),r=t.at(-1);n&&r&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),e.stopPropagation(),I(r)):document.activeElement===r&&(e.preventDefault(),e.stopPropagation(),I(n)))}get _renderedContent(){return L(this._renderContent())}get _renderedActions(){return L(this._renderActions())}get _renderedHelpMessage(){let{toolOptions:e}=this.info;if(!e.isTooltipFieldVisible(`helpMessage`))return null;let t=e.tooltips.helpMessage??this._defaultHelpMessage;if(!t)return null;let n=e.tooltips.helpMessageIcon??`information`;return _(`div`,{class:j,key:`help-message`},n?_(`calcite-icon`,{class:A,icon:n,scale:`s`}):null,_(`div`,{class:k},t))}get _defaultHelpMessage(){let{helpMessage:e,viewType:t}=this.info;if(e==null)return null;let n=t===`3d`?`helpMessages3d`:`helpMessages2d`;return this._messagesTooltip?.sketch?.[n]?.[e]}async _focusField(e,t){await this._waitForInputs(e),o(e);let n=this._getFocusableFields(),r=t?n.find(e=>e.localName===`calcite-input`&&e.getAttribute(`data-field-name`)===t):n.at(0);return await I(r,e),r?.matches(`:focus-within`)??!1}async _transitionTo(e,n,r){if(this._mode===e&&!this._transitionInfo)return;if(this._transitionInfo?.mode===e&&!this._transitionInfo.signal?.aborted)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();let i=async()=>{this.destroyed||r?.aborted||(this._mode=e,await u(),this.destroyed||r?.aborted||(this.renderNow(),await u(),this.destroyed||r?.aborted||n?.()))};if(process.env.NODE_ENV===`test`||!this.domNode?.firstChild||!document.startViewTransition||t()){await i();return}this.autoRenderingEnabled=!1;let a=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||a!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:e,signal:r};try{await a.transition.finished}finally{a===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(e){let t=()=>Array.from(this.domNode?.querySelectorAll(`calcite-input`)??[]);for(;t().length===0;)await c(R,void 0,e);await l()}_getFocusableFields(){let e=Array.from(this.domNode?.querySelectorAll(`calcite-input:not([read-only]):not([disabled])`)??[]),t=Array.from(this.domNode?.querySelectorAll(`[data-tooltip-inline-control]:not([disabled])`)??[]);return[...e,...t]}_getFocusableElements(){let e=this.domNode?.querySelector(`.${M}`);return[...Array.from(e?.querySelectorAll(`.${E} calcite-button:not([disabled])`)??[]),...this._getFocusableFields()]}};e([b(`esri/core/t9n/Units`),n()],F.prototype,`_messagesUnits`,void 0),e([b(`esri/views/interactive/tooltip/t9n/Tooltip`),n()],F.prototype,`_messagesTooltip`,void 0),e([n()],F.prototype,`info`,void 0),e([n()],F.prototype,`tooltip`,void 0),e([n()],F.prototype,`_mode`,void 0),e([n()],F.prototype,`mode`,null),e([n()],F.prototype,`_displayUnits`,null),e([n()],F.prototype,`_inputUnitInfos`,null),e([n()],F.prototype,`_formatters`,null),e([n()],F.prototype,`_elevationModeContext`,null),e([n()],F.prototype,`fieldContext`,null),e([n()],F.prototype,`_renderedContent`,null),e([n()],F.prototype,`_renderedActions`,null),e([n()],F.prototype,`_renderedHelpMessage`,null),e([n()],F.prototype,`_defaultHelpMessage`,null),F=e([r(`esri.views.interactive.tooltip.content.TooltipContent`)],F);async function I(e,t){await e?.componentOnReady?.(),o(t),await e?.setFocus()}function L(e){return(Array.isArray(e)?e:[e]).flat(10).filter(e=>!!e)}const R=20;export{F as TooltipContent};
|