@arcgis/core 5.0.0-next.7 → 5.0.0-next.8
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/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8f56f298e7c1a283f407.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/{17d5f8dba6ebb1184506.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/05429f9d292a7a714309.js +316 -0
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/{9486032af3e934d85582.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/{73487b9d85e726e9c012.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{398f356b11fd33bd3831.js → 136a7d781dad05a7463b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/17784cf16fa91504b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{a395373e3173e6458a56.js → 1ab37e13947d0e2e4181.js} +1 -1
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/{020c8913d8e35d63080b.js → 1d15d1b20dc10fde6def.js} +1 -1
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/20975513be0a3a1da286.js +1 -0
- package/assets/esri/core/workers/chunks/{285762ff92d5388b6024.js → 2166238a7ad63a2d43c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{620a94b54be3ed78350d.js → 22ca80f491e070b2a5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{88074189fa10c335370b.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fac5a12e878cd745354.js → 28020063048e644f17a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{95c594a87b732f5c4979.js → 2a8dff8521e1e6a10cf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → 2fa01bd3f3608616fd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/31c7ce65e16f7858400f.js +1 -0
- package/assets/esri/core/workers/chunks/{8a314b3790313e6dc5db.js → 333b62dad3811cff0f14.js} +1 -1
- package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +1 -0
- package/assets/esri/core/workers/chunks/{e31192ae920e3e19b6aa.js → 37c1f155da14de91565a.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa54b6f2aba6952af149.js → 38cc18fd93c18815ded0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c55c096669677321a227.js → 38cd3648932bf2534b0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac26e3e77df4302f47a2.js → 3afb83f5de033dda89ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5e47eea8720ba84665b.js → 3c07aa2015ab1dff5f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5484b5eeacc9ad2ceb.js → 4d0cbf9584446f411a37.js} +1 -1
- package/assets/esri/core/workers/chunks/{17103e6542aae53c7301.js → 4e3e27673d0671fc2b58.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fc7b61f467f1d60a284.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/{90f8b4bda28af43ea019.js → 538f509d7fc8337d37ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8733cd621105afab2ac.js → 59d3cac32ad6dad941dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c056eac35d05d9524b7.js → 5f29422a051311ef9b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ff35a077ac6776469805.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{fd2efd1d1cf9d95a87e6.js → 63a6f3e70d2b6ea57e40.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b2b43b8b54c9a1ec35.js → 664ae441617afe4b17ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{c4e4da69969499a89a2c.js → 695cdef5057e5461078a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c5a7249a311070d8f43.js → 6af18d7a0d314d7c1756.js} +1 -1
- package/assets/esri/core/workers/chunks/{f35aaa04cca676c2d3f8.js → 6b59f94040c7d2f6728a.js} +1 -1
- package/assets/esri/core/workers/chunks/{811d4c46c75cf6a63e78.js → 6bb7dbc46787b8e34bd9.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{cd1930f08e1fc8b30b14.js → 6ee2f0f708494102a493.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0e0a63962784acb4ba1.js → 6f0aec7428021e440ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3991ae8caa713d4ddcd.js → 731f7b552dde0fb325cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{464d42bebb365287808d.js → 773f2c6c9d38db76dfed.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f3d492f1093b7832aab.js → 7803495f8862d9025bcd.js} +1 -1
- package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +1 -0
- package/assets/esri/core/workers/chunks/7e4c14d4502e3f06d94b.js +1 -0
- package/assets/esri/core/workers/chunks/{7544316a75dbd981aea6.js → 86cb097deec50b0da3f3.js} +1 -1
- package/assets/esri/core/workers/chunks/8a40ed2ee4b032822c30.js +1 -0
- package/assets/esri/core/workers/chunks/{09de8be660174a229efb.js → 8cbb28476151a37ae958.js} +1 -1
- package/assets/esri/core/workers/chunks/{62a49cfd9a2508950e9f.js → 8fedfd33c37172dba6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +1 -0
- package/assets/esri/core/workers/chunks/91aa1157da32f650983b.js +1 -0
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{794748fd1edc29a621cd.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/98584902c9db6faa3e4d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{6f4bd0ee85e7e5a74340.js → a31635a6366347dcef0f.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/{ccc0da0e01f023c8aa1f.js → a876d6159ca120c1567e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4db5c9a90107e097df8.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1fe816b6990918c13c7.js → afc13d5b842275db7dbc.js} +1 -1
- package/assets/esri/core/workers/chunks/aff8e40a641c6822af1d.js +1 -0
- package/assets/esri/core/workers/chunks/{22d6b8102e75bdef204c.js → b0365cbc3d2a41969e3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +1 -0
- package/assets/esri/core/workers/chunks/{5bd36dbf46c25bd961c8.js → b708792c84620b73c847.js} +1 -1
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +1 -0
- package/assets/esri/core/workers/chunks/{279366e6b743f9680603.js → cfff044859e6e6dcc75d.js} +1 -1
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/{8833c3d168951be4bf20.js → d0d79dd3e88eecf5c314.js} +1 -1
- package/assets/esri/core/workers/chunks/{76ae1702fecc7ad7017c.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acde0245ecd956306c.js → d233cc33497a663450f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{36fe6b8228e622407ec2.js → d8793eead02491136841.js} +1 -1
- package/assets/esri/core/workers/chunks/{dedc4583b5f32a278124.js → d88f2fe680b8d5603ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d599008e1ea42321b37.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/{facb3886714222772ab2.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3294318daf1192b8319.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9324e88c359c03f35aa.js → eb9c166db0db6fa60e95.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ffd4710d168c2fcfd96.js → ebf23b46db56aaa88841.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc241c7735e4efba734a.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/{d97fadbc69e055d183a0.js → f77f4bd6a577b92cf66f.js} +1 -1
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → f89c90f98c85667b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c4227b0ea21a5e429ab.js → fb192de7e4fa152342bb.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe77ae6cf232a7a3298e.js → fef45bc59c71f88c60b5.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/has.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +67 -27
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/{3d/support/ImageWithType.js → 2d/layers/features/sources/strategies/constants.js} +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +6 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/02e69f0c63d97661da60.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/377a66034e7c1bad5599.js +0 -1
- package/assets/esri/core/workers/chunks/4442817beb7a76c95770.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/53bd8996e8812f1ad7b2.js +0 -1
- package/assets/esri/core/workers/chunks/557960763695abee4a83.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b99209d542efa64d4.js +0 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +0 -1
- package/assets/esri/core/workers/chunks/7461124454bfb4fb6474.js +0 -1
- package/assets/esri/core/workers/chunks/75bf27271a31e26e1b21.js +0 -1
- package/assets/esri/core/workers/chunks/7aaaebbabee27690283c.js +0 -1
- package/assets/esri/core/workers/chunks/7c4a63aeead2505d6f02.js +0 -1
- package/assets/esri/core/workers/chunks/90250e9239c173aace88.js +0 -1
- package/assets/esri/core/workers/chunks/9786f91455350eaae493.js +0 -1
- package/assets/esri/core/workers/chunks/99859dce1925b406ccd0.js +0 -1
- package/assets/esri/core/workers/chunks/9c5cbf8810f37b1a4718.js +0 -1
- package/assets/esri/core/workers/chunks/9e8dceef4c961f56940d.js +0 -1
- package/assets/esri/core/workers/chunks/a06bac9b8f9e18874de8.js +0 -316
- package/assets/esri/core/workers/chunks/a712cdff78fc826acd8c.js +0 -1
- package/assets/esri/core/workers/chunks/d305a21666b1ed5bf33d.js +0 -1
- package/assets/esri/core/workers/chunks/d40f57f9fc47f9a9f97c.js +0 -1
- package/assets/esri/core/workers/chunks/e82f5437bd66779c6740.js +0 -1
- package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8beb60f6d29945a2e.js +0 -1
- package/assets/esri/core/workers/chunks/f746e3f7ebff2bbdf333.js +0 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2593],{18251:(t,e,r)=>{r.d(e,{A:()=>c});var s=r(31635),n=r(69540),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(64108),l=r(51850);let c=class extends((0,n.OU)(a.o)){constructor(t){super(t),this.type="local",this.origin=(0,l.vt)()}};(0,s.Cg)([(0,o.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,s.Cg)([(0,u.$)("esri.geometry.support.MeshLocalVertexSpace")],c)},24770:(t,e,r)=>{r.d(e,{$I:()=>m,AU:()=>h,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>b,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),a=r(67026),i=r(82534),o=r(38954),u=r(51850);function l(t=b){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.d)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(M,t);return g(e,(0,s.KJ)((0,a.Xd)(e,r))),e}function d(t,e,r=l()){return(0,a.x8)(M,t,m(t)),(0,a.x8)(A,e,m(e)),(0,a.lw)(M,A,M),g(r,(0,s.KJ)((0,a.Xd)(r,M)))}function h(t,e,r,s=l()){return c(u.Cw,t,_),c(u.JP,e,q),c(u.Cb,r,S),d(_,q,_),d(_,S,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const b=[0,0,1,0],M=(0,i.vt)(),A=(0,i.vt)(),_=(l(),l()),q=l(),S=l()},27615:(t,e,r)=>{r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(38954),n=r(86738),a=r(95696),i=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,a]=t.origin;return new n.A({x:r,y:s,z:a,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new i.A({origin:u}):new a.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.q)(t.origin,e.origin))}},28132:(t,e,r)=>{r.d(e,{A:()=>T});var s=r(31635),n=r(69622),a=r(49186),i=r(44208),o=r(74887),u=r(84952),l=r(10107),c=(r(53966),r(87811),r(64108)),p=r(21325),d=r(20557),h=r(27733),y=r(2272),f=r(20615),m=r(5443),g=r(80893),b=r(61956),M=r(78286),A=r(99199),_=r(97768),q=r(62815),S=r(90708);function v(t,e){return e}function x(t,e,r,s){switch(r){case 0:return I(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?I(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function w(t,e,r,s){return 2===r?I(t,e,2):x(t,e,r,s)}function F(t,e,r,s){return 2===r?0===e?0:I(t,e,3):x(t,e,r,s)}function R(t,e,r,s){return 3===r?0===e?0:I(t,e,3):w(t,e,r,s)}function I({translate:t,scale:e},r,s){return t[s]+r*e[s]}class C{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=v,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=(0,q.N)(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){const r=t.fields;(0,_.Lw)(r),r.push(e);const s=r.map(t=>t.name);this._attributesConstructor=function(){for(const t of s)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._mValueOffset=null,this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=r.justXY();this._transform&&(0,S.aQ)(n,this._transform);const a=(0,S.zv)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...a}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform;switch(e=this._applyTransform(s,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t);const s=this._transform;return null!==this._mValueOffset&&0===t&&e>0&&!(e%this._mValueOffset)?0:this._applyTransform(s,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0===this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),n.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?R:e?w:r?F:x}}var O=r(22671);let T=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,i.A)("featurelayer-pbf-statistics"),a=(!s||n)&&!0!==t.returnTrueCurves;let o;if(this.pbfSupported&&a)try{o=await async function(t,e,r,s){const n=(0,y.Dl)(t),a={...r},i=b.A.from(e),o=!i.quantizationParameters,{data:u}=await(0,g.IJ)(n,i,new C({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),a,s);return u}(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return this.pbfSupported&&a||(o=await(0,A.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(o.fields),o}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||null==this.infoFor3D||!e.features)return O.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(8487),r.e(36),r.e(5066)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return async function(t,e,r){const s=(0,y.Dl)(t),n=await(0,g.Jf)(s,b.A.from(e),{...r}),a=n.data.extent;return!a||isNaN(a.xmin)||isNaN(a.ymin)||isNaN(a.xmax)||isNaN(a.ymax)?{count:n.data.count,extent:null}:{count:n.data.count,extent:m.A.fromJSON(a)}}(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,M.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),i=(0,y.Dl)(this.url);return a(i,await(this.queryAttachmentsSupported?s(i,t,e):n(i,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=b.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?h.L.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(t)){if(e=e===t?e.clone():e,e.formatOf3DObjects=(0,d.Hz)(r),!e.formatOf3DObjects)throw new a.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(e.outSpatialReference&&!(0,p.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:a,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:d,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,a,i,o,u,l,c,p,d,h,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return null!=this.infoFor3D&&!0===t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s.Cg)([(0,l.MZ)({type:h.L})],T.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],T.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],T.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],T.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],T.prototype,"url",void 0),T=(0,s.Cg)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],T)},38954:(t,e,r)=>{r.d(e,{A:()=>y,B:()=>h,C:()=>c,D:()=>p,E:()=>P,F:()=>Q,H:()=>G,a:()=>E,b:()=>a,c:()=>g,d:()=>i,e:()=>l,f:()=>v,g:()=>u,h:()=>m,i:()=>x,j:()=>o,k:()=>b,l:()=>w,m:()=>A,n:()=>S,o:()=>R,q:()=>T,r:()=>q,s:()=>M,t:()=>F,u:()=>_,v:()=>I,w:()=>d,x:()=>j,y:()=>U,z:()=>f});var s=r(51850),n=r(34304);function a(t){const e=t[0],r=t[1],s=t[2];return Math.sqrt(e*e+r*r+s*s)}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,s){return t[0]=e,t[1]=r,t[2]=s,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function l(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function c(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function p(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function h(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function f(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function g(t,e,r,s){return t[0]=e[0]+r[0]*s,t[1]=e[1]+r[1]*s,t[2]=e[2]+r[2]*s,t}function b(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+s*s+n*n)}function M(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return r*r+s*s+n*n}function A(t){const e=t[0],r=t[1],s=t[2];return e*e+r*r+s*s}function _(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function q(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function S(t,e){const r=e[0],s=e[1],n=e[2];let a=r*r+s*s+n*n;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2];return t[0]=n*u-a*o,t[1]=a*i-s*u,t[2]=s*o-n*i,t}function w(t,e,r,s){const n=e[0],a=e[1],i=e[2];return t[0]=n+s*(r[0]-n),t[1]=a+s*(r[1]-a),t[2]=i+s*(r[2]-i),t}function F(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=r[0]*s+r[4]*n+r[8]*a+r[12],t[1]=r[1]*s+r[5]*n+r[9]*a+r[13],t[2]=r[2]*s+r[6]*n+r[10]*a+r[14],t}function R(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=s*r[0]+n*r[3]+a*r[6],t[1]=s*r[1]+n*r[4]+a*r[7],t[2]=s*r[2]+n*r[5]+a*r[8],t}function I(t,e,r){const s=r[0],n=r[1],a=r[2],i=r[3],o=e[0],u=e[1],l=e[2],c=n*l-a*u,p=a*o-s*l,d=s*u-n*o,h=n*d-a*p,y=a*c-s*d,f=s*p-n*c,m=2*i;return t[0]=o+c*m+2*h,t[1]=u+p*m+2*y,t[2]=l+d*m+2*f,t}const C=(0,s.vt)(),O=(0,s.vt)();function T(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function P(t,e,r){const s=r[0]-e[0],n=r[1]-e[1],a=r[2]-e[2];let i=s*s+n*n+a*a;return i>0?(i=1/Math.sqrt(i),t[0]=s*i,t[1]=n*i,t[2]=a*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const E=l,D=c,N=p,Q=b,j=M,G=a,U=A;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:u,angle:function(t,e){S(C,t),S(O,e);const r=v(C,O);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,s,n,a){const i=1-a,o=i*i,u=a*a,l=o*i,c=3*a*o,p=3*u*i,d=u*a;return t[0]=e[0]*l+r[0]*c+s[0]*p+n[0]*d,t[1]=e[1]*l+r[1]*c+s[1]*p+n[1]*d,t[2]=e[2]*l+r[2]*c+s[2]*p+n[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:i,cross:x,crossAndNormalize:function(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2],l=n*u-a*o,c=a*i-s*u,p=s*o-n*i,d=Math.sqrt(l*l+c*c+p*p);return t[0]=l/d,t[1]=c/d,t[2]=p/d,t},direction:P,dist:Q,distance:b,div:N,divide:p,dot:v,equals:function(t,e){if(t===e)return!0;const r=t[0],s=t[1],a=t[2],i=e[0],o=e[1],u=e[2],l=(0,n.FD)();return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-o)<=l*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,s,n,a){const i=a*a,o=i*(2*a-3)+1,u=i*(a-2)+a,l=i*(a-1),c=i*(3-2*a);return t[0]=e[0]*o+r[0]*u+s[0]*l+n[0]*c,t[1]=e[1]*o+r[1]*u+s[1]*l+n[1]*c,t[2]=e[2]*o+r[2]*u+s[2]*l+n[2]*c,t},inverse:q,len:G,length:a,lerp:w,max:f,min:y,mul:D,multiply:c,negate:_,normalize:S,random:function(t,e=1){const r=n.Ov,s=2*r()*Math.PI,a=2*r()-1,i=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(s)*i,t[1]=Math.sin(s)*i,t[2]=a*e,t},rotateX:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(s)-n[2]*Math.sin(s),a[2]=n[1]*Math.sin(s)+n[2]*Math.cos(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateY:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[2]*Math.sin(s)+n[0]*Math.cos(s),a[1]=n[1],a[2]=n[2]*Math.cos(s)-n[0]*Math.sin(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateZ:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0]*Math.cos(s)-n[1]*Math.sin(s),a[1]=n[0]*Math.sin(s)+n[1]*Math.cos(s),a[2]=n[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:g,set:o,sign:h,sqrDist:j,sqrLen:U,squaredDistance:M,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:E,subtract:l,transformMat3:R,transformMat4:F,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},63579:(t,e,r)=>{r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>h,fH:()=>f,in:()=>y,yr:()=>l});var s=r(78888),n=r(4576),a=(r(44208),r(74887)),i=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,a.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(d):d(t.files);case"service":return t.assets.some(d);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function d(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function h(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,i.rq)(t,e):(0,i.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},64714:(t,e,r)=>{r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>d,f:()=>h});var s=r(44208),n=r(4718),a=r(99352),i=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?i.Cb:"esriGeometryPolyline"===t?i.yM:i.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`["${t}"]`}function d(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function h(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67026:(t,e,r)=>{r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>h,hZ:()=>g,lw:()=>p,t2:()=>R,x8:()=>l});var s=r(29242),n=r(82534),a=r(51850),i=r(34304),o=r(38954),u=r(87317);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,i.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],a=e[2],i=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+i*o+n*l-a*u,t[1]=n*c+i*u+a*o-s*l,t[2]=a*c+i*l+s*u-n*o,t[3]=i*c-s*o-n*u-a*l,t}function d(t,e,r,s){const n=e[0],a=e[1],o=e[2],u=e[3];let l,c,p,d,h,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+a*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,i.FD)()?(l=Math.acos(c),p=Math.sin(l),d=Math.sin((1-s)*l)/p,h=Math.sin(s*l)/p):(d=1-s,h=s),t[0]=d*n+h*y,t[1]=d*a+h*f,t[2]=d*o+h*m,t[3]=d*u+h*g,t}function h(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,a=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*a+a]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+a]-e[3*a+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[a]=(e[3*a+r]+e[3*r+a])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const a=Math.sin(e),i=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=a*u*c-i*o*l,t[1]=i*o*c+a*u*l,t[2]=i*u*l-a*o*c,t[3]=i*u*c+a*o*l,t}const m=u.d,g=u.s,b=u.h,M=p,A=u.c,_=u.g,q=u.l,S=u.i,v=S,x=u.b,w=x,F=u.n,R=u.a,I=u.e,C=(0,a.vt)(),O=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),P=(0,n.vt)(),E=(0,n.vt)(),D=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:h,copy:m,dot:_,equals:I,exactEquals:R,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],a=e[3],i=r*r+s*s+n*n+a*a,o=i?1/i:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=a*o,t},len:v,length:S,lerp:q,mul:M,multiply:p,normalize:F,random:function(t){const e=i.Ov,r=e(),s=e(),n=e(),a=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*s),t[1]=a*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+i*o,t[1]=n*u+a*o,t[2]=a*u-n*o,t[3]=i*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-a*o,t[1]=n*u+i*o,t[2]=a*u+s*o,t[3]=i*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=a*u+i*o,t[3]=i*u-a*o,t},rotationTo:function(t,e,r){const s=(0,o.f)(e,r);return s<-.999999?((0,o.i)(C,O,e),(0,o.H)(C)<1e-6&&(0,o.i)(C,T,e),(0,o.n)(C,C),l(t,C,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.i)(C,e,r),t[0]=C[0],t[1]=C[1],t[2]=C[2],t[3]=1+s,F(t,t))},scale:A,set:g,setAxes:function(t,e,r,s){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:d,sqlerp:function(t,e,r,s,n,a){return d(P,e,n,a),d(E,r,s,a),d(t,P,E,2*a*(1-a)),t},sqrLen:w,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},72593:(t,e,r)=>{r.r(e),r.d(e,{default:()=>H});var s=r(31635),n=r(92602),a=r(78888),i=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),d=r(93637),h=r(74887),y=r(36708),f=r(84952),m=r(13069),g=r(10107),b=r(64108),M=r(5443),A=r(16930),_=r(95696),q=r(27615),S=r(63579),v=r(52106),x=r(83047),w=r(91218),F=r(65864),R=r(73836),I=r(21325),C=r(78628);async function O(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:a,spatialReference:i,vertexSpace:o}=s,u=s.transform??new R.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,d=(0,I.aI)(c,i),h=(0,w.isEqualBaseGCS)(i,c)&&(0,w.canProjectWithoutEngine)(i,c);if(!(l&&p&&h||!l&&!p&&d))return null;const y=(0,w.projectWithoutEngine)(a,i,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,a=l?1:(0,x.KX)(i)/(0,x.KX)(c);n[e.translationX]=t[0]*a,n[e.translationY]=t[2]*a,n[e.translationZ]=-t[1]*a,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function T(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>P(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>P(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function P(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:a,contentType:i,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return a&&(l.name=a),i&&(l.contentType=i),l}function E(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function D(t,e){return new v.A({attributes:t.attributes,geometry:(0,F.rS)({...t.geometry,spatialReference:e})})}function N(t,e){return{adds:t?.adds?.map(t=>D(t,e))||[],updates:t?.updates?.map(t=>({original:D(t[0],e),current:D(t[1],e)}))||[],deletes:t?.deletes?.map(t=>D(t,e))||[],spatialReference:e}}var Q=r(64714),j=r(28132),G=r(60694),U=r(15426),Z=r(20557),J=r(99199),k=r(96520),B=r(61956),V=r(79677),z=r(20816);const L=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),$=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let H=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,h.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:a}=this.layer,i="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==i;return new j.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:i,pbfSupported:l,queryAttachmentsSupported:t?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,uniqueIdFields:a,url:e.path})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,i.query);try{return E((await(0,a.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,U.VA)(s,"editing");const n=t.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return E((await(0,a.A)(i,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>O(this.layer,t,s))??[],p=(await Promise.all(c)).filter(i.Ru),d=t.updateFeatures?.map(t=>O(this.layer,t,s))??[],h=(await Promise.all(d)).filter(i.Ru),y=function(t,e,r){if(!e||0===e.length)return[];if(r&&(0,C.zp)(e))return e.map(t=>t.globalId);if((0,C.r3)(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}(this.layer,t.deleteFeatures,u);(0,k.u)(p,h,r.spatialReference);const f=await T(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,z.ZJ)(this.layer.url,g,!0);const M=(0,z.w5)(this.layer.url,g||null);if(await(0,z.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:h.length?h:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=L.toJSON(e?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const A=this._getLayerRequestOptions({method:"post",query:b});M&&(A.authMode="immediate",A.query.returnEditMoment=!0,A.query.sessionId=z.TA);const _=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let q;try{q=m?await this._asyncApplyEdits(_+"/applyEdits",A):await(0,a.A)(_+"/applyEdits",A)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;A.authMode="immediate",q=m?await this._asyncApplyEdits(_+"/applyEdits",A):await(0,a.A)(_+"/applyEdits",A)}return this._createEditsResult(q)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(E)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,a.A)(`${s}/${r}`,e),{id:i,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:i,fullExtent:c&&M.A.fromJSON(c),timeExtent:l&&V.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,G.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,a.A)(t,{query:{f:"json"}});return $.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,i.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,a.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,a.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.Pl)(X)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,Q.F0)(t.geometryType).renderer;(0,d.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,h.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,a=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,q.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:i}=await Promise.all([r.e(8487),r.e(4496)]).then(r.bind(r,28846)),o=await i(e,new _.A({origin:[s.x,s.y,s.z??0]}));a.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of a)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:a}=t,i=a.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===i.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.dK)??i[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const a=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(E)??[],updateFeatureResults:t?.updateResults?.map(E)??[],deleteFeatureResults:t?.deleteResults?.map(E)??[],addAttachmentResults:r?.addResults?r.addResults.map(E):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(E):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(E):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){a.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new A.A(e.spatialReference):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:N(e,r)})}}return a}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const a=(0,Z.JZ)(n);if(null==a)return!1;const o=(0,f.fj)(s.path,`../${a.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(i.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,d=new B.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),h=await(0,J.s)(o,d),{features:y}=h;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,a=y.filter(t=>t.getAttribute(c)===e);if(0===a.length)return!0;const i=a.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>i.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],H.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],H.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],H.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],H.prototype,"queryTask",null),H=(0,s.Cg)([(0,b.$)("esri.layers.graphics.sources.FeatureLayerSource")],H);const X=1e3},73836:(t,e,r)=>{r.d(e,{A:()=>y});var s=r(31635),n=r(69540),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(64108)),u=r(58083),l=r(9093),c=r(67026),p=r(82534),d=r(51850),h=r(24770);let y=class extends((0,n.OU)(a.o)){constructor(t){super(t),this.translation=(0,d.vt)(),this.rotationAxis=(0,d.ci)(h.up),this.rotationAngle=0,this.scale=(0,d.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,d.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,l.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,u.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,u.B8)((0,l.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,u.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,s.Cg)([(0,i.MZ)()],y.prototype,"rotation",null),(0,s.Cg)([(0,i.MZ)()],y.prototype,"localMatrix",null),(0,s.Cg)([(0,i.MZ)()],y.prototype,"localMatrixInverse",null),y=(0,s.Cg)([(0,o.$)("esri.geometry.support.MeshTransform")],y);const f=(0,p.vt)()},82534:(t,e,r)=>{function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},95696:(t,e,r)=>{r.d(e,{A:()=>c});var s,n=r(31635),a=r(69540),i=r(25482),o=r(10107),u=(r(44208),r(53966),r(87811),r(93223)),l=r(64108);let c=class extends((0,a.OU)(i.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=s=(0,n.Cg)([(0,l.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},99352:(t,e,r)=>{r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7677],{563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>c});var s=i(97768),n=i(74887),r=i(9775),o=i(32587),l=i(76030),a=i(44794);class c{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,a.v)(!1),this.concurrency=1,this.process=e.process,this.concurrency=e.concurrency,this._queue=new r.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,i)=>e(i))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const i=this._get(e);if(i)return i;const s=new AbortController,r=(0,n.Tw)(),o=t?(0,n.u7)(t,()=>s.abort()):null,l=(0,n.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),a(),r.reject((0,n.NK)())}),a=()=>{l.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,r),this._controllers.set(e,s),r.promise.then(a,a),this._queue.push(e),this._scheduleNext(),r.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const i=new AbortController,s=new u(e,i);this._processingItems.set(e,s);try{t=this.process(e,i.signal)}catch(e){this._processError(s,e)}(0,n.$X)(t)?(s.promise=t,t.then(e=>this._processResult(s,e),e=>this._processError(s,e))):this._processResult(s,t)}}class u{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}},4916:(e,t,i)=>{i.d(t,{A:()=>N});var s=i(31635),n=i(78888),r=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(10107),h=i(56507),d=(i(44208),i(87811),i(64108)),p=i(5443),f=i(86738),m=i(16930),g=i(60694),y=i(10873),x=i(45617),_=i(91806),w=i(20223),b=i(87045),v=i(76353),I=i(77301),R=i(70834);const S=new Map,C=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.refCount--,e.refCount<=0&&(s.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.ts=Date.now(),e.refCount++,s.delete(i),s.set(i,e),e.block}return null}putBlock(e,t,i,s){const n=this._cachedBlocks,r=e+"/"+t;if(n.has(r)){const e=n.get(r);e.ts=Date.now(),e.refCount++}else n.set(r,{block:i,ts:Date.now(),refCount:1,controller:s});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,s=e+"/"+t;i.has(s)&&i.delete(s)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval(()=>{const t=Array.from(e),i=Date.now();for(let s=0;s<t.length&&t[s][1].ts<=i-this._duration;s++)e.delete(t[s][0]);0===e.size&&this._clearTimer()},this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function k(e,t,i){const s=S.get(e);if(!s)return null==t?C.decreaseRefCount(e,i):0;if(null==t||null==s[t])return C.decreaseRefCount(e,i);const n=s[t]?.cache,r=n?.get(i);if(n&&r){if(r.refCount--,0===r.refCount){n.delete(i);for(let e=0;e<s.length;e++)s[e]?.cache.delete(i);r.controller&&r.controller.abort()}return r.refCount}return 0}function M(e,t,i){const s=S.get(e);if(!s)return null==t?C.getBlock(e,i):null;if(null==t||null==s[t]){for(let e=0;e<s.length;e++){const t=s[e]?.cache.get(i);if(t)return t.refCount++,t.block}return C.getBlock(e,i)}const n=s[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<s.length;e++){if(e===t||!s[e])continue;const n=s[e]?.cache,r=n?.get(i);if(n&&r)return r.refCount++,n.set(i,r),r.block}return null}function T(e,t,i,s,n=null){const r=S.get(e);if(!r)return void(null==t&&C.putBlock(e,i,s,n));if(null==t||null==r[t])return void C.putBlock(e,i,s,n);const o={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:n};s.then(()=>o.isResolved=!0).catch(()=>o.isRejected=!0),r[t]?.cache.set(i,o)}function A(e,t,i){const s=S.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):C.deleteBlock(e,i):null==t&&C.deleteBlock(e,i)}var z=i(16019),F=i(77649),P=i(28435),B=i(14636);let D=0,N=class extends o.o{constructor(){super(...arguments),this._tileFetchQueue=new c.QueueProcessor({concurrency:32,process:(e,t)=>this.fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:b.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,R.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),(0,v.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+D++}set url(e){this._set("url",(0,g.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,R.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,o=this.getTileExtentFromTileInfo(e,t,i,n);if(!o)throw new r.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return s={noClip:!0,...s},this.fetchPixels(o,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(f.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:o}=n;let{transposedVariableName:l}=t;const a=null!=o&&r&&(null!=s||(0,I.DY)(i));a&&!l&&(l=null!=i&&i.length>0?i[0].variableName??void 0:o.variables[0].name,t={...t,transposedVariableName:l}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=n,{datumTransformation:d}=t;let m=(0,R._I)(e,c,d);if(!u.intersects(m))return{location:m,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(m);if(!n.nativeExtent.intersects(e))return{location:e,value:null};m=e}let g=0;const y=null!=l&&null!=o&&n.hasMultidimensionalTranspose;if((0,v.qg)(this)){const e=this.primaryRasters.rasters[0];if(y)return e.identify(m,t);const{pixelSize:s}=n,r=3,o=s.x*r/2,l=s.y*r/2,a=new p.A({xmin:m.x-o,xmax:m.x+o,ymin:m.y-l,ymax:m.y+l,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:h}=await e.fetchPixels(a,r,r,u),{pixelBlock:d}=await this.fetchPixels(a,r,r,u);if(null==h)return{location:m,value:null};const f=Math.floor(r*r*.5),g=!h.mask||h.mask[f]?h.pixels.map(e=>e[f]):null;let x;return null!=d&&(x=!d.mask||d.mask[f]?d.pixels.map(e=>e[f]):void 0),{location:m,value:g,processedValue:x,pyramidLevel:0}}if(!y)if(t.srcResolution)g=(0,R.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(g=await this.computeBestPyramidLevelForLocation(e,t),null==g)return{location:m,value:null};const x=this.identifyPixelLocation(m,g,null,y);if(null===x)return{location:m,value:null};const{row:_,col:w,rowOffset:b,colOffset:S,blockWidth:C}=x,k=await this._fetchRawTile(g,_,w,t);if(!k?.pixels?.length)return{location:m,value:null};const M=b*C+S;return this._processIdentifyResult(k,{srcLocation:m,position:M,pyramidLevel:g,useTransposedTile:!!y,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,R.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,R.FT)(e.spatialReference),o=(0,R.OM)(e);if(null==r||0===o||1===o&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,s);if(o>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,u=Math.round(r/(c-a)*t),h=u-Math.round((r/2-a)/(c-a)*t);let d=0;const f=[];for(let n=0;n<=o;n++){const m=new p.A({xmin:0===n?a:-r/2,xmax:n===o?c-r*n:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),g=0===n?u-h:n===o?t-d:u;d+=g,f.push(g);const y=s.disableWrapAround&&n>0?null:this._fetchPixels(m,g,i,s);l.push(y)}const m=(await Promise.all(l)).map(e=>e?.pixelBlock);let g=null;const y={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,P.z7)(m,y,{blockWidths:f}),{extent:e,srcExtent:(0,R._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:g}}async fetchRawPixels(e,t,i,s={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const n=await this._fetchRawTiles(e,t,i,s),{nativeExtent:r,nativePixelSize:o,storageInfo:l}=this.rasterInfo,a=2**e,c=o.x*a,u=o.y*a,h=new p.A({xmin:r.xmin+c*t.x,xmax:r.xmin+c*(t.x+i.width-1),ymin:r.ymax-u*(t.y+i.height-1),ymax:r.ymax-u*t.y,spatialReference:r.spatialReference});if(!n)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:d,mosaicSize:f}=n;if(1===d.length&&null!=d[0]&&d[0].width===i.width&&d[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,g=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%m,y:t.y%g};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:f,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,P.z7)(d,f,{clipOffset:y,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,s){throw new r.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,R._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,F.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:r,query:o,headers:l}=t;i=i??t.retryCount??this.ioConfig.retryCount;const a=r?{Range:`bytes=${r.from}-${r.to}`}:null;try{return await(0,n.A)(e,{...t,query:{...o,...s},headers:{...l,...a}})}catch(s){if(i>0)return i--,this.request(e,t,i);throw s}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,I.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size):null}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],o=e.maximumPyramidLevel||0;let l=(s.x+s.y)/2,a=1/.0254*96*l;for(let e=0;e<=o&&(r.unshift(new _.A({level:o-e,resolution:l,scale:a})),e!==o);e++)if(n){const t=(n[e].x+n[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new f.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new b.A({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:r}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,s){const{width:n,height:r,nativeExtent:o,pixelSize:l,spatialReference:a}=e,c=new f.A({x:o.xmin,y:o.ymax,spatialReference:a});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(n,r))/Math.LN2-8)));const u=this.computeBlockBoundary(o,512,512,{x:o.xmin,y:o.ymax},[l],s);e.storageInfo=new w.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:s,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,s,n,r=0,o=2){if(1===n.length&&r>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<r;i++)e*=o,t*=o,n.push({x:e,y:t})}const l=[],{x:a,y:c}=s;for(let s=0;s<n.length;s++){const{x:r,y:o}=n[s];l.push({minCol:Math.floor((e.xmin-a+.1*r)/t/r),maxCol:Math.floor((e.xmax-a-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*o)/i/o),maxRow:Math.floor((c-e.ymin-.1*o)/i/o)})}return l}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const n=s**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,s){const{spatialReference:n,nativeExtent:r,storageInfo:o}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=o,u=s&&null!=c?c.tileSize[0]:o.blockWidth,h=s&&null!=c?c.tileSize[1]:o.blockHeight,d=(0,R._I)(e,n,i);if(!r.intersects(d))return null;if(t<0||t>l)return null;const p=this.getPyramidPixelSize(t),{x:f,y:m}=p,g=(a.y-d.y)/m/h,y=(d.x-a.x)/f/u,x=Math.min(h-1,Math.floor((g-Math.floor(g))*h)),_=Math.min(u-1,Math.floor((y-Math.floor(y))*u));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(y),rowOffset:x,colOffset:_,blockWidth:u,srcLocation:d}}getTileExtent(e,t,i,s,n,r){const[o,l]=r,a=s.x+i*o*e.x,c=a+o*e.x,u=s.y-t*l*e.y,h=u-l*e.y;return new p.A({xmin:a,xmax:c,ymin:h,ymax:u,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];return!s||s.maxRow<t||s.maxCol<i||s.minRow>t||s.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:s}=e,n=m.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new p.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new f.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:o}=e;if(o){o.origin=new f.A({x:r.xmin,y:r.ymax,spatialReference:n});const{pyramidResolutions:i,tileInfo:s}=o;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),s){s.origin=o.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;s.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _fetchPixels(e,t,i,s={}){let n=(0,R.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:o,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:d}=this,p=d.transform,m="gcs-shift"===p?.type,g=null!=(0,R.FT)(e.spatialReference);!m&&g||(n=(0,R.OM)(r.srcExtent,m));const y=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:n},s);if(!y)return{extent:e,srcExtent:a,pixelBlock:null};const x=d.storageInfo,_=o>0?x.pyramidBlockWidth:x.blockWidth,w=o>0?x.pyramidBlockHeight:x.blockHeight;let{x:b,y:v}=d.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[o-1])({x:b,y:v}=e[o-1]);else{const e=t**o;b*=e,v*=e}}const I=d.spatialReference,S=new f.A({x:b,y:v,spatialReference:I}),C=_===c&&w===u&&h.x%_===0&&h.y%w===0,k=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),M=!e.spatialReference.equals(I),T=I.isGeographic?1e-9:1e-4,{datumTransformation:A}=s;if(!M&&C&&1===y.pixelBlocks.length&&_===t&&w===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,k,T))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:y.pixelBlocks[0]};const z=g&&null!=(0,R.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,F=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");F&&!this.rasterJobHandler&&await(0,R.Hh)();const D=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:k.toJSON(),datumTransformation:A,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:F},s):(0,R.l0)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:k,datumTransformation:A,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1,includeGCSGrid:F});let N;const J=!s.requestRawData,O={rows:D.spacing[0],cols:D.spacing[1]},H=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,y.extent.xmin):void 0,{pixelBlocks:E,mosaicSize:L,isPartiallyFilled:q}=y;let Z=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:L,destDimension:J?{width:t,height:i}:null,coefs:J?D.coefficients:null,sampleSpacing:J?O:null,projectDirections:F,gcsGrid:F?D.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:H,blockWidths:null},s);({pixelBlock:N,localNorthDirections:Z}=e)}else{const e=(0,P.z7)(E,L,{alignmentInfo:H});N=J?(0,P.$i)(e,{width:t,height:i},D.coefficients,O,s.interpolation):e,F&&D.gcsGrid&&(Z=(0,P.QF)({width:t,height:i},D.gcsGrid),N=(0,B.Y2)(N,this.rasterInfo.dataType,Z))}return s.requestRawData||F?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N,transformGrid:D,localNorthDirections:Z,isPartiallyFilled:q}:{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N}}async _fetchRawTiles(e,t,i,s){const{origin:n,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:o,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:u,height:h,wrapCount:d}=i;const f=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(a-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let m=0,g=0,y=0;d&&null!=f&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=f),g*f.blockWidth-m>=a+u&&(m=0));const x=Math.floor(a/o),_=Math.floor(c/l),w=Math.floor((a+u+m-1)/o),b=Math.floor((c+h+m-1)/l),v=r[e];if(!v)return null;const{minRow:I,minCol:R,maxCol:S,maxRow:C}=v;if(0===d&&(b<I||w<R||_>C||x>S))return null;const k=new Array;let M=!1;const T=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=b;t++)for(let i=x;i<=w;i++){let n=i;if(!s.disableWrapAround&&d&&null!=f&&g<=i&&(n=i-g-y),t>=I&&n>=R&&C>=t&&S>=n){const i=this._fetchRawTile(e,t,n,s);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;const A=await Promise.all(k),z={height:(b-_+1)*l,width:(w-x+1)*o},{spatialReference:F}=this.rasterInfo,P=this.getPyramidPixelSize(e),{x:B,y:D}=P;return{extent:new p.A({xmin:n.x+x*o*B,xmax:n.x+(w+1)*o*B,ymin:n.y-(b+1)*l*D,ymax:n.y-_*l*D,spatialReference:F}),pixelBlocks:A,mosaicSize:z,isPartiallyFilled:M}}_fetchRawTile(e,t,i,s){const{storageInfo:n}=this.rasterInfo,r=null!=n.transposeInfo&&!!s.transposedVariableName;if(!r){const s=n.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:r,minCol:o,maxCol:l,maxRow:a}=s;if(t<r||i<o||t>a||i>l)return Promise.resolve(null)}const o=r?s.transposeVariableName:s.sliceId,l=n.isBsqTile?s.bandIds:null,c=function(e,t,i){const s=[];return null!=t&&s.push(`sliceId=${t}`),null!=i&&s.push(`bandIds=${i.join(",")}`),s.length?`${e}?${s.join("&")}`:e}(this.rasterId,o,l),u=`${e}/${t}/${i}`;let h=M(c,s.registryId,u);if(null==h){const r=new AbortController,o=s.bandIds?.slice();if(o?.length&&n.isBsqTile){const n=new Set(o),l=[],a=Array.from(n);for(const n of o)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...s,bandIds:[n]}},{signal:r.signal}));h=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(a.length!==o.length){const t=[];for(const i of o){let s=e[a.indexOf(i)];t.includes(s)&&(s=s.clone()),t.push(s)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:r.signal,transferPixelsToWorker:!0}):(0,P.Wy)(e)})}else h=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:s},{signal:r.signal});T(c,s.registryId,u,h,r),h.catch(()=>A(c,s.registryId,u))}return s.signal&&(0,a.u7)(s,()=>{k(c,s.registryId,u)}),h}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const s=e[0].length;if("vector-magdir"===i){const t=e[1].map(e=>(e+360)%360);return[e[0],t]}const[n,r]=e,o=[],l=[];for(let e=0;e<s;e++){const[t,i]=(0,B.Lu)([n[e],r[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,R.DO)(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,s={}){const n={datumTransformation:s.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};s.srcResolution&&(n.srcResolution=s.srcResolution,this._updateSourceDataInfo(e,n));const r=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:o,srcHeight:l,pyramidLevel:a}=n,c=o/t,u=l/i,h=a<r&&c*u>=16,d=a===r&&this._requireTooManySrcTiles(o,l,t,i);if(h||d||0===o||0===l){const o=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,R.Wo)(o,this.rasterInfo.spatialReference,e,n.datumTransformation);const d=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&d){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-a+3>=e){const t=2**e;l={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}l&&(n.srcResolution=l,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,s){const{tileInfo:n}=this.rasterInfo.storageInfo,r=e/i,o=t/s;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+s)/1024)||r>8||o>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:n,datumTransformation:r}=t,{pyramidLevel:o,pyramidResolution:l,excessiveReading:a}=(0,R.t$)(n,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,R._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{origin:h}=i.storageInfo,{width:d,height:p,ul:f}=(0,v.$g)(c,h,l,o);t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=d,t.srcHeight=p,t.ul=f}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:s,pyramidLevel:n,useTransposedTile:r}=t,o=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!r){const t=e.pixels.map(e=>e[s]),r={location:i,value:t,pyramidLevel:n},o=this._computeMagDirValues(t.map(e=>[e]));return o?.length&&(r.magdirValue=o.map(e=>e[0])),r}let a=e.pixels.map(e=>e.slice(s*o,s*o+o)),c=this._computeMagDirValues(a);const{requestSomeSlices:u,identifyOptions:h}=t;let d=(0,I.QW)(l,h.transposedVariableName);if(u){const e=(0,I.xx)(d,h.multidimensionalDefinition,h.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}const p=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=p&&((0,z.Sp)(f,p),m=f.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{const i={value:0===m?.[t]?null:a.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new x.A({...e,isSlice:!0}))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i}),pyramidLevel:n}}};(0,s.Cg)([(0,u.MZ)()],N.prototype,"_rasterTileAlignmentInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"_tileFetchQueue",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"_isGlobalWrappableSource",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s.Cg)([(0,u.MZ)()],N.prototype,"_openPromise",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"rasterJobHandler",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"rasterId",null),(0,s.Cg)([(0,u.MZ)(y.OZ)],N.prototype,"url",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],N.prototype,"datasetName",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],N.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"ioConfig",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"sourceJSON",void 0),N=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.BaseRaster")],N)},32587:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(62788),n=i(95488);class r{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach((i,s)=>e.call(t,i,s,this),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,i)=>{i.d(t,{v:()=>l});var s=i(4718),n=i(62788),r=i(95488);class o{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function l(e,t=s.gh){return new o(e,t)}},50103:(e,t,i)=>{function s(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const r=s(e,i);for(let e=0;e<r.length;e++)s(r[e],t).forEach(e=>n.push(e));return n}const r=e.getElementsByTagNameNS("*",i);if(!r||0===r.length)return[];for(let e=0;e<r.length;e++)n.push(r[e]||r.item(e));return n}function n(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=s(e,i);return r.length>0?t?n(r[0],t):r[0]:null}function r(e,t=null){const i=t?n(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function o(e,t){const i=s(e,t),n=[];let r;for(let e=0;e<i.length;e++)r=i[e].textContent||i[e].nodeValue,r&&(r=r.trim(),""!==r&&n.push(r));return n}function l(e,t=null){const i=r(e,t);return i?.split(" ").map(e=>Number(e))??[]}function a(e,t){return o(e,t).map(e=>Number(e))}function c(e,t){const i=r(e,t);return Number(i)}function u(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>o,IC:()=>s,Ui:()=>a,V6:()=>n,g7:()=>u,mX:()=>r,pN:()=>l,v7:()=>c,vv:()=>h})},72802:(e,t,i)=>{i.d(t,{U:()=>n});var s=i(19419);class n{constructor(e,t,i,n=(0,s.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}},84169:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(31635),n=i(49186),r=i(10107),o=(i(44208),i(53966),i(87811),i(64108)),l=i(39829),a=i(4916),c=i(77359),u=i(28435),h=i(70834),d=i(22671);let p=class extends a.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,s={}){const{rasters:n,rasterIds:r}=this.primaryRasters;let o=!1;const{interpolation:l}=s,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&a&&(o=1===n.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:o}),s.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(o=!1,s={...s,requestRawData:!1});const h=n.map(n=>n.fetchPixels(e,t,i,s)),d=await Promise.all(h),p=d.map(e=>e.pixelBlock),f=o||s.requestRawData?d.map(e=>e.srcTilePixelSize):null;if(s.skipRasterFunction||p.every(e=>null==e))return d[0];const m=d.find(e=>null!=e.pixelBlock)?.extent??e;let g=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:y}=d[0];if(!o||null==g||null==y){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return!s.noClip&&null!=g&&e&&(g=await(0,c.$Q)(g,m,e)),{...d[0],pixelBlock:g}}const x={rows:y.spacing[0],cols:y.spacing[1]};let _;_=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[g],srcMosaicSize:{width:g.width,height:g.height},destDimension:{width:t,height:i},coefs:y.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:l,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,u.$i)(g,{width:t,height:i},y.coefficients,x,l);const w=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||null==_||null==w||(_=await(0,c.$Q)(_,e,w)),{extent:e,srcExtent:d[0].srcExtent,pixelBlock:_}}getClippingGeometry(e){const t=this._clippingGeometry.get("0");if(!e||!t)return t;const i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e);let s=this._clippingGeometry.get(i);return null!=s||(s=e.equals(t.spatialReference)?t:(0,h.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach(e=>e.rasterJobHandler=this.rasterJobHandler));const{rasters:i,rasterIds:s}=this.primaryRasters,r=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(r);const o=i.map(({rasterInfo:e})=>e),l=t.bind({rasterInfos:o,rasterIds:s});if(t.rawSourceRasterInfos=o,!l.success||0===o.length)throw new n.A("raster-function:open",`cannot bind the function: ${l.error??""}`);const a="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===a?.functionName&&(t.rasterInfo.attributeTable=d.A.fromJSON(a.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=o[0];this.hasUniqueSourceStorageInfo=1===o.length||o.slice(1).every(e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:n,extent:r}=e,{storageInfo:o,pixelSize:l,spatialReference:a,extent:c}=t;return s.x===l.x&&s.y===l.y&&n.equals(a)&&r.equals(c)&&i.blockHeight===o.blockHeight&&i.blockWidth===o.blockWidth&&i.maximumPyramidLevel===o.maximumPyramidLevel&&i.firstPyramidLevel===o.firstPyramidLevel&&i.pyramidBlockWidth===o.pyramidBlockWidth&&i.pyramidBlockHeight===o.pyramidBlockHeight&&i.pyramidScalingFactor===o.pyramidScalingFactor}(e,c)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){const{extent:e}=this.rasterInfo,s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),n=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(3054)]).then(i.bind(i,93054));let r=s.execute(l.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,h.uk)(r,t.spatialReference),t=n.execute(r,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,r.MZ)()],p.prototype,"tileType",void 0),(0,s.Cg)([(0,r.MZ)()],p.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,r.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,s.Cg)([(0,o.$)("esri.layers.support.rasterDatasets.FunctionRaster")],p)},87045:(e,t,i)=>{i.d(t,{A:()=>w});var s,n=i(31635),r=i(66552),o=i(25482),l=i(83047),a=i(10107),c=i(56507),u=(i(44208),i(87811),i(36005)),h=i(64108),d=i(43937),p=i(86738),f=i(16930),m=i(21325),g=i(28735),y=i(91806),x=i(72802);const _=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=f.A.WebMercator,numLODs:o=24}=e;if(!(0,m.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new y.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new y.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const a=(0,m.Vp)(r),c=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,l.GA)(r)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*u;h.push(new y.A({level:e,scale:t,resolution:s}))}else{let e=(0,m.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);h.push(new y.A({level:0,scale:e,resolution:e*u}));for(let s=1;s<i;s++){const i=e/2**t,n=i*u;h.push(new y.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:h,origin:c,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e})),this._set("scales",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],n=t[s+1];if(i<=e)return s;if(n===e)return s+1;if(i>e&&n<e)return s+Math.log(i/e)/Math.log(i/n)}return s}tileAt(e,t,i,s){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,s=i}const l=n.resolution*this.size[0],a=n.resolution*this.size[1];return s??=new x.U(0,0,0),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((r-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+r,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,n=s*this.size[0],r=s*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],n=this.lods.length-t;for(let e=0;e<n;e++){const s=e+t,{scale:n,resolution:r}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new y.A({level:e,scale:n,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n.Cg)([(0,a.MZ)({type:p.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,n.Cg)([(0,u.w)("origin")],w.prototype,"readOrigin",null),(0,n.Cg)([(0,a.MZ)({type:[y.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,n.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n.Cg)([(0,u.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n.Cg)([(0,d.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,n.Cg)([(0,a.MZ)({type:f.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=s=(0,n.Cg)([(0,h.$)("esri.layers.support.TileInfo")],w)},89015:(e,t,i)=>{i.d(t,{o:()=>N});var s=i(31635),n=i(78888),r=i(49186),o=i(53966),l=i(10107),a=i(56507),c=(i(44208),i(87811),i(93223)),u=i(36005),h=i(64108),d=i(86738),p=i(16930),f=i(21325),m=i(60694),g=i(10873),y=i(45617),x=i(43577),_=i(13868),w=i(22796),b=i(87045),v=i(76353),I=i(84169),R=i(77301),S=i(77359),C=i(6049),k=i(70834),M=i(6952),T=i(12711),A=i(85676),z=i(94359),F=i(22048),P=i(49410),B=i(34606),D=i(51508);const N=e=>{const t=e;let N=class extends t{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,v.qg)(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,m.Jf)(e,o.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const s=t?.layerDefinition?.drawingInfo?.renderer;return(0,z.LF)(s,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(F.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:o}=i;if(!s.spatialReference.equals(o)){await(0,k.Hh)();const e="extent"===s.type?(0,k._l)(s,o):(0,k.uk)(s,o);if(null==e)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new d.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:c,width:u,height:h}=(0,S.b7)(i,n,l),p=await this.fetchPixels(c,u,h,{...t,interpolation:"nearest"});if(null==p.pixelBlock)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,S.$Q)(p.pixelBlock,c,n),m=this._rasterJobHandler;return m?m.computeStatisticsHistograms({pixelBlock:f},t):(0,M.eH)(f)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,R.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:s}=this.raster,n=(0,R.ct)(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=n?.name,o=(0,T.m7)(s,r);return this._updateSymbolizer(t,i,r,o)}async applyRenderer(e,t,i){const s=e?.pixelBlock;if(!(null!=s&&s.pixels&&s.pixels.length>0))return null;await this.updateRenderer();const n=this.bandIds??[],{pixelBlock:r}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return r}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,v.qg)(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const s=(0,f.Vp)(e);return b.A.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,s={}){if(J(this),s.requestAsImageElement){const r=this.getTileUrl(e,t,i);return(0,n.A)(r,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const n=s.tileInfo||r.storageInfo.tileInfo,o=this.raster.getTileExtentFromTileInfo(e,t,i,n);if(o)return{extent:o,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,i,s)}async fetchPixels(e,t,i,s={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const n=await this.raster.fetchPixels(e,t,i,s);return s.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(s.bandIds)),n}async getSamples(e,t){if(await this.load(),(e=(0,a.PZ)(B.A,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new r.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const i=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:i},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),o=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new D.A({samples:o})}async identify(e,t={}){await this.load();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&(!s.hasMultidimensionalTranspose||!(0,R.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null};const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new r.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=(0,v.qg)(i)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return i.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date((0,R.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,R.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,R.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,v.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;J(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,v.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:s,type:n}=t;if("multipoint"===n)return t.points.map(e=>new d.A({x:e[0],y:e[1],spatialReference:s}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){const s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),r=(await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(4929)]).then(i.bind(i,965))).execute(t,{unit:"meters"}),o=Math.min(e.sampleCount||100,1e3);let l=e.sampleDistance;l||(l=r/(o+(2===n.paths[0].length?1:0))),n=s.execute(t,l,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new d.A({x:e[0],y:e[1],spatialReference:s})))}const r=Math.min(e.sampleCount||100,1e3),o="extent"===t.type,l=o?t:t.extent,a=Math.sqrt(l.width*l.height/r),c=l.height/a,u=l.width/a,{xmin:h,ymax:p}=l,f=[];for(let e=0;e<c;e++)for(let i=0;i<u;i++){const n=new d.A({x:h+(i+.5)*a,y:p-(e+.5)*a,spatialReference:s});(o||t.contains(n))&&f.push(n)}return f}_configDefaultInterpolation(){if(null==this.interpolation){J(this);const{raster:e}=this,t=(0,T.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){J(this);const{rasterInfo:t}=this.raster,i=(0,R.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=(0,T.I8)({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,T.ci)(t)),!this.renderer||"override"===e){const e=(0,T.Mm)(this.raster),i=n?.renderer??(0,T.PD)(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,l=o?.max??0,a=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(l>1e24||a<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const r=(0,T.$P)({...this.renderer.toJSON(),variableName:s}),l=(0,T.m7)(t,s);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=l):this.symbolizer=new A.A({rendererJSON:r,rasterInfo:l});const a=this.symbolizer.bind();if(a.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,T.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else o.A.getLogger(this).warn("imagery-tile-mixin",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,v.qg)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",w.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,v.qg)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:s}=this;if(s){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const n=(0,C.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new I.A({rasterFunction:n});r.rasterJobHandler=this._rasterJobHandler,await r.open(),this.raster=r}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!s)return;const{bandIds:n}=this,{bandCount:r}=this.raster.rasterInfo,o=n?.length?n.some(e=>e>=r):r>=3;n&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,s=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*s;if(!e.dataSeries?.length)return[new P.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];const r=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:s},o)=>{const l={Variables:s[0].variableName,Dimensions:s.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of s){l[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];l[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const a=new P.A({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:n,attributes:l});r.push(a)}),r}};function J(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}return(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_cachedRasterFunctionJson",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_compatibleFullExtent",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_rasterFunctionUpdatePromise",void 0),(0,s.Cg)([(0,l.MZ)({type:[a.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],N.prototype,"bandIds",void 0),(0,s.Cg)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],N.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1}})],N.prototype,"fullExtent",null),(0,s.Cg)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,c.e)(_.SZ)],N.prototype,"interpolation",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"ioConfig",void 0),(0,s.Cg)([(0,l.MZ)({type:[y.A],json:{write:!0}})],N.prototype,"multidimensionalDefinition",null),(0,s.Cg)([(0,l.MZ)({type:x.A,json:{write:!0}})],N.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"raster",void 0),(0,s.Cg)([(0,l.MZ)({type:w.A})],N.prototype,"rasterFunction",null),(0,s.Cg)([(0,l.MZ)()],N.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:p.A,json:{read:!1}})],N.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)({type:b.A})],N.prototype,"tileInfo",void 0),(0,s.Cg)([(0,l.MZ)(g.OZ)],N.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],N.prototype,"renderer",null),(0,s.Cg)([(0,l.MZ)({types:z.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:z.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],N.prototype,"internalRenderer",null),(0,s.Cg)([(0,u.w)("internalRenderer")],N.prototype,"readRenderer",null),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"symbolizer",void 0),N=(0,s.Cg)([(0,h.$)("esri.layers.mixins.ImageryTileMixin")],N),N}},91806:(e,t,i)=>{i.d(t,{A:()=>c});var s,n=i(31635),r=i(25482),o=i(10107),l=i(56507),a=(i(44208),i(87811),i(64108));let c=class extends r.o{static{s=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,n.Cg)([(0,o.MZ)({type:l.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=s=(0,n.Cg)([(0,a.$)("esri.layers.support.LOD")],c)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1698,7375],{21015:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(78888),o=r(60999),s=r(49186),a=r(74887),i=r(84952);class u{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load(0,e,t)}async loadBinary(e,t){return(0,i.DB)(e)?((0,a.Te)(t),(0,i.lJ)(e)):this._load(1,e,t)}async loadImage(e,t){return this._load(2,e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:l[e]})).data;const i=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===i.ok)return i.value;throw(0,a.QP)(i.error),new s.A("gltf-loader-request-error",`Request for resource failed: ${i.error}`)}}const l={2:"image",1:"array-buffer",0:"json",3:void 0}},24045:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:n},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>a,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let a=0,i=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[a]=t[i],e[a+1]=t[i+1],a+=r,i+=o;return}const u=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[a]=Math.max(t[i]/u,-1),e[a+1]=Math.max(t[i+1]/u,-1),a+=r,i+=o;else for(let n=0;n<s;++n)e[a]=t[i]/u,e[a+1]=t[i+1]/u,a+=r,i+=o}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},46140:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(49186);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,s]=t.split("."),a=/^\s*\d+\s*$/;if(!o?.match||!a.test(o))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const i=parseInt(o,10),u=parseInt(s,10);return new e(i,u,r)}}},51530:(e,t,r)=>{r.d(t,{KB:()=>a,Xi:()=>o,pn:()=>i,x3:()=>s});var n=r(44208);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function s(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function i(e,t){if("image/ktx2"===t)return new o(e);const r=new Blob([e],{type:t});let s=URL.createObjectURL(r);switch(t){case"image/jpeg":s+="#.jpg";break;case"image/png":s+="#.png"}const a=new Image;if((0,n.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{o(),e(a)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(s),a.removeEventListener("load",r),a.removeEventListener("error",n)};a.addEventListener("load",r),a.addEventListener("error",n),a.src=s});try{a.src=s,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(s),a}},51698:(e,t,r)=>{r.d(t,{loadGLTF:()=>H});var n=r(53966),o=r(93637),s=r(9093),a=r(49186),i=r(91869),u=r(74887),l=r(84952),c=r(46140),f=r(58083),d=r(67026),p=r(82534),m=r(13030),h=r(24045),T=(r(44208),r(2741));let _;function y(){return _??=(async()=>{const{default:e}=await r.e(2423).then(r.bind(r,2423));return await e({locateFile:e=>(0,T.s)(`esri/libs/dracoMeshDecoder/${e}`)})})(),_}class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}var w=r(21818);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},x={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},S={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},R=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,w.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...S,...e.extras});return{...x,...e,pbrMetallicRoughness:t,extras:r}},A={magFilter:9729,minFilter:9987,wrapS:10497,wrapT:10497},E=e=>({...A,...e});var O=r(51530),N=r(63907);const I=1179937895;class v{constructor(e,t,r,n){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=n,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._dracoBuffersSize=0,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform","KHR_draco_mesh_compression"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,(e,n,o)=>(t=n||"",r=o||"","")),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new a.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new a.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new a.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,l.DB)(t)){const r=(0,l.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const n=JSON.parse(r.isBase64?atob(r.data):r.data);return new v(e,t,n)}catch{}const n=(0,l.lJ)(t);if(v._isGLBData(n))return this._fromGLBData(e,t,n)}if(F.test(t)||"gltf"===r?.expectedType){const n=await e.loadJSON(t,r);return new v(e,t,n)}const n=await e.loadBinary(t,r);if(v._isGLBData(n))return this._fromGLBData(e,t,n);if(P.test(t)||"glb"===r?.expectedType)throw new a.A("gltf-loader-invalid-glb","This is not a valid glb file.");const o=await e.loadJSON(t,r);return new v(e,t,o)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===I}static async _fromGLBData(e,t,r){const n=await v._parseGLBData(r);return new v(e,t,n.json,n.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new a.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),s=t.readUint32();if(r!==I)throw new a.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<s)throw new a.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new a.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let i,u,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new a.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new a.A("gltf-loader-error","No JSON data found.");i=await(0,O.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new a.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");u=t.readUint8Array(e)}else n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!i)throw new a.A("gltf-loader-error","No glb JSON chunk detected.");return{json:i,binaryData:u}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new a.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const n=await this._getBufferLoader(e,t);if(n.byteLength!==r.byteLength)throw new a.A("gltf-loader-error","Buffer byte lengths should match.");return n}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,o),o}_validateAccessor(e){if(!this.json.accessors)throw new a.A("gltf-loader-unsupported-feature","Accessors missing.");const t=this.json.accessors[e];if(t.type in["MAT2","MAT3","MAT4"])throw new a.A("gltf-loader-unsupported-feature",`AttributeType ${t.type} is not supported`);return t}_getComponentInfo(e,t){const r=L[e.type],n=t?.componentType||e.componentType,o=D[n];return{componentType:n,componentCount:r,componentByteSize:o,denseByteStride:r*o}}getDracoAccessor(e,t){const r=this._validateAccessor(e),n=t.accessorInfos.get(e),{componentType:o,componentCount:s,componentByteSize:a,denseByteStride:i}=this._getComponentInfo(r,n);return{raw:t.data.buffer,byteStride:i,byteOffset:t.data.byteOffset+(n?.byteOffset||0),entryCount:n?.count??r.count,isDenselyPacked:!0,componentCount:s,componentByteSize:a,componentType:o,min:r.min,max:r.max,normalized:!!r.normalized}}async getAccessor(e,t){const r=this._validateAccessor(e);if(null==r?.bufferView)throw new a.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");const{componentCount:n,componentByteSize:o,denseByteStride:s}=this._getComponentInfo(r),i=this.json.bufferViews[r.bufferView],u=await this.getBuffer(i.buffer,t),l=i.byteStride||s;return{raw:u.buffer,byteStride:l,byteOffset:u.byteOffset+(i.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===s,componentCount:n,componentByteSize:o,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t,r){if(null==e.indices)return;const n=e.indices,o=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(o.isDenselyPacked)switch(o.componentType){case N.pe.UNSIGNED_BYTE:return new Uint8Array(o.raw,o.byteOffset,o.entryCount);case N.pe.UNSIGNED_SHORT:return new Uint16Array(o.raw,o.byteOffset,o.entryCount);case N.pe.UNSIGNED_INT:return new Uint32Array(o.raw,o.byteOffset,o.entryCount)}else switch(o.componentType){case N.pe.UNSIGNED_BYTE:return(0,h.m)(M(m.SL,o));case N.pe.UNSIGNED_SHORT:return(0,h.m)(M(m.h,o));case N.pe.UNSIGNED_INT:return(0,h.m)(M(m.P,o))}}async getPositionData(e,t,r){if(null==e.attributes.POSITION)throw new a.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const n=e.attributes.POSITION,s=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+(0,o.i7)(N.pe,s.componentType));if(3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+s.componentCount.toFixed());return M(m.xs,s)}async getNormalData(e,t,r){if(null==e.attributes.NORMAL)throw new a.A("gltf-loader-error","No NORMAL vertex data found.");const n=e.attributes.NORMAL,s=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+(0,o.i7)(N.pe,s.componentType));if(3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+s.componentCount.toFixed());return M(m.xs,s)}async getTangentData(e,t,r){if(null==e.attributes.TANGENT)throw new a.A("gltf-loader-error","No TANGENT vertex data found.");const n=e.attributes.TANGENT,s=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(s.componentType!==N.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+(0,o.i7)(N.pe,s.componentType));if(4!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+s.componentCount.toFixed());return M(m.Eq,s)}async getTextureCoordinates(e,t,r){if(null==e.attributes.TEXCOORD_0)throw new a.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const n=e.attributes.TEXCOORD_0,o=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(2!==o.componentCount)throw new a.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+o.componentCount.toFixed());if(o.componentType===N.pe.FLOAT)return M(m.gH,o);if(!o.normalized)throw new a.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case N.pe.BYTE:return new m.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_BYTE:return new m.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.SHORT:return new m.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_SHORT:return new m.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.UNSIGNED_INT:return new m.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case N.pe.FLOAT:return new m.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(o)}async getVertexColors(e,t,r){if(null==e.attributes.COLOR_0)throw new a.A("gltf-loader-error","No COLOR_0 vertex data found.");const n=e.attributes.COLOR_0,s=r?this.getDracoAccessor(n,r):await this.getAccessor(n,t);if(4!==s.componentCount&&3!==s.componentCount)throw new a.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+s.componentCount.toFixed());if(4===s.componentCount){if(s.componentType===N.pe.FLOAT)return M(m.Eq,s);if(s.componentType===N.pe.UNSIGNED_BYTE)return M(m.XP,s);if(s.componentType===N.pe.UNSIGNED_SHORT)return M(m.Uz,s)}else if(3===s.componentCount){if(s.componentType===N.pe.FLOAT)return M(m.xs,s);if(s.componentType===N.pe.UNSIGNED_BYTE)return M(m.eI,s);if(s.componentType===N.pe.UNSIGNED_SHORT)return M(m.nS,s)}throw new a.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+(0,o.i7)(N.pe,s.componentType))}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?R(this.json.materials[e.material]):R(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),l=r?this.getTexture(o.occlusionTexture,t):void 0,c=r?this.getTexture(o.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:o.extras.ESRI_receiveAmbientOcclusion,receiveShadows:o.extras.ESRI_receiveShadows}}return n}async decode(e,t){const r=e.extensions?.KHR_draco_mesh_compression;if(!r)return;if(null==e.indices)throw new a.A("gltf-loader-error","Found Draco compressed primitive without indices.");const n=this.json.bufferViews[r.bufferView],o=await this.getBuffer(n.buffer,t),s=(await y()).decode(new Uint8Array(o.buffer,o.byteOffset+(n.byteOffset||0),n.byteLength));this._bufferLoaders.delete(n.buffer);const i=new Map([[e.indices,s.indices],[e.attributes.POSITION,s.positions]]);return e.attributes.TEXCOORD_0&&i.set(e.attributes.TEXCOORD_0,s.uvs),e.attributes.NORMAL&&i.set(e.attributes.NORMAL,s.normals),e.attributes.COLOR_0&&i.set(e.attributes.COLOR_0,s.colors),e.attributes.TANGENT&&i.set(e.attributes.TANGENT,s.tangents),this._dracoBuffersSize+=s.buffer.byteLength,{data:s.buffer,accessorInfos:i}}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new a.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,n=this.json.textures[r],o=E(null!=n.sampler?this.json.samplers[n.sampler]:{}),s=U(n),u=this.json.images[s],l=await this._loadTextureImageData(r,n,t);return(0,i.tE)(this._textureCache,r,()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new a.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:l,wrapS:e(o.wrapS)?o.wrapS:t(o.wrapS),wrapT:e(o.wrapT)?o.wrapT:t(o.wrapT),minFilter:o.minFilter,name:u.name,id:r}})}getNodeTransform(e){if(void 0===e)return C;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,f.lw)((0,s.vt)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,s.o8)(r),n.translation&&(0,f.Tl)(t,t,n.translation),n.rotation&&(G[3]=(0,d.Xd)(G,n.rotation),(0,f.e$)(t,t,G[3],G)),n.scale&&(0,f.hs)(t,t,n.scale)):t=(0,s.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,l.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=c.R.parse(this.json.asset.version,"glTF");B.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new a.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){const r=U(e),n=this.json.images[r];if(n.uri){if(n.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(n.uri),t);return new O.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(n.uri),t)}if(null==n.bufferView)throw new a.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==n.mimeType)throw new a.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const o=this.json.bufferViews[n.bufferView],s=await this.getBuffer(o.buffer,t);if(null!=o.byteStride)throw new a.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const i=s.byteOffset+(o.byteOffset||0);return(0,O.pn)(new Uint8Array(s.buffer,i,o.byteLength),n.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,u.nA)(Array.from(this._bufferLoaders.values())),t=await(0,u.nA)(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+this._dracoBuffersSize+t.reduce((e,t)=>e+(t?(0,O.x3)(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const C=(0,f.hM)((0,s.vt)(),Math.PI/2),B=new c.R(2,0,"glTF"),G=(0,p.vt)(),L={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},D={[N.pe.BYTE]:1,[N.pe.UNSIGNED_BYTE]:1,[N.pe.SHORT]:2,[N.pe.UNSIGNED_SHORT]:2,[N.pe.HALF_FLOAT]:2,[N.pe.FLOAT]:4,[N.pe.INT]:4,[N.pe.UNSIGNED_INT]:4};function M(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function U(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new a.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const F=/\.gltf$/i,P=/\.glb$/i;let j=0;async function H(e,t,r={},a=!0){const i=await v.load(e,t,r),u="gltf_"+j++,l={lods:[],materials:new Map,textures:new Map,meta:$(i)},c=!(!i.json.asset.extras||"symbolResource"!==i.json.asset.extras.ESRI_type),f=i.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;let p=!1;await k(i,async(e,t,c,f)=>{const m=d.get(c)??0;d.set(c,m+1);const h=void 0!==e.mode?e.mode:N.WR.TRIANGLES,T=h===N.WR.TRIANGLES||h===N.WR.TRIANGLE_STRIP||h===N.WR.TRIANGLE_FAN?h:null;if(null==T)return void n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+(0,o.i7)(N.WR,h)+"). Skipping primitive.");if(!i.hasPositions(e))return void n.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const _=await i.decode(e,r);p||=!!_;const y=i.getPositionData(e,r,_),g=i.getMaterial(e,r,a),w=i.hasNormals(e)?i.getNormalData(e,r,_):null,b=i.hasTangents(e)?i.getTangentData(e,r,_):null,x=i.hasTextureCoordinates(e)?i.getTextureCoordinates(e,r,_):null,S=i.hasVertexColors(e)?i.getVertexColors(e,r,_):null,R=i.getIndexData(e,r,_),A={name:f,transform:(0,s.o8)(t),attributes:{position:await y,normal:w?await w:null,texCoord0:x?await x:null,color:S?await S:null,tangent:b?await b:null},indices:await R,primitiveType:T,material:z(l,await g,u)};let E=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(E=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:E},l.lods[c].parts[m]=A});for(const e of l.lods)e.parts=e.parts.filter(e=>!!e);const m=await i.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:i.uri,ESRI_webstyle:f,isDracoDecompressed:p},customMeta:{},usedMemory:m}}function $(e){const t=e.json;let r=null;return t.nodes.forEach(e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}async function k(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,s=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),V(t)&&!s&&t.extensions.MSFT_lod.ids.forEach((e,t)=>i(e,t+1))}async function i(o,s){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,s,e.name))}for(const e of u.children||[])a.push(i(e,s))}await Promise.all(a)}function V(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function z(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:10497,t:10497,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:X.has(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclusion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?n(t.colorTexture):void 0,normalTexture:t.normalTexture?n(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?n(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?n(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclusion:t.receiveAmbientOcclusion});e.materials.set(o,r)}return o}const X=new Set([9987,9985])},63907:(e,t,r)=>{r.d(t,{$0:()=>f,CQ:()=>T,Fq:()=>m,H0:()=>s,SB:()=>u,WR:()=>n,XN:()=>a,iE:()=>i,ld:()=>l,nI:()=>h,pe:()=>o,r6:()=>d,vt:()=>c,yI:()=>p});const n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},o={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},s={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(s),i={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},u={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},l={FLOAT:o.FLOAT,UNSIGNED_BYTE:o.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:o.BYTE,UNSIGNED_SHORT:o.UNSIGNED_SHORT,SHORT:o.SHORT,UNSIGNED_INT:o.UNSIGNED_INT,INT:o.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},c={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=0,d=36064,p=36065,m=36066,h=33306,T={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var n=r(34275),o=r(97146),s=r(63907);function a(e,t){switch(t){case s.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,o.tM)(e):(0,n.mg)(e)?new Uint16Array(e):e}(e);case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];n[a++]=o,n[a++]=s,n[a++]=r,s=r}return n}(e)}}},90239:(e,t,r)=>{function n(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>n})},97375:(e,t,r)=>{r.r(t),r.d(t,{loadGLTFMesh:()=>L});var n=r(68197),o=r(40876),s=r(78888),a=r(49186),i=r(91869),u=r(34727),l=r(77690),c=r(29242),f=r(51850),d=r(91829),p=r(16939),m=r(80882),h=r(35063),T=r(51147),_=r(1193),y=r(27615),g=r(13030),w=r(73354),b=r(65686),x=r(90239);Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r?.dstIndex??0)*o,l=(r?.srcIndex??0)*a;for(let e=0;e<i;++e){for(let e=0;e<9;++e)n[u+e]=s[l+e];u+=o,l+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r?.dstIndex??0)*o,l=(r?.srcIndex??0)*a;for(let e=0;e<i;++e){for(let e=0;e<16;++e)n[u+e]=s[l+e];u+=o,l+=a}}},Symbol.toStringTag,{value:"Module"})),r(24045);var S=r(43609);function R(e,t,r=3,n=r){const o=t.length/n;let s=0,a=0;for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],e[s+2]=t[a+2],s+=r,a+=n}function A(e,t,r,n,o){const s=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let u=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)s[u]=t,s[u+1]=r,s[u+2]=n,u+=a}function E(e,t,r=4){const n=t.typedBuffer,o=t.typedBufferStride,s=t.count;let a=0,i=0;for(let t=0;t<s;++t)e[a]=n[i],e[a+1]=n[i+1],e[a+2]=n[i+2],e[a+3]=n[i+3],a+=r,i+=o}function O(e,t,r,n,o,s){const a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count;let l=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[l]=t,a[l+1]=r,a[l+2]=n,a[l+3]=o,l+=i}function N(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,x.GJ)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:R,copyView:function(e,t){R(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)},fill:A},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:E,copyView:function(e,t){E(e.typedBuffer,t,e.typedBufferStride)},fill:O},Symbol.toStringTag,{value:"Module"}));var I=r(72258),v=r(21015),C=r(51698),B=r(84498),G=r(51530);async function L(e,t,r){const o=new v.R(function(e){const t=e?.resolveFile;return t?{busy:!1,request:async(e,r,n)=>{const o=t?.(e)??e,a=2===r?"image":1===r||3===r?"array-buffer":"json";return(await(0,s.A)(o,{responseType:a,signal:n?.signal,timeout:0})).data}}:null}(r)),l=await(0,C.loadGLTF)(o,t,r,!0),c=l.model,p=c.lods.shift(),w=new Map,b=new Map;c.textures.forEach((e,t)=>w.set(t,function(e){return new h.A({data:((0,G.x3)(e.data),e.data),wrap:P(e.parameters.wrap)})}(e))),c.materials.forEach((e,t)=>b.set(t,function(e,t){const r=new n.A(function(e,t){return(0,d.fA)(H(e[0]),H(e[1]),H(e[2]),t)}(e.color,e.opacity)),o=e.emissiveFactor?new n.A(function(e){return(0,f.fA)(H(e[0]),H(e[1]),H(e[2]))}(e.emissiveFactor)):null,s=e=>e?new T.A({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:(0,u.KJ)(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new m.A({color:r,colorTexture:t.get(e.colorTexture),normalTexture:t.get(e.normalTexture),emissiveColor:o,emissiveTexture:t.get(e.emissiveTexture),occlusionTexture:t.get(e.occlusionTexture),alphaMode:F(e.alphaMode),alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,metallic:e.metallicFactor,roughness:e.roughnessFactor,metallicRoughnessTexture:t.get(e.metallicRoughnessTexture),colorTextureTransform:s(e.colorTextureTransform),normalTextureTransform:s(e.normalTextureTransform),occlusionTextureTransform:s(e.occlusionTextureTransform),emissiveTextureTransform:s(e.emissiveTextureTransform),metallicRoughnessTextureTransform:s(e.metallicRoughnessTextureTransform)})}(e,w)));const x=function(e){let t=0;const r={color:!1,tangent:!1,normal:!1,texCoord0:!1},n=new Map,o=new Map,s=[];for(const a of e.parts){const{position:e,normal:u,color:l,tangent:c,texCoord0:f}=a.attributes,d=`\n ${D(e,n)}/\n ${D(u,n)}/\n ${D(l,n)}/\n ${D(c,n)}/\n ${D(f,n)}/\n ${M(a.transform)}\n `;let p=!1;const m=(0,i.tE)(o,d,()=>(p=!0,{start:t,length:e.count}));p&&(t+=e.count),u&&(r.normal=!0),l&&(r.color=!0),c&&(r.tangent=!0),f&&(r.texCoord0=!0),s.push({gltf:a,writeVertices:p,region:m})}return{vertexAttributes:{position:N(g.Xm,t),normal:r.normal?N(g.xs,t):null,tangent:r.tangent?N(g.Eq,t):null,color:r.color?N(g.XP,t):null,texCoord0:r.texCoord0?N(g.gH,t):null},parts:s,components:[]}}(p);for(const e of x.parts)U(x,e,b);const{position:S,normal:R,tangent:A,color:E,texCoord0:O}=x.vertexAttributes,B=(0,y.TE)(e,r),L=e.spatialReference.isGeographic?(0,y.TE)(e):B,j=(0,I.UR)({vertexAttributes:{position:S.typedBuffer,normal:R?.typedBuffer,tangent:A?.typedBuffer},vertexSpace:L,spatialReference:e.spatialReference},B,{allowBufferReuse:!0,sourceUnit:r?.unitConversionDisabled?void 0:"meters"});if(!j)throw new a.A("load-gltf-mesh:vertex-space-projection",`Failed to load mesh from glTF because we could not convert the vertex space from ${L.type} to ${B.type}`);return{mesh:{transform:null,vertexSpace:B,components:x.components,spatialReference:e.spatialReference,vertexAttributes:new _.H({...j,color:E?.typedBuffer,uv:O?.typedBuffer})},meta:l.meta}}function D(e,t){if(null==e)return"-";const r=e.typedBuffer;return`${(0,i.tE)(t,r.buffer,()=>t.size)}/${r.byteOffset}/${r.byteLength}`}function M(e){return null!=e?e.toString():"-"}function U(e,t,r){t.writeVertices&&function(e,t){const{position:r,normal:n,tangent:o,color:s,texCoord0:a}=e.vertexAttributes,i=t.region.start,{attributes:f,transform:d}=t.gltf,p=f.position.count;if((0,w.d)(r.slice(i,p),f.position,d),null!=f.normal&&null!=n){const e=(0,l.Ge)((0,c.vt)(),d),t=n.slice(i,p);(0,w.c)(t,f.normal,e),(0,u.or)(e)&&(0,w.e)(t,t)}else null!=n&&A(n,0,0,1,{dstIndex:i,count:p});if(null!=f.tangent&&null!=o){const e=(0,l.z0)((0,c.vt)(),d),t=o.slice(i,p);(0,b.a)(t,f.tangent,e),(0,u.or)(e)&&(0,b.n)(t,t)}else null!=o&&O(o,0,0,1,1,{dstIndex:i,count:p});if(null!=f.texCoord0&&null!=a?(0,S.n)(a.slice(i,p),f.texCoord0):null!=a&&(0,S.f)(a,0,0,{dstIndex:i,count:p}),null!=f.color&&null!=s){const e=f.color,t=s.slice(i,p);if(4===e.elementCount)e instanceof g.Eq?(0,b.l)(t,e,1,255):(e instanceof g.XP||e instanceof g.Uz)&&(0,b.l)(t,e,1/255,255);else{O(t,255,255,255,255);const r=g.eI.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof g.xs?(0,w.l)(r,e,1,255):(e instanceof g.eI||e instanceof g.nS)&&(0,w.l)(r,e,1/255,255)}}else null!=s&&O(s.slice(i,p),255,255,255,255)}(e,t);const{indices:n,attributes:o,primitiveType:s,material:a}=t.gltf;let i=(0,B.x)(n||o.position.count,s);const f=t.region.start;if(f){const e=new Uint32Array(i);for(let t=0;t<i.length;t++)e[t]+=f;i=e}e.components.push(new p.A({name:t.gltf.name,faces:i,material:r.get(a),shading:o.normal?"source":"flat",trustSourceNormals:!0}))}function F(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function P(e){return{horizontal:j(e.s),vertical:j(e.t)}}function j(e){switch(e){case 33071:return"clamp";case 33648:return"mirror";case 10497:return"repeat"}}function H(e){return e**(1/o.Tf)*255}}}]);
|