@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230522

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 (173) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  5. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  6. package/arcade/functions/featuresetbase.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 17f313e548281bb5db3e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
  13. package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
  14. package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
  17. package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 4670b17ae2ed3c13d344.js} +1 -1
  18. package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
  19. package/assets/esri/core/workers/chunks/52575f021a14dd961de8.js +1 -0
  20. package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
  22. package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
  23. package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
  24. package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
  25. package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
  26. package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
  27. package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
  28. package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
  29. package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
  30. package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
  34. package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
  35. package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
  37. package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
  38. package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4d5f71d84c85f45c97ea.js → ed6f6e539a915ba9e64d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
  41. package/assets/esri/themes/base/_core.scss +2 -0
  42. package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
  43. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
  44. package/assets/esri/themes/dark/main.css +1 -1
  45. package/assets/esri/themes/light/main.css +1 -1
  46. package/assets/esri/themes/light/view.css +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  69. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  70. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  71. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  86. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
  87. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
  88. package/chunks/mat4.js +1 -1
  89. package/core/accessorSupport/write.js +1 -1
  90. package/core/fontUtils.js +1 -1
  91. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  92. package/geometry/Mesh.js +1 -1
  93. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
  94. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
  95. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
  96. package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
  97. package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
  98. package/geometry/support/MeshLocalVertexSpace.js +5 -0
  99. package/geometry/support/MeshTransform.d.ts +4 -0
  100. package/geometry/support/MeshTransform.js +1 -1
  101. package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
  102. package/geometry/support/meshUtils/centerAt.js +1 -1
  103. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  104. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  105. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  106. package/geometry/support/meshUtils/georeference.js +1 -1
  107. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  108. package/geometry/support/meshUtils/merge.js +1 -1
  109. package/geometry/support/meshUtils/offset.js +1 -1
  110. package/geometry/support/meshUtils/primitives.js +1 -1
  111. package/geometry/support/meshUtils/rotate.js +1 -1
  112. package/geometry/support/meshUtils/scale.js +1 -1
  113. package/interfaces.d.ts +227 -1
  114. package/layers/VoxelWasmPerSceneView.js +1 -1
  115. package/layers/graphics/data/attributeSupport.js +1 -1
  116. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  117. package/networks/support/TopologyValidationJobInfo.js +1 -1
  118. package/package.json +1 -1
  119. package/popup/FieldInfo.js +1 -1
  120. package/portal/Portal.js +1 -1
  121. package/rest/support/FeatureSet.js +1 -1
  122. package/rest/support/meshFeatureSet.js +1 -1
  123. package/support/revision.js +1 -1
  124. package/symbols/cim/cimAnalyzer.js +1 -1
  125. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  126. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  127. package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
  128. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  129. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  130. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  131. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  135. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  136. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  137. package/views/3d/state/utils/navigationUtils.js +1 -1
  138. package/views/3d/support/DisplayQualityProfile.js +1 -1
  139. package/views/3d/support/QualitySettings.js +1 -1
  140. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  141. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  142. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  143. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  144. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  145. package/views/interactive/dragEventPipeline.js +1 -1
  146. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  147. package/widgets/Editor/Edits.js +1 -1
  148. package/widgets/Editor/Upload.js +1 -1
  149. package/widgets/Editor/workflowUtils.js +1 -1
  150. package/widgets/Feature/support/featureUtils.js +1 -1
  151. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  152. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
  153. package/widgets/UtilityNetworkValidateTopology.js +5 -0
  154. package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
  155. package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
  156. package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
  157. package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
  158. package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
  159. package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
  160. package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
  161. package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
  162. package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
  163. package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
  164. package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
  165. package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
  166. package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
  167. package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
  168. package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
  169. package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
  170. package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
  171. package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
  172. package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
  173. package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[261,5732],{5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},16453:(e,t,i)=>{i.d(t,{R:()=>g,w:()=>T});var r=i(43697),o=i(92036),s=i(70586),a=i(41103),n=i(22974),l=i(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,i=this._originStores[l.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,n.d9)(e),l.s3.DEFAULTS)}));for(let i=l.s3.SERVICE;i<l.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,o)=>{e&&e.has(o)||t.set(o,(0,n.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=l.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,s.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=l.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),o=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),o!==r}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=i(50549),d=i(1153),c=i(52011);const m=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,s.j0)((0,d.vw)(this)),i=t.store,r=new u;t.store=r,(0,a.M)(t,i,r)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const i=y(this),r=(0,l.M9)(t);if("string"==typeof e)return i.get(e,r);const o={};return e.forEach((e=>{o[e]=i.get(e,r)})),o}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const i=y(this),r=(0,l.M9)(t),o=(0,d.vw)(this);let s;s="string"==typeof e?"*"===e?i.keys(r):[e]:e,s.forEach((e=>{o.invalidate(e),i.revert(e,r),o.commit(e)}))}};return t=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,d.vw)(e).store}let b=class extends(m(o.Z)){};b=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],b);var h=i(76169);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e,t){return(0,h.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,d.vw)(this).setAtOrigin(e,t,(0,l.M9)(i))}removeOrigin(e){const t=v(this),i=(0,l.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),l.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,l.M9)(t),o=this.get(e);for(let t=r+1;t<l.kk;++t)i.delete(e,t);i.set(e,o,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,c.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,d.vw)(e).store}const g=e=>{let t=class extends(f(m(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(g(o.Z)){};T=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],T)},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})},16306:(e,t,i)=>{i.d(t,{aX:()=>w});var r=i(68773),o=i(20102),s=i(92604),a=i(38913),n=i(58901),l=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(81271);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:o.wkid??JSON.stringify(o),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:n}=await(0,d.default)(r.path+"/simplify",a);var l;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(n.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof n.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,l.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],a=e[r+1][0],n=e[r+1][1],l=Math.sqrt((a-o)*(a-o)+(n-s)*(n-s)),u=(n-s)/l,p=(a-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=p*r+o,n=u*r+s;i.push([a,n])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+o,a=u*e+s;i.push([r,a])}i.push([a,n])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:r,spatialReference:e.spatialReference}):new n.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,l.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function S(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=(0,l.x3)(s);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.XZ)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(f(e))for(const t of(0,l.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&h.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,y,f,v,C,_,N,O,A=0;const I=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,_=f?102100:4326,v=l.UZ[_].maxX,C=l.UZ[_].minX,N=l.UZ[_].plus180Line,O=l.UZ[_].minus180Line),y)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(T(t.clone(),v,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,C))),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);D.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,l.XZ)(e.xmin,C)*(2*v);let r=0===i?t.clone():(0,l.Sy)(t.clone(),i);e.offset(i,0),e.intersects(N)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),I.push(r),D.push("cut")):e.intersects(O)&&e.xmin!==C?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),I.push(r),D.push("cut")):D.push(r)}else D.push(t.clone());else D.push(t);else D.push(t);let x=(0,l.XZ)(A,v),F=-90;const j=x,L=new n.Z;for(;x>0;){const e=360*x-180;L.addPath([[e,F],[e,-1*F]]),F*=-1,x--}if(I.length>0&&j>0){const t=S(I,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},n=await(0,d.default)(o.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=n.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,I,L,i)),r=[],s=[];for(let i=0;i<D.length;i++){const o=D[i];if("cut"!==o)s.push(o);else{const o=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&o.rings.length>=a.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const a=await b(o,r,i),n=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?n.push(t):n.push(f?(0,p.$)(a.shift()):a.shift())}return n}const M=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)M.push(t);else{const e=I.shift();M.push(!0===f?(0,p.$)(e):e)}}return M}},73913:(e,t,i)=>{i.d(t,{Sy:()=>l,UZ:()=>a,XZ:()=>n,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function n(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});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(81571),i(91423)),u=i(46791),p=i(20102),d=i(3920),c=i(92604),m=i(16453),y=i(78286),b=i(95330),h=i(17445),f=i(67900),v=i(81271),g=i(5600),T=i(75215),S=i(67676),w=(i(80442),i(71715)),C=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),I=i(8744),D=i(87085),x=i(71612),F=i(38009),j=i(16859),L=i(72965),M=i(66677),B=i(9790),E=i(96674),R=i(77987);let P=class extends E.wq{constructor(e){super(e),this.break=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new R.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new R.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new R.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new R.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"break",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"first",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"unlocated",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"last",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"middle",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"waypoint",void 0),P=(0,r._)([(0,C.j)("esri.layers.support.RouteStopSymbols")],P);const U=P;var J=i(4095),k=i(20256);let Z=class extends E.wq{constructor(e){super(e),this.directionLines=new J.Z({color:[0,122,194],width:6}),this.directionPoints=new R.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new R.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new k.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new J.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new J.Z({width:8,color:[20,89,127]}),this.stops=new U}};(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,g.Cb)({type:U})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,C.j)("esri.layers.support.RouteSymbols")],Z);const W=Z;var G=i(48522),V=i(15235),q=i(14661),z=i(3172),H=i(11282),K=i(36030),$=i(35454);const X=(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"}),Y=((0,$.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(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",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),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}),ue=(0,$.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),pe=(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",Meters:"meters"},{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",Meters:"meters",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"}),Te=(0,$.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Se=class extends E.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,g.Cb)({type:String})],Se.prototype,"dataType",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Se.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String]})],Se.prototype,"parameterNames",void 0),(0,r._)([(0,g.Cb)({type:String})],Se.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Se.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String})],Se.prototype,"trafficSupport",void 0),(0,r._)([(0,K.J)(Y)],Se.prototype,"units",void 0),(0,r._)([(0,K.J)(ge)],Se.prototype,"usageType",void 0),Se=(0,r._)([(0,C.j)("esri.rest.support.NetworkAttribute")],Se);const we=Se;let Ce=class extends E.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,g.Cb)({type:Number})],Ce.prototype,"buildTime",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[we]})],Ce.prototype,"networkAttributes",void 0),(0,r._)([(0,g.Cb)()],Ce.prototype,"networkSources",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"state",void 0),Ce=(0,r._)([(0,C.j)("esri.rest.support.NetworkDataset")],Ce);const _e=Ce;var Ne=i(2368);let Oe=class extends((0,Ne.J)(E.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}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[Object],json:{write:!0}})],Oe.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"description",void 0),(0,r._)([(0,K.J)(me,{ignoreUnknown:!1})],Oe.prototype,"distanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],Oe.prototype,"readId",null),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Oe.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{write:!0}})],Oe.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Oe.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Oe.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,g.Cb)({type:Number,json:{write:{allowNull:!0}}})],Oe.prototype,"simplificationTolerance",void 0),(0,r._)([(0,K.J)(X)],Oe.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Oe.prototype,"timeAttributeName",void 0),(0,r._)([(0,K.J)(re)],Oe.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Oe.prototype,"useHierarchy",void 0),(0,r._)([(0,K.J)(ie)],Oe.prototype,"uturnAtJunctions",void 0),Oe=(0,r._)([(0,C.j)("esri.rest.support.TravelMode")],Oe);const Ae=Oe;let Ie=class extends E.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Ae.fromJSON(i):null}};(0,r._)([(0,g.Cb)()],Ie.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ie.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ie.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)()],Ie.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"currentVersion",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ie.prototype,"readDefaultTravelMode",null),(0,r._)([(0,g.Cb)()],Ie.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Q)],Ie.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Ie.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"hasZ",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Ie.prototype,"impedance",void 0),(0,r._)([(0,g.Cb)({type:_e})],Ie.prototype,"networkDataset",void 0),(0,r._)([(0,g.Cb)({type:[Ae]})],Ie.prototype,"supportedTravelModes",void 0),Ie=(0,r._)([(0,C.j)("esri.rest.support.NetworkServiceDescription")],Ie);const De=Ie,xe=c.Z.getLogger("esri.rest.networkService");function Fe(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 p.Z("network-service:missing-url","Url to Network service is missing");const r=(0,H.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,H.lA)({f:"json",token:t},i),o=(0,v.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new p.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,H.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,v.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,y.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,H.en)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,H.lA)({f:"json",serviceName:u},t),d=(0,v.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,p),m=[];let b=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&&(b=t.value)}return{supportedTravelModes:m,defaultTravelMode:b}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,De.fromJSON(o)}var Le=i(16306);function Me(e,t){if(null==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 Be(e,t,i){if(null!=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 Re(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Pe(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ue(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Je=i(74889);const ke=new $.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ze=class extends E.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ze.prototype,"description",void 0),(0,r._)([(0,g.Cb)({type:String,json:{read:ke.read,write:ke.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,C.j)("esri.rest.support.GPMessage")],Ze);const We=Ze,Ge=new $.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ve=class extends We{constructor(e){super(e),this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{read:Ge.read,write:Ge.write}})],Ve.prototype,"type",void 0),Ve=(0,r._)([(0,C.j)("esri.rest.support.NAMessage")],Ve);const qe=Ve;let ze=class extends E.wq{constructor(e){super(e)}};(0,r._)([(0,g.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,K.J)(Te,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,C.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=i(94139);let $e=class extends E.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Pe(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],$e.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],$e.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],$e.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({type:Ke.Z})],$e.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],$e.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],$e.prototype,"strings",void 0),$e=(0,r._)([(0,C.j)("esri.rest.support.DirectionsEvent")],$e);const Xe=$e;var Qe=i(58901);let Ye=class extends a.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,n,l,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,n=parseInt(p[y],32)+i,y++,i=n;const e=[a/d,n/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(l=parseInt(p[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Qe.Z.fromJSON(i):null}};(0,r._)([(0,g.Cb)({type:[Xe]})],Ye.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Ye.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],Ye.prototype,"strings",void 0),Ye=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeature")],Ye);const et=Ye;var tt=i(82971);let it=class extends Je.Z{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Qe.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 Qe.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(S.pC)}};(0,r._)([(0,g.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,g.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,g.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,g.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends E.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,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,C.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e?Je.Z.fromJSON(e).features.filter(S.pC):[]}let nt=class extends E.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,g.Cb)({type:[qe]})],nt.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({type:[st]})],nt.prototype,"routeResults",void 0),nt=(0,r._)([(0,C.j)("esri.rest.support.RouteSolveResult")],nt);const lt=nt;function ut(e){return e instanceof Je.Z}var pt;let dt=pt=class extends((0,Ne.J)(E.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 pt({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??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?de.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new 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:"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}],dt.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,g.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,g.Cb)({type:Qe.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(0,r._)([(0,C.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(E.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 null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:pe.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?pe.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.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}],yt.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,g.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,g.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:pe.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,C.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ue.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(this.costs)):null,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ue.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.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}]}}],ft.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,g.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,g.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:ue.apiValues,json:{name:"attributes.FullEdge",read:{reader:ue.read},write:{writer:ue.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,C.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let St=gt=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(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})}};St.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}],St.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,g.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],St.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],St.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],St.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],St.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:Tt.Z,json:{write:!0}})],St.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],St.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],St.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],St.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],St.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],St.prototype,"type",void 0),St=gt=(0,r._)([(0,C.j)("esri.rest.support.PolygonBarrier")],St);const wt=St;var Ct;let _t=Ct=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}static fromGraphic(e){return new Ct({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};_t.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}],_t.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,g.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],_t.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],_t.prototype,"readCosts",null),(0,r._)([(0,g.Cb)({type:Qe.Z,json:{write:!0}})],_t.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],_t.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],_t.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],_t.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],_t.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],_t.prototype,"type",void 0),_t=Ct=(0,r._)([(0,C.j)("esri.rest.support.PolylineBarrier")],_t);const Nt=_t;let Ot=class extends E.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 null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,C.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var It;let Dt=It=class extends((0,Ne.J)(E.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 null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Pe(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Pe(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Me(t.attributes,"Total_")}readTotalViolations(e,t){return Me(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Me(t.attributes,"TotalWait_")}static fromGraphic(e){return new It({analysisSettings:null!=e.attributes.AnalysisSettings?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?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:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Re(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};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:"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}],Dt.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,g.Cb)()],Dt.prototype,"analysisSettings",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],Dt.prototype,"readEndTime",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Dt.prototype,"readEndTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],Dt.prototype,"firstStopId",void 0),(0,r._)([(0,g.Cb)({type:Qe.Z})],Dt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.LastStopID"}}})],Dt.prototype,"lastStopId",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],Dt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],Dt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],Dt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],Dt.prototype,"readStartTime",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Dt.prototype,"readStartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopCount"}}})],Dt.prototype,"stopCount",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Dt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],Dt.prototype,"readTotalCosts",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalDistance",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalDuration",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalLateDuration",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],Dt.prototype,"readTotalViolations",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],Dt.prototype,"readTotalWait",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalWaitDuration",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],Dt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"version",void 0),Dt=It=(0,r._)([(0,C.j)("esri.rest.support.RouteInfo")],Dt);const xt=Dt,Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=i(33955);let Lt=class extends((0,Ne.J)(E.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,g.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Lt.prototype,"geometry",void 0),(0,r._)([(0,K.J)(ve)],Lt.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({type:String,json:{name:"layerName",write:!0}})],Lt.prototype,"name",void 0),(0,r._)([(0,K.J)(fe,{name:"spatialRel"})],Lt.prototype,"spatialRelationship",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Lt.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Lt.prototype,"where",void 0),Lt=(0,r._)([(0,C.j)("esri.rest.support.DataLayer")],Lt);const Mt=Lt;var Bt;let Et=Bt=class extends Je.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Bt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Et.prototype,"doNotLocateOnRestrictedElements",void 0),Et=Bt=(0,r._)([(0,C.j)("esri.rest.support.NetworkFeatureSet")],Et);const Rt=Et;let Pt=class extends((0,Ne.J)(E.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Pt.prototype,"url",void 0),Pt=(0,r._)([(0,C.j)("esri.rest.support.NetworkUrl")],Pt);const Ut=Pt;var Jt;let kt=Jt=class extends((0,Ne.J)(E.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,T.TJ)(Jt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Wt(e,t,i)}writePolygonBarrier(e,t,i){Wt(e,t,i)}writePolylineBarrier(e,t,i){Wt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Mt.fromJSON(e):function(e){return e&&"url"in e}(e)?Ut.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Rt.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Wt(e,t,i)}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Q)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,K.J)(ee)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,K.J)(ce)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,K.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,K.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,K.J)(X)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,K.J)(te)],kt.prototype,"outputLines",void 0),(0,r._)([(0,g.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,g.Cb)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,K.J)(ie)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{type:Number,write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Jt=(0,r._)([(0,C.j)("esri.rest.support.RouteParameters")],kt);const Zt=kt;function Wt(e,t,i){null!=e&&(t[i]=u.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Gt;let Vt=Gt=class extends((0,Ne.J)(E.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 Pe(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Me(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Pe(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Me(t.attributes,"Attr_")}writeServiceCosts(e,t){Be(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Me(t.attributes,"Violation_")}readWait(e,t){return Me(t.attributes,"Wait_")}static fromGraphic(e){return new Gt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Ee(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Ee(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Re(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?oe.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?se.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Re(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?ae.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};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:"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}],Vt.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,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],Vt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Vt.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Vt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Vt.prototype,"bearing",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Vt.prototype,"bearingTol",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Vt.prototype,"readCumulativeCosts",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],Vt.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],Vt.prototype,"departCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Vt.prototype,"departTime",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Vt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Vt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],Vt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"lateDuration",void 0),(0,r._)([(0,g.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],Vt.prototype,"locationType",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],Vt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Vt.prototype,"navLatency",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],Vt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],Vt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Vt.prototype,"posAlong",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.RouteName"}})],Vt.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Vt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Vt.prototype,"writeServiceCosts",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceDistance",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceDuration",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Sequence"}})],Vt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Vt.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapX"}}})],Vt.prototype,"snapX",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapY"}}})],Vt.prototype,"snapY",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Vt.prototype,"snapZ",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],Vt.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Vt.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],Vt.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Vt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Vt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Vt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Vt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Vt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],Vt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Vt.prototype,"readViolations",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"waitDuration",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Vt.prototype,"readWait",null),Vt=Gt=(0,r._)([(0,C.j)("esri.rest.support.Stop")],Vt);const qt=Vt;var zt=i(65091);function Ht(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function $t(e){return"layers"in e}async function Xt(e){const t=tt.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function Qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Yt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.En)(e,t,"meters")}const ei=u.Z.ofType(ct),ti=u.Z.ofType(bt),ii=u.Z.ofType(vt),ri=u.Z.ofType(wt),oi=u.Z.ofType(Nt),si=u.Z.ofType(qt),ai="esri.layers.RouteLayer",ni=c.Z.getLogger(ai);let li=class extends((0,x.h)((0,L.M)((0,F.q)((0,j.I)((0,m.R)((0,d.p)(D.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new W,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.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,y.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo&&null!=this.routeInfo.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new zt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Nt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],a=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??I.Zn;return tt.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>qt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo&&null!=this.routeInfo.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,M.Nm)(e,ni)):this._set("url",o.default.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new p.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new p.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new p.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new p.Z("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,v.mN)(r):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await Xt(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=V.default.from(e).clone();i.extent??=await Xt(this.fullExtent),i.id=null,i.portal??=G.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",q.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(void 0,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??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new p.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||u.Z.isCollection(i)&&i.length<2)throw new p.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(u.Z.isCollection(i))for(const e of i)e.routeName=null;const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=e?.travelMode??l.defaultTravelMode,c=e?.accumulateAttributes??[];null!=d&&(c.push(d.distanceAttributeName),d.timeAttributeName&&c.push(d.timeAttributeName));const m={startTime:new Date},y={accumulateAttributes:c,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},h=e?Zt.from(e):new Zt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(y);try{f=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,H.en)(e),{path:l}=n;ut(t.stops)&&Fe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&Fe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&Fe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&Fe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Le.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=u.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(null!=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}xe.warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const p={...i,query:{...n.query,...Ue(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:c}=await(0,z.default)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&b.length>0?b[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),lt.fromJSON({routeResults:b,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(c)}(n,h,t)}catch(e){throw(0,b.D_)(e)?e:new p.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void ni.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=o.find((({name:e})=>e===a)),u=o.find((({name:e})=>e===n)),d=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=l?.units,m=u?.units;if(!c||!m)throw new p.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===a||e===n||e===d||null!=e&&b.includes(e))).map((({name:e})=>e))),f=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[d]??0,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:S,startTimeIsUTC:w,timeWindowsAreUTC:C}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:S,startTimeIsUTC:w,timeWindowsAreUTC:C,travelMode:s}),v.totalDuration=Qt(v.totalCosts?.[a]??0,c),v.totalDistance=Yt(v.totalCosts?.[n]??0,m),v.totalLateDuration=Qt(v.totalViolations?.[a]??0,c),v.totalWaitDuration=Qt(v.totalWait?.[a]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Qt(t.serviceCosts[a]??0,c),t.serviceDistance=Yt(t.serviceCosts[n]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Qt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Yt(t.cumulativeCosts[n]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Qt(t.violations[a]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Qt(t.wait[a]??0,c),f(t.wait))}(v,l,h),v}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),null!=n.geometry&&(this.spatialReference=n.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=$t(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new u.Z;const{layerDefinition:p,popupInfo:d,featureSet:c}=s,m=p.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??p.spatialReference??p.extent.spatialReference??I.Zn,h=m&&(0,l.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&n.Z.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new u.Z(v)}_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(null!=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(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if(null==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((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...n),u=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==u?"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=>qt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=Nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=e.routeResults[0].route?.toJSON(),n=xt.fromJSON(a);n.symbol=this.defaultSymbols.routeInfo;const l=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:n,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){if(null==e||!e.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:l,maxScale:u,minScale:p}=this;return{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,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:n,title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Nt.fields,Nt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new u.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",qt.fields,qt.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=null!=t&&null!=t.first&&t.first.toJSON(),r=null!=t&&null!=t.middle&&t.middle.toJSON(),o=null!=t&&null!=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,g.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}}}}}}})],li.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],li.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],li.prototype,"_type",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:W})],li.prototype,"defaultSymbols",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],li.prototype,"readDirectionLines",null),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],li.prototype,"readDirectionPoints",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],li.prototype,"featureCollectionType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"fullExtent",null),(0,r._)([(0,g.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],li.prototype,"legendEnabled",void 0),(0,r._)([(0,g.Cb)({type:["show","hide"]})],li.prototype,"listMode",void 0),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],li.prototype,"readMaxScale",null),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],li.prototype,"readMinScale",null),(0,r._)([(0,g.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],li.prototype,"operationalLayerType",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(vt)})],li.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],li.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(wt)})],li.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(Nt)})],li.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],li.prototype,"readRouteInfo",null),(0,r._)([(0,g.Cb)({type:tt.Z})],li.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],li.prototype,"readSpatialReference",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(qt)})],li.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],li.prototype,"readStops",null),(0,r._)([(0,g.Cb)()],li.prototype,"title",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],li.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],li.prototype,"url",null),li=(0,r._)([(0,C.j)(ai)],li);const ui=li},38009:(e,t,i)=>{i.d(t,{q:()=>h});var r=i(43697),o=i(20102),s=i(81271),a=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(30556),u=i(50549),p=i(76169);const d={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},c={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},m={ArcGISFeatureLayer:!0},y={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":d,"web-map/basemap":c,"web-map/tables":m,"link-chart/operational-layers":{...d,LinkChartLayer:!0},"link-chart/basemap":c,"link-chart/tables":m,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0,OrientedImageryLayer:!0}};var b=i(21506);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,i,r){(r&&"ground"===r.layerContainerType||e&&(0,p.d)(this,i,{},r))&&(t[i]=e)}writeOperationalLayerType(e,t,i,r){!e||r&&"tables"===r.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}read(e,t){t&&(t.layer=this),(0,u.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,i=y[e];let r=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new o.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const i=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.Z&&"web-document-write:property-required"===e.name)).length;return(0,s.jc)(i?.url)?(t?.messages?.push(new o.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:i}beforeSave(){}};return(0,r._)([(0,a.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,a.Cb)(b.rT)],t.prototype,"listMode",void 0),(0,r._)([(0,l.c)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,a.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,l.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.Cb)(b.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,l.c)("title"),(0,l.c)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,r._)([(0,n.j)("esri.layers.mixins.OperationalLayer")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>w});var r=i(43697),o=i(68773),s=i(40330),a=i(3172),n=i(66643),l=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(81271),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),S=i(14661);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.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{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,S.Ss)(i);let o,a;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,S.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==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=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,n.q6)((0,a.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.default.fromJSON(p.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||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.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,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=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=y.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;null==s.geometry||n||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.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&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.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?.(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)null!=e&&n&&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,b.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,b.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&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,b.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)}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[a.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s}),i(68773),i(40330);var r=i(22974),o=i(81271);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}i(71058)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[261,5732],{5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},16453:(e,t,i)=>{i.d(t,{R:()=>g,w:()=>T});var r=i(43697),o=i(92036),s=i(70586),a=i(41103),n=i(22974),l=i(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,i=this._originStores[l.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,n.d9)(e),l.s3.DEFAULTS)}));for(let i=l.s3.SERVICE;i<l.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,o)=>{e&&e.has(o)||t.set(o,(0,n.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=l.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,s.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=l.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),o=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),o!==r}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=i(50549),d=i(1153),c=i(52011);const m=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,s.j0)((0,d.vw)(this)),i=t.store,r=new u;t.store=r,(0,a.M)(t,i,r)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const i=y(this),r=(0,l.M9)(t);if("string"==typeof e)return i.get(e,r);const o={};return e.forEach((e=>{o[e]=i.get(e,r)})),o}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const i=y(this),r=(0,l.M9)(t),o=(0,d.vw)(this);let s;s="string"==typeof e?"*"===e?i.keys(r):[e]:e,s.forEach((e=>{o.invalidate(e),i.revert(e,r),o.commit(e)}))}};return t=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,d.vw)(e).store}let b=class extends(m(o.Z)){};b=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],b);var h=i(76169);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e,t){return(0,h.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,d.vw)(this).setAtOrigin(e,t,(0,l.M9)(i))}removeOrigin(e){const t=v(this),i=(0,l.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),l.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,l.M9)(t),o=this.get(e);for(let t=r+1;t<l.kk;++t)i.delete(e,t);i.set(e,o,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,c.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,d.vw)(e).store}const g=e=>{let t=class extends(f(m(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(g(o.Z)){};T=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],T)},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})},16306:(e,t,i)=>{i.d(t,{aX:()=>w});var r=i(68773),o=i(20102),s=i(92604),a=i(38913),n=i(58901),l=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(81271);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:o.wkid??JSON.stringify(o),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:n}=await(0,d.default)(r.path+"/simplify",a);var l;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(n.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof n.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,l.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],a=e[r+1][0],n=e[r+1][1],l=Math.sqrt((a-o)*(a-o)+(n-s)*(n-s)),u=(n-s)/l,p=(a-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=p*r+o,n=u*r+s;i.push([a,n])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+o,a=u*e+s;i.push([r,a])}i.push([a,n])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:r,spatialReference:e.spatialReference}):new n.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,l.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function S(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=(0,l.x3)(s);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.XZ)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(f(e))for(const t of(0,l.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&h.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,y,f,v,C,_,N,O,A=0;const I=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,_=f?102100:4326,v=l.UZ[_].maxX,C=l.UZ[_].minX,N=l.UZ[_].plus180Line,O=l.UZ[_].minus180Line),y)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(T(t.clone(),v,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,C))),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);D.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,l.XZ)(e.xmin,C)*(2*v);let r=0===i?t.clone():(0,l.Sy)(t.clone(),i);e.offset(i,0),e.intersects(N)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),I.push(r),D.push("cut")):e.intersects(O)&&e.xmin!==C?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),I.push(r),D.push("cut")):D.push(r)}else D.push(t.clone());else D.push(t);else D.push(t);let x=(0,l.XZ)(A,v),F=-90;const j=x,L=new n.Z;for(;x>0;){const e=360*x-180;L.addPath([[e,F],[e,-1*F]]),F*=-1,x--}if(I.length>0&&j>0){const t=S(I,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},n=await(0,d.default)(o.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=n.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,I,L,i)),r=[],s=[];for(let i=0;i<D.length;i++){const o=D[i];if("cut"!==o)s.push(o);else{const o=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&o.rings.length>=a.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const a=await b(o,r,i),n=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?n.push(t):n.push(f?(0,p.$)(a.shift()):a.shift())}return n}const M=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)M.push(t);else{const e=I.shift();M.push(!0===f?(0,p.$)(e):e)}}return M}},73913:(e,t,i)=>{i.d(t,{Sy:()=>l,UZ:()=>a,XZ:()=>n,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function n(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});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(81571),i(91423)),u=i(46791),p=i(20102),d=i(3920),c=i(92604),m=i(16453),y=i(78286),b=i(95330),h=i(17445),f=i(67900),v=i(81271),g=i(5600),T=i(75215),S=i(67676),w=(i(80442),i(71715)),C=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),I=i(8744),D=i(87085),x=i(71612),F=i(38009),j=i(16859),L=i(72965),M=i(66677),B=i(9790),E=i(96674),R=i(77987);let P=class extends E.wq{constructor(e){super(e),this.break=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new R.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new R.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new R.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new R.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"break",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"first",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"unlocated",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"last",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"middle",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],P.prototype,"waypoint",void 0),P=(0,r._)([(0,C.j)("esri.layers.support.RouteStopSymbols")],P);const U=P;var J=i(4095),k=i(20256);let Z=class extends E.wq{constructor(e){super(e),this.directionLines=new J.Z({color:[0,122,194],width:6}),this.directionPoints=new R.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new R.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new k.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new J.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new J.Z({width:8,color:[20,89,127]}),this.stops=new U}};(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,g.Cb)({type:U})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,C.j)("esri.layers.support.RouteSymbols")],Z);const W=Z;var G=i(48522),V=i(15235),q=i(14661),z=i(3172),H=i(11282),K=i(36030),$=i(35454);const X=(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"}),Y=((0,$.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(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",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),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}),ue=(0,$.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),pe=(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",Meters:"meters"},{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",Meters:"meters",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"}),Te=(0,$.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Se=class extends E.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,g.Cb)({type:String})],Se.prototype,"dataType",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Se.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String]})],Se.prototype,"parameterNames",void 0),(0,r._)([(0,g.Cb)({type:String})],Se.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Se.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String})],Se.prototype,"trafficSupport",void 0),(0,r._)([(0,K.J)(Y)],Se.prototype,"units",void 0),(0,r._)([(0,K.J)(ge)],Se.prototype,"usageType",void 0),Se=(0,r._)([(0,C.j)("esri.rest.support.NetworkAttribute")],Se);const we=Se;let Ce=class extends E.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,g.Cb)({type:Number})],Ce.prototype,"buildTime",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[we]})],Ce.prototype,"networkAttributes",void 0),(0,r._)([(0,g.Cb)()],Ce.prototype,"networkSources",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"state",void 0),Ce=(0,r._)([(0,C.j)("esri.rest.support.NetworkDataset")],Ce);const _e=Ce;var Ne=i(2368);let Oe=class extends((0,Ne.J)(E.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}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[Object],json:{write:!0}})],Oe.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"description",void 0),(0,r._)([(0,K.J)(me,{ignoreUnknown:!1})],Oe.prototype,"distanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],Oe.prototype,"readId",null),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Oe.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{write:!0}})],Oe.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Oe.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Oe.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,g.Cb)({type:Number,json:{write:{allowNull:!0}}})],Oe.prototype,"simplificationTolerance",void 0),(0,r._)([(0,K.J)(X)],Oe.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Oe.prototype,"timeAttributeName",void 0),(0,r._)([(0,K.J)(re)],Oe.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Oe.prototype,"useHierarchy",void 0),(0,r._)([(0,K.J)(ie)],Oe.prototype,"uturnAtJunctions",void 0),Oe=(0,r._)([(0,C.j)("esri.rest.support.TravelMode")],Oe);const Ae=Oe;let Ie=class extends E.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Ae.fromJSON(i):null}};(0,r._)([(0,g.Cb)()],Ie.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ie.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ie.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)()],Ie.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"currentVersion",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ie.prototype,"readDefaultTravelMode",null),(0,r._)([(0,g.Cb)()],Ie.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Q)],Ie.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Ie.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)()],Ie.prototype,"hasZ",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Ie.prototype,"impedance",void 0),(0,r._)([(0,g.Cb)({type:_e})],Ie.prototype,"networkDataset",void 0),(0,r._)([(0,g.Cb)({type:[Ae]})],Ie.prototype,"supportedTravelModes",void 0),Ie=(0,r._)([(0,C.j)("esri.rest.support.NetworkServiceDescription")],Ie);const De=Ie,xe=c.Z.getLogger("esri.rest.networkService");function Fe(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 p.Z("network-service:missing-url","Url to Network service is missing");const r=(0,H.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,H.lA)({f:"json",token:t},i),o=(0,v.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new p.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,H.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,v.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,y.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,H.en)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,H.lA)({f:"json",serviceName:u},t),d=(0,v.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,p),m=[];let b=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&&(b=t.value)}return{supportedTravelModes:m,defaultTravelMode:b}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,De.fromJSON(o)}var Le=i(16306);function Me(e,t){if(null==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 Be(e,t,i){if(null!=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 Re(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Pe(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ue(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Je=i(74889);const ke=new $.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ze=class extends E.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ze.prototype,"description",void 0),(0,r._)([(0,g.Cb)({type:String,json:{read:ke.read,write:ke.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,C.j)("esri.rest.support.GPMessage")],Ze);const We=Ze,Ge=new $.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ve=class extends We{constructor(e){super(e),this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{read:Ge.read,write:Ge.write}})],Ve.prototype,"type",void 0),Ve=(0,r._)([(0,C.j)("esri.rest.support.NAMessage")],Ve);const qe=Ve;let ze=class extends E.wq{constructor(e){super(e)}};(0,r._)([(0,g.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,K.J)(Te,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,C.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=i(94139);let $e=class extends E.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Pe(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],$e.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],$e.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],$e.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({type:Ke.Z})],$e.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],$e.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],$e.prototype,"strings",void 0),$e=(0,r._)([(0,C.j)("esri.rest.support.DirectionsEvent")],$e);const Xe=$e;var Qe=i(58901);let Ye=class extends a.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,n,l,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,n=parseInt(p[y],32)+i,y++,i=n;const e=[a/d,n/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(l=parseInt(p[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Qe.Z.fromJSON(i):null}};(0,r._)([(0,g.Cb)({type:[Xe]})],Ye.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Ye.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],Ye.prototype,"strings",void 0),Ye=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeature")],Ye);const et=Ye;var tt=i(82971);let it=class extends Je.Z{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Qe.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 Qe.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(S.pC)}};(0,r._)([(0,g.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,g.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,g.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,g.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends E.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,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,C.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e?Je.Z.fromJSON(e).features.filter(S.pC):[]}let nt=class extends E.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,g.Cb)({type:[qe]})],nt.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],nt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({type:[st]})],nt.prototype,"routeResults",void 0),nt=(0,r._)([(0,C.j)("esri.rest.support.RouteSolveResult")],nt);const lt=nt;function ut(e){return e instanceof Je.Z}var pt;let dt=pt=class extends((0,Ne.J)(E.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 pt({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??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?de.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new 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:"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}],dt.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,g.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,g.Cb)({type:Qe.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(0,r._)([(0,C.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(E.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 null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:pe.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?pe.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.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}],yt.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,g.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,g.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:pe.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,C.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ue.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(this.costs)):null,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ue.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.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}]}}],ft.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,g.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,g.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:ue.apiValues,json:{name:"attributes.FullEdge",read:{reader:ue.read},write:{writer:ue.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,C.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let St=gt=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}writeCosts(e,t){Be(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(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})}};St.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}],St.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,g.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],St.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],St.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],St.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],St.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:Tt.Z,json:{write:!0}})],St.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],St.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],St.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],St.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],St.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],St.prototype,"type",void 0),St=gt=(0,r._)([(0,C.j)("esri.rest.support.PolygonBarrier")],St);const wt=St;var Ct;let _t=Ct=class extends((0,Ne.J)(E.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 Me(t.attributes,"Attr_")}static fromGraphic(e){return new Ct({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Re(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};_t.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}],_t.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,g.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],_t.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],_t.prototype,"readCosts",null),(0,r._)([(0,g.Cb)({type:Qe.Z,json:{write:!0}})],_t.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],_t.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],_t.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],_t.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],_t.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],_t.prototype,"type",void 0),_t=Ct=(0,r._)([(0,C.j)("esri.rest.support.PolylineBarrier")],_t);const Nt=_t;let Ot=class extends E.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 null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,C.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var It;let Dt=It=class extends((0,Ne.J)(E.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 null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Pe(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Pe(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Me(t.attributes,"Total_")}readTotalViolations(e,t){return Me(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Me(t.attributes,"TotalWait_")}static fromGraphic(e){return new It({analysisSettings:null!=e.attributes.AnalysisSettings?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?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:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Re(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};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:"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}],Dt.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,g.Cb)()],Dt.prototype,"analysisSettings",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],Dt.prototype,"readEndTime",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Dt.prototype,"readEndTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],Dt.prototype,"firstStopId",void 0),(0,r._)([(0,g.Cb)({type:Qe.Z})],Dt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.LastStopID"}}})],Dt.prototype,"lastStopId",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],Dt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],Dt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],Dt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],Dt.prototype,"readStartTime",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Dt.prototype,"readStartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopCount"}}})],Dt.prototype,"stopCount",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Dt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],Dt.prototype,"readTotalCosts",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalDistance",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalDuration",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalLateDuration",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],Dt.prototype,"readTotalViolations",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],Dt.prototype,"readTotalWait",null),(0,r._)([(0,g.Cb)()],Dt.prototype,"totalWaitDuration",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],Dt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],Dt.prototype,"version",void 0),Dt=It=(0,r._)([(0,C.j)("esri.rest.support.RouteInfo")],Dt);const xt=Dt,Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=i(33955);let Lt=class extends((0,Ne.J)(E.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,g.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Lt.prototype,"geometry",void 0),(0,r._)([(0,K.J)(ve)],Lt.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({type:String,json:{name:"layerName",write:!0}})],Lt.prototype,"name",void 0),(0,r._)([(0,K.J)(fe,{name:"spatialRel"})],Lt.prototype,"spatialRelationship",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Lt.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Lt.prototype,"where",void 0),Lt=(0,r._)([(0,C.j)("esri.rest.support.DataLayer")],Lt);const Mt=Lt;var Bt;let Et=Bt=class extends Je.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Bt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Et.prototype,"doNotLocateOnRestrictedElements",void 0),Et=Bt=(0,r._)([(0,C.j)("esri.rest.support.NetworkFeatureSet")],Et);const Rt=Et;let Pt=class extends((0,Ne.J)(E.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Pt.prototype,"url",void 0),Pt=(0,r._)([(0,C.j)("esri.rest.support.NetworkUrl")],Pt);const Ut=Pt;var Jt;let kt=Jt=class extends((0,Ne.J)(E.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,T.TJ)(Jt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Wt(e,t,i)}writePolygonBarrier(e,t,i){Wt(e,t,i)}writePolylineBarrier(e,t,i){Wt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Mt.fromJSON(e):function(e){return e&&"url"in e}(e)?Ut.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Rt.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Wt(e,t,i)}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Q)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,K.J)(ee)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,K.J)(ce)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,K.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,K.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,K.J)(X)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,K.J)(te)],kt.prototype,"outputLines",void 0),(0,r._)([(0,g.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,g.Cb)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,K.J)(ie)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{type:Number,write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Jt=(0,r._)([(0,C.j)("esri.rest.support.RouteParameters")],kt);const Zt=kt;function Wt(e,t,i){null!=e&&(t[i]=u.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Gt;let Vt=Gt=class extends((0,Ne.J)(E.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 Pe(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Me(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Pe(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Me(t.attributes,"Attr_")}writeServiceCosts(e,t){Be(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Me(t.attributes,"Violation_")}readWait(e,t){return Me(t.attributes,"Wait_")}static fromGraphic(e){return new Gt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Ee(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Ee(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Re(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?oe.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?se.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Re(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?ae.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};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:"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}],Vt.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,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],Vt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Vt.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Vt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Vt.prototype,"bearing",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Vt.prototype,"bearingTol",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Vt.prototype,"readCumulativeCosts",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],Vt.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],Vt.prototype,"departCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Vt.prototype,"departTime",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Vt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Vt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],Vt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"lateDuration",void 0),(0,r._)([(0,g.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],Vt.prototype,"locationType",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],Vt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Vt.prototype,"navLatency",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],Vt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],Vt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Vt.prototype,"posAlong",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.RouteName"}})],Vt.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Vt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Vt.prototype,"writeServiceCosts",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceDistance",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"serviceDuration",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Sequence"}})],Vt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Vt.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapX"}}})],Vt.prototype,"snapX",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapY"}}})],Vt.prototype,"snapY",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Vt.prototype,"snapZ",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],Vt.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Vt.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],Vt.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:B.LB})],Vt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Vt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Vt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Vt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Vt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],Vt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Vt.prototype,"readViolations",null),(0,r._)([(0,g.Cb)()],Vt.prototype,"waitDuration",void 0),(0,r._)([(0,g.Cb)()],Vt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Vt.prototype,"readWait",null),Vt=Gt=(0,r._)([(0,C.j)("esri.rest.support.Stop")],Vt);const qt=Vt;var zt=i(65091);function Ht(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function $t(e){return"layers"in e}async function Xt(e){const t=tt.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function Qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Yt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.En)(e,t,"meters")}const ei=u.Z.ofType(ct),ti=u.Z.ofType(bt),ii=u.Z.ofType(vt),ri=u.Z.ofType(wt),oi=u.Z.ofType(Nt),si=u.Z.ofType(qt),ai="esri.layers.RouteLayer",ni=c.Z.getLogger(ai);let li=class extends((0,x.h)((0,L.M)((0,F.q)((0,j.I)((0,m.R)((0,d.p)(D.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new W,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.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,y.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo&&null!=this.routeInfo.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new zt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Nt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=$t(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],a=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??I.Zn;return tt.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>qt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo&&null!=this.routeInfo.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,M.Nm)(e,ni)):this._set("url",o.default.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new p.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new p.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new p.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new p.Z("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,v.mN)(r):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await Xt(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=V.default.from(e).clone();i.extent??=await Xt(this.fullExtent),i.id=null,i.portal??=G.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",q.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(void 0,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??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new p.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||u.Z.isCollection(i)&&i.length<2)throw new p.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(u.Z.isCollection(i))for(const e of i)e.routeName=null;const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=e?.travelMode??l.defaultTravelMode,c=e?.accumulateAttributes??[];null!=d&&(c.push(d.distanceAttributeName),d.timeAttributeName&&c.push(d.timeAttributeName));const m={startTime:new Date},y={accumulateAttributes:c,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},h=e?Zt.from(e):new Zt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(y);try{f=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,H.en)(e),{path:l}=n;ut(t.stops)&&Fe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&Fe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&Fe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&Fe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Le.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=u.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(null!=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}xe.warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const p={...i,query:{...n.query,...Ue(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:c}=await(0,z.default)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&b.length>0?b[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),lt.fromJSON({routeResults:b,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(c)}(n,h,t)}catch(e){throw(0,b.D_)(e)?e:new p.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void ni.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=o.find((({name:e})=>e===a)),u=o.find((({name:e})=>e===n)),d=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=l?.units,m=u?.units;if(!c||!m)throw new p.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===a||e===n||e===d||null!=e&&b.includes(e))).map((({name:e})=>e))),f=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[d]??0,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:S,startTimeIsUTC:w,timeWindowsAreUTC:C}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:S,startTimeIsUTC:w,timeWindowsAreUTC:C,travelMode:s}),v.totalDuration=Qt(v.totalCosts?.[a]??0,c),v.totalDistance=Yt(v.totalCosts?.[n]??0,m),v.totalLateDuration=Qt(v.totalViolations?.[a]??0,c),v.totalWaitDuration=Qt(v.totalWait?.[a]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Qt(t.serviceCosts[a]??0,c),t.serviceDistance=Yt(t.serviceCosts[n]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Qt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Yt(t.cumulativeCosts[n]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Qt(t.violations[a]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Qt(t.wait[a]??0,c),f(t.wait))}(v,l,h),v}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),null!=n.geometry&&(this.spatialReference=n.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=$t(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new u.Z;const{layerDefinition:p,popupInfo:d,featureSet:c}=s,m=p.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??p.spatialReference??p.extent.spatialReference??I.Zn,h=m&&(0,l.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&n.Z.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new u.Z(v)}_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(null!=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(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if(null==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((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...n),u=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==u?"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=>qt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=Nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=e.routeResults[0].route?.toJSON(),n=xt.fromJSON(a);n.symbol=this.defaultSymbols.routeInfo;const l=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:n,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){if(null==e||!e.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:l,maxScale:u,minScale:p}=this;return{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,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:n,title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Nt.fields,Nt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new u.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",qt.fields,qt.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=null!=t&&null!=t.first&&t.first.toJSON(),r=null!=t&&null!=t.middle&&t.middle.toJSON(),o=null!=t&&null!=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,g.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}}}}}}})],li.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],li.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],li.prototype,"_type",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:W})],li.prototype,"defaultSymbols",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],li.prototype,"readDirectionLines",null),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],li.prototype,"readDirectionPoints",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],li.prototype,"featureCollectionType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"fullExtent",null),(0,r._)([(0,g.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],li.prototype,"legendEnabled",void 0),(0,r._)([(0,g.Cb)({type:["show","hide"]})],li.prototype,"listMode",void 0),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],li.prototype,"readMaxScale",null),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],li.prototype,"readMinScale",null),(0,r._)([(0,g.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],li.prototype,"operationalLayerType",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(vt)})],li.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],li.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(wt)})],li.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(Nt)})],li.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({readOnly:!0})],li.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],li.prototype,"readRouteInfo",null),(0,r._)([(0,g.Cb)({type:tt.Z})],li.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],li.prototype,"readSpatialReference",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(qt)})],li.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],li.prototype,"readStops",null),(0,r._)([(0,g.Cb)()],li.prototype,"title",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],li.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],li.prototype,"url",null),li=(0,r._)([(0,C.j)(ai)],li);const ui=li},38009:(e,t,i)=>{i.d(t,{q:()=>h});var r=i(43697),o=i(20102),s=i(81271),a=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(30556),u=i(50549),p=i(76169);const d={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},c={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},m={ArcGISFeatureLayer:!0},y={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":d,"web-map/basemap":c,"web-map/tables":m,"link-chart/operational-layers":{...d,LinkChartLayer:!0},"link-chart/basemap":c,"link-chart/tables":m,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0,OrientedImageryLayer:!0}};var b=i(21506);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,i,r){(r&&"ground"===r.layerContainerType||e&&(0,p.d)(this,i,{},r))&&(t[i]=e)}writeOperationalLayerType(e,t,i,r){!e||r&&"tables"===r.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}read(e,t){t&&(t.layer=this),(0,u.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,i=y[e];let r=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new o.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const i=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.Z&&"web-document-write:property-required"===e.name)).length;return(0,s.jc)(i?.url)?(t?.messages?.push(new o.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:i}beforeSave(){}};return(0,r._)([(0,a.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,a.Cb)(b.rT)],t.prototype,"listMode",void 0),(0,r._)([(0,l.c)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,a.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,l.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.Cb)(b.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,l.c)("title"),(0,l.c)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,r._)([(0,n.j)("esri.layers.mixins.OperationalLayer")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>w});var r=i(43697),o=i(68773),s=i(40330),a=i(3172),n=i(66643),l=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(81271),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),S=i(14661);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.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{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,S.Ss)(i);let o,a;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,S.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==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=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,n.q6)((0,a.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.default.fromJSON(p.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||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.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,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=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=y.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;null==s.geometry||n||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.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&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.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?.(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;let n=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;n=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a),n,l);for(const{geometry:e}of t)null!=e&&u&&u(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,b.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,b.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,b.oU)(e)?e.rings:e.paths;let a,n;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(a+=o[0],n+=o[1]):(a=o[0],n=o[1]),o[0]=t(a),o[1]=i(n)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,n;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],n+=r[1]):(a=r[0],n=r[1]),r[0]=t(a),r[1]=i(n)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[a.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s}),i(68773),i(40330);var r=i(22974),o=i(81271);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}i(71058)}}]);