@arcgis/core 4.24.0-next.20220607 → 4.24.0-next.20220610

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.
Files changed (206) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/LineOfSightAnalysis.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade.d.ts +4 -0
  5. package/arcade.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{4d2181bde97983ecac8b.js → 03ddf44e6fb8bf9db3ff.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{2e2d7f5952934af43fd7.js → 04034dabc8e0a489b0f8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d7168ff8f26ca2537080.js → 0747c28fce0b344dc89b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1e4e5d147263e98536bc.js +1 -0
  11. package/assets/esri/core/workers/chunks/{cbe98327181d8d7ad9e5.js → 262fabdc409d55831ffa.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2a52c2c6edd70432f4a5.js +1 -0
  13. package/assets/esri/core/workers/chunks/{71d445d1e6812e03a1d7.js → 3ce7adaefc9de28d9c87.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c165845a117c21246b1e.js → 42aa8ce4eb7bd851475e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a9a4bb1d781b1a995fb3.js → 4824926501e11d04eb4a.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{e51420d231c286b9c062.js → 540f1ed1ea9cddc739af.js} +1 -1
  17. package/assets/esri/core/workers/chunks/6196cfdeb91ceba52af3.js +1 -0
  18. package/assets/esri/core/workers/chunks/71a4618d959a09302c51.js +1 -0
  19. package/assets/esri/core/workers/chunks/76fbc8eaabba62fd4f9c.js +1 -0
  20. package/assets/esri/core/workers/chunks/{cb906a3f03dd0805c880.js → 7cc17b716b16a6684023.js} +1 -1
  21. package/assets/esri/core/workers/chunks/871681c1353026cb6d4b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{13e9e6f0b4942d79b0eb.js → 88942e9f60687ac006dc.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{4c5b80ba3dbfe6f6cafb.js → acb1e649cda99d4f69a5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/b71a0a8a2f446c671161.js +1 -0
  25. package/assets/esri/core/workers/chunks/b8002aaa665712299121.js +1 -0
  26. package/assets/esri/core/workers/chunks/{e4ca3f04ca7f71b46240.js → bb3480e231934b7bb34e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{185da42e7cc8e440c0f0.js → c157b46b0724f3f0947e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{1aba8c73c62a64e0658c.js → c6af8b0903d8d934d542.js} +1 -1
  29. package/assets/esri/core/workers/chunks/c8402e32307a7b7eaaeb.js +1 -0
  30. package/assets/esri/core/workers/chunks/c8e08a956b16034d9819.js +1 -0
  31. package/assets/esri/core/workers/chunks/d0d2566bedc493ed0a3b.js +1 -0
  32. package/assets/esri/core/workers/chunks/{8152cd26ebeae910b753.js → d3c73da9c2abb59e762a.js} +1 -1
  33. package/assets/esri/core/workers/chunks/d828a0656e7351a74fc4.js +1 -0
  34. package/assets/esri/core/workers/chunks/{172368d4eb6e6f8d2bdb.js → d8b9551df1bd196d0126.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e5c8584ae764892c324d.js +1 -0
  36. package/assets/esri/core/workers/chunks/{1d893ebc6f203ff1fc3d.js → efe605ff4ba2a95c14c5.js} +1 -1
  37. package/assets/esri/core/workers/chunks/f54d5abbb9668c45bd19.js +1 -0
  38. package/assets/esri/core/workers/chunks/{bd2f4a01cb71e25837ba.js → f7ba74fc4eb541c424fc.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{1ebed6d6f561f926bd36.js → faf6e48f9f1205fb2e43.js} +1 -1
  40. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  41. package/assets/esri/themes/base/widgets/_BasemapToggle.scss +6 -23
  42. package/assets/esri/themes/base/widgets/_Directions.scss +0 -3
  43. package/assets/esri/themes/base/widgets/_FeatureTable.scss +10 -2
  44. package/assets/esri/themes/base/widgets/_Slider.scss +8 -3
  45. package/assets/esri/themes/base/widgets/_Tooltip.scss +8 -8
  46. package/assets/esri/themes/base/widgets/_Weather.scss +5 -1
  47. package/assets/esri/themes/dark/main.css +1 -1
  48. package/assets/esri/themes/light/main.css +1 -1
  49. package/assets/esri/themes/light/view.css +1 -1
  50. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle.json +1 -1
  51. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ar.json +1 -1
  52. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_bg.json +1 -1
  53. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_bs.json +1 -1
  54. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ca.json +1 -1
  55. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_cs.json +1 -1
  56. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_da.json +1 -1
  57. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_de.json +1 -1
  58. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_el.json +1 -1
  59. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_en.json +1 -1
  60. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_es.json +1 -1
  61. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_et.json +1 -1
  62. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_fi.json +1 -1
  63. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_fr.json +1 -1
  64. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_he.json +1 -1
  65. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_hr.json +1 -1
  66. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_hu.json +1 -1
  67. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_id.json +1 -1
  68. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_it.json +1 -1
  69. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ja.json +1 -1
  70. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ko.json +1 -1
  71. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_lt.json +1 -1
  72. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_lv.json +1 -1
  73. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_nb.json +1 -1
  74. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_nl.json +1 -1
  75. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_pl.json +1 -1
  76. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_pt-BR.json +1 -1
  77. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_pt-PT.json +1 -1
  78. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ro.json +1 -1
  79. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_ru.json +1 -1
  80. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_sk.json +1 -1
  81. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_sl.json +1 -1
  82. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_sr.json +1 -1
  83. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_sv.json +1 -1
  84. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_th.json +1 -1
  85. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_tr.json +1 -1
  86. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_uk.json +1 -1
  87. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_vi.json +1 -1
  88. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_zh-CN.json +1 -1
  89. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_zh-HK.json +1 -1
  90. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_zh-TW.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  92. package/chunks/RasterColorizer.glsl.js +22 -18
  93. package/chunks/basis_transcoder.js +1 -1
  94. package/chunks/i3s.js +1 -1
  95. package/chunks/lclayout.js +1 -1
  96. package/chunks/lerc-wasm.js +1 -1
  97. package/chunks/libtess-asm.js +1 -1
  98. package/chunks/libtess.js +1 -1
  99. package/chunks/pe-wasm.js +1 -1
  100. package/chunks/persistableUrlUtils.js +1 -1
  101. package/chunks/vxlLayer.js +1 -1
  102. package/core/quantityUtils.js +1 -1
  103. package/geometry/projection.js +1 -1
  104. package/geometry/support/geodesicUtils.js +1 -1
  105. package/geometry/support/plane.js +1 -1
  106. package/interfaces.d.ts +471 -52
  107. package/layers/LineOfSightLayer.js +1 -1
  108. package/layers/RouteLayer.js +1 -1
  109. package/layers/VectorTileLayer.js +1 -1
  110. package/layers/support/LayerContingentValuesCache.js +1 -1
  111. package/layers/support/RasterInfo.js +1 -1
  112. package/layers/support/rasterDatasets/ImageAuxRaster.js +1 -1
  113. package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
  114. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  115. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  116. package/layers/support/rasterFormats/JpgPlus.js +1 -1
  117. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  118. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  119. package/package.json +1 -1
  120. package/portal/support/urlUtils.js +5 -0
  121. package/renderers/support/colorRampUtils.js +1 -1
  122. package/rest/imageService/fetchRasterInfo.js +1 -1
  123. package/smartMapping/renderers/pieChart.js +1 -1
  124. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  125. package/support/arcadeUtils.js +1 -1
  126. package/support/elevationInfoUtils.js +1 -1
  127. package/support/persistableUrlUtils.js +1 -1
  128. package/support/revision.js +1 -1
  129. package/symbols/cim/cimAnalyzer.js +1 -1
  130. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  131. package/views/2d/engine/webgl/Utils.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  134. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  135. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  136. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  137. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  138. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  139. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  140. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  141. package/views/3d/input/SceneInputManager.js +1 -1
  142. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  143. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  144. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  145. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  146. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  147. package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
  148. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  149. package/views/3d/support/MemoryController.js +1 -1
  150. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  151. package/views/3d/terrain/TerrainSurface.js +1 -1
  152. package/views/3d/terrain/TileCompositor.js +1 -1
  153. package/views/3d/terrain/TileRenderer.js +1 -1
  154. package/views/3d/webgl-engine/core/shaderLibrary/output/BlendOptions.js +1 -1
  155. package/views/MapView.js +1 -1
  156. package/views/SceneView.js +1 -1
  157. package/views/View.js +1 -1
  158. package/views/draw/DrawOperation.js +1 -1
  159. package/views/draw/support/GraphicMover.js +1 -1
  160. package/views/interactive/SegmentLabels.js +1 -1
  161. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  162. package/views/interactive/tooltip/TranslateTooltipInfos.js +1 -1
  163. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  164. package/views/interactive/tooltip/support/measurements.js +1 -1
  165. package/views/support/areaMeasurementUtils.js +1 -1
  166. package/views/support/automaticLengthMeasurementUtils.js +5 -0
  167. package/views/support/euclideanLengthMeasurementUtils.js +5 -0
  168. package/views/support/geodesicLengthMeasurementUtils.js +5 -0
  169. package/views/support/measurementUtils.js +5 -0
  170. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  171. package/widgets/BasemapToggle.js +1 -1
  172. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  173. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  174. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  175. package/widgets/BuildingExplorer.js +1 -1
  176. package/widgets/Daylight/DaylightViewModel.js +1 -1
  177. package/widgets/Directions/DirectionsViewModel.js +1 -1
  178. package/widgets/Directions.js +1 -1
  179. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  180. package/widgets/Feature/support/featureUtils.js +1 -1
  181. package/widgets/FeatureTable/FieldColumn.js +1 -1
  182. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  183. package/widgets/Print/PrintViewModel.js +1 -1
  184. package/widgets/Sketch/SketchViewModel.js +1 -1
  185. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  186. package/widgets/UtilityNetworkTrace.js +1 -1
  187. package/widgets/Weather.js +1 -1
  188. package/widgets/Widget.js +1 -1
  189. package/widgets/support/AnalysisViewModel.js +1 -1
  190. package/widgets/support/AnchorElementViewModel.js +1 -1
  191. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  192. package/assets/esri/core/workers/chunks/2ac6c99aacb873134f7c.js +0 -1
  193. package/assets/esri/core/workers/chunks/471beeb6924599209567.js +0 -1
  194. package/assets/esri/core/workers/chunks/5242c9badca17ba2ab25.js +0 -1
  195. package/assets/esri/core/workers/chunks/72c7d48408d1f8050026.js +0 -1
  196. package/assets/esri/core/workers/chunks/770cf0a66102100abe74.js +0 -1
  197. package/assets/esri/core/workers/chunks/96ff15d6c2bfca0c6061.js +0 -1
  198. package/assets/esri/core/workers/chunks/9c4c721d890b49697132.js +0 -1
  199. package/assets/esri/core/workers/chunks/af3766a2d27419c7766c.js +0 -1
  200. package/assets/esri/core/workers/chunks/b50bbfd75768d9a8de88.js +0 -1
  201. package/assets/esri/core/workers/chunks/b577ec80647cf2ece397.js +0 -1
  202. package/assets/esri/core/workers/chunks/c1653b6cb201ecbaabaa.js +0 -1
  203. package/assets/esri/core/workers/chunks/e99b58d07475bffce7ea.js +0 -1
  204. package/assets/esri/core/workers/chunks/f3d885aec4bca18928d4.js +0 -1
  205. package/assets/esri/core/workers/chunks/fc0da1dfeef041182ddf.js +0 -1
  206. package/views/support/lengthMeasurementUtils.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8157,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},50445:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ri});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),n=i(51773),l=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(30687),i(91423)),p=i(46791),u=i(20102),d=i(3920),c=i(92604),m=i(70586),y=i(16453),b=i(78286),h=i(95330),f=i(17445),v=i(67900),g=i(17452),T=i(5600),C=(i(67676),i(80442),i(75215)),w=i(71715),S=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),I=i(8744),D=i(87085),j=i(71612),F=i(38009),B=i(16859),x=i(72965),E=i(66677),L=i(78223),M=i(96674),P=i(77987);let J=class extends M.wq{constructor(e){super(e),this.break=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new P.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new P.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new P.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new P.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"break",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"first",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"unlocated",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"last",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"middle",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"waypoint",void 0),J=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],J);const R=J;var k=i(4095),U=i(20256);let W=class extends M.wq{constructor(e){super(e),this.directionLines=new k.Z({color:[0,122,194],width:6}),this.directionPoints=new P.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new P.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new U.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new k.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new k.Z({width:8,color:[20,89,127]}),this.stops=new R}};(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({type:R})],W.prototype,"stops",void 0),W=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],W);const Z=W;var V=i(65587),q=i(15235),G=i(14661),z=i(3172),K=i(11282),H=i(36030),$=i(35454);const Y=(0,$.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),Q=(0,$.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),X=(0,$.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),ee=(0,$.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,$.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,$.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,$.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,$.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,$.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,$.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,$.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,$.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,$.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,$.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,$.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),pe=(0,$.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,$.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,$.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),ce=(0,$.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),me=(0,$.w)()({Kilometers:"kilometers",Miles:"miles"},{ignoreUnknown:!1}),ye=(0,$.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,$.w)()({Kilometers:"kilometers",Miles:"miles",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,$.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,$.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,$.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,$.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"});let Te=class extends M.wq{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,r._)([(0,T.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ge)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Te);const Ce=Te;let we=class extends M.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,T.Cb)({type:Number})],we.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[Ce]})],we.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],we.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"state",void 0),we=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],we);const Se=we;var _e=i(2368);let Ne=class extends((0,_e.J)(M.wq)){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}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,m.Wi)(i)?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],Ne.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"description",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ne.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"id",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ne.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],Ne.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Ne.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Ne.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],Ne.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(Y)],Ne.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ne.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(re)],Ne.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(ie)],Ne.prototype,"uturnAtJunctions",void 0),Ne=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],Ne);const Oe=Ne;let Ae=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=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(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:Se})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],Ae);const Ie=Ae;function De(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function je(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,K.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,K.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,K.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,g.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,b.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,K.en)(o),p=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",u=(0,K.lA)({f:"json",serviceName:p},t),d=(0,g.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,u),m=[];let y=null;if(c?.data?.results?.length){const e=c.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&&(y=t.value)}return{supportedTravelModes:m,defaultTravelMode:y}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,Ie.fromJSON(o)}var Fe=i(82526);function Be(e,t){if((0,m.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function xe(e,t,i){if(!(0,m.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ee(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Me(e,t){return(0,m.Wi)(e)||(0,m.Wi)(t)?null:Math.round((e-t)/6e4)}function Pe(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&(i.accumulateAttributeNames=t.accumulateAttributeNames.join()),i.attributeParameterValues&&(i.attributeParameterValues=JSON.stringify(t.attributeParameterValues)),i.barriers&&(i.barriers=JSON.stringify(t.barriers)),i.outSR&&(i.outSR=t.outSR.wkid),i.overrides&&(i.overrides=JSON.stringify(t.overrides)),i.polygonBarriers&&(i.polygonBarriers=JSON.stringify(t.polygonBarriers)),i.polylineBarriers&&(i.polylineBarriers=JSON.stringify(t.polylineBarriers)),i.restrictionAttributeNames&&(i.restrictionAttributeNames=t.restrictionAttributeNames.join()),i.stops&&(i.stops=JSON.stringify(t.stops)),i.travelMode&&(i.travelMode=JSON.stringify(t.travelMode)),i}var Je=i(74889);const Re=new $.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:Re.read,write:Re.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],ke);const Ue=ke,We=new $.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ze=class extends Ue{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:We.read,write:We.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],Ze);const Ve=Ze;let qe=class extends a.Z{};(0,r._)([(0,T.Cb)()],qe.prototype,"events",void 0),(0,r._)([(0,T.Cb)()],qe.prototype,"strings",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],qe);const Ge=qe;var ze=i(82971),Ke=i(58901),He=i(13473);let $e=class extends Je.default{constructor(e){super(e),this.extent=null,this.features=null,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 i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&ze.Z.fromJSON(i);return e.map((e=>{const t=this._decompressGeometry(e.compressedGeometry),i=new Ke.Z({...t,spatialReference:r}),o=e.events?.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:o,y:s,z:a},strings:n}=e;return new Ge({geometry:new He.Z({x:o,y:s,z:a,hasZ:void 0!==a,spatialReference:r}),attributes:{ETA:i,arriveTimeUTC:t},strings:n})}))??[];return new Ge({attributes:e.attributes,events:o,geometry:i,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,m.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,n,l,p,u,d,c,m,y=0,b=0,h=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[y],32)){y=2;const e=parseInt(u[y],32);y++,d=parseInt(u[y],32),y++,1&e&&(b=u.indexOf("|")+1,c=parseInt(u[b],32),b++),2&e&&(h=u.indexOf("|",b)+1,m=parseInt(u[h],32),h++)}else d=parseInt(u[y],32),y++;for(;y<u.length&&"|"!==u[y];){a=parseInt(u[y],32)+t,y++,t=a,n=parseInt(u[y],32)+i,y++,i=n;const e=[a/d,n/d];b&&(p=parseInt(u[b],32)+r,b++,r=p,e.push(p/c)),h&&(l=parseInt(u[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new Ke.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ke.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],$e.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],$e.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],$e.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],$e.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],$e.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],$e.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],$e.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],$e.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],$e.prototype,"totalTime",void 0),$e=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],$e);const Ye=$e;let Qe=class extends M.wq{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,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:Ye,json:{write:!0}})],Qe.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],Qe.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Qe.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],Qe.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedTurns",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],Qe);const Xe=Qe;function et(e){return e&&Je.default.fromJSON(e).features.map((e=>e))}let tt=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return et(t.barriers)}readPolylineBarriers(e){return et(e)}readPolygonBarriers(e){return et(e)}};(0,r._)([(0,T.Cb)({type:[Ve]})],tt.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],tt.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],tt.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],tt.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[Xe]})],tt.prototype,"routeResults",void 0),tt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],tt);const it=tt;function rt(e){return"esri.rest.support.FeatureSet"===e?.declaredClass}var ot;let st=ot=class extends((0,_e.J)(M.wq)){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 fromGraphic(e){return new ot({directionLineType:de.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,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),DirectionLineType:(0,m.pC)(this.directionLineType)?de.toJSON(this.directionLineType):null,DirectionPointID:(0,m.Wg)(this.directionPointId),Meters:(0,m.Wg)(this.distance),Minutes:(0,m.Wg)(this.duration)};return(0,m.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,m.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};st.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],st.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],st.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],st.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],st.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],st.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],st.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],st.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],st.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],st.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],st.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],st.prototype,"toLevel",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],st.prototype,"type",void 0),st=ot=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],st);const at=st;var nt;let lt=nt=class extends((0,_e.J)(M.wq)){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(0,m.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new nt({alternateName:e.attributes.AlternateName??null,arrivalTime:(0,m.pC)(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:ue.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,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:(0,m.Wg)(this.objectId),DirectionPointType:(0,m.pC)(this.directionPointType)?ue.toJSON(this.directionPointType):null,Sequence:(0,m.Wg)(this.sequence),StopID:this.stopId};return(0,m.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,m.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,m.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,m.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,m.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,m.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,m.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,m.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,m.pC)(this.level)&&(e.Level=this.level),(0,m.pC)(this.name)&&(e.Name=this.name),(0,m.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,m.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,m.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};lt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],lt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],lt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],lt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],lt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],lt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],lt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],lt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],lt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],lt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:He.Z})],lt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],lt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],lt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],lt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],lt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],lt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],lt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],lt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],lt.prototype,"type",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"voiceInstruction",void 0),lt=nt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],lt);const pt=lt;var ut;let dt=ut=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new ut({addedCost:e.attributes.AddedCost??null,barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,m.pC)(e.attributes.FullEdge)?pe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,FullEdge:(0,m.pC)(this.fullEdge)?pe.toJSON(this.fullEdge):null,Name:this.name,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],dt.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],dt.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],dt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],dt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],dt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],dt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],dt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:pe.apiValues,json:{name:"attributes.FullEdge",read:{reader:pe.read},write:{writer:pe.write}}})],dt.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],dt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],dt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],dt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],dt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],dt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],dt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],dt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],dt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=ut=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],dt);const ct=dt;var mt,yt=i(38913);let bt=mt=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new mt({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};bt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],bt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],bt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],bt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],bt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],bt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:yt.Z,json:{write:!0}})],bt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],bt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],bt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],bt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],bt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],bt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],bt.prototype,"type",void 0),bt=mt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],bt);const ht=bt;var ft;let vt=ft=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}static fromGraphic(e){return new ft({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};vt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],vt.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],vt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],vt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],vt.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:Ke.Z,json:{write:!0}})],vt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],vt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],vt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],vt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],vt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],vt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],vt.prototype,"type",void 0),vt=ft=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],vt);const gt=vt;let Tt=class extends M.wq{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(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Tt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Tt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Tt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Tt.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Tt.prototype,"travelMode",void 0),Tt=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],Tt);const Ct=Tt;var wt;let St=wt=class extends((0,_e.J)(M.wq)){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(0,m.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Me(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,m.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Me(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Be(t.attributes,"Total_")}readTotalViolations(e,t){return Be(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Be(t.attributes,"TotalWait_")}static fromGraphic(e){return new wt({analysisSettings:(0,m.pC)(e.attributes.AnalysisSettings)?Ct.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,m.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:(0,m.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,m.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:(0,m.pC)(e.attributes.TotalCosts)?Ee(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:(0,m.Wg)(this.objectId),AnalysisSettings:(0,m.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,m.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,m.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,m.Wg)(this.name),StartTime:(0,m.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,m.pC)(this.totalCosts)?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,m.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,m.Wg)(this.popupTemplate)})}};St.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],St.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],St.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],St.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],St.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],St.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],St.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],St.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],St.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],St.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],St.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],St.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],St.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],St.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],St.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],St.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],St.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],St.prototype,"type",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"version",void 0),St=wt=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],St);const _t=St,Nt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ot=i(33955);let At=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],At.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:Ot.im,write:!0}})],At.prototype,"geometry",void 0),(0,r._)([(0,H.J)(ve)],At.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],At.prototype,"name",void 0),(0,r._)([(0,H.J)(fe,{name:"spatialRel"})],At.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],At.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],At.prototype,"where",void 0),At=(0,r._)([(0,S.j)("esri.rest.support.DataLayer")],At);const It=At;var Dt;let jt=Dt=class extends Je.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Dt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],jt.prototype,"doNotLocateOnRestrictedElements",void 0),jt=Dt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],jt);const Ft=jt;let Bt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Bt.prototype,"url",void 0),Bt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],Bt);const xt=Bt;var Et;function Lt(e,t,i){(0,m.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Mt=Et=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=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,C.TJ)(Et,e)}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Lt(e,t,i)}writePolygonBarrier(e,t,i){Lt(e,t,i)}writePolylineBarrier(e,t,i){Lt(e,t,i)}readRestrictionAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,m.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,m.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?It.fromJSON(e):function(e){return e&&"url"in e}(e)?xt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Ft.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Lt(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Mt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Mt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Mt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(Nt)],Mt.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Mt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Mt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(ee)],Mt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(ce)],Mt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Mt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],Mt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(Y)],Mt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(te)],Mt.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{name:"outSR",write:!0}})],Mt.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Mt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Mt.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Mt.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Mt.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Mt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Mt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Mt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(ie)],Mt.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Mt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Mt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Mt.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Mt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Mt.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Mt.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"useTimeWindows",void 0),Mt=Et=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Mt);const Pt=Mt;var Jt;let Rt=Jt=class extends((0,_e.J)(M.wq)){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 Me(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Be(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Me(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Be(t.attributes,"Attr_")}writeServiceCosts(e,t){xe(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Be(t.attributes,"Violation_")}readWait(e,t){return Be(t.attributes,"Wait_")}static fromGraphic(e){return new Jt({arriveCurbApproach:(0,m.pC)(e.attributes.ArrivalCurbApproach)?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,m.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,m.pC)(e.attributes.CumulativeCosts)?Ee(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,m.pC)(e.attributes.DepartureCurbApproach)?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,m.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:(0,m.pC)(e.attributes.LocationType)?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:(0,m.pC)(e.attributes.ServiceCosts)?Ee(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:(0,m.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:(0,m.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),ArrivalCurbApproach:(0,m.pC)(this.arriveCurbApproach)?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,m.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,m.pC)(this.cumulativeCosts)?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,m.pC)(this.departCurbApproach)?oe.toJSON(this.departCurbApproach):null,DepartureTime:(0,m.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,m.pC)(this.locationType)?se.toJSON(this.locationType):null,Name:(0,m.Wg)(this.name),RouteName:(0,m.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,m.pC)(this.serviceCosts)?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null,TimeWindowEnd:(0,m.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:(0,m.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Rt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Rt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],Rt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Rt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Rt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Rt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Rt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Rt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],Rt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],Rt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Rt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Rt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Rt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],Rt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],Rt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],Rt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Rt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.NavLatency"}}})],Rt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Rt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],Rt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Rt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],Rt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Rt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Rt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],Rt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Rt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],Rt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],Rt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Rt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],Rt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Rt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],Rt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],Rt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Rt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Rt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Rt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Rt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],Rt.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Rt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Rt.prototype,"readWait",null),Rt=Jt=(0,r._)([(0,S.j)("esri.rest.support.Stop")],Rt);const kt=Rt;var Ut=i(65091);function Wt(e){return e.length?e:null}function Zt(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function Vt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Vt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Vt("esriGeometryPolyline")}}}function qt(e){return"layers"in e}async function Gt(e){const t=ze.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function zt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Kt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}const Ht=p.Z.ofType(at),$t=p.Z.ofType(pt),Yt=p.Z.ofType(ct),Qt=p.Z.ofType(ht),Xt=p.Z.ofType(gt),ei=p.Z.ofType(kt),ti=c.Z.getLogger("esri.layers.RouteLayer");let ii=class extends((0,j.h)((0,x.M)((0,F.q)((0,B.I)((0,y.R)((0,d.p)(D.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new Z,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Yt,this.polygonBarriers=new Qt,this.polylineBarriers=new Xt,this.routeInfo=null,this.spatialReference=ze.Z.WGS84,this.stops=new ei,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.own([(0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t})])}writeFeatureCollectionWebmap(e,t,i,r){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)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>at.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>pt.fromGraphic(e)))}get fullExtent(){if((0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:ze.Z.WGS84}),t=this.stops.filter((e=>(0,m.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,m.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Ut.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.maxScale)))?.layerDefinition.maxScale??0}readMinScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.minScale)))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>ct.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>ht.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>gt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>_t.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){const i=qt(t)?t.layers:t.featureCollection.layers;if(!i.length)return ze.Z.WGS84;const{layerDefinition:r}=i[0],o=r.spatialReference??r.extent.spatialReference??I.Zn;return ze.Z.fromJSON(o)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>kt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,ti)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){(0,m.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,m.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,m.pC)(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Gt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=q.default.from(e).clone();i.extent??(i.extent=await Gt(this.fullExtent)),i.id=null,i.portal??(i.portal=V.Z.getDefault()),i.title??(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",G.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=t?.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Wt(this.pointBarriers),o=e?.polylineBarriers??Wt(this.polylineBarriers),s=e?.polygonBarriers??Wt(this.polygonBarriers);if((0,m.Wi)(i))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.Z.isCollection(i)&&i.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=Zt(l),c=e?.travelMode??d,y=(0,m.yl)(e?.accumulateAttributes,[]);(0,m.pC)(c)&&(y.push(c.distanceAttributeName),c.timeAttributeName&&y.push(c.timeAttributeName));const b={startTime:new Date},f={accumulateAttributes:y,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},v=e?Pt.from(e):new Pt;for(const e in b)null==v[e]&&(v[e]=b[e]);let g;v.set(f);try{g=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,K.en)(e),{path:l}=n;rt(t.stops)&&De(t.stops.features,o,"stops.features",s),rt(t.pointBarriers)&&De(t.pointBarriers.features,o,"pointBarriers.features",s),rt(t.polylineBarriers)&&De(t.polylineBarriers.features,o,"polylineBarriers.features",s),rt(t.polygonBarriers)&&De(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Fe.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if((0,m.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await je(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...n.query,...Pe(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:c}=await(0,z.default)(d,u);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:p,traversedEdges:u,traversedJunctions:d,traversedTurns:c}=e,y=e=>{const t=h.find((t=>t.routeName===e));if((0,m.pC)(t))return t;const i={routeId:h.length+1,routeName:e};return h.push(i),i},b=e=>{const t=h.find((t=>t.routeId===e));if((0,m.pC)(t))return t;const i={routeId:e,routeName:null};return h.push(i),i},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference;const i=e.attributes.Name,r=t+1;h.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=p?.features.every((e=>(0,m.Wi)(e.attributes.RouteName)))&&h.length>0?h[0].routeName:null;return p?.features.forEach((e=>{var t;e.geometry&&((t=e.geometry).spatialReference??(t.spatialReference=p.spatialReference));const i=f??e.attributes.RouteName,r=y(i);r.stops??(r.stops=[]),r.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=b(t),{geometryType:o,spatialReference:s}=i;r.directionLines??(r.directionLines={features:[],geometryType:o,spatialReference:s}),r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??(i.directionPoints={features:[],geometryType:o,spatialReference:s}),i.directionPoints.features.push(e)})),u?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=u;i.traversedEdges??(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t);i.traversedTurns??(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),it.fromJSON({routeResults:h,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(c)}(n,v,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const T=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=(0,m.yl)(T.routeInfo.name,"Route")),function(e,t,i){const r=t.networkDataset.networkAttributes.filter((e=>"cost"===e.usageType)),o=Zt(t),s=i.travelMode??o;if((0,m.Wi)(s))return void ti.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:a,distanceAttributeName:n}=s,l=r.find((e=>e.name===a)),p=r.find((e=>e.name===n)),d=(0,m.Wg)(i.travelMode)?.impedanceAttributeName??(0,m.Wg)(i.impedanceAttribute)??t.impedance,c=X.fromJSON(l?.units),y=Q.fromJSON(p?.units);if(!c||!y)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const b=i.directionsLanguage??t.directionsLanguage,h=(0,m.Wg)(i.accumulateAttributes)??t.accumulateAttributeNames??[],f=new Set(r.filter((({name:e})=>e===a||e===n||e===d||h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)(0,m.pC)(t.costs)&&(t.addedCost=t.costs[d]??0,v(t.costs));for(const t of e.polygonBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));for(const t of e.polylineBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_}=i;g.analysisSettings=new Ct({accumulateAttributes:h,directionsLanguage:b,findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_,travelMode:s}),g.totalDuration=zt(g.totalCosts[a]??0,c),g.totalDistance=Kt(g.totalCosts[n]??0,y),g.totalLateDuration=zt(g.totalViolations[a]??0,c),g.totalWaitDuration=zt(g.totalWait[a]??0,c),(0,m.pC)(g.totalCosts)&&v(g.totalCosts),(0,m.pC)(g.totalViolations)&&v(g.totalViolations),(0,m.pC)(g.totalWait)&&v(g.totalWait);for(const t of e.stops)(0,m.pC)(t.serviceCosts)&&(t.serviceDuration=zt(t.serviceCosts[a]??0,c),t.serviceDistance=Kt(t.serviceCosts[n]??0,y),v(t.serviceCosts)),(0,m.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=zt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Kt(t.cumulativeCosts[n]??0,y),v(t.cumulativeCosts)),(0,m.pC)(t.violations)&&(t.lateDuration=zt(t.violations[a]??0,c),v(t.violations)),(0,m.pC)(t.wait)&&(t.waitDuration=zt(t.wait[a]??0,c),v(t.wait))}(T,l,v),T}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:n}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",n)}_getNetworkFeatures(e,t,i,r){const o=(qt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,m.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,c=s.drawingInfo.renderer,{features:y}=d,b=c&&(0,l.a)(c),h=y.map((e=>{const r=a.Z.fromJSON(e),o=i(r);return o.symbol??(o.symbol=b?.getSymbol(r)??this._getNetworkSymbol(t)),o.popupTemplate??(o.popupTemplate=u&&n.Z.fromJSON(u)),o}));return r&&h.some((e=>!e.symbol))&&r(h),new p.Z(h)}_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,i){if((0,m.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await je(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,m.Wi)(this.defaultSymbols.stops))return;if(e.every((e=>(0,m.pC)(e.symbol))))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if((0,m.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const n=e.map((e=>e.sequence)).filter((e=>(0,m.pC)(e))),l=Math.min(...n),p=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==p?"ok"===n.status||"not-located-on-closest"===n.status?"waypoint"!==n.locationType?"break"!==n.locationType?n.symbol=r:n.symbol=a:n.symbol=s:n.symbol=o:n.symbol=i:n.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops.map((e=>kt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new ei(t),r=new Qt(e.polygonBarriers?.map((e=>{const t=ht.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new Xt(e.polylineBarriers?.map((e=>{const t=gt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new Yt(e.pointBarriers?.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=_t.fromJSON(e.routeResults[0].route.toJSON());a.symbol=this.defaultSymbols.routeInfo;const n=new $t(e.routeResults[0].directionPoints?.features.map((e=>{const t=pt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new Ht(e.routeResults[0].directionLines?.features.map((e=>{const t=at.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",at.fields,at.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",pt.fields,pt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){return(0,m.Wi)(e)||!e.length?null:{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:(0,m.pC)(t)?t.toJSON():Vt(i)}},extent:this.fullExtent.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,name:s,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",ct.fields,ct.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",ht.fields,ht.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",gt.fields,gt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures((0,m.pC)(this.routeInfo)?new p.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",_t.fields,_t.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",kt.fields,kt.popupInfo,"Stops","Stops");if((0,m.Wi)(e))return null;const{stops:t}=this.defaultSymbols,i=(0,m.pC)(t)&&(0,m.pC)(t.first)&&t.first.toJSON(),r=(0,m.pC)(t)&&(0,m.pC)(t.middle)&&t.middle.toJSON(),o=(0,m.pC)(t)&&(0,m.pC)(t.last)&&t.last.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ii.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ii.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ii.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:Z})],ii.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ii.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ii.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ii.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ii.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],ii.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ii.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ii.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ii.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ii.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ii.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ct)})],ii.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ht)})],ii.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(gt)})],ii.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ii.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:ze.Z})],ii.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ii.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(kt)})],ii.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ii.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],ii.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ii.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],ii.prototype,"url",null),ii=(0,r._)([(0,S.j)("esri.layers.RouteLayer")],ii);const ri=ii},16859:(e,t,i)=>{i.d(t,{I:()=>T});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),n=i(20102),l=i(92604),p=i(70586),u=i(95330),d=i(17452),c=i(5600),m=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=l.Z.getLogger("esri.layers.mixins.PortalLayer"),T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||g.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,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,(0,p.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=o.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=h.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(r))return n.user;const l=`${r}/community/self`,u=(0,p.pC)(e)?e.signal:null,c=await(0,a.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("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,r._)([(0,c.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>n,ck:()=>l,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function l(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||n(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>n,QW:()=>l,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),p=i(22974),u=i(70586),d=i(5600),c=(i(75215),i(71715)),m=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends l.wq{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){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),n=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!n&&(s.geometry.spatialReference=i);const l=o.aggregateGeometries,p=s.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],r=l[e]?.spatialReference;(0,u.pC)(t)&&!r&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,n=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&n(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,n=e.length;a<n;a++){const n=e[a];if(a>0){const e=t(n[0]),a=i(n[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(n[0]),o=i(n[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,m.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function n(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=n(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8157,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},50445:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ri});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),n=i(51773),l=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(30687),i(91423)),p=i(46791),u=i(20102),d=i(3920),c=i(92604),m=i(70586),y=i(16453),b=i(78286),h=i(95330),f=i(17445),v=i(67900),g=i(17452),T=i(5600),C=(i(67676),i(80442),i(75215)),w=i(71715),S=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),I=i(8744),D=i(87085),j=i(71612),F=i(38009),B=i(16859),x=i(72965),E=i(66677),L=i(78223),M=i(96674),P=i(77987);let J=class extends M.wq{constructor(e){super(e),this.break=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new P.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new P.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new P.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new P.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"break",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"first",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"unlocated",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"last",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"middle",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"waypoint",void 0),J=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],J);const R=J;var k=i(4095),U=i(20256);let W=class extends M.wq{constructor(e){super(e),this.directionLines=new k.Z({color:[0,122,194],width:6}),this.directionPoints=new P.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new P.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new U.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new k.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new k.Z({width:8,color:[20,89,127]}),this.stops=new R}};(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],W.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({type:R})],W.prototype,"stops",void 0),W=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],W);const Z=W;var V=i(65587),q=i(15235),G=i(14661),z=i(3172),K=i(11282),H=i(36030),$=i(35454);const Y=(0,$.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),Q=(0,$.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),X=(0,$.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),ee=(0,$.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,$.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,$.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,$.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,$.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,$.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,$.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,$.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,$.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,$.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,$.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,$.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),pe=(0,$.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,$.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,$.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),ce=(0,$.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),me=(0,$.w)()({Kilometers:"kilometers",Miles:"miles"},{ignoreUnknown:!1}),ye=(0,$.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,$.w)()({Kilometers:"kilometers",Miles:"miles",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,$.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,$.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,$.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,$.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"});let Te=class extends M.wq{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,r._)([(0,T.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ge)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Te);const Ce=Te;let we=class extends M.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,T.Cb)({type:Number})],we.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[Ce]})],we.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],we.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"state",void 0),we=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],we);const Se=we;var _e=i(2368);let Ne=class extends((0,_e.J)(M.wq)){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}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,m.Wi)(i)?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],Ne.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"description",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ne.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"id",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ne.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],Ne.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Ne.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Ne.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],Ne.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(Y)],Ne.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ne.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(re)],Ne.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(ie)],Ne.prototype,"uturnAtJunctions",void 0),Ne=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],Ne);const Oe=Ne;let Ae=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=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(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:Se})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],Ae);const Ie=Ae;function De(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function je(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,K.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,K.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,K.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,g.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,b.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,K.en)(o),p=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",u=(0,K.lA)({f:"json",serviceName:p},t),d=(0,g.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,u),m=[];let y=null;if(c?.data?.results?.length){const e=c.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&&(y=t.value)}return{supportedTravelModes:m,defaultTravelMode:y}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,Ie.fromJSON(o)}var Fe=i(82526);function Be(e,t){if((0,m.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function xe(e,t,i){if(!(0,m.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ee(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Me(e,t){return(0,m.Wi)(e)||(0,m.Wi)(t)?null:Math.round((e-t)/6e4)}function Pe(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&(i.accumulateAttributeNames=t.accumulateAttributeNames.join()),i.attributeParameterValues&&(i.attributeParameterValues=JSON.stringify(t.attributeParameterValues)),i.barriers&&(i.barriers=JSON.stringify(t.barriers)),i.outSR&&(i.outSR=t.outSR.wkid),i.overrides&&(i.overrides=JSON.stringify(t.overrides)),i.polygonBarriers&&(i.polygonBarriers=JSON.stringify(t.polygonBarriers)),i.polylineBarriers&&(i.polylineBarriers=JSON.stringify(t.polylineBarriers)),i.restrictionAttributeNames&&(i.restrictionAttributeNames=t.restrictionAttributeNames.join()),i.stops&&(i.stops=JSON.stringify(t.stops)),i.travelMode&&(i.travelMode=JSON.stringify(t.travelMode)),i}var Je=i(74889);const Re=new $.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:Re.read,write:Re.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],ke);const Ue=ke,We=new $.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ze=class extends Ue{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:We.read,write:We.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],Ze);const Ve=Ze;let qe=class extends a.Z{};(0,r._)([(0,T.Cb)()],qe.prototype,"events",void 0),(0,r._)([(0,T.Cb)()],qe.prototype,"strings",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],qe);const Ge=qe;var ze=i(82971),Ke=i(58901),He=i(13473);let $e=class extends Je.default{constructor(e){super(e),this.extent=null,this.features=null,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 i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&ze.Z.fromJSON(i);return e.map((e=>{const t=this._decompressGeometry(e.compressedGeometry),i=new Ke.Z({...t,spatialReference:r}),o=e.events?.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:o,y:s,z:a},strings:n}=e;return new Ge({geometry:new He.Z({x:o,y:s,z:a,hasZ:void 0!==a,spatialReference:r}),attributes:{ETA:i,arriveTimeUTC:t},strings:n})}))??[];return new Ge({attributes:e.attributes,events:o,geometry:i,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,m.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,n,l,p,u,d,c,m,y=0,b=0,h=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[y],32)){y=2;const e=parseInt(u[y],32);y++,d=parseInt(u[y],32),y++,1&e&&(b=u.indexOf("|")+1,c=parseInt(u[b],32),b++),2&e&&(h=u.indexOf("|",b)+1,m=parseInt(u[h],32),h++)}else d=parseInt(u[y],32),y++;for(;y<u.length&&"|"!==u[y];){a=parseInt(u[y],32)+t,y++,t=a,n=parseInt(u[y],32)+i,y++,i=n;const e=[a/d,n/d];b&&(p=parseInt(u[b],32)+r,b++,r=p,e.push(p/c)),h&&(l=parseInt(u[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new Ke.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ke.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],$e.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],$e.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],$e.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],$e.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],$e.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],$e.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],$e.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],$e.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],$e.prototype,"totalTime",void 0),$e=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],$e);const Ye=$e;let Qe=class extends M.wq{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,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:Ye,json:{write:!0}})],Qe.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],Qe.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Qe.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],Qe.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedTurns",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],Qe);const Xe=Qe;function et(e){return e&&Je.default.fromJSON(e).features.map((e=>e))}let tt=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return et(t.barriers)}readPolylineBarriers(e){return et(e)}readPolygonBarriers(e){return et(e)}};(0,r._)([(0,T.Cb)({type:[Ve]})],tt.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],tt.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],tt.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],tt.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[Xe]})],tt.prototype,"routeResults",void 0),tt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],tt);const it=tt;function rt(e){return"esri.rest.support.FeatureSet"===e?.declaredClass}var ot;let st=ot=class extends((0,_e.J)(M.wq)){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 fromGraphic(e){return new ot({directionLineType:de.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,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),DirectionLineType:(0,m.pC)(this.directionLineType)?de.toJSON(this.directionLineType):null,DirectionPointID:(0,m.Wg)(this.directionPointId),Meters:(0,m.Wg)(this.distance),Minutes:(0,m.Wg)(this.duration)};return(0,m.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,m.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};st.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],st.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],st.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],st.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],st.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],st.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],st.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],st.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],st.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],st.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],st.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],st.prototype,"toLevel",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],st.prototype,"type",void 0),st=ot=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],st);const at=st;var nt;let lt=nt=class extends((0,_e.J)(M.wq)){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(0,m.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new nt({alternateName:e.attributes.AlternateName??null,arrivalTime:(0,m.pC)(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:ue.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,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:(0,m.Wg)(this.objectId),DirectionPointType:(0,m.pC)(this.directionPointType)?ue.toJSON(this.directionPointType):null,Sequence:(0,m.Wg)(this.sequence),StopID:this.stopId};return(0,m.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,m.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,m.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,m.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,m.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,m.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,m.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,m.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,m.pC)(this.level)&&(e.Level=this.level),(0,m.pC)(this.name)&&(e.Name=this.name),(0,m.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,m.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,m.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};lt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],lt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],lt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],lt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],lt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],lt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],lt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],lt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],lt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],lt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:He.Z})],lt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],lt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],lt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],lt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],lt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],lt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],lt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],lt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],lt.prototype,"type",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"voiceInstruction",void 0),lt=nt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],lt);const pt=lt;var ut;let dt=ut=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new ut({addedCost:e.attributes.AddedCost??null,barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,m.pC)(e.attributes.FullEdge)?pe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,FullEdge:(0,m.pC)(this.fullEdge)?pe.toJSON(this.fullEdge):null,Name:this.name,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],dt.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],dt.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],dt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],dt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],dt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],dt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],dt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:pe.apiValues,json:{name:"attributes.FullEdge",read:{reader:pe.read},write:{writer:pe.write}}})],dt.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],dt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],dt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],dt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],dt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],dt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],dt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],dt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],dt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=ut=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],dt);const ct=dt;var mt,yt=i(38913);let bt=mt=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new mt({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};bt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],bt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],bt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],bt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],bt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],bt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:yt.Z,json:{write:!0}})],bt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],bt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],bt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],bt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],bt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],bt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],bt.prototype,"type",void 0),bt=mt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],bt);const ht=bt;var ft;let vt=ft=class extends((0,_e.J)(M.wq)){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 Be(t.attributes,"Attr_")}static fromGraphic(e){return new ft({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};vt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],vt.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],vt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],vt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],vt.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:Ke.Z,json:{write:!0}})],vt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],vt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],vt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],vt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],vt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],vt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],vt.prototype,"type",void 0),vt=ft=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],vt);const gt=vt;let Tt=class extends M.wq{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(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Tt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Tt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Tt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Tt.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Tt.prototype,"travelMode",void 0),Tt=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],Tt);const Ct=Tt;var wt;let St=wt=class extends((0,_e.J)(M.wq)){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(0,m.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Me(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,m.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Me(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Be(t.attributes,"Total_")}readTotalViolations(e,t){return Be(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Be(t.attributes,"TotalWait_")}static fromGraphic(e){return new wt({analysisSettings:(0,m.pC)(e.attributes.AnalysisSettings)?Ct.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,m.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:(0,m.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,m.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:(0,m.pC)(e.attributes.TotalCosts)?Ee(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:(0,m.Wg)(this.objectId),AnalysisSettings:(0,m.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,m.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,m.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,m.Wg)(this.name),StartTime:(0,m.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,m.pC)(this.totalCosts)?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,m.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,m.Wg)(this.popupTemplate)})}};St.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],St.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],St.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],St.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],St.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],St.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],St.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],St.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],St.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],St.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],St.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],St.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],St.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],St.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],St.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],St.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],St.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],St.prototype,"type",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"version",void 0),St=wt=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],St);const _t=St,Nt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ot=i(33955);let At=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],At.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:Ot.im,write:!0}})],At.prototype,"geometry",void 0),(0,r._)([(0,H.J)(ve)],At.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],At.prototype,"name",void 0),(0,r._)([(0,H.J)(fe,{name:"spatialRel"})],At.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],At.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],At.prototype,"where",void 0),At=(0,r._)([(0,S.j)("esri.rest.support.DataLayer")],At);const It=At;var Dt;let jt=Dt=class extends Je.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Dt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],jt.prototype,"doNotLocateOnRestrictedElements",void 0),jt=Dt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],jt);const Ft=jt;let Bt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Bt.prototype,"url",void 0),Bt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],Bt);const xt=Bt;var Et;function Lt(e,t,i){(0,m.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Mt=Et=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=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,C.TJ)(Et,e)}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Lt(e,t,i)}writePolygonBarrier(e,t,i){Lt(e,t,i)}writePolylineBarrier(e,t,i){Lt(e,t,i)}readRestrictionAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,m.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,m.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?It.fromJSON(e):function(e){return e&&"url"in e}(e)?xt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Ft.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Lt(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Mt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Mt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Mt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(Nt)],Mt.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Mt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Mt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(ee)],Mt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(ce)],Mt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Mt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],Mt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Mt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(Y)],Mt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(te)],Mt.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{name:"outSR",write:!0}})],Mt.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Mt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Mt.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Mt.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Mt.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Mt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Mt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Mt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(ie)],Mt.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Mt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Mt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Mt.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Mt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Mt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Mt.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Mt.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"useTimeWindows",void 0),Mt=Et=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Mt);const Pt=Mt;var Jt;let Rt=Jt=class extends((0,_e.J)(M.wq)){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 Me(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Be(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Me(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Be(t.attributes,"Attr_")}writeServiceCosts(e,t){xe(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Be(t.attributes,"Violation_")}readWait(e,t){return Be(t.attributes,"Wait_")}static fromGraphic(e){return new Jt({arriveCurbApproach:(0,m.pC)(e.attributes.ArrivalCurbApproach)?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,m.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,m.pC)(e.attributes.CumulativeCosts)?Ee(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,m.pC)(e.attributes.DepartureCurbApproach)?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,m.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:(0,m.pC)(e.attributes.LocationType)?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:(0,m.pC)(e.attributes.ServiceCosts)?Ee(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:(0,m.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:(0,m.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={__OBJECTID:(0,m.Wg)(this.objectId),ArrivalCurbApproach:(0,m.pC)(this.arriveCurbApproach)?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,m.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,m.pC)(this.cumulativeCosts)?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,m.pC)(this.departCurbApproach)?oe.toJSON(this.departCurbApproach):null,DepartureTime:(0,m.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,m.pC)(this.locationType)?se.toJSON(this.locationType):null,Name:(0,m.Wg)(this.name),RouteName:(0,m.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,m.pC)(this.serviceCosts)?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null,TimeWindowEnd:(0,m.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:(0,m.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Rt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Rt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],Rt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Rt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Rt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Rt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Rt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Rt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],Rt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],Rt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Rt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Rt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Rt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],Rt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],Rt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],Rt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Rt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.NavLatency"}}})],Rt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Rt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],Rt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Rt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],Rt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Rt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Rt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],Rt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Rt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],Rt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],Rt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Rt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],Rt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Rt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],Rt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],Rt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Rt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Rt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Rt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Rt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],Rt.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Rt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Rt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],Rt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Rt.prototype,"readWait",null),Rt=Jt=(0,r._)([(0,S.j)("esri.rest.support.Stop")],Rt);const kt=Rt;var Ut=i(65091);function Wt(e){return e.length?e:null}function Zt(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function Vt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Vt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Vt("esriGeometryPolyline")}}}function qt(e){return"layers"in e}async function Gt(e){const t=ze.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function zt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Kt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}const Ht=p.Z.ofType(at),$t=p.Z.ofType(pt),Yt=p.Z.ofType(ct),Qt=p.Z.ofType(ht),Xt=p.Z.ofType(gt),ei=p.Z.ofType(kt),ti=c.Z.getLogger("esri.layers.RouteLayer");let ii=class extends((0,j.h)((0,x.M)((0,F.q)((0,B.I)((0,y.R)((0,d.p)(D.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new Z,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Yt,this.polygonBarriers=new Qt,this.polylineBarriers=new Xt,this.routeInfo=null,this.spatialReference=ze.Z.WGS84,this.stops=new ei,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.own([(0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t})])}writeFeatureCollectionWebmap(e,t,i,r){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)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>at.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>pt.fromGraphic(e)))}get fullExtent(){if((0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:ze.Z.WGS84}),t=this.stops.filter((e=>(0,m.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,m.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Ut.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.maxScale)))?.layerDefinition.maxScale??0}readMinScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.minScale)))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>ct.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>ht.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>gt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>_t.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){const i=qt(t)?t.layers:t.featureCollection.layers;if(!i.length)return ze.Z.WGS84;const{layerDefinition:r}=i[0],o=r.spatialReference??r.extent.spatialReference??I.Zn;return ze.Z.fromJSON(o)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>kt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,ti)):this._set("url",o.Z.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(){(0,m.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,m.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,m.pC)(this.routeInfo)&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Gt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=q.default.from(e).clone();i.extent??(i.extent=await Gt(this.fullExtent)),i.id=null,i.portal??(i.portal=V.Z.getDefault()),i.title??(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",G.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=t?.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Wt(this.pointBarriers),o=e?.polylineBarriers??Wt(this.polylineBarriers),s=e?.polygonBarriers??Wt(this.polygonBarriers);if((0,m.Wi)(i))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.Z.isCollection(i)&&i.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=Zt(l),c=e?.travelMode??d,y=(0,m.yl)(e?.accumulateAttributes,[]);(0,m.pC)(c)&&(y.push(c.distanceAttributeName),c.timeAttributeName&&y.push(c.timeAttributeName));const b={startTime:new Date},f={accumulateAttributes:y,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},v=e?Pt.from(e):new Pt;for(const e in b)null==v[e]&&(v[e]=b[e]);let g;v.set(f);try{g=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,K.en)(e),{path:l}=n;rt(t.stops)&&De(t.stops.features,o,"stops.features",s),rt(t.pointBarriers)&&De(t.pointBarriers.features,o,"pointBarriers.features",s),rt(t.polylineBarriers)&&De(t.polylineBarriers.features,o,"polylineBarriers.features",s),rt(t.polygonBarriers)&&De(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Fe.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if((0,m.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await je(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...n.query,...Pe(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:c}=await(0,z.default)(d,u);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:p,traversedEdges:u,traversedJunctions:d,traversedTurns:c}=e,y=e=>{const t=h.find((t=>t.routeName===e));if((0,m.pC)(t))return t;const i={routeId:h.length+1,routeName:e};return h.push(i),i},b=e=>{const t=h.find((t=>t.routeId===e));if((0,m.pC)(t))return t;const i={routeId:e,routeName:null};return h.push(i),i},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference;const i=e.attributes.Name,r=t+1;h.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=p?.features.every((e=>(0,m.Wi)(e.attributes.RouteName)))&&h.length>0?h[0].routeName:null;return p?.features.forEach((e=>{var t;e.geometry&&((t=e.geometry).spatialReference??(t.spatialReference=p.spatialReference));const i=f??e.attributes.RouteName,r=y(i);r.stops??(r.stops=[]),r.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=b(t),{geometryType:o,spatialReference:s}=i;r.directionLines??(r.directionLines={features:[],geometryType:o,spatialReference:s}),r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??(i.directionPoints={features:[],geometryType:o,spatialReference:s}),i.directionPoints.features.push(e)})),u?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=u;i.traversedEdges??(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t);i.traversedTurns??(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),it.fromJSON({routeResults:h,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(c)}(n,v,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const T=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=(0,m.yl)(T.routeInfo.name,"Route")),function(e,t,i){const r=t.networkDataset.networkAttributes.filter((e=>"cost"===e.usageType)),o=Zt(t),s=i.travelMode??o;if((0,m.Wi)(s))return void ti.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:a,distanceAttributeName:n}=s,l=r.find((e=>e.name===a)),p=r.find((e=>e.name===n)),d=(0,m.Wg)(i.travelMode)?.impedanceAttributeName??(0,m.Wg)(i.impedanceAttribute)??t.impedance,c=X.fromJSON(l?.units),y=Q.fromJSON(p?.units);if(!c||!y)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const b=i.directionsLanguage??t.directionsLanguage,h=(0,m.Wg)(i.accumulateAttributes)??t.accumulateAttributeNames??[],f=new Set(r.filter((({name:e})=>e===a||e===n||e===d||h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)(0,m.pC)(t.costs)&&(t.addedCost=t.costs[d]??0,v(t.costs));for(const t of e.polygonBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));for(const t of e.polylineBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_}=i;g.analysisSettings=new Ct({accumulateAttributes:h,directionsLanguage:b,findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_,travelMode:s}),g.totalDuration=zt(g.totalCosts[a]??0,c),g.totalDistance=Kt(g.totalCosts[n]??0,y),g.totalLateDuration=zt(g.totalViolations[a]??0,c),g.totalWaitDuration=zt(g.totalWait[a]??0,c),(0,m.pC)(g.totalCosts)&&v(g.totalCosts),(0,m.pC)(g.totalViolations)&&v(g.totalViolations),(0,m.pC)(g.totalWait)&&v(g.totalWait);for(const t of e.stops)(0,m.pC)(t.serviceCosts)&&(t.serviceDuration=zt(t.serviceCosts[a]??0,c),t.serviceDistance=Kt(t.serviceCosts[n]??0,y),v(t.serviceCosts)),(0,m.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=zt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Kt(t.cumulativeCosts[n]??0,y),v(t.cumulativeCosts)),(0,m.pC)(t.violations)&&(t.lateDuration=zt(t.violations[a]??0,c),v(t.violations)),(0,m.pC)(t.wait)&&(t.waitDuration=zt(t.wait[a]??0,c),v(t.wait))}(T,l,v),T}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:n}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",n)}_getNetworkFeatures(e,t,i,r){const o=(qt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,m.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,c=s.drawingInfo.renderer,{features:y}=d,b=c&&(0,l.a)(c),h=y.map((e=>{const r=a.Z.fromJSON(e),o=i(r);return o.symbol??(o.symbol=b?.getSymbol(r)??this._getNetworkSymbol(t)),o.popupTemplate??(o.popupTemplate=u&&n.Z.fromJSON(u)),o}));return r&&h.some((e=>!e.symbol))&&r(h),new p.Z(h)}_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,i){if((0,m.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await je(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,m.Wi)(this.defaultSymbols.stops))return;if(e.every((e=>(0,m.pC)(e.symbol))))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if((0,m.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const n=e.map((e=>e.sequence)).filter((e=>(0,m.pC)(e))),l=Math.min(...n),p=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==p?"ok"===n.status||"not-located-on-closest"===n.status?"waypoint"!==n.locationType?"break"!==n.locationType?n.symbol=r:n.symbol=a:n.symbol=s:n.symbol=o:n.symbol=i:n.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops.map((e=>kt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new ei(t),r=new Qt(e.polygonBarriers?.map((e=>{const t=ht.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new Xt(e.polylineBarriers?.map((e=>{const t=gt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new Yt(e.pointBarriers?.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=_t.fromJSON(e.routeResults[0].route.toJSON());a.symbol=this.defaultSymbols.routeInfo;const n=new $t(e.routeResults[0].directionPoints?.features.map((e=>{const t=pt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new Ht(e.routeResults[0].directionLines?.features.map((e=>{const t=at.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",at.fields,at.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",pt.fields,pt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){return(0,m.Wi)(e)||!e.length?null:{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:(0,m.pC)(t)?t.toJSON():Vt(i)}},extent:this.fullExtent.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,name:s,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",ct.fields,ct.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",ht.fields,ht.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",gt.fields,gt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures((0,m.pC)(this.routeInfo)?new p.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",_t.fields,_t.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",kt.fields,kt.popupInfo,"Stops","Stops");if((0,m.Wi)(e))return null;const{stops:t}=this.defaultSymbols,i=(0,m.pC)(t)&&(0,m.pC)(t.first)&&t.first.toJSON(),r=(0,m.pC)(t)&&(0,m.pC)(t.middle)&&t.middle.toJSON(),o=(0,m.pC)(t)&&(0,m.pC)(t.last)&&t.last.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ii.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ii.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ii.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:Z})],ii.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ii.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ii.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ii.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ii.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],ii.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ii.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ii.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ii.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ii.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ii.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ct)})],ii.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ht)})],ii.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(gt)})],ii.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ii.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ii.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ii.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:ze.Z})],ii.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ii.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(kt)})],ii.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ii.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],ii.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ii.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],ii.prototype,"url",null),ii=(0,r._)([(0,S.j)("esri.layers.RouteLayer")],ii);const ri=ii},16859:(e,t,i)=>{i.d(t,{I:()=>T});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),n=i(20102),l=i(92604),p=i(70586),u=i(95330),d=i(17452),c=i(5600),m=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=l.Z.getLogger("esri.layers.mixins.PortalLayer"),T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||g.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,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,(0,p.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=o.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=h.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(r))return n.user;const l=`${r}/community/self`,u=(0,p.pC)(e)?e.signal:null,c=await(0,a.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("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,r._)([(0,c.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>n,ck:()=>l,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function l(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||n(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>n,QW:()=>l,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),p=i(22974),u=i(70586),d=i(5600),c=(i(75215),i(71715)),m=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends l.wq{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){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),n=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!n&&(s.geometry.spatialReference=i);const l=o.aggregateGeometries,p=s.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],r=l[e]?.spatialReference;(0,u.pC)(t)&&!r&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,n=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&n(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,n=e.length;a<n;a++){const n=e[a];if(a>0){const e=t(n[0]),a=i(n[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(n[0]),o=i(n[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,m.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function n(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=n(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);