@arcgis/core 4.23.0-next.20220119 → 4.23.0-next.20220127

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 (479) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/02fbc76dfdc20e628c61.js +1 -0
  5. package/assets/esri/core/workers/chunks/0317f37b6c8705b363fd.js +1 -0
  6. package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +1 -0
  7. package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 0d02c6ad1f4688bfa374.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +1 -0
  9. package/assets/esri/core/workers/chunks/0e17691520d890d34efb.js +1 -0
  10. package/assets/esri/core/workers/chunks/12c0cabb6c59e65d8546.js +1 -0
  11. package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +1 -0
  12. package/assets/esri/core/workers/chunks/{b313ab14a643273e7d09.js → 1877ab1b6a115dbba1c5.js} +1 -1
  13. package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
  14. package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +1 -0
  15. package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +1 -0
  16. package/assets/esri/core/workers/chunks/1f8c6a179e39fd4c5e6f.js +1 -0
  17. package/assets/esri/core/workers/chunks/2076fcbae63f1bfb7143.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
  20. package/assets/esri/core/workers/chunks/281b89dbf5574fc642ae.js +1 -0
  21. package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 2c8fe9bc988c3c5760a5.js} +1 -1
  22. package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
  23. package/assets/esri/core/workers/chunks/322d917e8cb398816a93.js +1 -0
  24. package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +1 -0
  25. package/assets/esri/core/workers/chunks/391e96192d1ec4e55ce2.js +1 -0
  26. package/assets/esri/core/workers/chunks/{1b28042fdf3f4dbc8ea5.js → 392b6382e06652dd4c80.js} +1 -1
  27. package/assets/esri/core/workers/chunks/3aa73119b055e05bbbeb.js +1 -0
  28. package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
  29. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
  30. package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → 48fa8aed6c24877b44c4.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 4954fd86b48cc68b737c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +1 -0
  33. package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
  34. package/assets/esri/core/workers/chunks/52ea678ba1da0e349919.js +1 -0
  35. package/assets/esri/core/workers/chunks/56274b37ff74ca0d68a6.js +1 -0
  36. package/assets/esri/core/workers/chunks/{b9c177524b3e7de1ffd1.js → 5790d171072b3c7d108f.js} +1 -1
  37. package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +1 -0
  38. package/assets/esri/core/workers/chunks/5948923e07bd1662c24a.js +1 -0
  39. package/assets/esri/core/workers/chunks/5bcb3240b3c005e5fe72.js +1 -0
  40. package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +1 -0
  41. package/assets/esri/core/workers/chunks/5ec98f4ddac707d0fbd1.js +1 -0
  42. package/assets/esri/core/workers/chunks/5ee497d5d7b0e580526a.js +1 -0
  43. package/assets/esri/core/workers/chunks/5f1dcb6556820cd0aa31.js +1 -0
  44. package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
  45. package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +1 -0
  46. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
  47. package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
  48. package/assets/esri/core/workers/chunks/69fd99b7c76e9992ccf3.js +1 -0
  49. package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
  50. package/assets/esri/core/workers/chunks/6e6a3c5866e8d8820457.js +1 -0
  51. package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +1 -0
  52. package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → 7a5f5acfbd4ca1a5c1f3.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
  54. package/assets/esri/core/workers/chunks/8001b0e514bfffe9d7f8.js +1 -0
  55. package/assets/esri/core/workers/chunks/83b8fec1650e061aaa56.js +1 -0
  56. package/assets/esri/core/workers/chunks/83d00afae4406ec78bc9.js +1 -0
  57. package/assets/esri/core/workers/chunks/842db82733635dbf25cb.js +1 -0
  58. package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 85b1f36790df95b17659.js} +1 -1
  59. package/assets/esri/core/workers/chunks/89820b200ee44e678af5.js +1 -0
  60. package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
  61. package/assets/esri/core/workers/chunks/929c9b7cdab7c4ca3d87.js +1 -0
  62. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
  63. package/assets/esri/core/workers/chunks/{010a71c2aa1b7681e191.js → 9d11f84e6c893b9d0019.js} +1 -1
  64. package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +1 -0
  65. package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
  66. package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +1 -0
  67. package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
  68. package/assets/esri/core/workers/chunks/aeaa1667c2d9f1b3366b.js +1 -0
  69. package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
  70. package/assets/esri/core/workers/chunks/{a8b13fb804bb775e4967.js → b62e3dccd9f662c0afeb.js} +1 -1
  71. package/assets/esri/core/workers/chunks/b97953694f42bfec1b3c.js +1 -0
  72. package/assets/esri/core/workers/chunks/b9e9cb354822c6d995a4.js +1 -0
  73. package/assets/esri/core/workers/chunks/{4b69129c0557852d9b3d.js → ba5eb394f098968c22d2.js} +1 -1
  74. package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +1 -0
  75. package/assets/esri/core/workers/chunks/bac9fc90e6756e211160.js +1 -0
  76. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
  77. package/assets/esri/core/workers/chunks/bf97a933ea3b220115e1.js +1 -0
  78. package/assets/esri/core/workers/chunks/bfedd6ebff817c9b31c0.js +1 -0
  79. package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +1 -0
  80. package/assets/esri/core/workers/chunks/c1135cb02ec46c491459.js +1 -0
  81. package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +1 -0
  82. package/assets/esri/core/workers/chunks/c9cbf8135e95f0f42cd9.js +1 -0
  83. package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
  84. package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +1 -0
  85. package/assets/esri/core/workers/chunks/d07440469fe7d181c4fd.js +1 -0
  86. package/assets/esri/core/workers/chunks/d08efbc349dd9f999497.js +1 -0
  87. package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
  88. package/assets/esri/core/workers/chunks/d835b2a683fcd8aeeed8.js +1 -0
  89. package/assets/esri/core/workers/chunks/dbf192b4ce7e608610f6.js +1 -0
  90. package/assets/esri/core/workers/chunks/dd13772a5e2eccc6a2bc.js +1 -0
  91. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
  92. package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +1 -0
  93. package/assets/esri/core/workers/chunks/{22b09e276c9b9f22f0f8.js → dee9929d95e9fe26929c.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → e0c8d61c7a85ce15499a.js} +1 -1
  95. package/assets/esri/core/workers/chunks/e12d91ef44d6f879a02a.js +1 -0
  96. package/assets/esri/core/workers/chunks/{0ce1dc14280d6f188468.js → e4896cf85fb2da8a9cc7.js} +1 -1
  97. package/assets/esri/core/workers/chunks/e657ba0cab29f05d02da.js +1 -0
  98. package/assets/esri/core/workers/chunks/e8741bf421f80213f1d3.js +1 -0
  99. package/assets/esri/core/workers/chunks/e8e775758b79c5a084c8.js +1 -0
  100. package/assets/esri/core/workers/chunks/e93dfdede0532a89ffa5.js +1 -0
  101. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
  102. package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +1 -0
  103. package/assets/esri/core/workers/chunks/{1305ef8717da6e902a55.js → ec10151a2a95e95a0bb5.js} +1 -1
  104. package/assets/esri/core/workers/chunks/eccba071ced2d922bb85.js +1 -0
  105. package/assets/esri/core/workers/chunks/f2124f4d0f2b8a91f0ea.js +1 -0
  106. package/assets/esri/core/workers/chunks/f9ff3eaf4eb324429fbd.js +1 -0
  107. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  108. package/assets/esri/themes/base/_mixins.scss +4 -1
  109. package/assets/esri/themes/base/icons/style.scss +11 -2
  110. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
  111. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
  112. package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
  113. package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
  114. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
  115. package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
  116. package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
  117. package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
  118. package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
  119. package/assets/esri/themes/base/widgets/_Print.scss +24 -11
  120. package/assets/esri/themes/base/widgets/_Search.scss +4 -2
  121. package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
  122. package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
  123. package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
  124. package/assets/esri/themes/dark/main.css +1 -1
  125. package/assets/esri/themes/dark-blue/main.css +1 -1
  126. package/assets/esri/themes/dark-green/main.css +1 -1
  127. package/assets/esri/themes/dark-purple/main.css +1 -1
  128. package/assets/esri/themes/dark-red/main.css +1 -1
  129. package/assets/esri/themes/light/main.css +1 -1
  130. package/assets/esri/themes/light/view.css +1 -1
  131. package/assets/esri/themes/light-blue/main.css +1 -1
  132. package/assets/esri/themes/light-green/main.css +1 -1
  133. package/assets/esri/themes/light-purple/main.css +1 -1
  134. package/assets/esri/themes/light-red/main.css +1 -1
  135. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  136. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  137. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  138. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  139. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  140. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  141. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  142. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  143. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  144. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  145. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  146. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  147. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  148. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  149. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  150. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  151. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  152. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  153. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  154. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  155. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  156. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  157. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  158. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  159. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  160. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  161. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  162. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  163. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  164. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  165. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  166. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  167. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  168. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  169. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  170. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  171. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  172. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  173. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  174. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  175. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  176. package/chunks/CloudsComposition.glsl.js +4 -4
  177. package/chunks/ComponentShader.glsl.js +19 -19
  178. package/chunks/Precipitation.glsl.js +91 -0
  179. package/chunks/Terrain.glsl.js +11 -11
  180. package/chunks/WaterSurface.glsl.js +21 -21
  181. package/chunks/pe.js +1 -1
  182. package/chunks/vec3.js +1 -1
  183. package/chunks/vxlLayer.js +1 -1
  184. package/core/accessorSupport/ensureType.js +1 -1
  185. package/core/accessorSupport/get.js +1 -1
  186. package/core/accessorSupport/read.js +1 -1
  187. package/core/accessorSupport/set.js +1 -1
  188. package/core/accessorSupport/write.js +1 -1
  189. package/core/clock.js +1 -1
  190. package/core/has.js +1 -1
  191. package/core/jsonMap.js +1 -1
  192. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  193. package/core/promiseUtils.js +1 -1
  194. package/core/reactiveUtils.js +1 -1
  195. package/core/workers/workerFactory.js +1 -1
  196. package/form/ExpressionInfo.js +1 -1
  197. package/geometry/pe.js +1 -1
  198. package/geometry/support/axisAngleDegrees.js +1 -1
  199. package/geometry/support/heightModelInfoUtils.js +1 -1
  200. package/interfaces.d.ts +343 -106
  201. package/layers/RouteLayer.js +1 -1
  202. package/layers/VoxelLayer.js +1 -1
  203. package/layers/VoxelWasmPerScene.js +1 -1
  204. package/layers/support/RasterWorker.js +1 -1
  205. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  206. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  207. package/libs/vxl/enums.js +1 -1
  208. package/package.json +2 -2
  209. package/popup/content/AttachmentsContent.js +1 -1
  210. package/popup/content/support/mediaInfoTypes.js +1 -1
  211. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  212. package/portal/schemas/definitions.js +1 -1
  213. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  214. package/portal/schemas/pointCloudLayerItem.js +1 -1
  215. package/portal/schemas/sceneLayerItem.js +1 -1
  216. package/portal/schemas/webScene.js +1 -1
  217. package/rest/find.js +1 -1
  218. package/rest/geometryService/generalize.js +1 -1
  219. package/rest/geometryService/lengths.js +1 -1
  220. package/rest/geometryService/offset.js +1 -1
  221. package/rest/geometryService/relation.js +1 -1
  222. package/rest/geometryService/trimExtend.js +1 -1
  223. package/rest/identify.js +1 -1
  224. package/{tasks → rest}/operations/find.js +0 -0
  225. package/{tasks → rest}/operations/generalize.js +0 -0
  226. package/rest/operations/identify.js +5 -0
  227. package/{tasks → rest}/operations/lengths.js +0 -0
  228. package/{tasks → rest}/operations/offset.js +0 -0
  229. package/{tasks → rest}/operations/relation.js +0 -0
  230. package/{tasks → rest}/operations/trimExtend.js +0 -0
  231. package/{tasks → rest}/operations/urlUtils.js +0 -0
  232. package/rest/print.js +1 -1
  233. package/rest/query/operations/query.js +1 -1
  234. package/rest/query/operations/queryAttachments.js +1 -1
  235. package/rest/query/operations/queryRelatedRecords.js +1 -1
  236. package/rest/query/operations/queryTopFeatures.js +1 -1
  237. package/rest/route/utils.js +1 -1
  238. package/rest/support/NetworkServiceDescription.js +1 -1
  239. package/rest/support/RouteInfo.js +1 -1
  240. package/rest/support/RouteParameters.js +1 -1
  241. package/rest/support/RouteSettings.js +5 -0
  242. package/rest/support/Stop.js +1 -1
  243. package/rest/support/networkEnums.js +1 -1
  244. package/support/arcadeOnDemand.js +1 -1
  245. package/support/featureFlags.js +1 -1
  246. package/support/revision.js +1 -1
  247. package/symbols/Font.js +1 -1
  248. package/symbols/LabelSymbol3D.js +1 -1
  249. package/symbols/PointSymbol3D.js +1 -1
  250. package/symbols/TextSymbol.js +1 -1
  251. package/symbols/TextSymbol3DLayer.js +1 -1
  252. package/symbols/cim/CIMSymbolHelper.js +1 -1
  253. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  254. package/symbols/cim/cimAnalyzer.js +1 -1
  255. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  256. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  257. package/symbols/support/cimSymbolUtils.js +1 -1
  258. package/symbols/support/previewCIMSymbol.js +1 -1
  259. package/symbols/support/previewSymbol2D.js +1 -1
  260. package/symbols/support/previewSymbol3D.js +1 -1
  261. package/symbols/support/previewWebStyleSymbol.js +1 -1
  262. package/symbols/support/svgUtils.js +1 -1
  263. package/symbols/support/textUtils.js +5 -0
  264. package/symbols.js +1 -1
  265. package/views/2d/MapViewConstraints.js +1 -1
  266. package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
  267. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  268. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  269. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  270. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  271. package/views/2d/support/engineHelpers.js +1 -1
  272. package/views/2d/viewpointUtils.js +1 -1
  273. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  274. package/views/3d/environment/CloudsComposition.js +1 -1
  275. package/views/3d/environment/CloudsGenerator.js +1 -1
  276. package/views/3d/environment/CloudsPresets.js +1 -1
  277. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  278. package/views/3d/environment/Fog.js +1 -1
  279. package/views/3d/environment/Precipitation.glsl.js +5 -0
  280. package/views/3d/environment/Precipitation.js +5 -0
  281. package/views/3d/environment/PrecipitationTechnique.js +5 -0
  282. package/views/3d/environment/RainyWeather.js +1 -1
  283. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  284. package/views/3d/environment/SnowyWeather.js +5 -0
  285. package/views/3d/environment/weather.js +1 -1
  286. package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
  287. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  288. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  289. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  290. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  291. package/views/3d/layers/GraphicsView3D.js +1 -1
  292. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  293. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  294. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  295. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  296. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  297. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
  298. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  299. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  300. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  301. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  302. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  303. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  304. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  305. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  306. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  307. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  308. package/views/3d/layers/graphics/GraphicsProcessor.js +5 -0
  309. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  310. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  311. package/views/3d/support/sunUtils.js +1 -1
  312. package/views/3d/terrain/OverlayRenderer.js +1 -1
  313. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
  314. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  315. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
  316. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  317. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  318. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  319. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  320. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  321. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  322. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  323. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  324. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  325. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  326. package/views/3d/webgl-engine/parts/Model.js +1 -1
  327. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  328. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  329. package/views/MapView.js +1 -1
  330. package/views/SceneView.js +1 -1
  331. package/views/View.js +1 -1
  332. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  333. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  334. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  335. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  336. package/views/interactive/dragEventPipeline.js +1 -1
  337. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  338. package/views/support/DefaultsFromMap.js +1 -1
  339. package/views/support/projectionUtils.js +5 -0
  340. package/views/webgl/ContextState.js +1 -1
  341. package/views/webgl/FramebufferObject.js +1 -1
  342. package/views/webgl/Renderbuffer.js +1 -1
  343. package/views/webgl/RenderingContext.js +1 -1
  344. package/views/webgl/Texture.js +1 -1
  345. package/views/webgl/Util.js +1 -1
  346. package/views/webgl/enums.js +1 -1
  347. package/views/webgl/rasterUtils.js +1 -1
  348. package/views/webgl/testFloatBufferBlend.js +1 -1
  349. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  350. package/widgets/Attachments.js +1 -1
  351. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  352. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  353. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  354. package/widgets/BasemapGallery.js +1 -1
  355. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  356. package/widgets/Feature/FeatureExpression.js +1 -1
  357. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  358. package/widgets/Feature/FeatureMedia.js +1 -1
  359. package/widgets/Feature/FeatureViewModel.js +1 -1
  360. package/widgets/FeatureForm/InputField.js +1 -1
  361. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  362. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  363. package/widgets/FeatureTable.js +1 -1
  364. package/widgets/LayerList/LayerListViewModel.js +1 -1
  365. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  366. package/widgets/Popup/PopupViewModel.js +1 -1
  367. package/widgets/Popup/actionUtils.js +1 -1
  368. package/widgets/Slice/SliceViewModel.js +1 -1
  369. package/widgets/Slider/SliderViewModel.js +1 -1
  370. package/widgets/Slider.js +1 -1
  371. package/widgets/Weather/WeatherViewModel.js +1 -1
  372. package/widgets/Weather/css.js +1 -1
  373. package/widgets/Weather/enums.js +5 -0
  374. package/widgets/Weather.js +1 -1
  375. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  376. package/widgets/support/InteractiveToolViewModel.js +1 -1
  377. package/widgets/support/geolocationUtils.js +1 -1
  378. package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
  379. package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
  380. package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
  381. package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
  382. package/assets/components/assets/calcite-icon/squareF16.json +0 -1
  383. package/assets/components/assets/calcite-icon/squareF24.json +0 -1
  384. package/assets/components/assets/calcite-icon/squareF32.json +0 -1
  385. package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
  386. package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
  387. package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
  388. package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
  389. package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
  390. package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
  391. package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
  392. package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
  393. package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
  394. package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +0 -1
  395. package/assets/esri/core/workers/chunks/05db312a0ca6bd3f014a.js +0 -1
  396. package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
  397. package/assets/esri/core/workers/chunks/0c3e3a5baf54bd5e210c.js +0 -1
  398. package/assets/esri/core/workers/chunks/0f254c3e91e8fee55f28.js +0 -1
  399. package/assets/esri/core/workers/chunks/14bef72154b3a19561a7.js +0 -1
  400. package/assets/esri/core/workers/chunks/18668dc45eb9e35530df.js +0 -1
  401. package/assets/esri/core/workers/chunks/1fd48459afb58a6cf14f.js +0 -1
  402. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
  403. package/assets/esri/core/workers/chunks/208a7e24e19fc5633dd7.js +0 -1
  404. package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +0 -1
  405. package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
  406. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
  407. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +0 -1
  408. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
  409. package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
  410. package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +0 -1
  411. package/assets/esri/core/workers/chunks/36a3f6fb4d1d18fcb642.js +0 -1
  412. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
  413. package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
  414. package/assets/esri/core/workers/chunks/3aa4194dc5497c57647f.js +0 -1
  415. package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +0 -1
  416. package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
  417. package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +0 -1
  418. package/assets/esri/core/workers/chunks/47395d225229d237f0ac.js +0 -1
  419. package/assets/esri/core/workers/chunks/4bfbf5a34c9207fdcf44.js +0 -1
  420. package/assets/esri/core/workers/chunks/5d4863a92b03bebc1b54.js +0 -1
  421. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
  422. package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
  423. package/assets/esri/core/workers/chunks/618076e6de605873e433.js +0 -1
  424. package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +0 -1
  425. package/assets/esri/core/workers/chunks/634b5ccd7a3ac67f855d.js +0 -1
  426. package/assets/esri/core/workers/chunks/662d13f68cf3ec92439b.js +0 -1
  427. package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
  428. package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +0 -1
  429. package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
  430. package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +0 -1
  431. package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
  432. package/assets/esri/core/workers/chunks/7e596478507466953e65.js +0 -1
  433. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +0 -1
  434. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
  435. package/assets/esri/core/workers/chunks/8a250ec51097f16feb66.js +0 -1
  436. package/assets/esri/core/workers/chunks/8b6ab6202a40fe622833.js +0 -1
  437. package/assets/esri/core/workers/chunks/8fdd5bca3716816d359b.js +0 -1
  438. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +0 -1
  439. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
  440. package/assets/esri/core/workers/chunks/9d9dffc8884d66a258e4.js +0 -1
  441. package/assets/esri/core/workers/chunks/a28b53c61bddefb6616e.js +0 -1
  442. package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
  443. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
  444. package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +0 -1
  445. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
  446. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +0 -1
  447. package/assets/esri/core/workers/chunks/b10fcbe1393c812fc219.js +0 -1
  448. package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +0 -1
  449. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +0 -1
  450. package/assets/esri/core/workers/chunks/ba6654a885be4b7a43f0.js +0 -1
  451. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
  452. package/assets/esri/core/workers/chunks/c11474b702dfb94e8e87.js +0 -1
  453. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
  454. package/assets/esri/core/workers/chunks/c3eca92d02958732e141.js +0 -1
  455. package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
  456. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
  457. package/assets/esri/core/workers/chunks/c8f976e53e232e8da9cc.js +0 -981
  458. package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
  459. package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
  460. package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
  461. package/assets/esri/core/workers/chunks/cfbffa429d88e7709c3f.js +0 -1
  462. package/assets/esri/core/workers/chunks/d24c4fbc567486b1188f.js +0 -1
  463. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
  464. package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
  465. package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +0 -1
  466. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
  467. package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +0 -1
  468. package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
  469. package/assets/esri/core/workers/chunks/ed0297fc61014e848c18.js +0 -1
  470. package/assets/esri/core/workers/chunks/ef8b75b92cf549e0507e.js +0 -1
  471. package/assets/esri/core/workers/chunks/f467c8f1fce22f6f599c.js +0 -1
  472. package/assets/esri/core/workers/chunks/f678293de9a6d8f5b5db.js +0 -1
  473. package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +0 -1
  474. package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
  475. package/assets/esri/core/workers/chunks/ffaf091c6023225cf5aa.js +0 -1
  476. package/symbols/support/constants.js +0 -5
  477. package/tasks/operations/identify.js +0 -5
  478. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
  479. package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4816,2515],{1692:(e,t,i)=>{i.d(t,{Z:()=>S});var r=i(43697),s=i(66577),n=i(51773),a=i(78223),l=i(15923),o=(i(80442),i(22974)),u=i(92604),h=i(70586),d=i(31263),c=i(1153),p=i(52011);u.Z.getLogger("esri.core.Clonable");const f=e=>{let t=class extends e{clone(){const e=(0,h.s3)((0,c.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const n=t[e],a=null==i?void 0:i.originOf(e);if(n.readOnly||!1===n.clonable||a!==d.s3.USER&&a!==d.s3.DEFAULTS)continue;const l=this[e];let u=null;const h=n.clonable;u="function"==typeof h?h(l):"reference"===h?l:(0,o.Vo)(l),null!=l&&null==u||(a===d.s3.DEFAULTS?s.set(e,u):r[e]=u)}const n=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){var a;const e=null==(a=(0,c.vw)(n))?void 0:a.store;if(e)for(const[t,i]of s)e.set(t,i,d.s3.DEFAULTS)}return n}};return t=(0,r._)([(0,p.j)("esri.core.Clonable")],t),t};let y=class extends(f(l.Z)){};y=(0,r._)([(0,p.j)("esri.core.Clonable")],y);var _=i(96674),g=i(99001),m=i(5600),b=(i(67676),i(75215),i(33955));let w=class extends(f(_.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,g.D)(),configurable:!0})}normalizeCtorArgs(e,t,i,r){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:i,popupTemplate:r}}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,h.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{geometry:(0,h.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,h.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,h.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,i,r){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}};(0,r._)([(0,m.Cb)({value:null})],w.prototype,"attributes",null),(0,r._)([(0,m.Cb)({value:null,types:s.qM,json:{read:b.im}})],w.prototype,"geometry",null),(0,r._)([(0,m.Cb)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,r._)([(0,m.Cb)({clonable:"reference"})],w.prototype,"layer",void 0),(0,r._)([(0,m.Cb)({type:n.Z})],w.prototype,"popupTemplate",void 0),(0,r._)([(0,m.Cb)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,r._)([(0,m.Cb)({value:null,types:a.LB})],w.prototype,"symbol",null),(0,r._)([(0,m.Cb)({type:Boolean,value:!0})],w.prototype,"visible",null),w=(0,r._)([(0,p.j)("esri.Graphic")],w),(w||(w={})).generateUID=g.D;const S=w},28924:(e,t,i)=>{i.d(t,{Z:()=>s});var r=i(95330);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?this.resolvePromise(null):this.resolvePromise(this._layerByName[e])}featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?this.resolvePromise(null):this.resolvePromise(this._layerById[e])}castToText(){return"object, FeatureSetCollection"}resolvePromise(e){return(0,r.DB)(e)}}},50954:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>Y,constructFeatureSet:()=>H,constructFeatureSetFromPortalItem:()=>oe,constructFeatureSetFromRelationship:()=>ee,constructFeatureSetFromUrl:()=>$,convertToFeatureSet:()=>le,createFeatureSetCollectionFromMap:()=>re,createFeatureSetCollectionFromService:()=>se,getPortal:()=>ne,initialiseMetaDataCache:()=>Q,lookupUser:()=>ae});var r=i(40330),s=i(3172),n=i(28924),a=i(84328),l=i(1692),o=i(61363),u=i(70409),h=i(85065),d=i(91136),c=i(90961),p=i(3823),f=i(90658),y=i(36515),_=i(95002),g=i(41534);class m{clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i){const r=new m;r.field=e;const s=g.WhereClause.create(t,i),n=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new Error("Statistic does not have 1 or 0 Parameters");const t=g.WhereClause.create((0,y.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new Error("Invalid Statistic Function");const a=n.name.toUpperCase().trim();if("MIN"===a){if(r.typeofstat="MIN",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MAX"===a){if(r.typeofstat="MAX",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("COUNT"===a)r.typeofstat="COUNT",r.workingexpr=n.expr;else if("STDEV"===a){if(r.typeofstat="STDDEV",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("SUM"===a){if(r.typeofstat="SUM",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MEAN"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("AVG"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else{if("VAR"!==a)throw new Error("Invalid Statistic Function");if(r.typeofstat="VAR",r.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}return r}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(44543),w=i(95330),S=i(82971),v=i(1231),F=i(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends d.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_getSet(e){return null===this._wset?this._getFilteredSet("",null,null,null,e).then((e=>(this._wset=e,this._wset))):(0,w.DB)(this._wset)}_isInFeatureSet(){return f.dj.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new F.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new S.Z({wkid:4326});this.fields=[];const s=new m;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new v.Z;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,y.y5)(t.expression)){const e=this._parent.getField((0,y.zR)(t.expression,f.Bj.Standardised));if(!e)throw new Error("Field is not present for Aggregation");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type}else{i.type=this._convertToEsriFieldType((0,y.DT)(t.expression,this._parent.fields));const e=new v.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new v.Z;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,y.y5)(s.workingexpr)?(0,y.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new Error("Field is not present for Aggregation");i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new Error("Field is not present for Aggregation");i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new Error("Field is not present for Aggregation");i.type="double"}this.fields.push(i)}}_canDoAggregates(){return(0,w.DB)(!1)}_getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?this._expandPagedSet(e,s,0,0,r).then((()=>this._getFeatures(e,t,i,r))):(0,w.DB)("success")}_getFilteredSet(e,t,i,r,s){if(""!==e)return(0,w.DB)(new c.Z([],[],!0,null));let n=null;const l={ordered:!1,nowhereclause:!1};return this._ensureLoaded().then((()=>{if(null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,y.hq)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}return!1===this._candosimplegroupby?(0,w.DB)(!1):this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)})).then((e=>{if(e){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;return r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r)),this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField).then((e=>(this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new c.Z(e._candidates.slice(0),e._known.slice(0),!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),n)))}let t=this._parent;if(this._adaptedFields.length>0&&(t=new u.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:t,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=t;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:e,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}))}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}_refineSetBlock(e,t,i){try{return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?this._expandPagedSet(e,this._maxQuery,0,0,i).then((()=>this._refineSetBlock(e,t,i))):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,(0,w.DB)(e))}catch(e){return(0,w.d1)(e)}}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_getPhysicalPage(e,t,i){return!0===e.pagesDefinition.aggregatefeaturesetpagedefinition?(0,w.Ue)(((t,r)=>{this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]).then((e=>{t(e)}),r)})):this._getAgregagtePhysicalPage(e,t,i).then((e=>{for(const t of e){const e={geometry:t.geometry,attributes:{}};for(const i of this._decodedGroupbyfield)e.attributes[i.tofieldname]=t.attributes[i.name];for(const i of this._decodedStatsfield)e.attributes[i.tofieldname]=t.attributes[i.field];this._featureCache[e.attributes[this.objectIdField]]=new l.Z(e)}return e.length}))}_sequentialGetPhysicalItem(e,t,i,r){return(0,w.Ue)(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,(n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),n)}))}_nextAggregateItem(e,t,i,r,s,n){try{(0,o.U)(e.pagesDefinition.internal.iterator.next()).then((a=>{if(null===a)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(a);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[a],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[a],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(a)}this._nextAggregateItem(e,t,i,r,s,n)}}),n)}catch(e){n(e)}}_calculateFieldStat(e,t,i){const r=[];for(let i=0;i<e.features.length;i++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[i]);null!==s&&r.push(s)}else r.push(null);switch(t.typeofstat){case"MIN":i.attributes[t.tofieldname]=(0,_.tj)("min",r,-1);break;case"MAX":i.attributes[t.tofieldname]=(0,_.tj)("max",r,-1);break;case"SUM":i.attributes[t.tofieldname]=(0,_.tj)("sum",r,-1);break;case"COUNT":i.attributes[t.tofieldname]=r.length;break;case"VAR":i.attributes[t.tofieldname]=(0,_.tj)("var",r,-1);break;case"STDDEV":i.attributes[t.tofieldname]=(0,_.tj)("stddev",r,-1);break;case"AVG":i.attributes[t.tofieldname]=(0,_.tj)("avg",r,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:i.expression.calculateValue(e.features[0]);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,b.F)(t,b.M.String)}_stat(){return(0,w.DB)({calculated:!1})}getFeatureByObjectId(){return(0,w.DB)(null)}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var x=i(53073),D=i(63991),R=i(80692),k=i(33955),T=i(67284),O=i(98732),L=(i(17452),i(67900),i(98326),i(56545),i(41818)),N=(i(66577),i(34599)),P=i(57444),E=i(5396),A=i(4967),j=(i(80442),i(8744),i(74889)),B=i(75935),Z=(i(38581),i(28141),i(78760)),q=i(58539),U=i(33586);class G extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=(0,f.hd)(e.toJSON());return(0,b.F)(t,b.M.String)}load(){return null===this._loadPromise&&(this._loadPromise=(0,w.Ue)(((e,t)=>{try{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}catch(e){t(e)}}))),this._loadPromise}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return f.dj.InFeatureSet}_refineSetBlock(e){return(0,w.DB)(e)}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,w.DB)(this._wset)}_runDatabaseProbe(e){return(0,w.Ue)(((t,i)=>{try{this._ensureLoaded().then((()=>{try{const r=new P.Z;r.where=e.replace("OBJECTID",this._layer.objectIdField),this._layer.queryObjectIds(r).then((()=>{t(!0)}),(()=>{try{t(!1)}catch(e){i(e)}}))}catch(e){i(e)}}))}catch(e){i(e)}}))}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}queryPBF(e){return e.quantizationParameters={mode:"edit"},(0,N.executeQueryPBF)(this._layer.parsedUrl,e,new Z.J({})).then((e=>j.default.fromJSON((0,O.cn)(e.data)).unquantize()))}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?this._layer.gdbVersion:"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title,source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){const i="execute"===t?A.e:"executeForCount"===t?L.P:E.G,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const n=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(n),null===s&&(s=!0!==r?i[t](e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(n,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(n),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}_getFilteredSet(e,t,i,r,s){return this.databaseType().then((n=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new P.Z;return o.where=null===i?null===t?"1=1":"":(0,y.zR)(i,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e),this.executeQuery(o,"executeForIds").then((e=>(null===e&&(e=[]),this._checkCancelled(s),new c.Z([],e,l,null))))}))}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_getFilteredSetUsingPaging(e,t,i,r,s){try{let n="",a=!1;return null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0),this.databaseType().then((r=>{let l=null===i?null===t?"1=1":"":(0,y.zR)(i,r);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression);let o=this._maxQueryRate();const u=this._layer.capabilities.query.maxRecordCount;void 0!==u&&u<o&&(o=u);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return this._expandPagedSet(h,o,0,1,s).then((()=>h))}))}catch(e){return(0,w.d1)(e)}}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,i){try{const t=e.pagesDefinition.internal.lastRetrieved,r=t,s=e.pagesDefinition.internal.lastPage,n=new P.Z;return this._requestStandardised&&(n.sqlFormat="standard"),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference,this.executeQuery(n,"execute").then((n=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return"done";for(let t=0;t<n.features.length;t++)e.pagesDefinition.internal.set[r+t]=n.features[t].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let e=0;e<n.features.length;e++)this._featureCache[n.features[e].attributes[this._layer.objectIdField]]=n.features[e];return(void 0===n.exceededTransferLimit&&n.features.length!==e.pagesDefinition.resultRecordCount||!1===n.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+n.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}))}catch(e){return(0,w.d1)(e)}}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}_getFeatures(e,t,i,r){const s=[];try{if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return this._expandPagedSet(e,this._maxProcessingRate(),0,0,r).then((()=>this._getFeatures(e,t,i,r)));let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return(0,w.DB)("success");try{const e=new P.Z;return this._requestStandardised&&(e.sqlFormat="standard"),e.objectIds=s,e.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),e.returnGeometry=!0,!0===this._removeGeometry&&(e.returnGeometry=!1),e.outSpatialReference=this.spatialReference,this.executeQuery(e,"execute").then((e=>{if(this._checkCancelled(r),void 0!==e.error)return(0,w.d1)(new Error(e.error));for(let t=0;t<e.features.length;t++)this._featureCache[e.features[t].attributes[this._layer.objectIdField]]=e.features[t];return"success"}))}catch(e){return(0,w.d1)(e)}}catch(e){return(0,w.d1)(e)}}_getDistinctPages(e,t,i,r,s,n,a,l,o){return this._ensureLoaded().then((()=>this.databaseType())).then((u=>{let h=i.parseTree.column;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name.toLowerCase()===h.toLowerCase()){h=this._layer.fields[e].name;break}const d=new P.Z;this._requestStandardised&&(d.sqlFormat="standard");let c=null===n?null===s?"1=1":"":(0,y.zR)(n,u);return this._layer.definitionExpression&&this._useDefinitionExpression&&(c=""!==c?"(("+this._layer.definitionExpression+") AND ("+c+"))":this._layer.definitionExpression),d.where=c,d.spatialRelationship=this._makeRelationshipEnum(r),d.relationParameter=this._makeRelationshipParam(r),d.geometry=null===s?null:s,d.returnDistinctValues=!0,d.returnGeometry=!1,d.outFields=[h],this.executeQuery(d,"execute").then((u=>{if(this._checkCancelled(o),!u.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying statistics from layer"));let d=!1;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name===h){"date"===this._layer.fields[e].type&&(d=!0);break}for(let e=0;e<u.features.length;e++){if(d){const t=u.features[e].attributes[h];null!==t?l.push(new Date(t)):l.push(t)}else l.push(u.features[e].attributes[h]);if(l.length>=a)break}return 0===u.features.length?l:u.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<a?this._getDistinctPages(e+u.features.length,t,i,r,s,n,a,l,o).then((e=>({calculated:!0,result:e}))):l}))}))}_distinctStat(e,t,i,r,s,n,a){return this._getDistinctPages(0,e,t,i,r,s,n,[],a).then((e=>({calculated:!0,result:e})))}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}_countstat(e,t,i,r){return this.databaseType().then((e=>{const s=new P.Z;if(this._requestStandardised&&(s.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===r?null===i?"1=1":"":(0,y.zR)(r,e);return this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),s.where=n,s.where=n,s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===i?null:i,s.returnGeometry=!1,this.executeQuery(s,"executeForCount").then((e=>({calculated:!0,result:e})))}))}_stats(e,t,i,r,s,n,a){return this._ensureLoaded().then((()=>{const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;return"count"===e?u?this._countstat(e,i,r,s):{calculated:!1}:!1===o||!1===(0,y.y5)(t)&&!1===l||!1===t.isStandardized?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):"distinct"===e?!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a):this.databaseType().then((n=>{if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const a=new P.Z;this._requestStandardised&&(a.sqlFormat="standard");let l=null===s?null===r?"1=1":"":(0,y.zR)(s,n);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression),a.where=l,a.spatialRelationship=this._makeRelationshipEnum(i),a.relationParameter=this._makeRelationshipParam(i),a.geometry=null===r?null:r;const o=new q.Z;o.statisticType=(0,_.g3)(e),o.onStatisticField=(0,y.zR)(t,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",a.returnGeometry=!1;let u="ARCADE_STAT_RESULT";return a.outStatistics=[o],this.executeQuery(a,"execute").then((e=>{if(!e.hasOwnProperty("features")||0===e.features.length)return(0,w.d1)(new Error("Unnexected Result querying statistics from layer"));let t=!1;for(let i=0;i<e.fields.length;i++)if("ARCADE_STAT_RESULT"===e.fields[i].name.toUpperCase()){u=e.fields[i].name,"date"===e.fields[i].type&&(t=!0);break}if(t){let t=e.features[0].attributes[u];return null!==t&&(t=new Date(e.features[0].attributes[u])),{calculated:!0,result:t}}return{calculated:!0,result:e.features[0].attributes[u]}}))}))}))}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}_canDoAggregates(e,t){return this._ensureLoaded().then((()=>{let e=!1;const i=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(e=!0),e)for(let r=0;r<t.length-1;r++)null!==t[r].workingexpr&&(!1===t[r].workingexpr.isStandardized||!1===(0,y.y5)(t[r].workingexpr)&&!1===i)&&(e=!1);return!1!==e}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){return this._ensureLoaded().then((()=>this.databaseType())).then((l=>{let o="",u=!1,h=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),h=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(h=!1,u=!0,o=this._layer.objectIdField);const d=[];for(let e=0;e<t.length;e++){const i=new q.Z;i.onStatisticField=null!==t[e].workingexpr?(0,y.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),d.push(i)}""===o&&(o=e.join(","));let p=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<p&&(p=f);let _=null===s?null===r?"1=1":"":(0,y.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],h,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===r?null:r,where:_,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}))}_getAgregagtePhysicalPage(e,t,i){try{let t=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(t=""!==t?"("+t+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=new P.Z;return this._requestStandardised&&(a.sqlFormat="standard"),a.where=t,a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields,a.outStatistics=e.pagesDefinition.outStatistics,a.geometry=e.pagesDefinition.geometry,a.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.returnGeometry=e.pagesDefinition.returnGeometry,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&a.geometry&&a.spatialRelationship?(0,w.DB)([]):this.executeQuery(a,"execute").then((t=>{if(this._checkCancelled(i),!t.hasOwnProperty("features"))return(0,w.d1)(new Error("Unnexected Result querying aggregates from layer"));const a=[];if(e.pagesDefinition.internal.lastPage!==n)return[];for(let i=0;i<t.features.length;i++)e.pagesDefinition.internal.set[s+i]=t.features[i].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<t.features.length;e++)a.push(new l.Z({attributes:t.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===t.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=t.features[t.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===t.exceededTransferLimit&&t.features.length!==e.pagesDefinition.resultRecordCount||!1===t.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+t.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a}))}catch(e){return(0,w.d1)(e)}}static create(e,t,i,r,s){const n=new T.default({url:e,outFields:null===t?["*"]:t});return new G({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}queryAttachments(e,t,i,r,s){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};return(t&&t>0||i&&i>0)&&(n.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(n.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"}),this._layer.queryAttachments(n).then((t=>{const i=[];return t&&t[e]&&t[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let n=null;s&&t.exifInfo&&(n=U.Z.convertJsonToArcade(t.exifInfo,!0)),i.push(new R.Z(t.id,t.name,t.contentType,t.size,r,n))})),i}))}return(0,w.DB)([])}queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields.join(","),returnGeometry:e.returnGeometry.toString()};return void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"}),(0,s.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t}).then((e=>{if(e.data){const t={},i=e.data;if(i&&i.relatedRecordGroups){const e=i.spatialReference;for(const r of i.relatedRecordGroups){const s=r.objectId,n=[];for(const t of r.relatedRecords){t.geometry&&(t.geometry.spatialReference=e);const i=new l.Z({geometry:t.geometry?(0,k.im)(t.geometry):null,attributes:t.attributes});n.push(i)}t[s]={features:n,exceededTransferLimit:!0===i.exceededTransferLimit}}}return t}return(0,w.d1)("Invalid Request")}))}getFeatureByObjectId(e,t){const i=new P.Z;return i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"}),(0,A.e)(this._layer.parsedUrl.path,i).then((e=>1===e.features.length?e.features[0]:null))}getIdentityUser(){return this.load().then((()=>{var e;const t=null==(e=r.id)?void 0:e.findCredential(this._layer.url);return t?t.userId:null}))}getOwningSystemUrl(){return this.load().then((()=>{var e;const t=null==(e=r.id)?void 0:e.findServerInfo(this._layer.url);if(t)return(0,w.DB)(t.owningSystemUrl);let i=this._layer.url;const n=i.toLowerCase().indexOf("/rest/services");return i=n>-1?i.substring(0,n):i,i?(i+="/rest/info",(0,w.Ue)(((e,t)=>{(0,s.default)(i,{query:{f:"json"}}).then((t=>{let i="";t.data&&t.data.owningSystemUrl&&(i=t.data.owningSystemUrl),e(i)}),(t=>{e("")}))}))):(0,w.DB)("")}))}getDataSourceFeatureSet(){const e=new G({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}var z=i(17805);class M extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,this.relatedLayer=null,this.relationship=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this.relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,w.Ue)(((e,t)=>{(0,w.$6)([this._layer.load(),this.relatedLayer.load()]).then((()=>{this._initialiseFeatureSet(),e(this)}),t)}))),this._loadPromise}nativeCapabilities(){return this.relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this.relatedLayer.geometryType,this.fields=this.relatedLayer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this.relatedLayer.objectIdField,this.globalIdField=this.relatedLayer.globalIdField,this.hasM=this.relatedLayer.supportsM,this.hasZ=this.relatedLayer.supportsZ,this.typeIdField=this.relatedLayer.typeIdField,this.types=this.relatedLayer.types}databaseType(){return this.relatedLayer.databaseType().then((()=>(this._databaseType=this.relatedLayer._databaseType,this._databaseType)))}isTable(){return this.relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,w.DB)(this._wset)}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,i,r,s){return this.databaseType().then((()=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new B.Z;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let h=!0;return!0===this._removeGeometry&&(h=!1),o.returnGeometry=h,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,n.source.queryRelatedFeatures(o).then((r=>{this._checkCancelled(s);const n=r[this._findObjectId]?r[this._findObjectId].features:[],a=[];for(let e=0;e<n.length;e++)this._featureCache[n[e].attributes[this._layer.objectIdField]]=n[e],a.push(n[e].attributes[this._layer.objectIdField]);const o=t&&null!==e&&""!==e,u=null!=i;return new c.Z(o||u?a:[],o||u?[]:a,l,null)}))}))}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}_getFilteredSetUsingPaging(e,t,i,r,s){try{let n="",a=!1;const l=this._layer.nativeCapabilities();return null!==r&&l&&l.capabilities.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),this.databaseType().then((()=>{let r=this._maxQueryRate();const o=l.capabilities.query.maxRecordCount;void 0!==o&&o<r&&(r=o);const u=t&&null!==e&&""!==e,h=null!=i;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const f=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);return d=new c.Z(u||h?["GETPAGES"]:[],u||h?[]:["GETPAGES"],a,{outFields:f.join(","),resultRecordCount:r,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),this._expandPagedSet(d,r,0,0,s).then((()=>d))}))}catch(e){return(0,w.d1)(e)}}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,i){try{const t=e.pagesDefinition.internal.lastRetrieved,r=t,s=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),a=new B.Z;return!0===this._requestStandardised&&(a.sqlFormat="standard"),a.relationshipId=this.relationship.id,a.objectIds=e.pagesDefinition.objectIds,a.resultOffset=e.pagesDefinition.internal.lastPage,a.resultRecordCount=e.pagesDefinition.resultRecordCount,a.outFields=e.pagesDefinition.outFields.split(","),a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference,n.source.queryRelatedFeatures(a).then((n=>{if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==s)return 0;const a=n[this._findObjectId]?n[this._findObjectId].features:[];for(let t=0;t<a.length;t++)e.pagesDefinition.internal.set[r+t]=a[t].attributes[this._layer.objectIdField];for(let e=0;e<a.length;e++)this._featureCache[a[e].attributes[this._layer.objectIdField]]=a[e];const l=!n[this._findObjectId]||!1===n[this._findObjectId].exceededTransferLimit;return a.length!==e.pagesDefinition.resultRecordCount&&l&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+a.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a.length}))}catch(e){return(0,w.d1)(e)}}_getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return this._expandPagedSet(e,n,0,0,r).then((()=>this._getFeatures(e,t,i,r)));let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);return 0===s.length?(0,w.DB)("success"):(0,w.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e,t,i){return(0,w.DB)(e)}_stat(e,t,i,r,s,n,a){return(0,w.DB)({calculated:!1})}get gdbVersion(){return this.relatedLayer.gdbVersion}_canDoAggregates(e,t,i,r,s){return(0,w.DB)(!1)}relationshipMetaData(){return this.relatedLayer.relationshipMetaData()}serviceUrl(){return this.relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this.relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this.relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this.relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this.relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this.relatedLayer}}var W=i(48039),V=i(65587),J=i(15235);function Q(){null===W.Z.applicationCache&&(W.Z.applicationCache=new W.Z)}function K(e,t){if(W.Z.applicationCache){const i=W.Z.applicationCache.getLayerInfo(e);if(i)return i.then((i=>(0,w.DB)(new T.default({url:e,outFields:t,sourceJSON:i}))));const r=new T.default({url:e,outFields:t});let s=(0,w.Ue)(((e,t)=>{r.load().then((()=>{e(r.sourceJSON)}),(e=>{t(e)}))}));return W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,s),s=s.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),s.then((()=>(0,w.DB)(r)))}return(0,w.DB)(new T.default({url:e,outFields:t}))}function $(e,t,i,r,s,n=null){return K(e,["*"]).then((e=>(0,w.DB)(H(e,t,i,r,s,n))))}function H(e,t=null,i=null,r=!0,s=null,n=null){return!0===e._hasMemorySource()?new z.Z({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n}):new G({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n})}function X(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.layers||(t.layers=[]),t.tables||(t.tables=[]),(0,w.DB)(t)}return(0,w.DB)({layers:[],tables:[]})}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}function Y(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null};return X(e).then((r=>{if(i.metadata=r,r.controllerDatasetLayers&&void 0!==r.controllerDatasetLayers.utilityNetworkLayerId&&null!==r.controllerDatasetLayers.utilityNetworkLayerId){if(r.layers)for(const e of r.layers)i.layerNameLkp[e.id]=e.name;if(r.tables)for(const e of r.tables)i.layerNameLkp[e.id]=e.name;const n=r.controllerDatasetLayers.utilityNetworkLayerId;return i.networkId=n,function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==W.Z.applicationCache){const e=W.Z.applicationCache.getLayerInfo(i);if(null!==e)return e}let r=(0,s.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}}).then((e=>{if(e.data){const t=e.data;if(t.layerDataElements&&t.layerDataElements[0])return t.layerDataElements[0]}throw new Error("Not Found")}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(i,r),r=r.catch((e=>{throw W.Z.applicationCache.clearLayerInfo(i),e}))),r}(e,n).then((r=>{if(r){i.queryelem=r,i.queryelem&&i.queryelem.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources?e.edgeSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]?i.layerNameLkp[t.layerId]:null};e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources?e.junctionSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]?i.layerNameLkp[t.layerId]:null};e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});return function(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return(0,w.DB)(t)}return(0,w.DB)(null)}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}(e+"/"+n).then((r=>{if(r.systemLayers&&void 0!==r.systemLayers.associationsTableId&&null!==r.systemLayers.associationsTableId){const s=[];return i.unVersion>=4&&(s.push("STATUS"),s.push("PERCENTALONG")),$(e+"/"+r.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...s],!1,null,null).then((e=>e.load())).then((e=>i.unVersion>=4?(e=e.filter(g.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62,63)",e.getFieldsIndex()))).load():e)).then((e=>({lkp:i.lkp,associations:e,unVersion:i.unVersion,terminals:i.terminals})))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}))}function ee(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();return o?(o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString(),$(o,r,s,n,a,l).then((o=>new M({layer:e,relatedLayer:o,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})))):null}a.Z.registerAction(),C.registerAction(),h.Z.registerAction(),x.Z.registerAction(),D.Z.registerAction();class te extends n.Z{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overridespref=t,this.lrucache=i,this.interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=H(e,this._overridespref,null===i?["*"]:i,t,this.lrucache,this.interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}featureSetByName(e,t=!0,i=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetByName(e,t,i)}catch(e){return(0,w.d1)(e)}}));null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.title===e));if(s)return this.resolvePromise(this._makeAndAddFeatureSet(s,t,i));if(this._map.tables){const r=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(r){if(r instanceof T.default)return this.resolvePromise(this._makeAndAddFeatureSet(r,t,i));if(r._materializedTable);else{const e=r.outFields?r:{...r,outFields:["*"]};r._materializedTable=new T.default(e)}return r._materializedTable.load().then((()=>this.resolvePromise(this._makeAndAddFeatureSet(r._materializedTable,t,i))))}}return this.resolvePromise(null)}featureSetById(e,t=!0,i=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetById(e,t,i)}catch(e){return(0,w.d1)(e)}}));null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.id===e));if(s)return this.resolvePromise(this._makeAndAddFeatureSet(s,t,i));if(this._map.tables){const r=this._map.tables.find((t=>t.id===e));if(r){if(r instanceof T.default)return this.resolvePromise(this._makeAndAddFeatureSet(r,t,i));if(r._materializedTable);else{const e={...r,outFields:["*"]};r._materializedTable=new T.default(e)}return r._materializedTable.load().then((()=>this.resolvePromise(this._makeAndAddFeatureSet(r._materializedTable,t,i))))}}return this.resolvePromise(null)}}class ie extends n.Z{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overridespref=t,this.lrucache=i,this.interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=H(e,this._overridespref,null===i?["*"]:i,t,this.lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}_loadMetaData(){return X(this._url).then((e=>(this.metadata=e,e)))}load(){return this._loadMetaData()}clone(){return new ie(this._url,this._overridespref,this.lrucache,this.interceptor)}featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}return this._loadMetaData().then((r=>{let s=null;for(const t of r.layers?r.layers:[])t.name===e&&(s=t);if(!s)for(const t of r.tables?r.tables:[])t.name===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this._makeAndAddFeatureSet(e,t,i))):this.resolvePromise(null)}))}featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this.resolvePromise(this._instantLayers[i].featureset)}return this._loadMetaData().then((r=>{let s=null;for(const t of r.layers?r.layers:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of r.tables?r.tables:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this._makeAndAddFeatureSet(e,t,i))):this.resolvePromise(null)}))}}function re(e,t,i=null,r=null){return new te(e,t,i,r)}function se(e,t,i=null,r=null){return new ie(e,t,i,r)}function ne(e,t){return null===e?t:new V.Z({url:e.field("url")})}function ae(e,t,i){return r.id.findCredential(e.restUrl)?"loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===i?(0,w.DB)(e.user.sourceJSON):""===t?(0,s.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===i?{}:{returnUserLicenseTypeExtensions:!0}}}).then((e=>{if(e.data){const t=e.data;if(t&&t.username)return(0,w.DB)(t)}return(0,w.DB)(null)})):(0,s.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.error?null:(0,w.DB)(t)}return(0,w.DB)(null)})):(0,w.DB)(null)}function le(e,t,i,r,s){if(null===e)return null;if(e instanceof T.default){switch(t){case"datasource":return H(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return H(e,s,e.outFields,!0,i,r)}return null}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}function oe(e,t,i,r,s,n,a,l=null){if(W.Z.applicationCache){const o=W.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o)return o.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});return(0,w.DB)(H(n,i,r,s,a,l))}catch(e){return(0,w.d1)(e)}}),(e=>(0,w.d1)(e)))}return(0,w.Ue)(((o,u)=>{const h=new J.default({id:e,portal:n}).load();W.Z.applicationCache&&W.Z.applicationCache.setLayerInfo(e+":"+n.url,h),h.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});o(H(n,i,r,s,a,l))}catch(e){u(e)}}),(t=>{W.Z.applicationCache&&W.Z.applicationCache.clearLayerInfo(e+":"+n.url),u(t)}))}))}},70409:(e,t,i)=>{i.d(t,{Xx:()=>g,QP:()=>f,$X:()=>p,yN:()=>_,TO:()=>y});var r=i(1692),s=i(77286),n=i(91136),a=i(90961),l=i(90658),o=i(36515),u=i(95330),h=i(41534),d=i(82971);class c{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class p extends c{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class f extends c{constructor(e,t,i){super((0,l.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,o.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class y extends c{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,l.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,o.zR)(this.codefield,l.Bj.Standardised):this.codefield,e.parameters);return i.indexOf(y.BADNESS)>=0?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(i,t._parent.getFieldsIndex())}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let n,a,l,u;switch(e.type){case"interval":return(0,o.TE)(this.evaluateNodeToWhereClause(e.value,t,i,r,s),e.qualifier,e.op);case"case_expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,y.BADNESS,s));for(let n=0;n<e.clauses.length;n++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,i,y.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,i,y.BADNESS,s);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,y.BADNESS,s)),r+=" END ",r}case"param":{const i=s[e.value.toLowerCase()];if("string"==typeof i)return"'"+s[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(i instanceof Date)return(0,o.oX)(i,t);if(i instanceof Array){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replace(/'/g,"''")+"'"):i[r]instanceof Date?e.push((0,o.oX)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expr_list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,i,r,s));return a;case"unary_expr":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,y.BADNESS,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NOT NULL )";case"IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,i,r,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+u+")) ";case"NOT IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,i,r,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+u+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"<>":case"=":if("column_ref"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column_ref"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,y.BADNESS,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(0,o.oX)(e.value,t);case"number":return e.value.toString();case"current_time":return(0,o.vR)("date"===e.mode,t);case"column_ref":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":e.column;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,y.BADNESS,s);return(0,o.fz)(e.name,r,t)}}throw new Error("Unsupported sql syntax "+e.type)}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}y.BADNESS="_!!!_BAD_LKP_!!!!";class _ extends c{constructor(e,t){super(e),this.sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,o.bB)(e,this.field.name,(0,o.zR)(this.sql,l.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this.sql.calculateValueCompiled(e)}}class g extends n.Z{constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=null,this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}_initialiseFeatureSet(){null!==this._parent?(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.spatialReference=new d.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=l.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._extraFilter?this._getFilteredSet("",null,null,null,e):this._parent._getSet(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,u.DB)(this._wset)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,n){const l=[];-1!==t&&void 0===this._featureCache[t]&&l.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return this._expandPagedSet(e,o,0,0,n).then((()=>this._getFeatures(e,t,i,n)));let h=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(h++,h<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&l.push(e._known[r]),l.length>=o)));r++);if(0===l.length)return(0,u.DB)("success");e=new a.Z([],l,e._ordered,null);const d=Math.min(l.length,i);return this._parent._getFeatures(e,-1,d,n).then((()=>{this._checkCancelled(n);const e=[];for(let t=0;t<d;t++){const i=this._parent._featureFromCache(l[t]);void 0!==i&&e.push({geometry:i.geometry,attributes:i.attributes,id:l[t]})}for(const t of e){const e=[];for(const i of this.adaptedFields)e[i.field.name]=i.extractValue(t);this._featureCache[t.id]=new r.Z({attributes:e,geometry:(0,s.r1)(t.geometry)})}return"success"}))}_fetchAndRefineFeatures(){return(0,u.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,i,r,s){let n=!1;const l=this._reformulateWithoutAdaptions(i);n=l.cannot,i=l.where;let u=!1;if(null!==r){u=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof p)&&!0===r.scanForField(t.field.name)){if(!(t instanceof f)){r=null,u=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}return null!==i?null!==this._extraFilter&&(i=(0,o.$e)(this._extraFilter,i)):i=this._extraFilter,this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,r,s))).then((e=>{let t;return this._checkCancelled(s),t=!0===n?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,o.hq)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}_stat(e,t,i,r,s,n,a){let l=!1,h=this._reformulateWithoutAdaptions(t);return l=h.cannot,t=h.where,h=this._reformulateWithoutAdaptions(s),l=l||h.cannot,null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):(0,u.DB)({calculated:!1}):this._parent._stat(e,t,i,r,s,n,a).then((l=>!1===l.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:l))}_canDoAggregates(e,t,i,r,s){if(null===this._parent)return(0,u.DB)(!1);for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof p))return(0,u.DB)(!1);const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return(0,u.DB)(!1);const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return a.cannot?(0,u.DB)(!1):(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){if(null===this._parent)return(0,u.d1)(new Error("Should never be called"));const l=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return(0,u.d1)(new Error("Should never be called"));const t=i.clone();t.workingexpr=e.where,l.push(t)}else l.push(i)}const h=this._reformulateWithoutAdaptions(s);return h.cannot?(0,u.d1)(new Error("Should never be called")):(null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,l,i,r,s,n,a))}}},84328:(e,t,i)=>{i.d(t,{Z:()=>h});var r=i(91136),s=i(90961),n=i(90658),a=i(36515),l=i(95330),o=i(41534),u=i(82971);class h extends r.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_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 u.Z({wkid:4326}),this.geometryType=n.Qk.point)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("",null,this._whereclause,null,e))).then((t=>(this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,l.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===n.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?n.dj.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause.testFeature(e)}executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction)try{const t=this._whereClauseFunction(e);return(0,l.y8)(t)?t:(0,l.DB)(t)}catch(e){return(0,l.d1)(e)}return(0,l.DB)(this.executeWhereClause(e))}_fetchAndRefineFeatures(e,t,i){const r=new s.Z([],e,!1,null),a=Math.min(t,e.length);return this._parent._getFeatures(r,-1,a,i).then((()=>{if(this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<a;t++){const i=this._parent._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=n.dj.InFeatureSet:this._idstates[e[t]]=n.dj.NotInFeatureSet}return"success"}const r=[];for(let t=0;t<a;t++){const i=this._parent._featureFromCache(e[t]);r.push(this.executeWhereClauseDeferred(i))}return(0,l.$6)(r).then((i=>{for(let r=0;r<t;r++)!0===i[r]?this._idstates[e[r]]=n.dj.InFeatureSet:this._idstates[e[r]]=n.dj.NotInFeatureSet;return"success"}))}))}_getFilteredSet(e,t,i,r,n){return null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,a.$e)(this._whereclause,i)):i=this._whereclause),this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,r,n))).then((e=>{let t;return this._checkCancelled(n),t=null!==this._whereClauseFunction?new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new s.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_stat(e,t,i,r,s,n,o){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,o):(0,l.DB)({calculated:!1});let u=this._whereclause;return null!==s&&null!==this._whereclause&&(u=(0,a.$e)(this._whereclause,s)),this._parent._stat(e,t,i,r,u,n,o).then((a=>!1===a.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,o):{calculated:!1}:a))}_canDoAggregates(e,t,i,r,s){return null!==this._whereClauseFunction?(0,l.DB)(!1):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,null===this._parent?(0,l.DB)(!1):this._parent._canDoAggregates(e,t,i,r,s))}_getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,o){return null===this._parent?(0,l.d1)(new Error("Should never be called")):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,o))}static registerAction(){r.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof o.WhereClause&&(t=e),new h({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(61363),s=i(91136),n=i(90961),a=i(3823),l=i(95330);class o extends s.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,this._orderbyclause,e))).then((t=>(this._checkCancelled(e),this._wset=t,this._wset))):(0,l.DB)(this._wset)}manualOrderSet(e,t){return this.getIdColumnDictionary(e,[],-1,t).then((e=>{this._orderbyclause.order(e);const t=new n.Z([],[],!0,null);for(let i=0;i<e.length;i++)t._known.push(e[i].id);return t}))}getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return(0,r.U)(this._parent._expandPagedSet(e,n,0,0,s)).then((()=>this.getIdColumnDictionary(e,t,i,s)));let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;return i+=l.length,(0,r.U)(this._parent._getFeatureBatch(l,s)).then((r=>{this._checkCancelled(s);for(const e of r)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}))}return e._candidates.length>0?(0,r.U)(this._refineSetBlock(e,this._maxProcessingRate(),s)).then((()=>(this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)))):(0,l.DB)(t)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}_fetchAndRefineFeatures(){return(0,l.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,i,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s))).then((e=>{this._checkCancelled(s);const r=new n.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition));let a=!0;return e._candidates.length>0&&(a=!1),!1===r._ordered?this.manualOrderSet(r,s).then((e=>(!1===a&&(null===t&&null===i||(e=new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e))):r}))}static registerAction(){s.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new a.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var r=i(91136),s=i(90961),n=i(90658),a=i(95330);class l extends r.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getSet(e))).then((e=>(this._wset=new s.Z(e._candidates.slice(0),e._known.slice(0),!1,this._clonePageDefinition(e.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset))):(0,a.DB)(this._wset)}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===n.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===n.dj.InFeatureSet||i===n.dj.NotInFeatureSet?i:t===n.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=n.dj.InFeatureSet,this._countedin++,n.dj.InFeatureSet):(this._idstates[e]=n.dj.NotInFeatureSet,n.dj.NotInFeatureSet):n.dj.Unknown}_expandPagedSet(e,t,i,r,s){if(null===this._parent)return(0,a.d1)(new Error("Parent Paging not implemented"));if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),(0,a.DB)("success")}return this._parent._expandPagedSet(e,t,i,r,s).then((t=>(this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),t)))}_getFeatures(e,t,i,r){const n=[],l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return this._expandPagedSet(e,l,0,0,r).then((()=>this._getFeatures(e,t,i,r)));-1!==t&&void 0===this._featureCache[t]&&n.push(t);let o=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(o++,o<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&n.push(e._known[r]),n.length>l)));r++);if(0===n.length)return(0,a.DB)("success");const u=new s.Z([],n,!1,null),h=Math.min(n.length,i);return this._parent._getFeatures(u,-1,h,r).then((()=>{for(let e=0;e<h;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}))}_getFilteredSet(e,t,i,r,n){return this._ensureLoaded().then((()=>this._getSet(n))).then((e=>new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!1,this._clonePageDefinition(e.pagesDefinition))))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let a=0;a<e._candidates.length;a++){const l=this._isInFeatureSet(e._candidates[a]);if(l===n.dj.InFeatureSet){if(e._known.push(e._candidates[a]),i+=1,null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),e._known.length>=this._topnum)break}else if(l===n.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),i+=1;else if(l===n.dj.Unknown)break;if(i>=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);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}_stat(){return(0,a.DB)({calculated:!1})}_canDoAggregates(){return(0,a.DB)(!1)}static registerAction(){r.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,i)=>{i.d(t,{Z:()=>f});var r=i(1692),s=i(91136),n=i(90961),a=i(90658),l=i(36515),o=i(95330),u=i(9361),h=i(67284),d=i(16451),c=i(1231),p=i(57444);class f extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return a.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,o.Ue)(((e,t)=>{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}))),this._loadPromise}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this._databaseType=a.Bj.Standardised,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return a.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,o.DB)(this._wset)}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,i,r,s){let u="",h=!1;if(null!==r&&(u=r.constructClause(),h=!0),this.isTable()&&t&&null!==e&&""!==e){const e=new n.Z([],[],!0,null);return(0,o.DB)(e)}const d=new p.Z;return d.where=null===i?null===t?"1=1":"":(0,l.zR)(i,a.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==u?u.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e),this._layer.queryFeatures(d).then((e=>{if(null===e)return new n.Z([],[],h,null);this._checkCancelled(s);const t=[];return e.features.forEach((e=>{const i=e.attributes[this._layer.objectIdField];t.push(i),this._featureCache[i]=this._changeFeature(e)})),new n.Z([],t,h,null)}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_queryAllFeatures(){if(this._wset)return(0,o.DB)(this._wset);const e=new p.Z;return e.where="1=1",this._ensureLoaded().then((()=>{if(this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)})),this._wset=new n.Z([],e,!1,null),this._wset}return this._layer.queryFeatures(e).then((e=>{const t=[];return e.features.forEach((e=>{const i=e.attributes[this._layer.objectIdField];t.push(i),this._featureCache[i]=this._changeFeature(e)})),this._wset=new n.Z([],t,!1,null),this._wset}))}))}_getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);return 0===r.length?(0,o.DB)("success"):(0,o.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e){return(0,o.DB)(e)}_stat(){return(0,o.DB)({calculated:!1})}_canDoAggregates(){return(0,o.DB)(!1)}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title,canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField?e.layerDefinition.typeIdField:"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(""===i||void 0===i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof c.Z?o.push(t):o.push(c.Z.fromJSON(t));let p=n;switch(p){case"esriGeometryPoint":p="point";break;case"esriGeometryPolyline":p="polyline";break;case"esriGeometryPolygon":p="polygon";break;case"esriGeometryExtent":p="extent";break;case"esriGeometryMultipoint":p="multipoint"}for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=p,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));const y={outFields:["*"],source:a,fields:o,types:s,typeIdField:r,objectIdField:i,spatialReference:t};y.geometryType=p||"point";const _=new h.default(y);return new f({layer:_,spatialReference:t,isTable:null===p||""===p})}queryAttachments(){return(0,o.DB)([])}getFeatureByObjectId(e){const t=new p.Z;return t.where=this.objectIdField+"="+e.toString(),this._layer.queryFeatures(t).then((e=>1===e.features.length?e.features[0]:null))}getOwningSystemUrl(){return(0,o.DB)("")}getIdentityUser(){return(0,o.DB)("")}}},3823:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},3920:(e,t,i)=>{i.d(t,{r:()=>h,p:()=>u});var r=i(43697),s=i(15923),n=i(61247),a=i(5600),l=i(52011),o=i(89749);const u=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,l.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(s.Z)){};h=(0,r._)([(0,l.j)("esri.core.HandleOwner")],h)},44543:(e,t,i)=>{i.d(t,{F:()=>d,M:()=>r});const r={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function n(e,t,i,r,n,a){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(r,a)),n),i)}function a(e,t,i,r,s,a,l){return n(t&i|~t&r,e,t,s,a,l)}function l(e,t,i,r,s,a,l){return n(t&r|i&~r,e,t,s,a,l)}function o(e,t,i,r,s,a,l){return n(t^i^r,e,t,s,a,l)}function u(e,t,i,r,s,a,l){return n(i^(t|~r),e,t,s,a,l)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,r=-271733879,n=-1732584194,h=271733878;for(let t=0;t<e.length;t+=16){const d=i,c=r,p=n,f=h;i=a(i,r,n,h,e[t+0],7,-680876936),h=a(h,i,r,n,e[t+1],12,-389564586),n=a(n,h,i,r,e[t+2],17,606105819),r=a(r,n,h,i,e[t+3],22,-1044525330),i=a(i,r,n,h,e[t+4],7,-176418897),h=a(h,i,r,n,e[t+5],12,1200080426),n=a(n,h,i,r,e[t+6],17,-1473231341),r=a(r,n,h,i,e[t+7],22,-45705983),i=a(i,r,n,h,e[t+8],7,1770035416),h=a(h,i,r,n,e[t+9],12,-1958414417),n=a(n,h,i,r,e[t+10],17,-42063),r=a(r,n,h,i,e[t+11],22,-1990404162),i=a(i,r,n,h,e[t+12],7,1804603682),h=a(h,i,r,n,e[t+13],12,-40341101),n=a(n,h,i,r,e[t+14],17,-1502002290),r=a(r,n,h,i,e[t+15],22,1236535329),i=l(i,r,n,h,e[t+1],5,-165796510),h=l(h,i,r,n,e[t+6],9,-1069501632),n=l(n,h,i,r,e[t+11],14,643717713),r=l(r,n,h,i,e[t+0],20,-373897302),i=l(i,r,n,h,e[t+5],5,-701558691),h=l(h,i,r,n,e[t+10],9,38016083),n=l(n,h,i,r,e[t+15],14,-660478335),r=l(r,n,h,i,e[t+4],20,-405537848),i=l(i,r,n,h,e[t+9],5,568446438),h=l(h,i,r,n,e[t+14],9,-1019803690),n=l(n,h,i,r,e[t+3],14,-187363961),r=l(r,n,h,i,e[t+8],20,1163531501),i=l(i,r,n,h,e[t+13],5,-1444681467),h=l(h,i,r,n,e[t+2],9,-51403784),n=l(n,h,i,r,e[t+7],14,1735328473),r=l(r,n,h,i,e[t+12],20,-1926607734),i=o(i,r,n,h,e[t+5],4,-378558),h=o(h,i,r,n,e[t+8],11,-2022574463),n=o(n,h,i,r,e[t+11],16,1839030562),r=o(r,n,h,i,e[t+14],23,-35309556),i=o(i,r,n,h,e[t+1],4,-1530992060),h=o(h,i,r,n,e[t+4],11,1272893353),n=o(n,h,i,r,e[t+7],16,-155497632),r=o(r,n,h,i,e[t+10],23,-1094730640),i=o(i,r,n,h,e[t+13],4,681279174),h=o(h,i,r,n,e[t+0],11,-358537222),n=o(n,h,i,r,e[t+3],16,-722521979),r=o(r,n,h,i,e[t+6],23,76029189),i=o(i,r,n,h,e[t+9],4,-640364487),h=o(h,i,r,n,e[t+12],11,-421815835),n=o(n,h,i,r,e[t+15],16,530742520),r=o(r,n,h,i,e[t+2],23,-995338651),i=u(i,r,n,h,e[t+0],6,-198630844),h=u(h,i,r,n,e[t+7],10,1126891415),n=u(n,h,i,r,e[t+14],15,-1416354905),r=u(r,n,h,i,e[t+5],21,-57434055),i=u(i,r,n,h,e[t+12],6,1700485571),h=u(h,i,r,n,e[t+3],10,-1894986606),n=u(n,h,i,r,e[t+10],15,-1051523),r=u(r,n,h,i,e[t+1],21,-2054922799),i=u(i,r,n,h,e[t+8],6,1873313359),h=u(h,i,r,n,e[t+15],10,-30611744),n=u(n,h,i,r,e[t+6],15,-1560198380),r=u(r,n,h,i,e[t+13],21,1309151649),i=u(i,r,n,h,e[t+4],6,-145523070),h=u(h,i,r,n,e[t+11],10,-1120210379),n=u(n,h,i,r,e[t+2],15,718787259),r=u(r,n,h,i,e[t+9],21,-343485551),i=s(i,d),r=s(r,c),n=s(n,p),h=s(h,f)}return[i,r,n,h]}function d(e,t=r.Hex){const i=t||r.Base64,s=h(function(e){const t=[];for(let i=0,r=8*e.length;i<r;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case r.Raw:return s;case r.Hex:return function(e){const t="0123456789abcdef",i=[];for(let r=0,s=4*e.length;r<s;r++)i.push(t.charAt(e[r>>2]>>r%4*8+4&15)+t.charAt(e[r>>2]>>r%4*8&15));return i.join("")}(s);case r.String:return function(e){const t=[];for(let i=0,r=32*e.length;i<r;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case r.Base64:return function(e){const t=[];for(let i=0,r=4*e.length;i<r;i+=3){const r=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-s)&63))}return t.join("")}(s)}}},69801:(e,t,i)=>{i.d(t,{Xq:()=>l,WJ:()=>o});var r,s,n=i(70586),a=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class l{constructor(e,t,i){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",i&&(this._storage.registerRemoveFunc(this._namespace,i),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,i,r=0){this._storage.put(this._namespace+e,t,i,r)}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,i){this._storage.updateSize(this._namespace+e,t,i)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class o{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new a.Z,this._users=new a.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,i,s){const n=this._db.get(e);if(n&&(this._size-=n.size,this._db.delete(e),n.entry!==t&&this._notifyRemove(e,n.entry,r.ALL)),i>this._maxSize)return void this._notifyRemove(e,t,r.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const a=1+Math.max(s,-3)- -3;this._db.set(e,{entry:t,size:i,lifetime:a,lives:a}),this._size+=i,this._checkSizeLimit()}updateSize(e,t,i){const s=this._db.get(e);if(s&&s.entry===t){for(this._size-=s.size;i>this._maxSize;){const s=this._notifyRemove(e,t,r.SOME);if(!((0,n.pC)(s)&&s>0))return void this._db.delete(e);i=s}s.size=i,this._size+=i,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={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const s=i.namespace;if(r.startsWith(s)){const i=t[s]||0;t[s]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,r.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_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 i=this._notifyRemove(e,t.entry,r.SOME);(0,n.pC)(i)&&i>0&&(this._size+=i,t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},66643:(e,t,i)=>{i.d(t,{Ed:()=>n,UI:()=>a,q6:()=>l,mt:()=>o});var r=i(70586),s=i(95330);function n(e,t,i){return(0,s.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}function a(e,t,i){return(0,s.as)(e.map(((e,r)=>t.apply(i,[e,r])))).then((e=>e.map((e=>e.value))))}function l(e){return(0,r.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function o(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},74085:(e,t,i)=>{function r(e){}i.d(t,{Bg:()=>r}),i(80442)},38581:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),s=i(20102),n=i(92604),a=i(70586),l=i(17332),o=i(58901),u=i(73913),h=i(8744),d=i(40488),c=(i(66577),i(3172)),p=i(17452),f=i(33955);const y=n.Z.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function m(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof l.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new s.Z(e)}const i=(0,u.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],a=e[r+1][0],l=e[r+1][1],o=Math.sqrt((a-s)*(a-s)+(l-n)*(l-n)),u=(l-n)/o,h=(a-s)/o,d=o/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=h*r+s,l=u*r+n;i.push([a,l])}const e=(o+Math.floor(d-1)*t)/2,r=h*e+s,a=u*e+n;i.push([r,a])}i.push([a,l])}}return function(e){return"polygon"===e.type}(e)?new l.Z({rings:r,spatialReference:e.spatialReference}):new o.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return i&&(e=(0,u.Sy)(e,i)),e}function b(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,u.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,u.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,u.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,u.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],a=(0,u.x3)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,u.XZ)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(s===i){if(_(e))for(const t of(0,u.x3)(n))e[s]=e[s].addRing(t);else if(g(e))for(const t of(0,u.x3)(n))e[s]=e[s].addPath(t)}else i=s,e[s]=n}return e}async function S(e,t,i){var s;if(!Array.isArray(e))return S([e],t);const n=null!=(s=null==t?void 0:t.url)?s:r.Z.geometryServiceUrl;let y,_,g,v,F,I,C,x,D=0;const R=[],k=[];for(const t of e)if((0,a.Wi)(t))k.push(t);else if(y||(y=t.spatialReference,_=(0,h.C5)(y),g=y.isWebMercator,I=g?102100:4326,v=u.UZ[I].maxX,F=u.UZ[I].minX,C=u.UZ[I].plus180Line,x=u.UZ[I].minus180Line),_)if("mesh"===t.type)k.push(t);else if("point"===t.type)k.push(b(t.clone(),v,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,v,F))),k.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);k.push(e.rings?new l.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,u.XZ)(e.xmin,F)*(2*v);let r=0===i?t.clone():(0,u.Sy)(t.clone(),i);e.offset(i,0),e.intersects(C)&&e.xmax!==v?(D=e.xmax>D?e.xmax:D,r=m(r,g),R.push(r),k.push("cut")):e.intersects(x)&&e.xmin!==F?(D=e.xmax*(2*v)>D?e.xmax*(2*v):D,r=m(r,g,360),R.push(r),k.push("cut")):k.push(r)}else k.push(t.clone());else k.push(t);let T=(0,u.XZ)(D,v),O=-90;const L=T,N=new o.Z;for(;T>0;){const e=360*T-180;N.addPath([[e,O],[e,-1*O]]),O*=-1,T--}if(R.length>0&&L>0){const t=w(R,await async function(e,t,i,r){const s="string"==typeof e?(0,p.mN)(e):e,n=t[0].spatialReference,a={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,f.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,c.default)(s.path+"/cut",a),{cutIndexes:o,geometries:u=[]}=l.data;return{cutIndexes:o,geometries:u.map((e=>{const t=(0,f.im)(e);return t.spatialReference=n,t}))}}(n,R,N,i)),r=[],s=[];for(let i=0;i<k.length;i++){const n=k[i];if("cut"!==n)s.push(n);else{const n=t.shift(),l=e[i];(0,a.pC)(l)&&"polygon"===l.type&&l.rings&&l.rings.length>1&&n.rings.length>=l.rings.length?(r.push(n),s.push("simplify")):s.push(g?(0,d.$)(n):n)}}if(!r.length)return s;const l=await async function(e,t,i){const r="string"==typeof e?(0,p.mN)(e):e,s=t[0].spatialReference,n=(0,f.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,f.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}};var l;return function(e,t,i){const r=(0,f.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}((await(0,c.default)(r.path+"/simplify",a)).data,n,s)}(n,r,i),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(l.shift()):l.shift())}return o}const P=[];for(let e=0;e<k.length;e++){const t=k[e];if("cut"!==t)P.push(t);else{const e=R.shift();P.push(!0===g?(0,d.$)(e):e)}}return Promise.resolve(P)}},73913:(e,t,i)=>{i.d(t,{UZ:()=>a,x3:()=>u,XZ:()=>l,Sy:()=>o});var r=i(58901),s=i(82971),n=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function o(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.oU)(e)?e.rings:e.paths}},69285:(e,t,i)=>{i.d(t,{k:()=>a});var r=i(70586),s=i(67900),n=i(8744);function a(e,t,i){if((0,r.Wi)(t)||(0,r.Wi)(i)||i.vcsWkid||(0,n.fS)(t,i))return null;const a=(0,s._R)(t)/(0,s._R)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},54295:(e,t,i)=>{i.d(t,{V:()=>a});var r=i(43697),s=i(5600),n=(i(67676),i(80442),i(75215),i(52011));const a=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),n=i(70586),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),o=i(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,a.Cb)()],t.prototype,"title",null),(0,r._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>w});var r=i(43697),s=i(40330),n=i(3172),a=i(66643),l=i(20102),o=i(92604),u=i(70586),h=i(95330),d=i(17452),c=i(5600),p=(i(67676),i(80442),i(75215),i(71715)),f=i(52011),y=i(30556),_=i(65587),g=i(15235),m=i(86082);const b=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,h.D_)(e)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,(0,u.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,i;const r=null==(t=this.portalItem)||null==(i=t.portal)?void 0:i.user;if(r)return r;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,h=_.Z.getDefault();if(h&&h.loaded&&(0,d.Fv)(h.restUrl)===(0,d.Fv)(o))return h.user;const c=`${o}/community/self`,p=(0,u.pC)(e)?e.signal:null,f=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:p}));return f.ok?m.default.fromJSON(f.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)()],t.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},70082:(e,t,i)=>{i.d(t,{Z:()=>h});var r=i(43697),s=i(35454),n=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011));const o=new s.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends n.wq{constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,a.Cb)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const h=u},16451:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),s=i(96674),n=i(5600),a=(i(67676),i(80442),i(75215),i(71715)),l=i(52011),o=i(30556),u=i(72729),h=i(70082);let d=class extends s.wq{constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,u.im)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e)){var r;e[t]&&(i[t]=null==(r=e[t])?void 0:r.toJSON())}t.domains=i}};(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,o.c)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,n.Cb)({type:[h.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,l.j)("esri.layers.support.FeatureType")],d);const c=d},56765:(e,t,i)=>{i.d(t,{Z:()=>h});var r,s=i(43697),n=i(80539),a=i(96674),l=i(5600),o=(i(67676),i(80442),i(75215),i(52011));let u=r=class extends a.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,s._)([(0,o.j)("esri.layers.support.LayerFloorInfo")],u);const h=u},66677:(e,t,i)=>{i.d(t,{ld:()=>f,B5:()=>d,M8:()=>_,G:()=>w,Qc:()=>c,DR:()=>p,Nm:()=>g,XG:()=>m,a7:()=>y,wH:()=>b});var r=i(70586),s=i(17452),n=i(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(a),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!o.test(e)}function c(e){const t=(0,s.mN)(e),i=t.path.match(o)||t.path.match(u);if(!i)return null;const[,r,n,l,h]=i,d=n.indexOf("/");return{title:f(-1!==d?n.slice(d+1):n),serverType:a[l.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:r}}}function p(e){const t=(0,s.mN)(e).path.match(h);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const i=[];if(e){const t=c(e);(0,r.pC)(t)&&t.title&&i.push(t.title)}if(t){const e=f(t);i.push(e)}if(2===i.length){if(-1!==i[0].toLowerCase().indexOf(i[1].toLowerCase()))return i[0];if(-1!==i[1].toLowerCase().indexOf(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function _(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),i=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&i}function g(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const i=(0,s.mN)(t),n=c(i.path);let a;if((0,r.pC)(n))null!=n.sublayer&&null==e.layer.layerId&&(a=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(i.path);(0,r.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:a}}function b(e,t,i,r,a){(0,n.w)(t,r,"url",a),r.url&&null!=e.layerId&&(r.url=(0,s.v_)(r.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=-1!==t.indexOf("/services/"),r=-1!==t.indexOf("/mapserver/wmsserver"),s=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return i&&(r||s||n)}},15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var r=i(43697),s=i(99880),n=i(20102),a=i(96674),l=i(22974),o=i(83379),u=i(70586),h=i(17452),d=i(5600),c=i(75215),p=i(71715),f=i(52011),y=i(6570),_=i(65587),g=i(15923),m=i(92604),b=(i(67676),i(80442),i(90578));const w=m.Z.getLogger("esri.portal.PortalItemResource");let S=class extends g.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){(0,u.pC)(e)&&(0,h.YP)(e)?w.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.url;if((0,u.Wi)(i))throw new n.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,u.U2)(t,"signal")})}async update(e,t){return(await i.e(7873).then(i.bind(i,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,u.pC)(this.path)}_normalizePath(e,t){return(0,u.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,u.pC)(t)&&(0,h.YP)(e)&&(e=(0,h.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,d.Cb)()],S.prototype,"portalItem",void 0),(0,r._)([(0,d.Cb)({type:String,value:null})],S.prototype,"path",null),(0,r._)([(0,b.p)("path")],S.prototype,"_castPath",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,r._)([(0,f.j)("esri.portal.PortalItemResource")],S);const v=S;let F=class extends g.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,d.Cb)()],F.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],F.prototype,"rating",void 0),F=(0,r._)([(0,f.j)("esri.portal.PortalRating")],F);const I=F;var C;let x=C=class extends((0,a.eC)(o.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,c.TJ)(C,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?i=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.indexOf("configurableApp")>-1&&(i="Instant App"),i}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,n=!1,a=!1,l=!1,o=!1,u=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=t.indexOf("Table")>-1,a=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,o=-1!==t.indexOf("Spatiotemporal"),u=-1!==t.indexOf("UtilityNetwork"),i=o&&n?"spatiotemporaltable":n?"table":a?"routelayer":l?"markup":o?"spatiotemporal":r?"featureshosted":u?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",i?(0,s.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=_.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,u.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof I&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new I({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new C({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new I(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},C)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,h.HK)(t)?r.query={data:t}:r.query={url:(0,h.hF)(t)},(0,u.pC)(i)&&(r.query.filename=i);else{const e=new FormData;(0,u.pC)(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await i.e(7873).then(i.bind(i,97873))).fetchResources(this,e,t)}async addResource(e,t,r){const s=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",t,r)}async removeResource(e,t){const r=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new n.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await i.e(7873).then(i.bind(i,97873))).removeAllResources(this,e)}resourceFromPath(e){return new v({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new C({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,d.Cb)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"accessInformation",void 0),(0,r._)([(0,d.Cb)({type:String})],x.prototype,"apiKey",void 0),(0,r._)([(0,d.Cb)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"avgRating",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"categories",void 0),(0,r._)([(0,d.Cb)({type:Date})],x.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"culture",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"description",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"displayName",null),(0,r._)([(0,d.Cb)({type:y.Z})],x.prototype,"extent",void 0),(0,r._)([(0,p.r)("extent")],x.prototype,"readExtent",null),(0,r._)([(0,d.Cb)()],x.prototype,"groupCategories",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"iconUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"isLayer",null),(0,r._)([(0,d.Cb)()],x.prototype,"itemControl",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"itemUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"licenseInfo",void 0),(0,r._)([(0,d.Cb)({type:Date})],x.prototype,"modified",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"name",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numComments",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numRatings",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"numViews",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"owner",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"ownerFolder",void 0),(0,r._)([(0,d.Cb)({type:_.Z})],x.prototype,"portal",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"screenshots",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"size",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"snippet",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"tags",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"thumbnail",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,r._)([(0,d.Cb)()],x.prototype,"title",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"type",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"typeKeywords",void 0),(0,r._)([(0,d.Cb)()],x.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],x.prototype,"userItemUrl",null),x=C=(0,r._)([(0,f.j)("esri.portal.PortalItem")],x);const D=x},99282:(e,t,i)=>{i.d(t,{a:()=>n});var r=i(67900),s=i(68441);const n={inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",s.sv.radius)}},28101:(e,t,i)=>{i.d(t,{PR:()=>v,Lq:()=>f,Km:()=>y,cM:()=>_,ap:()=>g,V3:()=>w,B3:()=>p});var r=i(22303),s=i(1692),n=i(74085),a=i(92604),l=i(70586),o=i(99282),u=i(51706);const h=a.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),d=new s.Z,c=Math.PI,p=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function f(e,t,i){const s="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"color"===e.type))[0]:e;if(!s)return;if("esri.renderers.visualVariables.ColorVariable"!==s.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const n="number"==typeof t,a=n?null:t,o=a&&a.attributes;let u=n?t:null;const d=s.field,{ipData:c,hasExpression:p}=s.cache;let f=s.cache.compiledFunc;if(!d&&!p){const e=s.stops;return e&&e[0]&&e[0].color}if("number"!=typeof u)if(p){if(!(0,l.pC)(i)||!(0,l.pC)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,r=t.getViewInfo(e),n=t.createExecContext(a,r);if(!f){const e=t.createSyntaxTree(s.valueExpression);f=t.createFunction(e),s.cache.compiledFunc=f}u=t.executeFunction(f,n)}else o&&(u=o[d]);const y=s.normalizationField,_=o?parseFloat(o[y]):void 0;if(null!=u&&(!y||n||!isNaN(_)&&0!==_)){isNaN(_)||n||(u/=_);const e=S(u,c);if(e){const t=e[0],n=e[1],a=t===n?s.stops[t].color:r.Z.blendColors(s.stops[t].color,s.stops[n].color,e[2],(0,l.pC)(i)?i.color:void 0);return new r.Z(a)}}}function y(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"opacity"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.OpacityVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const s="number"==typeof t,n=s?null:t,a=n&&n.attributes;let o=s?t:null;const u=r.field,{ipData:d,hasExpression:c}=r.cache;let p=r.cache.compiledFunc;if(!u&&!c){const e=r.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof o)if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),a=t.createExecContext(n,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}o=t.executeFunction(p,a)}else a&&(o=a[u]);const f=r.normalizationField,y=a?parseFloat(a[f]):void 0;if(null!=o&&(!f||s||!isNaN(y)&&0!==y)){isNaN(y)||s||(o/=y);const e=S(o,d);if(e){const t=e[0],i=e[1];if(t===i)return r.stops[t].opacity;{const s=r.stops[t].opacity;return s+(r.stops[i].opacity-s)*e[2]}}}}function _(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"rotation"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.RotationVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const s=r.axis||"heading",n="heading"===s&&"arithmetic"===r.rotationType?90:0,a="heading"===s&&"arithmetic"===r.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,d=r.field,{hasExpression:c}=r.cache;let p=r.cache.compiledFunc,f=0;if(!d&&!c)return f;if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),n=t.createExecContext(o,s);if(!p){const e=t.createSyntaxTree(r.valueExpression);p=t.createFunction(e),r.cache.compiledFunc=p}f=t.executeFunction(p,n)}else u&&(f=u[d]||0);return f="number"!=typeof f||isNaN(f)?null:n+a*f,f}function g(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"size"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.SizeVariable"!==r.declaredClass)return void h.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const s=function(e,t,i,r,s){switch(t.transformationType){case u.hL.Additive:return function(e,t,i,r){return e+(m(t.minSize,i,r)||t.minDataValue)}(e,t,i,r);case u.hL.Constant:return function(e,t,i){const r=e.stops;let s=r&&r.length&&r[0].size;return null==s&&(s=e.minSize),m(s,t,i)}(t,i,r);case u.hL.ClampedLinear:return function(e,t,i,r){const s=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),n=m(t.minSize,i,r),a=m(t.maxSize,i,r),o=(0,l.pC)(r)?r.shape:void 0;if(e<=t.minDataValue)return n;if(e>=t.maxDataValue)return a;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?c*(n/2)**2:n*n,i=t+s*((e?c*(a/2)**2:a*a)-t);return e?2*Math.sqrt(i/c):Math.sqrt(i)}return n+s*(a-n)}(e,t,i,r);case u.hL.Proportional:return function(e,t,i,r){const s=(0,l.pC)(r)?r.shape:void 0,n=e/t.minDataValue,a=m(t.minSize,i,r),o=m(t.maxSize,i,r);let u=null;return u="circle"===s?2*Math.sqrt(n*(a/2)**2):"square"===s||"diamond"===s||"image"===s?Math.sqrt(n*a**2):n*a,b(u,a,o)}(e,t,i,r);case u.hL.Stops:return function(e,t,i,r,s){const[n,a,l]=S(e,s);if(n===a)return m(t.stops[n].size,i,r);{const e=m(t.stops[n].size,i,r);return e+(m(t.stops[a].size,i,r)-e)*l}}(e,t,i,r,s);case u.hL.RealWorldSize:return function(e,t,i,r){const s=((0,l.pC)(r)&&r.resolution?r.resolution:1)*o.a[t.valueUnit],n=m(t.minSize,i,r),a=m(t.maxSize,i,r),{valueRepresentation:u}=t;let h=null;return h="area"===u?2*Math.sqrt(e/c)/s:"radius"===u||"distance"===u?2*e/s:e/s,b(h,n,a)}(e,t,i,r);case u.hL.Identity:return e;case u.hL.Unknown:return null}}(function(e,t,i){const r="number"==typeof t,s=r?null:t,n=s&&s.attributes;let a=r?t:null;const{isScaleDriven:o}=e.cache;let d=e.cache.compiledFunc;if(o){const t=(0,l.pC)(i)?i.scale:void 0,r=(0,l.pC)(i)?i.view:void 0;a=null==t||"3d"===r?function(e){let t=null,i=null;const r=e.stops;return r?(t=r[0].value,i=r[r.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!r)switch(e.inputValueType){case u.RY.Expression:{if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void h.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},r=i.arcade.arcadeUtils,n=r.getViewInfo(t),o=r.createExecContext(s,n);if(!d){const t=r.createSyntaxTree(e.valueExpression);d=r.createFunction(t),e.cache.compiledFunc=d}a=r.executeFunction(d,o);break}case u.RY.Field:n&&(a=n[e.field]);break;case u.RY.Unknown:a=null}if(!(0,u.qh)(a))return null;if(r||!e.normalizationField)return a;const c=n?parseFloat(n[e.normalizationField]):null;return(0,u.qh)(c)&&0!==c?a/c:null}(r,t,i),r,t,i,r.cache.ipData);return null==s||isNaN(s)?0:s}function m(e,t,i){return null==e?null:(0,u.iY)(e)?g(e,t,i):(0,u.qh)(e)?e:null}function b(e,t,i){return(0,u.qh)(i)&&e>i?i:(0,u.qh)(t)&&e<t?t:e}function w(e,t,i){const{isScaleDriven:r}=e.cache;if(!(r&&"3d"===i||t))return null;const s={scale:t,view:i};let n=m(e.minSize,d,s),a=m(e.maxSize,d,s);if(null!=n||null!=a){if(n>a){const e=a;a=n,n=e}return{minSize:n,maxSize:a}}}function S(e,t){if(!t)return;let i=0,r=t.length-1;return t.some(((t,s)=>e<t?(r=s,!0):(i=s,!1))),[i,r,(e-t[i])/(t[r]-t[i])]}function v(e,t,i){const r=["proportional","proportional","proportional"];for(const s of e){const e=s.useSymbolValue?"symbol-value":g(s,t,i);switch(s.axis){case"width":r[0]=e;break;case"depth":r[1]=e;break;case"height":r[2]=e;break;case"width-and-depth":r[0]=e,r[1]=e;break;case"all":case void 0:case null:r[0]=e,r[1]=e,r[2]=e;break;default:(0,n.Bg)(s.axis)}}return r}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(70586),s=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(n))for(const e of i.features)n(e.geometry)}},58333:(e,t,i)=>{i.d(t,{I4:()=>s,lF:()=>a,ET:()=>n,qP:()=>l,eG:()=>o,lj:()=>h,wW:()=>u});const r=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},o={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},89749:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(43697),s=i(15923),n=i(61247),a=i(70586),l=i(17445),o=i(1654),u=i(5600),h=i(52011);let d=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new n.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,i={}){const r=++this.handleId;i.sync||this._installSyncUpdatingWatch(e,r);const s=(0,l.YP)(e,t,i);return this.handles.add(s,r),{remove:()=>this.handles.remove(r)}}addOnCollectionChange(e,t,{initial:i=!1}={}){const r=++this.handleId;return this.handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.items,removed:[],moved:[],target:e}):void 0})],r),{remove:()=>this.handles.remove(r)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(c)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const i=()=>this.handles.remove(t);return e.then(i,i),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,l.YP)(e,i,{sync:!0,equals:()=>!1});return this.handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this.handles.remove(c),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,o.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(c))})),c)}}};(0,r._)([(0,u.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,r._)([(0,h.j)("esri.views.support.WatchUpdatingTracking")],d);const c=-42;var p,f;(f=p||(p={}))[f.NONE=0]="NONE",f[f.SYNC=1]="SYNC",f[f.INIT=2]="INIT"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3485],{66577:(e,t,i)=>{i.d(t,{qM:()=>u});var r=i(75215),n=i(6570),l=i(9361),o=i(65091),s=i(13473),a=i(17332),c=i(58901);i(82971),i(86973),i(33955);const u={base:l.Z,key:"type",typeMap:{extent:n.Z,multipoint:o.Z,point:s.Z,polyline:c.Z,polygon:a.Z}};(0,r.N7)(u)},33955:(e,t,i)=>{i.d(t,{im:()=>m,q9:()=>v,Ji:()=>h,YX:()=>u,aW:()=>p,wp:()=>d,oU:()=>y,l9:()=>f});var r=i(70586),n=i(6570),l=i(9361),o=i(65091),s=i(13473),a=i(17332),c=i(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function p(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function f(e){return void 0!==e.paths}function y(e){return void 0!==e.rings}function m(e){return(0,r.Wi)(e)?null:e instanceof l.Z?e:d(e)?s.Z.fromJSON(e):f(e)?c.Z.fromJSON(e):y(e)?a.Z.fromJSON(e):p(e)?o.Z.fromJSON(e):u(e)?n.Z.fromJSON(e):null}function h(e){return e?d(e)?"esriGeometryPoint":f(e)?"esriGeometryPolyline":y(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":p(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:s.Z,esriGeometryPolyline:c.Z,esriGeometryPolygon:a.Z,esriGeometryEnvelope:n.Z,esriGeometryMultipoint:o.Z};function v(e){return e&&g[e]||null}},86973:(e,t,i)=>{i.d(t,{Mk:()=>n,P$:()=>l});var r=i(35454);const n=(0,r.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),l=(0,r.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},39450:(e,t,i)=>{i.d(t,{Z:()=>u});var r,n=i(43697),l=i(96674),o=i(5600),s=(i(67676),i(80442),i(75215)),a=i(52011);let c=r=class extends l.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,n._)([(0,o.Cb)({type:s.z8,json:{write:!0}})],c.prototype,"level",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=r=(0,n._)([(0,a.j)("esri.layers.support.LOD")],c);const u=c},11145:(e,t,i)=>{i.d(t,{Z:()=>T});var r,n=i(43697),l=i(35454),o=i(96674),s=i(70586),a=i(67900),c=i(5600),u=(i(67676),i(80442),i(75215)),p=i(71715),d=i(52011),f=i(30556),y=i(13473),m=i(82971),h=i(24470),g=i(8744),v=i(40488),_=i(39450);const w=new l.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=r=class extends o.wq{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:l=m.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(l)){const e=[];if(i)for(let t=0;t<i.length;t++){const r=i[t];e.push({level:t,scale:r,resolution:r})}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift({level:i,scale:t,resolution:t}),t*=2}return new r({dpi:96,lods:e,origin:new y.Z(0,0,l),size:[n,n],spatialReference:l})}const s=(0,g.C5)(l),c=e.origin?new y.Z({x:e.origin.x,y:e.origin.y,spatialReference:l}):new y.Z(s?{x:s.origin[0],y:s.origin[1],spatialReference:l}:{x:0,y:0,spatialReference:l}),u=1/(39.37*(0,a.c9)(l)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],r=t*u;p.push({level:e,scale:t,resolution:r})}else{let e=(0,g.sT)(l)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);p.push({level:0,scale:e,resolution:e*u});for(let r=1;r<i;r++){const i=e/2**t,n=i*u;p.push({level:r,scale:i,resolution:n}),e=i}}return new r({dpi:96,lods:p,origin:c,size:[n,n],spatialReference:l})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,g.C5)(e);return e.isWrappable&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return y.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const r=[];this._levelToLOD={},e&&(t=-1/0,i=1/0,e.forEach((e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,this._levelToLOD[e.level]=e}))),this._set("scales",r),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];{const i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}}scaleToZoom(e){const t=this.scales,i=t.length-1;let r=0;for(;r<i;r++){const i=t[r],n=t[r+1];if(i<=e)return r;if(n===e)return r+1;if(i>e&&n<e)return r+Math.log(i/e)/Math.log(i/n)}return r}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,r){const n=this.lodAt(e);if(!n)return null;let l,o;if("number"==typeof t)l=t,o=i;else if((0,g.fS)(t.spatialReference,this.spatialReference))l=t.x,o=t.y,r=i;else{const e=(0,v.iV)(t,this.spatialReference);if((0,s.Wi)(e))return null;l=e.x,o=e.y,r=i}const a=n.resolution*this.size[0],c=n.resolution*this.size[1];return r||(r={id:null,level:0,row:0,col:0,extent:(0,h.Ue)()}),r.level=e,r.row=Math.floor((this.origin.y-o)/c+.001),r.col=Math.floor((l-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=r.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===r.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const n=e.level-i.level,l=i.resolution*this.size[0]/2**n,o=i.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,h.Ue)()),e.extent[0]=this.origin.x+e.col*l,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+l,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const{resolution:i}=this.lodAt(t.level),r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return r.fromJSON(this.write({}))}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};var F,x;(0,n._)([(0,c.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,n._)([(0,c.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,n._)([(0,c.Cb)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,n._)([(0,c.Cb)({type:y.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,n._)([(0,p.r)("origin")],b.prototype,"readOrigin",null),(0,n._)([(0,c.Cb)({type:[_.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,n._)([(0,c.Cb)({readOnly:!0})],b.prototype,"minScale",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],b.prototype,"maxScale",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,n._)([(0,c.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,n._)([(0,p.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,n._)([(0,f.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],b.prototype,"writeSize",null),(0,n._)([(0,c.Cb)({type:m.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=r=(0,n._)([(0,d.j)("esri.layers.support.TileInfo")],b),F=b||(b={}),(x=F.ExtrapolateOptions||(F.ExtrapolateOptions={}))[x.NONE=0]="NONE",x[x.POWER_OF_TWO=1]="POWER_OF_TWO";const T=b},35671:(e,t,i)=>{i.d(t,{io:()=>g,AB:()=>h,gd:()=>m,Mu:()=>w,Q0:()=>y,YN:()=>u,UF:()=>d,O5:()=>v,os:()=>b,H7:()=>I,qN:()=>L,Pz:()=>C,Qc:()=>V,vP:()=>U});var r,n,l=i(20102),o=i(78286);(n=r||(r={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",n.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var s=i(59266);const a=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],c=["field","normalizationField"];function u(e,t){if(null!=e&&null!=t)for(const i of Array.isArray(e)?e:[e])if(p(a,i,t),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)p(c,e,t)}function p(e,t,i){if(e)for(const r of e){const e=(0,o.hS)(r,t),n=e&&"function"!=typeof e&&i.get(e);n&&(0,o.RB)(r,n.name,t)}}function d(e,t){if(null!=e&&null!=t&&t.fields.length)if("startField"in e){const i=t.get(e.startField),r=t.get(e.endField);e.startField=i&&i.name||null,e.endField=r&&r.name||null}else{const i=t.get(e.startTimeField),r=t.get(e.endTimeField);e.startTimeField=i&&i.name||null,e.endTimeField=r&&r.name||null}}const f=new Set;function y(e,t){return e&&t?(f.clear(),m(f,e,t),Array.from(f).sort()):[]}function m(e,t,i){var r;if(i)if(null!=t&&null!=(r=t.fields)&&r.length)if(i.includes("*"))for(const{name:i}of t.fields)e.add(i);else for(const r of i)h(e,t,r);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const t of i)e.add(t)}}function h(e,t,i){if("string"==typeof i)if(t){const r=t.get(i);r&&e.add(r.name)}else e.add(i)}async function g(e,t,i){var r;if(!i)return;const{arcadeUtils:n}=await(0,s.LC)(),l=n.extractFieldNames(i,null==t||null==(r=t.fields)?void 0:r.map((e=>e.name)));for(const i of l)h(e,t,i)}function v({displayField:e,fields:t}){return e||(t&&t.length?_(t,"name-or-title")||_(t,"unique-identifier")||_(t,"type-or-category")||function(e){for(const t of e){if(!t||!t.name)continue;const e=t.name.toLowerCase();if(e.indexOf("name")>-1||e.indexOf("title")>-1)return t.name}return null}(t):null)}function _(e,t){for(const i of e)if(i&&i.valueType&&i.valueType===t)return i.name;return null}async function w(e,t){const{labelingInfo:r,fieldsIndex:n}=t;r&&r.length&&await Promise.all(r.map((t=>async function(e,t,r){if(!r)return;const n=r.getLabelExpression(),o=r.where;if("arcade"===n.type)await g(e,t,n.expression);else{const i=n.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{h(e,t,i.slice(1,-1))}))}await async function(e,t,r){if(r&&"1=1"!==r){const n=(await Promise.all([i.e(1534),i.e(5732)]).then(i.bind(i,41534))).WhereClause.create(r,t);if(!n.isStandardized)throw new l.Z("fieldUtils:collectFilterFields","Where clause is not standardized");m(e,t,n.fieldNames)}}(e,t,o)}(e,n,t))))}function b(e){const t=e.defaultValue;return void 0!==t&&A(e,t)?t:e.nullable?null:void 0}function F(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function x(e){return null===e||F(e)}const T="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function O(e){return null===e||T(e)}function S(e){return null!=e&&"string"==typeof e}function N(e){return null===e||S(e)}function E(){return!0}function A(e,t){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":i=e.nullable?O:T;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?x:F;break;case"string":case"esriFieldTypeString":i=e.nullable?N:S;break;default:i=E}return 1===arguments.length?i:i(t)}const G=new Set(["integer","small-integer","single","double","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function I(e){return null!=e&&G.has(e.type)}function L(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var R,z;function C(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function V(e,t){return e.nullable&&null===t?null:I(e)&&!function(e,t){const i="string"==typeof e?P(e):e;return!!i&&(i.isInteger?T(t)&&t>=i.min&&t<=i.max:t>=i.min&&t<=i.max)}(e.type,Number(t))?R.OUT_OF_RANGE:A(e,t)?e.domain?function(e,t){switch(e.type){case"range":{const i="range"in e?e.range[0]:e.minValue,n="range"in e?e.range[1]:e.maxValue;if(+t<i||+t>n)return r.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==t)))return r.INVALID_CODED_VALUE}return null}(e.domain,t):null:z.INVALID_TYPE}function P(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return D;case"esriFieldTypeInteger":case"integer":return Z;case"esriFieldTypeSingle":case"single":return M;case"esriFieldTypeDouble":case"double":return $}}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(R||(R={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(z||(z={}));const D={min:-32768,max:32767,isInteger:!0},Z={min:-2147483648,max:2147483647,isInteger:!0},M={min:-34e37,max:12e37,isInteger:!1},$={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function U(e,t,i){switch(e){case r.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case r.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case z.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case R.OUT_OF_RANGE:{const{min:e,max:r}=P(t.type);return`Value ${i} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${r}`}}}},59266:(e,t,i)=>{i.d(t,{mz:()=>u,pp:()=>c,WW:()=>s,Yi:()=>a,LC:()=>o}),i(66577);var r=i(70586),n=i(82971);let l;function o(){return l||(l=(async()=>{const e=await Promise.all([i.e(9490),i.e(6690)]).then(i.bind(i,96690));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),l}const s=(e,t,i)=>u.create(e,t,i,null,["$feature"]),a=(e,t,i)=>u.create(e,t,i,null,["$feature","$view"]),c=(e,t,i,r)=>u.create(e,t,i,r,["$feature","$view"]);class u{constructor(e,t,i,r,n,l,o,s){this.script=e,this.evaluate=n;const a=Array.isArray(o)?o:o.fields;this.fields=a,this._syntaxTree=r,this._arcade=t,this._arcadeDictionary=i,this._arcadeFeature=l,this._spatialReference=s,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,i,l,s,a){const{arcade:c,Feature:p,Dictionary:d}=await o(),f=n.Z.fromJSON(t),y=c.parseScript(e,a),m=s.reduce(((e,t)=>({...e,[t]:null})),{});let h=null;(0,r.pC)(l)&&(h=new d(l),h.immutable=!0,m.$config=null);const g=c.scriptUsesGeometryEngine(y)&&c.enableGeometrySupport(),v=c.scriptUsesFeatureSet(y)&&c.enableFeatureSetSupport(),_=c.scriptIsAsync(y)&&c.enableAsyncSupport(),w={vars:m,spatialReference:f,useAsync:!!_},b=new d;b.immutable=!1,b.setField("scale",0);const F=c.compileScript(y,w);return await Promise.all([g,v,_]),new u(e,c,d,y,(e=>("$view"in e&&e.$view&&(b.setField("scale",e.$view.scale),e.$view=b),h&&(e.$config=h),F({vars:e,spatialReference:f}))),new p,i,f)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}repurposeAdapter(e){return this._arcadeFeature.repurposeFromAdapter(e,{fields:this.fields}),this._arcadeFeature}createDictionary(){return new this._arcadeDictionary}referencesMember(e){return this._arcade.referencesMember(this._syntaxTree,e)}referencesFunction(e){return this._arcade.referencesFunction(this._syntaxTree,e)}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}extractFieldLiterals(){return this._arcade.extractExpectedFieldLiterals(this._syntaxTree)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3553,3172],{46851:(e,t,n)=>{n.d(t,{E:()=>r,R:()=>s});const r=1e-6,s=Math.random,a=Math.PI/180,i=180/Math.PI;Object.freeze({__proto__:null,EPSILON:r,RANDOM:s,toRadian:function(e){return e*a},toDegree:function(e){return e*i},equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))}})},88764:(e,t,n)=>{n.d(t,{q:()=>o});var r,s,a,i={exports:{}};r=i,s=function(){function e(n,r,s,a,i){for(;a>s;){if(a-s>600){var o=a-s+1,u=r-s+1,c=Math.log(o),l=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*l*(o-l)/o)*(u-o/2<0?-1:1);e(n,r,Math.max(s,Math.floor(r-u*l/o+f)),Math.min(a,Math.floor(r+(o-u)*l/o+f)),i)}var d=n[r],h=s,m=a;for(t(n,s,r),i(n[a],d)>0&&t(n,s,a);h<m;){for(t(n,h,m),h++,m--;i(n[h],d)<0;)h++;for(;i(n[m],d)>0;)m--}0===i(n[s],d)?t(n,s,m):t(n,++m,a),m<=r&&(s=m+1),r<=m&&(a=m-1)}}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}return function(t,r,s,a,i){e(t,r,s||0,a||t.length-1,i||n)}},void 0!==(a=s())&&(r.exports=a);const o=i.exports},17896:(e,t,n)=>{n.d(t,{E:()=>f,a:()=>d,b:()=>u,c:()=>y,d:()=>b,e:()=>w,f:()=>c,g:()=>i,h:()=>m,i:()=>h,k:()=>v,l:()=>a,m:()=>g,n:()=>M,p:()=>p,q:()=>x,r:()=>S,s:()=>o,t:()=>q,u:()=>B});var r=n(65617),s=n(46851);function a(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function u(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function f(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(n*n+r*r+s*s)}function m(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return n*n+r*r+s*s}function p(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function M(e,t){const n=t[0],r=t[1],s=t[2];let a=n*n+r*r+s*s;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){const r=t[0],s=t[1],a=t[2],i=n[0],o=n[1],u=n[2];return e[0]=s*u-a*o,e[1]=a*i-r*u,e[2]=r*o-s*i,e}function w(e,t,n,r){const s=t[0],a=t[1],i=t[2];return e[0]=s+r*(n[0]-s),e[1]=a+r*(n[1]-a),e[2]=i+r*(n[2]-i),e}function g(e,t,n){const r=t[0],s=t[1],a=t[2];return e[0]=n[0]*r+n[4]*s+n[8]*a+n[12],e[1]=n[1]*r+n[5]*s+n[9]*a+n[13],e[2]=n[2]*r+n[6]*s+n[10]*a+n[14],e}function q(e,t,n){const r=t[0],s=t[1],a=t[2];return e[0]=r*n[0]+s*n[3]+a*n[6],e[1]=r*n[1]+s*n[4]+a*n[7],e[2]=r*n[2]+s*n[5]+a*n[8],e}function x(e,t,n){const r=n[0],s=n[1],a=n[2],i=n[3],o=t[0],u=t[1],c=t[2];let l=s*c-a*u,f=a*o-r*c,d=r*u-s*o,h=s*d-a*f,m=a*l-r*d,p=r*f-s*l;const M=2*i;return l*=M,f*=M,d*=M,h*=2,m*=2,p*=2,e[0]=o+l+h,e[1]=u+f+m,e[2]=c+d+p,e}const T=(0,r.c)(),k=(0,r.c)();function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function S(e,t,n){const r=n[0]-t[0],s=n[1]-t[1],a=n[2]-t[2];let i=r*r+s*s+a*a;return i>0?(i=1/Math.sqrt(i),e[0]=r*i,e[1]=s*i,e[2]=a*i,e):(e[0]=0,e[1]=0,e[2]=0,e)}const U=c,E=l,O=f,_=h,I=m,B=a,P=p;Object.freeze({__proto__:null,length:a,copy:i,set:o,add:u,subtract:c,multiply:l,divide:f,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:d,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e},distance:h,squaredDistance:m,squaredLength:p,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:M,dot:b,cross:y,lerp:w,hermite:function(e,t,n,r,s,a){const i=a*a,o=i*(2*a-3)+1,u=i*(a-2)+a,c=i*(a-1),l=i*(3-2*a);return e[0]=t[0]*o+n[0]*u+r[0]*c+s[0]*l,e[1]=t[1]*o+n[1]*u+r[1]*c+s[1]*l,e[2]=t[2]*o+n[2]*u+r[2]*c+s[2]*l,e},bezier:function(e,t,n,r,s,a){const i=1-a,o=i*i,u=a*a,c=o*i,l=3*a*o,f=3*u*i,d=u*a;return e[0]=t[0]*c+n[0]*l+r[0]*f+s[0]*d,e[1]=t[1]*c+n[1]*l+r[1]*f+s[1]*d,e[2]=t[2]*c+n[2]*l+r[2]*f+s[2]*d,e},random:function(e,t){t=t||1;const n=2*(0,s.R)()*Math.PI,r=2*(0,s.R)()-1,a=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*a,e[1]=Math.sin(n)*a,e[2]=r*t,e},transformMat4:g,transformMat3:q,transformQuat:x,rotateX:function(e,t,n,r){const s=[],a=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],a[0]=s[0],a[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),a[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e},rotateY:function(e,t,n,r){const s=[],a=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],a[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),a[1]=s[1],a[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e},rotateZ:function(e,t,n,r){const s=[],a=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],a[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),a[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),a[2]=s[2],e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e},angle:function(e,t){i(T,e),i(k,t),M(T,T),M(k,k);const n=b(T,k);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:v,equals:function(e,t){if(e===t)return!0;const n=e[0],r=e[1],a=e[2],i=t[0],o=t[1],u=t[2];return Math.abs(n-i)<=s.E*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=s.E*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-u)<=s.E*Math.max(1,Math.abs(a),Math.abs(u))},direction:S,sub:U,mul:E,div:O,dist:_,sqrDist:I,len:B,sqrLen:P})},65617:(e,t,n)=>{function r(){return[0,0,0]}function s(e){return[e[0],e[1],e[2]]}function a(e,t,n){return[e,t,n]}function i(e){const t=[0,0,0],n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function o(e,t){return new Float64Array(e,t,3)}function u(){return a(1,1,1)}function c(){return a(1,0,0)}function l(){return a(0,1,0)}function f(){return a(0,0,1)}n.d(t,{O:()=>h,Z:()=>d,a:()=>s,b:()=>o,c:()=>r,d:()=>i,f:()=>a});const d=[0,0,0],h=u(),m=c(),p=l(),M=f();Object.freeze({__proto__:null,create:r,clone:s,fromValues:a,fromArray:i,createView:o,zeros:function(){return[0,0,0]},ones:u,unitX:c,unitY:l,unitZ:f,ZEROS:d,ONES:h,UNIT_X:m,UNIT_Y:p,UNIT_Z:M})},98766:(e,t,n)=>{n.d(t,{a:()=>i,b:()=>l,c:()=>s,d:()=>M,e:()=>h,f:()=>m,g:()=>y,h:()=>w,l:()=>b,n:()=>p,s:()=>a});var r=n(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function i(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function u(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function l(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function f(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+a*a)}function d(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],a=t[3]-e[3];return n*n+r*r+s*s+a*a}function h(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function m(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function p(e,t){const n=t[0],r=t[1],s=t[2],a=t[3];let i=n*n+r*r+s*s+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=n*i,e[1]=r*i,e[2]=s*i,e[3]=a*i),e}function M(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function b(e,t,n,r){const s=t[0],a=t[1],i=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=a+r*(n[1]-a),e[2]=i+r*(n[2]-i),e[3]=o+r*(n[3]-o),e}function y(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function w(e,t){const n=e[0],s=e[1],a=e[2],i=e[3],o=t[0],u=t[1],c=t[2],l=t[3];return Math.abs(n-o)<=r.E*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-u)<=r.E*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(a-c)<=r.E*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-l)<=r.E*Math.max(1,Math.abs(i),Math.abs(l))}const g=o,q=u,x=c,T=f,k=d,v=h,S=m;Object.freeze({__proto__:null,copy:s,set:a,add:i,subtract:o,multiply:u,divide:c,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:l,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},distance:f,squaredDistance:d,length:h,squaredLength:m,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:p,dot:M,lerp:b,random:function(e,t){let n,s,a,i,o,u;t=t||1;do{n=2*(0,r.R)()-1,s=2*(0,r.R)()-1,o=n*n+s*s}while(o>=1);do{a=2*(0,r.R)()-1,i=2*(0,r.R)()-1,u=a*a+i*i}while(u>=1);const c=Math.sqrt((1-o)/u);return e[0]=t*n,e[1]=t*s,e[2]=t*a*c,e[3]=t*i*c,e},transformMat4:function(e,t,n){const r=t[0],s=t[1],a=t[2],i=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*a+n[12]*i,e[1]=n[1]*r+n[5]*s+n[9]*a+n[13]*i,e[2]=n[2]*r+n[6]*s+n[10]*a+n[14]*i,e[3]=n[3]*r+n[7]*s+n[11]*a+n[15]*i,e},transformQuat:function(e,t,n){const r=t[0],s=t[1],a=t[2],i=n[0],o=n[1],u=n[2],c=n[3],l=c*r+o*a-u*s,f=c*s+u*r-i*a,d=c*a+i*s-o*r,h=-i*r-o*s-u*a;return e[0]=l*c+h*-i+f*-u-d*-o,e[1]=f*c+h*-o+d*-i-l*-u,e[2]=d*c+h*-u+l*-o-f*-i,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:y,equals:w,sub:g,mul:q,div:x,dist:T,sqrDist:k,len:v,sqrLen:S})},22021:(e,t,n)=>{n.d(t,{ZF:()=>d,Kt:()=>h,jE:()=>M,uZ:()=>i,oK:()=>m,Vl:()=>l,wt:()=>o,t7:()=>c,Sf:()=>a,fp:()=>u,BV:()=>f});var r=n(17896);n(98766);const s=new Float32Array(1);function a(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function i(e,t,n){return Math.min(Math.max(e,t),n)}function o(e){return 0==(e&e-1)}function u(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function c(e,t,n){return e+(t-e)*n}function l(e){return e*Math.PI/180}function f(e){return 180*e/Math.PI}function d(e){return Math.acos(i(e,-1,1))}function h(e){return Math.asin(i(e,-1,1))}function m(e){return p(Math.max(-b,Math.min(e,b)))}function p(e){return s[0]=e,s[0]}function M(e,t){const n=(0,r.l)(e),s=h(e[2]/n),a=Math.atan2(e[1]/n,e[0]/n);return(0,r.s)(t,n,s,a),t}const b=p(34028234663852886e22)},67900:(e,t,n)=>{n.d(t,{gV:()=>L,En:()=>T,Z7:()=>O,c9:()=>E,_R:()=>S,qE:()=>B,cM:()=>U,hd:()=>l,ty:()=>k,Jo:()=>D,$C:()=>v}),n(80442);var r=n(35454),s=n(70586),a=n(24678),i=n(82971),o=n(68441),u=n(8744),c=n(58116);const l=39.37,f=o.sv.radius*Math.PI/200,d=/UNIT\[([^\]]+)\]\]$/i,h=c.Z,m=/UNIT\[([^\]]+)\]/i,p=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),M=(0,r.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"}),b=e=>e*e,y=e=>e*e*e,w={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:b(.001)},"square-centimeters":{inBaseUnits:b(.01)},"square-decimeters":{inBaseUnits:b(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:b(1e3)},"square-inches":{inBaseUnits:b(.0254)},"square-feet":{inBaseUnits:b(.3048)},"square-yards":{inBaseUnits:b(.9144)},"square-miles":{inBaseUnits:b(1609.344)},"square-us-feet":{inBaseUnits:b(1200/3937)},acres:{inBaseUnits:.0015625*b(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*y(.001)},"cubic-centimeters":{inBaseUnits:1e3*y(.01)},"cubic-decimeters":{inBaseUnits:1e3*y(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*y(1e3)},"cubic-inches":{inBaseUnits:1e3*y(.0254)},"cubic-feet":{inBaseUnits:1e3*y(.3048)},"cubic-yards":{inBaseUnits:1e3*y(.9144)},"cubic-miles":{inBaseUnits:1e3*y(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},g=function(){const e={};for(const t in w)for(const n in w[t].units)e[n]=t;return e}();function q(e){const t=g[e];if(t)return t;throw new Error("unknown measure")}function x(e,t=null){return t=t||q(e),w[t].baseUnit===e}function T(e,t,n){if(t===n)return e;const r=q(t);if(r!==q(n))throw new Error("incompatible units");const s=x(t,r)?e:function(e,t,n){return e*w[n].units[t].inBaseUnits}(e,t,r);return x(n,r)?s:function(e,t,n){return e/w[n].units[t].inBaseUnits}(s,n,r)}function k(e,t,n){return T(e,t,"meters")/(n*Math.PI/180)}function v(e){return M.fromJSON(e.toLowerCase())||null}function S(e){if(e&&"object"==typeof e&&!(0,u.N$)(e))return 1;const t=E(e);return t>1e5?1:t}function U(e){return E(e)>=(e instanceof i.Z?(0,a.Iu)(e).metersPerDegree:1e5)?"meters":B(e)}function E(e,t=o.sv.metersPerDegree){return O(e,!0)||t}function O(e,t=!1){let n,r,s=null;if(null!=e&&("object"==typeof e?(n=e.wkid,r=e.wkt):"number"==typeof e?n=e:"string"==typeof e&&(r=e)),n){if((0,u.o$)(n))return o.yr.metersPerDegree;if((0,u.ME)(n))return o.Z1.metersPerDegree;s=h.values[h[n]],!s&&t&&p.has(n)&&(s=f)}else r&&(C(r)?s=_(d.exec(r),s):P(r)&&(s=_(m.exec(r),s)));return s}function _(e,t){return e&&e[1]?I(e[1]):t}function I(e){return parseFloat(e.split(",")[1])}function B(e){let t,n,r=null;if(null!=e&&("object"==typeof e?(t=e.wkid,n=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(n=e)),t)r=h.units[h[t]];else if(n){const e=C(n)?d:P(n)?m:null;if(e){const t=e.exec(n);t&&t[1]&&(r=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let n=t&&t[1];if(!n||-1===h.units.indexOf(n)){const t=I(e);n=null;const r=h.values;for(let e=0;e<r.length;++e)if(Math.abs(t-r[e])<1e-7){n=h.units[e];break}}return n}(t[1]))}}return(0,s.pC)(r)?v(r):null}function P(e){return/^GEOCCS/i.test(e)}function C(e){return/^PROJCS/i.test(e)}const R={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"},A={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},L=(0,r.w)()(R),D=(0,r.w)()(A);(0,r.w)()({...R,...A})},24678:(e,t,n)=>{n.d(t,{GG:()=>o,HQ:()=>u,VY:()=>c,wY:()=>l,Iu:()=>d,e8:()=>h,rS:()=>f});var r=n(82971),s=n(68441),a=n(8744);function i(e){return new r.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 o=i(s.sv),u=i(s.yr),c=i(s.Z1),l=new r.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${s.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 f(e){return e&&((0,a.BZ)(e)||e===u)?u:e&&((0,a.V2)(e)||e===c)?c:o}function d(e){return e&&((0,a.BZ)(e)||e===u)?s.yr:e&&((0,a.V2)(e)||e===c)?s.Z1:s.sv}function h(e){return(0,a.o$)(e)?s.yr:(0,a.ME)(e)?s.Z1:s.sv}},61787:(e,t,n)=>{n.r(t),n.d(t,{ElevationSamplerWorker:()=>o,default:()=>o});var r=n(80442),s=n(70586),a=n(24133),i=n(66459);class o{async createIndex(e,t){const n=new Array;if(!e.vertexAttributes||!e.vertexAttributes.position)return new a.QB;const r=this._createMeshData(e),i=(0,s.pC)(t)?await t.invoke("createIndexThread",r,{transferList:n}):this.createIndexThread(r).result;return this._createPooledRBush().fromJSON(i)}createIndexThread(e){const t=new Float64Array(e.position),n=this._createPooledRBush();return e.components?this._createIndexComponentsThread(n,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(n,t)}_createIndexAllThread(e,t){const n=new Array(t.length/9);let r=0;for(let e=0;e<t.length;e+=9)n[r++]=u(t,e+0,e+3,e+6);return e.load(n),{result:e.toJSON()}}_createIndexComponentsThread(e,t,n){let r=0;for(const e of n)r+=e.length/3;const s=new Array(r);let a=0;for(const e of n)for(let n=0;n<e.length;n+=3)s[a++]=u(t,3*e[n+0],3*e[n+1],3*e[n+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const t=(e.transform?(0,i.I5)({position:e.vertexAttributes.position,normal:null,tangent:null},e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:t}:{position:t,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new a.QB(9,(0,r.Z)("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function u(e,t,n,r){return{minX:Math.min(e[t+0],e[n+0],e[r+0]),maxX:Math.max(e[t+0],e[n+0],e[r+0]),minY:Math.min(e[t+1],e[n+1],e[r+1]),maxY:Math.max(e[t+1],e[n+1],e[r+1]),p0:[e[t+0],e[t+1],e[t+2]],p1:[e[n+0],e[n+1],e[n+2]],p2:[e[r+0],e[r+1],e[r+2]]}}},69285:(e,t,n)=>{n.d(t,{k:()=>i});var r=n(70586),s=n(67900),a=n(8744);function i(e,t,n){if((0,r.Wi)(t)||(0,r.Wi)(n)||n.vcsWkid||(0,a.fS)(t,n))return null;const i=(0,s._R)(t)/(0,s._R)(n);if(1===i)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,i);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return null}}},3172:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(68773),s=n(40330),a=n(20102),i=n(80442),o=n(22974),u=n(70586),c=n(95330),l=n(17452),f=n(71058),d=n(85958);async function h(e,t){var o;const d=(0,l.HK)(e),b=(0,l.jc)(e);b||d||(e=(0,l.Fv)(e));const y={url:e,requestOptions:{...(0,u.Wg)(t)}};let w=(0,l.oh)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let n,r;try{r=await e.before(t)}catch(e){n=T("request:interceptor",e,t)}if((r instanceof Error||r instanceof a.Z)&&(n=T("request:interceptor",r,t)),n)throw e.error&&e.error(n),n;return r}}(w,y);if(null!=e)return{data:e,getHeader:g,requestOptions:y.requestOptions,url:y.url};w.after||w.error||(w=null)}if(e=y.url,"image"===(t=y.requestOptions).responseType){if((0,i.Z)("host-webworker")||(0,i.Z)("host-node"))throw T("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),y)}else if(d)throw T("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),y);if("head"===t.method){if(t.body)throw T("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),y);if(d||b)throw T("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),y)}if(await async function(){(0,i.Z)("host-webworker")?m||(m=await Promise.all([n.e(102),n.e(9884)]).then(n.bind(n,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),m)return m.execute(e,t);const q=new AbortController;(0,c.fu)(t,(()=>q.abort()));const x={controller:q,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:w,params:y,redoRequest:!1,useIdentity:p.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},U=await async function(e){var t,n;let a,i;await async function(e){const t=e.params.url,n=e.params.requestOptions,a=e.controller.signal,i=n.body;let o=null,u=null,l=null;if(M&&"HTMLFormElement"in globalThis&&(i instanceof FormData?o=i:i instanceof HTMLFormElement&&(u=i,o=new FormData(u))),"string"==typeof i&&(l=i),e.fetchOptions={cache:n.cacheBust&&!h._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",redirect:"follow",signal:a},(o||l)&&(e.fetchOptions.body=o||l),"anonymous"===n.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||n.query&&n.query.token||o&&o.get&&o.get("token")||u&&u.elements.token),!e.hasToken&&r.Z.apiKey&&(0,f.r)(t)&&(n.query||(n.query={}),n.query.token=r.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!v(t)&&!(0,c.Hc)(a)){let r;"immediate"===n.authMode?(await k(),r=await s.id.getCredential(t,{signal:a}),e.credential=r):"no-prompt"===n.authMode?(await k(),r=await s.id.getCredential(t,{prompt:!1,signal:a}).catch((()=>{})),e.credential=r):s.id&&(r=s.id.findCredential(t)),r&&(e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[a,i]=await S(e)}while(!await E(e,a,i))}catch(t){const n=T("request:server",t,e.params,a);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const o=e.params.url;if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)&&!e.hasToken&&!e.credentialToken&&null!=(t=i)&&null!=(n=t.user)&&n.username&&!(0,l.kl)(o)){const e=(0,l.P$)(o,!0);e&&p.trustedServers.push(e)}const u=e.credential;if(u&&s.id){const e=s.id.findServerInfo(u.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,u.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:i,getHeader:a?e=>a.headers.get(e):g,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(x);return null==(o=w)||null==o.after||o.after(U),U}let m;const p=r.Z.request,M="FormData"in globalThis,b=[499,498,403,401],y=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],g=()=>null,q=Symbol();function x(e){const t=(0,l.P$)(e);return!t||t.endsWith(".arcgis.com")||h._corsServers.includes(t)||(0,l.kl)(t)}function T(e,t,n,r){let s="Error";const i={url:n.url,requestOptions:n.requestOptions,getHeader:g,ssl:!1};if(t instanceof a.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=i,t;if(t){const e=r&&(e=>r.headers.get(e)),n=r&&r.status,a=t.message;a&&(s=a),e&&(i.getHeader=e),i.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||n||0,i.subCode=t.subcode,i.messageCode=t.messageCode,"string"==typeof t.details?i.messages=[t.details]:i.messages=t.details,i.raw=q in t?t[q]:t}return(0,c.D_)(t)?(0,c.zE)():new a.Z(e,s,i)}async function k(){s.id||await Promise.all([n.e(280),n.e(2785),n.e(102),n.e(8536)]).then(n.bind(n,85976))}function v(e){return w.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const n=e.params.requestOptions,r=e.fetchOptions,a=(0,l.jc)(t)||(0,l.HK)(t),o=n.responseType||"json",u=a?0:null!=n.timeout?n.timeout:p.timeout;let f=!1;if(!a){e.useSSL&&(t=(0,l.hO)(t)),n.cacheBust&&"default"===r.cache&&(t=(0,l.ZN)(t,"request.preventCache",Date.now()));let a={...n.query};e.credentialToken&&(a.token=e.credentialToken);let o=(0,l.B7)(a);(0,i.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const u=t.length+1+o.length;let c;f="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>p.maxUrlLength;const d=n.useProxy||!!(0,l.ed)(t);if(d){const e=(0,l.b7)(t);c=e.path,!f&&c.length+1+u>p.maxUrlLength&&(f=!0),e.query&&(a={...e.query,...a})}if("HEAD"===r.method&&(f||d)){if(f){if(u>p.maxUrlLength)throw T("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw T("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(d)throw T("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(f?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?t=(0,l.fl)(t,a):(r.body=(0,l.B7)(a),r.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.fl)(t,a),d&&(e.useProxy=!0,t=`${c}?${t}`),a.token&&M&&r.body instanceof FormData){const e=r.body;e.set?e.set("token",a.token):e.append("token",a.token)}if(n.hasOwnProperty("withCredentials"))e.withCredentials=n.withCredentials;else if(!(0,l.D6)(t,(0,l.TI)()))if((0,l.kl)(t))e.withCredentials=!0;else if(s.id){const n=s.id.findServerInfo(t);n&&n.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(r.credentials="include")}let d,m,b=0,y=!1;u>0&&(b=setTimeout((()=>{y=!0,e.controller.abort()}),u));try{if("native-request-init"===n.responseType)m=r,m.url=t;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||f||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(n.headers)||!a&&!e.useProxy&&p.proxyUrl&&!x(t)){if(d=await h._abortableFetch(t,r),e.useProxy||function(e){const t=(0,l.P$)(e);t&&!h._corsServers.includes(t)&&h._corsServers.push(t)}(t),"native"===n.responseType)m=d;else if("HEAD"!==r.method)if(d.ok){switch(o){case"array-buffer":m=await d.arrayBuffer();break;case"blob":case"image":m=await d.blob();break;default:m=await d.text()}if(b&&(clearTimeout(b),b=0),"json"===o||"xml"===o||"document"===o)if(m)switch(o){case"json":m=JSON.parse(m);break;case"xml":m=U(m,"application/xml");break;case"document":m=U(m,"text/html")}else m=null;if(m){if("array-buffer"===o||"blob"===o){const e=d.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&m["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(m).json();e.error&&(m=e)}catch{}}"image"===o&&m instanceof Blob&&(m=await O(URL.createObjectURL(m),e,!0))}}else m=await d.text()}else m=await O(t,e)}catch(r){if("AbortError"===r.name){if(y)throw new Error("Timeout exceeded");throw(0,c.zE)("Request canceled")}if(!(!d&&r instanceof TypeError&&p.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||e.useProxy||x(t))throw r;e.redoRequest=!0,(0,l.tD)({proxyUrl:p.proxyUrl,urlPrefix:(0,l.P$)(t)})}finally{b&&clearTimeout(b)}return[d,m]}function U(e,t){let n;try{n=(new DOMParser).parseFromString(e,t)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function E(e,t,n){if(e.redoRequest)return e.redoRequest=!1,!1;const r=e.params.requestOptions;if(!t||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let a,i,o,u;if(!t.ok)throw a=new Error(`Unable to load ${t.url} status: ${t.status}`),a[q]=n,a;null!=n&&n.error&&(a=n.error),a&&(i=Number(a.code),o=a.hasOwnProperty("subcode")?Number(a.subcode):null,u=a.messageCode,u=u&&u.toUpperCase());const c=r.authMode;if(403===i&&(4===o||a.message&&a.message.toLowerCase().indexOf("ssl")>-1&&-1===a.message.toLowerCase().indexOf("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===i)&&-1!==b.indexOf(i)&&!v(e.params.url)&&(403!==i||-1===y.indexOf(u)&&(null==o||2===o&&e.credentialToken))){await k();try{const t=await s.id.getCredential(e.params.url,{error:T("request:server",a,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=null,e.credentialToken=null,!1;a=t}}if(a)throw a;return!0}function O(e,t,n=!1){const r=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.src=e,(0,d.f)(s,e,n,r)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,n)=>{n.d(t,{r:()=>a});var r=n(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(e){const t=(0,r.P$)(e,!0);return t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(80442),s=n(70586),a=n(95330);function i(e,t,n=!1,i){return new Promise(((u,c)=>{if((0,a.Hc)(i))return void c(o());let l=()=>{h(),c(new Error(`Unable to load ${t}`))},f=()=>{const t=e;h(),u(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",c(o())};const h=()=>{(0,r.Z)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",f)),l=null,f=null,e=null,(0,s.pC)(i)&&i.removeEventListener("abort",d),d=null,n&&URL.revokeObjectURL(t)};(0,s.pC)(i)&&i.addEventListener("abort",d),(0,r.Z)("esri-image-decode")?e.decode().then(f,l):(e.addEventListener("error",l),e.addEventListener("load",f))}))}function o(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}}}]);