@arcgis/core 4.34.0-next.50 → 4.34.0-next.51
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/analysis/ElevationProfile/GroundLine.d.ts +4 -0
- package/analysis/ElevationProfile/GroundLine.js +5 -0
- package/analysis/ElevationProfile/InputLine.d.ts +4 -0
- package/analysis/ElevationProfile/InputLine.js +5 -0
- package/analysis/ElevationProfile/Line.d.ts +4 -0
- package/analysis/ElevationProfile/Line.js +5 -0
- package/analysis/ElevationProfile/LineChartOptions.d.ts +4 -0
- package/analysis/ElevationProfile/LineChartOptions.js +5 -0
- package/analysis/ElevationProfile/LineViewOptions.d.ts +4 -0
- package/analysis/ElevationProfile/LineViewOptions.js +5 -0
- package/analysis/ElevationProfile/QueryLine.d.ts +4 -0
- package/analysis/ElevationProfile/QueryLine.js +5 -0
- package/analysis/ElevationProfile/SceneLine.d.ts +4 -0
- package/analysis/ElevationProfile/SceneLine.js +5 -0
- package/analysis/ElevationProfile/Units.d.ts +4 -0
- package/analysis/ElevationProfile/Units.js +5 -0
- package/analysis/ElevationProfile/ViewOptions.d.ts +4 -0
- package/analysis/ElevationProfile/ViewOptions.js +5 -0
- package/analysis/ElevationProfile/elevationProfileLineTypes.js +5 -0
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{7bd672e534cde0d5787d.js → 0021118bafefd1e47ff7.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b52c0ca432761076076.js → 081b22fa73ef7b696409.js} +2 -2
- package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +1 -0
- package/assets/esri/core/workers/chunks/0ce671588de2858516d2.js +1 -0
- package/assets/esri/core/workers/chunks/14c6ae4feb4859cfa7c5.js +1 -0
- package/assets/esri/core/workers/chunks/20a2b3d1f826e9059884.js +1 -0
- package/assets/esri/core/workers/chunks/{c4651243525026e6ddde.js → 2da12a64d3baef4aaaa1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3610357c8fa9bec9e0dc.js → 30169cf969d36ea8654e.js} +1 -1
- package/assets/esri/core/workers/chunks/{5b0c42bb95d81085061d.js → 35fc8a64674005b1d1d7.js} +1 -1
- package/assets/esri/core/workers/chunks/37a97e690786814bf0b3.js +1 -0
- package/assets/esri/core/workers/chunks/38f84294fb2fb4663ba5.js +1 -0
- package/assets/esri/core/workers/chunks/3eb3af0b6cf3c2f28131.js +1 -0
- package/assets/esri/core/workers/chunks/48e64f99720907017778.js +1 -0
- package/assets/esri/core/workers/chunks/4bd92232928b832dea76.js +1 -0
- package/assets/esri/core/workers/chunks/50e9eafb118d2a221f10.js +1 -0
- package/assets/esri/core/workers/chunks/55588e668b6acb6aa390.js +1 -0
- package/assets/esri/core/workers/chunks/5b112471dca94b2e8462.js +1 -0
- package/assets/esri/core/workers/chunks/5dfe1aed10095385c066.js +1 -0
- package/assets/esri/core/workers/chunks/7389841fabe0f319f1e5.js +1 -0
- package/assets/esri/core/workers/chunks/77493aa2118d462612a0.js +1 -0
- package/assets/esri/core/workers/chunks/7a8d740d1226719a578a.js +1 -0
- package/assets/esri/core/workers/chunks/8e0559cc6295008fcdf7.js +1 -0
- package/assets/esri/core/workers/chunks/{69e37365c17e7cc4168f.js → 93af38d29d066f27ed28.js} +1 -1
- package/assets/esri/core/workers/chunks/944fa8261aad94ae0542.js +1 -0
- package/assets/esri/core/workers/chunks/{6775d2ab5faf1fa161db.js → 97a38d700f2cb8807d51.js} +1 -1
- package/assets/esri/core/workers/chunks/{45121b7258333c8ebbdb.js → 98ea12c7a000a30f3dc0.js} +1 -1
- package/assets/esri/core/workers/chunks/9e479e7e2e51476c3d27.js +1 -0
- package/assets/esri/core/workers/chunks/a1e179dd6de9c8769b02.js +1 -0
- package/assets/esri/core/workers/chunks/a829969ed44cdb814f27.js +1 -0
- package/assets/esri/core/workers/chunks/ac41b882f9cbf8d56f0c.js +1 -0
- package/assets/esri/core/workers/chunks/b0ee061747bef6729bb9.js +1 -0
- package/assets/esri/core/workers/chunks/b2a035befeeff1a55ad8.js +1 -0
- package/assets/esri/core/workers/chunks/ba45dccb4dab5a74d224.js +1 -0
- package/assets/esri/core/workers/chunks/c5b2a261d8c216ca4a10.js +1 -0
- package/assets/esri/core/workers/chunks/{edc4f230a5bdf928f9fd.js → d1aeb9fe9eb573beefcc.js} +2 -2
- package/assets/esri/core/workers/chunks/e3f68f7b408a08d7cd5d.js +1 -0
- package/assets/esri/core/workers/chunks/e9716995ce0c3683eafc.js +1 -0
- package/assets/esri/core/workers/chunks/{4cc982c99d84e896d535.js → ed25bf087f52e5d3e71b.js} +1 -1
- package/assets/esri/core/workers/chunks/f92e608931b1c168cb45.js +1 -0
- package/assets/esri/core/workers/chunks/f9f94b5efa9a64cdb407.js +1 -0
- package/assets/esri/core/workers/chunks/fb4950995f6780f6c22a.js +1 -0
- package/assets/esri/themes/base/widgets/_VideoPlayer.scss +16 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Laserlines.glsl.js +12 -12
- package/chunks/sphere.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/projection/projectBoundingSphere.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +1 -1
- package/geometry/support/curves/circleUtils.js +1 -1
- package/geometry/support/curves/ellipticArc4Utils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/mathUtils.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +271 -279
- package/kernel.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +5 -0
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ProfileLinesVisualization.js +1 -1
- package/views/3d/analysis/ElevationProfile/SceneLineComputation.js +5 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.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/I3SProjectionUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/ScaleRangeQueries.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.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/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/screenSizePerspectiveUtils.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/analysis/ElevationProfile/Controller.js +5 -0
- package/views/analysis/ElevationProfile/GroundLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/InputLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/LineComputation.js +5 -0
- package/views/analysis/ElevationProfile/QueryLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/Result.d.ts +4 -0
- package/views/analysis/{ElevationProfileResult.js → ElevationProfile/Result.js} +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/LayerLayerViewInfo.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +5 -0
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/css.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/analysis/ElevationProfileLine.d.ts +0 -4
- package/analysis/ElevationProfileLine.js +0 -5
- package/analysis/ElevationProfileLineChartOptions.d.ts +0 -4
- package/analysis/ElevationProfileLineChartOptions.js +0 -5
- package/analysis/ElevationProfileLineGround.d.ts +0 -4
- package/analysis/ElevationProfileLineGround.js +0 -5
- package/analysis/ElevationProfileLineInput.d.ts +0 -4
- package/analysis/ElevationProfileLineInput.js +0 -5
- package/analysis/ElevationProfileLineQuery.d.ts +0 -4
- package/analysis/ElevationProfileLineQuery.js +0 -5
- package/analysis/ElevationProfileLineScene.d.ts +0 -4
- package/analysis/ElevationProfileLineScene.js +0 -5
- package/analysis/ElevationProfileLineViewOptions.d.ts +0 -4
- package/analysis/ElevationProfileLineViewOptions.js +0 -5
- package/analysis/ElevationProfileUnits.d.ts +0 -4
- package/analysis/ElevationProfileUnits.js +0 -5
- package/analysis/ElevationProfileViewOptions.d.ts +0 -4
- package/analysis/ElevationProfileViewOptions.js +0 -5
- package/analysis/support/elevationProfileLineTypes.js +0 -5
- package/assets/esri/core/workers/chunks/21a90083f29e44ccd735.js +0 -1
- package/assets/esri/core/workers/chunks/224872bfd923cf4c9d78.js +0 -1
- package/assets/esri/core/workers/chunks/237c96d946efa5ed0386.js +0 -1
- package/assets/esri/core/workers/chunks/2942ab268f24cea2e722.js +0 -1
- package/assets/esri/core/workers/chunks/32789077e37d5c8191e7.js +0 -1
- package/assets/esri/core/workers/chunks/3e3886a51c0f8c86df75.js +0 -1
- package/assets/esri/core/workers/chunks/6d786fac4bb5efcb7acc.js +0 -1
- package/assets/esri/core/workers/chunks/7b95da70d39ba316b051.js +0 -1
- package/assets/esri/core/workers/chunks/7df8c78e36b04ad657d2.js +0 -1
- package/assets/esri/core/workers/chunks/838c7fd37b2e78b1d582.js +0 -1
- package/assets/esri/core/workers/chunks/8c6119dde0eead8d90d9.js +0 -1
- package/assets/esri/core/workers/chunks/8c8c8f1058a4b58a3181.js +0 -1
- package/assets/esri/core/workers/chunks/8f70650aba8e55eb7a96.js +0 -1
- package/assets/esri/core/workers/chunks/96a34b240d17147902f4.js +0 -1
- package/assets/esri/core/workers/chunks/9af47a4da3a0b84f1add.js +0 -1
- package/assets/esri/core/workers/chunks/9affcf990ea810fa426b.js +0 -1
- package/assets/esri/core/workers/chunks/a3dce23ca98c9b0f945f.js +0 -1
- package/assets/esri/core/workers/chunks/a50026e567b1edff87c6.js +0 -1
- package/assets/esri/core/workers/chunks/a7ff44157b8cf19de37e.js +0 -1
- package/assets/esri/core/workers/chunks/b884bd2f50aaccfa24c5.js +0 -1
- package/assets/esri/core/workers/chunks/c483d2149d9d0099bfdb.js +0 -1
- package/assets/esri/core/workers/chunks/cfc3f202e7313ca56823.js +0 -1
- package/assets/esri/core/workers/chunks/d1c97fdcba6eb443cb1c.js +0 -1
- package/assets/esri/core/workers/chunks/d7c679374aa2d256becf.js +0 -1
- package/assets/esri/core/workers/chunks/d8d17e3ecccec7e99f0b.js +0 -1
- package/assets/esri/core/workers/chunks/e4069352d5d1104749ae.js +0 -1
- package/assets/esri/core/workers/chunks/e408ccee12bfe089c913.js +0 -1
- package/assets/esri/core/workers/chunks/e5522c85ca4f0efab8ea.js +0 -1
- package/assets/esri/core/workers/chunks/e59e09766b130a05c617.js +0 -1
- package/assets/esri/core/workers/chunks/ef02e33ea53b46b566cb.js +0 -1
- package/assets/esri/core/workers/chunks/ff79a8df1b1941ae350d.js +0 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileController.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +0 -5
- package/views/analysis/ElevationProfileResult.d.ts +0 -4
- package/views/support/PixelHighlightOptions.js +0 -5
- /package/assets/esri/core/workers/chunks/{edc4f230a5bdf928f9fd.js.LICENSE.txt → d1aeb9fe9eb573beefcc.js.LICENSE.txt} +0 -0
- /package/views/analysis/ElevationProfile/{profileUtils.js → profileGenerationUtils.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[979,7136],{4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(31635),o=r(78888),s=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),m=r(5443),h=r(16930),f=r(92602),g=r(64272);let v=0,b=class extends((0,n.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,d.MZ)({type:m.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,d.MZ)({type:h.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,d.MZ)({type:g.T})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,y.$)("esri.layers.Layer")],b)},4197:(e,t,r)=>{r.d(t,{cj:()=>a,jh:()=>o,l5:()=>n,xm:()=>s});var i=r(34275);function o(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function n(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>m,w2:()=>y});var i=r(65008),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){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const 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};const 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;const f=a(e)&&a(t);for(const i of y){const o=u(e,i),s=u(t,i);let n;if((f||"function"!=typeof o&&"function"!=typeof s)&&o!==s&&(null!=o||null!=s)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(o,s);else if(o instanceof Date&&s instanceof Date){if(o.getTime()===s.getTime())continue;n={type:"complete",oldValue:o,newValue:s}}else n="object"==typeof o&&"object"==typeof s&&p(o)===p(s)?c(o,s):{type:"complete",oldValue:o,newValue:s};null!=n&&(null!=h?h.diff[i]=n:h={type:"partial",diff:{[i]:n}})}}return h}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function y(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function m(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)}},8303:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(31635),o=r(92602),s=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(77548),v=r(20655),b=r(80812),w=r(41318),C=r(10407);const T=e=>{const t=e;let T=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.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{const{load:i}=await r.e(1204).then(r.bind(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 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{const{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);const i=!s.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,i);let n,a;if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(o?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,C.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){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const 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){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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,y.MZ)({type:b.default})],T.prototype,"portalItem",null),(0,i.Cg)([(0,m.w)("web-document","portalItem",["itemId"])],T.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],T.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],T.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasUpdateItemPrivileges",void 0),T=(0,i.Cg)([(0,h.$)("esri.layers.mixins.PortalLayer")],T),T},S={credential:null,user:null}},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>T});var i=r(92602),o=r(49186),s=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=r(78888),d=r(65864),y=r(2272),m=r(84952),h=r(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new o.A("internal:geometry",e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const o=e[i][0],s=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+o,a=u*i+s;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+o,n=u*e+s;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function C(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const o=t.cutIndexes[i],s=t.geometries[i],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(o===r){if(g(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function T(e,t,r){if(!Array.isArray(e))return T([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,g,v,S,M,A,O,N,I=0;const Z=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,u.Vp)(s),v=s.isWebMercator,A=v?102100:4326,S=l.j7[A].maxX,M=l.j7[A].minX,O=l.j7[A].plus180Line,N=l.j7[A].minus180Line),g)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(w(t.clone(),S,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>w(e,S,M)),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);D.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,M)*(2*S);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(O)&&s!==S?(I=s>I?s:I,i=b(i,v),Z.push(i),D.push("cut")):e.intersects(N)&&o!==M?(I=s*(2*S)>I?s*(2*S):I,i=b(i,v,360),Z.push(i),D.push("cut")):D.push(i)}else D.push(t.clone());else D.push(t);else D.push(t);let j=(0,l.kd)(I,S),F=-90;const _=j,x=new a.A;for(;j>0;){const e=360*j-180;x.addPath([[e,F],[e,-1*F]]),F*=-1,j--}if(Z.length>0&&_>0){const t=C(Z,await async function(e,t,r,i){const o=(0,y.Dl)(e),s=t[0].spatialReference,n={...i,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map(e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t})}}(o,Z,x,r)),i=[],s=[];for(let r=0;r<D.length;r++){const o=D[r];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(i.push(o),s.push("simplify")):s.push(v?(0,p.Gh)(o):o)}}if(!i.length)return s;const n=await async function(e,t,r){const i="string"==typeof e?(0,m.An)(e):e,o=t[0].spatialReference,s=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,s,o)}(o,i,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(v?(0,p.Gh)(n.shift()):n.shift())}return a}const B=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)B.push(t);else{const e=Z.shift();B.push(!0===v?(0,p.Gh)(e):e)}}return B}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[o,s]=i.valid,n=2*s;let a=0,l=0;t>s?a=Math.ceil(Math.abs(t-s)/n):t<o&&(a=-Math.ceil(Math.abs(t-o)/n)),e>s?l=Math.ceil(Math.abs(e-s)/n):e<o&&(l=-Math.ceil(Math.abs(e-o)/n));let p=e+(a-l)*n;const c=p-t;return c>s?p-=n:c<o&&(p+=n),p}},24097:(e,t,r)=>{r.d(t,{K:()=>i});const i={type:String,json:{read:{source:"token"},write:{target:"token"}}}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(31635),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const n=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const 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,s.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},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)})}},46140:(e,t,r)=>{r.d(t,{R:()=>o});var i=r(49186);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,s]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!n.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),l=parseInt(s,10);return new e(a,l,r)}}},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":{const r=[];for(const 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]];const 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})},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>f,QY:()=>d,lL:()=>g,xR:()=>m});var i=r(66131),o=r(49186),s=(r(44208),r(44729)),n=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return h.create(e,t,null,["$feature","$view"])}function m(e,t,r){return h.create(e,t,r,["$feature","$view","$config"])}class h{static async create(e,t,r,i){const{arcade:s,Dictionary:n}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new o.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=s.compileScript(a,p);let d=null;null!=r&&(d=new n(r),d.immutable=!0);const y=new n;return y.immutable=!1,y.setField("scale",0),new h(e,s,a,c,t,y,d,n)}constructor(e,t,r,i,o,s,n,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=o,this._viewDict=s,this._configDict=n,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:o,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=o?null!=r?i.lY.epochToArcadeDate(o,r):i.lY.unknownEpochToArcadeDate(o):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return n.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},63074:(e,t,r)=>{r.d(t,{LF:()=>p,dM:()=>c,sU:()=>l});var i=r(31635),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),n=r(89317),a=r(76369);const l={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"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:n.K}},"portal-item":{read:!0,write:{layerContainerTypes:n.K}}}}},u={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:n.K}},p={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i.Cg)([(0,o.MZ)(l)],r.prototype,"blendMode",void 0),(0,i.Cg)([(0,o.MZ)(p)],r.prototype,"effect",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.BlendLayer")],r),r}},64185:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Tt});var i=r(31635),o=r(92602),s=r(52106),n=r(13874),a=r(7762),l=r(49186),u=r(53966),p=r(92071),c=r(93637),d=r(74887),y=r(36708),m=r(83047),h=r(84952),f=r(10107),g=(r(44208),r(87811),r(36005)),v=r(40608),b=r(43937),w=r(46130),C=r(5443),T=r(48526),S=r(98988),M=r(16930),A=r(21325),O=r(4146),N=r(63074),I=r(16131),Z=r(8303),D=r(25036),j=r(60694),F=r(25482),_=r(53930),x=r(33910);let B=class extends F.o{constructor(e){super(e),this.break=new _.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new _.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new _.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new _.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new _.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new _.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"break",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"first",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"unlocated",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"last",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"middle",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],B.prototype,"waypoint",void 0),B=(0,i.Cg)([(0,v.$)("esri.layers.support.RouteStopSymbols")],B);var E=r(94985),P=r(31593);let L=class extends F.o{constructor(e){super(e),this.directionLines=new P.A({color:[0,122,194],width:6}),this.directionPoints=new _.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new _.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new E.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.A({width:8,color:[20,89,127]}),this.stops=new B}};(0,i.Cg)([(0,f.MZ)({types:x.Y7})],L.prototype,"directionLines",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],L.prototype,"directionPoints",void 0),(0,i.Cg)([(0,f.MZ)({types:x.wC})],L.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Ac})],L.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Y7})],L.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Y7})],L.prototype,"routeInfo",void 0),(0,i.Cg)([(0,f.MZ)({type:B})],L.prototype,"stops",void 0),L=(0,i.Cg)([(0,v.$)("esri.layers.support.RouteSymbols")],L);var R=r(20655),J=r(80812),U=r(10407),k=r(65494),$=r(78888),V=r(2272),W=r(93223),q=r(2073);let G=class extends F.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,f.MZ)({type:String})],G.prototype,"dataType",void 0),(0,i.Cg)([(0,W.e)(q.et,{ignoreUnknown:!1})],G.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[String]})],G.prototype,"parameterNames",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],G.prototype,"restrictionUsageParameterName",void 0),(0,i.Cg)([(0,W.e)(q.Mm,{ignoreUnknown:!1})],G.prototype,"timeNeutralAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],G.prototype,"trafficSupport",void 0),(0,i.Cg)([(0,W.e)(q.dn)],G.prototype,"units",void 0),(0,i.Cg)([(0,W.e)(q.WU)],G.prototype,"usageType",void 0),G=(0,i.Cg)([(0,v.$)("esri.rest.support.NetworkAttribute")],G);const z=G;let Y=class extends F.o{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i.Cg)([(0,f.MZ)({type:Number})],Y.prototype,"buildTime",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],Y.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[z]})],Y.prototype,"networkAttributes",void 0),(0,i.Cg)([(0,f.MZ)()],Y.prototype,"networkSources",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],Y.prototype,"state",void 0),Y=(0,i.Cg)([(0,v.$)("esri.rest.support.NetworkDataset")],Y);const K=Y;var H=r(69540);let X=class extends((0,H.O)(F.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){const{restrictionAttributeNames:r}=t;return null==r?null:r.map(e=>q.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map(e=>q.OC.toJSON(e)))}};(0,i.Cg)([(0,f.MZ)({type:[Object],json:{write:!0}})],X.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,i.Cg)([(0,W.e)(q.dd,{ignoreUnknown:!1})],X.prototype,"distanceAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],X.prototype,"id",void 0),(0,i.Cg)([(0,g.w)("id",["id","itemId"])],X.prototype,"readId",null),(0,i.Cg)([(0,W.e)(q.et,{ignoreUnknown:!1})],X.prototype,"impedanceAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],X.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[String],json:{write:!0}})],X.prototype,"restrictionAttributeNames",void 0),(0,i.Cg)([(0,g.w)("restrictionAttributeNames")],X.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,b.K)("restrictionAttributeNames")],X.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:{allowNull:!0}}})],X.prototype,"simplificationTolerance",void 0),(0,i.Cg)([(0,W.e)(q.hY)],X.prototype,"simplificationToleranceUnits",void 0),(0,i.Cg)([(0,W.e)(q.Mm,{ignoreUnknown:!1})],X.prototype,"timeAttributeName",void 0),(0,i.Cg)([(0,W.e)(q.ow)],X.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,W.e)(q.hE)],X.prototype,"uturnAtJunctions",void 0),X=(0,i.Cg)([(0,v.$)("esri.rest.support.TravelMode")],X);let Q=class extends F.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=>q.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>q.et.toJSON(e)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find(({id:e})=>e===t.defaultTravelMode)??t.supportedTravelModes?.find(({itemId:e})=>e===t.defaultTravelMode);return r?X.fromJSON(r):null}};function ee(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}async function te(e,t,r){if(!e)throw new l.A("network-service:missing-url","Url to Network service is missing");const i=(0,V.jV)({f:"json",token:t},r),{data:o}=await(0,$.A)(e,i),s=o.currentVersion>=10.4?async function(e,t,r){try{const i=(0,V.jV)({f:"json",token:t},r),o=(0,h.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,$.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new l.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,V.jV)({f:"json"},t),{data:i}=await(0,$.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=i,s=(0,h.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,$.A)(s,r),a=(0,c.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,V.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,V.jV)({f:"json",serviceName:u},t),d=(0,h.UC)(a)+"/GetTravelModes/execute",y=await(0,$.A)(d,p),m=[];let f=null;if(y?.data?.results?.length){const e=y.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}return{supportedTravelModes:m,defaultTravelMode:f}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Q.fromJSON(o)}(0,i.Cg)([(0,f.MZ)()],Q.prototype,"accumulateAttributeNames",void 0),(0,i.Cg)([(0,g.w)("accumulateAttributeNames")],Q.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,b.K)("accumulateAttributeNames")],Q.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"capabilities",null),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"currentVersion",void 0),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"defaultTravelMode",void 0),(0,i.Cg)([(0,g.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Q.prototype,"readDefaultTravelMode",null),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,W.e)(q.Z7)],Q.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"directionsSupportedLanguages",void 0),(0,i.Cg)([(0,W.e)(q.Mm,{ignoreUnknown:!1})],Q.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,f.MZ)()],Q.prototype,"hasZ",void 0),(0,i.Cg)([(0,W.e)(q.et,{ignoreUnknown:!1})],Q.prototype,"impedance",void 0),(0,i.Cg)([(0,f.MZ)({type:K})],Q.prototype,"networkDataset",void 0),(0,i.Cg)([(0,f.MZ)({type:[X]})],Q.prototype,"supportedTravelModes",void 0),Q=(0,i.Cg)([(0,v.$)("esri.rest.support.NetworkServiceDescription")],Q);var re=r(16649),ie=r(17136);function oe(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(i.test(o)){const i=o.slice(t.length);r[q.et.fromJSON(i)]=e[o]}return r}function se(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const o=q.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function ne(e){const t={};for(const r of Object.keys(e)){const i=r;t[q.et.fromJSON(i)]=e[r]}return t}function ae(e){const t={};for(const r of Object.keys(e)){const i=r;t[q.et.toJSON(i)]=e[r]}return t}function le(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function ue(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),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 pe=r(22671),ce=r(4576),de=r(66552),ye=r(37807);const me=new de.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let he=class extends ye.A{constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,f.MZ)({type:String,json:{read:me.read,write:me.write}})],he.prototype,"type",void 0),he=(0,i.Cg)([(0,v.$)("esri.rest.support.NAMessage")],he);const fe=he;var ge=r(82799),ve=r(86738);let be=class extends F.o{constructor(e){super(e)}};(0,i.Cg)([(0,f.MZ)({json:{read:{source:"string"}}})],be.prototype,"text",void 0),(0,i.Cg)([(0,W.e)(q.Ec,{name:"stringType"})],be.prototype,"type",void 0),be=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionsString")],be);const we=be;let Ce=class extends F.o{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return le(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return ve.A.fromJSON(t.point)}};(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Ce.prototype,"arriveTime",void 0),(0,i.Cg)([(0,f.MZ)()],Ce.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,g.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Ce.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,f.MZ)({type:ve.A})],Ce.prototype,"geometry",void 0),(0,i.Cg)([(0,g.w)("geometry",["point"])],Ce.prototype,"readGeometry",null),(0,i.Cg)([(0,f.MZ)({type:[we]})],Ce.prototype,"strings",void 0),Ce=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionsEvent")],Ce);const Te=Ce;let Se=class extends s.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}set attributes(e){super.attributes=e}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,o=0;const s=[];let n,a,l,u,p,c,d,y,m=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,y=parseInt(p[f],32),f++)}else c=parseInt(p[m],32),m++;for(;m<p.length&&"|"!==p[m];){n=parseInt(p[m],32)+t,m++,t=n,a=parseInt(p[m],32)+r,m++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?ge.A.fromJSON(r):null}};(0,i.Cg)([(0,f.MZ)({type:[Te]})],Se.prototype,"events",void 0),(0,i.Cg)([(0,f.MZ)({type:ge.A})],Se.prototype,"geometry",void 0),(0,i.Cg)([(0,g.w)("geometry",["compressedGeometry"])],Se.prototype,"readGeometry",null),(0,i.Cg)([(0,f.MZ)({type:[we]})],Se.prototype,"strings",void 0),Se=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionsFeature")],Se);const Me=Se;let Ae=class extends pe.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[];const r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&M.A.fromJSON(r);return e.map(e=>{const t=Me.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const 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 ge.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)});const{hasM:o,hasZ:s}=e[0];return new ge.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(ce.Ru)}};(0,i.Cg)([(0,f.MZ)({type:C.A,json:{read:{source:"summary.envelope"}}})],Ae.prototype,"extent",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0})],Ae.prototype,"features",void 0),(0,i.Cg)([(0,g.w)("features")],Ae.prototype,"readFeatures",null),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"geometryType",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ae.prototype,"mergedGeometry",null),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"routeId",void 0),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)({value:null,readOnly:!0})],Ae.prototype,"strings",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],Ae.prototype,"totalDriveTime",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalLength"}}})],Ae.prototype,"totalLength",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalTime"}}})],Ae.prototype,"totalTime",void 0),Ae=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionsFeatureSet")],Ae);const Oe=Ae;let Ne=class extends F.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,f.MZ)({type:pe.A,json:{write:!0}})],Ne.prototype,"directionLines",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ne.prototype,"directionPoints",void 0),(0,i.Cg)([(0,f.MZ)({type:Oe,json:{write:!0}})],Ne.prototype,"directions",void 0),(0,i.Cg)([(0,f.MZ)({type:s.A,json:{write:!0}})],Ne.prototype,"route",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ne.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)({type:[s.A],json:{write:!0}})],Ne.prototype,"stops",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ne.prototype,"traversedEdges",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ne.prototype,"traversedJunctions",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ne.prototype,"traversedTurns",void 0),Ne=(0,i.Cg)([(0,v.$)("esri.rest.support.RouteResult")],Ne);const Ie=Ne;function Ze(e){return e?pe.A.fromJSON(e).features.filter(ce.Ru):[]}let De=class extends F.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 Ze(t.barriers)}readPolylineBarriers(e){return Ze(e)}readPolygonBarriers(e){return Ze(e)}};function je(e){return e instanceof pe.A}async function Fe(e,t,r){const i=[],o=[],s={},n={},a=(0,V.Dl)(e),{path:l}=a;je(t.stops)&&ee(t.stops.features,o,"stops.features",s),je(t.pointBarriers)&&ee(t.pointBarriers.features,o,"pointBarriers.features",s),je(t.polylineBarriers)&&ee(t.polylineBarriers.features,o,"polylineBarriers.features",s),je(t.polygonBarriers)&&ee(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,ie.el)(o);for(const e in s){const t=s[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await te(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.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(const e in n)n[e].forEach((r,i)=>{(0,re.Jt)(t,e)[i].geometry=r});const c={...r,query:{...a.query,...ue(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,$.A)(d,c);return function(e){const{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=>{const t=f.find(t=>t.routeName===e);if(null!=t)return t;const r={routeId:f.length+1,routeName:e};return f.push(r),r},h=e=>{const t=f.find(t=>t.routeId===e);if(null!=t)return t;const r={routeId:e,routeName:null};return f.push(r),r},f=[];u?.features.forEach((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;const r=e.attributes.Name,i=t+1;f.push({routeId:i,routeName:r,route:e})}),s?.forEach(e=>{const{routeName:t}=e;m(t).directions=e});const g=p?.features.every(e=>null==e.attributes.RouteName)&&f.length>0?f[0].routeName:null;return p?.features.forEach(e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);const t=g??e.attributes.RouteName,r=m(t);r.stops??=[],r.stops.push(e)}),i?.features.forEach(e=>{const 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=>{const 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=>{const 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=>{const 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=>{const t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)}),De.fromJSON({barriers:t,checksum:r,messages:n,polygonBarriers:a,polylineBarriers:l,routeResults:f})}(y)}var _e;(0,i.Cg)([(0,f.MZ)({type:String})],De.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({type:[fe]})],De.prototype,"messages",void 0),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],De.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,g.w)("pointBarriers",["barriers"])],De.prototype,"readPointBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],De.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,g.w)("polylineBarriers")],De.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],De.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,g.w)("polygonBarriers")],De.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[Ie]})],De.prototype,"routeResults",void 0),De=(0,i.Cg)([(0,v.$)("esri.rest.support.RouteSolveResult")],De);let xe=class extends((0,H.O)(F.o)){static{_e=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"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new _e({directionLineType:q.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(){const e={ObjectID:this.objectId,DirectionLineType:this.directionLineType?q.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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Be;(0,i.Cg)([(0,f.MZ)({type:q.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:q.gD.read}}})],xe.prototype,"directionLineType",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],xe.prototype,"directionPointId",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Meters"}}})],xe.prototype,"distance",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Minutes"}}})],xe.prototype,"duration",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.FromLevel"}}})],xe.prototype,"fromLevel",void 0),(0,i.Cg)([(0,f.MZ)({type:ge.A})],xe.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],xe.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],xe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],xe.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ToLevel"}}})],xe.prototype,"toLevel",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"type",void 0),xe=_e=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionLine")],xe);let Ee=class extends((0,H.O)(F.o)){static{Be=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?new Date(t.attributes.ArrivalTime):null}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}]}static fromGraphic(e){return new Be({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:q._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(){const e={ObjectID:this.objectId,DirectionPointType:this.directionPointType?q._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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Pe;(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.AlternateName"}}})],Ee.prototype,"alternateName",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],Ee.prototype,"arrivalTime",void 0),(0,i.Cg)([(0,g.w)("arrivalTime",["attributes.ArrivalTime"])],Ee.prototype,"readArrivalTime",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Ee.prototype,"arrivalTimeOffset",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Azimuth"}}})],Ee.prototype,"azimuth",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.BranchName"}}})],Ee.prototype,"branchName",void 0),(0,i.Cg)([(0,f.MZ)({type:q._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:q._6.read}}})],Ee.prototype,"directionPointType",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DisplayText"}}})],Ee.prototype,"displayText",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ExitName"}}})],Ee.prototype,"exitName",void 0),(0,i.Cg)([(0,f.MZ)({type:ve.A})],Ee.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],Ee.prototype,"intersectingName",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Level"}}})],Ee.prototype,"level",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],Ee.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Ee.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],Ee.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Sequence"}}})],Ee.prototype,"sequence",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],Ee.prototype,"shortVoiceInstruction",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.StopID"}}})],Ee.prototype,"stopId",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],Ee.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.TowardName"}}})],Ee.prototype,"towardName",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],Ee.prototype,"voiceInstruction",void 0),Ee=Be=(0,i.Cg)([(0,v.$)("esri.rest.support.DirectionPoint")],Ee);let Le=class extends((0,H.O)(F.o)){static{Pe=this}constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return oe(t.attributes,"Attr_")}writeCosts(e,t){se(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new Pe({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ne(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?q.JJ.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?q.fe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?q.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ae(this.costs)):null,CurbApproach:this.curbApproach?q.JJ.toJSON(this.curbApproach):null,FullEdge:this.fullEdge?q.fe.toJSON(this.fullEdge):null,Name:this.name,Status:this.status?q.$r.toJSON(this.status):null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)()],Le.prototype,"addedCost",void 0),(0,i.Cg)([(0,f.MZ)({type:q.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:q.iM.read},write:{writer:q.iM.write}}})],Le.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],Le.prototype,"costs",void 0),(0,i.Cg)([(0,g.w)("costs",["attributes"])],Le.prototype,"readCosts",null),(0,i.Cg)([(0,b.K)("costs")],Le.prototype,"writeCosts",null),(0,i.Cg)([(0,f.MZ)({type:q.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:q.JJ.read}}})],Le.prototype,"curbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:q.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:q.fe.read},write:{writer:q.fe.write}}})],Le.prototype,"fullEdge",void 0),(0,i.Cg)([(0,f.MZ)({type:ve.A,json:{write:!0}})],Le.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],Le.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Le.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],Le.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({type:q.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:q.mt.read}}})],Le.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],Le.prototype,"sourceId",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],Le.prototype,"sourceOid",void 0),(0,i.Cg)([(0,f.MZ)({type:q.$r.apiValues,json:{read:{source:"attributes.Status",reader:q.$r.read}}})],Le.prototype,"status",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],Le.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"type",void 0),Le=Pe=(0,i.Cg)([(0,v.$)("esri.rest.support.PointBarrier")],Le);var Re,Je=r(39829);let Ue=class extends((0,H.O)(F.o)){static{Re=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 oe(t.attributes,"Attr_")}writeCosts(e,t){se(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Re({barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ne(JSON.parse(e.attributes.Costs)):null,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(){const e={ObjectID:this.objectId,BarrierType:this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ae(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var ke;(0,i.Cg)([(0,f.MZ)({type:q.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:q.iM.read},write:{writer:q.iM.write}}})],Ue.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],Ue.prototype,"costs",void 0),(0,i.Cg)([(0,g.w)("costs",["attributes"])],Ue.prototype,"readCosts",null),(0,i.Cg)([(0,b.K)("costs")],Ue.prototype,"writeCosts",null),(0,i.Cg)([(0,f.MZ)({type:Je.A,json:{write:!0}})],Ue.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],Ue.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Ue.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],Ue.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)()],Ue.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],Ue.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ue.prototype,"type",void 0),Ue=Re=(0,i.Cg)([(0,v.$)("esri.rest.support.PolygonBarrier")],Ue);let $e=class extends((0,H.O)(F.o)){static{ke=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 oe(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new ke({barrierType:null!=e.attributes.BarrierType?q.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?ne(JSON.parse(e.attributes.Costs)):null,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(){const e={ObjectID:this.objectId,BarrierType:this.barrierType?q.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ae(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)({type:q.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:q.iM.read}}})],$e.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],$e.prototype,"costs",void 0),(0,i.Cg)([(0,g.w)("costs",["attributes"])],$e.prototype,"readCosts",null),(0,i.Cg)([(0,f.MZ)({type:ge.A,json:{write:!0}})],$e.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],$e.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],$e.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],$e.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)()],$e.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],$e.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],$e.prototype,"type",void 0),$e=ke=(0,i.Cg)([(0,v.$)("esri.rest.support.PolylineBarrier")],$e);let Ve=class extends F.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=>q.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>q.et.toJSON(e)))}};var We;(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ve.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,g.w)("accumulateAttributes")],Ve.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,b.K)("accumulateAttributes")],Ve.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ve.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ve.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ve.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ve.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ve.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ve.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:X,json:{write:!0}})],Ve.prototype,"travelMode",void 0),Ve=(0,i.Cg)([(0,v.$)("esri.rest.support.RouteSettings")],Ve);let qe=class extends((0,H.O)(F.o)){static{We=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?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return le(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return le(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return oe(t.attributes,"Total_")}readTotalViolations(e,t){return oe(t.attributes,"TotalViolation_")}readTotalWait(e,t){return oe(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}]}static fromGraphic(e){return new We({analysisSettings:null!=e.attributes.AnalysisSettings?Ve.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?ne(JSON.parse(e.attributes.TotalCosts)):null,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(){const 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(ae(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)()],qe.prototype,"analysisSettings",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],qe.prototype,"endTime",void 0),(0,i.Cg)([(0,g.w)("endTime",["attributes.EndTimeUTC"])],qe.prototype,"readEndTime",null),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"endTimeOffset",void 0),(0,i.Cg)([(0,g.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],qe.prototype,"readEndTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],qe.prototype,"firstStopId",void 0),(0,i.Cg)([(0,f.MZ)({type:ge.A})],qe.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.LastStopID"}}})],qe.prototype,"lastStopId",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"messages",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],qe.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],qe.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],qe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],qe.prototype,"startTime",void 0),(0,i.Cg)([(0,g.w)("startTime",["attributes.StartTimeUTC"])],qe.prototype,"readStartTime",null),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"startTimeOffset",void 0),(0,i.Cg)([(0,g.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],qe.prototype,"readStartTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.StopCount"}}})],qe.prototype,"stopCount",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],qe.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalCosts",void 0),(0,i.Cg)([(0,g.w)("totalCosts",["attributes"])],qe.prototype,"readTotalCosts",null),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalDistance",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalDuration",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalLateDuration",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalViolations",void 0),(0,i.Cg)([(0,g.w)("totalViolations",["attributes"])],qe.prototype,"readTotalViolations",null),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalWait",void 0),(0,i.Cg)([(0,g.w)("totalWait",["attributes"])],qe.prototype,"readTotalWait",null),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"totalWaitDuration",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],qe.prototype,"version",void 0),qe=We=(0,i.Cg)([(0,v.$)("esri.rest.support.RouteInfo")],qe);var Ge=r(56507),ze=r(24097),Ye=r(65864),Ke=r(50498);let He=class extends((0,H.O)(F.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}};var Xe;(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],He.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,f.MZ)({types:Ke.yR,json:{read:Ye.rS,write:!0}})],He.prototype,"geometry",void 0),(0,i.Cg)([(0,W.e)(q.Vj)],He.prototype,"geometryType",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{name:"layerName",write:!0}})],He.prototype,"name",void 0),(0,i.Cg)([(0,W.e)(q.vS,{name:"spatialRel"})],He.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],He.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],He.prototype,"where",void 0),He=(0,i.Cg)([(0,v.$)("esri.rest.support.DataLayer")],He);let Qe=class extends pe.A{static{Xe=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Xe({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Qe.prototype,"doNotLocateOnRestrictedElements",void 0),Qe=Xe=(0,i.Cg)([(0,v.$)("esri.rest.support.NetworkFeatureSet")],Qe);let et=class extends((0,H.O)(F.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};var tt;(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],et.prototype,"url",void 0),et=(0,i.Cg)([(0,v.$)("esri.rest.support.NetworkUrl")],et);let rt=class extends((0,H.O)(F.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.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.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,Ge.PZ)(tt,e)}readAccumulateAttributes(e){return null==e?null:e.map(e=>q.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>q.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=>q.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>q.OC.toJSON(e)))}readStartTime(e,t){const{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)?He.fromJSON(e):function(e){return e&&"url"in e}(e)?et.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Qe.fromJSON(e):function(e){return e&&"features"in e}(e)?pe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){it(e,t,r)}};function it(e,t,r){null!=e&&(t[r]=a.A.isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON())}var ot;(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],rt.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,g.w)("accumulateAttributes")],rt.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,b.K)("accumulateAttributes")],rt.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)(ze.K)],rt.prototype,"apiKey",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],rt.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],rt.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,W.e)(q.Z7)],rt.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,W.e)(q.aJ)],rt.prototype,"directionsOutputType",void 0),(0,i.Cg)([(0,W.e)(q.$n)],rt.prototype,"directionsStyleName",void 0),(0,i.Cg)([(0,W.e)(q.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],rt.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecision",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionM",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],rt.prototype,"geometryPrecisionZ",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"ignoreInvalidLocations",void 0),(0,i.Cg)([(0,W.e)(q.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],rt.prototype,"impedanceAttribute",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],rt.prototype,"outputGeometryPrecision",void 0),(0,i.Cg)([(0,W.e)(q.hY)],rt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i.Cg)([(0,W.e)(q.Sr)],rt.prototype,"outputLines",void 0),(0,i.Cg)([(0,f.MZ)({type:M.A,json:{name:"outSR",write:!0}})],rt.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"overrides",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"barriers",write:!0}})],rt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,b.K)("pointBarriers")],rt.prototype,"writePointBarriers",null),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,b.K)("polygonBarriers")],rt.prototype,"writePolygonBarrier",null),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,b.K)("polylineBarriers")],rt.prototype,"writePolylineBarrier",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"preserveObjectID",void 0),(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],rt.prototype,"restrictionAttributes",void 0),(0,i.Cg)([(0,g.w)("restrictionAttributes")],rt.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,b.K)("restrictionAttributes")],rt.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,W.e)(q.hE)],rt.prototype,"restrictUTurns",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnDirections",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolygonBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPolylineBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnRoutes",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnStops",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedEdges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedJunctions",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnTraversedTurns",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"returnZ",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"startTime",void 0),(0,i.Cg)([(0,g.w)("startTime")],rt.prototype,"readStartTime",null),(0,i.Cg)([(0,b.K)("startTime")],rt.prototype,"writeStartTime",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],rt.prototype,"stops",void 0),(0,i.Cg)([(0,g.w)("stops")],rt.prototype,"readStops",null),(0,i.Cg)([(0,b.K)("stops")],rt.prototype,"writeStops",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:X,json:{write:!0}})],rt.prototype,"travelMode",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],rt.prototype,"useTimeWindows",void 0),rt=tt=(0,i.Cg)([(0,v.$)("esri.rest.support.RouteParameters")],rt);let st=class extends((0,H.O)(F.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.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=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 le(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return oe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return le(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return oe(t.attributes,"Attr_")}writeServiceCosts(e,t){se(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return oe(t.attributes,"Violation_")}readWait(e,t){return oe(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new ot({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?q.JJ.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?ne(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?q.JJ.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?q.JJ.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?q.EM.fromJSON(e.attributes.LocationType):null,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?ne(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?q.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:this.arriveCurbApproach?q.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime?.getTime()??null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts?JSON.stringify(ae(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach?q.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach?q.JJ.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime?.getTime()??null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType?q.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts?JSON.stringify(ae(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status?q.$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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};function nt(e){if(!e.length)return;const t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e);let i=Math.max(...r,0);for(const e of t)null==e.objectId&&(e.objectId=++i)}function at(e,t){return!!e.length&&e.length===t.length&<(e)&<(t)}function lt(e){return e.every(({objectId:e})=>null!=e)}function ut(e){return e.length?e:null}function pt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:pt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:pt("esriGeometryPolyline")}}}function ct(e){return"layers"in e}async function dt(e){const t=M.A.WGS84;return await(0,S.initializeProjection)(e.spatialReference,t),(0,S.project)(e,t)}function yt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function mt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,m.oU)(e,t,"meters")}(0,i.Cg)([(0,f.MZ)({type:q.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:q.JJ.read}}})],st.prototype,"arriveCurbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],st.prototype,"arriveTime",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,g.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],st.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],st.prototype,"bearing",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],st.prototype,"bearingTol",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"cumulativeCosts",void 0),(0,i.Cg)([(0,g.w)("cumulativeCosts",["attributes"])],st.prototype,"readCumulativeCosts",null),(0,i.Cg)([(0,f.MZ)()],st.prototype,"cumulativeDistance",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"cumulativeDuration",void 0),(0,i.Cg)([(0,f.MZ)({type:q.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:q.JJ.read},write:{writer:q.JJ.write}}})],st.prototype,"curbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:q.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:q.JJ.read}}})],st.prototype,"departCurbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],st.prototype,"departTime",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"departTimeOffset",void 0),(0,i.Cg)([(0,g.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],st.prototype,"readDepartTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],st.prototype,"distanceToNetworkInMeters",void 0),(0,i.Cg)([(0,f.MZ)({type:ve.A,json:{write:!0}})],st.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"lateDuration",void 0),(0,i.Cg)([(0,f.MZ)({type:q.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:q.EM.read},write:{writer:q.EM.write}}})],st.prototype,"locationType",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],st.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],st.prototype,"navLatency",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],st.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A})],st.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.PosAlong"}}})],st.prototype,"posAlong",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.RouteName"}})],st.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"serviceCosts",void 0),(0,i.Cg)([(0,g.w)("serviceCosts",["attributes"])],st.prototype,"readServiceCosts",null),(0,i.Cg)([(0,b.K)("serviceCosts")],st.prototype,"writeServiceCosts",null),(0,i.Cg)([(0,f.MZ)()],st.prototype,"serviceDistance",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"serviceDuration",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Sequence"}})],st.prototype,"sequence",void 0),(0,i.Cg)([(0,f.MZ)({type:q.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:q.mt.read}}})],st.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapX"}}})],st.prototype,"snapX",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapY"}}})],st.prototype,"snapY",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapZ"}}})],st.prototype,"snapZ",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],st.prototype,"sourceId",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],st.prototype,"sourceOid",void 0),(0,i.Cg)([(0,f.MZ)({type:q.$r.apiValues,json:{read:{source:"attributes.Status",reader:q.$r.read}}})],st.prototype,"status",void 0),(0,i.Cg)([(0,f.MZ)({types:x.Es})],st.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],st.prototype,"timeWindowEnd",void 0),(0,i.Cg)([(0,b.K)("timeWindowEnd")],st.prototype,"writeTimeWindowEnd",null),(0,i.Cg)([(0,f.MZ)()],st.prototype,"timeWindowEndOffset",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],st.prototype,"timeWindowStart",void 0),(0,i.Cg)([(0,b.K)("timeWindowStart")],st.prototype,"writeTimeWindowStart",null),(0,i.Cg)([(0,f.MZ)()],st.prototype,"timeWindowStartOffset",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],st.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"violations",void 0),(0,i.Cg)([(0,g.w)("violations",["attributes"])],st.prototype,"readViolations",null),(0,i.Cg)([(0,f.MZ)()],st.prototype,"waitDuration",void 0),(0,i.Cg)([(0,f.MZ)()],st.prototype,"wait",void 0),(0,i.Cg)([(0,g.w)("wait",["attributes"])],st.prototype,"readWait",null),st=ot=(0,i.Cg)([(0,v.$)("esri.rest.support.Stop")],st);const ht=a.A.ofType(xe),ft=a.A.ofType(Ee),gt=a.A.ofType(Le),vt=a.A.ofType(Ue),bt=a.A.ofType($e),wt=a.A.ofType(st);let Ct=class extends((0,N.dM)((0,D.j)((0,I.q)((0,Z.A)((0,p.P)(O.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new L,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new gt,this.polygonBarriers=new vt,this.polylineBarriers=new bt,this.routeInfo=null,this.spatialReference=M.A.WGS84,this.stops=new wt,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,y.on)(()=>this.stops,"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){const 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,c.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>xe.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>Ee.fromGraphic(e))}get fullExtent(){const e=new C.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:M.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map(e=>{const t=e.geometry;return[t.x,t.y]});return new T.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=ct(t)?t.layers:t.featureCollection?.layers,i=r?.find(e=>null!=e.layerDefinition.maxScale);return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=ct(t)?t.layers:t.featureCollection?.layers,i=r?.find(e=>null!=e.layerDefinition.minScale);return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>Le.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>Ue.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>$e.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>qe.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){const r=ct(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return M.A.WGS84;const{layerDefinition:i,featureSet:o}=r[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??A.KK;return M.A.fromJSON(n)}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",(0,j.Jf)(e,u.A.getLogger(this))):this._set("url",o.A.routeServiceUrl)}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();const{fullExtent:e,portalItem:t}=this;if(!t)throw new l.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new l.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new l.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new l.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new l.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:r,url:i?(0,h.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await dt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new l.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=J.default.from(e).clone();r.extent??=await dt(this.fullExtent),r.id=null,r.portal??=R.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",U.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const s=t?.folder,n=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:n}),this.portalItem=r,(0,w.v)(o),o.portalItem=r,r}async solve(e,t){nt(this.stops),nt(this.pointBarriers),nt(this.polylineBarriers),nt(this.polygonBarriers);const r=e?.stops??this.stops,i=e?.pointBarriers??ut(this.pointBarriers),o=e?.polylineBarriers??ut(this.polylineBarriers),s=e?.polygonBarriers??ut(this.polygonBarriers);if(null==r)throw new l.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||a.A.isCollection(r)&&r.length<2)throw new l.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(a.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,{checksum:u,url:p}=this,c=await this._getServiceDescription(p,n,t),y=e?.travelMode??c.defaultTravelMode,m=e?.accumulateAttributes??[];y&&(m.push(y.distanceAttributeName),y.timeAttributeName&&m.push(y.timeAttributeName));const h={accumulateAttributes:m,checksum:u,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??{});let g;f.set(h);try{g=await Fe(p,f,t)}catch(e){throw(0,d.zf)(e)?e:new l.A("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),this._populatePortalFields(v,c,f),v}update(e){const{checksum:t,directionLines:r,directionPoints:i,pointBarriers:o,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;at(l,this.stops)?function(e,t){for(const r of e){const 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.posAlong=r.posAlong,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}),at(o,this.pointBarriers)?function(e,t){for(const r of e){const 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}),at(n,this.polylineBarriers)?function(e,t){for(const r of e){const 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}),at(s,this.polygonBarriers)?function(e,t){for(const r of e){const 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),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const o=ct(e)?e.layers:e.featureCollection?.layers,l=o?.find(e=>e.layerDefinition.name===t);if(null==l)return new a.A;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,d=u.drawingInfo.renderer,{features:y}=c,m=c.spatialReference??u.spatialReference??u.extent.spatialReference??A.KK,h=d&&(0,k.L)(d),f=M.A.fromJSON(m),g=y.map(e=>{const i=s.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=f);const o=r(i);return o.symbol??=h?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=p&&n.A.fromJSON(p),o});return i&&g.some(({symbol:e})=>!e)&&i(g),new a.A(g)}_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;const i=await te(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||!e.length||!this.defaultSymbols.stops||e.every(({symbol:e})=>!!e))return;const{first:t,last:r,middle:i,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops,a=e.map(({sequence:e})=>e).filter(e=>null!=e),l=e.length===a.length;if(!this.routeInfo&&!l||1===e.length)return void e.forEach((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=r;break;default:o.symbol=i}});const u=Math.min(...a),p=Math.max(...a);for(const a of e)a.sequence!==u?a.sequence!==p?this.routeInfo&&"ok"!==a.status&&"not-located-on-closest"!==a.status?a.symbol=o:"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=s:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,i=r[0].stops?.map(e=>st.fromJSON(e.toJSON()));this._setStopSymbol(i);const o=new wt(i),s=new vt(e.polygonBarriers?.map(e=>{const t=Ue.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t})),n=new bt(e.polylineBarriers?.map(e=>{const t=$e.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t})),a=new gt(e.pointBarriers?.map(e=>{const t=Le.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t})),l=r[0].route?.toJSON(),u=qe.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new ft(r[0].directionPoints?.features.map(e=>{const t=Ee.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t}));return{checksum:t,directionLines:new ht(r[0].directionLines?.features.map(e=>{const t=xe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t})),directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",xe.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Ee.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>function(e){const{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:null!=t?t.toJSON():pt(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",Le.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",Ue.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",$e.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new a.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",qe.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",st.fields,"Stops","Stops");if(null==e)return null;const{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){const i=t.networkDataset?.networkAttributes,o=i?.filter(({usageType:e})=>"cost"===e)??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void u.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.");const{timeAttributeName:n,distanceAttributeName:a}=s,p=o.find(({name:e})=>e===n),c=o.find(({name:e})=>e===a),d=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,y=p?.units,m=c?.units;if(!y||!m)throw new l.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const h=r.directionsLanguage??t.directionsLanguage,f=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(o.filter(({name:e})=>e===n||e===a||e===d||null!=e&&f.includes(e)).map(({name:e})=>e)),v=e=>{for(const t in e)g.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[d]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,v(t.costs));const{routeInfo:b}=e,{findBestSequence:w,preserveFirstStop:C,preserveLastStop:T,startTimeIsUTC:S,timeWindowsAreUTC:M}=r;b.analysisSettings=new Ve({accumulateAttributes:f,directionsLanguage:h,findBestSequence:w,preserveFirstStop:C,preserveLastStop:T,startTimeIsUTC:S,timeWindowsAreUTC:M,travelMode:s}),b.totalDuration=yt(b.totalCosts?.[n]??0,y),b.totalDistance=mt(b.totalCosts?.[a]??0,m),b.totalLateDuration=yt(b.totalViolations?.[n]??0,y),b.totalWaitDuration=yt(b.totalWait?.[n]??0,y),null!=b.totalCosts&&v(b.totalCosts),null!=b.totalViolations&&v(b.totalViolations),null!=b.totalWait&&v(b.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=yt(t.serviceCosts[n]??0,y),t.serviceDistance=mt(t.serviceCosts[a]??0,m),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=yt(t.cumulativeCosts[n]??0,y),t.cumulativeDistance=mt(t.cumulativeCosts[a]??0,m),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=yt(t.violations[n]??0,y),v(t.violations)),null!=t.wait&&(t.waitDuration=yt(t.wait[n]??0,y),v(t.wait))}};(0,i.Cg)([(0,f.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}}}}}}})],Ct.prototype,"_featureCollection",void 0),(0,i.Cg)([(0,b.K)(["web-map","portal-item"],"_featureCollection")],Ct.prototype,"writeFeatureCollectionWebmap",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Ct.prototype,"_type",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],Ct.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:L})],Ct.prototype,"defaultSymbols",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ct.prototype,"directionLines",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Ct.prototype,"readDirectionLines",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ct.prototype,"directionPoints",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Ct.prototype,"readDirectionPoints",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Ct.prototype,"featureCollectionType",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ct.prototype,"fullExtent",null),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Ct.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:["show","hide"]})],Ct.prototype,"listMode",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Ct.prototype,"maxScale",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Ct.prototype,"readMaxScale",null),(0,i.Cg)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Ct.prototype,"minScale",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Ct.prototype,"readMinScale",null),(0,i.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Ct.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Le)})],Ct.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Ct.prototype,"readPointBarriers",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Ue)})],Ct.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Ct.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType($e)})],Ct.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Ct.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ct.prototype,"routeInfo",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Ct.prototype,"readRouteInfo",null),(0,i.Cg)([(0,f.MZ)({type:M.A})],Ct.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Ct.prototype,"readSpatialReference",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(st)})],Ct.prototype,"stops",void 0),(0,i.Cg)([(0,g.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Ct.prototype,"readStops",null),(0,i.Cg)([(0,f.MZ)()],Ct.prototype,"title",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ct.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],Ct.prototype,"url",null),Ct=(0,i.Cg)([(0,v.$)("esri.layers.RouteLayer")],Ct);const Tt=Ct},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>n});var i=r(67076),o=r(90360),s=r(41214);function n(e,t){return l(e,null,t)}const a=(0,o.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,DC:()=>c,Ej:()=>y,Ie:()=>g,Jt:()=>v,Ne:()=>m,RF:()=>p,aI:()=>C,fA:()=>n,gE:()=>l,hZ:()=>f,iT:()=>d,is:()=>w,qv:()=>T,vI:()=>h,vY:()=>a,v_:()=>S,vt:()=>s,w1:()=>u});var i=r(5443),o=(r(19419),r(4197));function s(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,o,n,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=o,a[5]=n,a}function a(e,t=s()){return function(e,t,r,i=s()){return f(i,T),function(e,t,r=0,i=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)o=Math.min(o,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),n=Math.min(n,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,o.jh)(24)){const[r,i,s,n,a,l]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=l,t[12]=n,t[13]=i,t[14]=s,t[15]=n,t[16]=i,t[17]=l,t[18]=n,t[19]=a,t[20]=s,t[21]=n,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function y(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function m(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function h(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?f(e,T):s(T)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function C(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];s()},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){const n=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const 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});const 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");const 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});const 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);const 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){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},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;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const 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){const 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()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function s(e){return o(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').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 n(e){return o(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").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)))}const a={literal:e=>'"'+s(e.text)+'"',class(e){const 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){const 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){const t=p(e);return t&&0!==t.length?t:null}const 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){const r={},i=(t=void 0!==t?t:{}).grammarSource,o={start:Ce};let s=Ce;const n="none",a=")",u=",",p="(",c="%",d="px",y="cm",m="mm",h="in",f="pt",g="pc",v="deg",b="rad",w="grad",C="turn",T="#",S=".",M="e",A=/^[ \t\n\r]/,O=/^[a-z\-]/,N=/^[0-9a-fA-F]/,I=/^[+\-]/,Z=/^[0-9]/,D=ge("none"),j=he("none",!1),F=he(")",!1),_=he(",",!1),x=fe([" ","\t","\n","\r"],!1,!1,!1),B=ge("function"),E=he("(",!1),P=ge("identifier"),L=fe([["a","z"],"-"],!1,!1,!1),R=ge("percentage"),J=he("%",!1),U=ge("length"),k=he("px",!1),$=he("cm",!1),V=he("mm",!1),W=he("in",!1),q=he("pt",!1),G=he("pc",!1),z=ge("angle"),Y=he("deg",!1),K=he("rad",!1),H=he("grad",!1),X=he("turn",!1),Q=ge("number"),ee=ge("color"),te=he("#",!1),re=fe([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ie=fe(["+","-"],!1,!1,!1),oe=fe([["0","9"]],!1,!1,!1),se=he(".",!1),ne=he("e",!1);let ae=0|t.peg$currPos,le=ae;const ue=[{line:1,column:1}];let pe,ce=ae,de=t.peg$maxFailExpected||[],ye=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');s=o[t.startRule]}function me(){return e.substring(le,ae)}function he(e,t){return{type:"literal",text:e,ignoreCase:t}}function fe(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function ge(e){return{type:"other",description:e}}function ve(t){let r,i=ue[t];if(i)return i;if(t>=ue.length)r=ue.length-1;else for(r=t;!ue[--r];);for(i=ue[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return ue[t]=i,i}function be(e,t,r){const o=ve(e),s=ve(t);return{source:i,start:{offset:e,line:o.line,column:o.column},end:{offset:t,line:s.line,column:s.column}}}function we(e){ae<ce||(ae>ce&&(ce=ae,de=[]),de.push(e))}function Ce(){let e;return e=Te(),e===r&&(e=function(){let e,t;if(e=[],t=Se(),t!==r)for(;t!==r;)e.push(t),t=Se();else e=r;return e}()),e}function Te(){let t,i;return ye++,t=ae,Ae(),e.substr(ae,4)===n?(i=n,ae+=4):(i=r,0===ye&&we(j)),i!==r?(Ae(),le=t,t=[]):(ae=t,t=r),ye--,t===r&&0===ye&&we(D),t}function Se(){let t,i,o,s;return t=ae,Ae(),i=function(){let t,i,o;return ye++,t=ae,i=Oe(),i!==r?(40===e.charCodeAt(ae)?(o=p,ae++):(o=r,0===ye&&we(E)),o!==r?(le=t,t=i):(ae=t,t=r)):(ae=t,t=r),ye--,t===r&&(i=r,0===ye&&we(B)),t}(),i!==r?(Ae(),o=function(){let t,i,o,s,n,a,l,p;if(t=ae,i=Me(),i!==r){for(o=[],s=ae,n=Ae(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===ye&&we(_)),a===r&&(a=null),l=Ae(),p=Me(),p!==r?(n=[n,a,l,p],s=n):(ae=s,s=r);s!==r;)o.push(s),s=ae,n=Ae(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===ye&&we(_)),a===r&&(a=null),l=Ae(),p=Me(),p!==r?(n=[n,a,l,p],s=n):(ae=s,s=r);le=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]}(i,o)}else ae=t,t=r;return t}(),o===r&&(o=null),Ae(),41===e.charCodeAt(ae)?(s=a,ae++):(s=r,0===ye&&we(F)),s!==r?(Ae(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(i,o)):(ae=t,t=r)):(ae=t,t=r),t}function Me(){let e,t;return e=ae,t=Ne(),t===r&&(t=Ie(),t===r&&(t=Ze(),t===r&&(t=function(){let e,t;return ye++,e=ae,Ae(),t=je(),t!==r?(le=e,e=function(e){return{value:e,unit:null}}(t)):(ae=e,e=r),ye--,e===r&&0===ye&&we(Q),e}()))),t!==r&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===r&&(e=ae,t=De(),t!==r&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Ae(){let t,i;for(ye++,t=[],i=e.charAt(ae),A.test(i)?ae++:(i=r,0===ye&&we(x));i!==r;)t.push(i),i=e.charAt(ae),A.test(i)?ae++:(i=r,0===ye&&we(x));return ye--,t}function Oe(){let t,i,o;if(ye++,t=ae,i=[],o=e.charAt(ae),O.test(o)?ae++:(o=r,0===ye&&we(L)),o!==r)for(;o!==r;)i.push(o),o=e.charAt(ae),O.test(o)?ae++:(o=r,0===ye&&we(L));else i=r;return i!==r&&(le=t,i=me()),t=i,ye--,t===r&&(i=r,0===ye&&we(P)),t}function Ne(){let t,i,o;return ye++,t=ae,Ae(),i=je(),i!==r?(37===e.charCodeAt(ae)?(o=c,ae++):(o=r,0===ye&&we(J)),o!==r?(le=t,t=function(e){return{value:e,unit:"%"}}(i)):(ae=t,t=r)):(ae=t,t=r),ye--,t===r&&0===ye&&we(R),t}function Ie(){let t,i,o;return ye++,t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===d?(o=d,ae+=2):(o=r,0===ye&&we(k)),o!==r?(le=t,t=function(e){return{value:e,unit:"px"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===y?(o=y,ae+=2):(o=r,0===ye&&we($)),o!==r?(le=t,t=function(e){return{value:e,unit:"cm"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===m?(o=m,ae+=2):(o=r,0===ye&&we(V)),o!==r?(le=t,t=function(e){return{value:e,unit:"mm"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===h?(o=h,ae+=2):(o=r,0===ye&&we(W)),o!==r?(le=t,t=function(e){return{value:e,unit:"in"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===f?(o=f,ae+=2):(o=r,0===ye&&we(q)),o!==r?(le=t,t=function(e){return{value:e,unit:"pt"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=je(),i!==r?(e.substr(ae,2)===g?(o=g,ae+=2):(o=r,0===ye&&we(G)),o!==r?(le=t,t=function(e){return{value:e,unit:"pc"}}(i)):(ae=t,t=r)):(ae=t,t=r)))))),ye--,t===r&&0===ye&&we(U),t}function Ze(){let t,i,o;return ye++,t=ae,i=je(),i!==r?(e.substr(ae,3)===v?(o=v,ae+=3):(o=r,0===ye&&we(Y)),o!==r?(le=t,t=function(e){return{value:e,unit:"deg"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=je(),i!==r?(e.substr(ae,3)===b?(o=b,ae+=3):(o=r,0===ye&&we(K)),o!==r?(le=t,t=function(e){return{value:e,unit:"rad"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=je(),i!==r?(e.substr(ae,4)===w?(o=w,ae+=4):(o=r,0===ye&&we(H)),o!==r?(le=t,t=function(e){return{value:e,unit:"grad"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=je(),i!==r?(e.substr(ae,4)===C?(o=C,ae+=4):(o=r,0===ye&&we(X)),o!==r?(le=t,t=function(e){return{value:e,unit:"turn"}}(i)):(ae=t,t=r)):(ae=t,t=r)))),ye--,t===r&&(i=r,0===ye&&we(z)),t}function De(){let t,i,o,s;if(ye++,t=ae,35===e.charCodeAt(ae)?(i=T,ae++):(i=r,0===ye&&we(te)),i!==r){if(o=[],s=e.charAt(ae),N.test(s)?ae++:(s=r,0===ye&&we(re)),s!==r)for(;s!==r;)o.push(s),s=e.charAt(ae),N.test(s)?ae++:(s=r,0===ye&&we(re));else o=r;o!==r?(le=t,t={type:"hex",value:me()}):(ae=t,t=r)}else ae=t,t=r;return t===r&&(t=ae,i=Se(),i!==r&&(le=t,i=function(e){return{type:"function",value:e}}(i)),t=i,t===r&&(t=ae,i=Oe(),i!==r&&(le=t,i={type:"named",value:me()}),t=i)),ye--,t===r&&(i=r,0===ye&&we(ee)),t}function je(){let t,i,o,s,n,a,l,u;for(t=ae,i=e.charAt(ae),I.test(i)?ae++:(i=r,0===ye&&we(ie)),i===r&&(i=null),o=ae,s=[],n=e.charAt(ae),Z.test(n)?ae++:(n=r,0===ye&&we(oe));n!==r;)s.push(n),n=e.charAt(ae),Z.test(n)?ae++:(n=r,0===ye&&we(oe));if(46===e.charCodeAt(ae)?(n=S,ae++):(n=r,0===ye&&we(se)),n!==r){if(a=[],l=e.charAt(ae),Z.test(l)?ae++:(l=r,0===ye&&we(oe)),l!==r)for(;l!==r;)a.push(l),l=e.charAt(ae),Z.test(l)?ae++:(l=r,0===ye&&we(oe));else a=r;a!==r?(s=[s,n,a],o=s):(ae=o,o=r)}else ae=o,o=r;if(o===r)if(o=[],s=e.charAt(ae),Z.test(s)?ae++:(s=r,0===ye&&we(oe)),s!==r)for(;s!==r;)o.push(s),s=e.charAt(ae),Z.test(s)?ae++:(s=r,0===ye&&we(oe));else o=r;if(o!==r){if(s=ae,101===e.charCodeAt(ae)?(n=M,ae++):(n=r,0===ye&&we(ne)),n!==r){if(a=e.charAt(ae),I.test(a)?ae++:(a=r,0===ye&&we(ie)),a===r&&(a=null),l=[],u=e.charAt(ae),Z.test(u)?ae++:(u=r,0===ye&&we(oe)),u!==r)for(;u!==r;)l.push(u),u=e.charAt(ae),Z.test(u)?ae++:(u=r,0===ye&&we(oe));else l=r;l!==r?(n=[n,a,l],s=n):(ae=s,s=r)}else ae=s,s=r;s===r&&(s=null),le=t,t=parseFloat(me())}else ae=t,t=r;return t}pe=s();const Fe=pe!==r&&ae===e.length;function _e(){throw pe!==r&&ae<e.length&&we({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(de,ce<e.length?function(t=ae){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(ce):null,ce<e.length?be(ce,ce+1):be(ce,ce))}return t.peg$library?{peg$result:pe,peg$currPos:ae,peg$FAILED:r,peg$maxFailExpected:de,peg$maxFailPos:ce,peg$success:Fe,peg$throw:Fe?void 0:_e}:Fe?pe:void _e()}(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=f(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=f(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=g(e.parameters[0]),y(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const 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=v(o)}else{const e=g(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||b("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return c(e.parameters,3),e.parameters[0]&&(t=f(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),y(r,e.parameters[1])),e.parameters[2]&&(i=f(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 f(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);const t=e.value;return y(t,e),"%"===e.unit?.01*t:t}function g(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 v(e){switch(e.colorType){case"hex":return(0,s.j5)(e.value);case"named":return b(e.value);case"function":return function(e){if(c(e.parameters,4),w.test(e.name))return[f(e.parameters[0]),f(e.parameters[1]),f(e.parameters[2]),e.parameters[3]?f(e.parameters[3]):1];if(C.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]),f(e.parameters[1]),f(e.parameters[2]),e.parameters[3]?f(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function b(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 w=/^rgba?/i,C=/^hsla?/i;function T(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function S(e,t,r,i){try{const i=function(e){const 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"";const t=[];for(const 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"),O(r,"color")];break;case"bloom":e=[A(r,"strength"),A(r,"radius","pt"),A(r,"threshold")]}const 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 O(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),o=r(16930),s=r(65864);const n={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 a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>b});var i=r(31635),o=r(65008),s=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[0];r&&r.forEach((e,r)=>{t.set(r,(0,n.o8)(e),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,o)=>{e&&e.has(o)||t.set(o,(0,n.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=7){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach(e=>{o[e]=r.get(e,i)}),o}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.aB)(t),o=(0,p.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach(e=>{o.invalidate(e),r.revert(e,i),o.commit(e)})}};return r=(0,i.Cg)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function y(e){return(0,p.oY)(e).store}d(o.A);var m=r(16649),h=r(49422);const f=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,p.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,h.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=g(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),7)}updateOrigin(e,t){const r=g(this),i=(0,a.aB)(t),o=(0,m.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return r=(0,i.Cg)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function g(e){return(0,p.oY)(e).store}const v=e=>{const t=f(d(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i.Cg)([(0,c.$)("esri.core.MultiOriginJSONSupport")],r),r},b=v(o.A)},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var i=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const o=(0,i.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),o=r(53966),s=r(91869),n=r(3330),a=r(12195),l=r(30524),u=r(98623),p=r(56400),c=r(96285);const d=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],g(e))}static fromLayerJSON(e){return new y(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const o=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?n.GB.instance:t===u.n$?c.mQ.utcInstance:(0,s.tE)(d,t,()=>c.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",n=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,p.ZS)(o.dateFieldsTimeReference):a??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,p.ZS)(i.timeReference):a:null,d=new Map([[m(o?.creationDateField??""),l],[m(o?.editDateField??""),l],[m(s),c],[m(n),c]]);for(const{name:i,type:o}of e.fields)if(f.has(o))t.set(i,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(m(i??""))??a;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>d});var i,o=r(31635),s=r(4718),n=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(92438),p=r(63988),c=r(49849);let d=i=class extends((0,p.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,o.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)(c.Wp)],d.prototype,"symbol",void 0),(0,o.Cg)([(0,a.e)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,o.Cg)([(0,l.$)("esri.renderers.SimpleRenderer")],d)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3549,8766],{4197:(e,t,r)=>{r.d(t,{cj:()=>l,jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function o(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function l(e){return[...e]}},6455:(e,t,r)=>{r.d(t,{FJ:()=>v,Dp:()=>w,KV:()=>b});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(7762),p=r(25482),d=r(43937),c=r(83960),h=r(13069);const y={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let m=class extends((0,a.O)(p.o)){constructor(e){super(e),this.id=(0,h.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:y})],m.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:y})],m.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilter")],m);var f=r(41560);let g=class extends((0,a.O)(p.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(m)),this.mode="manual"}writeFilters(e,t,r,i){const n=e.toArray();"scale"===this.mode&&n.sort((e,t)=>{const r=(0,c.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===r?i:r}),t[r]=n.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,f.mW)(this,t))}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A.ofType(m),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,i.Cg)([(0,d.K)("filters")],g.prototype,"writeFilters",null),(0,i.Cg)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilterInfo")],g);const v=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i.Cg)([(0,s.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,s.MZ)(b)],r.prototype,"displayFilterInfo",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,n.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},b={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},6797:(e,t,r)=>{r.d(t,{Mj:()=>c,Ui:()=>y,w2:()=>h});var i=r(65008),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),n=a(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),c=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,c).sort(),y=p(e);if(y&&o.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let m;const f=l(e)&&l(t);for(const i of h){const n=u(e,i),s=u(t,i);let o;if((f||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&p(n)===p(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function c(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(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}:d(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),n=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),T=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.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{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,d.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,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(n)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,T.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&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,h.MZ)({type:w.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],F),F},x={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},15481:(e,t,r)=>{r.r(t),r.d(t,{default:()=>X});var i=r(31635),n=r(13874),s=r(92071),o=r(74887),l=r(84952),a=r(10107),u=r(44208),p=r(53966),d=(r(87811),r(40608)),c=r(5443),h=r(16930),y=r(50498),m=r(99959);const f=Symbol("isGeoJSONGraphicOrigin");var g;class v extends m.A{static{g=f}constructor(e){super(),this[g]=!0,this.type="geojson",this.layer=e}}var w=r(4146),b=r(49186),T=r(92474),F=r(29953),x=r(39829),M=r(64714),I=r(22671);let _=class extends T.x_{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,o.sg)(async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(e=>I.A.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:c.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new b.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],i=[],n=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?i.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&i.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)n.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:n,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new b.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?x.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,F.ho)("GeoJSONSourceWorker",{strategy:(0,u.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:i,geometryType:n,objectIdField:s,url:o,timeInfo:l,customParameters:a}=this.layer,d="defaults"===this.layer.originOf("spatialReference"),c={url:o,customParameters:a,fields:t&&t.map(e=>e.toJSON()),geometryType:y.gy.toJSON(n),hasZ:i,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:d?null:r&&r.toJSON()},h=await this._connection.invoke("load",c,{signal:e});for(const e of h.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});h.featureErrors.length&&p.A.getLogger(this.layer).warn("#load()",`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=(0,M.f)(this.sourceJSON.hasZ,!0)}};(0,i.Cg)([(0,a.MZ)()],_.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],_.prototype,"layer",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"sourceJSON",void 0),_=(0,i.Cg)([(0,d.$)("esri.layers.graphics.sources.GeoJSONSource")],_);var C=r(63074),S=r(69208),A=r(6455),Z=r(87718),O=r(76294),E=r(16131),N=r(32756),j=r(8303),P=r(54310),R=r(25036),D=r(82935),$=r(68109),J=r(10873),G=r(15426),q=r(29005),U=r(20437),z=r(17036),L=r(30524),k=r(46499),B=r(39383),V=r(41214),Q=r(61956),H=r(30291),Y=r(56400);const W=(0,z.p)();let K=class extends((0,N.fY)((0,A.FJ)((0,S.d)((0,O.J)((0,Z.F)((0,C.dM)((0,D.e)((0,$.d)((0,R.j)((0,P.J)((0,E.q)((0,j.A)((0,s.P)(w.A)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new _({layer:this}),this.spatialReference=h.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(o.QP).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,L.yp)(this.renderer,this.fieldsIndex),(0,L.sv)(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}set portalItem(e){super.portalItem=e}set timeInfo(e){super.timeInfo=e}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,L.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:i}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628));await this.load();const n=await i(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),n}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){const e=new Q.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(Q.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(Q.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(Q.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(Q.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();(0,G.ZJ)(e,n,"GeoJSONLayer");const s=await Promise.all([r.e(4575),r.e(7136)]).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i.Cg)([(0,a.MZ)(J.zQ)],K.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],K.prototype,"capabilities",null),(0,i.Cg)([(0,a.MZ)({type:String})],K.prototype,"copyright",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],K.prototype,"createQueryVersion",null),(0,i.Cg)([(0,a.MZ)((0,Y.P6)("dateFieldsTimeReference"))],K.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],K.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:String})],K.prototype,"displayField",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],K.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,a.MZ)(J.Yj)],K.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,a.MZ)({type:[U.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],K.prototype,"fields",void 0),(0,i.Cg)([(0,a.MZ)(W.fieldsIndex)],K.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,a.MZ)({type:c.A,json:{name:"extent"}})],K.prototype,"fullExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:y.gy.read}}})],K.prototype,"geometryType",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,clonable:!1})],K.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],K.prototype,"hasZ",void 0),(0,i.Cg)([(0,a.MZ)(J.id)],K.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,readOnly:!0})],K.prototype,"isTable",null),(0,i.Cg)([(0,a.MZ)(J.kF)],K.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,a.MZ)({type:[k.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:B.w},write:!0}})],K.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,a.MZ)(J.fV)],K.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:["show","hide"]})],K.prototype,"listMode",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],K.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)(J.ke)],K.prototype,"opacity",void 0),(0,i.Cg)([(0,a.MZ)({type:["GeoJSON"]})],K.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,a.MZ)(W.outFields)],K.prototype,"outFields",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],K.prototype,"parsedUrl",null),(0,i.Cg)([(0,a.MZ)(J.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,a.MZ)({types:V.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:V.XJ}}}})],K.prototype,"renderer",null),(0,i.Cg)([(0,a.MZ)(J.PY)],K.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],K.prototype,"source",void 0),(0,i.Cg)([(0,a.MZ)({type:h.A})],K.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({type:[q.A]})],K.prototype,"templates",void 0),(0,i.Cg)([(0,a.MZ)()],K.prototype,"title",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1},readOnly:!0})],K.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)(J.OZ)],K.prototype,"url",null),K=(0,i.Cg)([(0,d.$)("esri.layers.GeoJSONLayer")],K);const X=K},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(31635),s=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),h=r(16930),y=r(65864),m=r(50498),f=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.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,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const 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,a.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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}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=>{const i=(0,y.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,y.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const 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,n){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=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(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)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},26253:(e,t,r)=>{r.d(t,{T:()=>d});var i=r(31635),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends((0,n.O)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,a.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i.Cg)([(0,u.$)("esri.time.TimeInterval")],d)},29005:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.O)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],p)},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>y,XJ:()=>m,lc:()=>h,mX:()=>v,rU:()=>g,tH:()=>x});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',d=p+" + ",c=" + "+p;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function v(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=b.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new l.A;return n.read(i,r),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",d="field",c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&p||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const n=p(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,n){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),a=parseInt(s,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>d,gy:()=>p,yR:()=>c});var i=r(66552),n=r(5443),s=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),c={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(31635),s=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),p=r(36708),d=r(24326),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(12195),m=r(65864),f=r(50498),g=r(54339),v=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends((0,o.O)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,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;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r&&"object"==typeof r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const 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;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.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,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&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",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,c.MZ)({value:null})],b.prototype,"attributes",null),(0,n.Cg)([(0,c.MZ)({value:null,types:f.yR,json:{read:m.rS}})],b.prototype,"geometry",null),(0,n.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,n.Cg)([(0,c.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,n.Cg)([(0,c.MZ)({type:s.A,value:null})],b.prototype,"popupTemplate",null),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,c.MZ)({value:null,types:v.Es})],b.prototype,"symbol",null),(0,n.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=i=(0,n.Cg)([(0,h.$)("esri.Graphic")],b)},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":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const 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:()=>n})},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>f,QY:()=>c,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),p=r(98623);const d=["geometry","scale","timeProperties"];function c(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return m.create(e,t,null,["$feature","$view"])}function y(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=s.scriptUsesGeometryEngine(l);a&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,a);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,p);let c=null;null!=r&&(c=new o(r),c.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new m(e,s,l,d,t,h,c,o)}constructor(e,t,r,i,n,s,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>h});var i=r(44208),n=r(4718),s=r(99352),o=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${d(t)} = null;`;for(const t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function d(e){return a.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},68109:(e,t,r)=>{r.d(t,{d:()=>b});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),o=r(13874),l=r(69540),a=r(25482),u=r(93637),p=r(43937),d=r(50820),c=r(10873),h=r(46499),y=r(41214);let m=class extends((0,l.O)(a.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[h.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(c.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:y.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackPartInfo")],m);var f=r(96576),g=r(59868),v=r(26253);let w=class extends((0,l.O)(a.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new f.A({symbol:g.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new f.A({symbol:g.UK.clone()})}),this.trackLines=new m({renderer:new f.A({symbol:g.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,u.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],w.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[d.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i.Cg)([(0,p.K)("fields")],w.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:v.T,json:{write:!0}})],w.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],w.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(c.M6)],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],w.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],w.prototype,"timeField",void 0),w=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackInfo")],w);const b=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({type:w})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.TrackableLayer")],r),r}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},70328:(e,t,r)=>{r.d(t,{BI:()=>w,DC:()=>d,Ej:()=>h,Ie:()=>g,Jt:()=>v,Ne:()=>y,RF:()=>p,aI:()=>T,fA:()=>o,gE:()=>a,hZ:()=>f,iT:()=>c,is:()=>b,qv:()=>F,vI:()=>m,vY:()=>l,v_:()=>x,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=o,l}function l(e,t=s()){return function(e,t,r,i=s()){return f(i,F),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,n.jh)(24)){const[r,i,s,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function h(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function m(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?f(e,F):s(F)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function T(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];s()},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const c=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,y);return new a(y,p,h,m)}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){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},82935:(e,t,r)=>{r.d(t,{B:()=>h,e:()=>y});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),d=r(64272),c=r(26253);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},y=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new c.T({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:d.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:c.T})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(h)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>o,oW:()=>a,zx:()=>l});var i=r(34727),n=r(83047);const s=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*o*n.dy*s:0}function l(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,i.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],p)},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),p=r(56400),d=r(96285);const c=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?d.mQ.utcInstance:(0,s.tE)(c,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):l??u.n$:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,p.ZS)(i.timeReference):l:null,c=new Map([[y(n?.creationDateField??""),a],[y(n?.editDateField??""),a],[y(s),d],[y(o),d]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(y(i??""))??l;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(64272),d=r(26253),c=r(56400);function h(e,t){return d.T.fromJSON({value:e,unit:t})}let y=class extends((0,n.O)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,l.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:d.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i.Cg)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i.Cg)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i.Cg)([(0,a.$)("esri.layers.support.TimeInfo")],y)},99352:(e,t,r)=>{r.d(t,{F:()=>i,P:()=>n});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},99959:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(31635),n=(r(53966),r(44208),r(87811),r(49186),r(40608));let s=class{};s=(0,i.Cg)([(0,n.$)("esri.graphic.GraphicOrigin")],s)}}]);
|