@arcgis/core 6.0.0-next.54 → 6.0.0-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebScene.js +2 -2
- package/applications/Components/OrientedImageryViewer/shared/constants.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +1 -0
- package/assets/esri/core/workers/chunks/033b9fcd9833db3b6e7d.js +1 -0
- package/assets/esri/core/workers/chunks/{6602310c3fcd91fb6a2f.js → 07c8ac092e4b9e8d5b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/0978e12dd6a1cbc50b80.js +1 -0
- package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +1 -0
- package/assets/esri/core/workers/chunks/{db0a7671ab5cbe8afd72.js → 123661019bb69c53f2d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{e956845255bce0910944.js → 1507297550c3cd1268e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b41ba050cde068d2860.js → 193a73a2c7f4f8482c21.js} +1 -1
- package/assets/esri/core/workers/chunks/1c0f5c42331fb6fc26cb.js +1 -0
- package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +1 -0
- package/assets/esri/core/workers/chunks/2cd2fcf4a37d180d5d5c.js +1 -0
- package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +1 -0
- package/assets/esri/core/workers/chunks/{afb4dfb89fbc8a342cc5.js → 3354f1fa90f8ce4c8fde.js} +1 -1
- package/assets/esri/core/workers/chunks/3982409149571a827390.js +1 -0
- package/assets/esri/core/workers/chunks/{9b458b0d1627f22fdd93.js → 3b11e4d2e69b7aea1d65.js} +1 -1
- package/assets/esri/core/workers/chunks/3d851710f7fcc27c5b60.js +2 -0
- package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +1 -0
- package/assets/esri/core/workers/chunks/41694ee8990e799da225.js +1 -0
- package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +1 -0
- package/assets/esri/core/workers/chunks/{12add2003631fa314f25.js → 5060be52a380fc4920f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2aa6be0b047a1b25a520.js → 53bbb9aa6e4e4a0a8121.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6d82397044e403a1f61.js → 5954f02c3901b28d8e73.js} +1 -1
- package/assets/esri/core/workers/chunks/5ba6007c3c49a8153256.js +1 -0
- package/assets/esri/core/workers/chunks/5bdd95eeb8f34dbf26f2.js +2 -0
- package/assets/esri/core/workers/chunks/{4707aedcc1b3bdf5e987.js → 5c34d49a6c9cc34b7626.js} +1 -1
- package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js → 5e47026c681238038955.js} +2 -2
- package/assets/esri/core/workers/chunks/{2baf35b1b19482d603b5.js → 5f7505ada0991cfbdd84.js} +1 -1
- package/assets/esri/core/workers/chunks/{976303f47c342b9d1cc0.js → 62ddd3a82864e26f009a.js} +1 -1
- package/assets/esri/core/workers/chunks/69a09c6acb5ae03c67f6.js +1 -0
- package/assets/esri/core/workers/chunks/{542a9c414c99d84d52ab.js → 6a202ef9ba9b89e09153.js} +1 -1
- package/assets/esri/core/workers/chunks/{0826feebdca8a31eb630.js → 6ba6fece5c11fe2a6ace.js} +1 -1
- package/assets/esri/core/workers/chunks/{5eb69e2895e5aec81051.js → 6fd10891506925560443.js} +1 -1
- package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +1 -0
- package/assets/esri/core/workers/chunks/7b6fd287e7043ad50f4e.js +1 -0
- package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +1 -0
- package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +1 -0
- package/assets/esri/core/workers/chunks/{c3c0f24a9e0047232ae1.js → 8679dfc0c53355b6feb0.js} +1 -1
- package/assets/esri/core/workers/chunks/8a636dc51372e14c98f5.js +1 -0
- package/assets/esri/core/workers/chunks/{d14732a57c8e63948c60.js → 9117c9b720c9ba6e7a6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7e33d37dd11fb08f3f8.js → 97107e64407fa6825620.js} +1 -1
- package/assets/esri/core/workers/chunks/{5118c7269b706089c88e.js → a05a2c2aaf0c288f9681.js} +1 -1
- package/assets/esri/core/workers/chunks/{944f17e9c9f681b971fb.js → a12e2a345005189c64be.js} +1 -1
- package/assets/esri/core/workers/chunks/a22458e5272332d86cb9.js +1 -0
- package/assets/esri/core/workers/chunks/{15b3386ad92a0b4149b8.js → a24dc5350af001db417a.js} +1 -1
- package/assets/esri/core/workers/chunks/{10967a36c77c5188690d.js → a66d6298236d59a615db.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ea480cebf8ee56228a5.js → a7dfca326883384d2751.js} +1 -1
- package/assets/esri/core/workers/chunks/{723d8316f5d4b6ce2942.js → a9539393e2f1812a973a.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac8d38016e4bee37a77c.js → ab784764ddf9d7f693a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{255f5b45c4d32f97f86c.js → ac0861014b3d2f1a1de2.js} +1 -1
- package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +1 -0
- package/assets/esri/core/workers/chunks/ae48ee283cfa5b3c14b0.js +1 -0
- package/assets/esri/core/workers/chunks/b38b6fe08a367e9de4f5.js +1 -0
- package/assets/esri/core/workers/chunks/{4e651869e9a196494694.js → b6e628b5d2643af4c19b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b37ab6b1cb4cfc85cd9d.js → b7828d7e2c5b75644057.js} +1 -1
- package/assets/esri/core/workers/chunks/bbd8fcb0bbba7bde3d9b.js +1 -0
- package/assets/esri/core/workers/chunks/{ec465abb0344ad719e9d.js → bd8e329ec74d921d311a.js} +1 -1
- package/assets/esri/core/workers/chunks/{56e6e70aa40e51827290.js → c3f94024c6c9eed9f273.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d17b45022dfd2548098.js → c5ddf8b347c31fe772a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee9af58ae202b803bba7.js → c7a0c4ca37ebd1d98cf1.js} +1 -1
- package/assets/esri/core/workers/chunks/d0659f1b0495734be4b3.js +1 -0
- package/assets/esri/core/workers/chunks/d7763c42754152510e13.js +2 -0
- package/assets/esri/core/workers/chunks/{b9a2b05ede02c305e865.js → d8ffb1502def5c85740b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7dfe1e78d2e66de6be22.js → d9ef244019954d5a8a27.js} +1 -1
- package/assets/esri/core/workers/chunks/{95403bb27a4ea0a4b7b1.js → ddbfa664e69612295785.js} +1 -1
- package/assets/esri/core/workers/chunks/dfa1b0308e5e82d1ddfe.js +1120 -0
- package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +1 -0
- package/assets/esri/core/workers/chunks/e74586b074d0fa6abb4b.js +1 -0
- package/assets/esri/core/workers/chunks/e7dff025780726d5feae.js +1 -0
- package/assets/esri/core/workers/chunks/e96fa029acba59c04e4e.js +2 -0
- package/assets/esri/core/workers/chunks/{55d28d3f5b8ced061e39.js → eaf73ce60f39a48ddd2a.js} +1 -1
- package/assets/esri/core/workers/chunks/ed2f2a5da830d058e339.js +1 -0
- package/assets/esri/core/workers/chunks/{e592f2483db71230e8e5.js → efd6ea0966f60ab19520.js} +1 -1
- package/assets/esri/core/workers/chunks/{944cb751c85d3a127f49.js → f52d081bbde5c95265cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{1de9be7b65109c207bd5.js → fbd5f3b81cd9f061824d.js} +1 -1
- package/assets/esri/core/workers/chunks/fdfbd201be372d3796bf.js +2 -0
- package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +1 -0
- package/assets/esri/layers/raster/formats/blosc-wasm.wasm +0 -0
- package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
- package/basemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +14 -14
- package/chunks/Component.glsl.js +37 -37
- package/chunks/CypherParser.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +15 -15
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/HUDMaterial.glsl.js +3 -3
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/Path.glsl.js +15 -15
- package/chunks/Pattern.glsl.js +20 -20
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +24 -24
- package/chunks/UnitFactory.js +1 -1
- package/chunks/Water.glsl.js +29 -20
- package/chunks/blosc-wasm.js +2 -0
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/parquet.js +1 -1
- package/chunks/pdf.js +57 -0
- package/chunks/text.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/Ellipsoid.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/geodesicConstants.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -56
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/geospatialPDF/parserUtils.js +2 -0
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/parquet.js +1 -1
- package/layers/raster/datasets/ZarrRaster.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/blosc.js +2 -0
- package/layers/support/BuildingFilter.js +1 -1
- package/layers/support/ControlPoint.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/IntegratedMeshSemantics.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/fieldUtils.d.ts +23 -87
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/geospatialPDFUtils.d.ts +63 -0
- package/layers/support/geospatialPDFUtils.js +2 -0
- package/layers/support/layersMapping.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/ajv/ajv.bundle-wrapper.js +1 -1
- package/package.json +6 -6
- package/renderers/types.d.ts +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/smartMapping/statistics/support/attributeDensity.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/symbols/CIMSymbol.d.ts +9 -9
- package/symbols/PathSymbol3DLayer.d.ts +1 -1
- package/symbols/WaterSymbol3DLayer.d.ts +13 -1
- package/symbols/WaterSymbol3DLayer.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/views/2d/PaddedViewState.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/vectorTiles/constants.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ParquetLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/EnvironmentView.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/Manipulator3DBase.js +1 -1
- package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/config.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolFactory.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
- package/views/3d/layers/support/createTileBVHForLayer.js +1 -1
- package/views/3d/layers/support/selectTiles3DSpatialReference.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/SweptSphereVolume.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/BlendLayersTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/RasterColorizerTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TilingSchemeLogic.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/clampShadowPosition.glsl.js +2 -0
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +14 -14
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/Attribution.js +5 -5
- package/views/DOMContainer.d.ts +2 -1
- package/views/MapView.d.ts +1 -0
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/ViewingMode.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/helpMessageUtils.js +1 -1
- package/views/draw/support/managers/EditSessionManager.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
- package/views/interactive/editGeometry/operations/AddOrUpdatePart.js +1 -1
- package/views/layers/support/editableLayerViews.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/spatialReferenceSupport.js +1 -1
- package/views/webgl/Program.js +3 -3
- package/views/webgl/ShaderBuilder.js +23 -23
- package/views/webgl/ShaderTranspiler.js +2 -2
- package/webscene/Slide.js +1 -1
- package/webscene/VirtualLighting.d.ts +2 -4
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +17 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/forms/types.d.ts +23 -1
- package/assets/esri/core/workers/chunks/021bd07b9a3e70598840.js +0 -1
- package/assets/esri/core/workers/chunks/032733b863426c5bde00.js +0 -1121
- package/assets/esri/core/workers/chunks/144f18a3dd2c8cf07cf7.js +0 -1
- package/assets/esri/core/workers/chunks/170e68624b71ac96de4a.js +0 -1
- package/assets/esri/core/workers/chunks/23fc1c1ed483ed3b2298.js +0 -1
- package/assets/esri/core/workers/chunks/2634927d26cb1139c6d0.js +0 -1
- package/assets/esri/core/workers/chunks/2d1b8154ee40afc9d40b.js +0 -1
- package/assets/esri/core/workers/chunks/2d3e977f3b75474d7ebc.js +0 -1
- package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +0 -2
- package/assets/esri/core/workers/chunks/5f324d88785ffcb73ae0.js +0 -1
- package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +0 -2
- package/assets/esri/core/workers/chunks/723c9ad4c25be2b82476.js +0 -1
- package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +0 -1
- package/assets/esri/core/workers/chunks/817bf487df056da1e6ec.js +0 -1
- package/assets/esri/core/workers/chunks/89e55895683369b5277a.js +0 -1
- package/assets/esri/core/workers/chunks/8a820e303941b351de81.js +0 -1
- package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +0 -1
- package/assets/esri/core/workers/chunks/90d567e920b6982b402d.js +0 -1
- package/assets/esri/core/workers/chunks/919115788da38049aea7.js +0 -2
- package/assets/esri/core/workers/chunks/97cdcedfe853280f6258.js +0 -1
- package/assets/esri/core/workers/chunks/9ebc6026934400fc1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/b33e7e74cf8fa3926617.js +0 -1
- package/assets/esri/core/workers/chunks/b4a325dcf50e276751d7.js +0 -1
- package/assets/esri/core/workers/chunks/bb2af16e55cb39163827.js +0 -1
- package/assets/esri/core/workers/chunks/be5857b0d1b00faf430b.js +0 -1
- package/assets/esri/core/workers/chunks/cd9100a7c8309dfa7569.js +0 -1
- package/assets/esri/core/workers/chunks/d5bb9f9b7b341c671525.js +0 -1
- package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +0 -2
- package/assets/esri/core/workers/chunks/e3bcd2e356f75afc316a.js +0 -1
- package/assets/esri/core/workers/chunks/e507dfc4788295d9c244.js +0 -1
- package/assets/esri/core/workers/chunks/e58f51618251f74aaafd.js +0 -1
- package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +0 -1
- package/assets/esri/core/workers/chunks/e83806797979138fd22a.js +0 -1
- package/assets/esri/core/workers/chunks/ea71850ba87ae6038000.js +0 -1
- package/assets/esri/core/workers/chunks/f537a5e808dc546813c7.js +0 -1
- package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +0 -2
- package/chunks/NativeLine.glsl.js +0 -8
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +0 -2
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{919115788da38049aea7.js.LICENSE.txt → 3d851710f7fcc27c5b60.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fe811d651d201f698b8f.js.LICENSE.txt → 5bdd95eeb8f34dbf26f2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js.LICENSE.txt → 5e47026c681238038955.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4a41bf3d1e2e9bb79771.js.LICENSE.txt → d7763c42754152510e13.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d96e63d66f7b1f4ea54a.js.LICENSE.txt → e96fa029acba59c04e4e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{70695e0fb53018d48e7b.js.LICENSE.txt → fdfbd201be372d3796bf.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[6553,7380],{52106(e,t,r){r.d(t,{A:()=>M});var i,o,s=r(32198),n=r(91429),a=r(69540),l=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(12195),y=r(24326),m=r(65864),h=r(50498),g=r(55156),f=r(60950),b=r(54339),v=r(40124),C=r(94128),w=r(33910);const T=Symbol("meshGeometryHandles");function S(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let M=class extends((0,a.OU)(u.o)){static{i=C.Z}static{o=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperties(this,{uid:{value:(0,y.c)(),configurable:!0},_lastMeshTransform:{value:{},configurable:!0,writable:!0,enumerable:!1}}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,f.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,g.I)(this.origin);if(e)return(0,b.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){let e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:S(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,d.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(T);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],T)}};(0,s.Cg)([(0,n.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],M.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,n.MZ)({value:null})],M.prototype,"attributes",null),(0,s.Cg)([(0,n.MZ)({value:null,types:h.yR,json:{read:m.rS}})],M.prototype,"geometry",null),(0,s.Cg)([(0,n.MZ)()],M.prototype,"distance",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,s.Cg)([(0,n.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,s.Cg)([(0,n.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,s.Cg)([(0,n.MZ)({type:v.A,value:null})],M.prototype,"popupTemplate",null),(0,s.Cg)([(0,n.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,n.MZ)({value:null,types:w.Es})],M.prototype,"symbol",null),(0,s.Cg)([(0,n.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=o=(0,s.Cg)([(0,n.$K)("esri.Graphic")],M)},69052(e,t,r){r.d(t,{hr:()=>o});var i=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,i,o=0,s=!1){return(i-=o)<t?i+=n(e,t-i):i>r&&(i-=n(e,i-r)),s&&i===r&&(i=t),i+o}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));r.d(t,["ie",0,l,"uC",0,a])},46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,s]=e.split(".",2),n=/^\s*\d+\s*$/;if(!r?.match||!n.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!s?.match||!n.test(s)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(s,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(56372),o=r(7762),s=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof o.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let s=o.filter(e=>!i.includes(e)),d=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),m=p(e);if(m&&n.has(m)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,g=a(e)&&a(t);for(let i of y){let o,s=u(e,i),n=u(t,i);if((g||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&p(s)===p(n)?c(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null==h?h={type:"partial",diff:{[i]:o}}:h.diff[i]=o)}}return h}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},46130(e,t,r){r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},18370(e,t,r){r.d(t,{z:()=>o});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new i(e)}},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},52039(e,t,r){r.d(t,{O7:()=>d,Y_:()=>m,el:()=>u});var i=r(69052),o=(r(49186),r(18370)),s=r(17676),n=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function u(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let o=(0,l.Vp)(i);if(!o)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(o);return["xmin"in t?t:new n.A(t)]}let[a,u]=o.valid,d=!1;for(let t of e){if(!t)continue;if("point"===t.type){d||=t.x>=u,d||=t.x<=a;continue}let{extent:e}=t;if(null==e){d=!0;break}d||=e.xmin>=u,d||=e.xmin<=a,d||=e.xmax>=u,d||=e.xmax<=a}if(!d)return e;let[{foldInto360Range:y},m]=await(0,s.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),h=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(y(t,h),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,o.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function d(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[o,s]=i.valid,n=2*s,a=0,u=0;t>s?a=Math.ceil(Math.abs(t-s)/n):t<o&&(a=-Math.ceil(Math.abs(t-o)/n)),e>s?u=Math.ceil(Math.abs(e-s)/n):e<o&&(u=-Math.ceil(Math.abs(e-o)/n));let p=e+(a-u)*n,c=p-t;return c>s?p-=n:c<o&&(p+=n),p}function y(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,o]=t.valid;return new i.hr(r,o)}const m=y(a.A.WGS84);y(a.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>a,kS:()=>u,kd:()=>l});var i=r(82799),o=r(16930),s=r(52006),n=r(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,o]=e.b;r[0]+=t,i[0]+=t,o[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}},55156(e,t,r){r.d(t,{I:()=>o});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},39622(e,t,r){r.r(t),r.d(t,{default:()=>xt});var i=r(32198),o=r(92602),s=r(91429),n=r(46130),a=r(4576),l=r(7762),u=r(49186),p=r(53966),c=r(25728),d=r(93637),y=r(17676),m=r(36708),h=r(86211),g=r(84952),f=r(5443),b=r(48526),v=r(99917),C=r(16930),w=r(21325),T=r(52106),S=r(40124),M=r(20655),A=r(80812),N=r(10407),O=r(65494),I=r(78888),Z=r(25482),D=r(2073),j=r(93223);let F=class extends Z.o{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"dataType",void 0),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],F.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[String]})],F.prototype,"parameterNames",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"restrictionUsageParameterName",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],F.prototype,"timeNeutralAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"trafficSupport",void 0),(0,i.Cg)([(0,j.e)(D.dn)],F.prototype,"units",void 0),(0,i.Cg)([(0,j.e)(D.WU)],F.prototype,"usageType",void 0),F=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkAttribute")],F);const B=F;let P=class extends Z.o{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i.Cg)([(0,s.MZ)({type:Number})],P.prototype,"buildTime",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],P.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[B]})],P.prototype,"networkAttributes",void 0),(0,i.Cg)([(0,s.MZ)()],P.prototype,"networkSources",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],P.prototype,"state",void 0),P=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkDataset")],P);const x=P;var L=r(69540),R=r(36005),E=r(43937);let _=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){let{restrictionAttributeNames:r}=t;return null==r?null:r.map(e=>D.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map(e=>D.OC.toJSON(e)))}};(0,i.Cg)([(0,s.MZ)({type:[Object],json:{write:!0}})],_.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"description",void 0),(0,i.Cg)([(0,j.e)(D.dd,{ignoreUnknown:!1})],_.prototype,"distanceAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"id",void 0),(0,i.Cg)([(0,R.w)("id",["id","itemId"])],_.prototype,"readId",null),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],_.prototype,"impedanceAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],_.prototype,"restrictionAttributeNames",void 0),(0,i.Cg)([(0,R.w)("restrictionAttributeNames")],_.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,E.K)("restrictionAttributeNames")],_.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:{allowNull:!0}}})],_.prototype,"simplificationTolerance",void 0),(0,i.Cg)([(0,j.e)(D.hY)],_.prototype,"simplificationToleranceUnits",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],_.prototype,"timeAttributeName",void 0),(0,i.Cg)([(0,j.e)(D.ow)],_.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,j.e)(D.hE)],_.prototype,"uturnAtJunctions",void 0),_=(0,i.Cg)([(0,s.$K)("esri.rest.support.TravelMode")],_);let J=class extends Z.o{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){let r=t.supportedTravelModes?.find(({id:e})=>e===t.defaultTravelMode)??t.supportedTravelModes?.find(({itemId:e})=>e===t.defaultTravelMode);return r?_.fromJSON(r):null}};(0,i.Cg)([(0,s.MZ)()],J.prototype,"accumulateAttributeNames",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributeNames")],J.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributeNames")],J.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"capabilities",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"currentVersion",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"defaultTravelMode",void 0),(0,i.Cg)([(0,R.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],J.prototype,"readDefaultTravelMode",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,j.e)(D.Z7)],J.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"directionsSupportedLanguages",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],J.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"hasZ",void 0),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],J.prototype,"impedance",void 0),(0,i.Cg)([(0,s.MZ)({type:x})],J.prototype,"networkDataset",void 0),(0,i.Cg)([(0,s.MZ)({type:[_]})],J.prototype,"supportedTravelModes",void 0),J=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkServiceDescription")],J);var U=r(2272);function k(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}async function $(e,t,r){if(!e)throw new u.A("network-service:missing-url","Url to Network service is missing");let i=(0,U.jV)({f:"json",token:t},r),{data:o}=await(0,I.A)(e,i),{defaultTravelMode:s,supportedTravelModes:n}=await(o.currentVersion>=10.4?async function(e,t,r){try{let i=(0,U.jV)({f:"json",token:t},r),o=(0,g.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,I.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new u.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){let r=(0,U.jV)({f:"json"},t),{data:i}=await(0,I.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};let{owningSystemUrl:o}=i,s=(0,g.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,I.A)(s,r),a=(0,d.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};let l=(0,U.Dl)(o),u={f:"json",serviceName:/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas"},p=(0,U.jV)(u,t),c=(0,g.UC)(a)+"/GetTravelModes/execute",y=await(0,I.A)(c,p),m=[],h=null;if(y?.data?.results?.length){let e=y.data.results;for(let t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(let{attributes:e}of t.value.features)if(e){let t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r));return o.defaultTravelMode=s,o.supportedTravelModes=n,J.fromJSON(o)}var q=r(16649),W=r(52039);function G(e,t){if(null==e)return null;let r={},i=RegExp(`^${t}`,"i");for(let o of Object.keys(e))if(i.test(o)){let i=o.slice(t.length);r[D.et.fromJSON(i)]=e[o]}return r}function V(e,t,r){if(null!=e){t.attributes||={};for(let i in e){let o=D.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function K(e){let t={};for(let r of Object.keys(e)){let i=r;t[D.et.fromJSON(i)]=e[r]}return t}function z(e){let t={};for(let r of Object.keys(e)){let i=r;t[D.et.toJSON(i)]=e[r]}return t}function H(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Y(e){let t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.locateSettings&&=JSON.stringify(t.locateSettings),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var Q=r(22671),X=r(66552),ee=r(37807);const te=new X.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let re=class extends ee.A{constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{read:te.read,write:te.write}})],re.prototype,"type",void 0),re=(0,i.Cg)([(0,s.$K)("esri.rest.support.NAMessage")],re);const ie=re;var oe=r(82799),se=r(86738);let ne=class extends Z.o{constructor(e){super(e)}};(0,i.Cg)([(0,s.MZ)({json:{read:{source:"string"}}})],ne.prototype,"text",void 0),(0,i.Cg)([(0,j.e)(D.Ec,{name:"stringType"})],ne.prototype,"type",void 0),ne=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsString")],ne);const ae=ne;let le=class extends Z.o{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return H(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return se.A.fromJSON(t.point)}};(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],le.prototype,"arriveTime",void 0),(0,i.Cg)([(0,s.MZ)()],le.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,R.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],le.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,s.MZ)({type:se.A})],le.prototype,"geometry",void 0),(0,i.Cg)([(0,R.w)("geometry",["point"])],le.prototype,"readGeometry",null),(0,i.Cg)([(0,s.MZ)({type:[ae]})],le.prototype,"strings",void 0),le=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsEvent")],le);const ue=le;let pe=class extends T.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}set attributes(e){super.attributes=e}readGeometry(e,t){let r=function(e){if(null==e||""===e)return null;let t,r,i,o,s,n,a,l,u=0,p=0,c=0,d=0,y=[],m=0,h=0,g=0;if(s=e.match(/((\+|-)[^+\-|]+|\|)/g),s||=[],0===parseInt(s[m],32)){m=2;let e=parseInt(s[m],32);m++,n=parseInt(s[m],32),m++,1&e&&(h=s.indexOf("|")+1,a=parseInt(s[h],32),h++),2&e&&(g=s.indexOf("|",h)+1,l=parseInt(s[g],32),g++)}else n=parseInt(s[m],32),m++;for(;m<s.length&&"|"!==s[m];){t=parseInt(s[m],32)+u,m++,u=t,r=parseInt(s[m],32)+p,m++,p=r;let e=[t/n,r/n];h&&(o=parseInt(s[h],32)+c,h++,c=o,e.push(o/a)),g&&(i=parseInt(s[g],32)+d,g++,d=i,e.push(i/l)),y.push(e)}return{paths:[y],hasZ:h>0,hasM:g>0}}(t.compressedGeometry);return null==r?null:oe.A.fromJSON(r)}};(0,i.Cg)([(0,s.MZ)({type:[ue]})],pe.prototype,"events",void 0),(0,i.Cg)([(0,s.MZ)({types:{base:null,key:"type",typeMap:{polygon:oe.A},defaultKeyValue:"polygon"}})],pe.prototype,"geometry",void 0),(0,i.Cg)([(0,R.w)("geometry",["compressedGeometry"])],pe.prototype,"readGeometry",null),(0,i.Cg)([(0,s.MZ)({type:[ae]})],pe.prototype,"strings",void 0),pe=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsFeature")],pe);const ce=pe;let de=class extends Q.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];let r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&C.A.fromJSON(r);return e.map(e=>{let t=ce.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(let e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t})}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new oe.A({spatialReference:t});let r=[];for(let t of e)for(let e of t.paths)r.push(...e);let i=[];r.forEach((e,t)=>{(0===t||e[0]!==r[t-1][0]||e[1]!==r[t-1][1])&&i.push(e)});let{hasM:o,hasZ:s}=e[0];return new oe.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map(({geometry:e})=>e),this.extent.spatialReference):null}get strings(){return this.features.flatMap(({strings:e})=>e).filter(a.Ru)}};(0,i.Cg)([(0,s.MZ)({type:f.A,json:{read:{source:"summary.envelope"}}})],de.prototype,"extent",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0})],de.prototype,"features",void 0),(0,i.Cg)([(0,R.w)("features")],de.prototype,"readFeatures",null),(0,i.Cg)([(0,s.MZ)()],de.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],de.prototype,"mergedGeometry",null),(0,i.Cg)([(0,s.MZ)()],de.prototype,"routeId",void 0),(0,i.Cg)([(0,s.MZ)()],de.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)({value:null,readOnly:!0})],de.prototype,"strings",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],de.prototype,"totalDriveTime",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalLength"}}})],de.prototype,"totalLength",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalTime"}}})],de.prototype,"totalTime",void 0),de=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsFeatureSet")],de);const ye=de;let me=class extends Z.o{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"directionLines",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"directionPoints",void 0),(0,i.Cg)([(0,s.MZ)({type:ye,json:{write:!0}})],me.prototype,"directions",void 0),(0,i.Cg)([(0,s.MZ)({type:T.A,json:{write:!0}})],me.prototype,"route",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],me.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)({type:[T.A],json:{write:!0}})],me.prototype,"stops",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedEdges",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedJunctions",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedTurns",void 0),me=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteResult")],me);const he=me;function ge(e){return e?Q.A.fromJSON(e).features.filter(a.Ru):[]}let fe=class extends Z.o{constructor(e){super(e),this.checksum=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return ge(t.barriers)}readPolylineBarriers(e){return ge(e)}readPolygonBarriers(e){return ge(e)}};function be(e){return e instanceof Q.A}async function ve(e,t,r){let i=[],o=[],s={},n={},a=(0,U.Dl)(e),{path:l}=a;be(t.stops)&&k(t.stops.features,o,"stops.features",s),be(t.pointBarriers)&&k(t.pointBarriers.features,o,"pointBarriers.features",s),be(t.polylineBarriers)&&k(t.polylineBarriers.features,o,"polylineBarriers.features",s),be(t.polygonBarriers)&&k(t.polygonBarriers.features,o,"polygonBarriers.features",s);let u=await(0,W.el)(o);for(let e in s){let t=s[e];i.push(e),n[e]=u.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await $(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)e.z=void 0}p.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(let e in n)n[e].forEach((r,i)=>{(0,q.Jt)(t,e)[i].geometry=r});let c={...r,query:{...a.query,...Y(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,I.A)(d,c);return function(e){let{barriers:t,checksum:r,directionLines:i,directionPoints:o,directions:s,messages:n,polygonBarriers:a,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:y}=e,m=e=>{let t=g.find(t=>t.routeName===e);if(null!=t)return t;let r={routeId:g.length+1,routeName:e};return g.push(r),r},h=e=>{let t=g.find(t=>t.routeId===e);if(null!=t)return t;let r={routeId:e,routeName:null};return g.push(r),r},g=[];u?.features.forEach((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;let r=e.attributes.Name,i=t+1;g.push({routeId:i,routeName:r,route:e})}),s?.forEach(e=>{let{routeName:t}=e;m(t).directions=e});let f=p?.features.every(e=>null==e.attributes.RouteName)&&g.length>0?g[0].routeName:null;return p?.features.forEach(e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);let t=f??e.attributes.RouteName,r=m(t);r.stops??=[],r.stops.push(e)}),i?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)}),o?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=o;r.directionPoints??={features:[],geometryType:i,spatialReference:s},r.directionPoints.features.push(e)}),c?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)}),d?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)}),y?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)}),fe.fromJSON({barriers:t,checksum:r,messages:n,polygonBarriers:a,polylineBarriers:l,routeResults:g})}(y)}(0,i.Cg)([(0,s.MZ)({type:String})],fe.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({type:[ie]})],fe.prototype,"messages",void 0),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,R.w)("pointBarriers",["barriers"])],fe.prototype,"readPointBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,R.w)("polylineBarriers")],fe.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,R.w)("polygonBarriers")],fe.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[he]})],fe.prototype,"routeResults",void 0),fe=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteSolveResult")],fe);var Ce,we=r(33910);let Te=class extends((0,L.OU)(Z.o)){static{Ce=this}constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new Ce({directionLineType:D.gD.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){let e={ObjectID:this.objectId,DirectionLineType:this.directionLineType?D.gD.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Se;(0,i.Cg)([(0,s.MZ)({type:D.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:D.gD.read}}})],Te.prototype,"directionLineType",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Te.prototype,"directionPointId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Meters"}}})],Te.prototype,"distance",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Minutes"}}})],Te.prototype,"duration",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Te.prototype,"fromLevel",void 0),(0,i.Cg)([(0,s.MZ)({type:oe.A})],Te.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Te.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Te.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Te.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Te.prototype,"toLevel",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Te.prototype,"type",void 0),Te=Ce=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionLine")],Te);let Me=class extends((0,L.OU)(Z.o)){static{Se=this}constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null==t.attributes.ArrivalTime?null:new Date(t.attributes.ArrivalTime)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AlternateName",alias:"Alternate Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Level",alias:"Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048}]}static fromGraphic(e){return new Se({alternateName:e.attributes.AlternateName??null,arrivalTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:D._6.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){let e={ObjectID:this.objectId,DirectionPointType:this.directionPointType?D._6.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Ae;(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.AlternateName"}}})],Me.prototype,"alternateName",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Me.prototype,"arrivalTime",void 0),(0,i.Cg)([(0,R.w)("arrivalTime",["attributes.ArrivalTime"])],Me.prototype,"readArrivalTime",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Me.prototype,"arrivalTimeOffset",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Azimuth"}}})],Me.prototype,"azimuth",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.BranchName"}}})],Me.prototype,"branchName",void 0),(0,i.Cg)([(0,s.MZ)({type:D._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:D._6.read}}})],Me.prototype,"directionPointType",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DisplayText"}}})],Me.prototype,"displayText",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ExitName"}}})],Me.prototype,"exitName",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A})],Me.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],Me.prototype,"intersectingName",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Level"}}})],Me.prototype,"level",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Name"}}})],Me.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Me.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Sequence"}}})],Me.prototype,"sequence",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],Me.prototype,"shortVoiceInstruction",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.StopID"}}})],Me.prototype,"stopId",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Me.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.TowardName"}}})],Me.prototype,"towardName",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Me.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],Me.prototype,"voiceInstruction",void 0),Me=Se=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionPoint")],Me);let Ne=class extends((0,L.OU)(Z.o)){static{Ae=this}constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}writeCosts(e,t){V(e,t,"Attr_")}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new Ae({addedCost:e.attributes.AddedCost??null,barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),curbApproach:null==e.attributes.CurbApproach?null:D.JJ.fromJSON(e.attributes.CurbApproach),fullEdge:null==e.attributes.FullEdge?null:D.fe.fromJSON(e.attributes.FullEdge),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null==e.attributes.Status?null:D.$r.fromJSON(e.attributes.Status),symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,CurbApproach:this.curbApproach?D.JJ.toJSON(this.curbApproach):null,FullEdge:this.fullEdge?D.fe.toJSON(this.fullEdge):null,Name:this.name,Status:this.status?D.$r.toJSON(this.status):null};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)()],Ne.prototype,"addedCost",void 0),(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:D.iM.read},write:{writer:D.iM.write}}})],Ne.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],Ne.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],Ne.prototype,"readCosts",null),(0,i.Cg)([(0,E.K)("costs")],Ne.prototype,"writeCosts",null),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:D.JJ.read}}})],Ne.prototype,"curbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:D.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:D.fe.read},write:{writer:D.fe.write}}})],Ne.prototype,"fullEdge",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A,json:{write:!0},value:null})],Ne.prototype,"geometry",null),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],Ne.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],Ne.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Ne.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.PosAlong"}})],Ne.prototype,"positionAlong",void 0),(0,i.Cg)([(0,s.MZ)({type:D.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:D.mt.read},write:{writer:D.mt.write}}})],Ne.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceID"}})],Ne.prototype,"sourceId",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceOID"}})],Ne.prototype,"sourceOid",void 0),(0,i.Cg)([(0,s.MZ)({type:D.$r.apiValues,json:{read:{source:"attributes.Status",reader:D.$r.read}}})],Ne.prototype,"status",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Ne.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Ne.prototype,"type",void 0),Ne=Ae=(0,i.Cg)([(0,s.$K)("esri.rest.support.PointBarrier")],Ne);var Oe,Ie=r(39829);let Ze=class extends((0,L.OU)(Z.o)){static{Oe=this}constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}writeCosts(e,t){V(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new Oe({barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var De;(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:D.iM.read},write:{writer:D.iM.write}}})],Ze.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],Ze.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],Ze.prototype,"readCosts",null),(0,i.Cg)([(0,E.K)("costs")],Ze.prototype,"writeCosts",null),(0,i.Cg)([(0,s.MZ)({type:Ie.A,json:{write:!0}})],Ze.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],Ze.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],Ze.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Ze.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)()],Ze.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Ze.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Ze.prototype,"type",void 0),Ze=Oe=(0,i.Cg)([(0,s.$K)("esri.rest.support.PolygonBarrier")],Ze);let je=class extends((0,L.OU)(Z.o)){static{De=this}constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new De({barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:D.iM.read}}})],je.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],je.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],je.prototype,"readCosts",null),(0,i.Cg)([(0,s.MZ)({type:oe.A,json:{write:!0}})],je.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],je.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],je.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],je.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)()],je.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],je.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"type",void 0),je=De=(0,i.Cg)([(0,s.$K)("esri.rest.support.PolylineBarrier")],je);let Fe=class extends Z.o{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}};var Be;(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Fe.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributes")],Fe.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributes")],Fe.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],Fe.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:_,json:{write:!0}})],Fe.prototype,"travelMode",void 0),Fe=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteSettings")],Fe);let Pe=class extends((0,L.OU)(Z.o)){static{Be=this}constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null==t.attributes.EndTimeUTC?null:new Date(t.attributes.EndTimeUTC)}readEndTimeOffset(e,t){return H(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null==t.attributes.StartTimeUTC?null:new Date(t.attributes.StartTimeUTC)}readStartTimeOffset(e,t){return H(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return G(t.attributes,"Total_")}readTotalViolations(e,t){return G(t.attributes,"TotalViolation_")}readTotalWait(e,t){return G(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Messages",alias:"Messages",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1024},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Version",alias:"Version",type:"esriFieldTypeString",editable:!0,nullable:!0,length:16}]}static fromGraphic(e){return new Be({analysisSettings:null==e.attributes.AnalysisSettings?null:Fe.fromJSON(JSON.parse(e.attributes.AnalysisSettings)),endTime:null==e.attributes.EndTime?null:new Date(e.attributes.EndTime),endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null==e.attributes.Messages?null:JSON.parse(e.attributes.Messages),name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null==e.attributes.StartTime?null:new Date(e.attributes.StartTime),startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null==e.attributes.TotalCosts?null:K(JSON.parse(e.attributes.TotalCosts)),totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){let e={ObjectID:this.objectId,AnalysisSettings:this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:this.endTime?.getTime()??null,EndUTCOffset:this.endTimeOffset,Messages:this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:this.startTime?.getTime()??null,StartUTCOffset:this.startTimeOffset,TotalCosts:this.totalCosts?JSON.stringify(z(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"analysisSettings",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Pe.prototype,"endTime",void 0),(0,i.Cg)([(0,R.w)("endTime",["attributes.EndTimeUTC"])],Pe.prototype,"readEndTime",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"endTimeOffset",void 0),(0,i.Cg)([(0,R.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Pe.prototype,"readEndTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],Pe.prototype,"firstStopId",void 0),(0,i.Cg)([(0,s.MZ)({type:oe.A})],Pe.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.LastStopID"}}})],Pe.prototype,"lastStopId",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"messages",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Name"}}})],Pe.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Pe.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Pe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Pe.prototype,"startTime",void 0),(0,i.Cg)([(0,R.w)("startTime",["attributes.StartTimeUTC"])],Pe.prototype,"readStartTime",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"startTimeOffset",void 0),(0,i.Cg)([(0,R.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Pe.prototype,"readStartTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.StopCount"}}})],Pe.prototype,"stopCount",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Pe.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalCosts",void 0),(0,i.Cg)([(0,R.w)("totalCosts",["attributes"])],Pe.prototype,"readTotalCosts",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalDistance",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalDuration",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalLateDuration",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalViolations",void 0),(0,i.Cg)([(0,R.w)("totalViolations",["attributes"])],Pe.prototype,"readTotalViolations",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalWait",void 0),(0,i.Cg)([(0,R.w)("totalWait",["attributes"])],Pe.prototype,"readTotalWait",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalWaitDuration",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Pe.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"version",void 0),Pe=Be=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteInfo")],Pe);var xe=r(56507);const Le={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Re=r(65864),Ee=r(50498);let _e=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],_e.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,s.MZ)({types:Ee.yR,json:{read:Re.rS,write:!0}})],_e.prototype,"geometry",void 0),(0,i.Cg)([(0,j.e)(D.Vj)],_e.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerName",write:!0}})],_e.prototype,"name",void 0),(0,i.Cg)([(0,j.e)(D.vS,{name:"spatialRel"})],_e.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_e.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_e.prototype,"where",void 0),_e=(0,i.Cg)([(0,s.$K)("esri.rest.support.DataLayer")],_e);var Je=r(10107),Ue=r(64108);let ke=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.name=null,this.where=null}};(0,i.Cg)([(0,Je.MZ)({json:{write:!0}})],ke.prototype,"name",void 0),(0,i.Cg)([(0,Je.MZ)({json:{write:!0}})],ke.prototype,"where",void 0),ke=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingSource")],ke);const $e=ke;let qe=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.allowAutoRelocate=null,this.sources=null}};(0,i.Cg)([(0,Je.MZ)({type:Boolean,json:{write:!0}})],qe.prototype,"allowAutoRelocate",void 0),(0,i.Cg)([(0,Je.MZ)({type:[$e],json:{write:!0}})],qe.prototype,"sources",void 0),qe=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingBase")],qe);const We=qe;let Ge=class extends We{constructor(e){super(e),this.tolerance=null,this.toleranceUnits=null}};(0,i.Cg)([(0,Je.MZ)({type:Number,json:{write:!0}})],Ge.prototype,"tolerance",void 0),(0,i.Cg)([(0,j.e)(D.Y8)],Ge.prototype,"toleranceUnits",void 0),Ge=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSetting")],Ge);const Ve=Ge;let Ke=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.stops=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null}};(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{write:!0}})],Ke.prototype,"stops",void 0),(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{name:"barriers",write:!0}})],Ke.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,Je.MZ)({type:We,json:{write:!0}})],Ke.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,Je.MZ)({type:We,json:{write:!0}})],Ke.prototype,"polygonBarriers",void 0),Ke=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingsOverrides")],Ke);const ze=Ke;let He=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.default=null,this.overrides=null}};(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{write:!0}})],He.prototype,"default",void 0),(0,i.Cg)([(0,Je.MZ)({type:ze,json:{write:!0}})],He.prototype,"overrides",void 0),He=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettings")],He);const Ye=He;var Qe;let Xe=class extends Q.A{static{Qe=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Qe({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Xe.prototype,"doNotLocateOnRestrictedElements",void 0),Xe=Qe=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkFeatureSet")],Xe);let et=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};var tt;(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],et.prototype,"url",void 0),et=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkUrl")],et);let rt=class extends((0,L.OU)(Z.o)){static{tt=this}constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.locateSettings=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnEmptyResults=null,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,xe.PZ)(tt,e)}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}writePointBarriers(e,t,r){it(e,t,r)}writePolygonBarrier(e,t,r){it(e,t,r)}writePolylineBarrier(e,t,r){it(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map(e=>D.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.OC.toJSON(e)))}readStartTime(e,t){let{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?_e.fromJSON(e):function(e){return e&&"url"in e}(e)?et.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Xe.fromJSON(e):function(e){return e&&"features"in e}(e)?Q.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){it(e,t,r)}};function it(e,t,r){null!=e&&(t[r]=l.A.isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON())}var ot;(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],rt.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributes")],rt.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributes")],rt.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)(Le)],rt.prototype,"apiKey",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],rt.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],rt.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,j.e)(D.Z7)],rt.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,j.e)(D.aJ)],rt.prototype,"directionsOutputType",void 0),(0,i.Cg)([(0,j.e)(D.$n)],rt.prototype,"directionsStyleName",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],rt.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecision",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionM",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionZ",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"ignoreInvalidLocations",void 0),(0,i.Cg)([(0,j.e)(D.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],rt.prototype,"impedanceAttribute",void 0),(0,i.Cg)([(0,s.MZ)({type:Ye,json:{write:!0}})],rt.prototype,"locateSettings",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"outputGeometryPrecision",void 0),(0,i.Cg)([(0,j.e)(D.hY)],rt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i.Cg)([(0,j.e)(D.Sr)],rt.prototype,"outputLines",void 0),(0,i.Cg)([(0,s.MZ)({type:C.A,json:{name:"outSR",write:!0}})],rt.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"overrides",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"barriers",write:!0}})],rt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,E.K)("pointBarriers")],rt.prototype,"writePointBarriers",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,E.K)("polygonBarriers")],rt.prototype,"writePolygonBarrier",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,E.K)("polylineBarriers")],rt.prototype,"writePolylineBarrier",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveObjectID",void 0),(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],rt.prototype,"restrictionAttributes",void 0),(0,i.Cg)([(0,R.w)("restrictionAttributes")],rt.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,E.K)("restrictionAttributes")],rt.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,j.e)(D.hE)],rt.prototype,"restrictUTurns",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnDirections",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnEmptyResults",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolygonBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolylineBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnRoutes",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnStops",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedEdges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedJunctions",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedTurns",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnZ",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"startTime",void 0),(0,i.Cg)([(0,R.w)("startTime")],rt.prototype,"readStartTime",null),(0,i.Cg)([(0,E.K)("startTime")],rt.prototype,"writeStartTime",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"stops",void 0),(0,i.Cg)([(0,R.w)("stops")],rt.prototype,"readStops",null),(0,i.Cg)([(0,E.K)("stops")],rt.prototype,"writeStops",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:_,json:{write:!0}})],rt.prototype,"travelMode",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useTimeWindows",void 0),rt=tt=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteParameters")],rt);let st=class extends((0,L.OU)(Z.o)){static{ot=this}constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return H(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return G(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return H(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}readServiceCosts(e,t){return G(t.attributes,"Attr_")}writeServiceCosts(e,t){V(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return G(t.attributes,"Violation_")}readWait(e,t){return G(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"DepartureUTCOffset",alias:"Departure Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new ot({arriveCurbApproach:null==e.attributes.ArrivalCurbApproach?null:D.JJ.fromJSON(e.attributes.ArrivalCurbApproach),arriveTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null==e.attributes.CumulativeCosts?null:K(JSON.parse(e.attributes.CumulativeCosts)),cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null==e.attributes.CurbApproach?null:D.JJ.fromJSON(e.attributes.CurbApproach),departCurbApproach:null==e.attributes.DepartureCurbApproach?null:D.JJ.fromJSON(e.attributes.DepartureCurbApproach),departTime:null==e.attributes.DepartureTime?null:new Date(e.attributes.DepartureTime),departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null==e.attributes.LocationType?null:D.EM.fromJSON(e.attributes.LocationType),name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null==e.attributes.ServiceCosts?null:K(JSON.parse(e.attributes.ServiceCosts)),serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null==e.attributes.Status?null:D.$r.fromJSON(e.attributes.Status),symbol:e.symbol,timeWindowEnd:null==e.attributes.TimeWindowEnd?null:new Date(e.attributes.TimeWindowEnd),timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null==e.attributes.TimeWindowStart?null:new Date(e.attributes.TimeWindowStart),timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){let e={ObjectID:this.objectId,ArrivalCurbApproach:this.arriveCurbApproach?D.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime?.getTime()??null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts?JSON.stringify(z(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach?D.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach?D.JJ.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime?.getTime()??null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType?D.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts?JSON.stringify(z(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status?D.$r.toJSON(this.status):null,TimeWindowEnd:this.timeWindowEnd?.getTime()??null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:this.timeWindowStart?.getTime()??null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:D.JJ.read}}})],st.prototype,"arriveCurbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],st.prototype,"arriveTime",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,R.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],st.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],st.prototype,"bearing",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],st.prototype,"bearingTol",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeCosts",void 0),(0,i.Cg)([(0,R.w)("cumulativeCosts",["attributes"])],st.prototype,"readCumulativeCosts",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeDistance",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeDuration",void 0),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:D.JJ.read},write:{writer:D.JJ.write}}})],st.prototype,"curbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:D.JJ.read}}})],st.prototype,"departCurbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],st.prototype,"departTime",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"departTimeOffset",void 0),(0,i.Cg)([(0,R.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],st.prototype,"readDepartTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],st.prototype,"distanceToNetworkInMeters",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A,json:{write:!0},value:null})],st.prototype,"geometry",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"lateDuration",void 0),(0,i.Cg)([(0,s.MZ)({type:D.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:D.EM.read},write:{writer:D.EM.write}}})],st.prototype,"locationType",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],st.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],st.prototype,"navLatency",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],st.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],st.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.PosAlong"}})],st.prototype,"positionAlong",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.RouteName"}})],st.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceCosts",void 0),(0,i.Cg)([(0,R.w)("serviceCosts",["attributes"])],st.prototype,"readServiceCosts",null),(0,i.Cg)([(0,E.K)("serviceCosts")],st.prototype,"writeServiceCosts",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceDistance",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceDuration",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Sequence"}})],st.prototype,"sequence",void 0),(0,i.Cg)([(0,s.MZ)({type:D.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:D.mt.read},write:{writer:D.mt.write}}})],st.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapX"}}})],st.prototype,"snapX",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapY"}}})],st.prototype,"snapY",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapZ"}}})],st.prototype,"snapZ",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceID"}})],st.prototype,"sourceId",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceOID"}})],st.prototype,"sourceOid",void 0),(0,i.Cg)([(0,s.MZ)({type:D.$r.apiValues,json:{name:"attributes.Status",read:{reader:D.$r.read},write:{writer:D.$r.write}}})],st.prototype,"status",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],st.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],st.prototype,"timeWindowEnd",void 0),(0,i.Cg)([(0,E.K)("timeWindowEnd")],st.prototype,"writeTimeWindowEnd",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"timeWindowEndOffset",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],st.prototype,"timeWindowStart",void 0),(0,i.Cg)([(0,E.K)("timeWindowStart")],st.prototype,"writeTimeWindowStart",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"timeWindowStartOffset",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],st.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"violations",void 0),(0,i.Cg)([(0,R.w)("violations",["attributes"])],st.prototype,"readViolations",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"waitDuration",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"wait",void 0),(0,i.Cg)([(0,R.w)("wait",["attributes"])],st.prototype,"readWait",null),st=ot=(0,i.Cg)([(0,s.$K)("esri.rest.support.Stop")],st);var nt=r(4146),at=r(63074),lt=r(34287),ut=r(8303),pt=r(25036),ct=r(60694),dt=r(94985),yt=r(31593),mt=r(53930);let ht=class extends Z.o{constructor(e){super(e),this.break=new mt.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new mt.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new mt.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new mt.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new mt.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new mt.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"break",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"first",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"unlocated",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"last",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"middle",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"waypoint",void 0),ht=(0,i.Cg)([(0,s.$K)("esri.layers.support.RouteStopSymbols")],ht);let gt=class extends Z.o{constructor(e){super(e),this.directionLines=new yt.A({color:[0,122,194],width:6}),this.directionPoints=new mt.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new mt.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new dt.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new yt.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new yt.A({width:8,color:[20,89,127]}),this.stops=new ht}};function ft(e){if(!e.length)return;let t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e),i=Math.max(...r,0);for(let e of t)e.objectId??=++i}function bt(e,t){return e.length===t.length&&vt(e)&&vt(t)}function vt(e){return e.every(({objectId:e})=>null!=e)}function Ct(e,t){return!!e.length||!!t.length}function wt(e){return e.length?e:null}function Tt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Tt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Tt("esriGeometryPolyline")}}}function St(e){return"layers"in e}async function Mt(e){let t=C.A.WGS84;return await(0,v.initializeProjection)(e.spatialReference,t),(0,v.project)(e,t)}function At(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(let r of e)r.symbol=t}function Nt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Ot(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.oU)(e,t,"meters")}(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"directionLines",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],gt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],gt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Ac})],gt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,s.MZ)({type:ht})],gt.prototype,"stops",void 0),gt=(0,i.Cg)([(0,s.$K)("esri.layers.support.RouteSymbols")],gt);const It=l.A.ofType(Te),Zt=l.A.ofType(Me),Dt=l.A.ofType(Ne),jt=l.A.ofType(Ze),Ft=l.A.ofType(je),Bt=l.A.ofType(st);let Pt=class extends((0,at.dM)((0,pt.j)((0,lt.q)((0,ut.A)((0,c.M)(nt.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new gt,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Dt,this.polygonBarriers=new jt,this.polylineBarriers=new Ft,this.routeInfo=null,this.spatialReference=C.A.WGS84,this.stops=new Bt,this.type="route"}initialize(){let e=()=>{this._setStopSymbol(this.stops)},t=()=>{At(this.pointBarriers,this.defaultSymbols.pointBarriers)},r=()=>{At(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},i=()=>{At(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([(0,m.on)(()=>this.stops,"change",e,{sync:!0,onListenerAdd:e}),(0,m.on)(()=>this.pointBarriers,"change",t,{sync:!0,onListenerAdd:t}),(0,m.on)(()=>this.polylineBarriers,"change",r,{sync:!0,onListenerAdd:r}),(0,m.on)(()=>this.polygonBarriers,"change",i,{sync:!0,onListenerAdd:i})])}writeFeatureCollectionWebmap(e,t,r,i){let o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),s=o.map((e,t)=>t),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,d.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>Te.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>Me.fromGraphic(e))}get fullExtent(){let e=new f.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:C.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;let t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;let{spatialReference:r}=t.at(0).geometry;if(null==r)return e;let i=t.toArray().map(e=>{let t=e.geometry;return[t.x,t.y]});return new b.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.maxScale))?.layerDefinition.maxScale??0}readMinScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.minScale))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>Ne.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>Ze.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>je.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>Pe.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){let r=St(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return C.A.WGS84;let{layerDefinition:i,featureSet:o}=r[0],s=o.features[0]?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??w.KK;return C.A.fromJSON(s)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>st.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null==e?this._set("url",o.A.routeServiceUrl):this._set("url",(0,ct.Jf)(e,p.A.getLogger(this)))}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();let{fullExtent:e,portalItem:t}=this;if(!t)throw new u.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new u.A("routelayer:route-unsolved","save() requires a solved route");let{portal:r}=t;await r.signIn(),r.user||await t.reload();let{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new u.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");let s={messages:[],origin:"portal-item",portal:r,url:i?(0,g.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Mt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new u.A("routelayer:route-unsolved","saveAs() requires a solved route");let r=A.default.from(e).clone();r.extent??=await Mt(this.fullExtent),r.id=null,r.portal??=M.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",N.mm.MULTI_LAYER,"Route Layer"];let{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();let s=t?.folder,a=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:a}),this.portalItem=r,(0,n.v)(o),o.portalItem=r,r}async solve(e,t){ft(this.stops),ft(this.pointBarriers),ft(this.polylineBarriers),ft(this.polygonBarriers);let r=e?.stops??this.stops,i=e?.pointBarriers??wt(this.pointBarriers),o=e?.polylineBarriers??wt(this.polylineBarriers),s=e?.polygonBarriers??wt(this.polygonBarriers);if(null==r)throw new u.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||l.A.isCollection(r)&&r.length<2)throw new u.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(l.A.isCollection(r))for(let e of r)e.routeName=null;let n=e?.apiKey,{checksum:a,url:p}=this,c=await this._getServiceDescription(p,n,t),d=e?.travelMode??c.defaultTravelMode,m=e?.accumulateAttributes??[];d&&(m.push(d.distanceAttributeName),d.timeAttributeName&&m.push(d.timeAttributeName));let h,g={accumulateAttributes:m,checksum:a,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveObjectID:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},f=rt.from(e??{});f.set(g);try{h=await ve(p,f,t)}catch(e){throw(0,y.zf)(e)?e:new u.A("routelayer:failed-route-request","the routing request failed",{error:e})}let b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),this._populatePortalFields(b,c,f),b}update(e){let{checksum:t,directionLines:r,directionPoints:i,pointBarriers:o,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;bt(l,this.stops)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.positionAlong=r.positionAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}(l,this.stops):this.set({stops:l}),Ct(o,this.pointBarriers)&&(bt(o,this.pointBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}(o,this.pointBarriers):this.set({pointBarriers:o})),Ct(n,this.polylineBarriers)&&(bt(n,this.polylineBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(n,this.polylineBarriers):this.set({polylineBarriers:n})),Ct(s,this.polygonBarriers)&&(bt(s,this.polygonBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(s,this.polygonBarriers):this.set({polygonBarriers:s})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){let o=(St(e)?e.layers:e.featureCollection?.layers)?.find(e=>e.layerDefinition.name===t);if(null==o)return new l.A;let{layerDefinition:s,popupInfo:n,featureSet:a}=o,u=s.drawingInfo.renderer,{features:p}=a,c=a.spatialReference??s.spatialReference??s.extent.spatialReference??w.KK,d=u&&(0,O.L)(u),y=C.A.fromJSON(c),m=p.map(e=>{let i=T.A.fromJSON(e);i.geometry&&e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=y);let o=r(i);return o.symbol??=d?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=n&&S.A.fromJSON(n),o});return i&&m.some(({symbol:e})=>!e)&&i(m),new l.A(m)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;let i=await $(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){let t=l.A.isCollection(e)?e.toArray():e;if(!t||!t.length||!this.defaultSymbols.stops||t.every(({symbol:e})=>!!e))return;let{first:r,last:i,middle:o,unlocated:s,waypoint:n,break:u}=this.defaultSymbols.stops,p=t.map(({sequence:e})=>e).filter(a.Ru),c=t.length===p.length;if(!this.routeInfo&&!c||1===t.length)return void t.forEach((e,s)=>{switch(s){case 0:e.symbol=r;break;case t.length-1:e.symbol=i;break;default:e.symbol=o}});let d=Math.min(...p),y=Math.max(...p);for(let e of t)e.symbol=e.sequence===d?r:e.sequence===y?i:this.routeInfo&&"ok"!==e.status&&"not-located-on-closest"!==e.status?s:"waypoint"===e.locationType?n:"break"===e.locationType?u:o}_toRouteLayerSolution(e){let{checksum:t,routeResults:r}=e,i=r[0].stops?.map(e=>st.fromJSON(e.toJSON()));this._setStopSymbol(i);let o=new Bt(i),s=new jt(e.polygonBarriers?.map(e=>Ze.fromJSON(e.toJSON())));At(s,this.defaultSymbols.polygonBarriers);let n=new Ft(e.polylineBarriers?.map(e=>je.fromJSON(e.toJSON())));At(n,this.defaultSymbols.polylineBarriers);let a=new Dt(e.pointBarriers?.map(e=>Ne.fromJSON(e.toJSON())));At(a,this.defaultSymbols.pointBarriers);let l=r[0].route?.toJSON(),u=Pe.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;let p=new Zt(r[0].directionPoints?.features.map(e=>Me.fromJSON(e.toJSON())));At(p,this.defaultSymbols.directionPoints);let c=new It(r[0].directionLines?.features.map(e=>Te.fromJSON(e.toJSON())));return At(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Te.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Me.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;let n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>function(e){let{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e)),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??Tt(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ne.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",Ze.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",je.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null==this.routeInfo?null:new l.A([this.routeInfo]),this.defaultSymbols.routeInfo,"esriGeometryPolyline",Pe.fields,"RouteInfo","Route Details")}_writeStops(){let e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",st.fields,"Stops","Stops");if(null==e)return null;let{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){let i=(t.networkDataset?.networkAttributes)?.filter(({usageType:e})=>"cost"===e)??[],o=r.travelMode??t.defaultTravelMode;if(null==o)return void p.A.getLogger(this).warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");let{timeAttributeName:s,distanceAttributeName:n}=o,a=i.find(({name:e})=>e===s),l=i.find(({name:e})=>e===n),c=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=a?.units,y=l?.units;if(!d||!y)throw new u.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");let m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(i.filter(({name:e})=>e===s||e===n||e===c||null!=e&&h.includes(e)).map(({name:e})=>e)),f=e=>{for(let t in e)g.has(t)||delete e[t]};for(let t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[c]??0,f(t.costs));for(let t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));for(let t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));let{routeInfo:b}=e,{findBestSequence:v,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:T,timeWindowsAreUTC:S}=r;b.analysisSettings=new Fe({accumulateAttributes:h,directionsLanguage:m,findBestSequence:v,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:T,timeWindowsAreUTC:S,travelMode:o}),b.totalDuration=Nt(b.totalCosts?.[s]??0,d),b.totalDistance=Ot(b.totalCosts?.[n]??0,y),b.totalLateDuration=Nt(b.totalViolations?.[s]??0,d),b.totalWaitDuration=Nt(b.totalWait?.[s]??0,d),null!=b.totalCosts&&f(b.totalCosts),null!=b.totalViolations&&f(b.totalViolations),null!=b.totalWait&&f(b.totalWait);for(let t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Nt(t.serviceCosts[s]??0,d),t.serviceDistance=Ot(t.serviceCosts[n]??0,y),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Nt(t.cumulativeCosts[s]??0,d),t.cumulativeDistance=Ot(t.cumulativeCosts[n]??0,y),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Nt(t.violations[s]??0,d),f(t.violations)),null!=t.wait&&(t.waitDuration=Nt(t.wait[s]??0,d),f(t.wait))}};(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Pt.prototype,"_featureCollection",void 0),(0,i.Cg)([(0,E.K)(["web-map","portal-item"],"_featureCollection")],Pt.prototype,"writeFeatureCollectionWebmap",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Pt.prototype,"_type",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],Pt.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:gt})],Pt.prototype,"defaultSymbols",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"directionLines",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Pt.prototype,"readDirectionLines",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Pt.prototype,"readDirectionPoints",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Pt.prototype,"featureCollectionType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"fullExtent",null),(0,i.Cg)([(0,s.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Pt.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,s.MZ)({type:["show","hide"]})],Pt.prototype,"listMode",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Pt.prototype,"maxScale",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Pt.prototype,"readMaxScale",null),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Pt.prototype,"minScale",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Pt.prototype,"readMinScale",null),(0,i.Cg)([(0,s.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Pt.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(Ne)})],Pt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPointBarriers",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(Ze)})],Pt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(je)})],Pt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Pt.prototype,"readRouteInfo",null),(0,i.Cg)([(0,s.MZ)({type:C.A})],Pt.prototype,"spatialReference",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Pt.prototype,"readSpatialReference",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(st)})],Pt.prototype,"stops",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Pt.prototype,"readStops",null),(0,i.Cg)([(0,s.MZ)()],Pt.prototype,"title",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Pt.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],Pt.prototype,"url",null),Pt=(0,i.Cg)([(0,s.$K)("esri.layers.RouteLayer")],Pt);const xt=Pt},76369(e,t,r){r.d(t,{LF:()=>T,M9:()=>S});var i=r(49186),o=r(93637),s=r(40876),n=r(59247),a=r(27865);class l extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null,i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));let o=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,n=this.location.source+":"+s.line+":"+s.column;if(r){let e=this.location.end,i="".padEnd(s.line.toString().length," "),a=r[o.line-1],l=(o.line===e.line?e.column:a.length+1)-o.column||1;t+="\n --\x3e "+n+"\n"+i+" |\n"+s.line+" | "+a+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+n}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}let i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e,t){return function(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}(e.replace(t,"\\$&").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(e,/[\\"]/g)}function n(e){return o(e,/[\\\]^-]/g)}let a={literal:e=>'"'+s(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+s(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){let t=p(e);return t&&0!==t.length?t:null}let t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:p(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function p(e){let t;if(!e)return[];try{t=function(e,t){let r,i,o={},s=(t=void 0===t?{}:t).grammarSource,n={start:re},a=re,u="none",p="grad",c="turn",d=Q("none"),y=H("none",!1),m=H(")",!1),h=H(",",!1),g=Y([" ","\t","\n","\r"],!1,!1,!1),f=Q("function"),b=H("(",!1),v=Q("identifier"),C=Y([["a","z"],"-"],!1,!1,!1),w=Q("percentage"),T=H("%",!1),S=Q("length"),M=H("px",!1),A=H("cm",!1),N=H("mm",!1),O=H("in",!1),I=H("pt",!1),Z=H("pc",!1),D=Q("angle"),j=H("deg",!1),F=H("rad",!1),B=H("grad",!1),P=H("turn",!1),x=Q("number"),L=Q("color"),R=H("#",!1),E=Y([["0","9"],["a","f"],["A","F"]],!1,!1,!1),_=Y(["+","-"],!1,!1,!1),J=Y([["0","9"]],!1,!1,!1),U=H(".",!1),k=H("e",!1),$=0|t.peg$currPos,q=$,W=[{line:1,column:1}],G=$,V=t.peg$maxFailExpected||[],K=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in n))throw Error("Can't start parsing from rule \""+t.startRule+'".');a=n[t.startRule]}function z(){return e.substring(q,$)}function H(e,t){return{type:"literal",text:e,ignoreCase:t}}function Y(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function Q(e){return{type:"other",description:e}}function X(t){let r,i=W[t];if(i)return i;if(t>=W.length)r=W.length-1;else for(r=t;!W[--r];);for(i=W[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return W[t]=i,i}function ee(e,t,r){let i=X(e),o=X(t);return{source:s,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function te(e){$<G||($>G&&(G=$,V=[]),V.push(e))}function re(){let e;return e=ie(),e===o&&(e=function(){let e,t;for(e=[];t=oe(),t!==o;)e.push(t);return e.length<1&&(e=o),e}()),e}function ie(){let t,r;return K++,t=$,ne(),e.substr($,4)===u?(r=u,$+=4):(r=o,0===K&&te(y)),r===o?($=t,t=o):(ne(),q=t,t=[]),K--,t===o&&0===K&&te(d),t}function oe(){let t,r,i,s;return t=$,ne(),r=function(){let t,r,i;return K++,t=$,r=ae(),r===o?($=t,t=o):(40===e.charCodeAt($)?(i="(",$++):(i=o,0===K&&te(b)),i===o?($=t,t=o):(q=t,t=r)),K--,t===o&&(r=o,0===K&&te(f)),t}(),r===o?($=t,t=o):(ne(),i=function(){let t,r,i,s,n,a,l,u;if(t=$,r=se(),r!==o){for(i=[];s=$,n=ne(),44===e.charCodeAt($)?(a=",",$++):(a=o,0===K&&te(h)),a===o&&(a=null),l=ne(),u=se(),u===o?($=s,s=o):(n=[n,a,l,u],s=n),s!==o;)i.push(s);q=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(r,i)}else $=t,t=o;return t}(),i===o&&(i=null),ne(),41===e.charCodeAt($)?(s=")",$++):(s=o,0===K&&te(m)),s===o?($=t,t=o):(ne(),q=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(r,i))),t}function se(){let e,t;return e=$,t=le(),t===o&&(t=ue(),t===o&&(t=pe(),t===o&&(t=function(){let e,t;return K++,e=$,ne(),t=de(),t===o?($=e,e=o):(q=e,e=function(e){return{value:e,unit:null}}(t)),K--,e===o&&0===K&&te(x),e}()))),t!==o&&(q=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===o&&(e=$,t=ce(),t!==o&&(q=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function ne(){let t,r;for(K++,t=[];r=e.charAt($),i=r.charCodeAt(0),32===i||9===i||10===i||13===i?$++:(r=o,0===K&&te(g)),r!==o;)t.push(r);return K--,t}function ae(){let t,r,s;for(K++,t=$,r=[];s=e.charAt($),i=s.charCodeAt(0),i>=97&&i<=122||45===i?$++:(s=o,0===K&&te(C)),s!==o;)r.push(s);return r.length<1&&(r=o),r!==o&&(q=t,r=z()),t=r,K--,t===o&&(r=o,0===K&&te(v)),t}function le(){let t,r,i;return K++,t=$,ne(),r=de(),r===o?($=t,t=o):(37===e.charCodeAt($)?(i="%",$++):(i=o,0===K&&te(T)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"%"}}(r))),K--,t===o&&0===K&&te(w),t}function ue(){let t,r,i;return K++,t=$,ne(),r=de(),r===o?($=t,t=o):("px"===e.substr($,2)?(i="px",$+=2):(i=o,0===K&&te(M)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"px"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("cm"===e.substr($,2)?(i="cm",$+=2):(i=o,0===K&&te(A)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"cm"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("mm"===e.substr($,2)?(i="mm",$+=2):(i=o,0===K&&te(N)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"mm"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("in"===e.substr($,2)?(i="in",$+=2):(i=o,0===K&&te(O)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"in"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("pt"===e.substr($,2)?(i="pt",$+=2):(i=o,0===K&&te(I)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"pt"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("pc"===e.substr($,2)?(i="pc",$+=2):(i=o,0===K&&te(Z)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"pc"}}(r)))))))),K--,t===o&&0===K&&te(S),t}function pe(){let t,r,i;return K++,t=$,r=de(),r===o?($=t,t=o):("deg"===e.substr($,3)?(i="deg",$+=3):(i=o,0===K&&te(j)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"deg"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):("rad"===e.substr($,3)?(i="rad",$+=3):(i=o,0===K&&te(F)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"rad"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):(e.substr($,4)===p?(i=p,$+=4):(i=o,0===K&&te(B)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"grad"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):(e.substr($,4)===c?(i=c,$+=4):(i=o,0===K&&te(P)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"turn"}}(r)))))),K--,t===o&&(r=o,0===K&&te(D)),t}function ce(){let t,r,s,n;if(K++,t=$,35===e.charCodeAt($)?(r="#",$++):(r=o,0===K&&te(R)),r!==o){for(s=[];n=e.charAt($),i=n.charCodeAt(0),i>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70?$++:(n=o,0===K&&te(E)),n!==o;)s.push(n);s.length<1&&(s=o),s===o?($=t,t=o):(q=t,t={type:"hex",value:z()})}else $=t,t=o;return t===o&&(t=$,r=oe(),r!==o&&(q=t,r=function(e){return{type:"function",value:e}}(r)),t=r,t===o&&(t=$,r=ae(),r!==o&&(q=t,r={type:"named",value:z()}),t=r)),K--,t===o&&(r=o,0===K&&te(L)),t}function de(){let t,r,s,n,a,l,u,p;for(t=$,r=e.charAt($),i=r.charCodeAt(0),43===i||45===i?$++:(r=o,0===K&&te(_)),r===o&&(r=null),s=$,n=[];a=e.charAt($),i=a.charCodeAt(0),i>=48&&i<=57?$++:(a=o,0===K&&te(J)),a!==o;)n.push(a);if(46===e.charCodeAt($)?(a=".",$++):(a=o,0===K&&te(U)),a!==o){for(l=[];u=e.charAt($),i=u.charCodeAt(0),i>=48&&i<=57?$++:(u=o,0===K&&te(J)),u!==o;)l.push(u);l.length<1&&(l=o),l===o?($=s,s=o):(n=[n,a,l],s=n)}else $=s,s=o;if(s===o){for(s=[];n=e.charAt($),i=n.charCodeAt(0),i>=48&&i<=57?$++:(n=o,0===K&&te(J)),n!==o;)s.push(n);s.length<1&&(s=o)}if(s!==o){if(n=$,101===e.charCodeAt($)?(a="e",$++):(a=o,0===K&&te(k)),a!==o){for(l=e.charAt($),i=l.charCodeAt(0),43===i||45===i?$++:(l=o,0===K&&te(_)),l===o&&(l=null),u=[];p=e.charAt($),i=p.charCodeAt(0),i>=48&&i<=57?$++:(p=o,0===K&&te(J)),p!==o;)u.push(p);u.length<1&&(u=o),u===o?($=n,n=o):(a=[a,l,u],n=a)}else $=n,n=o;n===o&&(n=null),q=t,t=parseFloat(z())}else $=t,t=o;return t}r=a();let ye=r!==o&&$===e.length;function me(){throw r!==o&&$<e.length&&te({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(V,G<e.length?function(t=$){let r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(G):null,G<e.length?ee(G,G+1):ee(G,G))}return t.peg$library?{peg$result:r,peg$currPos:$,peg$FAILED:o,peg$maxFailExpected:V,peg$maxFailPos:G,peg$success:ye,peg$throw:ye?void 0:me}:ye?r:void me()}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new n.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new n.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=m[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${d(e)}`,{term:e})}(e),e.value*m[e.unit]||0}(e.parameters[0])),new n.Nd(t)}(e);case"blur":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=f(e.parameters[0]),y(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){let t=[],r=null;for(let o of e.parameters)if("color"===o.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=b(o)}else{let e=f(o);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&y(e,o)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new n.$b(t[0],t[1],t[2]||0,r||v("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return c(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(r=f(e.parameters[1]),y(r,e.parameters[1])),e.parameters[2]&&(i=g(e.parameters[2])),new n.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function c(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function d(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in h)return"<length>";if(e.unit in m)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function y(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const m={deg:1,grad:.9,rad:180/Math.PI,turn:360},h={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${d(e)}`,{term:e})}(e);let t=e.value;return y(t,e),"%"===e.unit?.01*t:t}function f(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${d(e)}`,{term:e})}(e),e.value*h[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,s.j5)(e.value);case"named":return v(e.value);case"function":return function(e){if(c(e.parameters,4),C.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(w.test(e.name))return(0,s.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${d(e)}`,{term:e})}(e),y(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function v(e){if(!(0,s.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,s.c4)(e)}const C=/^rgba?/i,w=/^hsla?/i;function T(e,t,r){try{return function(e){return e&&0!==e.length?function(e){let t=e[0];return!!t&&"scale"in t}(e)?Array.from(e,e=>({scale:e.scale,value:M(e.value)})):M(e):null}(e)}catch(e){r?.messages?.push(e)}return null}function S(e,t,r,i){try{let i=function(e){let t=u(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,o.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function M(e){if(!e?.length)return"";let t=[];for(let r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[A(r,"amount")];break;case"blur":e=[A(r,"radius","pt")];break;case"hue-rotate":e=[A(r,"angle","deg")];break;case"drop-shadow":e=[A(r,"xoffset","pt"),A(r,"yoffset","pt"),A(r,"blurRadius","pt"),N(r,"color")];break;case"bloom":e=[A(r,"strength"),A(r,"radius","pt"),A(r,"threshold")]}let i=`${r.type}(${e.filter(Boolean).join(" ")})`;u(i),t.push(i)}return t.join(" ")}function A(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function N(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});let r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function o(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>o})},63074(e,t,r){var i=r(32198),o=r(91429),s=r(89317),n=r(76369);const a={type:"average.color-burn.color-dodge.color.darken.destination-atop.destination-in.destination-out.destination-over.difference.exclusion.hard-light.hue.invert.lighten.lighter.luminosity.minus.multiply.normal.overlay.plus.reflect.saturation.screen.soft-light.source-atop.source-in.source-out.vivid-light.xor".split("."),nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},l={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9,layerContainerTypes:s.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}};r.d(t,["LF",0,u,"dM",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"blendMode",void 0),(0,i.Cg)([(0,o.MZ)(u)],r.prototype,"effect",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.BlendLayer")],r),r},"sU",0,a])},8303(e,t,r){var i=r(32198),o=r(92602),s=r(91429),n=r(60999),a=r(49186),l=r(36563),u=r(53966),p=r(97768),c=r(17676),d=r(84952),y=r(70333),m=r(20655),h=r(80812),g=r(41318),f=r(10407),b=r(78888),v=r(26121),C=r(77548),w=r(36005),T=r(43937);const S={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new h.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:o}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,l.rE)(i),"reloadFromPortal"),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,o,s=!y.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,s);if(n)i=r.portal.url;else try{i=await(0,C.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,d.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;o=await(y.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new h.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,f.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?y.id?.findCredential(this.url):null;if(!t)return!0;let r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=y.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,o=m.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;let s=`${i}/community/self`,a=null==e?null:e.signal,l=await(0,n.Ke)((0,b.A)(s,{authMode:"no-prompt",query:{f:"json"},signal:a}));return l.ok?g.A.fromJSON(l.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,v.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,s.MZ)({type:h.default})],M.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,i.Cg)([(0,T.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,i.Cg)([(0,s.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.PortalLayer")],M),M}])},25036(e,t,r){var i=r(32198),o=r(91429),s=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,s.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},96576(e,t,r){r.d(t,{A:()=>c});var i,o=r(32198),s=r(91429),n=r(4718),a=r(63988),l=r(92438),u=r(49849),p=r(93223);let c=i=class extends((0,a.h)(l.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e){await Promise.all([this.collectSymbolFields(e),this.collectVVRequiredFields(e)])}async collectSymbolFields(e){await Promise.all(this.symbols.map(t=>t.collectRequiredFields(e)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)(u.Wp)],c.prototype,"symbol",void 0),(0,o.Cg)([(0,p.e)({simple:"simple"})],c.prototype,"type",void 0),c=i=(0,o.Cg)([(0,s.$K)("esri.renderers.SimpleRenderer")],c)},73681(e,t,r){r.d(t,{n:()=>l});var i=r(49186),o=r(53966),s=r(46140),n=r(95466),a=r(55674);class l{static async from(e,t,r){let n=e.dictionary_version?s.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(let e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);let d=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))d.delete(e);d.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});let y=await(0,a.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let m=!n||!n.greaterEqual(4,0);m&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});let h=new u(r,m);return new l(m,p,y,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new n.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},65494(e,t,r){r.d(t,{L:()=>l,r:()=>n});var i=r(90360),o=r(59923),s=r(41214);function n(e,t){return l(e,null,t)}const a=(0,i.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?((0,o.Yc)(r,"warning","renderer",`Only UniqueValueRenderer can be referenced from a web style, but found '${e.type}'`,{definition:e}),null):a(e,t,r):null}},22671(e,t,r){r.d(t,{A:()=>b});var i,o=r(32198),s=r(91429),n=r(66552),a=r(25482),l=r(4718),u=r(16930),p=r(60408),c=r(65864),d=r(50498),y=r(52106),m=r(20437),h=r(36005),g=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,y.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[s,n]}=r,a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*n,a,l);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let s=e[t],n=r.fromJSON(s),a=s.geometry?.spatialReference;null!=n.geometry&&!a&&(n.geometry.spatialReference=i);let l=s.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(let e in u){let t=u[e],r=l[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o,s=[];for(let n=0,a=e.length;n<a;n++){let a=e[n];if(n>0){let e=t(a[0]),n=r(a[1]);(e!==i||n!==o)&&(s.push([e-i,n-o]),i=e,o=n)}else i=t(a[0]),o=r(a[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,p.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){let s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,p.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let s,n,a=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,i=a.length;e<i;e++){let i=a[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(s+=o[0],n+=o[1]):(s=o[0],n=o[1]),o[0]=t(s),o[1]=r(n)}}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let s,n,a=e.points;for(let e=0,i=a.length;e<i;e++){let i=a[e];e>0?(s+=i[0],n+=i[1]):(s=i[0],n=i[1]),i[0]=t(s),i[1]=r(n)}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,s.MZ)({type:[y.A],json:{write:!0}})],b.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],b.prototype,"readFeatures",null),(0,o.Cg)([(0,s.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,o.Cg)([(0,s.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],b.prototype,"geometryType",void 0),(0,o.Cg)([(0,g.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o.Cg)([(0,s.MZ)({types:d.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,s.MZ)({type:u.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o.Cg)([(0,g.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,s.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,o.Cg)([(0,s.$K)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},37807(e,t,r){var i=r(32198),o=r(91429),s=r(66552),n=r(25482);const a=new s.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends n.o{constructor(e){super(e),this.description=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{read:a.read,write:a.write}})],l.prototype,"type",void 0),l=(0,i.Cg)([(0,o.$K)("esri.rest.support.GPMessage")],l);const u=l;r.d(t,["A",0,u])},2073(e,t,r){var i=r(66552);const o={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},s=(0,i.O)()(o),n=(0,i.O)()({...o,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),p=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),d=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),m=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),h=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),g=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),f=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),b=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),v=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),C=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),w=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),T=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),M=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),A=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),N=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),O=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),I=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),Z=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),D=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});r.d(t,["$n",0,T,"$r",0,g,"EM",0,h,"Ec",0,D,"JJ",0,m,"Mm",0,M,"OC",0,N,"Sr",0,c,"UO",0,a,"Vj",0,I,"WU",0,Z,"Y8",0,n,"Z7",0,l,"_6",0,C,"aJ",0,p,"dd",0,S,"dn",0,u,"et",0,A,"fe",0,v,"gD",0,w,"hE",0,d,"hY",0,s,"iM",0,b,"mt",0,f,"ow",0,y,"vS",0,O])},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>p});var i=r(92602),o=r(4718),s=r(84952),n=r(70333),a=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,s.An)(e):(0,o.o8)(e)}function p(e,t,r){let i={};for(let o in e){if("declaredClass"===o)continue;let s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map(e=>p(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}async function c(e,t,o){return function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t)||(!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(8673),r.e(7956),r.e(4189)]).then(()=>r(98232)),(await n.id.getCredential(e,o))?.token)}},93470(e,t,r){const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])},26121(e,t,r){r.d(t,{I6:()=>p,ci:()=>u,dL:()=>l,wN:()=>c});var i=r(49186),o=r(84952),s=r(77548),n=r(20655),a=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let o=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(o=o.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),i&&(o=o.filter(e=>"web-document-write:property-required"!==e.name))}if(o.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}function p(e){return(0,s.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let r=t?.portal,i=e?.id&&(e.portal||n.A.getDefault());return!!r&&!!i&&!(0,o.ut)(i.restUrl,r.restUrl)}}}]);
|
|
1
|
+
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[6553,7380],{52106(e,t,r){r.d(t,{A:()=>M});var i,o,s=r(32198),n=r(91429),a=r(69540),l=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(12195),y=r(24326),m=r(65864),h=r(50498),g=r(55156),f=r(60950),b=r(54339),v=r(40124),C=r(94128),w=r(33910);const T=Symbol("meshGeometryHandles");function S(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let M=class extends((0,a.OU)(u.o)){static{i=C.Z}static{o=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperties(this,{uid:{value:(0,y.c)(),configurable:!0},_lastMeshTransform:{value:{},configurable:!0,writable:!0,enumerable:!1}}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,f.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,g.I)(this.origin);if(e)return(0,b.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){let e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:S(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,d.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(T);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],T)}};(0,s.Cg)([(0,n.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],M.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,n.MZ)({value:null})],M.prototype,"attributes",null),(0,s.Cg)([(0,n.MZ)({value:null,types:h.yR,json:{read:m.rS}})],M.prototype,"geometry",null),(0,s.Cg)([(0,n.MZ)()],M.prototype,"distance",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,s.Cg)([(0,n.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,s.Cg)([(0,n.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,s.Cg)([(0,n.MZ)({type:v.A,value:null})],M.prototype,"popupTemplate",null),(0,s.Cg)([(0,n.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,n.MZ)({value:null,types:w.Es})],M.prototype,"symbol",null),(0,s.Cg)([(0,n.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=o=(0,s.Cg)([(0,n.$K)("esri.Graphic")],M)},69052(e,t,r){r.d(t,{hr:()=>o});var i=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,i,o=0,s=!1){return(i-=o)<t?i+=n(e,t-i):i>r&&(i-=n(e,i-r)),s&&i===r&&(i=t),i+o}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));r.d(t,["ie",0,l,"uC",0,a])},46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,s]=e.split(".",2),n=/^\s*\d+\s*$/;if(!r?.match||!n.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!s?.match||!n.test(s)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(s,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(56372),o=r(7762),s=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof o.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let s=o.filter(e=>!i.includes(e)),d=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),m=p(e);if(m&&n.has(m)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,g=a(e)&&a(t);for(let i of y){let o,s=u(e,i),n=u(t,i);if((g||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&p(s)===p(n)?c(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null==h?h={type:"partial",diff:{[i]:o}}:h.diff[i]=o)}}return h}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},46130(e,t,r){r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},18370(e,t,r){r.d(t,{z:()=>o});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new i(e)}},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},52039(e,t,r){r.d(t,{O7:()=>d,Y_:()=>m,el:()=>u});var i=r(69052),o=(r(49186),r(18370)),s=r(17676),n=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function u(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let o=(0,l.Vp)(i);if(!o)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(o);return["xmin"in t?t:new n.A(t)]}let[a,u]=o.valid,d=!1;for(let t of e){if(!t)continue;if("point"===t.type){d||=t.x>=u,d||=t.x<=a;continue}let{extent:e}=t;if(null==e){d=!0;break}d||=e.xmin>=u,d||=e.xmin<=a,d||=e.xmax>=u,d||=e.xmax<=a}if(!d)return e;let[{foldInto360Range:y},m]=await(0,s.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),h=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(y(t,h),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,o.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function d(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[o,s]=i.valid,n=2*s,a=0,u=0;t>s?a=Math.ceil(Math.abs(t-s)/n):t<o&&(a=-Math.ceil(Math.abs(t-o)/n)),e>s?u=Math.ceil(Math.abs(e-s)/n):e<o&&(u=-Math.ceil(Math.abs(e-o)/n));let p=e+(a-u)*n,c=p-t;return c>s?p-=n:c<o&&(p+=n),p}function y(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,o]=t.valid;return new i.hr(r,o)}const m=y(a.A.WGS84);y(a.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>a,kS:()=>u,kd:()=>l});var i=r(82799),o=r(16930),s=r(52006),n=r(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,o]=e.b;r[0]+=t,i[0]+=t,o[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}},55156(e,t,r){r.d(t,{I:()=>o});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},39622(e,t,r){r.r(t),r.d(t,{default:()=>xt});var i=r(32198),o=r(92602),s=r(91429),n=r(46130),a=r(4576),l=r(7762),u=r(49186),p=r(53966),c=r(25728),d=r(93637),y=r(17676),m=r(36708),h=r(86211),g=r(84952),f=r(5443),b=r(48526),v=r(99917),C=r(16930),w=r(21325),T=r(52106),S=r(40124),M=r(20655),A=r(80812),N=r(10407),O=r(65494),I=r(78888),Z=r(25482),D=r(2073),j=r(93223);let F=class extends Z.o{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"dataType",void 0),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],F.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[String]})],F.prototype,"parameterNames",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"restrictionUsageParameterName",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],F.prototype,"timeNeutralAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],F.prototype,"trafficSupport",void 0),(0,i.Cg)([(0,j.e)(D.dn)],F.prototype,"units",void 0),(0,i.Cg)([(0,j.e)(D.WU)],F.prototype,"usageType",void 0),F=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkAttribute")],F);const B=F;let P=class extends Z.o{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i.Cg)([(0,s.MZ)({type:Number})],P.prototype,"buildTime",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],P.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[B]})],P.prototype,"networkAttributes",void 0),(0,i.Cg)([(0,s.MZ)()],P.prototype,"networkSources",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],P.prototype,"state",void 0),P=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkDataset")],P);const x=P;var L=r(69540),R=r(36005),E=r(43937);let _=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){let{restrictionAttributeNames:r}=t;return null==r?null:r.map(e=>D.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map(e=>D.OC.toJSON(e)))}};(0,i.Cg)([(0,s.MZ)({type:[Object],json:{write:!0}})],_.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"description",void 0),(0,i.Cg)([(0,j.e)(D.dd,{ignoreUnknown:!1})],_.prototype,"distanceAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"id",void 0),(0,i.Cg)([(0,R.w)("id",["id","itemId"])],_.prototype,"readId",null),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],_.prototype,"impedanceAttributeName",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],_.prototype,"restrictionAttributeNames",void 0),(0,i.Cg)([(0,R.w)("restrictionAttributeNames")],_.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,E.K)("restrictionAttributeNames")],_.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:{allowNull:!0}}})],_.prototype,"simplificationTolerance",void 0),(0,i.Cg)([(0,j.e)(D.hY)],_.prototype,"simplificationToleranceUnits",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],_.prototype,"timeAttributeName",void 0),(0,i.Cg)([(0,j.e)(D.ow)],_.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,j.e)(D.hE)],_.prototype,"uturnAtJunctions",void 0),_=(0,i.Cg)([(0,s.$K)("esri.rest.support.TravelMode")],_);let J=class extends Z.o{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){let r=t.supportedTravelModes?.find(({id:e})=>e===t.defaultTravelMode)??t.supportedTravelModes?.find(({itemId:e})=>e===t.defaultTravelMode);return r?_.fromJSON(r):null}};(0,i.Cg)([(0,s.MZ)()],J.prototype,"accumulateAttributeNames",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributeNames")],J.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributeNames")],J.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"capabilities",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"currentVersion",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"defaultTravelMode",void 0),(0,i.Cg)([(0,R.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],J.prototype,"readDefaultTravelMode",null),(0,i.Cg)([(0,s.MZ)()],J.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,j.e)(D.Z7)],J.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"directionsSupportedLanguages",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{ignoreUnknown:!1})],J.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"hasZ",void 0),(0,i.Cg)([(0,j.e)(D.et,{ignoreUnknown:!1})],J.prototype,"impedance",void 0),(0,i.Cg)([(0,s.MZ)({type:x})],J.prototype,"networkDataset",void 0),(0,i.Cg)([(0,s.MZ)({type:[_]})],J.prototype,"supportedTravelModes",void 0),J=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkServiceDescription")],J);var U=r(2272);function k(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}async function $(e,t,r){if(!e)throw new u.A("network-service:missing-url","Url to Network service is missing");let i=(0,U.jV)({f:"json",token:t},r),{data:o}=await(0,I.A)(e,i),{defaultTravelMode:s,supportedTravelModes:n}=await(o.currentVersion>=10.4?async function(e,t,r){try{let i=(0,U.jV)({f:"json",token:t},r),o=(0,g.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,I.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new u.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){let r=(0,U.jV)({f:"json"},t),{data:i}=await(0,I.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};let{owningSystemUrl:o}=i,s=(0,g.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,I.A)(s,r),a=(0,d.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};let l=(0,U.Dl)(o),u={f:"json",serviceName:/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas"},p=(0,U.jV)(u,t),c=(0,g.UC)(a)+"/GetTravelModes/execute",y=await(0,I.A)(c,p),m=[],h=null;if(y?.data?.results?.length){let e=y.data.results;for(let t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(let{attributes:e}of t.value.features)if(e){let t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r));return o.defaultTravelMode=s,o.supportedTravelModes=n,J.fromJSON(o)}var q=r(16649),W=r(52039);function G(e,t){if(null==e)return null;let r={},i=RegExp(`^${t}`,"i");for(let o of Object.keys(e))if(i.test(o)){let i=o.slice(t.length);r[D.et.fromJSON(i)]=e[o]}return r}function V(e,t,r){if(null!=e){t.attributes||={};for(let i in e){let o=D.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function K(e){let t={};for(let r of Object.keys(e)){let i=r;t[D.et.fromJSON(i)]=e[r]}return t}function z(e){let t={};for(let r of Object.keys(e)){let i=r;t[D.et.toJSON(i)]=e[r]}return t}function H(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Y(e){let t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.locateSettings&&=JSON.stringify(t.locateSettings),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var Q=r(22671),X=r(66552),ee=r(37807);const te=new X.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let re=class extends ee.A{constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{read:te.read,write:te.write}})],re.prototype,"type",void 0),re=(0,i.Cg)([(0,s.$K)("esri.rest.support.NAMessage")],re);const ie=re;var oe=r(82799),se=r(86738);let ne=class extends Z.o{constructor(e){super(e)}};(0,i.Cg)([(0,s.MZ)({json:{read:{source:"string"}}})],ne.prototype,"text",void 0),(0,i.Cg)([(0,j.e)(D.Ec,{name:"stringType"})],ne.prototype,"type",void 0),ne=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsString")],ne);const ae=ne;let le=class extends Z.o{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return H(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return se.A.fromJSON(t.point)}};(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],le.prototype,"arriveTime",void 0),(0,i.Cg)([(0,s.MZ)()],le.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,R.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],le.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,s.MZ)({type:se.A})],le.prototype,"geometry",void 0),(0,i.Cg)([(0,R.w)("geometry",["point"])],le.prototype,"readGeometry",null),(0,i.Cg)([(0,s.MZ)({type:[ae]})],le.prototype,"strings",void 0),le=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsEvent")],le);const ue=le;let pe=class extends T.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}set attributes(e){super.attributes=e}readGeometry(e,t){let r=function(e){if(null==e||""===e)return null;let t,r,i,o,s,n,a,l,u=0,p=0,c=0,d=0,y=[],m=0,h=0,g=0;if(s=e.match(/((\+|-)[^+\-|]+|\|)/g),s||=[],0===parseInt(s[m],32)){m=2;let e=parseInt(s[m],32);m++,n=parseInt(s[m],32),m++,1&e&&(h=s.indexOf("|")+1,a=parseInt(s[h],32),h++),2&e&&(g=s.indexOf("|",h)+1,l=parseInt(s[g],32),g++)}else n=parseInt(s[m],32),m++;for(;m<s.length&&"|"!==s[m];){t=parseInt(s[m],32)+u,m++,u=t,r=parseInt(s[m],32)+p,m++,p=r;let e=[t/n,r/n];h&&(o=parseInt(s[h],32)+c,h++,c=o,e.push(o/a)),g&&(i=parseInt(s[g],32)+d,g++,d=i,e.push(i/l)),y.push(e)}return{paths:[y],hasZ:h>0,hasM:g>0}}(t.compressedGeometry);return null==r?null:oe.A.fromJSON(r)}};(0,i.Cg)([(0,s.MZ)({type:[ue]})],pe.prototype,"events",void 0),(0,i.Cg)([(0,s.MZ)({types:{base:null,key:"type",typeMap:{polygon:oe.A},defaultKeyValue:"polygon"}})],pe.prototype,"geometry",void 0),(0,i.Cg)([(0,R.w)("geometry",["compressedGeometry"])],pe.prototype,"readGeometry",null),(0,i.Cg)([(0,s.MZ)({type:[ae]})],pe.prototype,"strings",void 0),pe=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsFeature")],pe);const ce=pe;let de=class extends Q.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];let r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&C.A.fromJSON(r);return e.map(e=>{let t=ce.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(let e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t})}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new oe.A({spatialReference:t});let r=[];for(let t of e)for(let e of t.paths)r.push(...e);let i=[];r.forEach((e,t)=>{(0===t||e[0]!==r[t-1][0]||e[1]!==r[t-1][1])&&i.push(e)});let{hasM:o,hasZ:s}=e[0];return new oe.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map(({geometry:e})=>e),this.extent.spatialReference):null}get strings(){return this.features.flatMap(({strings:e})=>e).filter(a.Ru)}};(0,i.Cg)([(0,s.MZ)({type:f.A,json:{read:{source:"summary.envelope"}}})],de.prototype,"extent",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0})],de.prototype,"features",void 0),(0,i.Cg)([(0,R.w)("features")],de.prototype,"readFeatures",null),(0,i.Cg)([(0,s.MZ)()],de.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],de.prototype,"mergedGeometry",null),(0,i.Cg)([(0,s.MZ)()],de.prototype,"routeId",void 0),(0,i.Cg)([(0,s.MZ)()],de.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)({value:null,readOnly:!0})],de.prototype,"strings",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],de.prototype,"totalDriveTime",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalLength"}}})],de.prototype,"totalLength",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"summary.totalTime"}}})],de.prototype,"totalTime",void 0),de=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionsFeatureSet")],de);const ye=de;let me=class extends Z.o{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"directionLines",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"directionPoints",void 0),(0,i.Cg)([(0,s.MZ)({type:ye,json:{write:!0}})],me.prototype,"directions",void 0),(0,i.Cg)([(0,s.MZ)({type:T.A,json:{write:!0}})],me.prototype,"route",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],me.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)({type:[T.A],json:{write:!0}})],me.prototype,"stops",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedEdges",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedJunctions",void 0),(0,i.Cg)([(0,s.MZ)({type:Q.A,json:{write:!0}})],me.prototype,"traversedTurns",void 0),me=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteResult")],me);const he=me;function ge(e){return e?Q.A.fromJSON(e).features.filter(a.Ru):[]}let fe=class extends Z.o{constructor(e){super(e),this.checksum=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return ge(t.barriers)}readPolylineBarriers(e){return ge(e)}readPolygonBarriers(e){return ge(e)}};function be(e){return e instanceof Q.A}async function ve(e,t,r){let i=[],o=[],s={},n={},a=(0,U.Dl)(e),{path:l}=a;be(t.stops)&&k(t.stops.features,o,"stops.features",s),be(t.pointBarriers)&&k(t.pointBarriers.features,o,"pointBarriers.features",s),be(t.polylineBarriers)&&k(t.polylineBarriers.features,o,"polylineBarriers.features",s),be(t.polygonBarriers)&&k(t.polygonBarriers.features,o,"polygonBarriers.features",s);let u=await(0,W.el)(o);for(let e in s){let t=s[e];i.push(e),n[e]=u.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await $(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)e.z=void 0}p.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(let e in n)n[e].forEach((r,i)=>{(0,q.Jt)(t,e)[i].geometry=r});let c={...r,query:{...a.query,...Y(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,I.A)(d,c);return function(e){let{barriers:t,checksum:r,directionLines:i,directionPoints:o,directions:s,messages:n,polygonBarriers:a,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:y}=e,m=e=>{let t=g.find(t=>t.routeName===e);if(null!=t)return t;let r={routeId:g.length+1,routeName:e};return g.push(r),r},h=e=>{let t=g.find(t=>t.routeId===e);if(null!=t)return t;let r={routeId:e,routeName:null};return g.push(r),r},g=[];u?.features.forEach((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;let r=e.attributes.Name,i=t+1;g.push({routeId:i,routeName:r,route:e})}),s?.forEach(e=>{let{routeName:t}=e;m(t).directions=e});let f=p?.features.every(e=>null==e.attributes.RouteName)&&g.length>0?g[0].routeName:null;return p?.features.forEach(e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);let t=f??e.attributes.RouteName,r=m(t);r.stops??=[],r.stops.push(e)}),i?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)}),o?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=o;r.directionPoints??={features:[],geometryType:i,spatialReference:s},r.directionPoints.features.push(e)}),c?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)}),d?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)}),y?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)}),fe.fromJSON({barriers:t,checksum:r,messages:n,polygonBarriers:a,polylineBarriers:l,routeResults:g})}(y)}(0,i.Cg)([(0,s.MZ)({type:String})],fe.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({type:[ie]})],fe.prototype,"messages",void 0),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,R.w)("pointBarriers",["barriers"])],fe.prototype,"readPointBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,R.w)("polylineBarriers")],fe.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[T.A]})],fe.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,R.w)("polygonBarriers")],fe.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,s.MZ)({type:[he]})],fe.prototype,"routeResults",void 0),fe=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteSolveResult")],fe);var Ce,we=r(33910);let Te=class extends((0,L.OU)(Z.o)){static{Ce=this}constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new Ce({directionLineType:D.gD.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){let e={ObjectID:this.objectId,DirectionLineType:this.directionLineType?D.gD.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Se;(0,i.Cg)([(0,s.MZ)({type:D.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:D.gD.read}}})],Te.prototype,"directionLineType",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Te.prototype,"directionPointId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Meters"}}})],Te.prototype,"distance",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Minutes"}}})],Te.prototype,"duration",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Te.prototype,"fromLevel",void 0),(0,i.Cg)([(0,s.MZ)({type:oe.A})],Te.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Te.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Te.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Te.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Te.prototype,"toLevel",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Te.prototype,"type",void 0),Te=Ce=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionLine")],Te);let Me=class extends((0,L.OU)(Z.o)){static{Se=this}constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null==t.attributes.ArrivalTime?null:new Date(t.attributes.ArrivalTime)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AlternateName",alias:"Alternate Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Level",alias:"Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048}]}static fromGraphic(e){return new Se({alternateName:e.attributes.AlternateName??null,arrivalTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:D._6.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){let e={ObjectID:this.objectId,DirectionPointType:this.directionPointType?D._6.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Ae;(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.AlternateName"}}})],Me.prototype,"alternateName",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Me.prototype,"arrivalTime",void 0),(0,i.Cg)([(0,R.w)("arrivalTime",["attributes.ArrivalTime"])],Me.prototype,"readArrivalTime",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Me.prototype,"arrivalTimeOffset",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Azimuth"}}})],Me.prototype,"azimuth",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.BranchName"}}})],Me.prototype,"branchName",void 0),(0,i.Cg)([(0,s.MZ)({type:D._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:D._6.read}}})],Me.prototype,"directionPointType",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DisplayText"}}})],Me.prototype,"displayText",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ExitName"}}})],Me.prototype,"exitName",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A})],Me.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],Me.prototype,"intersectingName",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Level"}}})],Me.prototype,"level",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Name"}}})],Me.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Me.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Sequence"}}})],Me.prototype,"sequence",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],Me.prototype,"shortVoiceInstruction",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.StopID"}}})],Me.prototype,"stopId",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Me.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.TowardName"}}})],Me.prototype,"towardName",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Me.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],Me.prototype,"voiceInstruction",void 0),Me=Se=(0,i.Cg)([(0,s.$K)("esri.rest.support.DirectionPoint")],Me);let Ne=class extends((0,L.OU)(Z.o)){static{Ae=this}constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}writeCosts(e,t){V(e,t,"Attr_")}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new Ae({addedCost:e.attributes.AddedCost??null,barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),curbApproach:null==e.attributes.CurbApproach?null:D.JJ.fromJSON(e.attributes.CurbApproach),fullEdge:null==e.attributes.FullEdge?null:D.fe.fromJSON(e.attributes.FullEdge),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null==e.attributes.Status?null:D.$r.fromJSON(e.attributes.Status),symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,CurbApproach:this.curbApproach?D.JJ.toJSON(this.curbApproach):null,FullEdge:this.fullEdge?D.fe.toJSON(this.fullEdge):null,Name:this.name,Status:this.status?D.$r.toJSON(this.status):null};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)()],Ne.prototype,"addedCost",void 0),(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:D.iM.read},write:{writer:D.iM.write}}})],Ne.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],Ne.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],Ne.prototype,"readCosts",null),(0,i.Cg)([(0,E.K)("costs")],Ne.prototype,"writeCosts",null),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:D.JJ.read}}})],Ne.prototype,"curbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:D.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:D.fe.read},write:{writer:D.fe.write}}})],Ne.prototype,"fullEdge",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A,json:{write:!0},value:null})],Ne.prototype,"geometry",null),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],Ne.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],Ne.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Ne.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.PosAlong"}})],Ne.prototype,"positionAlong",void 0),(0,i.Cg)([(0,s.MZ)({type:D.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:D.mt.read},write:{writer:D.mt.write}}})],Ne.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceID"}})],Ne.prototype,"sourceId",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceOID"}})],Ne.prototype,"sourceOid",void 0),(0,i.Cg)([(0,s.MZ)({type:D.$r.apiValues,json:{read:{source:"attributes.Status",reader:D.$r.read}}})],Ne.prototype,"status",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Ne.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Ne.prototype,"type",void 0),Ne=Ae=(0,i.Cg)([(0,s.$K)("esri.rest.support.PointBarrier")],Ne);var Oe,Ie=r(39829);let Ze=class extends((0,L.OU)(Z.o)){static{Oe=this}constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}writeCosts(e,t){V(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new Oe({barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var De;(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:D.iM.read},write:{writer:D.iM.write}}})],Ze.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],Ze.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],Ze.prototype,"readCosts",null),(0,i.Cg)([(0,E.K)("costs")],Ze.prototype,"writeCosts",null),(0,i.Cg)([(0,s.MZ)({type:Ie.A,json:{write:!0}})],Ze.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],Ze.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],Ze.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Ze.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)()],Ze.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Ze.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Ze.prototype,"type",void 0),Ze=Oe=(0,i.Cg)([(0,s.$K)("esri.rest.support.PolygonBarrier")],Ze);let je=class extends((0,L.OU)(Z.o)){static{De=this}constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return G(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new De({barrierType:null==e.attributes.BarrierType?null:D.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:K(JSON.parse(e.attributes.Costs)),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?D.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(z(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)({type:D.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:D.iM.read}}})],je.prototype,"barrierType",void 0),(0,i.Cg)([(0,s.MZ)()],je.prototype,"costs",void 0),(0,i.Cg)([(0,R.w)("costs",["attributes"])],je.prototype,"readCosts",null),(0,i.Cg)([(0,s.MZ)({type:oe.A,json:{write:!0}})],je.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],je.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],je.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],je.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)()],je.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],je.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"type",void 0),je=De=(0,i.Cg)([(0,s.$K)("esri.rest.support.PolylineBarrier")],je);let Fe=class extends Z.o{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}};var Be;(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Fe.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributes")],Fe.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributes")],Fe.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],Fe.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Fe.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:_,json:{write:!0}})],Fe.prototype,"travelMode",void 0),Fe=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteSettings")],Fe);let Pe=class extends((0,L.OU)(Z.o)){static{Be=this}constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null==t.attributes.EndTimeUTC?null:new Date(t.attributes.EndTimeUTC)}readEndTimeOffset(e,t){return H(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null==t.attributes.StartTimeUTC?null:new Date(t.attributes.StartTimeUTC)}readStartTimeOffset(e,t){return H(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return G(t.attributes,"Total_")}readTotalViolations(e,t){return G(t.attributes,"TotalViolation_")}readTotalWait(e,t){return G(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Messages",alias:"Messages",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1024},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Version",alias:"Version",type:"esriFieldTypeString",editable:!0,nullable:!0,length:16}]}static fromGraphic(e){return new Be({analysisSettings:null==e.attributes.AnalysisSettings?null:Fe.fromJSON(JSON.parse(e.attributes.AnalysisSettings)),endTime:null==e.attributes.EndTime?null:new Date(e.attributes.EndTime),endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null==e.attributes.Messages?null:JSON.parse(e.attributes.Messages),name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null==e.attributes.StartTime?null:new Date(e.attributes.StartTime),startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null==e.attributes.TotalCosts?null:K(JSON.parse(e.attributes.TotalCosts)),totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){let e={ObjectID:this.objectId,AnalysisSettings:this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:this.endTime?.getTime()??null,EndUTCOffset:this.endTimeOffset,Messages:this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:this.startTime?.getTime()??null,StartUTCOffset:this.startTimeOffset,TotalCosts:this.totalCosts?JSON.stringify(z(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"analysisSettings",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Pe.prototype,"endTime",void 0),(0,i.Cg)([(0,R.w)("endTime",["attributes.EndTimeUTC"])],Pe.prototype,"readEndTime",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"endTimeOffset",void 0),(0,i.Cg)([(0,R.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Pe.prototype,"readEndTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],Pe.prototype,"firstStopId",void 0),(0,i.Cg)([(0,s.MZ)({type:oe.A})],Pe.prototype,"geometry",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.LastStopID"}}})],Pe.prototype,"lastStopId",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"messages",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.Name"}}})],Pe.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Pe.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],Pe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({type:Date})],Pe.prototype,"startTime",void 0),(0,i.Cg)([(0,R.w)("startTime",["attributes.StartTimeUTC"])],Pe.prototype,"readStartTime",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"startTimeOffset",void 0),(0,i.Cg)([(0,R.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Pe.prototype,"readStartTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.StopCount"}}})],Pe.prototype,"stopCount",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],Pe.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalCosts",void 0),(0,i.Cg)([(0,R.w)("totalCosts",["attributes"])],Pe.prototype,"readTotalCosts",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalDistance",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalDuration",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalLateDuration",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalViolations",void 0),(0,i.Cg)([(0,R.w)("totalViolations",["attributes"])],Pe.prototype,"readTotalViolations",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalWait",void 0),(0,i.Cg)([(0,R.w)("totalWait",["attributes"])],Pe.prototype,"readTotalWait",null),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"totalWaitDuration",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Pe.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],Pe.prototype,"version",void 0),Pe=Be=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteInfo")],Pe);var xe=r(56507);const Le={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Re=r(65864),Ee=r(50498);let _e=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],_e.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,s.MZ)({types:Ee.yR,json:{read:Re.rS,write:!0}})],_e.prototype,"geometry",void 0),(0,i.Cg)([(0,j.e)(D.Vj)],_e.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerName",write:!0}})],_e.prototype,"name",void 0),(0,i.Cg)([(0,j.e)(D.vS,{name:"spatialRel"})],_e.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_e.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_e.prototype,"where",void 0),_e=(0,i.Cg)([(0,s.$K)("esri.rest.support.DataLayer")],_e);var Je=r(10107),Ue=r(64108);let ke=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.name=null,this.where=null}};(0,i.Cg)([(0,Je.MZ)({json:{write:!0}})],ke.prototype,"name",void 0),(0,i.Cg)([(0,Je.MZ)({json:{write:!0}})],ke.prototype,"where",void 0),ke=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingSource")],ke);const $e=ke;let qe=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.allowAutoRelocate=null,this.sources=null}};(0,i.Cg)([(0,Je.MZ)({type:Boolean,json:{write:!0}})],qe.prototype,"allowAutoRelocate",void 0),(0,i.Cg)([(0,Je.MZ)({type:[$e],json:{write:!0}})],qe.prototype,"sources",void 0),qe=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingBase")],qe);const We=qe;let Ge=class extends We{constructor(e){super(e),this.tolerance=null,this.toleranceUnits=null}};(0,i.Cg)([(0,Je.MZ)({type:Number,json:{write:!0}})],Ge.prototype,"tolerance",void 0),(0,i.Cg)([(0,j.e)(D.Y8)],Ge.prototype,"toleranceUnits",void 0),Ge=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSetting")],Ge);const Ve=Ge;let Ke=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.stops=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null}};(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{write:!0}})],Ke.prototype,"stops",void 0),(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{name:"barriers",write:!0}})],Ke.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,Je.MZ)({type:We,json:{write:!0}})],Ke.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,Je.MZ)({type:We,json:{write:!0}})],Ke.prototype,"polygonBarriers",void 0),Ke=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettingsOverrides")],Ke);const ze=Ke;let He=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.default=null,this.overrides=null}};(0,i.Cg)([(0,Je.MZ)({type:Ve,json:{write:!0}})],He.prototype,"default",void 0),(0,i.Cg)([(0,Je.MZ)({type:ze,json:{write:!0}})],He.prototype,"overrides",void 0),He=(0,i.Cg)([(0,Ue.$K)("esri.rest.support.LocateSettings")],He);const Ye=He;var Qe;let Xe=class extends Q.A{static{Qe=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Qe({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],Xe.prototype,"doNotLocateOnRestrictedElements",void 0),Xe=Qe=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkFeatureSet")],Xe);let et=class extends((0,L.OU)(Z.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};var tt;(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],et.prototype,"url",void 0),et=(0,i.Cg)([(0,s.$K)("esri.rest.support.NetworkUrl")],et);let rt=class extends((0,L.OU)(Z.o)){static{tt=this}constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.locateSettings=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnEmptyResults=null,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,xe.PZ)(tt,e)}readAccumulateAttributes(e){return null==e?null:e.map(e=>D.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.et.toJSON(e)))}writePointBarriers(e,t,r){it(e,t,r)}writePolygonBarrier(e,t,r){it(e,t,r)}writePolylineBarrier(e,t,r){it(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map(e=>D.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>D.OC.toJSON(e)))}readStartTime(e,t){let{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?_e.fromJSON(e):function(e){return e&&"url"in e}(e)?et.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Xe.fromJSON(e):function(e){return e&&"features"in e}(e)?Q.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){it(e,t,r)}};function it(e,t,r){null!=e&&(t[r]=l.A.isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON())}var ot;(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],rt.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,R.w)("accumulateAttributes")],rt.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,E.K)("accumulateAttributes")],rt.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,s.MZ)(Le)],rt.prototype,"apiKey",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],rt.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],rt.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,j.e)(D.Z7)],rt.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,j.e)(D.aJ)],rt.prototype,"directionsOutputType",void 0),(0,i.Cg)([(0,j.e)(D.$n)],rt.prototype,"directionsStyleName",void 0),(0,i.Cg)([(0,j.e)(D.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],rt.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecision",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionM",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionZ",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"ignoreInvalidLocations",void 0),(0,i.Cg)([(0,j.e)(D.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],rt.prototype,"impedanceAttribute",void 0),(0,i.Cg)([(0,s.MZ)({type:Ye,json:{write:!0}})],rt.prototype,"locateSettings",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],rt.prototype,"outputGeometryPrecision",void 0),(0,i.Cg)([(0,j.e)(D.hY)],rt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i.Cg)([(0,j.e)(D.Sr)],rt.prototype,"outputLines",void 0),(0,i.Cg)([(0,s.MZ)({type:C.A,json:{name:"outSR",write:!0}})],rt.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"overrides",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"barriers",write:!0}})],rt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,E.K)("pointBarriers")],rt.prototype,"writePointBarriers",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,E.K)("polygonBarriers")],rt.prototype,"writePolygonBarrier",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,E.K)("polylineBarriers")],rt.prototype,"writePolylineBarrier",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveObjectID",void 0),(0,i.Cg)([(0,s.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],rt.prototype,"restrictionAttributes",void 0),(0,i.Cg)([(0,R.w)("restrictionAttributes")],rt.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,E.K)("restrictionAttributes")],rt.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,j.e)(D.hE)],rt.prototype,"restrictUTurns",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnDirections",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnEmptyResults",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolygonBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolylineBarriers",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnRoutes",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnStops",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedEdges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedJunctions",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedTurns",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnZ",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"startTime",void 0),(0,i.Cg)([(0,R.w)("startTime")],rt.prototype,"readStartTime",null),(0,i.Cg)([(0,E.K)("startTime")],rt.prototype,"writeStartTime",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],rt.prototype,"stops",void 0),(0,i.Cg)([(0,R.w)("stops")],rt.prototype,"readStops",null),(0,i.Cg)([(0,E.K)("stops")],rt.prototype,"writeStops",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,s.MZ)({type:_,json:{write:!0}})],rt.prototype,"travelMode",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useTimeWindows",void 0),rt=tt=(0,i.Cg)([(0,s.$K)("esri.rest.support.RouteParameters")],rt);let st=class extends((0,L.OU)(Z.o)){static{ot=this}constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return H(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return G(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return H(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}readServiceCosts(e,t){return G(t.attributes,"Attr_")}writeServiceCosts(e,t){V(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return G(t.attributes,"Violation_")}readWait(e,t){return G(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"DepartureUTCOffset",alias:"Departure Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new ot({arriveCurbApproach:null==e.attributes.ArrivalCurbApproach?null:D.JJ.fromJSON(e.attributes.ArrivalCurbApproach),arriveTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null==e.attributes.CumulativeCosts?null:K(JSON.parse(e.attributes.CumulativeCosts)),cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null==e.attributes.CurbApproach?null:D.JJ.fromJSON(e.attributes.CurbApproach),departCurbApproach:null==e.attributes.DepartureCurbApproach?null:D.JJ.fromJSON(e.attributes.DepartureCurbApproach),departTime:null==e.attributes.DepartureTime?null:new Date(e.attributes.DepartureTime),departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null==e.attributes.LocationType?null:D.EM.fromJSON(e.attributes.LocationType),name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null==e.attributes.ServiceCosts?null:K(JSON.parse(e.attributes.ServiceCosts)),serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null==e.attributes.Status?null:D.$r.fromJSON(e.attributes.Status),symbol:e.symbol,timeWindowEnd:null==e.attributes.TimeWindowEnd?null:new Date(e.attributes.TimeWindowEnd),timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null==e.attributes.TimeWindowStart?null:new Date(e.attributes.TimeWindowStart),timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){let e={ObjectID:this.objectId,ArrivalCurbApproach:this.arriveCurbApproach?D.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime?.getTime()??null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts?JSON.stringify(z(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach?D.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach?D.JJ.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime?.getTime()??null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType?D.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts?JSON.stringify(z(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status?D.$r.toJSON(this.status):null,TimeWindowEnd:this.timeWindowEnd?.getTime()??null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:this.timeWindowStart?.getTime()??null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new T.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:D.JJ.read}}})],st.prototype,"arriveCurbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],st.prototype,"arriveTime",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,R.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],st.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],st.prototype,"bearing",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],st.prototype,"bearingTol",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeCosts",void 0),(0,i.Cg)([(0,R.w)("cumulativeCosts",["attributes"])],st.prototype,"readCumulativeCosts",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeDistance",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"cumulativeDuration",void 0),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:D.JJ.read},write:{writer:D.JJ.write}}})],st.prototype,"curbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:D.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:D.JJ.read}}})],st.prototype,"departCurbApproach",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],st.prototype,"departTime",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"departTimeOffset",void 0),(0,i.Cg)([(0,R.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],st.prototype,"readDepartTimeOffset",null),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],st.prototype,"distanceToNetworkInMeters",void 0),(0,i.Cg)([(0,s.MZ)({type:se.A,json:{write:!0},value:null})],st.prototype,"geometry",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"lateDuration",void 0),(0,i.Cg)([(0,s.MZ)({type:D.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:D.EM.read},write:{writer:D.EM.write}}})],st.prototype,"locationType",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Name"}})],st.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],st.prototype,"navLatency",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.ObjectID"}})],st.prototype,"objectId",void 0),(0,i.Cg)([(0,s.MZ)({type:S.A})],st.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.PosAlong"}})],st.prototype,"positionAlong",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.RouteName"}})],st.prototype,"routeName",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceCosts",void 0),(0,i.Cg)([(0,R.w)("serviceCosts",["attributes"])],st.prototype,"readServiceCosts",null),(0,i.Cg)([(0,E.K)("serviceCosts")],st.prototype,"writeServiceCosts",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceDistance",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"serviceDuration",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.Sequence"}})],st.prototype,"sequence",void 0),(0,i.Cg)([(0,s.MZ)({type:D.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:D.mt.read},write:{writer:D.mt.write}}})],st.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapX"}}})],st.prototype,"snapX",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapY"}}})],st.prototype,"snapY",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:{source:"attributes.SnapZ"}}})],st.prototype,"snapZ",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceID"}})],st.prototype,"sourceId",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"attributes.SourceOID"}})],st.prototype,"sourceOid",void 0),(0,i.Cg)([(0,s.MZ)({type:D.$r.apiValues,json:{name:"attributes.Status",read:{reader:D.$r.read},write:{writer:D.$r.write}}})],st.prototype,"status",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Es})],st.prototype,"symbol",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],st.prototype,"timeWindowEnd",void 0),(0,i.Cg)([(0,E.K)("timeWindowEnd")],st.prototype,"writeTimeWindowEnd",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"timeWindowEndOffset",void 0),(0,i.Cg)([(0,s.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],st.prototype,"timeWindowStart",void 0),(0,i.Cg)([(0,E.K)("timeWindowStart")],st.prototype,"writeTimeWindowStart",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"timeWindowStartOffset",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],st.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"violations",void 0),(0,i.Cg)([(0,R.w)("violations",["attributes"])],st.prototype,"readViolations",null),(0,i.Cg)([(0,s.MZ)()],st.prototype,"waitDuration",void 0),(0,i.Cg)([(0,s.MZ)()],st.prototype,"wait",void 0),(0,i.Cg)([(0,R.w)("wait",["attributes"])],st.prototype,"readWait",null),st=ot=(0,i.Cg)([(0,s.$K)("esri.rest.support.Stop")],st);var nt=r(4146),at=r(63074),lt=r(34287),ut=r(8303),pt=r(25036),ct=r(60694),dt=r(94985),yt=r(31593),mt=r(53930);let ht=class extends Z.o{constructor(e){super(e),this.break=new mt.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new mt.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new mt.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new mt.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new mt.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new mt.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"break",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"first",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"unlocated",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"last",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"middle",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],ht.prototype,"waypoint",void 0),ht=(0,i.Cg)([(0,s.$K)("esri.layers.support.RouteStopSymbols")],ht);let gt=class extends Z.o{constructor(e){super(e),this.directionLines=new yt.A({color:[0,122,194],width:6}),this.directionPoints=new mt.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new mt.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new dt.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new yt.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new yt.A({width:8,color:[20,89,127]}),this.stops=new ht}};function ft(e){if(!e.length)return;let t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e),i=Math.max(...r,0);for(let e of t)e.objectId??=++i}function bt(e,t){return e.length===t.length&&vt(e)&&vt(t)}function vt(e){return e.every(({objectId:e})=>null!=e)}function Ct(e,t){return!!e.length||!!t.length}function wt(e){return e.length?e:null}function Tt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Tt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Tt("esriGeometryPolyline")}}}function St(e){return"layers"in e}async function Mt(e){let t=C.A.WGS84;return await(0,v.initializeProjection)(e.spatialReference,t),(0,v.project)(e,t)}function At(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(let r of e)r.symbol=t}function Nt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Ot(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.oU)(e,t,"meters")}(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"directionLines",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],gt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,s.MZ)({types:we.wC})],gt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Ac})],gt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,s.MZ)({types:we.Y7})],gt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,s.MZ)({type:ht})],gt.prototype,"stops",void 0),gt=(0,i.Cg)([(0,s.$K)("esri.layers.support.RouteSymbols")],gt);const It=l.A.ofType(Te),Zt=l.A.ofType(Me),Dt=l.A.ofType(Ne),jt=l.A.ofType(Ze),Ft=l.A.ofType(je),Bt=l.A.ofType(st);let Pt=class extends((0,at.dM)((0,pt.j)((0,lt.q)((0,ut.A)((0,c.M)(nt.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new gt,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Dt,this.polygonBarriers=new jt,this.polylineBarriers=new Ft,this.routeInfo=null,this.spatialReference=C.A.WGS84,this.stops=new Bt,this.type="route"}initialize(){let e=()=>{this._setStopSymbol(this.stops)},t=()=>{At(this.pointBarriers,this.defaultSymbols.pointBarriers)},r=()=>{At(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},i=()=>{At(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([(0,m.on)(()=>this.stops,"change",e,{sync:!0,onListenerAdd:e}),(0,m.on)(()=>this.pointBarriers,"change",t,{sync:!0,onListenerAdd:t}),(0,m.on)(()=>this.polylineBarriers,"change",r,{sync:!0,onListenerAdd:r}),(0,m.on)(()=>this.polygonBarriers,"change",i,{sync:!0,onListenerAdd:i})])}writeFeatureCollectionWebmap(e,t,r,i){let o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),s=o.map((e,t)=>t),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,d.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>Te.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>Me.fromGraphic(e))}get fullExtent(){let e=new f.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:C.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;let t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;let{spatialReference:r}=t.at(0).geometry;if(null==r)return e;let i=t.toArray().map(e=>{let t=e.geometry;return[t.x,t.y]});return new b.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.maxScale))?.layerDefinition.maxScale??0}readMinScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.minScale))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>Ne.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>Ze.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>je.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>Pe.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){let r=St(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return C.A.WGS84;let{layerDefinition:i,featureSet:o}=r[0],s=o.features[0]?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??w.KK;return C.A.fromJSON(s)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>st.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null==e?this._set("url",o.A.routeServiceUrl):this._set("url",(0,ct.Jf)(e,p.A.getLogger(this)))}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();let{fullExtent:e,portalItem:t}=this;if(!t)throw new u.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new u.A("routelayer:route-unsolved","save() requires a solved route");let{portal:r}=t;await r.signIn(),r.user||await t.reload();let{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new u.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");let s={messages:[],origin:"portal-item",portal:r,url:i?(0,g.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Mt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new u.A("routelayer:route-unsolved","saveAs() requires a solved route");let r=A.default.from(e).clone();r.extent??=await Mt(this.fullExtent),r.id=null,r.portal??=M.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",N.mm.MULTI_LAYER,"Route Layer"];let{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();let s=t?.folder,a=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:a}),this.portalItem=r,(0,n.v)(o),o.portalItem=r,r}async solve(e,t){ft(this.stops),ft(this.pointBarriers),ft(this.polylineBarriers),ft(this.polygonBarriers);let r=e?.stops??this.stops,i=e?.pointBarriers??wt(this.pointBarriers),o=e?.polylineBarriers??wt(this.polylineBarriers),s=e?.polygonBarriers??wt(this.polygonBarriers);if(null==r)throw new u.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||l.A.isCollection(r)&&r.length<2)throw new u.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(l.A.isCollection(r))for(let e of r)e.routeName=null;let n=e?.apiKey,{checksum:a,url:p}=this,c=await this._getServiceDescription(p,n,t),d=e?.travelMode??c.defaultTravelMode,m=e?.accumulateAttributes??[];d&&(m.push(d.distanceAttributeName),d.timeAttributeName&&m.push(d.timeAttributeName));let h,g={accumulateAttributes:m,checksum:a,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveObjectID:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},f=rt.from(e??{});f.set(g);try{h=await ve(p,f,t)}catch(e){throw(0,y.zf)(e)?e:new u.A("routelayer:failed-route-request","the routing request failed",{error:e})}let b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),this._populatePortalFields(b,c,f),b}update(e){let{checksum:t,directionLines:r,directionPoints:i,pointBarriers:o,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;bt(l,this.stops)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.positionAlong=r.positionAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}(l,this.stops):this.set({stops:l}),Ct(o,this.pointBarriers)&&(bt(o,this.pointBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}(o,this.pointBarriers):this.set({pointBarriers:o})),Ct(n,this.polylineBarriers)&&(bt(n,this.polylineBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(n,this.polylineBarriers):this.set({polylineBarriers:n})),Ct(s,this.polygonBarriers)&&(bt(s,this.polygonBarriers)?function(e,t){for(let r of e){let e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(s,this.polygonBarriers):this.set({polygonBarriers:s})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){let o=(St(e)?e.layers:e.featureCollection?.layers)?.find(e=>e.layerDefinition.name===t);if(null==o)return new l.A;let{layerDefinition:s,popupInfo:n,featureSet:a}=o,u=s.drawingInfo.renderer,{features:p}=a,c=a.spatialReference??s.spatialReference??s.extent.spatialReference??w.KK,d=u&&(0,O.L)(u),y=C.A.fromJSON(c),m=p.map(e=>{let i=T.A.fromJSON(e);i.geometry&&e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=y);let o=r(i);return o.symbol??=d?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=n&&S.A.fromJSON(n),o});return i&&m.some(({symbol:e})=>!e)&&i(m),new l.A(m)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;let i=await $(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){let t=l.A.isCollection(e)?e.toArray():e;if(!t||!t.length||!this.defaultSymbols.stops||t.every(({symbol:e})=>!!e))return;let{first:r,last:i,middle:o,unlocated:s,waypoint:n,break:u}=this.defaultSymbols.stops,p=t.map(({sequence:e})=>e).filter(a.Ru),c=t.length===p.length;if(!this.routeInfo&&!c||1===t.length)return void t.forEach((e,s)=>{switch(s){case 0:e.symbol=r;break;case t.length-1:e.symbol=i;break;default:e.symbol=o}});let d=Math.min(...p),y=Math.max(...p);for(let e of t)e.symbol=e.sequence===d?r:e.sequence===y?i:this.routeInfo&&"ok"!==e.status&&"not-located-on-closest"!==e.status?s:"waypoint"===e.locationType?n:"break"===e.locationType?u:o}_toRouteLayerSolution(e){let{checksum:t,routeResults:r}=e,i=r[0].stops?.map(e=>st.fromJSON(e.toJSON()));this._setStopSymbol(i);let o=new Bt(i),s=new jt(e.polygonBarriers?.map(e=>Ze.fromJSON(e.toJSON())));At(s,this.defaultSymbols.polygonBarriers);let n=new Ft(e.polylineBarriers?.map(e=>je.fromJSON(e.toJSON())));At(n,this.defaultSymbols.polylineBarriers);let a=new Dt(e.pointBarriers?.map(e=>Ne.fromJSON(e.toJSON())));At(a,this.defaultSymbols.pointBarriers);let l=r[0].route?.toJSON(),u=Pe.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;let p=new Zt(r[0].directionPoints?.features.map(e=>Me.fromJSON(e.toJSON())));At(p,this.defaultSymbols.directionPoints);let c=new It(r[0].directionLines?.features.map(e=>Te.fromJSON(e.toJSON())));return At(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Te.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Me.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;let n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>function(e){let{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e)),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??Tt(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ne.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",Ze.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",je.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null==this.routeInfo?null:new l.A([this.routeInfo]),this.defaultSymbols.routeInfo,"esriGeometryPolyline",Pe.fields,"RouteInfo","Route Details")}_writeStops(){let e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",st.fields,"Stops","Stops");if(null==e)return null;let{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){let i=(t.networkDataset?.networkAttributes)?.filter(({usageType:e})=>"cost"===e)??[],o=r.travelMode??t.defaultTravelMode;if(null==o)return void p.A.getLogger(this).warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");let{timeAttributeName:s,distanceAttributeName:n}=o,a=i.find(({name:e})=>e===s),l=i.find(({name:e})=>e===n),c=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=a?.units,y=l?.units;if(!d||!y)throw new u.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");let m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(i.filter(({name:e})=>e===s||e===n||e===c||null!=e&&h.includes(e)).map(({name:e})=>e)),f=e=>{for(let t in e)g.has(t)||delete e[t]};for(let t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[c]??0,f(t.costs));for(let t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));for(let t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));let{routeInfo:b}=e,{findBestSequence:v,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:T,timeWindowsAreUTC:S}=r;b.analysisSettings=new Fe({accumulateAttributes:h,directionsLanguage:m,findBestSequence:v,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:T,timeWindowsAreUTC:S,travelMode:o}),b.totalDuration=Nt(b.totalCosts?.[s]??0,d),b.totalDistance=Ot(b.totalCosts?.[n]??0,y),b.totalLateDuration=Nt(b.totalViolations?.[s]??0,d),b.totalWaitDuration=Nt(b.totalWait?.[s]??0,d),null!=b.totalCosts&&f(b.totalCosts),null!=b.totalViolations&&f(b.totalViolations),null!=b.totalWait&&f(b.totalWait);for(let t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Nt(t.serviceCosts[s]??0,d),t.serviceDistance=Ot(t.serviceCosts[n]??0,y),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Nt(t.cumulativeCosts[s]??0,d),t.cumulativeDistance=Ot(t.cumulativeCosts[n]??0,y),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Nt(t.violations[s]??0,d),f(t.violations)),null!=t.wait&&(t.waitDuration=Nt(t.wait[s]??0,d),f(t.wait))}};(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Pt.prototype,"_featureCollection",void 0),(0,i.Cg)([(0,E.K)(["web-map","portal-item"],"_featureCollection")],Pt.prototype,"writeFeatureCollectionWebmap",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Pt.prototype,"_type",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],Pt.prototype,"checksum",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:gt})],Pt.prototype,"defaultSymbols",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"directionLines",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Pt.prototype,"readDirectionLines",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Pt.prototype,"readDirectionPoints",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Pt.prototype,"featureCollectionType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"fullExtent",null),(0,i.Cg)([(0,s.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Pt.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,s.MZ)({type:["show","hide"]})],Pt.prototype,"listMode",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Pt.prototype,"maxScale",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Pt.prototype,"readMaxScale",null),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Pt.prototype,"minScale",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Pt.prototype,"readMinScale",null),(0,i.Cg)([(0,s.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Pt.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(Ne)})],Pt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPointBarriers",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(Ze)})],Pt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(je)})],Pt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Pt.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],Pt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Pt.prototype,"readRouteInfo",null),(0,i.Cg)([(0,s.MZ)({type:C.A})],Pt.prototype,"spatialReference",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Pt.prototype,"readSpatialReference",null),(0,i.Cg)([(0,s.MZ)({nonNullable:!0,type:l.A.ofType(st)})],Pt.prototype,"stops",void 0),(0,i.Cg)([(0,R.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Pt.prototype,"readStops",null),(0,i.Cg)([(0,s.MZ)()],Pt.prototype,"title",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],Pt.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)()],Pt.prototype,"url",null),Pt=(0,i.Cg)([(0,s.$K)("esri.layers.RouteLayer")],Pt);const xt=Pt},76369(e,t,r){r.d(t,{LF:()=>T,M9:()=>S});var i=r(49186),o=r(93637),s=r(40876),n=r(59247),a=r(27865);class l extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null,i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));let o=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,n=this.location.source+":"+s.line+":"+s.column;if(r){let e=this.location.end,i="".padEnd(s.line.toString().length," "),a=r[o.line-1],l=(o.line===e.line?e.column:a.length+1)-o.column||1;t+="\n --\x3e "+n+"\n"+i+" |\n"+s.line+" | "+a+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+n}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}let i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e,t){return function(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}(e.replace(t,"\\$&").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(e,/[\\"]/g)}function n(e){return o(e,/[\\\]^-]/g)}let a={literal:e=>'"'+s(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+s(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){let t=p(e);return t&&0!==t.length?t:null}let t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:p(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function p(e){let t;if(!e)return[];try{t=function(e,t){let r,i,o={},s=(t=void 0===t?{}:t).grammarSource,n={start:re},a=re,u="none",p="grad",c="turn",d=Q("none"),y=H("none",!1),m=H(")",!1),h=H(",",!1),g=Y([" ","\t","\n","\r"],!1,!1,!1),f=Q("function"),b=H("(",!1),v=Q("identifier"),C=Y([["a","z"],"-"],!1,!1,!1),w=Q("percentage"),T=H("%",!1),S=Q("length"),M=H("px",!1),A=H("cm",!1),N=H("mm",!1),O=H("in",!1),I=H("pt",!1),Z=H("pc",!1),D=Q("angle"),j=H("deg",!1),F=H("rad",!1),B=H("grad",!1),P=H("turn",!1),x=Q("number"),L=Q("color"),R=H("#",!1),E=Y([["0","9"],["a","f"],["A","F"]],!1,!1,!1),_=Y(["+","-"],!1,!1,!1),J=Y([["0","9"]],!1,!1,!1),U=H(".",!1),k=H("e",!1),$=0|t.peg$currPos,q=$,W=[{line:1,column:1}],G=$,V=t.peg$maxFailExpected||[],K=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in n))throw Error("Can't start parsing from rule \""+t.startRule+'".');a=n[t.startRule]}function z(){return e.substring(q,$)}function H(e,t){return{type:"literal",text:e,ignoreCase:t}}function Y(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function Q(e){return{type:"other",description:e}}function X(t){let r,i=W[t];if(i)return i;if(t>=W.length)r=W.length-1;else for(r=t;!W[--r];);for(i=W[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return W[t]=i,i}function ee(e,t,r){let i=X(e),o=X(t);return{source:s,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function te(e){$<G||($>G&&(G=$,V=[]),V.push(e))}function re(){let e;return e=ie(),e===o&&(e=function(){let e,t;for(e=[];t=oe(),t!==o;)e.push(t);return e.length<1&&(e=o),e}()),e}function ie(){let t,r;return K++,t=$,ne(),e.substr($,4)===u?(r=u,$+=4):(r=o,0===K&&te(y)),r===o?($=t,t=o):(ne(),q=t,t=[]),K--,t===o&&0===K&&te(d),t}function oe(){let t,r,i,s;return t=$,ne(),r=function(){let t,r,i;return K++,t=$,r=ae(),r===o?($=t,t=o):(40===e.charCodeAt($)?(i="(",$++):(i=o,0===K&&te(b)),i===o?($=t,t=o):(q=t,t=r)),K--,t===o&&(r=o,0===K&&te(f)),t}(),r===o?($=t,t=o):(ne(),i=function(){let t,r,i,s,n,a,l,u;if(t=$,r=se(),r!==o){for(i=[];s=$,n=ne(),44===e.charCodeAt($)?(a=",",$++):(a=o,0===K&&te(h)),a===o&&(a=null),l=ne(),u=se(),u===o?($=s,s=o):(n=[n,a,l,u],s=n),s!==o;)i.push(s);q=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(r,i)}else $=t,t=o;return t}(),i===o&&(i=null),ne(),41===e.charCodeAt($)?(s=")",$++):(s=o,0===K&&te(m)),s===o?($=t,t=o):(ne(),q=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(r,i))),t}function se(){let e,t;return e=$,t=le(),t===o&&(t=ue(),t===o&&(t=pe(),t===o&&(t=function(){let e,t;return K++,e=$,ne(),t=de(),t===o?($=e,e=o):(q=e,e=function(e){return{value:e,unit:null}}(t)),K--,e===o&&0===K&&te(x),e}()))),t!==o&&(q=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===o&&(e=$,t=ce(),t!==o&&(q=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function ne(){let t,r;for(K++,t=[];r=e.charAt($),i=r.charCodeAt(0),32===i||9===i||10===i||13===i?$++:(r=o,0===K&&te(g)),r!==o;)t.push(r);return K--,t}function ae(){let t,r,s;for(K++,t=$,r=[];s=e.charAt($),i=s.charCodeAt(0),i>=97&&i<=122||45===i?$++:(s=o,0===K&&te(C)),s!==o;)r.push(s);return r.length<1&&(r=o),r!==o&&(q=t,r=z()),t=r,K--,t===o&&(r=o,0===K&&te(v)),t}function le(){let t,r,i;return K++,t=$,ne(),r=de(),r===o?($=t,t=o):(37===e.charCodeAt($)?(i="%",$++):(i=o,0===K&&te(T)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"%"}}(r))),K--,t===o&&0===K&&te(w),t}function ue(){let t,r,i;return K++,t=$,ne(),r=de(),r===o?($=t,t=o):("px"===e.substr($,2)?(i="px",$+=2):(i=o,0===K&&te(M)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"px"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("cm"===e.substr($,2)?(i="cm",$+=2):(i=o,0===K&&te(A)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"cm"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("mm"===e.substr($,2)?(i="mm",$+=2):(i=o,0===K&&te(N)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"mm"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("in"===e.substr($,2)?(i="in",$+=2):(i=o,0===K&&te(O)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"in"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("pt"===e.substr($,2)?(i="pt",$+=2):(i=o,0===K&&te(I)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"pt"}}(r))),t===o&&(t=$,ne(),r=de(),r===o?($=t,t=o):("pc"===e.substr($,2)?(i="pc",$+=2):(i=o,0===K&&te(Z)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"pc"}}(r)))))))),K--,t===o&&0===K&&te(S),t}function pe(){let t,r,i;return K++,t=$,r=de(),r===o?($=t,t=o):("deg"===e.substr($,3)?(i="deg",$+=3):(i=o,0===K&&te(j)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"deg"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):("rad"===e.substr($,3)?(i="rad",$+=3):(i=o,0===K&&te(F)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"rad"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):(e.substr($,4)===p?(i=p,$+=4):(i=o,0===K&&te(B)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"grad"}}(r))),t===o&&(t=$,r=de(),r===o?($=t,t=o):(e.substr($,4)===c?(i=c,$+=4):(i=o,0===K&&te(P)),i===o?($=t,t=o):(q=t,t=function(e){return{value:e,unit:"turn"}}(r)))))),K--,t===o&&(r=o,0===K&&te(D)),t}function ce(){let t,r,s,n;if(K++,t=$,35===e.charCodeAt($)?(r="#",$++):(r=o,0===K&&te(R)),r!==o){for(s=[];n=e.charAt($),i=n.charCodeAt(0),i>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70?$++:(n=o,0===K&&te(E)),n!==o;)s.push(n);s.length<1&&(s=o),s===o?($=t,t=o):(q=t,t={type:"hex",value:z()})}else $=t,t=o;return t===o&&(t=$,r=oe(),r!==o&&(q=t,r=function(e){return{type:"function",value:e}}(r)),t=r,t===o&&(t=$,r=ae(),r!==o&&(q=t,r={type:"named",value:z()}),t=r)),K--,t===o&&(r=o,0===K&&te(L)),t}function de(){let t,r,s,n,a,l,u,p;for(t=$,r=e.charAt($),i=r.charCodeAt(0),43===i||45===i?$++:(r=o,0===K&&te(_)),r===o&&(r=null),s=$,n=[];a=e.charAt($),i=a.charCodeAt(0),i>=48&&i<=57?$++:(a=o,0===K&&te(J)),a!==o;)n.push(a);if(46===e.charCodeAt($)?(a=".",$++):(a=o,0===K&&te(U)),a!==o){for(l=[];u=e.charAt($),i=u.charCodeAt(0),i>=48&&i<=57?$++:(u=o,0===K&&te(J)),u!==o;)l.push(u);l.length<1&&(l=o),l===o?($=s,s=o):(n=[n,a,l],s=n)}else $=s,s=o;if(s===o){for(s=[];n=e.charAt($),i=n.charCodeAt(0),i>=48&&i<=57?$++:(n=o,0===K&&te(J)),n!==o;)s.push(n);s.length<1&&(s=o)}if(s!==o){if(n=$,101===e.charCodeAt($)?(a="e",$++):(a=o,0===K&&te(k)),a!==o){for(l=e.charAt($),i=l.charCodeAt(0),43===i||45===i?$++:(l=o,0===K&&te(_)),l===o&&(l=null),u=[];p=e.charAt($),i=p.charCodeAt(0),i>=48&&i<=57?$++:(p=o,0===K&&te(J)),p!==o;)u.push(p);u.length<1&&(u=o),u===o?($=n,n=o):(a=[a,l,u],n=a)}else $=n,n=o;n===o&&(n=null),q=t,t=parseFloat(z())}else $=t,t=o;return t}r=a();let ye=r!==o&&$===e.length;function me(){throw r!==o&&$<e.length&&te({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(V,G<e.length?function(t=$){let r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(G):null,G<e.length?ee(G,G+1):ee(G,G))}return t.peg$library?{peg$result:r,peg$currPos:$,peg$FAILED:o,peg$maxFailExpected:V,peg$maxFailPos:G,peg$success:ye,peg$throw:ye?void 0:me}:ye?r:void me()}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new n.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new n.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=m[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${d(e)}`,{term:e})}(e),e.value*m[e.unit]||0}(e.parameters[0])),new n.Nd(t)}(e);case"blur":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=f(e.parameters[0]),y(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){let t=[],r=null;for(let o of e.parameters)if("color"===o.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=b(o)}else{let e=f(o);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&y(e,o)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new n.$b(t[0],t[1],t[2]||0,r||v("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return c(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(r=f(e.parameters[1]),y(r,e.parameters[1])),e.parameters[2]&&(i=g(e.parameters[2])),new n.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function c(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function d(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in h)return"<length>";if(e.unit in m)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function y(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const m={deg:1,grad:.9,rad:180/Math.PI,turn:360},h={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${d(e)}`,{term:e})}(e);let t=e.value;return y(t,e),"%"===e.unit?.01*t:t}function f(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${d(e)}`,{term:e})}(e),e.value*h[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,s.j5)(e.value);case"named":return v(e.value);case"function":return function(e){if(c(e.parameters,4),C.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(w.test(e.name))return(0,s.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${d(e)}`,{term:e})}(e),y(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function v(e){if(!(0,s.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,s.c4)(e)}const C=/^rgba?/i,w=/^hsla?/i;function T(e,t,r){try{return function(e){return e&&0!==e.length?function(e){let t=e[0];return!!t&&"scale"in t}(e)?Array.from(e,e=>({scale:e.scale,value:M(e.value)})):M(e):null}(e)}catch(e){r?.messages?.push(e)}return null}function S(e,t,r,i){try{let i=function(e){let t=u(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,o.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function M(e){if(!e?.length)return"";let t=[];for(let r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[A(r,"amount")];break;case"blur":e=[A(r,"radius","pt")];break;case"hue-rotate":e=[A(r,"angle","deg")];break;case"drop-shadow":e=[A(r,"xoffset","pt"),A(r,"yoffset","pt"),A(r,"blurRadius","pt"),N(r,"color")];break;case"bloom":e=[A(r,"strength"),A(r,"radius","pt"),A(r,"threshold")]}let i=`${r.type}(${e.filter(Boolean).join(" ")})`;u(i),t.push(i)}return t.join(" ")}function A(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function N(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});let r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function o(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>o})},63074(e,t,r){var i=r(32198),o=r(91429),s=r(89317),n=r(76369);const a={type:"average.color-burn.color-dodge.color.darken.destination-atop.destination-in.destination-out.destination-over.difference.exclusion.hard-light.hue.invert.lighten.lighter.luminosity.minus.multiply.normal.overlay.plus.reflect.saturation.screen.soft-light.source-atop.source-in.source-out.vivid-light.xor".split("."),nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},l={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9,layerContainerTypes:s.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}};r.d(t,["LF",0,u,"dM",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"blendMode",void 0),(0,i.Cg)([(0,o.MZ)(u)],r.prototype,"effect",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.BlendLayer")],r),r},"sU",0,a])},8303(e,t,r){var i=r(32198),o=r(92602),s=r(91429),n=r(60999),a=r(49186),l=r(36563),u=r(53966),p=r(97768),c=r(17676),d=r(84952),y=r(70333),m=r(20655),h=r(80812),g=r(41318),f=r(10407),b=r(78888),v=r(26121),C=r(77548),w=r(36005),T=r(43937);const S={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new h.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:o}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,l.rE)(i),"reloadFromPortal"),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,o,s=!y.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,s);if(n)i=r.portal.url;else try{i=await(0,C.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,d.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;o=await(y.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new h.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,f.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?y.id?.findCredential(this.url):null;if(!t)return!0;let r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=y.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,o=m.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;let s=`${i}/community/self`,a=null==e?null:e.signal,l=await(0,n.Ke)((0,b.A)(s,{authMode:"no-prompt",query:{f:"json"},signal:a}));return l.ok?g.A.fromJSON(l.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,v.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,s.MZ)({type:h.default})],M.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,i.Cg)([(0,T.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,i.Cg)([(0,s.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.PortalLayer")],M),M}])},25036(e,t,r){var i=r(32198),o=r(91429),s=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,s.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},96576(e,t,r){r.d(t,{A:()=>c});var i,o=r(32198),s=r(91429),n=r(4718),a=r(63988),l=r(92438),u=r(49849),p=r(93223);let c=i=class extends((0,a.h)(l.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e){await Promise.all([this.collectSymbolFields(e),this.collectVVRequiredFields(e)])}async collectSymbolFields(e){await Promise.all(this.symbols.map(t=>t.collectRequiredFields(e)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)(u.Wp)],c.prototype,"symbol",void 0),(0,o.Cg)([(0,p.e)({simple:"simple"})],c.prototype,"type",void 0),c=i=(0,o.Cg)([(0,s.$K)("esri.renderers.SimpleRenderer")],c)},73681(e,t,r){r.d(t,{n:()=>l});var i=r(49186),o=r(53966),s=r(46140),n=r(95466),a=r(55674);class l{static async from(e,t,r){let n=e.dictionary_version?s.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(let e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);let d=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))d.delete(e);d.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});let y=await(0,a.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let m=!n||!n.greaterEqual(4,0);m&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});let h=new u(r,m);return new l(m,p,y,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new n.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},65494(e,t,r){r.d(t,{L:()=>l,r:()=>n});var i=r(90360),o=r(59923),s=r(41214);function n(e,t){return l(e,null,t)}const a=(0,i.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?((0,o.Yc)(r,"warning","renderer",`Only UniqueValueRenderer can be referenced from a web style, but found '${e.type}'`,{definition:e}),null):a(e,t,r):null}},22671(e,t,r){r.d(t,{A:()=>b});var i,o=r(32198),s=r(91429),n=r(66552),a=r(25482),l=r(4718),u=r(16930),p=r(60408),c=r(65864),d=r(50498),y=r(52106),m=r(20437),h=r(36005),g=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,y.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[s,n]}=r,a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*n,a,l);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let s=e[t],n=r.fromJSON(s),a=s.geometry?.spatialReference;null!=n.geometry&&!a&&(n.geometry.spatialReference=i);let l=s.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(let e in u){let t=u[e],r=l[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o,s=[];for(let n=0,a=e.length;n<a;n++){let a=e[n];if(n>0){let e=t(a[0]),n=r(a[1]);(e!==i||n!==o)&&(s.push([e-i,n-o]),i=e,o=n)}else i=t(a[0]),o=r(a[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,p.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){let s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,p.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let s,n,a=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,i=a.length;e<i;e++){let i=a[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(s+=o[0],n+=o[1]):(s=o[0],n=o[1]),o[0]=t(s),o[1]=r(n)}}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let s,n,a=e.points;for(let e=0,i=a.length;e<i;e++){let i=a[e];e>0?(s+=i[0],n+=i[1]):(s=i[0],n=i[1]),i[0]=t(s),i[1]=r(n)}if(i&&o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}else if(o)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,s.MZ)({type:[y.A],json:{write:!0}})],b.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],b.prototype,"readFeatures",null),(0,o.Cg)([(0,s.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,o.Cg)([(0,s.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],b.prototype,"geometryType",void 0),(0,o.Cg)([(0,g.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o.Cg)([(0,s.MZ)({types:d.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,s.MZ)({type:u.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o.Cg)([(0,g.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,s.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,o.Cg)([(0,s.$K)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},37807(e,t,r){var i=r(32198),o=r(91429),s=r(66552),n=r(25482);const a=new s.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends n.o{constructor(e){super(e),this.description=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{read:a.read,write:a.write}})],l.prototype,"type",void 0),l=(0,i.Cg)([(0,o.$K)("esri.rest.support.GPMessage")],l);const u=l;r.d(t,["A",0,u])},2073(e,t,r){var i=r(66552);const o={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},s=(0,i.O)()(o),n=(0,i.O)()({...o,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),p=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),d=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),m=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),h=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),g=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),f=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),b=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),v=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),C=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),w=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),T=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),M=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),A=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),N=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),O=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),I=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),Z=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),D=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});r.d(t,["$n",0,T,"$r",0,g,"EM",0,h,"Ec",0,D,"JJ",0,m,"Mm",0,M,"OC",0,N,"Sr",0,c,"UO",0,a,"Vj",0,I,"WU",0,Z,"Y8",0,n,"Z7",0,l,"_6",0,C,"aJ",0,p,"dd",0,S,"dn",0,u,"et",0,A,"fe",0,v,"gD",0,w,"hE",0,d,"hY",0,s,"iM",0,b,"mt",0,f,"ow",0,y,"vS",0,O])},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>p});var i=r(92602),o=r(4718),s=r(84952),n=r(70333),a=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,s.An)(e):(0,o.o8)(e)}function p(e,t,r){let i={};for(let o in e){if("declaredClass"===o)continue;let s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map(e=>p(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}async function c(e,t,o){return function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t)||(!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(8673),r.e(37),r.e(4189)]).then(()=>r(98232)),(await n.id.getCredential(e,o))?.token)}},93470(e,t,r){const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])},26121(e,t,r){r.d(t,{I6:()=>p,ci:()=>u,dL:()=>l,wN:()=>c});var i=r(49186),o=r(84952),s=r(77548),n=r(20655),a=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let o=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(o=o.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),i&&(o=o.filter(e=>"web-document-write:property-required"!==e.name))}if(o.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}function p(e){return(0,s.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let r=t?.portal,i=e?.id&&(e.portal||n.A.getDefault());return!!r&&!!i&&!(0,o.ut)(i.restUrl,r.restUrl)}}}]);
|