@arcgis/core 4.23.0-next.20220131 → 4.23.0-next.20220205

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 (402) hide show
  1. package/Graphic.js +1 -1
  2. package/TimeExtent.js +1 -1
  3. package/assets/components/assets/calcite-date-picker/nls/pt-BR.json +31 -0
  4. package/assets/components/assets/calcite-date-picker/nls/pt-PT.json +3 -3
  5. package/assets/components/assets/calcite-icon/clipboard16.json +1 -0
  6. package/assets/components/assets/calcite-icon/clipboard24.json +1 -0
  7. package/assets/components/assets/calcite-icon/clipboard32.json +1 -0
  8. package/assets/components/assets/calcite-icon/folders16.json +1 -0
  9. package/assets/components/assets/calcite-icon/folders24.json +1 -0
  10. package/assets/components/assets/calcite-icon/folders32.json +1 -0
  11. package/assets/components/assets/calcite-icon/initiative16.json +1 -0
  12. package/assets/components/assets/calcite-icon/initiative24.json +1 -0
  13. package/assets/components/assets/calcite-icon/initiative32.json +1 -0
  14. package/assets/components/assets/calcite-icon/initiativeTemplate16.json +1 -0
  15. package/assets/components/assets/calcite-icon/initiativeTemplate24.json +1 -0
  16. package/assets/components/assets/calcite-icon/initiativeTemplate32.json +1 -0
  17. package/assets/components/assets/calcite-icon/multipleVariables16.json +1 -0
  18. package/assets/components/assets/calcite-icon/multipleVariables24.json +1 -0
  19. package/assets/components/assets/calcite-icon/multipleVariables32.json +1 -0
  20. package/assets/components/assets/calcite-icon/paletteCheck16.json +1 -0
  21. package/assets/components/assets/calcite-icon/paletteCheck24.json +1 -0
  22. package/assets/components/assets/calcite-icon/paletteCheck32.json +1 -0
  23. package/assets/components/assets/calcite-icon/pentagon16.json +1 -0
  24. package/assets/components/assets/calcite-icon/pentagon24.json +1 -0
  25. package/assets/components/assets/calcite-icon/pentagon32.json +1 -0
  26. package/assets/components/assets/calcite-icon/puzzlePiece16.json +1 -0
  27. package/assets/components/assets/calcite-icon/puzzlePiece24.json +1 -0
  28. package/assets/components/assets/calcite-icon/puzzlePiece32.json +1 -0
  29. package/assets/components/assets/calcite-icon/ribbonRosette16.json +1 -0
  30. package/assets/components/assets/calcite-icon/ribbonRosette24.json +1 -0
  31. package/assets/components/assets/calcite-icon/ribbonRosette32.json +1 -0
  32. package/assets/components/assets/calcite-icon/speechBubbleExclamation16.json +1 -0
  33. package/assets/components/assets/calcite-icon/speechBubbleExclamation24.json +1 -0
  34. package/assets/components/assets/calcite-icon/speechBubbleExclamation32.json +1 -0
  35. package/assets/components/assets/calcite-icon/survey16.json +1 -0
  36. package/assets/components/assets/calcite-icon/survey24.json +1 -0
  37. package/assets/components/assets/calcite-icon/survey32.json +1 -0
  38. package/assets/esri/core/workers/RemoteClient.js +1 -1
  39. package/assets/esri/core/workers/chunks/{7a5f5acfbd4ca1a5c1f3.js → 06116433eb6e669f146b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/0a4401a148c3cb73d6ff.js +1 -0
  41. package/assets/esri/core/workers/chunks/{83d00afae4406ec78bc9.js → 0c6be307709523eb8a05.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{e0c8d61c7a85ce15499a.js → 0d9adefd00c44585be2e.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{44f0c3663b293afbd172.js → 0e09691edb44641de5f0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/0e215fa28a0448169132.js +1 -0
  45. package/assets/esri/core/workers/chunks/{391e96192d1ec4e55ce2.js → 101b4f02f0572afb666f.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{db3c729ce0c0b2690dc9.js → 1180ffd523c6292bc04e.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{826c983100569586b61f.js → 1571e8213feb518ff100.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{929c9b7cdab7c4ca3d87.js → 17c51f5a13f471e6656a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{37c03cfc19086ce631c6.js → 18a8b9e2f6bd89827189.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{ed0bcc66fb1e0ee75a4b.js → 1f34957ef42e5b5977d0.js} +1 -1
  51. package/assets/esri/core/workers/chunks/236de5f0476f6080ee62.js +1 -0
  52. package/assets/esri/core/workers/chunks/288ca064cd0472439276.js +1 -0
  53. package/assets/esri/core/workers/chunks/29aa6046534a43d7ce19.js +1 -0
  54. package/assets/esri/core/workers/chunks/2e1291cd831592216446.js +1 -0
  55. package/assets/esri/core/workers/chunks/{68a59ce98177d8513337.js → 3403cb53e4e60923c5fc.js} +1 -1
  56. package/assets/esri/core/workers/chunks/34bed896b68993cabaa1.js +1 -0
  57. package/assets/esri/core/workers/chunks/{99619fcb772807c74f3b.js → 444829a840b8ded16fd7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/467b5faa1c90d9821609.js +1 -0
  59. package/assets/esri/core/workers/chunks/49353182a16218a84251.js +1 -0
  60. package/assets/esri/core/workers/chunks/{fc046a15466c25d081ff.js → 4a2e93b12d60e8d92491.js} +1 -1
  61. package/assets/esri/core/workers/chunks/4de996ebc432f5e149bc.js +1 -0
  62. package/assets/esri/core/workers/chunks/50976921acf7bd636123.js +1 -0
  63. package/assets/esri/core/workers/chunks/5144ef135e0deb48c7bf.js +1 -0
  64. package/assets/esri/core/workers/chunks/584bbb675ed225f68171.js +1 -0
  65. package/assets/esri/core/workers/chunks/5a90d121ba79613cc2aa.js +1 -0
  66. package/assets/esri/core/workers/chunks/5b286f3f3deea10bdd91.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0463ba46df855a92b9c0.js → 65ccd204ec3053687a77.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{1f8c6a179e39fd4c5e6f.js → 6a2b8d6a9bada45ab66d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/6be326edd9829781d926.js +1 -0
  70. package/assets/esri/core/workers/chunks/6ea99a6e21b09674f6b3.js +1 -0
  71. package/assets/esri/core/workers/chunks/{5bcb3240b3c005e5fe72.js → 7215af7810d15e89aa5a.js} +1 -1
  72. package/assets/esri/core/workers/chunks/7509c1693ffedc0fa018.js +1 -0
  73. package/assets/esri/core/workers/chunks/7b0b75878370b3475fe5.js +1 -0
  74. package/assets/esri/core/workers/chunks/{bfedd6ebff817c9b31c0.js → 7b618c449d793aacd874.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{2460f3b6ada6ae900dec.js → 7c0ff01f081c7e9050d2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/806a7db0084214a53c79.js +1 -0
  77. package/assets/esri/core/workers/chunks/{8fa0a14165d43ffe87a5.js → 8325b577f52936f86cff.js} +1 -1
  78. package/assets/esri/core/workers/chunks/84d8e77d78d0d5134083.js +1 -0
  79. package/assets/esri/core/workers/chunks/{dd13772a5e2eccc6a2bc.js → 8598f762f15ca68d52b7.js} +1 -1
  80. package/assets/esri/core/workers/chunks/85b1ae51da3689bccf92.js +1 -0
  81. package/assets/esri/core/workers/chunks/873b0cbd343dc71755ed.js +1 -0
  82. package/assets/esri/core/workers/chunks/8804b8489eeab888275b.js +1 -0
  83. package/assets/esri/core/workers/chunks/{5ec98f4ddac707d0fbd1.js → 88815d533808aabb1fa9.js} +1 -1
  84. package/assets/esri/core/workers/chunks/8c8c0ecdf44fdbb56000.js +1 -0
  85. package/assets/esri/core/workers/chunks/{f2124f4d0f2b8a91f0ea.js → 90c5edcd8a609224ce55.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{bac9fc90e6756e211160.js → 94d9951509c0db09547a.js} +1 -1
  87. package/assets/esri/core/workers/chunks/996d6ae7f2e2273f9bce.js +1 -0
  88. package/assets/esri/core/workers/chunks/{c1135cb02ec46c491459.js → 9ce961bc390202c87941.js} +1 -1
  89. package/assets/esri/core/workers/chunks/9fbc7d2e0326be41b382.js +1 -0
  90. package/assets/esri/core/workers/chunks/a363fb40096679b011f6.js +1 -0
  91. package/assets/esri/core/workers/chunks/a41522b0a853b85c8269.js +1 -0
  92. package/assets/esri/core/workers/chunks/a763c11d2b02b3ec36ad.js +1 -0
  93. package/assets/esri/core/workers/chunks/{aeaa1667c2d9f1b3366b.js → a85ed251d3d3668e474f.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{69fd99b7c76e9992ccf3.js → b32bf9808cb4be3a6bd0.js} +1 -1
  95. package/assets/esri/core/workers/chunks/b33a6fbbc8de2969b1ca.js +1 -0
  96. package/assets/esri/core/workers/chunks/b548e6b3add4154ac4e6.js +1 -0
  97. package/assets/esri/core/workers/chunks/b6c55bdd8c957b062bc1.js +1 -0
  98. package/assets/esri/core/workers/chunks/b90509b2088fd444fc39.js +1 -0
  99. package/assets/esri/core/workers/chunks/{b9e9cb354822c6d995a4.js → bea473dba8e57617a71d.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{0d02c6ad1f4688bfa374.js → bf7c44644fe7b0aa60cf.js} +1 -1
  101. package/assets/esri/core/workers/chunks/c1a70f025e90d97fac6d.js +1 -0
  102. package/assets/esri/core/workers/chunks/{d72488db62fcf39447b6.js → c23d965a55215168a1a2.js} +1 -1
  103. package/assets/esri/core/workers/chunks/c3192cfe115ce354ffbc.js +1 -0
  104. package/assets/esri/core/workers/chunks/c3d768801f2f6cb9d5d0.js +1 -0
  105. package/assets/esri/core/workers/chunks/d09a0b2dc3a6fc10fa41.js +1 -0
  106. package/assets/esri/core/workers/chunks/d21526570300597aa6ae.js +1 -0
  107. package/assets/esri/core/workers/chunks/d2ffb0f21363c0d3d2a9.js +1 -0
  108. package/assets/esri/core/workers/chunks/{ec10151a2a95e95a0bb5.js → d304fe0ac836afd46e3d.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{37a7bd30352b1309b8f8.js → d3f05b8e4bd53eb1eb9d.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{17de7a324dfa7f57ad5d.js → d780e946149b1c3d1246.js} +1 -1
  111. package/assets/esri/core/workers/chunks/dc037f1496bb4aa40d10.js +1 -0
  112. package/assets/esri/core/workers/chunks/{8cbb04a9065aa3756638.js → dc04a8ba6c770bdc2bd4.js} +1 -1
  113. package/assets/esri/core/workers/chunks/dd5a71818a989a6edb00.js +1 -0
  114. package/assets/esri/core/workers/chunks/{89820b200ee44e678af5.js → dd891a98105904f8a06b.js} +1 -1
  115. package/assets/esri/core/workers/chunks/e17edd48179d41ddf1e7.js +1 -0
  116. package/assets/esri/core/workers/chunks/e323086de328a164f7f0.js +1 -0
  117. package/assets/esri/core/workers/chunks/ea50a6a994e5ee578d97.js +1 -0
  118. package/assets/esri/core/workers/chunks/{655b55ac0cd533d7e9d7.js → ecf074743183c1749581.js} +1 -1
  119. package/assets/esri/core/workers/chunks/f067b4fc65b835437afd.js +1 -0
  120. package/assets/esri/core/workers/chunks/f0e5c82e9c4fbe3c9d0a.js +1 -0
  121. package/assets/esri/core/workers/chunks/f96b24c075771d028e20.js +1 -0
  122. package/assets/esri/core/workers/chunks/{5790d171072b3c7d108f.js → f9a6de00c628538f07f6.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{2c607d30ff8ca1b61286.js → fe0c3b7c9b428d9c3f25.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{49a1a633bb0d93764aae.js → fffea9587ec14c6d34e8.js} +1 -1
  125. package/assets/esri/themes/base/_mixins.scss +1 -1
  126. package/assets/esri/themes/base/widgets/_Directions.scss +0 -6
  127. package/assets/esri/themes/base/widgets/_Legend.scss +8 -7
  128. package/assets/esri/themes/dark/main.css +1 -1
  129. package/assets/esri/themes/dark-blue/main.css +1 -1
  130. package/assets/esri/themes/dark-green/main.css +1 -1
  131. package/assets/esri/themes/dark-purple/main.css +1 -1
  132. package/assets/esri/themes/dark-red/main.css +1 -1
  133. package/assets/esri/themes/light/main.css +1 -1
  134. package/assets/esri/themes/light/view.css +1 -1
  135. package/assets/esri/themes/light-blue/main.css +1 -1
  136. package/assets/esri/themes/light-green/main.css +1 -1
  137. package/assets/esri/themes/light-purple/main.css +1 -1
  138. package/assets/esri/themes/light-red/main.css +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  145. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  146. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  147. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  148. package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
  149. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  150. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  151. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  152. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  153. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  154. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  155. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  156. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  157. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  158. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  159. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  160. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  161. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  162. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  163. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  164. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  165. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  166. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  167. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  168. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  169. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  170. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  171. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  172. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  173. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  174. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  175. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  176. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  177. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  178. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  179. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  180. package/chunks/Fog.glsl.js +12 -24
  181. package/chunks/Heatmap.glsl.js +10 -0
  182. package/chunks/HeatmapDensity.glsl.js +21 -0
  183. package/chunks/Precipitation.glsl.js +2 -2
  184. package/core/maybe.js +1 -1
  185. package/core/promiseUtils.js +1 -1
  186. package/interfaces.d.ts +2432 -231
  187. package/layers/ImageryTileLayer.js +1 -1
  188. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  189. package/layers/graphics/featureConversionUtils.js +1 -1
  190. package/layers/mixins/ArcGISImageService.js +1 -1
  191. package/layers/support/imageryRendererUtils.js +1 -1
  192. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  193. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  194. package/package.json +2 -2
  195. package/rasterRenderers.js +1 -1
  196. package/renderers/DictionaryRenderer.js +1 -1
  197. package/renderers/FlowRenderer.d.ts +4 -0
  198. package/renderers/FlowRenderer.js +5 -0
  199. package/renderers/support/DictionaryLoader.js +5 -0
  200. package/renderers/support/RasterSymbolizer.js +1 -1
  201. package/renderers/support/rasterRendererHelper.js +1 -1
  202. package/renderers/support/rendererConversion.js +1 -1
  203. package/rest/geoprocessor/GPOptions.js +1 -1
  204. package/rest/print.js +1 -1
  205. package/rest/support/DirectionLine.js +1 -1
  206. package/rest/support/DirectionPoint.js +1 -1
  207. package/rest/support/FeatureSet.js +1 -1
  208. package/rest/support/LegendLayer.js +1 -1
  209. package/rest/support/LinearUnit.js +1 -1
  210. package/rest/support/PointBarrier.js +1 -1
  211. package/rest/support/PolygonBarrier.js +1 -1
  212. package/rest/support/PolylineBarrier.js +1 -1
  213. package/rest/support/RasterData.js +1 -1
  214. package/smartMapping/raster/renderers/flow.js +5 -0
  215. package/smartMapping/raster/support/utils.js +1 -1
  216. package/support/basemapUtils.js +1 -1
  217. package/support/featureFlags.js +1 -1
  218. package/support/revision.js +1 -1
  219. package/symbols/TextSymbol3DLayer.js +1 -1
  220. package/symbols/cim/effects/EffectArrow.js +1 -1
  221. package/symbols/support/Symbol3DHalo.js +1 -1
  222. package/symbols/support/Symbol3DTextBackground.js +5 -0
  223. package/symbols/support/previewSymbol2D.js +1 -1
  224. package/symbols/support/svgUtils.js +1 -1
  225. package/tasks/Geoprocessor.js +1 -1
  226. package/views/2d/FrameTask.js +1 -1
  227. package/views/2d/ViewState.js +1 -1
  228. package/views/2d/constraints/GeometryConstraint.js +1 -1
  229. package/views/2d/engine/BitmapTileContainer.js +1 -1
  230. package/views/2d/engine/DisplayObject.js +1 -1
  231. package/views/2d/engine/RasterTileContainer.js +1 -1
  232. package/views/2d/engine/RasterVFContainer.js +5 -0
  233. package/views/2d/engine/RasterVFDisplayObject.js +1 -1
  234. package/views/2d/engine/RasterVFTileContainer.js +1 -1
  235. package/views/2d/engine/Stage.js +1 -1
  236. package/views/2d/engine/flow/BrushFlow.js +1 -1
  237. package/views/2d/engine/flow/FlowDisplayData.js +1 -1
  238. package/views/2d/engine/flow/FlowGLResources.js +1 -1
  239. package/views/2d/engine/flow/FlowStyle.js +1 -1
  240. package/views/2d/engine/flow/FlowView2D.js +5 -0
  241. package/views/2d/engine/flow/dataUtils.js +1 -1
  242. package/views/2d/engine/flow/flowRendererUtils.js +5 -0
  243. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  244. package/views/2d/engine/webgl/brushes/raster/BrushVectorField.js +1 -1
  245. package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
  246. package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
  247. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  248. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  249. package/views/2d/input/handlers/DragPan.js +1 -1
  250. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  251. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  252. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  253. package/views/2d/layers/KMLLayerView2D.js +1 -1
  254. package/views/2d/layers/LayerView2D.js +1 -1
  255. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  256. package/views/2d/layers/TileLayerView2D.js +1 -1
  257. package/views/2d/layers/WMSLayerView2D.js +1 -1
  258. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  259. package/views/2d/layers/features/Pipeline.js +1 -1
  260. package/views/2d/layers/features/createSymbolSchema.js +5 -0
  261. package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
  262. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  263. package/views/2d/layers/features/schemaUtils.js +1 -1
  264. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  265. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  266. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  267. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  268. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  269. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  270. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  271. package/views/2d/layers/imagery/ImageryVFStrategy.js +5 -0
  272. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  273. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  274. package/views/2d/layers/imagery/VectorFieldView2D.js +5 -0
  275. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  276. package/views/2d/navigation/MapViewNavigation.js +1 -1
  277. package/views/2d/navigation/actions/Pan.js +1 -1
  278. package/views/2d/viewpointUtils.js +1 -1
  279. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  280. package/views/3d/environment/Fog.js +1 -1
  281. package/views/3d/environment/Precipitation.js +1 -1
  282. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  283. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  284. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  285. package/views/3d/environment/weather.js +1 -1
  286. package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
  287. package/views/3d/layerViewModuleImportUtils.js +1 -1
  288. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  289. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  290. package/views/3d/layers/IRouteLayerView3D.js +4 -0
  291. package/views/3d/layers/RouteLayerView3D.js +5 -0
  292. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  293. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  294. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  295. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  296. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  297. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  298. package/views/3d/layers/graphics/Labeler.js +1 -1
  299. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  300. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  301. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  302. package/views/3d/terrain/OverlayRenderer.js +1 -1
  303. package/views/3d/terrain/terrainUtils.js +1 -1
  304. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +5 -0
  305. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  306. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  307. package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
  308. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +5 -0
  309. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +5 -0
  310. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +5 -0
  311. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +5 -0
  312. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +5 -0
  313. package/views/MapView.js +1 -1
  314. package/views/ToolViewManager.js +1 -1
  315. package/views/View.js +1 -1
  316. package/views/draw/support/Box.js +1 -1
  317. package/views/draw/support/GraphicMover.js +1 -1
  318. package/views/draw/support/HighlightHelper.js +5 -0
  319. package/views/draw/support/Reshape.js +1 -1
  320. package/views/draw/support/layerUtils.js +1 -1
  321. package/views/interactive/InteractiveToolBase.js +1 -1
  322. package/views/support/WatchUpdatingTracking.js +1 -1
  323. package/views/support/projectionUtils.js +1 -1
  324. package/views/webgl/RenderingContext.js +1 -1
  325. package/views/webgl/enums.js +1 -1
  326. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  327. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  328. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  329. package/widgets/BasemapToggle.js +1 -1
  330. package/widgets/Directions/support/resources.js +1 -1
  331. package/widgets/Directions.js +1 -1
  332. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  333. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  334. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  335. package/widgets/FeatureTable.js +1 -1
  336. package/widgets/Legend/styles/Card.js +1 -1
  337. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  338. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  339. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  340. package/widgets/Sketch/SketchViewModel.js +1 -1
  341. package/widgets/Sketch.js +1 -1
  342. package/widgets/TimeSlider.js +1 -1
  343. package/widgets/Weather/WeatherViewModel.js +1 -1
  344. package/widgets/Weather.js +1 -1
  345. package/widgets/Widget.js +1 -1
  346. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  347. package/widgets/support/vnodeCache.js +5 -0
  348. package/widgets/support/widgetUtils.js +1 -1
  349. package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +0 -1
  350. package/assets/esri/core/workers/chunks/0c15d77d8e817cf45a9a.js +0 -1
  351. package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +0 -1
  352. package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +0 -1
  353. package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +0 -1
  354. package/assets/esri/core/workers/chunks/1877ab1b6a115dbba1c5.js +0 -1
  355. package/assets/esri/core/workers/chunks/197ec52641aed20029c6.js +0 -1
  356. package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +0 -1
  357. package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +0 -1
  358. package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +0 -1
  359. package/assets/esri/core/workers/chunks/2629adf79e7fd9f25f07.js +0 -1
  360. package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +0 -1
  361. package/assets/esri/core/workers/chunks/2b25fc7945a187c2bb9d.js +0 -1
  362. package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +0 -1
  363. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +0 -1
  364. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +0 -1
  365. package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +0 -1
  366. package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +0 -1
  367. package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +0 -1
  368. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +0 -1
  369. package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +0 -1
  370. package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +0 -1
  371. package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +0 -1
  372. package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +0 -1
  373. package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +0 -1
  374. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +0 -1
  375. package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +0 -1
  376. package/assets/esri/core/workers/chunks/96f148a556a2418038de.js +0 -1
  377. package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +0 -1
  378. package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +0 -1
  379. package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +0 -1
  380. package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +0 -1
  381. package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +0 -1
  382. package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +0 -1
  383. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +0 -1
  384. package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +0 -1
  385. package/assets/esri/core/workers/chunks/c984b3040e120e502b11.js +0 -1
  386. package/assets/esri/core/workers/chunks/cdbc005eebec1503b99d.js +0 -1
  387. package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +0 -1
  388. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +0 -1
  389. package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +0 -1
  390. package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +0 -1
  391. package/assets/esri/core/workers/chunks/e218bde41ffbcc5194f5.js +0 -1
  392. package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +0 -1
  393. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +0 -1
  394. package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +0 -1
  395. package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +0 -1
  396. package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +0 -1
  397. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +0 -1
  398. package/renderers/AnimatedFlowRenderer.d.ts +0 -4
  399. package/renderers/AnimatedFlowRenderer.js +0 -5
  400. package/views/2d/engine/flow/AnimatedFlowView2D.js +0 -5
  401. package/views/2d/engine/flow/animatedFlowRendererUtils.js +0 -5
  402. package/views/2d/layers/imagery/ImageryGraphicsView2D.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3578],{74669:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},69801:(e,t,s)=>{s.d(t,{Xq:()=>a,WJ:()=>c});var i,n,r=s(70586),o=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class a{constructor(e,t,s){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",s&&(this._storage.registerRemoveFunc(this._namespace,s),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this._namespace+e,t,s,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this._namespace+e,t,s)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class c{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.Z,this._users=new o.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,s,n){const r=this._db.get(e);if(r&&(this._size-=r.size,this._db.delete(e),r.entry!==t&&this._notifyRemove(e,r.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,t,i.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const o=1+Math.max(n,-3)- -3;this._db.set(e,{entry:t,size:s,lifetime:o,lives:o}),this._size+=s,this._checkSizeLimit()}updateSize(e,t,s){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;s>this._maxSize;){const n=this._notifyRemove(e,t,i.SOME);if(!((0,r.pC)(n)&&n>0))return void this._db.delete(e);s=n}n.size=s,this._size+=s,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const n=s.namespace;if(i.startsWith(n)){const s=t[n]||0;t[n]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const s=this._notifyRemove(e,t.entry,i.SOME);(0,r.pC)(s)&&s>0&&(this._size+=s,t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},36030:(e,t,s)=>{s.d(t,{J:()=>r});var i=s(35454),n=s(5600);function r(e,t={}){var s;const r=e instanceof i.X?e:new i.X(e,t),o={type:null==(s=null==t?void 0:t.ignoreUnknown)||s?r.apiValues:String,json:{type:r.jsonValues,read:(null==t||!t.readOnly)&&{reader:r.read},write:{writer:r.write}}};return void 0!==(null==t?void 0:t.readOnly)&&(o.readOnly=!!t.readOnly),void 0!==(null==t?void 0:t.default)&&(o.json.default=t.default),void 0!==(null==t?void 0:t.name)&&(o.json.name=t.name),(0,n.Cb)(o)}},67900:(e,t,s)=>{s.d(t,{gV:()=>G,En:()=>z,Z7:()=>k,c9:()=>Z,_R:()=>x,qE:()=>C,cM:()=>B,hd:()=>u,ty:()=>U,Jo:()=>P,$C:()=>R}),s(80442);var i=s(35454),n=s(70586),r=s(24678),o=s(82971),a=s(68441),c=s(8744),l=s(58116);const u=39.37,h=a.sv.radius*Math.PI/200,f=/UNIT\[([^\]]+)\]\]$/i,m=l.Z,d=/UNIT\[([^\]]+)\]/i,p=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),_=(0,i.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),y=e=>e*e,g=e=>e*e*e,v={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:y(.001)},"square-centimeters":{inBaseUnits:y(.01)},"square-decimeters":{inBaseUnits:y(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:y(1e3)},"square-inches":{inBaseUnits:y(.0254)},"square-feet":{inBaseUnits:y(.3048)},"square-yards":{inBaseUnits:y(.9144)},"square-miles":{inBaseUnits:y(1609.344)},"square-us-feet":{inBaseUnits:y(1200/3937)},acres:{inBaseUnits:.0015625*y(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*g(.001)},"cubic-centimeters":{inBaseUnits:1e3*g(.01)},"cubic-decimeters":{inBaseUnits:1e3*g(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*g(1e3)},"cubic-inches":{inBaseUnits:1e3*g(.0254)},"cubic-feet":{inBaseUnits:1e3*g(.3048)},"cubic-yards":{inBaseUnits:1e3*g(.9144)},"cubic-miles":{inBaseUnits:1e3*g(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},S=function(){const e={};for(const t in v)for(const s in v[t].units)e[s]=t;return e}();function b(e){const t=S[e];if(t)return t;throw new Error("unknown measure")}function w(e,t=null){return t=t||b(e),v[t].baseUnit===e}function z(e,t,s){if(t===s)return e;const i=b(t);if(i!==b(s))throw new Error("incompatible units");const n=w(t,i)?e:function(e,t,s){return e*v[s].units[t].inBaseUnits}(e,t,i);return w(s,i)?n:function(e,t,s){return e/v[s].units[t].inBaseUnits}(n,s,i)}function U(e,t,s){return z(e,t,"meters")/(s*Math.PI/180)}function R(e){return _.fromJSON(e.toLowerCase())||null}function x(e){if(e&&"object"==typeof e&&!(0,c.N$)(e))return 1;const t=Z(e);return t>1e5?1:t}function B(e){return Z(e)>=(e instanceof o.Z?(0,r.Iu)(e).metersPerDegree:1e5)?"meters":C(e)}function Z(e,t=a.sv.metersPerDegree){return k(e,!0)||t}function k(e,t=!1){let s,i,n=null;if(null!=e&&("object"==typeof e?(s=e.wkid,i=e.wkt):"number"==typeof e?s=e:"string"==typeof e&&(i=e)),s){if((0,c.o$)(s))return a.yr.metersPerDegree;if((0,c.ME)(s))return a.Z1.metersPerDegree;n=m.values[m[s]],!n&&t&&p.has(s)&&(n=h)}else i&&(A(i)?n=M(f.exec(i),n):I(i)&&(n=M(d.exec(i),n)));return n}function M(e,t){return e&&e[1]?q(e[1]):t}function q(e){return parseFloat(e.split(",")[1])}function C(e){let t,s,i=null;if(null!=e&&("object"==typeof e?(t=e.wkid,s=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(s=e)),t)i=m.units[m[t]];else if(s){const e=A(s)?f:I(s)?d:null;if(e){const t=e.exec(s);t&&t[1]&&(i=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let s=t&&t[1];if(!s||-1===m.units.indexOf(s)){const t=q(e);s=null;const i=m.values;for(let e=0;e<i.length;++e)if(Math.abs(t-i[e])<1e-7){s=m.units[e];break}}return s}(t[1]))}}return(0,n.pC)(i)?R(i):null}function I(e){return/^GEOCCS/i.test(e)}function A(e){return/^PROJCS/i.test(e)}const O={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},E={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},G=(0,i.w)()(O),P=(0,i.w)()(E);(0,i.w)()({...O,...E})},24678:(e,t,s)=>{s.d(t,{GG:()=>a,HQ:()=>c,VY:()=>l,wY:()=>u,Iu:()=>f,e8:()=>m,rS:()=>h});var i=s(82971),n=s(68441),r=s(8744);function o(e){return new i.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const a=o(n.sv),c=o(n.yr),l=o(n.Z1),u=new i.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function h(e){return e&&((0,r.BZ)(e)||e===c)?c:e&&((0,r.V2)(e)||e===l)?l:a}function f(e){return e&&((0,r.BZ)(e)||e===c)?n.yr:e&&((0,r.V2)(e)||e===l)?n.Z1:n.sv}function m(e){return(0,r.o$)(e)?n.yr:(0,r.ME)(e)?n.Z1:n.sv}},38581:(e,t,s)=>{s.d(t,{aX:()=>b});var i=s(68773),n=s(20102),r=s(92604),o=s(70586),a=s(17332),c=s(58901),l=s(73913),u=s(8744),h=s(40488),f=(s(66577),s(3172)),m=s(17452),d=s(33955);const p=r.Z.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function g(e,t,s){if(t){const t=function(e,t){if(!(e instanceof c.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw p.error(e),new n.Z(e)}const s=(0,l.x3)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],c=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/c,u=(o-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,o=u*i+n,a=l*i+r;s.push([o,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:i,spatialReference:e.spatialReference}):new c.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.Sx)(t,!0)}return s&&(e=(0,l.Sy)(e,s)),e}function v(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.XZ)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.XZ)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.XZ)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.XZ)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.x3)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(_(e))for(const t of(0,l.x3)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,l.x3)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function b(e,t,s){var n;if(!Array.isArray(e))return b([e],t);const r=null!=(n=null==t?void 0:t.url)?n:i.Z.geometryServiceUrl;let p,_,y,w,z,U,R,x,B=0;const Z=[],k=[];for(const t of e)if((0,o.Wi)(t))k.push(t);else if(p||(p=t.spatialReference,_=(0,u.C5)(p),y=p.isWebMercator,U=y?102100:4326,w=l.UZ[U].maxX,z=l.UZ[U].minX,R=l.UZ[U].plus180Line,x=l.UZ[U].minus180Line),_)if("mesh"===t.type)k.push(t);else if("point"===t.type)k.push(v(t.clone(),w,z));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>v(e,w,z))),k.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);k.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,l.XZ)(e.xmin,z)*(2*w);let i=0===s?t.clone():(0,l.Sy)(t.clone(),s);e.offset(s,0),e.intersects(R)&&e.xmax!==w?(B=e.xmax>B?e.xmax:B,i=g(i,y),Z.push(i),k.push("cut")):e.intersects(x)&&e.xmin!==z?(B=e.xmax*(2*w)>B?e.xmax*(2*w):B,i=g(i,y,360),Z.push(i),k.push("cut")):k.push(i)}else k.push(t.clone());else k.push(t);let M=(0,l.XZ)(B,w),q=-90;const C=M,I=new c.Z;for(;M>0;){const e=360*M-180;I.addPath([[e,q],[e,-1*q]]),q*=-1,M--}if(Z.length>0&&C>0){const t=S(Z,await async function(e,t,s,i){const n="string"==typeof e?(0,m.mN)(e):e,r=t[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,f.default)(n.path+"/cut",o),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map((e=>{const t=(0,d.im)(e);return t.spatialReference=r,t}))}}(r,Z,I,s)),i=[],n=[];for(let s=0;s<k.length;s++){const r=k[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];(0,o.pC)(a)&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(y?(0,h.$)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,m.mN)(e):e,n=t[0].spatialReference,r=(0,d.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid?n.wkid:JSON.stringify(n),geometries:JSON.stringify((a=t,{geometryType:(0,d.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}};var a;return function(e,t,s){const i=(0,d.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}((await(0,f.default)(i.path+"/simplify",o)).data,r,n)}(r,i,s),c=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?c.push(t):c.push(y?(0,h.$)(a.shift()):a.shift())}return c}const A=[];for(let e=0;e<k.length;e++){const t=k[e];if("cut"!==t)A.push(t);else{const e=Z.shift();A.push(!0===y?(0,h.$)(e):e)}}return Promise.resolve(A)}},73913:(e,t,s)=>{s.d(t,{UZ:()=>o,x3:()=>l,XZ:()=>a,Sy:()=>c});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,r.oU)(e)?e.rings:e.paths}},69285:(e,t,s)=>{s.d(t,{k:()=>o});var i=s(70586),n=s(67900),r=s(8744);function o(e,t,s){if((0,i.Wi)(t)||(0,i.Wi)(s)||s.vcsWkid||(0,r.fS)(t,s))return null;const o=(0,n._R)(t)/(0,n._R)(s);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,o);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},57316:(e,t,s)=>{s.d(t,{Z:()=>_});var i=s(43697),n=s(35454),r=s(5600),o=(s(67676),s(80442),s(75215),s(52011)),a=s(96674),c=s(94593),l=s(89164);const u=new n.X({classBreaksDef:"class-breaks-definition",uniqueValueDef:"unique-value-definition"});let h=class extends a.wq{constructor(){super(...arguments),this.baseSymbol=null,this.colorRamp=null,this.type=null}};(0,i._)([(0,r.Cb)({type:l.Z,json:{write:!0}})],h.prototype,"baseSymbol",void 0),(0,i._)([(0,r.Cb)({types:c.V,json:{read:{reader:c.i},write:!0}})],h.prototype,"colorRamp",void 0),(0,i._)([(0,r.Cb)({json:{read:u.read,write:u.write}})],h.prototype,"type",void 0),h=(0,i._)([(0,o.j)("esri.rest.support.ClassificationDefinition")],h);const f=h,m=new n.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),d=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let p=class extends f{constructor(){super(...arguments),this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null,this.type="class-breaks-definition"}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"breakCount",void 0),(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"classificationField",void 0),(0,i._)([(0,r.Cb)({type:String,json:{read:m.read,write:m.write}})],p.prototype,"classificationMethod",void 0),(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"normalizationField",void 0),(0,i._)([(0,r.Cb)({json:{read:d.read,write:d.write}})],p.prototype,"normalizationType",void 0),(0,i._)([(0,r.Cb)({value:null,json:{write:!0}})],p.prototype,"standardDeviationInterval",null),(0,i._)([(0,r.Cb)({value:null,json:{write:!0}})],p.prototype,"definedInterval",null),(0,i._)([(0,r.Cb)()],p.prototype,"type",void 0),p=(0,i._)([(0,o.j)("esri.rest.support.ClassBreaksDefinition")],p);const _=p}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4854],{74669:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},69801:(e,t,s)=>{s.d(t,{Xq:()=>a,WJ:()=>c});var i,n,r=s(70586),o=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class a{constructor(e,t,s){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",s&&(this._storage.registerRemoveFunc(this._namespace,s),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this._namespace+e,t,s,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this._namespace+e,t,s)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class c{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.Z,this._users=new o.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,s,n){const r=this._db.get(e);if(r&&(this._size-=r.size,this._db.delete(e),r.entry!==t&&this._notifyRemove(e,r.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,t,i.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const o=1+Math.max(n,-3)- -3;this._db.set(e,{entry:t,size:s,lifetime:o,lives:o}),this._size+=s,this._checkSizeLimit()}updateSize(e,t,s){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;s>this._maxSize;){const n=this._notifyRemove(e,t,i.SOME);if(!((0,r.pC)(n)&&n>0))return void this._db.delete(e);s=n}n.size=s,this._size+=s,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const n=s.namespace;if(i.startsWith(n)){const s=t[n]||0;t[n]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const s=this._notifyRemove(e,t.entry,i.SOME);(0,r.pC)(s)&&s>0&&(this._size+=s,t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},36030:(e,t,s)=>{s.d(t,{J:()=>r});var i=s(35454),n=s(5600);function r(e,t={}){var s;const r=e instanceof i.X?e:new i.X(e,t),o={type:null==(s=null==t?void 0:t.ignoreUnknown)||s?r.apiValues:String,json:{type:r.jsonValues,read:(null==t||!t.readOnly)&&{reader:r.read},write:{writer:r.write}}};return void 0!==(null==t?void 0:t.readOnly)&&(o.readOnly=!!t.readOnly),void 0!==(null==t?void 0:t.default)&&(o.json.default=t.default),void 0!==(null==t?void 0:t.name)&&(o.json.name=t.name),(0,n.Cb)(o)}},67900:(e,t,s)=>{s.d(t,{gV:()=>G,En:()=>z,Z7:()=>M,c9:()=>k,_R:()=>x,qE:()=>I,cM:()=>B,hd:()=>u,ty:()=>U,Jo:()=>P,$C:()=>R}),s(80442);var i=s(35454),n=s(70586),r=s(24678),o=s(82971),a=s(68441),c=s(8744),l=s(58116);const u=39.37,h=a.sv.radius*Math.PI/200,f=/UNIT\[([^\]]+)\]\]$/i,m=l.Z,d=/UNIT\[([^\]]+)\]/i,p=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),_=(0,i.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),y=e=>e*e,g=e=>e*e*e,v={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:y(.001)},"square-centimeters":{inBaseUnits:y(.01)},"square-decimeters":{inBaseUnits:y(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:y(1e3)},"square-inches":{inBaseUnits:y(.0254)},"square-feet":{inBaseUnits:y(.3048)},"square-yards":{inBaseUnits:y(.9144)},"square-miles":{inBaseUnits:y(1609.344)},"square-us-feet":{inBaseUnits:y(1200/3937)},acres:{inBaseUnits:.0015625*y(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*g(.001)},"cubic-centimeters":{inBaseUnits:1e3*g(.01)},"cubic-decimeters":{inBaseUnits:1e3*g(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*g(1e3)},"cubic-inches":{inBaseUnits:1e3*g(.0254)},"cubic-feet":{inBaseUnits:1e3*g(.3048)},"cubic-yards":{inBaseUnits:1e3*g(.9144)},"cubic-miles":{inBaseUnits:1e3*g(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},S=function(){const e={};for(const t in v)for(const s in v[t].units)e[s]=t;return e}();function b(e){const t=S[e];if(t)return t;throw new Error("unknown measure")}function w(e,t=null){return t=t||b(e),v[t].baseUnit===e}function z(e,t,s){if(t===s)return e;const i=b(t);if(i!==b(s))throw new Error("incompatible units");const n=w(t,i)?e:function(e,t,s){return e*v[s].units[t].inBaseUnits}(e,t,i);return w(s,i)?n:function(e,t,s){return e/v[s].units[t].inBaseUnits}(n,s,i)}function U(e,t,s){return z(e,t,"meters")/(s*Math.PI/180)}function R(e){return _.fromJSON(e.toLowerCase())||null}function x(e){if(e&&"object"==typeof e&&!(0,c.N$)(e))return 1;const t=k(e);return t>1e5?1:t}function B(e){return k(e)>=(e instanceof o.Z?(0,r.Iu)(e).metersPerDegree:1e5)?"meters":I(e)}function k(e,t=a.sv.metersPerDegree){return M(e,!0)||t}function M(e,t=!1){let s,i,n=null;if(null!=e&&("object"==typeof e?(s=e.wkid,i=e.wkt):"number"==typeof e?s=e:"string"==typeof e&&(i=e)),s){if((0,c.o$)(s))return a.yr.metersPerDegree;if((0,c.ME)(s))return a.Z1.metersPerDegree;n=m.values[m[s]],!n&&t&&p.has(s)&&(n=h)}else i&&(O(i)?n=q(f.exec(i),n):A(i)&&(n=q(d.exec(i),n)));return n}function q(e,t){return e&&e[1]?C(e[1]):t}function C(e){return parseFloat(e.split(",")[1])}function I(e){let t,s,i=null;if(null!=e&&("object"==typeof e?(t=e.wkid,s=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(s=e)),t)i=m.units[m[t]];else if(s){const e=O(s)?f:A(s)?d:null;if(e){const t=e.exec(s);t&&t[1]&&(i=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let s=t&&t[1];if(!s||-1===m.units.indexOf(s)){const t=C(e);s=null;const i=m.values;for(let e=0;e<i.length;++e)if(Math.abs(t-i[e])<1e-7){s=m.units[e];break}}return s}(t[1]))}}return(0,n.pC)(i)?R(i):null}function A(e){return/^GEOCCS/i.test(e)}function O(e){return/^PROJCS/i.test(e)}const Z={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},E={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},G=(0,i.w)()(Z),P=(0,i.w)()(E);(0,i.w)()({...Z,...E})},24678:(e,t,s)=>{s.d(t,{GG:()=>a,HQ:()=>c,VY:()=>l,wY:()=>u,Iu:()=>f,e8:()=>m,rS:()=>h});var i=s(82971),n=s(68441),r=s(8744);function o(e){return new i.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const a=o(n.sv),c=o(n.yr),l=o(n.Z1),u=new i.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function h(e){return e&&((0,r.BZ)(e)||e===c)?c:e&&((0,r.V2)(e)||e===l)?l:a}function f(e){return e&&((0,r.BZ)(e)||e===c)?n.yr:e&&((0,r.V2)(e)||e===l)?n.Z1:n.sv}function m(e){return(0,r.o$)(e)?n.yr:(0,r.ME)(e)?n.Z1:n.sv}},70132:(e,t,s)=>{s.d(t,{aX:()=>x});var i=s(68773),n=s(20102),r=s(92604),o=s(70586),a=s(17332),c=s(58901),l=s(82971),u=s(33955);const h={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new c.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:l.Z.WebMercator}),minus180Line:new c.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:l.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new c.Z({paths:[[[180,-180],[180,180]]],spatialReference:l.Z.WGS84}),minus180Line:new c.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:l.Z.WGS84})}};function f(e,t){return Math.ceil((e-t)/(2*t))}function m(e,t){const s=d(e);for(const e of s)for(const s of e)s[0]+=t;return e}function d(e){return(0,u.oU)(e)?e.rings:e.paths}var p=s(8744),_=s(40488),y=(s(66577),s(3172)),g=s(17452);function v(e){return{geometryType:(0,u.Ji)(e[0]),geometries:e.map((e=>e.toJSON()))}}const S=r.Z.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function z(e,t,s){if(t){const t=function(e,t){if(!(e instanceof c.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw S.error(e),new n.Z(e)}const s=d(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],c=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/c,u=(o-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,o=u*i+n,a=l*i+r;s.push([o,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:i,spatialReference:e.spatialReference}):new c.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,_.Sx)(t,!0)}return s&&(e=m(e,s)),e}function U(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=f(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=f(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=f(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=f(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function R(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=d(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*f(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(b(e))for(const t of d(r))e[n]=e[n].addRing(t);else if(w(e))for(const t of d(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function x(e,t,s){var n;if(!Array.isArray(e))return x([e],t);const r=null!=(n=null==t?void 0:t.url)?n:i.Z.geometryServiceUrl;let l,d,S,b,w,B,k,M,q=0;const C=[],I=[];for(const t of e)if((0,o.Wi)(t))I.push(t);else if(l||(l=t.spatialReference,d=(0,p.C5)(l),S=l.isWebMercator,B=S?102100:4326,b=h[B].maxX,w=h[B].minX,k=h[B].plus180Line,M=h[B].minus180Line),d)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(U(t.clone(),b,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>U(e,b,w))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);I.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=f(e.xmin,w)*(2*b);let i=0===s?t.clone():m(t.clone(),s);e.offset(s,0),e.intersects(k)&&e.xmax!==b?(q=e.xmax>q?e.xmax:q,i=z(i,S),C.push(i),I.push("cut")):e.intersects(M)&&e.xmin!==w?(q=e.xmax*(2*b)>q?e.xmax*(2*b):q,i=z(i,S,360),C.push(i),I.push("cut")):I.push(i)}else I.push(t.clone());else I.push(t);let A=f(q,b),O=-90;const Z=A,E=new c.Z;for(;A>0;){const e=360*A-180;E.addPath([[e,O],[e,-1*O]]),O*=-1,A--}if(C.length>0&&Z>0){const t=R(C,await async function(e,t,s,i){const n="string"==typeof e?(0,g.mN)(e):e,r=t[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,y.default)(n.path+"/cut",o),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map((e=>{const t=(0,u.im)(e);return t.spatialReference=r,t}))}}(r,C,E,s)),i=[],n=[];for(let s=0;s<I.length;s++){const r=I[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];(0,o.pC)(a)&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(S?(0,_.$)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,g.mN)(e):e,n=t[0].spatialReference,r=(0,u.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid?n.wkid:JSON.stringify(n),geometries:JSON.stringify(v(t))}};return function(e,t,s){const i=(0,u.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}((await(0,y.default)(i.path+"/simplify",o)).data,r,n)}(r,i,s),c=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?c.push(t):c.push(S?(0,_.$)(a.shift()):a.shift())}return c}const G=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)G.push(t);else{const e=C.shift();G.push(!0===S?(0,_.$)(e):e)}}return Promise.resolve(G)}},69285:(e,t,s)=>{s.d(t,{k:()=>o});var i=s(70586),n=s(67900),r=s(8744);function o(e,t,s){if((0,i.Wi)(t)||(0,i.Wi)(s)||s.vcsWkid||(0,r.fS)(t,s))return null;const o=(0,n._R)(t)/(0,n._R)(s);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,o);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},57316:(e,t,s)=>{s.d(t,{Z:()=>_});var i=s(43697),n=s(35454),r=s(5600),o=(s(67676),s(80442),s(75215),s(52011)),a=s(96674),c=s(94593),l=s(89164);const u=new n.X({classBreaksDef:"class-breaks-definition",uniqueValueDef:"unique-value-definition"});let h=class extends a.wq{constructor(){super(...arguments),this.baseSymbol=null,this.colorRamp=null,this.type=null}};(0,i._)([(0,r.Cb)({type:l.Z,json:{write:!0}})],h.prototype,"baseSymbol",void 0),(0,i._)([(0,r.Cb)({types:c.V,json:{read:{reader:c.i},write:!0}})],h.prototype,"colorRamp",void 0),(0,i._)([(0,r.Cb)({json:{read:u.read,write:u.write}})],h.prototype,"type",void 0),h=(0,i._)([(0,o.j)("esri.rest.support.ClassificationDefinition")],h);const f=h,m=new n.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),d=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let p=class extends f{constructor(){super(...arguments),this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null,this.type="class-breaks-definition"}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"breakCount",void 0),(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"classificationField",void 0),(0,i._)([(0,r.Cb)({type:String,json:{read:m.read,write:m.write}})],p.prototype,"classificationMethod",void 0),(0,i._)([(0,r.Cb)({json:{write:!0}})],p.prototype,"normalizationField",void 0),(0,i._)([(0,r.Cb)({json:{read:d.read,write:d.write}})],p.prototype,"normalizationType",void 0),(0,i._)([(0,r.Cb)({value:null,json:{write:!0}})],p.prototype,"standardDeviationInterval",null),(0,i._)([(0,r.Cb)({value:null,json:{write:!0}})],p.prototype,"definedInterval",null),(0,i._)([(0,r.Cb)()],p.prototype,"type",void 0),p=(0,i._)([(0,o.j)("esri.rest.support.ClassBreaksDefinition")],p);const _=p}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8683],{53073:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),o=n(95330),l=n(8667);class u extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,o.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeSpatialRelationTest(e){if(null===e.geometry)return(0,o.DB)(!1);switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}_fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);return this._parent._getFeatures(r,-1,s,n).then((()=>{this._checkCancelled(n);const t=[];for(let n=0;n<s;n++){const r=this._parent._featureFromCache(e[n]);t.push(this.executeSpatialRelationTest(r))}return(0,o.$6)(t)})).then((n=>{for(let r=0;r<t;r++)!0===n[r]?this._idstates[e[r]]=i.dj.InFeatureSet:this._idstates[e[r]]=i.dj.NotInFeatureSet;return"success"}))}_getFilteredSet(e,t,n,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s))).then((e=>{let n;return this._checkCancelled(s),n=null!==t?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),n}))}_stat(e,t,n,r,s,a,i){return""!==n?(0,o.DB)({calculated:!1}):this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_canDoAggregates(e,t,n,r,s){return""!==n||null!==r||null===this._parent?(0,o.DB)(!1):this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}_getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){return null===this._parent?(0,o.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(91136),s=n(90961),a=n(90658),i=n(95330);class o extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}_getSet(){return(0,i.DB)(this._wset)}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}_getFeature(){return(0,i.d1)(new Error("No Feature Found in EmptySet"))}queryAttachments(){return(0,i.DB)([])}_getFeatures(){return(0,i.DB)("success")}_featureFromCache(){return null}_fetchAndRefineFeatures(){return(0,i.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(){return(0,i.DB)(new s.Z([],[],!1,null))}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}_canDoAggregates(){return(0,i.DB)(!1)}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(95330);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=(0,r.Ue)(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=(0,r.Ue)(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}count(){return-1!==this._parent._totalCount?(0,r.DB)(this._parent._totalCount):this._parent._getSet(this._progress).then((e=>this._refineAllSets(e))).then((e=>(this._parent._totalCount=e._known.length,(0,r.DB)(this._parent._totalCount))))}_refineAllSets(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):e._candidates.length>0?"GETPAGES"===e._known[e._candidates.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress).then((e=>e._candidates.length>0?this._refineAllSets(e):(0,r.DB)(e))):(0,r.DB)(e)}}var a=n(90961),i=n(90658),o=n(48039),l=n(95002),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=(0,r.Ue)(((e,t)=>{if(!0===this._parent.loaded)return this._initialiseFeatureSet(),void e(this);this._parent.load().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t)}))),this._loadPromise}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}_canDoAggregates(e,t,n,s,a){return null===this._parent?(0,r.DB)(!1):this._parent._canDoAggregates(e,t,n,s,a)}_getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o)}_getAgregagtePhysicalPage(e,t,n){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAgregagtePhysicalPage(e,t,n)}databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==o.Z.applicationCache){const e=o.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];let t=(0,r.Ue)(((t,n)=>{this._getDatabaseTypeImpl(e,0).then((e=>{this._databaseType=e,t(this._databaseType)}),(e=>{n(e)}))}));return null!==o.Z.applicationCache&&(o.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),t),t=t.catch((e=>{throw o.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}))),this._databaseTypeProbed=t,this._databaseTypeProbed}return(0,r.DB)(this._databaseType)}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}_getDatabaseTypeImpl(e,t){return t>=e.length?(0,r.DB)(i.Bj.StandardisedNoInterval):this._runDatabaseProbe(e[t].testwhere).then((n=>!0===n?e[t].thetype:this._getDatabaseTypeImpl(e,t+1)))}_runDatabaseProbe(e){return null!==this._parent?this._parent._runDatabaseProbe(e):(0,r.d1)(new Error("Not Implemented"))}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}_getFeature(e,t,n){try{return this._checkCancelled(n),void 0!==this._featureFromCache(t)?(0,r.DB)(this._featureFromCache(t)):this._getFeatures(e,t,this._maxProcessingRate(),n).then((()=>(this._checkCancelled(n),void 0!==this._featureFromCache(t)?this._featureFromCache(t):(0,r.d1)(new Error("Feature Not Found")))))}catch(e){return(0,r.d1)(e)}}_getFeatureBatch(e,t){try{this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];return this._getFeatures(n,-1,e.length,t).then((()=>{this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}))}catch(e){return(0,r.d1)(e)}}_getFeatures(e,t,n,s){return(0,r.DB)("success")}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}_refineSetBlock(e,t,n){try{if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return this._expandPagedSet(e,this._maxQueryRate(),0,0,n).then((()=>this._refineSetBlock(e,t,n)));this._checkCancelled(n);const s=e._candidates.length;this._refineKnowns(e,t);let a=s-e._candidates.length;return 0===e._candidates.length||a>=t?(0,r.DB)(e):this._refineIfParentKnown(e,t-a,n).then((()=>{if(this._checkCancelled(n),this._refineKnowns(e,t-a),a=s-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n).then((()=>(this._checkCancelled(n),this._refineKnowns(e,t-a),e)))}return e}))}catch(e){return(0,r.d1)(e)}}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let o=!1;const l=this._candidateIdTransform(e._candidates[a]);l!==e._candidates[a]&&(o=!0);const u=this._isInFeatureSet(l);if(u===i.dj.InFeatureSet)!0===o?e._known.indexOf(l)<0&&(e._known.push(l),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}_expandPagedSet(e,t,n,s,a){return null===this._parent?(0,r.d1)(new Error("Parent Paging not implemented")):this._parent._expandPagedSet(e,t,n,s,a)}_expandPagedSetFeatureSet(e,t,n,s,a){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(s=1),0===s&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(s=2),0===s?(0,r.DB)("finished"):this._getPage(e,s,a).then((r=>n+r<t?this._expandPagedSet(e,t,n+r,0,a):"success"))}_getPage(e,t,n){const s=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){s.length=s.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)s[s.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&s.push("GETPAGES"),(0,r.DB)(t)}return this._getPhysicalPage(e,t,n).then((()=>this._getPage(e,t,n)))}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}calculateStatistic(e,t,n,r){return this._ensureLoaded().then((()=>this._stat(e,t,"",null,null,n,r).then((s=>!1===s.calculated?this._manualStat(e,t,n,r).then((e=>e.result)):s.result))))}_manualStat(e,t,n,s){switch(e.toLowerCase()){case"count":return(0,l.QX)(this,s).then((e=>({calculated:!0,result:e})));case"distinct":return(0,l.EB)(this,t,n).then((e=>({calculated:!0,result:e})));case"avg":case"mean":return(0,l.J6)(this,t,s).then((e=>({calculated:!0,result:e})));case"stdev":return(0,l.m)(this,t,s).then((e=>({calculated:!0,result:e})));case"variance":return(0,l.CA)(this,t,s).then((e=>({calculated:!0,result:e})));case"sum":return(0,l.Sm)(this,t,s).then((e=>({calculated:!0,result:e})));case"min":return(0,l.VV)(this,t,s).then((e=>({calculated:!0,result:e})));case"max":return(0,l.Fp)(this,t,s).then((e=>({calculated:!0,result:e})));default:return(0,r.DB)({calculated:!0,result:0})}}_stat(e,t,n,r,s,a,i){return this._parent._stat(e,t,n,r,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return(0,r.Ue)(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return(0,r.Ue)(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return(0,r.Ue)(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,s,a,i,o){try{if(++o>1e3)return void setTimeout((()=>{o=0,this._reduceImpl(e,t,n,s,a,i,o)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,s,this);(0,r.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,s+1,a,i,o)}),i):this._reduceImpl(e,t,u,s+1,a,i,o)}}catch(e){i(e)}}),i)}catch(e){i(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}distinct(e,t=1e3,n=null,r){return this.load().then((()=>{const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}))}min(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}))}max(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}))}avg(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}))}sum(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}))}stdev(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}))}variance(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}))}count(e){return this.load().then((()=>this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return(0,r.Ue)(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._forEachImpl(e,t,n,s,a,i)}),0);e.next().then((o=>{try{if(null===o)s(n);else{const l=t(o);null==l?this._forEachImpl(e,t,n,s,a,i):(0,r.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,s,a,i)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}convertToText(e,t){return"schema"===e?this._ensureLoaded().then((()=>JSON.stringify(this.schema()))):"featureset"===e?this._ensureLoaded().then((()=>{const e=[];return this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t).then((()=>{const t=this.schema();return t.features=e,t.spatialReference=this.spatialReference.toJSON(),JSON.stringify(t)}))})):(0,r.DB)(this.castToText())}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===(null==e?void 0:e.featureset)?this:"none"===(null==e?void 0:e.featureset)?null:{type:"FeatureSet"}}castAsJsonAsync(e=null,t=null){return"keeptype"===(null==t?void 0:t.featureset)?(0,r.DB)(this):"schema"===(null==t?void 0:t.featureset)?this._ensureLoaded().then((()=>JSON.parse(JSON.stringify(this.schema())))):"none"===(null==t?void 0:t.featureset)?(0,r.DB)(null):this._ensureLoaded().then((()=>{const n=[];return this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===(null==t?void 0:t.keepGeometryType)?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==(null==t?void 0:t.keepGeometryType)&&delete s.geometry.spatialReference,n.push(s),1}),0,e).then((()=>{const e=this.schema();return e.features=n,e.spatialReference=!0===(null==t?void 0:t.keepGeometryType)?this.spatialReference:this.spatialReference.toJSON(),e}))}))}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,TE:()=>I,y5:()=>S,oX:()=>d,vR:()=>_,DT:()=>p,bB:()=>l,hq:()=>y,zR:()=>i,XF:()=>o,fz:()=>h});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function o(e,t,n){return c(e,t,n)}function l(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,o,l;switch(e.type){case"interval":return I(c(e.value,t,n,r,s),e.qualifier,e.op);case"case_expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"param":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expr_list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary_expr":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+l+")) ");case"NOT IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+l+")) ");case"BETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"NOTBETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current_time":return _("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=a.ou.fromJSDate(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function p(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(f(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function f(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case_expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.clauses[a].value,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.else,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}return m(s)}case"param":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expr_list":{const s=[];for(const a of t.value)s.push(f(e,a,n,r));return s}case"unary_expr":return"boolean";case"binary_expr":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([f(e,t.left,n,r),f(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"bool":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current_time":return"date";case"column_ref":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=f(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=f(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=f(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return b(e.parseTree,t)}function S(e){return"column_ref"===e.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when_clause":return b(e.operand,t)||b(e.value,t);case"case_expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"param":case"null":case"bool":case"date":case"timestamp":case"string":case"number":return!1;case"expr_list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary_expr":return b(e.expr,t);case"binary_expr":return b(e.left,t)||b(e.right,t);case"column_ref":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function w(e){let t="";return t+=e.period.toUpperCase(),t}function I(e,t,n){let r="";return r="interval-period"===t.type?w(t):w(t.start)+" TO "+w(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{tj:()=>d,QX:()=>S,g3:()=>h,EB:()=>I,Fp:()=>p,J6:()=>f,VV:()=>_,m:()=>m,Sm:()=>y,CA:()=>g});var r=n(61363),s=n(90658),a=n(36515),i=n(95330);function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function c(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function h(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function d(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,s.hj)(t)||(0,s.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,s.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return o(t);case"min":return Math.min.apply(Math,t);case"sum":return c(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}function _(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.min.apply(Math,e)))}function p(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.max.apply(Math,e)))}function f(e,t,n){let r="";return!1===(0,a.y5)(t)&&(r=(0,a.DT)(t,e.fields,null)),b(e,t,n,!0).then((e=>{if(0===e.length)return null;const t=o(e);return null===t?t:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(t):t}))}function g(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:u(e)))}function m(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.sqrt(u(e))))}function y(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:c(e)))}function S(e,t){try{return e.iterator(t).count()}catch(e){return(0,i.d1)(e)}}function b(e,t,n,r=!1){try{const s=e.iterator(n);return(0,i.Ue)(((e,n)=>{w(s,[],t,r,e,n)}))}catch(e){return(0,i.d1)(e)}}function w(e,t,n,s,a,i){(0,r.U)(e.next().then((r=>{try{if(null!==r){const o=n.calculateValue(r);return null===o?!1===s&&(t[t.length]=o):t[t.length]=o,w(e,t,n,s,a,i)}a(t)}catch(e){i(e)}}),i))}function I(e,t,n=1e3,r=null){return function(e,t,n,r){try{return E(e.iterator(r),{},[],t,n)}catch(e){return(0,i.d1)(e)}}(e,t,n,r)}function E(e,t,n,r,s){return e.next().then((a=>{if(null!==a){const i=r.calculateValue(a);return null!=i&&void 0===t[i]&&(n.push(i),t[i]=1),n.length>=s&&-1!==s?n:E(e,t,n,r,s)}return n}))}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),a=n(92604),i=n(17452);const o=a.Z.getLogger("esri.assets");function l(e){if(!r.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.Z.assetsPath,e)}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),s=n(92604),a=n(95330),i=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class l{constructor(){this._clients=new Array,this._clientPromises=new Array,this._clientIdx=0}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const o=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,a.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new i.default(e,t),o(n),this._clients[s])),(()=>(o(r),null))):(this._clients[s]=new i.default(l,t),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}getAvailableClient(){let e;for(let t=0;t<this._clients.length;++t){const n=this._clients[t];if(n){if(!n.isBusy())return Promise.resolve(n)}else e=e||[],e.push(this._clientPromises[t])}return e?Promise.race(e):(this._clientIdx=(this._clientIdx+1)%this._clients.length,Promise.resolve(this._clients[this._clientIdx]))}invoke(e,t,n){let r=null;return Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n,this.closed?Promise.reject(new Error("Connection closed")):this.getAvailableClient().then((n=>n.invoke(e,t,r)))}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},25045:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(40330),s=n(20102),a=n(91460),i=n(70586),o=n(95330),l=n(94362),u=n(17202);const c={statsWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(6841)]).then(n.bind(n,36841)),geometryEngineWorker:()=>Promise.all([n.e(5837),n.e(8227)]).then(n.bind(n,48227)),CSVSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(966)]).then(n.bind(n,27793)),EdgeProcessingWorker:()=>Promise.all([n.e(6481),n.e(8936)]).then(n.bind(n,18936)),ElevationSamplerWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(4547),n.e(2781),n.e(6481),n.e(6459),n.e(3553)]).then(n.bind(n,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4588),n.e(4547),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(5404)]).then(n.bind(n,2255)),GeoJSONSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(7845)]).then(n.bind(n,97845)),LercWorker:()=>n.e(3027).then(n.bind(n,23027)),MemorySourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(639)]).then(n.bind(n,30639)),PBFDecoderWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(8961),n.e(147)]).then(n.bind(n,61916)),Pipeline:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(5638),n.e(4588),n.e(4547),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(4325),n.e(2730),n.e(7783)]).then(n.bind(n,97783)),PointCloudWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(4547),n.e(9294),n.e(9474)]).then(n.bind(n,16583)),RasterWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(4547),n.e(176),n.e(2398),n.e(5340)]).then(n.bind(n,61576)),SceneLayerWorker:()=>n.e(1412).then(n.bind(n,31412)),WFSSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(4556),n.e(3230)]).then(n.bind(n,43230)),WorkerTileHandler:()=>Promise.all([n.e(2303),n.e(4325),n.e(1785),n.e(6810),n.e(9872)]).then(n.bind(n,56456))},{CLOSE:h,ABORT:d,INVOKE:_,RESPONSE:p,OPEN_PORT:f,ON:g}=l.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const r=new y(t.port1,{channel:t,client:n});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=r),y.clients.set(r,n),t.port2}static loadWorker(e){const t=c[e];return t?t():Promise.resolve(null)}close(){this._post({type:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,n){const r=n&&n.signal,a=n&&n.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,l.jt)();return new Promise(((n,s)=>{const l=(0,o.$F)(r,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),s((0,o.zE)()))})),u={resolve:n,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:_,jobId:i,methodName:e,abortable:null!=r},t,a)}))}on(e,t){const n=new MessageChannel;function r(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",r),n.port1.start(),{remove(){n.port1.postMessage({type:l.Cs.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",r)}}}openPort(){const e=new MessageChannel;return this._post({type:f,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,o.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case _:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case h:this._onCloseMessage();break;case f:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);this._invokeQueue.push(e),r&&(r.controller&&r.controller.abort(),t.delete(n))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:s}=e,a=s?new AbortController:null,i=this._inJobs;let u,c=this._client,h=c[t];try{if(!h&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)c=c[e[t]],h=c[e[t+1]]}if("function"!=typeof h)throw new TypeError(`${t} is not a function`);u=h.call(c,r,{client:this,signal:a?a.signal:null})}catch(e){return void this._post({type:p,jobId:n,error:(0,l.AB)(e)})}(0,o.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:p,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),(0,o.D_)(e)||this._post({type:p,jobId:n,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:n},u)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,n=this._client.on(e.eventType,(e=>{t.postMessage(e)})),r=(0,a.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(r.remove(),n.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:n,error:r,data:a}=e,i=this._outJobs;if(!i.has(n))return;const o=i.get(n);i.delete(n),null==(t=o.abortHandle)||t.remove(),r?o.reject(s.Z.fromJSON(JSON.parse(r))):o.resolve(a)}_post(e,t,n){return(0,l.oi)(this._port,e,t,n)}}y.kernelInfo={revision:u.$,version:r.i8,buildDate:u.r},y.clients=new Map},94362:(e,t,n)=>{n.d(t,{Cs:()=>r,jt:()=>o,oi:()=>u,QM:()=>c,AB:()=>l});var r,s,a=n(80442);(s=r||(r={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let i=0;function o(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function u(e,t,n,s){if(t.type===r.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==r.INVOKE&&t.type!==r.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(n)?(a=h(s),t.data=n):(a=h(n.transferList),t.data=n.result),a?e.postMessage(t,a):e.postMessage(t)}function c(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e||!e.length)return null;if((0,a.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},8667:(e,t,n)=>{n.d(t,{f3:()=>C,oq:()=>c,r3:()=>d,jU:()=>_,z7:()=>h,Cz:()=>R,e5:()=>v,ED:()=>S,TE:()=>p,fS:()=>f,D$:()=>A,Y4:()=>L,rd:()=>k,j2:()=>O,kQ:()=>M,wf:()=>F,kK:()=>g,Gg:()=>I,cv:()=>D,Nm:()=>b,CJ:()=>B,sz:()=>x,LV:()=>w,U1:()=>N,og:()=>E,Sp:()=>T,W4:()=>m,G0:()=>P,uh:()=>y}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){var t;return Array.isArray(e)?null==(t=e[0])?void 0:t.spatialReference:null==e?void 0:e.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function o(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let l;async function u(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return o(await u("clip",[a(e),e,t]))}async function h(e,t){return o(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function p(e,t,n){return u("distance",[a(e),e,t,n])}function f(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function S(e,t){return u("disjoint",[a(e),e,t])}function b(e,t){return u("overlaps",[a(e),e,t])}function w(e,t,n){return u("relate",[a(e),e,t,n])}function I(e){return u("isSimple",[a(e),e])}async function E(e){return o(await u("simplify",[a(e),e]))}async function v(e,t){return o(await u("difference",[a(e),e,t]))}async function T(e,t){return o(await u("symmetricDifference",[a(e),e,t]))}async function F(e,t){return o(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return o(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return o(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return o(await u("buffer",s))}async function k(e,t,n,r,s,i){const l=[a(e),e,t,n,r,s,i];return o(await u("geodesicBuffer",l))}async function N(e,t,n){var r;if(null==e)throw new Error("Illegal Argument Exception");const s=e.spatialReference;n=null!=(r=n)?r:function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const a=e.constructor.fromJSON(await u("rotate",[s,e,t,n]));return a.spatialReference=s,a}async function A(e,t,n,r){return o(await u("generalize",[a(e),e,t,n,r]))}async function R(e,t,n){return o(await u("densify",[a(e),e,t,n]))}async function O(e,t,n,r=0){return o(await u("geodesicDensify",[a(e),e,t,n,r]))}function B(e,t){return u("planarArea",[a(e),e,t])}function x(e,t){return u("planarLength",[a(e),e,t])}function L(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function M(e,t,n){return u("geodesicLength",[a(e),e,t,n])}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8683],{53073:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),o=n(95330),l=n(8667);class u extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,o.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeSpatialRelationTest(e){if(null===e.geometry)return(0,o.DB)(!1);switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}_fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);return this._parent._getFeatures(r,-1,s,n).then((()=>{this._checkCancelled(n);const t=[];for(let n=0;n<s;n++){const r=this._parent._featureFromCache(e[n]);t.push(this.executeSpatialRelationTest(r))}return(0,o.$6)(t)})).then((n=>{for(let r=0;r<t;r++)!0===n[r]?this._idstates[e[r]]=i.dj.InFeatureSet:this._idstates[e[r]]=i.dj.NotInFeatureSet;return"success"}))}_getFilteredSet(e,t,n,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s))).then((e=>{let n;return this._checkCancelled(s),n=null!==t?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),n}))}_stat(e,t,n,r,s,a,i){return""!==n?(0,o.DB)({calculated:!1}):this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_canDoAggregates(e,t,n,r,s){return""!==n||null!==r||null===this._parent?(0,o.DB)(!1):this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}_getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){return null===this._parent?(0,o.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(91136),s=n(90961),a=n(90658),i=n(95330);class o extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}_getSet(){return(0,i.DB)(this._wset)}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}_getFeature(){return(0,i.d1)(new Error("No Feature Found in EmptySet"))}queryAttachments(){return(0,i.DB)([])}_getFeatures(){return(0,i.DB)("success")}_featureFromCache(){return null}_fetchAndRefineFeatures(){return(0,i.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(){return(0,i.DB)(new s.Z([],[],!1,null))}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}_canDoAggregates(){return(0,i.DB)(!1)}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(95330);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=(0,r.Ue)(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=(0,r.Ue)(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}count(){return-1!==this._parent._totalCount?(0,r.DB)(this._parent._totalCount):this._parent._getSet(this._progress).then((e=>this._refineAllSets(e))).then((e=>(this._parent._totalCount=e._known.length,(0,r.DB)(this._parent._totalCount))))}_refineAllSets(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):e._candidates.length>0?"GETPAGES"===e._known[e._candidates.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress).then((e=>e._candidates.length>0?this._refineAllSets(e):(0,r.DB)(e))):(0,r.DB)(e)}}var a=n(90961),i=n(90658),o=n(48039),l=n(95002),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=(0,r.Ue)(((e,t)=>{if(!0===this._parent.loaded)return this._initialiseFeatureSet(),void e(this);this._parent.load().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t)}))),this._loadPromise}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}_canDoAggregates(e,t,n,s,a){return null===this._parent?(0,r.DB)(!1):this._parent._canDoAggregates(e,t,n,s,a)}_getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o)}_getAgregagtePhysicalPage(e,t,n){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAgregagtePhysicalPage(e,t,n)}databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==o.Z.applicationCache){const e=o.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];let t=(0,r.Ue)(((t,n)=>{this._getDatabaseTypeImpl(e,0).then((e=>{this._databaseType=e,t(this._databaseType)}),(e=>{n(e)}))}));return null!==o.Z.applicationCache&&(o.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),t),t=t.catch((e=>{throw o.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}))),this._databaseTypeProbed=t,this._databaseTypeProbed}return(0,r.DB)(this._databaseType)}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}_getDatabaseTypeImpl(e,t){return t>=e.length?(0,r.DB)(i.Bj.StandardisedNoInterval):this._runDatabaseProbe(e[t].testwhere).then((n=>!0===n?e[t].thetype:this._getDatabaseTypeImpl(e,t+1)))}_runDatabaseProbe(e){return null!==this._parent?this._parent._runDatabaseProbe(e):(0,r.d1)(new Error("Not Implemented"))}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}_getFeature(e,t,n){try{return this._checkCancelled(n),void 0!==this._featureFromCache(t)?(0,r.DB)(this._featureFromCache(t)):this._getFeatures(e,t,this._maxProcessingRate(),n).then((()=>(this._checkCancelled(n),void 0!==this._featureFromCache(t)?this._featureFromCache(t):(0,r.d1)(new Error("Feature Not Found")))))}catch(e){return(0,r.d1)(e)}}_getFeatureBatch(e,t){try{this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];return this._getFeatures(n,-1,e.length,t).then((()=>{this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}))}catch(e){return(0,r.d1)(e)}}_getFeatures(e,t,n,s){return(0,r.DB)("success")}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}_refineSetBlock(e,t,n){try{if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return this._expandPagedSet(e,this._maxQueryRate(),0,0,n).then((()=>this._refineSetBlock(e,t,n)));this._checkCancelled(n);const s=e._candidates.length;this._refineKnowns(e,t);let a=s-e._candidates.length;return 0===e._candidates.length||a>=t?(0,r.DB)(e):this._refineIfParentKnown(e,t-a,n).then((()=>{if(this._checkCancelled(n),this._refineKnowns(e,t-a),a=s-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n).then((()=>(this._checkCancelled(n),this._refineKnowns(e,t-a),e)))}return e}))}catch(e){return(0,r.d1)(e)}}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let o=!1;const l=this._candidateIdTransform(e._candidates[a]);l!==e._candidates[a]&&(o=!0);const u=this._isInFeatureSet(l);if(u===i.dj.InFeatureSet)!0===o?e._known.indexOf(l)<0&&(e._known.push(l),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}_expandPagedSet(e,t,n,s,a){return null===this._parent?(0,r.d1)(new Error("Parent Paging not implemented")):this._parent._expandPagedSet(e,t,n,s,a)}_expandPagedSetFeatureSet(e,t,n,s,a){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(s=1),0===s&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(s=2),0===s?(0,r.DB)("finished"):this._getPage(e,s,a).then((r=>n+r<t?this._expandPagedSet(e,t,n+r,0,a):"success"))}_getPage(e,t,n){const s=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){s.length=s.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)s[s.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&s.push("GETPAGES"),(0,r.DB)(t)}return this._getPhysicalPage(e,t,n).then((()=>this._getPage(e,t,n)))}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}calculateStatistic(e,t,n,r){return this._ensureLoaded().then((()=>this._stat(e,t,"",null,null,n,r).then((s=>!1===s.calculated?this._manualStat(e,t,n,r).then((e=>e.result)):s.result))))}_manualStat(e,t,n,s){switch(e.toLowerCase()){case"count":return(0,l.QX)(this,s).then((e=>({calculated:!0,result:e})));case"distinct":return(0,l.EB)(this,t,n).then((e=>({calculated:!0,result:e})));case"avg":case"mean":return(0,l.J6)(this,t,s).then((e=>({calculated:!0,result:e})));case"stdev":return(0,l.m)(this,t,s).then((e=>({calculated:!0,result:e})));case"variance":return(0,l.CA)(this,t,s).then((e=>({calculated:!0,result:e})));case"sum":return(0,l.Sm)(this,t,s).then((e=>({calculated:!0,result:e})));case"min":return(0,l.VV)(this,t,s).then((e=>({calculated:!0,result:e})));case"max":return(0,l.Fp)(this,t,s).then((e=>({calculated:!0,result:e})));default:return(0,r.DB)({calculated:!0,result:0})}}_stat(e,t,n,r,s,a,i){return this._parent._stat(e,t,n,r,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return(0,r.Ue)(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return(0,r.Ue)(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return(0,r.Ue)(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,s,a,i,o){try{if(++o>1e3)return void setTimeout((()=>{o=0,this._reduceImpl(e,t,n,s,a,i,o)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,s,this);(0,r.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,s+1,a,i,o)}),i):this._reduceImpl(e,t,u,s+1,a,i,o)}}catch(e){i(e)}}),i)}catch(e){i(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}distinct(e,t=1e3,n=null,r){return this.load().then((()=>{const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}))}min(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}))}max(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}))}avg(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}))}sum(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}))}stdev(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}))}variance(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}))}count(e){return this.load().then((()=>this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return(0,r.Ue)(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._forEachImpl(e,t,n,s,a,i)}),0);e.next().then((o=>{try{if(null===o)s(n);else{const l=t(o);null==l?this._forEachImpl(e,t,n,s,a,i):(0,r.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,s,a,i)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}convertToText(e,t){return"schema"===e?this._ensureLoaded().then((()=>JSON.stringify(this.schema()))):"featureset"===e?this._ensureLoaded().then((()=>{const e=[];return this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t).then((()=>{const t=this.schema();return t.features=e,t.spatialReference=this.spatialReference.toJSON(),JSON.stringify(t)}))})):(0,r.DB)(this.castToText())}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===(null==e?void 0:e.featureset)?this:"none"===(null==e?void 0:e.featureset)?null:{type:"FeatureSet"}}castAsJsonAsync(e=null,t=null){return"keeptype"===(null==t?void 0:t.featureset)?(0,r.DB)(this):"schema"===(null==t?void 0:t.featureset)?this._ensureLoaded().then((()=>JSON.parse(JSON.stringify(this.schema())))):"none"===(null==t?void 0:t.featureset)?(0,r.DB)(null):this._ensureLoaded().then((()=>{const n=[];return this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===(null==t?void 0:t.keepGeometryType)?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==(null==t?void 0:t.keepGeometryType)&&delete s.geometry.spatialReference,n.push(s),1}),0,e).then((()=>{const e=this.schema();return e.features=n,e.spatialReference=!0===(null==t?void 0:t.keepGeometryType)?this.spatialReference:this.spatialReference.toJSON(),e}))}))}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,TE:()=>I,y5:()=>S,oX:()=>d,vR:()=>_,DT:()=>p,bB:()=>l,hq:()=>y,zR:()=>i,XF:()=>o,fz:()=>h});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function o(e,t,n){return c(e,t,n)}function l(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,o,l;switch(e.type){case"interval":return I(c(e.value,t,n,r,s),e.qualifier,e.op);case"case_expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"param":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expr_list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary_expr":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+l+")) ");case"NOT IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+l+")) ");case"BETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"NOTBETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current_time":return _("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=a.ou.fromJSDate(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function p(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(f(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function f(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case_expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.clauses[a].value,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.else,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}return m(s)}case"param":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expr_list":{const s=[];for(const a of t.value)s.push(f(e,a,n,r));return s}case"unary_expr":return"boolean";case"binary_expr":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([f(e,t.left,n,r),f(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"bool":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current_time":return"date";case"column_ref":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=f(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=f(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=f(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return b(e.parseTree,t)}function S(e){return"column_ref"===e.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when_clause":return b(e.operand,t)||b(e.value,t);case"case_expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"param":case"null":case"bool":case"date":case"timestamp":case"string":case"number":return!1;case"expr_list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary_expr":return b(e.expr,t);case"binary_expr":return b(e.left,t)||b(e.right,t);case"column_ref":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function w(e){let t="";return t+=e.period.toUpperCase(),t}function I(e,t,n){let r="";return r="interval-period"===t.type?w(t):w(t.start)+" TO "+w(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{tj:()=>d,QX:()=>S,g3:()=>h,EB:()=>I,Fp:()=>p,J6:()=>f,VV:()=>_,m:()=>m,Sm:()=>y,CA:()=>g});var r=n(61363),s=n(90658),a=n(36515),i=n(95330);function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function c(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function h(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function d(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,s.hj)(t)||(0,s.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,s.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return o(t);case"min":return Math.min.apply(Math,t);case"sum":return c(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}function _(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.min.apply(Math,e)))}function p(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.max.apply(Math,e)))}function f(e,t,n){let r="";return!1===(0,a.y5)(t)&&(r=(0,a.DT)(t,e.fields,null)),b(e,t,n,!0).then((e=>{if(0===e.length)return null;const t=o(e);return null===t?t:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(t):t}))}function g(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:u(e)))}function m(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.sqrt(u(e))))}function y(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:c(e)))}function S(e,t){try{return e.iterator(t).count()}catch(e){return(0,i.d1)(e)}}function b(e,t,n,r=!1){try{const s=e.iterator(n);return(0,i.Ue)(((e,n)=>{w(s,[],t,r,e,n)}))}catch(e){return(0,i.d1)(e)}}function w(e,t,n,s,a,i){(0,r.U)(e.next().then((r=>{try{if(null!==r){const o=n.calculateValue(r);return null===o?!1===s&&(t[t.length]=o):t[t.length]=o,w(e,t,n,s,a,i)}a(t)}catch(e){i(e)}}),i))}function I(e,t,n=1e3,r=null){return function(e,t,n,r){try{return E(e.iterator(r),{},[],t,n)}catch(e){return(0,i.d1)(e)}}(e,t,n,r)}function E(e,t,n,r,s){return e.next().then((a=>{if(null!==a){const i=r.calculateValue(a);return null!=i&&void 0===t[i]&&(n.push(i),t[i]=1),n.length>=s&&-1!==s?n:E(e,t,n,r,s)}return n}))}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),a=n(92604),i=n(17452);const o=a.Z.getLogger("esri.assets");function l(e){if(!r.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.Z.assetsPath,e)}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),s=n(92604),a=n(95330),i=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class l{constructor(){this._clients=new Array,this._clientPromises=new Array,this._clientIdx=0}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const o=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,a.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new i.default(e,t),o(n),this._clients[s])),(()=>(o(r),null))):(this._clients[s]=new i.default(l,t),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}getAvailableClient(){let e;for(let t=0;t<this._clients.length;++t){const n=this._clients[t];if(n){if(!n.isBusy())return Promise.resolve(n)}else e=e||[],e.push(this._clientPromises[t])}return e?Promise.race(e):(this._clientIdx=(this._clientIdx+1)%this._clients.length,Promise.resolve(this._clients[this._clientIdx]))}invoke(e,t,n){let r=null;return Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n,this.closed?Promise.reject(new Error("Connection closed")):this.getAvailableClient().then((n=>n.invoke(e,t,r)))}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},25045:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(40330),s=n(20102),a=n(91460),i=n(70586),o=n(95330),l=n(94362),u=n(17202);const c={statsWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(6841)]).then(n.bind(n,36841)),geometryEngineWorker:()=>Promise.all([n.e(5837),n.e(8227)]).then(n.bind(n,48227)),CSVSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(4854),n.e(8961),n.e(7054),n.e(2781),n.e(966)]).then(n.bind(n,27793)),EdgeProcessingWorker:()=>Promise.all([n.e(6481),n.e(8936)]).then(n.bind(n,18936)),ElevationSamplerWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(4547),n.e(2781),n.e(6481),n.e(6459),n.e(3553)]).then(n.bind(n,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4588),n.e(4547),n.e(1534),n.e(3485),n.e(4854),n.e(8961),n.e(7054),n.e(2781),n.e(5404)]).then(n.bind(n,2255)),GeoJSONSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(4854),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(7845)]).then(n.bind(n,97845)),LercWorker:()=>n.e(3027).then(n.bind(n,23027)),MemorySourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(4854),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(639)]).then(n.bind(n,30639)),PBFDecoderWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(8961),n.e(147)]).then(n.bind(n,61916)),Pipeline:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(5638),n.e(4588),n.e(4547),n.e(1534),n.e(3485),n.e(4854),n.e(8961),n.e(7054),n.e(4325),n.e(2730),n.e(299)]).then(n.bind(n,70299)),PointCloudWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(4547),n.e(9294),n.e(9474)]).then(n.bind(n,16583)),RasterWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(4547),n.e(176),n.e(2398),n.e(5340)]).then(n.bind(n,61576)),SceneLayerWorker:()=>n.e(1412).then(n.bind(n,31412)),WFSSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4547),n.e(1534),n.e(4854),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(4556),n.e(3230)]).then(n.bind(n,43230)),WorkerTileHandler:()=>Promise.all([n.e(2303),n.e(4325),n.e(1785),n.e(6810),n.e(9872)]).then(n.bind(n,56456))},{CLOSE:h,ABORT:d,INVOKE:_,RESPONSE:p,OPEN_PORT:f,ON:g}=l.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const r=new y(t.port1,{channel:t,client:n});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=r),y.clients.set(r,n),t.port2}static loadWorker(e){const t=c[e];return t?t():Promise.resolve(null)}close(){this._post({type:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,n){const r=n&&n.signal,a=n&&n.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,l.jt)();return new Promise(((n,s)=>{const l=(0,o.$F)(r,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),s((0,o.zE)()))})),u={resolve:n,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:_,jobId:i,methodName:e,abortable:null!=r},t,a)}))}on(e,t){const n=new MessageChannel;function r(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",r),n.port1.start(),{remove(){n.port1.postMessage({type:l.Cs.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",r)}}}openPort(){const e=new MessageChannel;return this._post({type:f,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,o.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case _:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case h:this._onCloseMessage();break;case f:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);this._invokeQueue.push(e),r&&(r.controller&&r.controller.abort(),t.delete(n))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:s}=e,a=s?new AbortController:null,i=this._inJobs;let u,c=this._client,h=c[t];try{if(!h&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)c=c[e[t]],h=c[e[t+1]]}if("function"!=typeof h)throw new TypeError(`${t} is not a function`);u=h.call(c,r,{client:this,signal:a?a.signal:null})}catch(e){return void this._post({type:p,jobId:n,error:(0,l.AB)(e)})}(0,o.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:p,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),(0,o.D_)(e)||this._post({type:p,jobId:n,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:n},u)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,n=this._client.on(e.eventType,(e=>{t.postMessage(e)})),r=(0,a.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(r.remove(),n.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:n,error:r,data:a}=e,i=this._outJobs;if(!i.has(n))return;const o=i.get(n);i.delete(n),null==(t=o.abortHandle)||t.remove(),r?o.reject(s.Z.fromJSON(JSON.parse(r))):o.resolve(a)}_post(e,t,n){return(0,l.oi)(this._port,e,t,n)}}y.kernelInfo={revision:u.$,version:r.i8,buildDate:u.r},y.clients=new Map},94362:(e,t,n)=>{n.d(t,{Cs:()=>r,jt:()=>o,oi:()=>u,QM:()=>c,AB:()=>l});var r,s,a=n(80442);(s=r||(r={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let i=0;function o(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function u(e,t,n,s){if(t.type===r.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==r.INVOKE&&t.type!==r.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(n)?(a=h(s),t.data=n):(a=h(n.transferList),t.data=n.result),a?e.postMessage(t,a):e.postMessage(t)}function c(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e||!e.length)return null;if((0,a.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},8667:(e,t,n)=>{n.d(t,{f3:()=>C,oq:()=>c,r3:()=>d,jU:()=>_,z7:()=>h,Cz:()=>R,e5:()=>v,ED:()=>S,TE:()=>p,fS:()=>f,D$:()=>A,Y4:()=>L,rd:()=>k,j2:()=>O,kQ:()=>M,wf:()=>F,kK:()=>g,Gg:()=>I,cv:()=>D,Nm:()=>b,CJ:()=>B,sz:()=>x,LV:()=>w,U1:()=>N,og:()=>E,Sp:()=>T,W4:()=>m,G0:()=>P,uh:()=>y}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){var t;return Array.isArray(e)?null==(t=e[0])?void 0:t.spatialReference:null==e?void 0:e.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function o(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let l;async function u(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return o(await u("clip",[a(e),e,t]))}async function h(e,t){return o(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function p(e,t,n){return u("distance",[a(e),e,t,n])}function f(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function S(e,t){return u("disjoint",[a(e),e,t])}function b(e,t){return u("overlaps",[a(e),e,t])}function w(e,t,n){return u("relate",[a(e),e,t,n])}function I(e){return u("isSimple",[a(e),e])}async function E(e){return o(await u("simplify",[a(e),e]))}async function v(e,t){return o(await u("difference",[a(e),e,t]))}async function T(e,t){return o(await u("symmetricDifference",[a(e),e,t]))}async function F(e,t){return o(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return o(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return o(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return o(await u("buffer",s))}async function k(e,t,n,r,s,i){const l=[a(e),e,t,n,r,s,i];return o(await u("geodesicBuffer",l))}async function N(e,t,n){var r;if(null==e)throw new Error("Illegal Argument Exception");const s=e.spatialReference;n=null!=(r=n)?r:function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const a=e.constructor.fromJSON(await u("rotate",[s,e,t,n]));return a.spatialReference=s,a}async function A(e,t,n,r){return o(await u("generalize",[a(e),e,t,n,r]))}async function R(e,t,n){return o(await u("densify",[a(e),e,t,n]))}async function O(e,t,n,r=0){return o(await u("geodesicDensify",[a(e),e,t,n,r]))}function B(e,t){return u("planarArea",[a(e),e,t])}function x(e,t){return u("planarLength",[a(e),e,t])}function L(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function M(e,t,n){return u("geodesicLength",[a(e),e,t,n])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2953],{89164:(e,r,t)=>{t.d(r,{Z:()=>d});var i=t(43697),s=t(22303),o=t(35454),n=t(96674),l=t(5600),a=(t(67676),t(80442),t(75215),t(71715)),u=t(52011);const p=new o.X({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let c=0,y=class extends n.wq{constructor(e){super(e),this.id="sym"+c++,this.type=null,this.color=new s.Z([0,0,0,1])}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,r){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,i._)([(0,l.Cb)({type:p.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:p.write}}})],y.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:{allowNull:!0}}})],y.prototype,"color",void 0),(0,i._)([(0,a.r)("color")],y.prototype,"readColor",null),y=(0,i._)([(0,u.j)("esri.symbols.Symbol")],y);const d=y},17055:(e,r,t)=>{t.r(r),t.d(r,{default:()=>R});var i=t(43697),s=t(5600),o=(t(67676),t(80442),t(75215),t(52011)),n=t(3172),l=t(28263),a=t(70132),u=t(93924),p=t(11282),c=(t(66577),t(38171)),y=t(96674),d=t(70586),f=t(71715),m=t(82971),b=t(95642),S=t(74889),h=t(79166),B=t(13473),g=t(58901),_=t(17332);function C(e){return S.default.fromJSON(e).features.map((e=>e.geometry))}let v=class extends y.wq{constructor(e){super(e),this.directions=null,this.facilities=null,this.incidents=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routes=null}readFacilities(e){return C(e)}readIncidents(e){return C(e)}readPointBarriers(e,r){return C(r.barriers)}readPolylineBarriers(e){return C(e)}readPolygonBarriers(e){return C(e)}readRoutes(e){return function(e){return e.features.map((r=>{const t=m.Z.fromJSON(e.spatialReference),i=c.Z.fromJSON(r);return(0,d.pC)(i.geometry)&&(i.geometry.spatialReference=t),i}))}(e)}};(0,i._)([(0,s.Cb)({type:[b.Z]})],v.prototype,"directions",void 0),(0,i._)([(0,s.Cb)({type:[B.Z]})],v.prototype,"facilities",void 0),(0,i._)([(0,f.r)("facilities")],v.prototype,"readFacilities",null),(0,i._)([(0,s.Cb)({type:[B.Z]})],v.prototype,"incidents",void 0),(0,i._)([(0,f.r)("incidents")],v.prototype,"readIncidents",null),(0,i._)([(0,s.Cb)({type:[h.Z]})],v.prototype,"messages",void 0),(0,i._)([(0,s.Cb)({type:[B.Z]})],v.prototype,"pointBarriers",void 0),(0,i._)([(0,f.r)("pointBarriers",["barriers"])],v.prototype,"readPointBarriers",null),(0,i._)([(0,s.Cb)({type:[g.Z]})],v.prototype,"polylineBarriers",void 0),(0,i._)([(0,f.r)("polylineBarriers")],v.prototype,"readPolylineBarriers",null),(0,i._)([(0,s.Cb)({type:[_.Z]})],v.prototype,"polygonBarriers",void 0),(0,i._)([(0,f.r)("polygonBarriers")],v.prototype,"readPolygonBarriers",null),(0,i._)([(0,s.Cb)({type:[c.Z]})],v.prototype,"routes",void 0),(0,i._)([(0,f.r)("routes")],v.prototype,"readRoutes",null),v=(0,i._)([(0,o.j)("esri.rest.support.ClosestFacilitySolveResult")],v);const Z=v,w=(0,l.E)({accumulateAttributes:{name:"accumulateAttributeNames"},attributeParameterValues:!0,directionsTimeAttribute:{name:"directionsTimeAttributeName"},impedanceAttribute:{name:"impedanceAttributeName"},facilities:!0,incidents:!0,outSpatialReference:{name:"outSR",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:"barriers"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:"restrictionAttributeNames"},returnPointBarriers:{name:"returnBarriers"},returnRoutes:{name:"returnCFRoutes"},travelMode:!0});var N=t(59633);let O=class extends N.Z{constructor(e){super(e),this.url=null}solve(e,r){return async function(e,r,t){const i=[],s=[],o={},l={},c=(0,p.en)(e),{path:y}=c;r.incidents&&r.incidents.features&&(0,u.et)(r.incidents.features,s,"incidents.features",o),r.facilities&&r.facilities.features&&(0,u.et)(r.facilities.features,s,"facilities.features",o),r.pointBarriers&&r.pointBarriers.features&&(0,u.et)(r.pointBarriers.features,s,"pointBarriers.features",o),r.polylineBarriers&&r.polylineBarriers.features&&(0,u.et)(r.polylineBarriers.features,s,"polylineBarriers.features",o),r.polygonBarriers&&r.polygonBarriers.features&&(0,u.et)(r.polygonBarriers.features,s,"polygonBarriers.features",o);const d=await(0,a.aX)(s);for(const e in o){const r=o[e];i.push(e),l[e]=d.slice(r[0],r[1])}if((0,u.Wf)(l,i)){let e=null;try{e=await(0,u.bI)(y,r.apiKey,t)}catch{}e&&!e.hasZ&&(0,u.ef)(l,i)}for(const e in l)l[e].forEach(((t,i)=>{r.get(e)[i].geometry=t}));const f={...t,query:{...c.query,...w.toQueryParams(r),f:"json"}},{data:m}=await(0,n.default)(`${y}/solveClosestFacility`,f);return Z.fromJSON(m)}(this.url,e,r)}};(0,i._)([(0,s.Cb)()],O.prototype,"url",void 0),O=(0,i._)([(0,o.j)("esri.tasks.ClosestFacilityTask")],O);const R=O},59633:(e,r,t)=>{t.d(r,{Z:()=>u});var i=t(43697),s=t(15923),o=t(17452),n=t(5600),l=(t(67676),t(80442),t(75215),t(52011));let a=class extends s.Z{constructor(...e){super(...e),this.requestOptions=null,this.url=null}normalizeCtorArgs(e,r){return"string"!=typeof e?e:{url:e,...r}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(e){return e?(0,o.mN)(e):null}_encode(e,r,t){const i={};for(const s in e){if("declaredClass"===s)continue;const o=e[s];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){i[s]=[];for(let e=0;e<o.length;e++)i[s][e]=this._encode(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(t&&t[s]);i[s]=r?e:JSON.stringify(e)}else i[s]=r?o:JSON.stringify(o);else i[s]=o}return i}};(0,i._)([(0,n.Cb)({readOnly:!0})],a.prototype,"parsedUrl",null),(0,i._)([(0,n.Cb)()],a.prototype,"requestOptions",void 0),(0,i._)([(0,n.Cb)({type:String})],a.prototype,"url",void 0),a=(0,i._)([(0,l.j)("esri.tasks.Task")],a);const u=a}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3942],{45091:(e,t,r)=>{r.d(t,{Z:()=>c});var s,n,i=r(80442),a=r(71143);(n=s||(s={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,r=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=s.unknown,this._init(e,t,r,n)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case s.varint:this._decodeVarint();break;case s.fixed64:this._skip(8);break;case s.delimited:this._skip(this._getLength());break;case s.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t,r=this._pos,s=0;if(this._end-r>=10)do{if(t=e[r++],s|=127&t,0==(128&t))break;if(t=e[r++],s|=(127&t)<<7,0==(128&t))break;if(t=e[r++],s|=(127&t)<<14,0==(128&t))break;if(t=e[r++],s|=(127&t)<<21,0==(128&t))break;if(t=e[r++],s+=268435456*(127&t),0==(128&t))break;if(t=e[r++],s+=34359738368*(127&t),0==(128&t))break;if(t=e[r++],s+=4398046511104*(127&t),0==(128&t))break;if(t=e[r++],s+=562949953421312*(127&t),0==(128&t))break;if(t=e[r++],s+=72057594037927940*(127&t),0==(128&t))break;if(t=e[r++],s+=0x8000000000000000*(127&t),0==(128&t))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;r!==this._end&&(t=e[r],0!=(128&t));)++r,s+=(127&t)*n,n*=128;if(r===this._end)throw new Error("Varint overrun!");++r,s+=t*n}return this._pos=r,s}_decodeSVarint(){const e=this._decodeVarint();return e%2?-(e+1)/2:e/2}_getLength(){if(this._dataType!==s.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>l){const s=e.subarray(t,r);return u.decode(s)}let s="",n="";for(let i=t;i<r;++i){const t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new a.Z(c,null,(e=>{e._data=null,e._dataView=null}))},91040:(e,t,r)=>{r.d(t,{yZ:()=>n});var s=r(67900);function n(e,t){const r=t||e.extent,n=e.width,i=(0,s.c9)(r&&r.spatialReference);return r&&n?r.width/n*i*s.hd*96:0}},76497:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{A:()=>s})},41818:(e,t,r)=>{r.d(t,{P:()=>a});var s=r(11282),n=r(34599),i=r(57444);async function a(e,t,r){const a=(0,s.en)(e);return(0,n.executeQueryForCount)(a,i.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>a});var s=r(11282),n=r(34599),i=r(57444);async function a(e,t,r){const a=(0,s.en)(e);return(0,n.executeQueryForIds)(a,i.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{e:()=>o,F:()=>u});var s=r(11282),n=r(34599),i=r(74889),a=r(57444);async function o(e,t,r){const s=await u(e,t,r);return i.default.fromJSON(s)}async function u(e,t,r){const i=(0,s.en)(e),o={...r},u=a.Z.from(t),{data:l}=await(0,n.executeQuery)(i,u,u.sourceSpatialReference,o);return l}},77863:(e,t,r)=>{r.d(t,{K9:()=>R,O7:()=>d,G$:()=>I});var s=r(20102),n=r(70586),i=r(45091),a=r(5428),o=r(78760);const u=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function d(e){return e>=u.length?null:u[e]}function p(e){return e>=l.length?null:l[e]}function h(e){return e>=c.length?null:c[e]}function g(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function y(e,t,r){const s=t.createPointGeometry(r);for(;e.next();)switch(e.tag()){case 3:{const r=e.getUInt32(),n=e.pos()+r;let i=0;for(;e.pos()<n;)t.addCoordinatePoint(s,e.getSInt64(),i++);break}default:e.skip()}return s}function f(e,t,r){const s=t.createGeometry(r),n=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;e.next();)switch(e.tag()){case 2:{const r=e.getUInt32(),n=e.pos()+r;let i=0;for(;e.pos()<n;)t.addLength(s,e.getUInt32(),i++);break}case 3:{const r=e.getUInt32(),i=e.pos()+r;let a=0;for(t.allocateCoordinates(s);e.pos()<i;)t.addCoordinate(s,e.getSInt64(),a),a++,a===n&&(a=0);break}default:e.skip()}return s}function m(e){const t=new a.Z;let r="esriGeometryPoint";for(;e.next();)switch(e.tag()){case 2:{const r=e.getUInt32(),s=e.pos()+r;for(;e.pos()<s;)t.lengths.push(e.getUInt32());break}case 3:{const r=e.getUInt32(),s=e.pos()+r;for(;e.pos()<s;)t.coords.push(e.getSInt64());break}case 1:r=o.A[e.getEnum()];break;default:e.skip()}return{queryGeometry:t,queryGeometryType:r}}function _(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function b(e){const t={type:d(0)};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.type=d(e.getEnum());break;case 3:t.alias=e.getString();break;case 4:t.sqlType=p(e.getEnum());break;case 5:default:e.skip();break;case 6:t.defaultValue=e.getString()}return t}function k(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.isSystemMaintained=e.getBool();break;default:e.skip()}return t}function x(e,t,r,s){const n=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[i++].name;n.attributes[t]=e.processMessage(_);break}case 2:n.geometry=e.processMessageWithArgs(f,t,r);break;case 4:n.centroid=e.processMessageWithArgs(y,t,r);break;default:e.skip()}return n}function S(e){const t=[1,1,1,1];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function w(e){const t=[0,0,0,0];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function I(e){const t={originPosition:h(0)};for(;e.next();)switch(e.tag()){case 1:t.originPosition=h(e.getEnum());break;case 2:t.scale=e.processMessage(S);break;case 3:t.translate=e.processMessage(w);break;default:e.skip()}return t}function T(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.shapeAreaFieldName=e.getString();break;case 2:t.shapeLengthFieldName=e.getString();break;case 3:t.units=e.getString();break;default:e.skip()}return t}function F(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function q(e,t){const r=t.createFeatureResult();r.geometryType=g(t,0);let s=!1;for(;e.next();)switch(e.tag()){case 1:r.objectIdFieldName=e.getString();break;case 3:r.globalIdFieldName=e.getString();break;case 4:r.geohashFieldName=e.getString();break;case 5:r.geometryProperties=e.processMessage(T);break;case 7:r.geometryType=g(t,e.getEnum());break;case 8:r.spatialReference=e.processMessageWithArgs(F,t);break;case 10:r.hasZ=e.getBool();break;case 11:r.hasM=e.getBool();break;case 12:r.transform=e.processMessage(I);break;case 9:{const t=e.getBool();r.exceededTransferLimit=t;break}case 13:t.addField(r,e.processMessage(b));break;case 15:s||(t.prepareFeatures(r),s=!0),t.addFeature(r,e.processMessageWithArgs(x,t,r,r.fields));break;case 2:r.uniqueIdField=e.processMessage(k);break;default:e.skip()}return t.finishFeatureResult(r),r}function C(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(m);break;case 1:r.featureResult=e.processMessageWithArgs(q,t);break;default:e.skip()}return(0,n.pC)(s)&&r.featureResult&&t.addQueryGeometry(r,s),r}function R(e,t){try{const r=2,s=new i.Z(new Uint8Array(e),new DataView(e)),n={};for(;s.next();)s.tag()===r?n.queryResult=s.processMessageWithArgs(C,t):s.skip();return n}catch(e){throw new s.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{A:()=>u,J:()=>l});var s=r(67900),n=r(8744),i=r(70272),a=r(44876),o=r(5428);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this.options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this.options.sourceSpatialReference||!e.spatialReference||(0,n.fS)(e.spatialReference,this.options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s._R)(this.options.sourceSpatialReference)/(0,s._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.ZP}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>n});var s=r(77863);function n(e,t){const r=(0,s.K9)(e,t),n=r.queryResult.featureResult,i=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=a),n}},34599:(e,t,r)=>{r.r(t),r.d(t,{executeQuery:()=>g,executeQueryForCount:()=>_,executeQueryForExtent:()=>b,executeQueryForIds:()=>m,executeQueryPBF:()=>y,executeQueryPBFBuffer:()=>f,queryToQueryStringParameters:()=>h,runQuery:()=>k});var s=r(3172),n=r(70586),i=r(17452),a=r(33955),o=r(38581),u=r(66677),l=r(76497),c=r(45178),d=r(28694);const p="Layer does not support extent calculation.";function h(e,t,r=!1){const s=e.geometry,i=e.toJSON(),o=i,u=e.outSpatialReference;let l,c;if((0,n.pC)(s)){if(l=s.spatialReference,c=s.spatialReference.wkid||JSON.stringify(s.spatialReference),o.geometryType=(0,a.Ji)(s),r&&"extent"===s.type)o.geometry=`${s.xmin},${s.ymin},${s.xmax},${s.ymax}`;else if(r&&"point"===s.type)o.geometry=`${s.x},${s.y}`;else{const e=s.toJSON();delete e.spatialReference,o.geometry=JSON.stringify(e)}o.inSR=c}if(l||(l=u),i.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds&&(o.objectIds=i.objectIds.join(",")),i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?delete o.outFields:-1!==i.outFields.indexOf("*")?o.outFields="*":o.outFields=i.outFields.join(","),i.outSR?o.outSR=i.outSR.wkid||JSON.stringify(i.outSR):s&&(i.returnGeometry||i.returnCentroid)&&(o.outSR=o.inSR),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(o.outStatistics=JSON.stringify(i.outStatistics)),i.pixelSize&&(o.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(r&&(0,n.pC)(l)&&(0,n.pC)(e.quantizationParameters)&&(0,n.pC)(e.quantizationParameters.extent)&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(o.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(o.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(o.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:r}=e;null==t&&null==r||(o.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete i.timeExtent}return o}async function g(e,t,r,s){const i=(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{features:[]}}:await k(e,t,"json",s);return(0,d.p)(t,r,i.data),i}async function y(e,t,r,s){if((0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty)return Promise.resolve({data:r.createFeatureResult()});const i=await f(e,t,s),a=i;return a.data=(0,c.C)(i.data,r),a}function f(e,t,r){return k(e,t,"pbf",r)}function m(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):k(e,t,"json",r,{returnIdsOnly:!0})}function _(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):k(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function b(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):k(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(p);if(t.hasOwnProperty("count"))throw new Error(p);return e}))}function k(e,t,r,a={},c={}){const d="string"==typeof e?(0,i.mN)(e):e,p=t.geometry?[t.geometry]:[];return a.responseType="pbf"===r?"array-buffer":"json",(0,o.aX)(p,null,a).then((e=>{const o=e&&e[0];(0,n.pC)(o)&&((t=t.clone()).geometry=o);const p=(0,u.M8)(d.path),g=(0,l.A)({...d.query,f:r,...c,...h(t,c,p)});return(0,s.default)((0,i.v_)(d.path,"query"),{...a,query:{...g,...a.query}})}))}},98326:(e,t,r)=>{r.d(t,{Z:()=>d});var s,n=r(43697),i=r(96674),a=r(5600),o=(r(67676),r(80442),r(75215)),u=r(52011);const l={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let c=s=class extends i.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:s}=e;if(!t||!r||!s)return null;const n=t.find((e=>e.name===r));return n?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const s=r.find((e=>e.name===t));return s&&s.value||null}({tagName:s,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return l[t]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,a.Cb)({type:String})],c.prototype,"contentType",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"exifInfo",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],c.prototype,"orientationInfo",null),(0,n._)([(0,a.Cb)({type:o.z8})],c.prototype,"id",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"globalId",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"parentGlobalId",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"parentObjectId",void 0),(0,n._)([(0,a.Cb)({type:o.z8})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"url",void 0),c=s=(0,n._)([(0,u.j)("esri.layers.support.AttachmentInfo")],c);const d=c},11282:(e,t,r)=>{r.d(t,{lA:()=>n,cv:()=>a,en:()=>i});var s=r(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):e}function a(e,t,r){const s={};for(const n in e){if("declaredClass"===n)continue;const i=e[n];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){s[n]=[];for(let e=0;e<i.length;e++)s[n][e]=a(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(r&&r[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?i:JSON.stringify(i);else s[n]=i}return s}r(91040)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3942],{45091:(e,t,r)=>{r.d(t,{Z:()=>c});var s,n,i=r(80442),a=r(71143);(n=s||(s={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,r=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=s.unknown,this._init(e,t,r,n)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case s.varint:this._decodeVarint();break;case s.fixed64:this._skip(8);break;case s.delimited:this._skip(this._getLength());break;case s.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t,r=this._pos,s=0;if(this._end-r>=10)do{if(t=e[r++],s|=127&t,0==(128&t))break;if(t=e[r++],s|=(127&t)<<7,0==(128&t))break;if(t=e[r++],s|=(127&t)<<14,0==(128&t))break;if(t=e[r++],s|=(127&t)<<21,0==(128&t))break;if(t=e[r++],s+=268435456*(127&t),0==(128&t))break;if(t=e[r++],s+=34359738368*(127&t),0==(128&t))break;if(t=e[r++],s+=4398046511104*(127&t),0==(128&t))break;if(t=e[r++],s+=562949953421312*(127&t),0==(128&t))break;if(t=e[r++],s+=72057594037927940*(127&t),0==(128&t))break;if(t=e[r++],s+=0x8000000000000000*(127&t),0==(128&t))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;r!==this._end&&(t=e[r],0!=(128&t));)++r,s+=(127&t)*n,n*=128;if(r===this._end)throw new Error("Varint overrun!");++r,s+=t*n}return this._pos=r,s}_decodeSVarint(){const e=this._decodeVarint();return e%2?-(e+1)/2:e/2}_getLength(){if(this._dataType!==s.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>l){const s=e.subarray(t,r);return u.decode(s)}let s="",n="";for(let i=t;i<r;++i){const t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new a.Z(c,null,(e=>{e._data=null,e._dataView=null}))},91040:(e,t,r)=>{r.d(t,{yZ:()=>n});var s=r(67900);function n(e,t){const r=t||e.extent,n=e.width,i=(0,s.c9)(r&&r.spatialReference);return r&&n?r.width/n*i*s.hd*96:0}},76497:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{A:()=>s})},41818:(e,t,r)=>{r.d(t,{P:()=>a});var s=r(11282),n=r(34599),i=r(57444);async function a(e,t,r){const a=(0,s.en)(e);return(0,n.executeQueryForCount)(a,i.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>a});var s=r(11282),n=r(34599),i=r(57444);async function a(e,t,r){const a=(0,s.en)(e);return(0,n.executeQueryForIds)(a,i.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{e:()=>o,F:()=>u});var s=r(11282),n=r(34599),i=r(74889),a=r(57444);async function o(e,t,r){const s=await u(e,t,r);return i.default.fromJSON(s)}async function u(e,t,r){const i=(0,s.en)(e),o={...r},u=a.Z.from(t),{data:l}=await(0,n.executeQuery)(i,u,u.sourceSpatialReference,o);return l}},77863:(e,t,r)=>{r.d(t,{K9:()=>R,O7:()=>d,G$:()=>I});var s=r(20102),n=r(70586),i=r(45091),a=r(5428),o=r(78760);const u=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function d(e){return e>=u.length?null:u[e]}function p(e){return e>=l.length?null:l[e]}function h(e){return e>=c.length?null:c[e]}function g(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function y(e,t,r){const s=t.createPointGeometry(r);for(;e.next();)switch(e.tag()){case 3:{const r=e.getUInt32(),n=e.pos()+r;let i=0;for(;e.pos()<n;)t.addCoordinatePoint(s,e.getSInt64(),i++);break}default:e.skip()}return s}function f(e,t,r){const s=t.createGeometry(r),n=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;e.next();)switch(e.tag()){case 2:{const r=e.getUInt32(),n=e.pos()+r;let i=0;for(;e.pos()<n;)t.addLength(s,e.getUInt32(),i++);break}case 3:{const r=e.getUInt32(),i=e.pos()+r;let a=0;for(t.allocateCoordinates(s);e.pos()<i;)t.addCoordinate(s,e.getSInt64(),a),a++,a===n&&(a=0);break}default:e.skip()}return s}function m(e){const t=new a.Z;let r="esriGeometryPoint";for(;e.next();)switch(e.tag()){case 2:{const r=e.getUInt32(),s=e.pos()+r;for(;e.pos()<s;)t.lengths.push(e.getUInt32());break}case 3:{const r=e.getUInt32(),s=e.pos()+r;for(;e.pos()<s;)t.coords.push(e.getSInt64());break}case 1:r=o.A[e.getEnum()];break;default:e.skip()}return{queryGeometry:t,queryGeometryType:r}}function _(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function b(e){const t={type:d(0)};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.type=d(e.getEnum());break;case 3:t.alias=e.getString();break;case 4:t.sqlType=p(e.getEnum());break;case 5:default:e.skip();break;case 6:t.defaultValue=e.getString()}return t}function k(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.name=e.getString();break;case 2:t.isSystemMaintained=e.getBool();break;default:e.skip()}return t}function x(e,t,r,s){const n=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[i++].name;n.attributes[t]=e.processMessage(_);break}case 2:n.geometry=e.processMessageWithArgs(f,t,r);break;case 4:n.centroid=e.processMessageWithArgs(y,t,r);break;default:e.skip()}return n}function S(e){const t=[1,1,1,1];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function w(e){const t=[0,0,0,0];for(;e.next();)switch(e.tag()){case 1:t[0]=e.getDouble();break;case 2:t[1]=e.getDouble();break;case 4:t[2]=e.getDouble();break;case 3:t[3]=e.getDouble();break;default:e.skip()}return t}function I(e){const t={originPosition:h(0)};for(;e.next();)switch(e.tag()){case 1:t.originPosition=h(e.getEnum());break;case 2:t.scale=e.processMessage(S);break;case 3:t.translate=e.processMessage(w);break;default:e.skip()}return t}function T(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.shapeAreaFieldName=e.getString();break;case 2:t.shapeLengthFieldName=e.getString();break;case 3:t.units=e.getString();break;default:e.skip()}return t}function F(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function q(e,t){const r=t.createFeatureResult();r.geometryType=g(t,0);let s=!1;for(;e.next();)switch(e.tag()){case 1:r.objectIdFieldName=e.getString();break;case 3:r.globalIdFieldName=e.getString();break;case 4:r.geohashFieldName=e.getString();break;case 5:r.geometryProperties=e.processMessage(T);break;case 7:r.geometryType=g(t,e.getEnum());break;case 8:r.spatialReference=e.processMessageWithArgs(F,t);break;case 10:r.hasZ=e.getBool();break;case 11:r.hasM=e.getBool();break;case 12:r.transform=e.processMessage(I);break;case 9:{const t=e.getBool();r.exceededTransferLimit=t;break}case 13:t.addField(r,e.processMessage(b));break;case 15:s||(t.prepareFeatures(r),s=!0),t.addFeature(r,e.processMessageWithArgs(x,t,r,r.fields));break;case 2:r.uniqueIdField=e.processMessage(k);break;default:e.skip()}return t.finishFeatureResult(r),r}function C(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(m);break;case 1:r.featureResult=e.processMessageWithArgs(q,t);break;default:e.skip()}return(0,n.pC)(s)&&r.featureResult&&t.addQueryGeometry(r,s),r}function R(e,t){try{const r=2,s=new i.Z(new Uint8Array(e),new DataView(e)),n={};for(;s.next();)s.tag()===r?n.queryResult=s.processMessageWithArgs(C,t):s.skip();return n}catch(e){throw new s.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{A:()=>u,J:()=>l});var s=r(67900),n=r(8744),i=r(70272),a=r(44876),o=r(5428);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this.options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this.options.sourceSpatialReference||!e.spatialReference||(0,n.fS)(e.spatialReference,this.options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s._R)(this.options.sourceSpatialReference)/(0,s._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.ZP}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>n});var s=r(77863);function n(e,t){const r=(0,s.K9)(e,t),n=r.queryResult.featureResult,i=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=a),n}},34599:(e,t,r)=>{r.r(t),r.d(t,{executeQuery:()=>g,executeQueryForCount:()=>_,executeQueryForExtent:()=>b,executeQueryForIds:()=>m,executeQueryPBF:()=>y,executeQueryPBFBuffer:()=>f,queryToQueryStringParameters:()=>h,runQuery:()=>k});var s=r(3172),n=r(70586),i=r(17452),a=r(33955),o=r(70132),u=r(66677),l=r(76497),c=r(45178),d=r(28694);const p="Layer does not support extent calculation.";function h(e,t,r=!1){const s=e.geometry,i=e.toJSON(),o=i,u=e.outSpatialReference;let l,c;if((0,n.pC)(s)){if(l=s.spatialReference,c=s.spatialReference.wkid||JSON.stringify(s.spatialReference),o.geometryType=(0,a.Ji)(s),r&&"extent"===s.type)o.geometry=`${s.xmin},${s.ymin},${s.xmax},${s.ymax}`;else if(r&&"point"===s.type)o.geometry=`${s.x},${s.y}`;else{const e=s.toJSON();delete e.spatialReference,o.geometry=JSON.stringify(e)}o.inSR=c}if(l||(l=u),i.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds&&(o.objectIds=i.objectIds.join(",")),i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?delete o.outFields:-1!==i.outFields.indexOf("*")?o.outFields="*":o.outFields=i.outFields.join(","),i.outSR?o.outSR=i.outSR.wkid||JSON.stringify(i.outSR):s&&(i.returnGeometry||i.returnCentroid)&&(o.outSR=o.inSR),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(o.outStatistics=JSON.stringify(i.outStatistics)),i.pixelSize&&(o.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(r&&(0,n.pC)(l)&&(0,n.pC)(e.quantizationParameters)&&(0,n.pC)(e.quantizationParameters.extent)&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(o.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(o.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(o.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:r}=e;null==t&&null==r||(o.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete i.timeExtent}return o}async function g(e,t,r,s){const i=(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?{data:{features:[]}}:await k(e,t,"json",s);return(0,d.p)(t,r,i.data),i}async function y(e,t,r,s){if((0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty)return Promise.resolve({data:r.createFeatureResult()});const i=await f(e,t,s),a=i;return a.data=(0,c.C)(i.data,r),a}function f(e,t,r){return k(e,t,"pbf",r)}function m(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):k(e,t,"json",r,{returnIdsOnly:!0})}function _(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):k(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function b(e,t,r){return(0,n.pC)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):k(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(p);if(t.hasOwnProperty("count"))throw new Error(p);return e}))}function k(e,t,r,a={},c={}){const d="string"==typeof e?(0,i.mN)(e):e,p=t.geometry?[t.geometry]:[];return a.responseType="pbf"===r?"array-buffer":"json",(0,o.aX)(p,null,a).then((e=>{const o=e&&e[0];(0,n.pC)(o)&&((t=t.clone()).geometry=o);const p=(0,u.M8)(d.path),g=(0,l.A)({...d.query,f:r,...c,...h(t,c,p)});return(0,s.default)((0,i.v_)(d.path,"query"),{...a,query:{...g,...a.query}})}))}},98326:(e,t,r)=>{r.d(t,{Z:()=>d});var s,n=r(43697),i=r(96674),a=r(5600),o=(r(67676),r(80442),r(75215)),u=r(52011);const l={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let c=s=class extends i.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:s}=e;if(!t||!r||!s)return null;const n=t.find((e=>e.name===r));return n?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const s=r.find((e=>e.name===t));return s&&s.value||null}({tagName:s,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return l[t]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,a.Cb)({type:String})],c.prototype,"contentType",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"exifInfo",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],c.prototype,"orientationInfo",null),(0,n._)([(0,a.Cb)({type:o.z8})],c.prototype,"id",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"globalId",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:String})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"parentGlobalId",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"parentObjectId",void 0),(0,n._)([(0,a.Cb)({type:o.z8})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],c.prototype,"url",void 0),c=s=(0,n._)([(0,u.j)("esri.layers.support.AttachmentInfo")],c);const d=c},11282:(e,t,r)=>{r.d(t,{lA:()=>n,cv:()=>a,en:()=>i});var s=r(17452);function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):e}function a(e,t,r){const s={};for(const n in e){if("declaredClass"===n)continue;const i=e[n];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){s[n]=[];for(let e=0;e<i.length;e++)s[n][e]=a(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(r&&r[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?i:JSON.stringify(i);else s[n]=i}return s}r(91040)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6678],{23334:(e,t,r)=>{r.d(t,{F:()=>N});var s=r(3172),o=r(70586),i=r(28263),l=r(70132),n=r(93924),a=r(11282),u=r(43697),p=r(38171),c=r(96674),y=r(5600),d=(r(67676),r(80442),r(75215),r(71715)),f=r(52011),m=r(74889),g=r(79166),b=r(95642);let h=class extends c.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null}};(0,u._)([(0,y.Cb)({type:m.default,json:{write:!0}})],h.prototype,"directionLines",void 0),(0,u._)([(0,y.Cb)({type:m.default,json:{write:!0}})],h.prototype,"directionPoints",void 0),(0,u._)([(0,y.Cb)({type:b.Z,json:{write:!0}})],h.prototype,"directions",void 0),(0,u._)([(0,y.Cb)({type:p.Z,json:{write:!0}})],h.prototype,"route",void 0),(0,u._)([(0,y.Cb)({type:String,json:{write:!0}})],h.prototype,"routeName",void 0),(0,u._)([(0,y.Cb)({type:[p.Z],json:{write:!0}})],h.prototype,"stops",void 0),h=(0,u._)([(0,f.j)("esri.rest.support.RouteResult")],h);const v=h;function R(e){return e&&m.default.fromJSON(e).features.map((e=>e))}let S=class extends c.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return R(t.barriers)}readPolylineBarriers(e){return R(e)}readPolygonBarriers(e){return R(e)}};(0,u._)([(0,y.Cb)({type:[g.Z]})],S.prototype,"messages",void 0),(0,u._)([(0,y.Cb)({type:[p.Z]})],S.prototype,"pointBarriers",void 0),(0,u._)([(0,d.r)("pointBarriers",["barriers"])],S.prototype,"readPointBarriers",null),(0,u._)([(0,y.Cb)({type:[p.Z]})],S.prototype,"polylineBarriers",void 0),(0,u._)([(0,d.r)("polylineBarriers")],S.prototype,"readPolylineBarriers",null),(0,u._)([(0,y.Cb)({type:[p.Z]})],S.prototype,"polygonBarriers",void 0),(0,u._)([(0,d.r)("polygonBarriers")],S.prototype,"readPolygonBarriers",null),(0,u._)([(0,y.Cb)({type:[v]})],S.prototype,"routeResults",void 0),S=(0,u._)([(0,f.j)("esri.rest.support.RouteSolveResult")],S);const B=S,_=(0,i.E)({accumulateAttributes:{name:"accumulateAttributeNames"},attributeParameterValues:!0,directionsTimeAttribute:{name:"directionsTimeAttributeName"},impedanceAttribute:{name:"impedanceAttributeName"},outSpatialReference:{name:"outSR",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:"barriers"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:"restrictionAttributeNames"},stops:!0,travelMode:!0});function C(e){return"esri.rest.support.FeatureSet"===(null==e?void 0:e.declaredClass)}async function N(e,t,r){const i=[],u=[],p={},c={},y=(0,a.en)(e),{path:d}=y;C(t.stops)&&(0,n.et)(t.stops.features,u,"stops.features",p),C(t.pointBarriers)&&(0,n.et)(t.pointBarriers.features,u,"pointBarriers.features",p),C(t.polylineBarriers)&&(0,n.et)(t.polylineBarriers.features,u,"polylineBarriers.features",p),C(t.polygonBarriers)&&(0,n.et)(t.polygonBarriers.features,u,"polygonBarriers.features",p);const f=await(0,l.aX)(u);for(const e in p){const t=p[e];i.push(e),c[e]=f.slice(t[0],t[1])}if((0,n.Wf)(c,i)){let e=null;try{e=await(0,n.bI)(d,t.apiKey,r)}catch{}e&&!e.hasZ&&(0,n.ef)(c,i)}for(const e in c)c[e].forEach(((r,s)=>{t.get(e)[s].geometry=r}));const m={...r,query:{...y.query,..._.toQueryParams(t),f:"json"}},g=d.endsWith("/solve")?d:`${d}/solve`,{data:b}=await(0,s.default)(g,m);return function(e){var t,r,s,i,l;const n=new Map,{directionLines:a,directionPoints:u,directions:p,routes:c,stops:y,barriers:d,polygonBarriers:f,polylineBarriers:m,messages:g}=e,b=null!=(t=null!=(r=null!=(s=null!=(i=null==c?void 0:c.spatialReference)?i:null==y?void 0:y.spatialReference)?s:null==d?void 0:d.spatialReference)?r:null==f?void 0:f.spatialReference)?t:null==m?void 0:m.spatialReference;null==c||c.features.forEach((e=>{const t=e.attributes.Name,r=e.attributes.ObjectID;n.has(t)?(n.get(t).route=e,n.get(t).routeId=r):n.set(t,{route:e,routeId:r,routeName:t}),(0,o.pC)(e.geometry)&&(e.geometry.spatialReference=b)})),null==p||p.forEach((e=>{const t=e.routeName;n.has(t)?n.get(t).directions=e:n.set(t,{routeName:t,directions:e})})),null==y||y.features.forEach((e=>{var t;const r=null!=(t=e.attributes.RouteName)?t:null;n.has(r)?n.get(r).stops?n.get(r).stops.push(e):n.get(r).stops=[e]:n.set(r,{stops:[e],routeName:r}),(0,o.pC)(e.geometry)&&(e.geometry.spatialReference=b)}));const h=null==(l=null==y?void 0:y.features.every((e=>null==e.attributes.RouteName)))||l;if((null==y?void 0:y.features.length)>0&&h){const e=Array.from(n.keys())[0];n.get(e).stops=n.get(null).stops,n.delete(null)}null==a||a.features.forEach((e=>{var t;const r=e.attributes.RouteID,s=null==(t=Array.from(n.values()).find((e=>e.routeId===r)))?void 0:t.routeName;if(s)if(n.has(s))if(n.get(s).directionLines)n.get(s).directionLines.features.push(e);else{const{fieldAliases:t,geometryType:r,spatialReference:o}=a;n.get(s).directionLines={features:[e],fieldAliases:t,geometryType:r,spatialReference:o}}else{const{fieldAliases:t,geometryType:r,spatialReference:o}=a;n.set(s,{routeName:s,directionLines:{features:[e],fieldAliases:t,geometryType:r,spatialReference:o}})}})),null==u||u.features.forEach((e=>{var t;const r=e.attributes.RouteID,s=null==(t=Array.from(n.values()).find((e=>e.routeId===r)))?void 0:t.routeName;if(s)if(n.has(s))if(n.get(s).directionPoints)n.get(s).directionPoints.features.push(e);else{const{fieldAliases:t,geometryType:r,spatialReference:o}=u;n.get(s).directionPoints={features:[e],fieldAliases:t,geometryType:r,spatialReference:o}}else{const{fieldAliases:t,geometryType:r,spatialReference:o}=u;n.set(s,{routeName:s,directionPoints:{features:[e],fieldAliases:t,geometryType:r,spatialReference:o}})}}));const v=Array.from(n.values());return B.fromJSON({routeResults:v,barriers:d,polygonBarriers:f,polylineBarriers:m,messages:g})}(b)}},89164:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),o=r(22303),i=r(35454),l=r(96674),n=r(5600),a=(r(67676),r(80442),r(75215),r(71715)),u=r(52011);const p=new i.X({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let c=0,y=class extends l.wq{constructor(e){super(e),this.id="sym"+c++,this.type=null,this.color=new o.Z([0,0,0,1])}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,t){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,s._)([(0,n.Cb)({type:p.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:p.write}}})],y.prototype,"type",void 0),(0,s._)([(0,n.Cb)({type:o.Z,json:{write:{allowNull:!0}}})],y.prototype,"color",void 0),(0,s._)([(0,a.r)("color")],y.prototype,"readColor",null),y=(0,s._)([(0,u.j)("esri.symbols.Symbol")],y);const d=y},8234:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var s=r(43697),o=(r(92604),r(75215),r(67676),r(80442),r(37697),r(52011)),i=r(23334),l=r(59633);let n=class extends l.Z{constructor(e){super(e)}solve(e,t){return(0,i.F)(this.url,e,t)}};n=(0,s._)([(0,o.j)("esri.tasks.RouteTask")],n);const a=n},59633:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),o=r(15923),i=r(17452),l=r(5600),n=(r(67676),r(80442),r(75215),r(52011));let a=class extends o.Z{constructor(...e){super(...e),this.requestOptions=null,this.url=null}normalizeCtorArgs(e,t){return"string"!=typeof e?e:{url:e,...t}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(e){return e?(0,i.mN)(e):null}_encode(e,t,r){const s={};for(const o in e){if("declaredClass"===o)continue;const i=e[o];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){s[o]=[];for(let e=0;e<i.length;e++)s[o][e]=this._encode(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(r&&r[o]);s[o]=t?e:JSON.stringify(e)}else s[o]=t?i:JSON.stringify(i);else s[o]=i}return s}};(0,s._)([(0,l.Cb)({readOnly:!0})],a.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],a.prototype,"requestOptions",void 0),(0,s._)([(0,l.Cb)({type:String})],a.prototype,"url",void 0),a=(0,s._)([(0,n.j)("esri.tasks.Task")],a);const u=a}}]);