@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
|
@@ -0,0 +1 @@
|
|
|
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)},20615:(t,e,r)=>{r.d(e,{I:()=>i});var s=r(2272),n=r(80893),a=r(61956);function i(t,e,r,i){return(0,n.gW)((0,s.Dl)(t),a.A.from(e),r,i)}},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,S),c(u.JP,e,_),c(u.Cb,r,q),d(S,_,S),d(S,q,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)(),S=(l(),l()),_=l(),q=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),S=r(97768),_=r(62815),q=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 O{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,_.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,S.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,q.aQ)(n,this._transform);const a=(0,q.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 C=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;return await(0,g.IJ)(n,i,new O({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),a,s)}(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 C.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.extent;return!a||isNaN(a.xmin)||isNaN(a.ymin)||isNaN(a.xmax)||isNaN(a.ymax)?{count:n.count,extent:null}:{count:n.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:()=>D,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:()=>q,o:()=>R,q:()=>T,r:()=>_,s:()=>M,t:()=>F,u:()=>S,v:()=>I,w:()=>d,x:()=>j,y:()=>J,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 S(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function _(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function q(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 O=(0,s.vt)(),C=(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 D=l,E=c,N=p,Q=b,j=M,G=a,J=A;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:u,angle:function(t,e){q(O,t),q(C,e);const r=v(O,C);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:_,len:G,length:a,lerp:w,max:f,min:y,mul:E,multiply:c,negate:S,normalize:q,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:J,squaredDistance:M,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:D,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(43773),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,S=u.g,_=u.l,q=u.i,v=q,x=u.b,w=x,F=u.n,R=u.a,I=u.e,O=(0,a.vt)(),C=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),P=(0,n.vt)(),D=(0,n.vt)(),E=(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:S,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:q,lerp:_,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)(O,C,e),(0,o.H)(O)<1e-6&&(0,o.i)(O,T,e),(0,o.n)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.i)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:A,set:g,setAxes:function(t,e,r,s){const n=E;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(D,r,s,a),d(t,P,D,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(43773),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),S=r(95696),_=r(27615),q=r(63579),v=r(52106),x=r(83047),w=r(91218),F=r(65864),R=r(73836),I=r(21325),O=r(78628);async function C(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 D(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 E(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=>E(t,e))||[],updates:t?.updates?.map(t=>({original:E(t[0],e),current:E(t[1],e)}))||[],deletes:t?.deletes?.map(t=>E(t,e))||[],spatialReference:e}}var Q=r(64714),j=r(28132),G=r(60694),J=r(15426),U=r(20557),Z=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,J.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 D((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,J.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 D((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,J.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=>C(this.layer,t,s))??[],p=(await Promise.all(c)).filter(i.Ru),d=t.updateFeatures?.map(t=>C(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,O.zp)(e))return e.map(t=>t.globalId);if((0,O.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 S=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let _;try{_=m?await this._asyncApplyEdits(S+"/applyEdits",A):await(0,a.A)(S+"/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",_=m?await this._asyncApplyEdits(S+"/applyEdits",A):await(0,a.A)(S+"/applyEdits",A)}return this._createEditsResult(_)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,J.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(D)}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,_.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 S.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(q.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(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};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,U.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,Z.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)()},78286:(t,e,r)=>{r.d(e,{V:()=>i});var s=r(2272),n=r(80893),a=r(61956);async function i(t,e,r,i){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,a.A.from(e),r,i);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},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)},99199:(t,e,r)=>{r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),a=r(22671),i=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return a.A.fromJSON(n)}function u(t,e,r,a){const o=(0,s.Dl)(t),u={...r},l=i.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,a)}},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 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9239],{9239:(t,e,o)=>{o.r(e),o.d(e,{executeAttachmentQuery:()=>I,fetchAttachments:()=>g,processAttachmentQueryResult:()=>m});var n,r=o(70333),i=o(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9239],{9239:(t,e,o)=>{o.r(e),o.d(e,{executeAttachmentQuery:()=>I,fetchAttachments:()=>g,processAttachmentQueryResult:()=>m});var n,r=o(70333),i=o(43773),a=o(84952),s=o(10536),l=o(31635),d=o(25482),p=o(10107),c=o(56507),u=(o(44208),o(87811),o(64108));const h={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let y=n=class extends d.o{constructor(t){super(t),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:t}=this,e=function(t){const{exifInfo:e,exifName:o,tagName:n}=t;if(!e||!o||!n)return null;const r=e.find(t=>t.name===o);return r?function(t){const{tagName:e,tags:o}=t;if(!o||!e)return null;const n=o.find(t=>t.name===e);return n?.value||null}({tagName:n,tags:r.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:t});return h[e]||null}clone(){return new n({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};function f(t){const e=t.toJSON();return e.attachmentTypes&&(e.attachmentTypes=e.attachmentTypes.join(",")),e.keywords&&(e.keywords=e.keywords.join(",")),e.globalIds&&(e.globalIds=e.globalIds.join(",")),e.objectIds&&(e.objectIds=e.objectIds.join(",")),e.size&&(e.size=e.size.join(",")),e.orderByFields&&(e.orderByFields=e.orderByFields.join(",")),e}function m(t,e){const o={};for(const n of e){const{parentObjectId:e,parentGlobalId:i,attachmentInfos:s}=n;for(const n of s){const{id:s}=n,l=(0,a.yM)((0,r.Y3)(`${t.path}/${e}/attachments/${s}`)),d=y.fromJSON(n);d.set({url:l,parentObjectId:e,parentGlobalId:i}),o[e]?o[e].push(d):o[e]=[d]}}return o}function I(t,e,o){let n={query:(0,s.z)({...t.query,f:"json",...f(e)})};return o&&(n={...o,...n,query:{...o.query,...n.query}}),(0,i.A)(t.path+"/queryAttachments",n).then(t=>t.data.attachmentGroups)}async function g(t,e,o){const{objectIds:n}=e,r=[];for(const e of n)r.push((0,i.A)(t.path+"/"+e+"/attachments",o));return Promise.all(r).then(t=>n.map((e,o)=>({parentObjectId:e,attachmentInfos:t[o].data.attachmentInfos})))}(0,l.Cg)([(0,p.MZ)({type:String})],y.prototype,"contentType",void 0),(0,l.Cg)([(0,p.MZ)()],y.prototype,"exifInfo",void 0),(0,l.Cg)([(0,p.MZ)({readOnly:!0})],y.prototype,"orientationInfo",null),(0,l.Cg)([(0,p.MZ)({type:c.jz})],y.prototype,"id",void 0),(0,l.Cg)([(0,p.MZ)({type:String})],y.prototype,"globalId",void 0),(0,l.Cg)([(0,p.MZ)({type:String})],y.prototype,"keywords",void 0),(0,l.Cg)([(0,p.MZ)({type:String})],y.prototype,"name",void 0),(0,l.Cg)([(0,p.MZ)({json:{read:!1}})],y.prototype,"parentGlobalId",void 0),(0,l.Cg)([(0,p.MZ)({json:{read:!1}})],y.prototype,"parentObjectId",void 0),(0,l.Cg)([(0,p.MZ)({type:c.jz})],y.prototype,"size",void 0),(0,l.Cg)([(0,p.MZ)({json:{read:!1}})],y.prototype,"url",void 0),y=n=(0,l.Cg)([(0,u.$)("esri.rest.query.support.AttachmentInfo")],y)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2568],{35448:(e,t,r)=>{r.d(t,{Eq:()=>n,bV:()=>a,nP:()=>s,r5:()=>o,ti:()=>d,vy:()=>l,wr:()=>i});const n={Regular:0,Provenance:1,Document:2},o={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},a={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},i={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},s={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},d={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},l={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2}},45724:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(2741),o=r(44208);const a="esri/rest/knowledgeGraph/wasmInterface/";let i,s;async function d(){const e=i??s;if(e)return e;const t=!!(0,o.A)("wasm-simd");return s=l(t),s}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then(e=>e.a);return e({locateFile:e=>(0,n.s)(a+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then(e=>e.a);return t({locateFile:e=>(0,n.s)(a+e)})}},62568:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>or,_esriRequestWrapper:()=>nr,_fetchWrapper:()=>tr,_getClientDataCacheCopy:()=>St,_setMaxQueryParsingDurationForTesting:()=>lr,_submitJobWrapper:()=>rr,clearClientDataCache:()=>er,clientDataCache:()=>kt,executeAddGraphFieldIndex:()=>qt,executeAddGraphProperties:()=>Et,executeAddNamedTypes:()=>It,executeApplyEdits:()=>jt,executeDeleteGraphFieldIndex:()=>$t,executeDeleteGraphProperty:()=>Ft,executeDeleteNamedType:()=>Dt,executeFindPaths:()=>Yt,executeFindPathsAsynchronous:()=>Wt,executeQuery:()=>Lt,executeQueryStreaming:()=>Ut,executeSearch:()=>zt,executeSearchStreaming:()=>Jt,executeUpdateGraphProperty:()=>Nt,executeUpdateNamedType:()=>Zt,executeUpdateSearchIndex:()=>Ot,fetchAllClientDataKeys:()=>Kt,fetchAsynchronousFindPathsResultData:()=>Xt,fetchClientDataAtKeys:()=>Vt,fetchKnowledgeGraph:()=>Qt,kgRestServices:()=>Rt,refreshDataModel:()=>Bt,refreshServiceDefinition:()=>Ht});var n,o=r(70333),a=r(78888),i=r(49186),s=r(53966),d=r(74887),l=r(91075),p=r(16930),u=r(31635),c=r(69622),h=r(10107),y=r(56507),g=(r(44208),r(87811),r(64108)),f=r(5443);let w=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,y.PZ)(n,e)}};(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:f.A})],w.prototype,"processExtent",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"processSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnColumnName",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnFeatureCollection",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnM",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnZ",void 0),w=n=(0,u.Cg)([(0,g.$)("esri.rest.geoprocessor.GPOptions")],w);var m=r(17136),_=r(20437),v=r(25482);let b=class extends v.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,u.Cg)([(0,h.MZ)({type:f.A})],b.prototype,"extent",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"height",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"href",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"opacity",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"rotation",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"scale",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"visible",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"width",void 0),b=(0,u.Cg)([(0,g.$)("esri.layers.support.MapImage")],b);var C=r(2272),A=r(93223),G=r(2073);let M=class extends v.o{constructor(e){super(e),this.area=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],M.prototype,"area",void 0),(0,u.Cg)([(0,A.e)(G.UO)],M.prototype,"units",void 0),M=(0,u.Cg)([(0,g.$)("esri.rest.support.ArealUnit")],M);let x=class extends v.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],x.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,u.Cg)([(0,g.$)("esri.rest.support.DataFile")],x);var T=r(22671);let P=class extends v.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],P.prototype,"distance",void 0),(0,u.Cg)([(0,A.e)(G.Y8)],P.prototype,"units",void 0),P=(0,u.Cg)([(0,g.$)("esri.rest.support.LinearUnit")],P);var k=r(66552);const S="multi-value-",R=new k.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${S}areal-unit`,"GPMultiValue:GPBoolean":`${S}boolean`,"GPMultiValue:GPComposite":`${S}composite`,"GPMultiValue:GPDataFile":`${S}data-file`,"GPMultiValue:GPDate":`${S}date`,"GPMultiValue:GPDouble":`${S}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${S}feature-record-set-layer`,"GPMultiValue:Field":`${S}field`,"GPMultiValue:GPLinearUnit":`${S}linear-unit`,"GPMultiValue:GPLong":`${S}long`,"GPMultiValue:GPRasterData":`${S}raster-data`,"GPMultiValue:GPRasterDataLayer":`${S}raster-data-layer`,"GPMultiValue:GPRecordSet":`${S}record-set`,"GPMultiValue:GPString":`${S}string`});let j=class extends v.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u.Cg)([(0,A.e)(R,{ignoreUnknown:!1})],j.prototype,"dataType",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"paramName",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"value",void 0),j=(0,u.Cg)([(0,g.$)("esri.rest.support.ParameterValue")],j);var I=r(36005);let D=class extends v.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function Z(e,t){switch(e){case"areal-unit":return M.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return x.fromJSON(t);case"linear-unit":return P.fromJSON(t);case"feature-record-set-layer":if("url"in t)return x.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(3548)]).then(r.bind(r,68654))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=p.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return T.A.fromJSON(t);case"record-set":return"url"in t?x.fromJSON(t):T.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?b.fromJSON(t.mapImage):D.fromJSON(t);case"field":return _.A.fromJSON(t)}}async function E(e){const t=R.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(S)}(t)?await async function(e,t){const r=function(e){return e.replace(S,"")}(e),n="composite"===r?t.map(e=>Z(R.fromJSON(e.dataType),e.value)):t.map(e=>Z(r,e));return Promise.all(n)}(t,e.value):await Z(t,e.value);return new j({dataType:t,paramName:r,value:n})}function F(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>F({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,C.lF)(e,t,r)}(0,u.Cg)([(0,h.MZ)()],D.prototype,"format",void 0),(0,u.Cg)([(0,h.MZ)({json:{name:"itemID",write:!0}})],D.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)()],D.prototype,"type",void 0),(0,u.Cg)([(0,I.w)("type")],D.prototype,"readType",null),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],D.prototype,"url",void 0),D=(0,u.Cg)([(0,g.$)("esri.rest.support.RasterData")],D);var N,q=r(37807);const $=(0,k.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),O=1e3;let L=class extends v.o{static{N=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,C.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,a.A)(i,o),{messages:l,jobStatus:p,progress:u}=N.fromJSON(s);return this.set({messages:l,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise((t,r)=>{(0,d.u7)(o.signal,()=>{this.clearCancelJobTimer(),r((0,d.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,d.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,O);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,O)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,C.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,a.A)(n,r),{messages:i,jobStatus:s,progress:d}=N.fromJSON(o);return this.set({messages:i,jobStatus:s,progress:d}),this}async fetchResultData(e,t,r){t=w.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:i,returnZ:s,outSpatialReference:d}=t,{path:l}=(0,C.Dl)(this.sourceUrl),p=F({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:i||null,returnZ:s||null,outSR:d,returnType:"data",f:"json",...r?.query},null),u={...this.requestOptions,...r,query:p},c=`${l}/jobs/${this.jobId}/results/${e}`,{data:h}=await(0,a.A)(c,u);return E(h)}async fetchResultImage(e,t,r){const{path:n}=(0,C.Dl)(this.sourceUrl),o=F({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:d}=await(0,a.A)(s,i);return E(d)}async fetchResultMapImageLayer(){const{path:e}=(0,C.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(957),r.e(364),r.e(7048),r.e(7656),r.e(7548)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=O,signal:r,statusCallback:n,apiKey:o}=e;return new Promise((e,a)=>{(0,d.u7)(r,()=>{this.clearJobCompletionTimer(),a((0,d.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||a((0,d.NK)()),this.checkJobStatus({query:{token:o}}).then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":a(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{a(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u.Cg)([(0,h.MZ)()],L.prototype,"jobId",void 0),(0,u.Cg)([(0,A.e)($,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,u.Cg)([(0,h.MZ)({type:[q.A]})],L.prototype,"messages",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"progress",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"requestOptions",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=N=(0,u.Cg)([(0,g.$)("esri.rest.support.JobInfo")],L);let U=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,u.Cg)([(0,h.MZ)()],U.prototype,"headerKeys",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"exceededTransferLimit",void 0),U=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],U);let z=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultRows",void 0),(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultHeader",void 0),z=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResult")],z);let J=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultRowsStream",void 0),(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultHeader",void 0),J=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],J);let K=class extends v.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"unique",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"ascending",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],K.prototype,"fieldNames",void 0),K=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.FieldIndex")],K);let V=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"fieldType",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"geometryType",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasM",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasZ",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"nullable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"required",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"defaultVisibility",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"systemMaintained",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],V.prototype,"defaultValue",void 0),V=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphProperty")],V);let Q=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:[V],json:{write:!0}})],Q.prototype,"properties",void 0),(0,u.Cg)([(0,h.MZ)({type:[K],json:{write:!0}})],Q.prototype,"fieldIndexes",void 0),Q=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphObjectType")],Q);let B=class extends Q{constructor(e){super(e),this.type="entity"}};B=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.EntityType")],B);let H=class extends Q{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],H.prototype,"endPoints",void 0),H=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.RelationshipType")],H);let W=class extends v.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"value",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"behavior",void 0),W=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],W);let Y=class extends v.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,u.Cg)([(0,h.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],Y.prototype,"timestamp",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],Y.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"objectIdField",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"globalIdField",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"arcgisManaged",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"identifierInfo",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"searchIndexes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"entityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[H],json:{write:!0}})],Y.prototype,"relationshipTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"metaEntityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[W],json:{write:!0}})],Y.prototype,"provenanceSourceTypeValues",void 0),Y=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.DataModel")],Y);let X=class extends v.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"capabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsSearch",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"supportedQueryFormats",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"allowGeometryUpdates",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"searchMaxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"serviceCapabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"maxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"copyrightText",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"units",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"currentVersion",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"dateFieldsTimeReference",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"serviceItemId",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsDocuments",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"dataEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"schemaEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsProvenance",void 0),X=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.ServiceDefinition")],X);let ee=class extends v.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function te(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function re(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function ne(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const a of e){const e=oe(a,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const a=o.get_encoding_result();return te(a.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(a.get_byte_buffer())}function oe(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const a=new r.ClientDataFetchRequestParameter;a.deleteLater(),a.set_key(o);const i=t.get(e);return i&&!n&&(a.v_tag={v_tag:i.version}),a}(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ee.prototype,"url",void 0),(0,u.Cg)([(0,h.MZ)({type:Y,json:{write:!0}})],ee.prototype,"dataModel",void 0),(0,u.Cg)([(0,h.MZ)({type:X,json:{write:!0}})],ee.prototype,"serviceDefinition",void 0),ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],ee);var ae=r(45724),ie=r(48526),se=r(86738),de=r(39829),le=r(82799);const pe={exclude:0,include:1};function ue(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}function ce(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,ye(o,t));return r}function he(e,t){if(e instanceof ie.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let a=0;return e.points.forEach(e=>{e.forEach(e=>{n[a]=e,a++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof se.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let a=2;return e.hasZ&&(n[a]=e.z,a++),e.hasM&&(n[a]=e.m,a++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof le.A||e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let a=[];e instanceof le.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,a=e.paths):e instanceof de.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,a=e.rings);let i=0,s=0;return a.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),o[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ye(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof l.A)return he(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}return ce(e,t)}var ge=r(35448);function fe(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function we(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:ge.r5[e.fieldType]},r.geometry_type={value:e.geometryType?ge.bV[e.geometryType]:ge.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:ge.ti[e.role]},r.default_value=be(e.defaultValue,t),r}function me(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function _e(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:ge.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=we(n,t);r.add_property(e)}return r}function ve(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function be(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof l.A?he(e,t):null}let Ce=class extends c.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"decoderError",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"resultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"results",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"updatedKnowledgeGraph",void 0),Ce=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Ce);const Ae=Ce;let Ge=class extends Ae{constructor(e){super(e)}};Ge=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ge);const Me=Ge;let xe=class extends Ae{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResults",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResults",void 0),xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],xe);const Te=xe;let Pe=class extends Ae{constructor(e){super(e)}};Pe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Pe);const ke=Pe;let Se=class extends Ae{constructor(e){super(e)}};Se=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Se);const Re=Se;let je=class extends Ae{constructor(e){super(e)}};je=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],je);const Ie=je;let De=class extends Ae{constructor(e){super(e)}};De=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],De);const Ze=De;let Ee=class extends Ae{constructor(e){super(e)}};Ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Ee);const Fe=Ee;let Ne=class extends Ae{constructor(e){super(e)}};Ne=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ne);const qe=Ne;let $e=class extends Ae{constructor(e){super(e)}};$e=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],$e);const Oe=$e;function Le(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:re(t.get_error())})}return r}function Ue(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),o=new Te({resultsCount:t,results:Le(e,t),decoderError:re(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.entityAddResults.push({name:n,error:re(a)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.relationshipAddResults.push({name:n,error:re(a)})}return o}function ze(e){const t=e.get_results_count();return new Fe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Je(e){const t=e.get_results_count();return new Ie({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ke(e){const t=e.get_results_count();return new ke({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ve(e){const t=e.get_results_count();return new Ze({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Qe(e){const t=e.get_results_count();return new qe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Be(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function He(e){const t=e.get_results_count();return new Me({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function We(e){const t=e.get_results_count();return new Re({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}var Ye=r(93637);let Xe=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"supportedCategory",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"analyzers",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"searchProperties",void 0),Xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SearchIndex")],Xe);let et=!1;function tt(e){return e.deleteLater(),new B(nt(e))}function rt(e){return e.deleteLater(),new K({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:dt(e.fields)})}function nt(e){return{name:e.name,alias:e.alias,role:(0,Ye.i7)(ge.Eq,e.role.value),strict:e.strict,properties:lt(e.properties),fieldIndexes:pt(e.field_indexes)}}function ot(e){return e.deleteLater(),new V({alias:e.alias,name:e.name,fieldType:(0,Ye.i7)(ge.r5,e.field_type.value)??void 0,geometryType:(0,Ye.i7)(ge.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,Ye.i7)(ge.ti,e.role.value),defaultValue:e.default_value})}function at(e){e.deleteLater();const t=nt(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new H(Object.assign({endPoints:r},t))}function it(e){return new W({behavior:e.behavior,value:e.value})}function st(e){const t=[];for(let r=0;r<e.size();r++)t.push(tt(e.get(r)));return e.delete(),t}function dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++){const n=ot(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(et=!0),t.push(n)}return e.delete(),t}function pt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++)t.push(at(e.get(r)));return e.delete(),t}function ct(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(it(n))}return e.delete(),t}function ht(e){const t=[];for(let r=0;r<e.size();r++){const n=new Xe,o=e.get(r);n.name=o.name,n.supportedCategory=(0,Ye.i7)(ge.nP,o.supported_category.value);const a=o.analyzers.size();for(let e=0;e<a;e++)n.analyzers.push({name:o.analyzers.get(e).name});o.analyzers.delete();for(let e=0;e<o.search_properties.keys().size();e++){const t=o.search_properties.keys().get(e),r=o.search_properties.get(t),a=[];for(let e=0;e<r.property_names.size();e++)a.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:a})}t.push(n)}return e.delete(),t}var yt=r(25927),gt=(r(77901),r(40662)),ft=r(42095),wt=r(23150);function mt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=_t(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let d=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[d],d++;t.push(e)}r.paths.push(t)}),r}function _t(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const vt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function bt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;_t(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new se.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=_t(e,r),o=e.lengths,a=e.coords,i=o[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=a[s],s++;r.points.push(e)}return new ie.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,3);return new le.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,4);return new de.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 5:case 7:return vt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return vt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return vt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new gt.A(At(e,t,r))}(e,t,r);case 1:return Ct(e,t,r);case 2:return Gt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),a=[];for(let i=0;i<n;i++)a.push(Ct(e.get_entity_at(i),t,r)),i<o&&a.push(Gt(e.get_relationship_at(i),t,r));return new ft.A({path:a})}(e,t,r);case 4:return function(e,t,r){const n=[],o=e.count();for(let a=0;a<o;a++){const o=e.get_value_at(a);n.push(bt(o,t,r))}return n}(e,t,r);default:return vt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function Ct(e,t,r){const n=e.type_name,o=At(e,t,r),a=e.get_id();return new yt.A(Object.assign({typeName:n,id:a},o))}function At(e,t,r){const n={},o=e.key_count();for(let a=0;a<o;a++)n[e.get_key_at(a)]=bt(e.get_value_at(a),t,r);return{properties:n}}function Gt(e,t,r){const n=e.type_name,o=At(e,t,r);return new wt.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function Mt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new p.A(e.get_out_sr());return new U({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let xt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,u.Cg)([(0,h.MZ)()],xt.prototype,"hasError",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"error",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"editResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeRelationshipDeleteResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeProvenanceDeleteResults",void 0),xt=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],xt);const Tt=xt;function Pt(e){const t=e.has_error(),r=new Tt({hasError:t,error:t?re(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t);n.deleteLater();const o=e.get_edit_results_type_name_at(t),a=[],i=[],s=[],d=n.get_add_results_count(),l=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<d;e++){const t=n.get_add_result_at(e);t.deleteLater(),a.push({id:t.id,error:re(t.error)})}for(let e=0;e<l;e++){const t=n.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:re(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:re(t.error)})}r.editResults.push({typeName:o,adds:a,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const n=e.get_cascaded_rel_deletes_at(t);n.deleteLater();const o=e.get_cascaded_rel_deletes_type_name_at(t),a=[];for(let e=0;e<n.get_count();e++){const t=n.get_result_at(e);t.deleteLater(),a.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:re(t.error)})}r.cascadeRelationshipDeleteResults.push({typeName:o,cascadeRelationshipDeletes:a})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const n=t.get_count();for(let e=0;e<n;e++){const n=t.get_result_at(e);n.deleteLater(),r.cascadeProvenanceDeleteResults.push({id:n.id,error:re(n.error)})}}return r}const kt=new Map,St=()=>new Map(kt.entries()),Rt={fetchKnowledgeGraph:async e=>{const t=new ee({url:e}),r=[];return r.push(Bt(t)),r.push(Ht(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await cr(e)},refreshServiceDefinition:async e=>{const t=(await(0,a.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new X(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await rr(`${n}${a}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await nr(`${n}${a}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let d;for(const e of s.data.results)if("out_results_string"===e.paramName){d=e.value;break}if(!d)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return d},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await or(e);const o=await ir(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))ar(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Bt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:pe[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await or(e);const o=await ir(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Bt(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ae.I)(),n=!!e.options?.cascadeDelete,o=!!e.options?.cascadeProvenanceDelete,a=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());a.deleteLater(),a.cascade_delete=n,a.cascade_delete_provenance=o;try{let t;e.entityAdds?.forEach(e=>{t=a.add_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=a.add_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),a.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=a.get_encoding_result();return te(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return sr(e,(await(0,ae.I)()).GraphApplyEditsDecoder,Pt)}(await tr(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),_e(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return _e(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeAddsResponseDecoder,Ue)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await or(e);const o=await ir(n,r);o.data.body="";const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Je)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t,r){const n=await(0,ae.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some(e=>e.name===t))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ve(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),ve(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const a=o.get_encoding_result();return te(a.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(a.get_byte_buffer())}(r,t,e.dataModel);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeUpdateResponseDecoder,ze)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(we(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyAddsResponseDecoder,Ke)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyDeleteResponseDecoder,Ve)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await or(e);const s=await ir(a,o);s.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=be(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(o.get_byte_buffer())}(r,n);const d=await tr(s.data.url,s.data),l=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyUpdateResponseDecoder,Qe)}(d);return l.updatedKnowledgeGraph=await Qt(e.url),l},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexAddsResponseDecoder,He)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexDeleteResponseDecoder,We)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,me(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,me(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(o.get_byte_buffer())}(t,r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphUpdateSearchIndexResponseDecoder,Be)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,a.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),d=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,a.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),d=s.getHeader?.("content-type"),l=s.data;if(d?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:d,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ue(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const o=r.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=kt.get(e.url||"");n||(n=new Map,kt.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,ae.I)(),d=ne(t,n,s,r.ignoreCache),l=await ir(a,r.requestOptions);l.data.body=d;const p=await tr(l.data.url,l.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let a=0;a<e.get_results_count();a++){const i=e.get_result_at(a);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),d=i.get_key().key_string,l=r.get(d);let p;if(2===s.get_data_case().value&&l)p=l.value;else{if(1!==s.get_data_case().value)continue;{p=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(d,{key:d,version:e,value:p})}}o.set(d,p)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,a.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,ae.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>kt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=w.from(r||{}),async function(e,t,r,n,o){const i={},s={},d=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof T.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,d,i),(0,m.el)(d).then(d=>{const{outSpatialReference:l,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:h,returnM:y,returnZ:g}=r,{path:f}=(0,C.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const w=l?l.wkid||l:null,m=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:h||void 0,returnM:y||void 0,returnZ:g||void 0}:null,v=F({...p?{context:{extent:p,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),b={...o,query:v};return(0,a.A)(`${f}/${t}`,b)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,a.A)(e,t)};async function jt(e,t,r){return Rt.executeApplyEdits(e,t,r)}async function It(e,t,r){return Rt.executeAddNamedTypes(e,t,r)}async function Dt(e,t,r){return Rt.executeDeleteNamedType(e,t,r)}async function Zt(e,t,r,n){return Rt.executeUpdateNamedType(e,t,r,n)}async function Et(e,t,r,n){return Rt.executeAddGraphProperties(e,t,r,n)}async function Ft(e,t,r,n){return Rt.executeDeleteGraphProperty(e,t,r,n)}async function Nt(e,t,r,n,o){return Rt.executeUpdateGraphProperty(e,t,r,n,o)}async function qt(e,t,r,n){return Rt.executeAddGraphFieldIndex(e,t,r,n)}async function $t(e,t,r,n){return Rt.executeDeleteGraphFieldIndex(e,t,r,n)}async function Ot(e,t,r,n){return Rt.executeUpdateSearchIndex(e,t,r,n)}async function Lt(e,t,r){return Rt.executeQuery(e,t,r)}async function Ut(e,t,r){return Rt.executeQueryStreaming(e,t,r)}async function zt(e,t,r){return Rt.executeSearch(e,t,r)}async function Jt(e,t,r){return Rt.executeSearchStreaming(e,t,r)}function Kt(e,t){return Rt.fetchAllClientDataKeys(e,t)}function Vt(e,t,r){return Rt.fetchClientDataAtKeys(e,t,r)}async function Qt(e){return Rt.fetchKnowledgeGraph(e)}async function Bt(e){return Rt.refreshDataModel(e)}async function Ht(e){return Rt.refreshServiceDefinition(e)}async function Wt(e,t){return Rt.executeFindPathsAsynchronous(e,t)}async function Yt(e,t){return Rt.executeFindPaths(e,t)}async function Xt(e,t){return Rt.fetchAsynchronousFindPathsResultData(e,t)}function er(){return Rt.clearClientDataCache()}async function tr(e,t){return Rt._fetchWrapper(e,t)}async function rr(e,t,r,n){return Rt._submitJobWrapper(e,t,r,n)}async function nr(e,t){return Rt._esriRequestWrapper(e,t)}async function or(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await cr(e):await Bt(e))}function ar(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof l.A?r.set_param_key_value(e,he(t,n)):Array.isArray(t)?r.set_param_key_value(e,ue(t,n)):r.set_param_key_value(e,ce(t,n))}async function ir(e,t){return(0,a.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function sr(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let dr=50;function lr(e){dr=e}function pr({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,d,l=0;const u=Date.now();let c=!0;for(;e.next_row();){s&&d||(s=n??Mt(e),d=s.outSpatialReference??new p.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=bt(o,r,d)}if(a.push(t),o&&Date.now()-u>dr){c=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:a,parsedAllResultsFromBuffer:c}}async function ur(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ae.I)()).GraphQueryDecoder);let o,a,l;n.deleteLater();const p=new Promise((e,t)=>{a=e,l=t});let u=!1,c=null;const h=new ReadableStream({pull:async function e(p){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw l(e),e}const{done:h,value:y}=c?{done:!1,value:null}:await r.read().catch(e=>{throw l(e),r.releaseLock(),e});y&&(c=y);try{if(h){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||a(new U),r.releaseLock(),e)throw p.error(e),l(e),e;return void p.close()}const{resultHeader:s,resultRows:d,parsedAllResultsFromBuffer:g}=pr({wasmQueryDecoder:n,newArrayBufferToParse:y,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&s&&(o=s,a(s),u=!0),d.length>0?void p.enqueue(d):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),r.releaseLock(),(0,d.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await p}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function cr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,a.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ae.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),et=!1;const t=new Y({timestamp:e.timestamp,spatialReference:new p.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,Ye.i7)(ge.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,Ye.i7)(ge.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:ht(e.search_indexes),entityTypes:st(e.entity_types),relationshipTypes:ut(e.relationship_types),metaEntityTypes:st(e.meta_entity_types),provenanceSourceTypeValues:ct(e.provenance_source_type_values.value_behavior_array)});return et&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2568],{35448:(e,t,r)=>{r.d(t,{Eq:()=>n,bV:()=>a,nP:()=>s,r5:()=>o,ti:()=>d,vy:()=>l,wr:()=>i});const n={Regular:0,Provenance:1,Document:2},o={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},a={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},i={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},s={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},d={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},l={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2}},45724:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(2741),o=r(44208);const a="esri/rest/knowledgeGraph/wasmInterface/";let i,s;async function d(){const e=i??s;if(e)return e;const t=!!(0,o.A)("wasm-simd");return s=l(t),s}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then(e=>e.a);return e({locateFile:e=>(0,n.s)(a+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then(e=>e.a);return t({locateFile:e=>(0,n.s)(a+e)})}},62568:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>or,_esriRequestWrapper:()=>nr,_fetchWrapper:()=>tr,_getClientDataCacheCopy:()=>St,_setMaxQueryParsingDurationForTesting:()=>lr,_submitJobWrapper:()=>rr,clearClientDataCache:()=>er,clientDataCache:()=>kt,executeAddGraphFieldIndex:()=>qt,executeAddGraphProperties:()=>Et,executeAddNamedTypes:()=>It,executeApplyEdits:()=>jt,executeDeleteGraphFieldIndex:()=>$t,executeDeleteGraphProperty:()=>Ft,executeDeleteNamedType:()=>Dt,executeFindPaths:()=>Yt,executeFindPathsAsynchronous:()=>Wt,executeQuery:()=>Lt,executeQueryStreaming:()=>Ut,executeSearch:()=>zt,executeSearchStreaming:()=>Jt,executeUpdateGraphProperty:()=>Nt,executeUpdateNamedType:()=>Zt,executeUpdateSearchIndex:()=>Ot,fetchAllClientDataKeys:()=>Kt,fetchAsynchronousFindPathsResultData:()=>Xt,fetchClientDataAtKeys:()=>Vt,fetchKnowledgeGraph:()=>Qt,kgRestServices:()=>Rt,refreshDataModel:()=>Bt,refreshServiceDefinition:()=>Ht});var n,o=r(70333),a=r(43773),i=r(49186),s=r(53966),d=r(74887),l=r(91075),p=r(16930),u=r(31635),c=r(69622),h=r(10107),y=r(56507),g=(r(44208),r(87811),r(64108)),f=r(5443);let w=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,y.PZ)(n,e)}};(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:f.A})],w.prototype,"processExtent",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A})],w.prototype,"processSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnColumnName",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnFeatureCollection",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnM",void 0),(0,u.Cg)([(0,h.MZ)({nonNullable:!0})],w.prototype,"returnZ",void 0),w=n=(0,u.Cg)([(0,g.$)("esri.rest.geoprocessor.GPOptions")],w);var m=r(17136),_=r(20437),v=r(25482);let b=class extends v.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,u.Cg)([(0,h.MZ)({type:f.A})],b.prototype,"extent",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"height",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"href",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"opacity",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"rotation",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"scale",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"visible",void 0),(0,u.Cg)([(0,h.MZ)()],b.prototype,"width",void 0),b=(0,u.Cg)([(0,g.$)("esri.layers.support.MapImage")],b);var C=r(2272),A=r(93223),G=r(2073);let M=class extends v.o{constructor(e){super(e),this.area=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],M.prototype,"area",void 0),(0,u.Cg)([(0,A.e)(G.UO)],M.prototype,"units",void 0),M=(0,u.Cg)([(0,g.$)("esri.rest.support.ArealUnit")],M);let x=class extends v.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],x.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,u.Cg)([(0,g.$)("esri.rest.support.DataFile")],x);var T=r(22671);let P=class extends v.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],P.prototype,"distance",void 0),(0,u.Cg)([(0,A.e)(G.Y8)],P.prototype,"units",void 0),P=(0,u.Cg)([(0,g.$)("esri.rest.support.LinearUnit")],P);var k=r(66552);const S="multi-value-",R=new k.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${S}areal-unit`,"GPMultiValue:GPBoolean":`${S}boolean`,"GPMultiValue:GPComposite":`${S}composite`,"GPMultiValue:GPDataFile":`${S}data-file`,"GPMultiValue:GPDate":`${S}date`,"GPMultiValue:GPDouble":`${S}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${S}feature-record-set-layer`,"GPMultiValue:Field":`${S}field`,"GPMultiValue:GPLinearUnit":`${S}linear-unit`,"GPMultiValue:GPLong":`${S}long`,"GPMultiValue:GPRasterData":`${S}raster-data`,"GPMultiValue:GPRasterDataLayer":`${S}raster-data-layer`,"GPMultiValue:GPRecordSet":`${S}record-set`,"GPMultiValue:GPString":`${S}string`});let j=class extends v.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u.Cg)([(0,A.e)(R,{ignoreUnknown:!1})],j.prototype,"dataType",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"paramName",void 0),(0,u.Cg)([(0,h.MZ)()],j.prototype,"value",void 0),j=(0,u.Cg)([(0,g.$)("esri.rest.support.ParameterValue")],j);var I=r(36005);let D=class extends v.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function Z(e,t){switch(e){case"areal-unit":return M.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return x.fromJSON(t);case"linear-unit":return P.fromJSON(t);case"feature-record-set-layer":if("url"in t)return x.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(8506),r.e(8654),r.e(3548)]).then(r.bind(r,68654))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=p.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return T.A.fromJSON(t);case"record-set":return"url"in t?x.fromJSON(t):T.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?b.fromJSON(t.mapImage):D.fromJSON(t);case"field":return _.A.fromJSON(t)}}async function E(e){const t=R.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(S)}(t)?await async function(e,t){const r=function(e){return e.replace(S,"")}(e),n="composite"===r?t.map(e=>Z(R.fromJSON(e.dataType),e.value)):t.map(e=>Z(r,e));return Promise.all(n)}(t,e.value):await Z(t,e.value);return new j({dataType:t,paramName:r,value:n})}function F(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>F({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,C.lF)(e,t,r)}(0,u.Cg)([(0,h.MZ)()],D.prototype,"format",void 0),(0,u.Cg)([(0,h.MZ)({json:{name:"itemID",write:!0}})],D.prototype,"itemId",void 0),(0,u.Cg)([(0,h.MZ)()],D.prototype,"type",void 0),(0,u.Cg)([(0,I.w)("type")],D.prototype,"readType",null),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],D.prototype,"url",void 0),D=(0,u.Cg)([(0,g.$)("esri.rest.support.RasterData")],D);var N,q=r(37807);const $=(0,k.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),O=1e3;let L=class extends v.o{static{N=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,C.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,a.A)(i,o),{messages:l,jobStatus:p,progress:u}=N.fromJSON(s);return this.set({messages:l,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise((t,r)=>{(0,d.u7)(o.signal,()=>{this.clearCancelJobTimer(),r((0,d.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,d.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,O);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,O)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,C.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,a.A)(n,r),{messages:i,jobStatus:s,progress:d}=N.fromJSON(o);return this.set({messages:i,jobStatus:s,progress:d}),this}async fetchResultData(e,t,r){t=w.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:i,returnZ:s,outSpatialReference:d}=t,{path:l}=(0,C.Dl)(this.sourceUrl),p=F({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:i||null,returnZ:s||null,outSR:d,returnType:"data",f:"json",...r?.query},null),u={...this.requestOptions,...r,query:p},c=`${l}/jobs/${this.jobId}/results/${e}`,{data:h}=await(0,a.A)(c,u);return E(h)}async fetchResultImage(e,t,r){const{path:n}=(0,C.Dl)(this.sourceUrl),o=F({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:d}=await(0,a.A)(s,i);return E(d)}async fetchResultMapImageLayer(){const{path:e}=(0,C.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(3508),r.e(6554),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(7548)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=O,signal:r,statusCallback:n,apiKey:o}=e;return new Promise((e,a)=>{(0,d.u7)(r,()=>{this.clearJobCompletionTimer(),a((0,d.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||a((0,d.NK)()),this.checkJobStatus({query:{token:o}}).then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":a(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{a(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u.Cg)([(0,h.MZ)()],L.prototype,"jobId",void 0),(0,u.Cg)([(0,A.e)($,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,u.Cg)([(0,h.MZ)({type:[q.A]})],L.prototype,"messages",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"progress",void 0),(0,u.Cg)([(0,h.MZ)()],L.prototype,"requestOptions",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=N=(0,u.Cg)([(0,g.$)("esri.rest.support.JobInfo")],L);let U=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,u.Cg)([(0,h.MZ)()],U.prototype,"headerKeys",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,h.MZ)()],U.prototype,"exceededTransferLimit",void 0),U=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],U);let z=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultRows",void 0),(0,u.Cg)([(0,h.MZ)()],z.prototype,"resultHeader",void 0),z=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryResult")],z);let J=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new U}};(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultRowsStream",void 0),(0,u.Cg)([(0,h.MZ)()],J.prototype,"resultHeader",void 0),J=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],J);let K=class extends v.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"unique",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"ascending",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],K.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],K.prototype,"fieldNames",void 0),K=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.FieldIndex")],K);let V=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"fieldType",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"geometryType",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasM",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasZ",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"nullable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"required",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"defaultVisibility",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"systemMaintained",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],V.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],V.prototype,"defaultValue",void 0),V=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphProperty")],V);let Q=class extends v.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"alias",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Q.prototype,"role",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:[V],json:{write:!0}})],Q.prototype,"properties",void 0),(0,u.Cg)([(0,h.MZ)({type:[K],json:{write:!0}})],Q.prototype,"fieldIndexes",void 0),Q=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphObjectType")],Q);let B=class extends Q{constructor(e){super(e),this.type="entity"}};B=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.EntityType")],B);let H=class extends Q{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u.Cg)([(0,h.MZ)({json:{write:!0}})],H.prototype,"endPoints",void 0),H=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.RelationshipType")],H);let W=class extends v.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"value",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],W.prototype,"behavior",void 0),W=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],W);let Y=class extends v.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,u.Cg)([(0,h.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],Y.prototype,"timestamp",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],Y.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"objectIdField",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"globalIdField",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"arcgisManaged",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"identifierInfo",void 0),(0,u.Cg)([(0,h.MZ)()],Y.prototype,"searchIndexes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"entityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[H],json:{write:!0}})],Y.prototype,"relationshipTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[B],json:{write:!0}})],Y.prototype,"metaEntityTypes",void 0),(0,u.Cg)([(0,h.MZ)({type:[W],json:{write:!0}})],Y.prototype,"provenanceSourceTypeValues",void 0),Y=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.DataModel")],Y);let X=class extends v.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"capabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsSearch",void 0),(0,u.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],X.prototype,"supportedQueryFormats",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"allowGeometryUpdates",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"searchMaxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"serviceCapabilities",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"maxRecordCount",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"copyrightText",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"units",void 0),(0,u.Cg)([(0,h.MZ)({type:p.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,u.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],X.prototype,"currentVersion",void 0),(0,u.Cg)([(0,h.MZ)({type:Object,json:{write:!0}})],X.prototype,"dateFieldsTimeReference",void 0),(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],X.prototype,"serviceItemId",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsDocuments",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"dataEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"schemaEditingNotSupported",void 0),(0,u.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsProvenance",void 0),X=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.ServiceDefinition")],X);let ee=class extends v.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function te(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function re(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function ne(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const a of e){const e=oe(a,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const a=o.get_encoding_result();return te(a.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(a.get_byte_buffer())}function oe(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const a=new r.ClientDataFetchRequestParameter;a.deleteLater(),a.set_key(o);const i=t.get(e);return i&&!n&&(a.v_tag={v_tag:i.version}),a}(0,u.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ee.prototype,"url",void 0),(0,u.Cg)([(0,h.MZ)({type:Y,json:{write:!0}})],ee.prototype,"dataModel",void 0),(0,u.Cg)([(0,h.MZ)({type:X,json:{write:!0}})],ee.prototype,"serviceDefinition",void 0),ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],ee);var ae=r(45724),ie=r(48526),se=r(86738),de=r(39829),le=r(82799);const pe={exclude:0,include:1};function ue(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}function ce(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,ye(o,t));return r}function he(e,t){if(e instanceof ie.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let a=0;return e.points.forEach(e=>{e.forEach(e=>{n[a]=e,a++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof se.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let a=2;return e.hasZ&&(n[a]=e.z,a++),e.hasM&&(n[a]=e.m,a++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof le.A||e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let a=[];e instanceof le.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,a=e.paths):e instanceof de.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,a=e.rings);let i=0,s=0;return a.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),o[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ye(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof l.A)return he(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ye(e,t))}),r}return ce(e,t)}var ge=r(35448);function fe(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,be(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function we(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:ge.r5[e.fieldType]},r.geometry_type={value:e.geometryType?ge.bV[e.geometryType]:ge.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:ge.ti[e.role]},r.default_value=be(e.defaultValue,t),r}function me(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function _e(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:ge.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=we(n,t);r.add_property(e)}return r}function ve(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function be(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof l.A?he(e,t):null}let Ce=class extends c.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"decoderError",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"resultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"results",void 0),(0,u.Cg)([(0,h.MZ)()],Ce.prototype,"updatedKnowledgeGraph",void 0),Ce=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Ce);const Ae=Ce;let Ge=class extends Ae{constructor(e){super(e)}};Ge=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ge);const Me=Ge;let xe=class extends Ae{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResultsCount",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"entityAddResults",void 0),(0,u.Cg)([(0,h.MZ)()],xe.prototype,"relationshipAddResults",void 0),xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],xe);const Te=xe;let Pe=class extends Ae{constructor(e){super(e)}};Pe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Pe);const ke=Pe;let Se=class extends Ae{constructor(e){super(e)}};Se=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Se);const Re=Se;let je=class extends Ae{constructor(e){super(e)}};je=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],je);const Ie=je;let De=class extends Ae{constructor(e){super(e)}};De=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],De);const Ze=De;let Ee=class extends Ae{constructor(e){super(e)}};Ee=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Ee);const Fe=Ee;let Ne=class extends Ae{constructor(e){super(e)}};Ne=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ne);const qe=Ne;let $e=class extends Ae{constructor(e){super(e)}};$e=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],$e);const Oe=$e;function Le(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:re(t.get_error())})}return r}function Ue(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),o=new Te({resultsCount:t,results:Le(e,t),decoderError:re(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.entityAddResults.push({name:n,error:re(a)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.relationshipAddResults.push({name:n,error:re(a)})}return o}function ze(e){const t=e.get_results_count();return new Fe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Je(e){const t=e.get_results_count();return new Ie({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ke(e){const t=e.get_results_count();return new ke({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Ve(e){const t=e.get_results_count();return new Ze({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Qe(e){const t=e.get_results_count();return new qe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function Be(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function He(e){const t=e.get_results_count();return new Me({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}function We(e){const t=e.get_results_count();return new Re({resultsCount:t,results:Le(e,t),decoderError:re(e.error)})}var Ye=r(93637);let Xe=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"name",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"supportedCategory",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"analyzers",void 0),(0,u.Cg)([(0,h.MZ)()],Xe.prototype,"searchProperties",void 0),Xe=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.SearchIndex")],Xe);let et=!1;function tt(e){return e.deleteLater(),new B(nt(e))}function rt(e){return e.deleteLater(),new K({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:dt(e.fields)})}function nt(e){return{name:e.name,alias:e.alias,role:(0,Ye.i7)(ge.Eq,e.role.value),strict:e.strict,properties:lt(e.properties),fieldIndexes:pt(e.field_indexes)}}function ot(e){return e.deleteLater(),new V({alias:e.alias,name:e.name,fieldType:(0,Ye.i7)(ge.r5,e.field_type.value)??void 0,geometryType:(0,Ye.i7)(ge.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,Ye.i7)(ge.ti,e.role.value),defaultValue:e.default_value})}function at(e){e.deleteLater();const t=nt(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new H(Object.assign({endPoints:r},t))}function it(e){return new W({behavior:e.behavior,value:e.value})}function st(e){const t=[];for(let r=0;r<e.size();r++)t.push(tt(e.get(r)));return e.delete(),t}function dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++){const n=ot(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(et=!0),t.push(n)}return e.delete(),t}function pt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++)t.push(at(e.get(r)));return e.delete(),t}function ct(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(it(n))}return e.delete(),t}function ht(e){const t=[];for(let r=0;r<e.size();r++){const n=new Xe,o=e.get(r);n.name=o.name,n.supportedCategory=(0,Ye.i7)(ge.nP,o.supported_category.value);const a=o.analyzers.size();for(let e=0;e<a;e++)n.analyzers.push({name:o.analyzers.get(e).name});o.analyzers.delete();for(let e=0;e<o.search_properties.keys().size();e++){const t=o.search_properties.keys().get(e),r=o.search_properties.get(t),a=[];for(let e=0;e<r.property_names.size();e++)a.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:a})}t.push(n)}return e.delete(),t}var yt=r(25927),gt=(r(77901),r(40662)),ft=r(42095),wt=r(23150);function mt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=_t(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let d=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[d],d++;t.push(e)}r.paths.push(t)}),r}function _t(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const vt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function bt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;_t(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new se.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=_t(e,r),o=e.lengths,a=e.coords,i=o[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=a[s],s++;r.points.push(e)}return new ie.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,3);return new le.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:o}=mt(e,4);return new de.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 5:case 7:return vt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return vt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return vt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new gt.A(At(e,t,r))}(e,t,r);case 1:return Ct(e,t,r);case 2:return Gt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),a=[];for(let i=0;i<n;i++)a.push(Ct(e.get_entity_at(i),t,r)),i<o&&a.push(Gt(e.get_relationship_at(i),t,r));return new ft.A({path:a})}(e,t,r);case 4:return function(e,t,r){const n=[],o=e.count();for(let a=0;a<o;a++){const o=e.get_value_at(a);n.push(bt(o,t,r))}return n}(e,t,r);default:return vt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function Ct(e,t,r){const n=e.type_name,o=At(e,t,r),a=e.get_id();return new yt.A(Object.assign({typeName:n,id:a},o))}function At(e,t,r){const n={},o=e.key_count();for(let a=0;a<o;a++)n[e.get_key_at(a)]=bt(e.get_value_at(a),t,r);return{properties:n}}function Gt(e,t,r){const n=e.type_name,o=At(e,t,r);return new wt.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function Mt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new p.A(e.get_out_sr());return new U({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let xt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,u.Cg)([(0,h.MZ)()],xt.prototype,"hasError",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"error",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"editResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeRelationshipDeleteResults",void 0),(0,u.Cg)([(0,h.MZ)()],xt.prototype,"cascadeProvenanceDeleteResults",void 0),xt=(0,u.Cg)([(0,g.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],xt);const Tt=xt;function Pt(e){const t=e.has_error(),r=new Tt({hasError:t,error:t?re(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t);n.deleteLater();const o=e.get_edit_results_type_name_at(t),a=[],i=[],s=[],d=n.get_add_results_count(),l=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<d;e++){const t=n.get_add_result_at(e);t.deleteLater(),a.push({id:t.id,error:re(t.error)})}for(let e=0;e<l;e++){const t=n.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:re(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:re(t.error)})}r.editResults.push({typeName:o,adds:a,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const n=e.get_cascaded_rel_deletes_at(t);n.deleteLater();const o=e.get_cascaded_rel_deletes_type_name_at(t),a=[];for(let e=0;e<n.get_count();e++){const t=n.get_result_at(e);t.deleteLater(),a.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:re(t.error)})}r.cascadeRelationshipDeleteResults.push({typeName:o,cascadeRelationshipDeletes:a})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const n=t.get_count();for(let e=0;e<n;e++){const n=t.get_result_at(e);n.deleteLater(),r.cascadeProvenanceDeleteResults.push({id:n.id,error:re(n.error)})}}return r}const kt=new Map,St=()=>new Map(kt.entries()),Rt={fetchKnowledgeGraph:async e=>{const t=new ee({url:e}),r=[];return r.push(Bt(t)),r.push(Ht(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await cr(e)},refreshServiceDefinition:async e=>{const t=(await(0,a.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new X(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await rr(`${n}${a}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await nr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await nr(`${n}${a}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let d;for(const e of s.data.results)if("out_results_string"===e.paramName){d=e.value;break}if(!d)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return d},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await or(e);const o=await ir(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))ar(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Bt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:pe[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await or(e);const o=await ir(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Bt(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ae.I)(),n=!!e.options?.cascadeDelete,o=!!e.options?.cascadeProvenanceDelete,a=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());a.deleteLater(),a.cascade_delete=n,a.cascade_delete_provenance=o;try{let t;e.entityAdds?.forEach(e=>{t=a.add_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=a.add_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_entity(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=a.update_relationship(fe(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=a.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),a.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=a.get_encoding_result();return te(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return sr(e,(await(0,ae.I)()).GraphApplyEditsDecoder,Pt)}(await tr(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),_e(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return _e(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeAddsResponseDecoder,Ue)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await or(e);const o=await ir(n,r);o.data.body="";const a=await tr(o.data.url,o.data),s=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Je)}(a);return s.updatedKnowledgeGraph=await Qt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t,r){const n=await(0,ae.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some(e=>e.name===t))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ve(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),ve(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const a=o.get_encoding_result();return te(a.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(a.get_byte_buffer())}(r,t,e.dataModel);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphNamedObjectTypeUpdateResponseDecoder,ze)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(we(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyAddsResponseDecoder,Ke)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyDeleteResponseDecoder,Ve)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await or(e);const s=await ir(a,o);s.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=be(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(o.get_byte_buffer())}(r,n);const d=await tr(s.data.url,s.data),l=await async function(e){return sr(e,(await(0,ae.I)()).GraphPropertyUpdateResponseDecoder,Qe)}(d);return l.updatedKnowledgeGraph=await Qt(e.url),l},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexAddsResponseDecoder,He)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await or(e);const a=await ir(o,n);a.data.body=await async function(e){const t=new((await(0,ae.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphIndexDeleteResponseDecoder,We)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await or(e);const a=await ir(o,n);a.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,me(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,me(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(o.get_byte_buffer())}(t,r);const s=await tr(a.data.url,a.data),d=await async function(e){return sr(e,(await(0,ae.I)()).GraphUpdateSearchIndexResponseDecoder,Be)}(s);return d.updatedKnowledgeGraph=await Qt(e.url),d},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,a.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),d=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,a.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),d=s.getHeader?.("content-type"),l=s.data;if(d?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=pr({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:d,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await or(e);const o=await ir(n,r);o.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ue(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const o=r.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t);const a=await tr(o.data.url,o.data);if(e.dataModel){const t=await ur(a,e.dataModel);return new J({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=kt.get(e.url||"");n||(n=new Map,kt.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,ae.I)(),d=ne(t,n,s,r.ignoreCache),l=await ir(a,r.requestOptions);l.data.body=d;const p=await tr(l.data.url,l.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let a=0;a<e.get_results_count();a++){const i=e.get_result_at(a);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),d=i.get_key().key_string,l=r.get(d);let p;if(2===s.get_data_case().value&&l)p=l.value;else{if(1!==s.get_data_case().value)continue;{p=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(d,{key:d,version:e,value:p})}}o.set(d,p)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,a.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,ae.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>kt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=w.from(r||{}),async function(e,t,r,n,o){const i={},s={},d=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof T.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,d,i),(0,m.el)(d).then(d=>{const{outSpatialReference:l,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:h,returnM:y,returnZ:g}=r,{path:f}=(0,C.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const w=l?l.wkid||l:null,m=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:h||void 0,returnM:y||void 0,returnZ:g||void 0}:null,v=F({...p?{context:{extent:p,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),b={...o,query:v};return(0,a.A)(`${f}/${t}`,b)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,a.A)(e,t)};async function jt(e,t,r){return Rt.executeApplyEdits(e,t,r)}async function It(e,t,r){return Rt.executeAddNamedTypes(e,t,r)}async function Dt(e,t,r){return Rt.executeDeleteNamedType(e,t,r)}async function Zt(e,t,r,n){return Rt.executeUpdateNamedType(e,t,r,n)}async function Et(e,t,r,n){return Rt.executeAddGraphProperties(e,t,r,n)}async function Ft(e,t,r,n){return Rt.executeDeleteGraphProperty(e,t,r,n)}async function Nt(e,t,r,n,o){return Rt.executeUpdateGraphProperty(e,t,r,n,o)}async function qt(e,t,r,n){return Rt.executeAddGraphFieldIndex(e,t,r,n)}async function $t(e,t,r,n){return Rt.executeDeleteGraphFieldIndex(e,t,r,n)}async function Ot(e,t,r,n){return Rt.executeUpdateSearchIndex(e,t,r,n)}async function Lt(e,t,r){return Rt.executeQuery(e,t,r)}async function Ut(e,t,r){return Rt.executeQueryStreaming(e,t,r)}async function zt(e,t,r){return Rt.executeSearch(e,t,r)}async function Jt(e,t,r){return Rt.executeSearchStreaming(e,t,r)}function Kt(e,t){return Rt.fetchAllClientDataKeys(e,t)}function Vt(e,t,r){return Rt.fetchClientDataAtKeys(e,t,r)}async function Qt(e){return Rt.fetchKnowledgeGraph(e)}async function Bt(e){return Rt.refreshDataModel(e)}async function Ht(e){return Rt.refreshServiceDefinition(e)}async function Wt(e,t){return Rt.executeFindPathsAsynchronous(e,t)}async function Yt(e,t){return Rt.executeFindPaths(e,t)}async function Xt(e,t){return Rt.fetchAsynchronousFindPathsResultData(e,t)}function er(){return Rt.clearClientDataCache()}async function tr(e,t){return Rt._fetchWrapper(e,t)}async function rr(e,t,r,n){return Rt._submitJobWrapper(e,t,r,n)}async function nr(e,t){return Rt._esriRequestWrapper(e,t)}async function or(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await cr(e):await Bt(e))}function ar(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof l.A?r.set_param_key_value(e,he(t,n)):Array.isArray(t)?r.set_param_key_value(e,ue(t,n)):r.set_param_key_value(e,ce(t,n))}async function ir(e,t){return(0,a.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function sr(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let dr=50;function lr(e){dr=e}function pr({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,d,l=0;const u=Date.now();let c=!0;for(;e.next_row();){s&&d||(s=n??Mt(e),d=s.outSpatialReference??new p.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=bt(o,r,d)}if(a.push(t),o&&Date.now()-u>dr){c=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:a,parsedAllResultsFromBuffer:c}}async function ur(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ae.I)()).GraphQueryDecoder);let o,a,l;n.deleteLater();const p=new Promise((e,t)=>{a=e,l=t});let u=!1,c=null;const h=new ReadableStream({pull:async function e(p){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw l(e),e}const{done:h,value:y}=c?{done:!1,value:null}:await r.read().catch(e=>{throw l(e),r.releaseLock(),e});y&&(c=y);try{if(h){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||a(new U),r.releaseLock(),e)throw p.error(e),l(e),e;return void p.close()}const{resultHeader:s,resultRows:d,parsedAllResultsFromBuffer:g}=pr({wasmQueryDecoder:n,newArrayBufferToParse:y,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&s&&(o=s,a(s),u=!0),d.length>0?void p.enqueue(d):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),r.releaseLock(),(0,d.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await p}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function cr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,a.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ae.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),et=!1;const t=new Y({timestamp:e.timestamp,spatialReference:new p.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,Ye.i7)(ge.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,Ye.i7)(ge.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:ht(e.search_indexes),entityTypes:st(e.entity_types),relationshipTypes:ut(e.relationship_types),metaEntityTypes:st(e.meta_entity_types),provenanceSourceTypeValues:ct(e.provenance_source_type_values.value_behavior_array)});return et&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
|