@arcgis/core 4.34.0-next.7 → 4.34.0-next.9

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 (363) hide show
  1. package/Map.js +1 -1
  2. package/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
  3. package/applications/ExperienceBuilder/sketchUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{feaf79b69d2e2a1f2aa2.js → 06877ea5b9df7de89aff.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{44db659fd4e711f8e22f.js → 076f830d6d0337dfce9d.js} +1 -1
  7. package/assets/esri/core/workers/chunks/09907c9ff597df9bc954.js +1 -0
  8. package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +1 -0
  9. package/assets/esri/core/workers/chunks/0ed4ec00ef16aa58a33d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{0624ae07d3af8d5f1ac8.js → 15b3eb60f86954783fab.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b845586219f284a215b2.js → 1db026cc25338dbc208e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/21de4516bf5c9630edfd.js +1 -0
  13. package/assets/esri/core/workers/chunks/2254989ca3ff3960f2fe.js +1 -0
  14. package/assets/esri/core/workers/chunks/248a198f97871a8d6dd6.js +1 -0
  15. package/assets/esri/core/workers/chunks/2dbd18df5c691c8d0a61.js +1 -0
  16. package/assets/esri/core/workers/chunks/2e1ceff3f88a6c78dfa2.js +1 -0
  17. package/assets/esri/core/workers/chunks/{847e88e1d6da1e74cdc8.js → 2ecc1057d53e0b4a60b7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3025e420e13e2bc8c0a1.js +1 -0
  19. package/assets/esri/core/workers/chunks/32537e2b014bc3d82f5c.js +346 -0
  20. package/assets/esri/core/workers/chunks/34f55bb89ddf26b10260.js +1 -0
  21. package/assets/esri/core/workers/chunks/355ab428a04ee9fcf888.js +1 -0
  22. package/assets/esri/core/workers/chunks/{28e31ac00dc95a1318e9.js → 3916879b9ca8c6979011.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3a74654fa539f78ceb86.js +1 -0
  24. package/assets/esri/core/workers/chunks/3bec10a4f01757590c1c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a4c108e913d2dc0edc7b.js → 4088f4c25a09932a3eb1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/427318722815bef1496b.js +1 -0
  27. package/assets/esri/core/workers/chunks/4c3bd6cc0badb78c7112.js +1 -0
  28. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +1 -0
  29. package/assets/esri/core/workers/chunks/5222523fff30d07f88de.js +1 -0
  30. package/assets/esri/core/workers/chunks/{412eef58cb0d24826375.js → 52c34d6ecd9d45a33e69.js} +1 -1
  31. package/assets/esri/core/workers/chunks/539541dec5fcf3b657aa.js +1 -0
  32. package/assets/esri/core/workers/chunks/53e8c061f36516c3c3e4.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ca76950d81ab4ebb65e1.js → 58f403f956b7b3467344.js} +1 -1
  34. package/assets/esri/core/workers/chunks/5a01bd7a9ee24be7bac4.js +1 -0
  35. package/assets/esri/core/workers/chunks/5bfcb3d87380e7f85b08.js +1 -0
  36. package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +1 -0
  37. package/assets/esri/core/workers/chunks/{4dd0a5f327fa5fc7249d.js → 5ef1095842e21090f1f4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/614bc3f05873b37af091.js +1 -0
  39. package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +1 -0
  40. package/assets/esri/core/workers/chunks/66e4cb2479bed1384ed5.js +1 -0
  41. package/assets/esri/core/workers/chunks/6b0ae9ccdd1acef5b5b4.js +1 -0
  42. package/assets/esri/core/workers/chunks/7112b092d98172b7db8b.js +1 -0
  43. package/assets/esri/core/workers/chunks/72ea996b03932c0f004f.js +1 -0
  44. package/assets/esri/core/workers/chunks/74d18c22fa1c178bd9df.js +1 -0
  45. package/assets/esri/core/workers/chunks/766e08d0c56b2b31b63b.js +1 -0
  46. package/assets/esri/core/workers/chunks/77dbb1d5d5e1a6ced932.js +1 -0
  47. package/assets/esri/core/workers/chunks/{bd7b54db7fd278b15500.js → 7a2189614f2dad49ffcd.js} +1 -1
  48. package/assets/esri/core/workers/chunks/7ae88c141a5d85e5bb88.js +1 -0
  49. package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +1 -0
  50. package/assets/esri/core/workers/chunks/7e1906d35a764f7f10b0.js +1 -0
  51. package/assets/esri/core/workers/chunks/80777a9db53bee2ad8a8.js +1 -0
  52. package/assets/esri/core/workers/chunks/8249b5de5c15461a6787.js +1 -0
  53. package/assets/esri/core/workers/chunks/8385c13ac10e595374cb.js +1 -0
  54. package/assets/esri/core/workers/chunks/83db8bd42f94f97c7cf1.js +1 -0
  55. package/assets/esri/core/workers/chunks/87623ebe32c6ae9cb223.js +1 -0
  56. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +1 -0
  57. package/assets/esri/core/workers/chunks/8b86c75426c55b29ebed.js +1 -0
  58. package/assets/esri/core/workers/chunks/8c4b26d86483646c70d2.js +1 -0
  59. package/assets/esri/core/workers/chunks/9cb242dfc3765b590f51.js +1 -0
  60. package/assets/esri/core/workers/chunks/9ddb0b07be31c3747238.js +1 -0
  61. package/assets/esri/core/workers/chunks/9f0f1472f36b42c507d1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{f840e1655c4f6b6630be.js → 9f964467f7353039dd9c.js} +19 -19
  63. package/assets/esri/core/workers/chunks/9fe62638dc7dce466612.js +1 -0
  64. package/assets/esri/core/workers/chunks/a2e9141ff4efd13413a1.js +66 -0
  65. package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
  66. package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → b6c3a2d93a59df9a1418.js} +1 -1
  67. package/assets/esri/core/workers/chunks/b763292829aa4d3fab60.js +1 -0
  68. package/assets/esri/core/workers/chunks/ba015f4f72714820a12f.js +1 -0
  69. package/assets/esri/core/workers/chunks/bbbd58b02a3ee8fe595e.js +1 -0
  70. package/assets/esri/core/workers/chunks/c3d95f7f4370486eed2c.js +1 -0
  71. package/assets/esri/core/workers/chunks/c3df693d1bce8f189fa2.js +1 -0
  72. package/assets/esri/core/workers/chunks/{6993a59cbb78bc26f029.js → c45a314ace9725aa250e.js} +1 -1
  73. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +1 -0
  74. package/assets/esri/core/workers/chunks/c9fbada1e84981784f6c.js +1 -0
  75. package/assets/esri/core/workers/chunks/cefcecbeef4f0a46f58c.js +1 -0
  76. package/assets/esri/core/workers/chunks/d2317b87aa2ac3ad97a6.js +1 -0
  77. package/assets/esri/core/workers/chunks/{0bbb38f59f37c51c72f0.js → d45a4e5806a80b69ceec.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{7a23dc625a812a562c21.js → d5f770302dc686e55ba7.js} +1 -1
  79. package/assets/esri/core/workers/chunks/dc14507cfc052faa5890.js +1 -0
  80. package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +1 -0
  81. package/assets/esri/core/workers/chunks/ede9738ac20e7dd5ce63.js +1 -0
  82. package/assets/esri/core/workers/chunks/eec034d88db320880133.js +1 -0
  83. package/assets/esri/core/workers/chunks/f1e87720b425d7fb348a.js +1 -0
  84. package/assets/esri/core/workers/chunks/f2863c501d62dece5fdd.js +1 -0
  85. package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
  86. package/assets/esri/core/workers/chunks/f9e1b73976027e17cd03.js +1 -0
  87. package/assets/esri/core/workers/chunks/fd207a40faf882d3b2a3.js +1 -0
  88. package/assets/esri/core/workers/chunks/fe3832107278244dc04d.js +1 -0
  89. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  90. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  100. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  101. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  102. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  103. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  104. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  105. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  106. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  107. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  108. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  109. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  110. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  111. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  112. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  113. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  114. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  115. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  116. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  117. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  118. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  119. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  120. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  121. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  122. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  124. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  125. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  126. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  127. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  128. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  129. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  130. package/chunks/aiServices.js +1 -1
  131. package/config.js +1 -1
  132. package/core/workers/Connection.js +1 -1
  133. package/core/workers/RemoteClient.js +1 -1
  134. package/core/workers/WorkerHandle.js +1 -1
  135. package/effects/FocusArea.d.ts +4 -0
  136. package/effects/FocusArea.js +1 -1
  137. package/effects/FocusAreaOutline.d.ts +4 -0
  138. package/effects/FocusAreaOutline.js +1 -1
  139. package/effects/FocusAreas.d.ts +4 -0
  140. package/effects/FocusAreas.js +1 -1
  141. package/geometry.js +1 -1
  142. package/interfaces.d.ts +319 -43
  143. package/kernel.js +1 -1
  144. package/layers/BuildingSceneLayer.js +1 -1
  145. package/layers/GroupLayer.js +1 -1
  146. package/layers/ImageryLayer.js +1 -1
  147. package/layers/ImageryTileLayer.js +1 -1
  148. package/layers/VideoLayer.js +1 -1
  149. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  150. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  151. package/layers/graphics/editingSupport.js +1 -1
  152. package/layers/mixins/ImageryTileMixin.js +1 -1
  153. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  154. package/layers/mixins/operationalLayers.js +1 -1
  155. package/layers/support/BuildingSummaryStatistics.js +1 -1
  156. package/layers/support/PromiseQueue.js +1 -1
  157. package/layers/support/TelemetryDisplay.js +1 -1
  158. package/layers/support/TitleCreator.js +1 -1
  159. package/layers/support/arcgisLayers.js +1 -1
  160. package/layers/support/featurePopupQueryUtils.js +5 -0
  161. package/layers/support/fieldUtils.js +1 -1
  162. package/layers/support/layersCreator.js +1 -1
  163. package/layers/support/multiLayerServiceUtils.js +5 -0
  164. package/networks/CircuitManager.js +1 -1
  165. package/networks/UnitIdentifierManager.js +1 -1
  166. package/networks/UtilityNetwork.js +1 -1
  167. package/networks/support/UNTraceConfiguration.js +1 -1
  168. package/networks/support/typeUtils.js +1 -1
  169. package/package.json +1 -1
  170. package/portal/PortalItem.js +1 -1
  171. package/portal/support/layersLoader.js +1 -1
  172. package/portal/support/portalLayers.js +1 -1
  173. package/rasterRenderers.js +1 -1
  174. package/renderers.js +1 -1
  175. package/rest/featureService/FeatureService.js +1 -1
  176. package/rest/locator/locationToAddress.js +1 -1
  177. package/rest/networks/circuits/queryCircuits.js +1 -1
  178. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  179. package/rest/networks/support/CircuitTraceResult.js +5 -0
  180. package/rest/networks/support/TraceResult.js +1 -1
  181. package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
  182. package/rest/support/LocationToAddressParameters.js +1 -1
  183. package/rest/support/geocodeEnums.js +5 -0
  184. package/support/revision.js +1 -1
  185. package/symbols/cim/animationUtils.js +1 -1
  186. package/symbols/cim/cimAnalyzer.js +1 -1
  187. package/symbols/cim/defaultCIMValues.js +1 -1
  188. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  189. package/symbols/cim/utils.js +1 -1
  190. package/symbols/support/cimSymbolUtils.js +1 -1
  191. package/symbols/support/previewCIMSymbol.js +1 -1
  192. package/symbols.js +1 -1
  193. package/views/2d/engine/webgl/animations/infos.js +1 -1
  194. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  195. package/views/2d/engine/webgl/animations/utils.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  197. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
  200. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
  201. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
  202. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
  208. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
  209. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
  210. package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  219. package/views/2d/layers/MediaLayerView2D.js +1 -1
  220. package/views/2d/layers/TileLayerView2D.js +1 -1
  221. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  222. package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
  223. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  224. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  225. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  226. package/views/3d/layers/I3SMeshView3D.js +1 -1
  227. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  228. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  229. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  230. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  231. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  232. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  233. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  234. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  235. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  236. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  237. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  238. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  239. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  240. package/views/3d/terrain/OverlayRenderer.js +1 -1
  241. package/views/3d/terrain/TerrainRenderer.js +1 -1
  242. package/views/3d/terrain/TerrainSurface.js +1 -1
  243. package/views/3d/terrain/TileRenderer.js +1 -1
  244. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  245. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  246. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  247. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  248. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  249. package/views/SelectionManager.js +1 -1
  250. package/views/VideoView.js +1 -1
  251. package/views/draw/support/GraphicMover.js +1 -1
  252. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  253. package/views/layers/FeatureLayerView.js +1 -1
  254. package/views/layers/ImageryLayerView.js +1 -1
  255. package/views/layers/ImageryTileLayerView.js +1 -1
  256. package/views/layers/PointCloudLayerView.js +1 -1
  257. package/views/support/TextureCompressionTracker.js +5 -0
  258. package/views/webgl/Texture.js +1 -1
  259. package/webdoc/support/writeUtils.js +1 -1
  260. package/webmap/utils.js +1 -1
  261. package/widgets/Attachments.js +1 -1
  262. package/widgets/BatchAttributeForm.js +1 -1
  263. package/widgets/Directions/DirectionsVisibleElements.js +1 -1
  264. package/widgets/Directions.js +1 -1
  265. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  266. package/widgets/Editor/EditorViewModel.js +1 -1
  267. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  268. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  269. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  270. package/widgets/Editor/workflowUtils.js +1 -1
  271. package/widgets/Expand.js +1 -1
  272. package/widgets/Feature/support/featureUtils.js +1 -1
  273. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  274. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  275. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  276. package/widgets/FeatureForm.js +1 -1
  277. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  278. package/widgets/Features/FeaturesViewModel.js +1 -1
  279. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  280. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  281. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  282. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  283. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  284. package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
  285. package/widgets/OrientedImageryViewer.js +1 -1
  286. package/widgets/Search/LocatorSearchSource.js +1 -1
  287. package/widgets/Search/SearchSource.js +1 -1
  288. package/widgets/Search/SearchViewModel.js +1 -1
  289. package/widgets/Search/support/locatorUtils.js +1 -1
  290. package/widgets/Sketch.js +1 -1
  291. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  292. package/widgets/support/SelectionToolbar.js +1 -1
  293. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  294. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  295. package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
  296. package/assets/esri/core/workers/chunks/03db109e9b695528c35d.js +0 -1
  297. package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +0 -1
  298. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
  299. package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
  300. package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
  301. package/assets/esri/core/workers/chunks/0d78fc2c2bc1152f84db.js +0 -1
  302. package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
  303. package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +0 -1
  304. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
  305. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
  306. package/assets/esri/core/workers/chunks/22e53cb1c8c575fa4d46.js +0 -1
  307. package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
  308. package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
  309. package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
  310. package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +0 -1
  311. package/assets/esri/core/workers/chunks/3d7eedb787c1e3b9fbfc.js +0 -1
  312. package/assets/esri/core/workers/chunks/3fe7be535affae31de7e.js +0 -1
  313. package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +0 -1
  314. package/assets/esri/core/workers/chunks/41cbba9b286cf5558a9c.js +0 -1
  315. package/assets/esri/core/workers/chunks/42bb9bb6fe44a47d9b81.js +0 -1
  316. package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +0 -1
  317. package/assets/esri/core/workers/chunks/4ca0738ed38c15b68a77.js +0 -1
  318. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +0 -1
  319. package/assets/esri/core/workers/chunks/51ba7345c31e6eb79060.js +0 -1
  320. package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
  321. package/assets/esri/core/workers/chunks/52a57106a41b8c9483d7.js +0 -1
  322. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
  323. package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
  324. package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
  325. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
  326. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
  327. package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
  328. package/assets/esri/core/workers/chunks/61f9747c960d959b571b.js +0 -346
  329. package/assets/esri/core/workers/chunks/74182421ba425720dc7f.js +0 -1
  330. package/assets/esri/core/workers/chunks/74c0db9e3a62e9839b23.js +0 -1
  331. package/assets/esri/core/workers/chunks/7b12607633bbdc318936.js +0 -1
  332. package/assets/esri/core/workers/chunks/86023cc5ccbc7ac43479.js +0 -1
  333. package/assets/esri/core/workers/chunks/87eca6de502d18d8b7eb.js +0 -1
  334. package/assets/esri/core/workers/chunks/8aa8f9986b966ccb64e2.js +0 -1
  335. package/assets/esri/core/workers/chunks/8d14e957219364a81d5f.js +0 -66
  336. package/assets/esri/core/workers/chunks/937b653b10e8704b38bf.js +0 -1
  337. package/assets/esri/core/workers/chunks/98ef17d15517368d2383.js +0 -1
  338. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  339. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +0 -1
  340. package/assets/esri/core/workers/chunks/a32dcd5bc4680374d30c.js +0 -1
  341. package/assets/esri/core/workers/chunks/aaa6d45316a7d3466d0f.js +0 -1
  342. package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +0 -1
  343. package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +0 -1
  344. package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +0 -1
  345. package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
  346. package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +0 -1
  347. package/assets/esri/core/workers/chunks/c77cfd8790877393353a.js +0 -1
  348. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
  349. package/assets/esri/core/workers/chunks/d3c0d7799c92c6f0e7d3.js +0 -1
  350. package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
  351. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
  352. package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
  353. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
  354. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
  355. package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
  356. package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
  357. package/assets/esri/core/workers/chunks/f1c6df5cf2ccb6ac47a1.js +0 -1
  358. package/assets/esri/core/workers/chunks/f3d97a4c4f433adbdab5.js +0 -1
  359. package/assets/esri/core/workers/chunks/fc0a3db3d6d26c763fb9.js +0 -1
  360. package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +0 -1
  361. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
  362. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
  363. package/views/support/TextureCompressionHandle.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3202,4123,7136],{4197:(e,t,i)=>{i.d(t,{jh:()=>r,l5:()=>a,xm:()=>n});var s=i(34275);function r(e,t=!1){return e<=s.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function n(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new r(e.getPointX(t),e.getPointY(t),i),n=e.hasZ(t),a=e.hasM(t);return n&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new n(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=e.getMExtent(t);n.mmin=i.vmin,n.mmax=i.vmax}return n}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class n{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>R});var s=i(4718),r=i(88930),n=i(12359),a=i(90634),o=i(62577),l=i(21325),u=i(29441),c=i(51441),h=i(30524),d=i(87445),p=i(1873),m=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,u.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,u.j4)(s,i),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),i?this.featureAdapter.getAttribute(e,s):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,s,i,r)}return n}))}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var y=i(31464),g=i(58727);function _(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,r,n=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:r,draped:n}}var T=i(5834),I=i(59977),F=i(11440),S=i(60909);const v="bin";class R{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=w(this.hasZ,this.hasM),{point:n,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,i),p=new A(null,0),m=new A(null,0),f={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?b:i.lengths;if(p.coords=a,m.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e;for(let i=0;i<a;i++,e+=r){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=m;g.coordsIndex=i===a-1?h:e+r;const _=f;if(!E(f,n,y,g))continue;const T=(n.x-_.x)/o,I=(n.y-_.y)/l,F=T*T+I*I;F<=1&&u.candidates.push(x(s.getObjectId(t),d(_),Math.sqrt(F),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e,f=m;f.coordsIndex=h;for(let i=0;i<a;i++,e+=r){const r=p;if(r.coordsIndex=e,c&&i===a-1&&r.x===f.x&&r.y===f.y)continue;const h=(n.x-r.x)/o,m=(n.y-r.y)/l,y=h*h+m*m;y<=1&&u.candidates.push(_(s.getObjectId(t),d(r),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*r,!c&&s>1&&i.push(e-r)}for(const e of i){const i=p;i.coordsIndex=e;const r=(n.x-i.x)/o,a=(n.y-i.y)/l,c=r*r+a*a;c<=1&&u.candidates.push(_(s.getObjectId(t),d(i),Math.sqrt(c)))}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,i,s){const r=null==s||(0,l.aI)(i,s)?e=>e:e=>(0,y.Cv)(e,i,s),{hasZ:n}=this;return"3d"===e?n&&t?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=s&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of I){const r=this.featureAdapter.getGeometry(s),n={attributes:i.getAttributes(s),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(s)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of I){const t=i.getAttributes(e);t&&(x[T++]={attributes:t})}const F=d||0;if(null!=p){const e=F+p;x=x.slice(F,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=w(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,F=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:h}=e[s],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[i]=t}else{let s=null;if(F)s=i;else{const e=this._getAttributeValues(l,f,t,r),i=h.map((t=>e[t]));s=T&&"statisticParameters"in m?this._getPercentileValue(m,i):this._getStatisticValue(m,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i])),o.set(p,e)}}}else if(I){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,f,t,r);i.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[i];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:r}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=s(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:s}):(0,p.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map((i=>e.getFieldValue(i,t,r)));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:v,alias:v,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],((e,t,i)=>o.getFieldValue(e,t,i)));const c=this._getAttributeValues(o,i,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[s??i]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(F.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,p.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),m=(0,h.OH)(this.fieldsIndex.get(s)),f=(0,p.sU)(d,{field:s,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!1),y=await this._calculateHistogramBins(d,f,i);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,h.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,h.OH)(this.fieldsIndex.get(s)),u=(0,p.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:v,alias:v,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const i of e){const{minValue:e,maxValue:s,items:h}=i,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=s,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[v]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[v]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,i)=>{function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,m=s;for(n(e,i,t),a(e[s],d)>0&&n(e,i,s);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[i],d)?n(e,i,m):n(e,++m,s),m<=t&&(i=m+1),t<=m&&(s=m-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>S,el:()=>F});var s=i(92602),r=i(49186),n=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),h=i(78888),d=i(65864),p=i(2272),m=i(84952),f=i(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,l.r8)(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 s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}}))}if(r===i){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function F(e,t,i){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,g,_,S,v,R,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,R=_?102100:4326,S=l.j7[R].maxX,v=l.j7[R].minX,E=l.j7[R].plus180Line,w=l.j7[R].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),S,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,v))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,v)*(2*S);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==S?(A=n>A?n:A,s=x(s,_),b.push(s),M.push("cut")):e.intersects(w)&&r!==v?(A=n*(2*S)>A?n*(2*S):A,s=x(s,_,360),b.push(s),M.push("cut")):M.push(s)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,S),O=-90;const C=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,O],[e,-1*O]]),O*=-1,N--}if(b.length>0&&C>0){const t=I(b,await async function(e,t,i,s){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,i)),s=[],n=[];for(let i=0;i<M.length;i++){const r=M[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const B=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)B.push(t);else{const e=b.shift();B.push(!0===_?(0,c.Gh)(e):e)}}return B}function S(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,i={}){const r=f(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,i,s){if(!i)return!0;const r="where clause";return _(e,t,d(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function m(e,t,i,r,n){if(!i)return!0;const a="having clause",l=d(e,i,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(i,e),c=u?.getExpressions().every((t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some((t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i}))}));if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,i,s,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var s=i(4576),r=i(74887),n=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?m(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(90237),r=i(69540),n=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,s._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,s._)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var s=i(90237),r=i(66552),n=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(88368);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),r=i(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,r,n);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,r,u,c,h=t,d=i){const p=t&&h,m=i&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,s.kz)(a,f,t,i,e,u,h,d);return c&&(r=(0,s.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,s.Nl)(o,f,t,i,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,s.Q4)(n,f,t,i,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>r})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var s=i(49186),r=i(66552),n=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),h=i(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await i.e(9159).then(i.bind(i,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&_(m,r)?{densificationStep:8*i}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,s);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>_});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),h=i(66552),d=i(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,s._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,s._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,s._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,s._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,s._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,s._)([(0,l.$)("esri.rest.support.DateBinParameters")],_),_.from=(0,a.dp)(_)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var s=i(49186),r=i(94078),n=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,r,n){const a=l(r,n),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,r=0;s<u.length;s++,r+=a)if(!c(e,t,i,o[r],o[r+1]))return!1;return!0}function c(e,t,i,s,r){if(!e)return!1;const n=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,s,r),c+=e*n;return u}function h(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=i(90708),p=i(92722),m=i(51441),f=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function x(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(i,s,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(i,s,o,e))}async function T(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),r=i(29441),n=i(31464),a=i(62660),o=i(43668);const l="unsupported-query";async function u(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,r.eD)(e,t,o,n,i)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,i){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=i,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const s=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:i})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(o)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,r.SN)(e,t,i.where,i)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:i,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([m(i,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,i,n){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new s.A(l,"field or valueExpression is required",{params:i});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},68298:(e,t,i)=>{i.d(t,{do:()=>oe,ux:()=>le});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),h=i(98988),d=i(70328),p=i(19419),m=i(537),f=i(65864),y=i(21325),g=i(90708),_=i(29441),x=i(51441),T=i(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new S(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let F=0;class S{constructor(e){this.items=e,this.time=performance.now(),this.id=F++}}var v=i(99352),R=i(8384),E=i(58727),w=i(62798),A=i(62660),b=i(86420),M=i(95466),N=i(71511),O=i(53966),C=i(61604),P=i(3694),B=i(36708),D=i(44794),G=i(78659);const z=Symbol("Yield");class L{constructor(){this._tasks=new Array,this._runningTasks=(0,D.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return z;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.push(new k(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}unshift(e,t,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.unshift(new k(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const i=(0,l.G4)(t.signal);if(i&&!t.abortCallback)t.reject((0,l.NK)());else{const s=i?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0}}class k{constructor(e,t,i,s=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=r}}var V=i(90237),q=i(69622),Z=i(10107),Q=(i(87811),i(40608));let U=class extends q.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,V._)([(0,Z.MZ)()],U.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,V._)([(0,Z.MZ)()],U.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),U=(0,V._)([(0,Q.$)("esri.views.support.debugFlags")],U);const j=new U;var H,Y,$;($=H||(H={}))[$.ANIMATING=0]="ANIMATING",$[$.INTERACTING=1]="INTERACTING",$[$.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Y||(Y={}));const W=new Map([[Y.RESOURCE_CONTROLLER_IMMEDIATE,0],[Y.RESOURCE_CONTROLLER,4],[Y.SLIDE,0],[Y.STREAM_DATA_LOADER,0],[Y.ELEVATION_QUERY,0],[Y.TERRAIN_SURFACE,1],[Y.SURFACE_GEOMETRY_UPDATES,1],[Y.LOD_RENDERER,2],[Y.GRAPHICS_CORE,2],[Y.I3S_CONTROLLER,2],[Y.POINT_CLOUD_LAYER,2],[Y.FEATURE_TILE_FETCHER,2],[Y.CLOUDS_GENERATOR,2],[Y.OVERLAY,4],[Y.OVERLAY_RENDERER,4],[Y.STAGE,4],[Y.GRAPHICS_DECONFLICTOR,4],[Y.FILTER_VISIBILITY,4],[Y.SCALE_VISIBILITY,4],[Y.FRUSTUM_VISIBILITY,4],[Y.POINT_OF_INTEREST_FREQUENT,6],[Y.POINT_OF_INTEREST_INFREQUENT,30],[Y.LABELER,8],[Y.FEATURE_QUERY_ENGINE,8],[Y.FEATURE_TILE_TREE,16],[Y.FEATURE_TILE_TREE_ACTIVE,0],[Y.ELEVATION_ALIGNMENT,12],[Y.ELEVATION_ALIGNMENT_SCENE,14],[Y.TEXT_TEXTURE_ATLAS,12],[Y.TEXTURE_UNLOAD,12],[Y.LINE_OF_SIGHT_TOOL,16],[Y.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Y.SNAPPING,0],[Y.SHADOW_ACCUMULATOR,30],[Y.MAPVIEW_FETCH_QUEUE,0],[Y.MAPVIEW_LAYERVIEW_UPDATE,2],[Y.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function J(e){return W.has(e)?W.get(e):"number"==typeof e?e:1}const X=(0,G.l5)(6.5),K=(0,G.l5)(1),ee=(0,G.l5)(30),te=(0,G.l5)(1e3/30),ie=(0,G.l5)(100);var se,re;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,D.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new C.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,this._state=H.INTERACTING,this._tasks=new P.A,this._runQueue=new P.A,this._load=0,this._idleStateCallbacks=new P.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,B.wB)((()=>j.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),B.Vh);for(const e of Object.keys(Y))this.performanceInfo.tasks.set(Y[e],new C.A(Y[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,o.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,i){const s=new t(this,e,i);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new C.A(e)),s}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===H.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===H.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=X,i=e.frameDuration,s=K;switch(this.state){case H.IDLE:t=(0,G.l5)(0),i=(0,G.l5)(Math.max(ie,e.frameDuration)),s=ee;break;case H.INTERACTING:i=(0,G.l5)(Math.max(te,e.frameDuration));case H.ANIMATING:}return i=(0,G.l5)(i-e.elapsedFrameTime-t),this.state!==H.IDLE&&i<K&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,G.l5)(Math.max(i,s)),this._budget.reset(i),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,G.l5)(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return re.SCHEDULED;let t=re.IDLE;return this._tasks.forAll((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=re.READY:t!==re.READY&&(t=re.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===z&&(t.blockFrame=this._frameNumber)}catch(e){O.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,Y.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const i=this._budget.now()-e;if(t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(Y))this._frameTaskTimes.set(Y[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,i){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new L,this._handles=new N.A,this._basePriority=J(t),this.schedulePriority=this._basePriority,this._task=(0,D.v)(null!=i?i:this._queue),this._handles.add((0,B.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(ne),this._scheduler.removeTask(this),this.schedule=ae.schedule,this.reschedule=ae.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=J(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){return this._queue.runTask(e)}}class i{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=i}(se||(se={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(re||(re={}));const ne=new se.Budget;ne.enabled=!1;const ae=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(ne))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}};class oe{constructor(e){this._changeHandle=null,this.capabilities={query:v.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==E.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===E.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,r=new Set;return await this.reschedule((()=>{for(const e of s)r.add(t.featureAdapter.getObjectId(e))}),i),r}catch(e){if(e===E.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},i);return await this.reschedule((()=>this._filterLatest(t)),i),await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,E.iJ)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i);s=await this.reschedule((()=>this._executeGeometryQuery(e,t,i)),i),await this.reschedule((()=>this._executeAggregateIdsQuery(s)),i),await this.reschedule((()=>this.executeObjectIdsQuery(s)),i),await this.reschedule((()=>this.executeTimeQuery(s)),i),await this.reschedule((()=>this.executeAttributesQuery(s)),i)}catch(t){if(t!==E.v8)throw t;s=new R.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,i);if(n.spatialReference=(0,x.ag)(i),n.xmax-n.xmin===0){const e=(0,u.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=(0,u.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=(0,u.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(ne)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(ne)}async _getAllFeaturesQueryEngineResult(e){return new R.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i),e={...e,...t};const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=s||r,u=(0,y.fn)(i)&&!(0,y.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(le(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new R.G(n,e,this)}),t);return u(r)}if(!h.length)return new R.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new R.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new R.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new R.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(le(r))),i);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),i),n=await this.reschedule((async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!s.has(f.getObjectId(e))||t(f.getGeometry(e))),i);return new R.G(n,e,this)}),i);return d(n)}if(null!=t){const e=new s.vW;g=g.filter((i=>(0,s.qh)(t.items,i,t.items.length,e)>=0))}if(!g.length){const t=new R.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new R.G(g,e,this));const x=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),i);return d(new R.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,n=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),i)}};return this.reschedule((e=>n(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=(0,r.zI)(n.map(((t,s)=>i.cloneWithGeometry(e.items[s],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this)}}get test(){}}function le(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},70328:(e,t,i)=>{i.d(t,{BI:()=>_,Ej:()=>d,Ie:()=>y,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>T,fA:()=>a,gE:()=>l,hZ:()=>f,iT:()=>h,is:()=>x,qv:()=>I,vI:()=>m,vY:()=>o,v_:()=>F,vt:()=>n,w1:()=>u});var s=i(5443),r=(i(19419),i(4197));function n(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,r,a,o=n()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=r,o[5]=a,o}function o(e,t=n()){return function(e,t,i,s=n()){return f(s,I),function(e,t,i=0,s=t.length/3){let r=e[0],n=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)r=Math.min(r,t[i+3*e]),n=Math.min(n,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[i,s,n,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=n,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=n,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=n,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=n,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?f(e,I):n(I)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,i,s,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function x(e){return 6===e.length}function T(e,t,i){if(null==e||null==t)return e===t;if(!x(e)||!x(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];n()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=i.getAttribute((0,s.zI)(e),r),l=i.getAttribute((0,s.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=i.getAttribute((0,s.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>n,X:()=>r});var s=i(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,i){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),r=i(53966),n=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=f(t);if(t&&s){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(s,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?h.mQ.utcInstance:(0,n.tE)(d,t,(()=>h.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:r}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):o??u.n$:null,h=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,d=new Map([[m(r?.creationDateField??""),l],[m(r?.editDateField??""),l],[m(n),h],[m(a),h]]);for(const{name:s,type:r}of e.fields)if(y.has(r))t.set(s,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=d.get(m(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3202,4123,7136],{4197:(e,t,i)=>{i.d(t,{jh:()=>r,l5:()=>a,xm:()=>n});var s=i(34275);function r(e,t=!1){return e<=s.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function n(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new r(e.getPointX(t),e.getPointY(t),i),n=e.hasZ(t),a=e.hasM(t);return n&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new n(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=e.getMExtent(t);n.mmin=i.vmin,n.mmax=i.vmax}return n}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class n{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>R});var s=i(4718),r=i(88930),n=i(12359),a=i(90634),o=i(62577),l=i(21325),u=i(29441),c=i(51441),h=i(30524),d=i(87445),p=i(1873),m=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,u.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,u.j4)(s,i),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),i?this.featureAdapter.getAttribute(e,s):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,s,i,r)}return n}))}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var y=i(31464),g=i(58727);function _(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,r,n=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:r,draped:n}}var T=i(5834),I=i(59977),F=i(11440),v=i(60909);const S="bin";class R{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=w(this.hasZ,this.hasM),{point:n,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,i),p=new A(null,0),m=new A(null,0),f={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?b:i.lengths;if(p.coords=a,m.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e;for(let i=0;i<a;i++,e+=r){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=m;g.coordsIndex=i===a-1?h:e+r;const _=f;if(!E(f,n,y,g))continue;const T=(n.x-_.x)/o,I=(n.y-_.y)/l,F=T*T+I*I;F<=1&&u.candidates.push(x(s.getObjectId(t),d(_),Math.sqrt(F),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e,f=m;f.coordsIndex=h;for(let i=0;i<a;i++,e+=r){const r=p;if(r.coordsIndex=e,c&&i===a-1&&r.x===f.x&&r.y===f.y)continue;const h=(n.x-r.x)/o,m=(n.y-r.y)/l,y=h*h+m*m;y<=1&&u.candidates.push(_(s.getObjectId(t),d(r),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*r,!c&&s>1&&i.push(e-r)}for(const e of i){const i=p;i.coordsIndex=e;const r=(n.x-i.x)/o,a=(n.y-i.y)/l,c=r*r+a*a;c<=1&&u.candidates.push(_(s.getObjectId(t),d(i),Math.sqrt(c)))}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,i,s){const r=null==s||(0,l.aI)(i,s)?e=>e:e=>(0,y.Cv)(e,i,s),{hasZ:n}=this;return"3d"===e?n&&t?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=s&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of I){const r=this.featureAdapter.getGeometry(s),n={attributes:i.getAttributes(s),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(s)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of I){const t=i.getAttributes(e);t&&(x[T++]={attributes:t})}const F=d||0;if(null!=p){const e=F+p;x=x.slice(F,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=w(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,F=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:h}=e[s],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[i]=t}else{let s=null;if(F)s=i;else{const e=this._getAttributeValues(l,f,t,r),i=h.map((t=>e[t]));s=T&&"statisticParameters"in m?this._getPercentileValue(m,i):this._getStatisticValue(m,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i])),o.set(p,e)}}}else if(I){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,f,t,r);i.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const v="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:u,alias:u,type:v||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[i];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:r}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=s(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:s}):(0,p.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map((i=>e.getFieldValue(i,t,r)));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:S,alias:S,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],((e,t,i)=>o.getFieldValue(e,t,i)));const c=this._getAttributeValues(o,i,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[s??i]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(F.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(v.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,p.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),m=(0,h.OH)(this.fieldsIndex.get(s)),f=(0,p.sU)(d,{field:s,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!1),y=await this._calculateHistogramBins(d,f,i);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,h.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,h.OH)(this.fieldsIndex.get(s)),u=(0,p.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:S,alias:S,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const i of e){const{minValue:e,maxValue:s,items:h}=i,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=s,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[S]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[S]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,i)=>{function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,m=s;for(n(e,i,t),a(e[s],d)>0&&n(e,i,s);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[i],d)?n(e,i,m):n(e,++m,s),m<=t&&(i=m+1),t<=m&&(s=m-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>v,el:()=>F});var s=i(92602),r=i(49186),n=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),h=i(78888),d=i(65864),p=i(2272),m=i(84952),f=i(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,l.r8)(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 s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}}))}if(r===i){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function F(e,t,i){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,g,_,v,S,R,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,R=_?102100:4326,v=l.j7[R].maxX,S=l.j7[R].minX,E=l.j7[R].plus180Line,w=l.j7[R].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),v,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,S))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,S)*(2*v);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==v?(A=n>A?n:A,s=x(s,_),b.push(s),M.push("cut")):e.intersects(w)&&r!==S?(A=n*(2*v)>A?n*(2*v):A,s=x(s,_,360),b.push(s),M.push("cut")):M.push(s)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,v),O=-90;const C=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,O],[e,-1*O]]),O*=-1,N--}if(b.length>0&&C>0){const t=I(b,await async function(e,t,i,s){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,i)),s=[],n=[];for(let i=0;i<M.length;i++){const r=M[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const B=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)B.push(t);else{const e=b.shift();B.push(!0===_?(0,c.Gh)(e):e)}}return B}function v(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,i={}){const r=f(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,i,s){if(!i)return!0;const r="where clause";return _(e,t,d(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function m(e,t,i,r,n){if(!i)return!0;const a="having clause",l=d(e,i,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(i,e),c=u?.getExpressions().every((t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some((t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i}))}));if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,i,s,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var s=i(4576),r=i(74887),n=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?m(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(90237),r=i(69540),n=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,s._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,s._)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var s=i(90237),r=i(66552),n=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(88368);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),r=i(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,r,n);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,r,u,c,h=t,d=i){const p=t&&h,m=i&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,s.kz)(a,f,t,i,e,u,h,d);return c&&(r=(0,s.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,s.Nl)(o,f,t,i,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,s.Q4)(n,f,t,i,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>r})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var s=i(49186),r=i(66552),n=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),h=i(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await i.e(9159).then(i.bind(i,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&_(m,r)?{densificationStep:8*i}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,s);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>_});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),h=i(66552),d=i(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,s._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,s._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,s._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,s._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,s._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,s._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,s._)([(0,l.$)("esri.rest.support.DateBinParameters")],_),_.from=(0,a.dp)(_)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var s=i(49186),r=i(94078),n=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,r,n){const a=l(r,n),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,r=0;s<u.length;s++,r+=a)if(!c(e,t,i,o[r],o[r+1]))return!1;return!0}function c(e,t,i,s,r){if(!e)return!1;const n=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,s,r),c+=e*n;return u}function h(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=i(90708),p=i(92722),m=i(51441),f=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(2189),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function x(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(i,s,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(i,s,o,e))}async function T(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),r=i(29441),n=i(31464),a=i(62660),o=i(43668);const l="unsupported-query";async function u(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,r.eD)(e,t,o,n,i)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,i){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=i,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const s=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:i})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(o)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,r.SN)(e,t,i.where,i)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:i,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([m(i,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,i,n){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new s.A(l,"field or valueExpression is required",{params:i});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},68298:(e,t,i)=>{i.d(t,{do:()=>oe,ux:()=>le});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),h=i(98988),d=i(70328),p=i(19419),m=i(537),f=i(65864),y=i(21325),g=i(90708),_=i(29441),x=i(51441),T=i(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new v(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let F=0;class v{constructor(e){this.items=e,this.time=performance.now(),this.id=F++}}var S=i(99352),R=i(8384),E=i(58727),w=i(62798),A=i(62660),b=i(86420),M=i(95466),N=i(71511),O=i(53966),C=i(61604),P=i(3694),B=i(36708),D=i(44794),G=i(78659);const z=Symbol("Yield");class k{constructor(){this._tasks=new Array,this._numPendingTasks=(0,D.v)(0),this._running=(0,D.v)(!1)}get length(){return this._tasks.length}get updating(){return this._numPendingTasks.value>0}get running(){return this._running.value}_updateRunning(){this._running.value=this._tasks.length>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return z;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,i){return new Promise(((s,r)=>{this._tasks.push(new L(s,r,e,t,i)),++this._numPendingTasks.value,this._updateRunning()})).finally((()=>--this._numPendingTasks.value))}unshift(e,t,i){return new Promise(((s,r)=>{this._tasks.unshift(new L(s,r,e,t,i)),++this._numPendingTasks.value,this._updateRunning()})).finally((()=>--this._numPendingTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();this._updateRunning();try{const i=(0,l.G4)(t.signal);if(i&&!t.abortCallback)t.reject((0,l.NK)());else{const s=i?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0,this._updateRunning()}}class L{constructor(e,t,i,s=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=r}}var V=i(90237),q=i(69622),Z=i(10107),Q=(i(87811),i(40608));let U=class extends q.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,V._)([(0,Z.MZ)()],U.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,V._)([(0,Z.MZ)()],U.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),U=(0,V._)([(0,Q.$)("esri.views.support.debugFlags")],U);const j=new U;var H,Y,$;($=H||(H={}))[$.ANIMATING=0]="ANIMATING",$[$.INTERACTING=1]="INTERACTING",$[$.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Y||(Y={}));const W=new Map([[Y.RESOURCE_CONTROLLER_IMMEDIATE,0],[Y.RESOURCE_CONTROLLER,4],[Y.SLIDE,0],[Y.STREAM_DATA_LOADER,0],[Y.ELEVATION_QUERY,0],[Y.TERRAIN_SURFACE,1],[Y.SURFACE_GEOMETRY_UPDATES,1],[Y.LOD_RENDERER,2],[Y.GRAPHICS_CORE,2],[Y.I3S_CONTROLLER,2],[Y.POINT_CLOUD_LAYER,2],[Y.FEATURE_TILE_FETCHER,2],[Y.CLOUDS_GENERATOR,2],[Y.OVERLAY,4],[Y.OVERLAY_RENDERER,4],[Y.STAGE,4],[Y.GRAPHICS_DECONFLICTOR,4],[Y.FILTER_VISIBILITY,4],[Y.SCALE_VISIBILITY,4],[Y.FRUSTUM_VISIBILITY,4],[Y.POINT_OF_INTEREST_FREQUENT,6],[Y.POINT_OF_INTEREST_INFREQUENT,30],[Y.LABELER,8],[Y.FEATURE_QUERY_ENGINE,8],[Y.FEATURE_TILE_TREE,16],[Y.FEATURE_TILE_TREE_ACTIVE,0],[Y.ELEVATION_ALIGNMENT,12],[Y.ELEVATION_ALIGNMENT_SCENE,14],[Y.TEXT_TEXTURE_ATLAS,12],[Y.TEXTURE_UNLOAD,12],[Y.LINE_OF_SIGHT_TOOL,16],[Y.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Y.SNAPPING,0],[Y.SHADOW_ACCUMULATOR,30],[Y.MAPVIEW_FETCH_QUEUE,0],[Y.MAPVIEW_LAYERVIEW_UPDATE,2],[Y.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function J(e){return W.has(e)?W.get(e):"number"==typeof e?e:1}const X=(0,G.l5)(6.5),K=(0,G.l5)(1),ee=(0,G.l5)(30),te=(0,G.l5)(1e3/30),ie=(0,G.l5)(100);var se,re;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,D.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new C.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,this._state=H.INTERACTING,this._tasks=new P.A,this._runQueue=new P.A,this._load=0,this._idleStateCallbacks=new P.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,B.wB)((()=>j.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),B.Vh);for(const e of Object.keys(Y))this.performanceInfo.tasks.set(Y[e],new C.A(Y[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,o.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,i){const s=new t(this,e,i);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new C.A(e)),s}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===H.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===H.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=X,i=e.frameDuration,s=K;switch(this.state){case H.IDLE:t=(0,G.l5)(0),i=(0,G.l5)(Math.max(ie,e.frameDuration)),s=ee;break;case H.INTERACTING:i=(0,G.l5)(Math.max(te,e.frameDuration));case H.ANIMATING:}return i=(0,G.l5)(i-e.elapsedFrameTime-t),this.state!==H.IDLE&&i<K&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,G.l5)(Math.max(i,s)),this._budget.reset(i),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,G.l5)(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return re.SCHEDULED;let t=re.IDLE;return this._tasks.forAll((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=re.READY:t!==re.READY&&(t=re.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===z&&(t.blockFrame=this._frameNumber)}catch(e){O.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,Y.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const i=this._budget.now()-e;if(t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(Y))this._frameTaskTimes.set(Y[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,i){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new k,this._handles=new N.A,this._basePriority=J(t),this.schedulePriority=this._basePriority,this._task=(0,D.v)(null!=i?i:this._queue),this._handles.add((0,B.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(ne),this._scheduler.removeTask(this),this.schedule=ae.schedule,this.reschedule=ae.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=J(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){return this._queue.runTask(e)}}class i{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=i}(se||(se={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(re||(re={}));const ne=new se.Budget;ne.enabled=!1;const ae=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(ne))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}};class oe{constructor(e){this._changeHandle=null,this.capabilities={query:S.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==E.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===E.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,r=new Set;return await this.reschedule((()=>{for(const e of s)r.add(t.featureAdapter.getObjectId(e))}),i),r}catch(e){if(e===E.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},i);return await this.reschedule((()=>this._filterLatest(t)),i),await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,E.iJ)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i);s=await this.reschedule((()=>this._executeGeometryQuery(e,t,i)),i),await this.reschedule((()=>this._executeAggregateIdsQuery(s)),i),await this.reschedule((()=>this.executeObjectIdsQuery(s)),i),await this.reschedule((()=>this.executeTimeQuery(s)),i),await this.reschedule((()=>this.executeAttributesQuery(s)),i)}catch(t){if(t!==E.v8)throw t;s=new R.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,i);if(n.spatialReference=(0,x.ag)(i),n.xmax-n.xmin===0){const e=(0,u.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=(0,u.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=(0,u.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(ne)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(ne)}async _getAllFeaturesQueryEngineResult(e){return new R.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i),e={...e,...t};const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=s||r,u=(0,y.fn)(i)&&!(0,y.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(le(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new R.G(n,e,this)}),t);return u(r)}if(!h.length)return new R.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new R.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new R.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new R.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(le(r))),i);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),i),n=await this.reschedule((async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!s.has(f.getObjectId(e))||t(f.getGeometry(e))),i);return new R.G(n,e,this)}),i);return d(n)}if(null!=t){const e=new s.vW;g=g.filter((i=>(0,s.qh)(t.items,i,t.items.length,e)>=0))}if(!g.length){const t=new R.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new R.G(g,e,this));const x=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),i);return d(new R.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,n=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),i)}};return this.reschedule((e=>n(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=(0,r.zI)(n.map(((t,s)=>i.cloneWithGeometry(e.items[s],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,w.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}catch(t){if(t!==E.v8)throw t;return new R.G([],e,this)}}get test(){}}function le(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},70328:(e,t,i)=>{i.d(t,{BI:()=>_,Ej:()=>d,Ie:()=>y,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>T,fA:()=>a,gE:()=>l,hZ:()=>f,iT:()=>h,is:()=>x,qv:()=>I,vI:()=>m,vY:()=>o,v_:()=>F,vt:()=>n,w1:()=>u});var s=i(5443),r=(i(19419),i(4197));function n(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,r,a,o=n()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=r,o[5]=a,o}function o(e,t=n()){return function(e,t,i,s=n()){return f(s,I),function(e,t,i=0,s=t.length/3){let r=e[0],n=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)r=Math.min(r,t[i+3*e]),n=Math.min(n,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[i,s,n,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=n,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=n,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=n,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=n,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?f(e,I):n(I)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,i,s,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function x(e){return 6===e.length}function T(e,t,i){if(null==e||null==t)return e===t;if(!x(e)||!x(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];n()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=i.getAttribute((0,s.zI)(e),r),l=i.getAttribute((0,s.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=i.getAttribute((0,s.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>n,X:()=>r});var s=i(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,i){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),r=i(53966),n=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=f(t);if(t&&s){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(s,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?h.mQ.utcInstance:(0,n.tE)(d,t,(()=>h.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:r}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):o??u.n$:null,h=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,d=new Map([[m(r?.creationDateField??""),l],[m(r?.editDateField??""),l],[m(n),h],[m(a),h]]);for(const{name:s,type:r}of e.fields)if(y.has(r))t.set(s,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=d.get(m(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9331],{10838:(a,e,t)=>{t.d(e,{ao:()=>u,ud:()=>h,xO:()=>T});var n=t(49186),r=t(36563),i=t(74887),o=t(73444);const d={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function s(a){if(function(a){return a in d}(a)){const e=d[a];return!0===e?a:e}return null}const m=[],c=new Map;function l(a){for(const e of c.keys())S(a.pattern,e)&&c.delete(e)}function u(a){return m.includes(a)||(l(a),m.unshift(a)),(0,r.hA)((()=>{const e=m.indexOf(a);e>-1&&(m.splice(e,1),l(a))}))}async function h(a){const e=(0,o.JK)();c.has(a)||c.set(a,async function(a,e){const t=[];for(const n of m)if(S(n.pattern,a))try{return await n.fetchMessageBundle(a,e)}catch(a){t.push(a)}if(t.length)throw new n.A("intl:message-bundle-error",`Errors occurred while loading "${a}"`,{errors:t});throw new n.A("intl:no-message-bundle-loader",`No loader found for message bundle "${a}"`)}(a,e));const t=c.get(a);return t&&await A.add(t),t}function T(a){const e=(0,o.ZS)(a);return e?s(a)??s(e.language):null}function S(a,e){return"string"==typeof a?e.startsWith(a):a.test(e)}(0,o.Ml)((()=>{c.clear()}));const A=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(a){return this._increase(),a.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,i.Tw)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},56400:(a,e,t)=>{t.d(e,{ZS:()=>s,hv:()=>m,wr:()=>c,P6:()=>d});var n=t(98623);const r=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var i=t(96285);const o="shortOffset";function d(a,e=!1){return{json:{read:{source:a,reader:(e,t)=>t[a]?s(t[a]):null},write:!!e&&{allowNull:!0,writer(e,t){t[a]=e?function(a){return{timeZoneIANA:a}}(e):null}}}}}function s(a,e=n.qU){return a?"timeZoneIANA"in a?a.timeZoneIANA:function(a,e=n.qU){if(!a||!r.has(a.timeZone))return e;const t=r.get(a.timeZone);return a.timeZone.startsWith("UTC")||a.respectsDaylightSaving?t:function(a){const e=i.c9.local().setZone(a),t=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);return 0===t?"Etc/UTC":`Etc/GMT${i.mQ.instance(-t).formatOffset(0,"narrow")}`}(t)}(a,e):e}function m(a,e,t,r,i){if(e&&"date"===i)return{timeZone:n.n$,timeZoneName:void 0};const d=r.timeStyle||r.hour,s=t===n.L5;return{timeZone:s?"timestamp-offset"===i?void 0:a??n.n$:t,timeZoneName:s&&d?o:void 0}}function c(a){const e=new Set(["etc/utc","etc/gmt","gmt"]),t=new Set(Intl.supportedValuesOf("timeZone").map((a=>a.toLowerCase())));return a===n.qU||a===n.L5||e.has(a.toLowerCase())||t.has(a.toLowerCase())}},73444:(a,e,t)=>{t.d(e,{JK:()=>s,Ml:()=>T,ZS:()=>c,oQ:()=>u});var n=t(36563);let r;t(44208);const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale,o=globalThis.document?.documentElement;function d(){const a=o?.getAttribute("lang"),e=globalThis.navigator?.language;return i??a??e??"en"}function s(){return void 0===r&&(r=d()),r}const m=/^(?<language>[a-z]{2,3})(?:-[a-z]{3})?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(a=s()){return m.exec(a)?.groups}const l=[];function u(a){return l.push(a),(0,n.hA)((()=>{l.splice(l.indexOf(a),1)}))}new Map;const h=[];function T(a){return h.push(a),(0,n.hA)((()=>h.splice(h.indexOf(a),1)))}function S(){const a=d();r!==a&&([...h].forEach((e=>e(a))),r=a,[...l].forEach((e=>e(a))))}globalThis.addEventListener?.("languagechange",S),o&&new MutationObserver((()=>{S()})).observe(o,{attributeFilter:["lang"]})},79901:(a,e,t)=>{t.d(e,{w:()=>s});var n=t(56507),r=t(96156);const i=Object.prototype.toString;function o(a){const e="__accessorMetadata__"in a?(0,n.dp)(a):a;return function(...a){if(a.push(e),"number"==typeof a[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return d.apply(this,a)}}function d(a,e,t,n){(0,r.z4)(a,e).cast=n}function s(...a){if(3!==a.length||"string"!=typeof a[1])return 1===a.length&&"[object Function]"===i.call(a[0])?o(a[0]):1===a.length&&"string"==typeof a[0]?function(a){return(e,t)=>{(0,r.z4)(e,a).cast=e[t]}}(a[0]):void 0}},97770:(a,e,t)=>{t.d(e,{Ey:()=>L,F8:()=>U,J2:()=>w,Yq:()=>b,_v:()=>M,iS:()=>v,wj:()=>G});var n=t(66552),r=t(73444),i=t(98623),o=(t(56400),t(96285));const d={year:void 0,month:void 0,day:void 0,weekday:void 0},s={hour:void 0,minute:void 0,second:void 0},m={timeZone:i.n$},c={year:"numeric",month:"numeric",day:"numeric"},l={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},T={hour:"numeric",minute:"numeric"},S={...T,second:"numeric"},A={hourCycle:"h23"},g={...T,...A},f={...S,...A},y={"short-date":c,"short-date-short-time":{...c,...T},"short-date-short-time-24":{...c,...g},"short-date-long-time":{...c,...S},"short-date-long-time-24":{...c,...f},"short-date-le":c,"short-date-le-short-time":{...c,...T},"short-date-le-short-time-24":{...c,...g},"short-date-le-long-time":{...c,...S},"short-date-le-long-time-24":{...c,...f},"long-month-day-year":l,"long-month-day-year-short-time":{...l,...T},"long-month-day-year-short-time-24":{...l,...g},"long-month-day-year-long-time":{...l,...S},"long-month-day-year-long-time-24":{...l,...f},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...T},"day-short-month-year-short-time-24":{...u,...g},"day-short-month-year-long-time":{...u,...S},"day-short-month-year-long-time-24":{...u,...f},"long-date":h,"long-date-short-time":{...h,...T},"long-date-short-time-24":{...h,...g},"long-date-long-time":{...h,...S},"long-date-long-time-24":{...h,...f},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":T,"long-time":S},M=(0,n.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),E={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function C(){const a=(0,r.JK)(),e=(0,r.ZS)(a)?.language;return(e&&E[e])??a}"M03"===new Intl.DateTimeFormat("bs",{month:"long"}).format(new Date(2025,2))&&(E.bs="hr");let p=new WeakMap;const k=y["short-date-short-time"];function w(a){return y[a]}function b(a,e=k){return function(a){let e=p.get(a);if(!e){const t=C(),n=G(a.timeZone??i.qU),r={...a,timeZone:n};e=new Intl.DateTimeFormat(t,r),p.set(a,e)}return e}(e).format(a)}function v(a,e=k){return b(new Date(a),{...e,...m,...s})}function U(a,e=k){return b(new Date(`1970-01-01T${a}Z`),{...e,...m,...d})}function L(a,e=k){if(e.timeZone)return b(new Date(a),e);const t=o.c9.fromISO(a,{setZone:!0}),n=0===t.offset?i.n$:e.timeZone,r={...e,timeZone:n};return t.toLocaleString(r,{locale:C()})}function G(a){switch(a){case i.qU:return i.N5;case i.L5:return i.n$;default:return a}}(0,r.Ml)((()=>{p=new WeakMap}))},98623:(a,e,t)=>{t.d(e,{L5:()=>r,N5:()=>o,n$:()=>i,qU:()=>n});const n="system",r="unknown",i="UTC",o=Intl.DateTimeFormat().resolvedOptions().timeZone}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,7799,8407],{10407:(e,t,r)=>{r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>p,sQ:()=>d});var n=r(98988),i=r(16930),s=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,p.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?o(e,t):u(e,t)}async function d(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const p={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},17311:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),i=r(69622),s=r(60999),o=r(5503),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let d=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new o.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:n}=t,i=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,i).global;return s({attributes:n,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,u.Kl)(t,this.requiredFields)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const n=await e.queryFeatures(t);if(1===n?.features.length)return n.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,n._)([(0,a.MZ)()],d.prototype,"_featureUtils",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,n._)([(0,a.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,n._)([(0,a.MZ)()],d.prototype,"displayField",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,a.MZ)()],d.prototype,"fieldsIndex",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"fieldInfoMap",null),(0,n._)([(0,a.MZ)()],d.prototype,"fields",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"objectIdField",void 0),(0,n._)([(0,a.MZ)()],d.prototype,"requiredFields",null),d=(0,n._)([(0,l.$)("esri.layers.support.TitleCreator")],d)},27865:(e,t,r)=>{r.d(t,{O9:()=>s,dw:()=>o,mj:()=>i});var n=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function s(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,n.sK)(r[e]))}function o(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,r)=>{r.d(t,{BI:()=>y,D3:()=>f,XJ:()=>m,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>T});var n=r(799);const i="__begin__",s="__end__",o=new RegExp(i,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function _(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var n=r(90237),i=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const i=new a.A;return i.read(n,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,n){const s=e.find((e=>!!e.field));s&&(0,i.sM)(r,[s.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),d=r(29005);let p=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,n._)([(0,a.w)("domains")],p.prototype,"readDomains",null),(0,n._)([(0,u.K)("domains")],p.prototype,"writeDomains",null),(0,n._)([(0,o.MZ)({type:[d.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,n._)([(0,l.$)("esri.layers.support.FeatureType")],p)},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function s(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>p,Q:()=>u});var n=r(90237),i=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",p=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var n=r(34727),i=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(n));return t}(e);if(s&&((0,n.gg)(t,s[0])||(0,n.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=d(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>i});var n=r(49186);let i=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[i,s]=t.split("."),o=/^\s*\d+\s*$/;if(!i?.match||!o.test(i))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(i,10),l=parseInt(s,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>y,QY:()=>p,lL:()=>g,xR:()=>f});var n=r(66131),i=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return m.create(e,t,null,["$feature","$view"])}function f(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,n){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:n.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},d=s.compileScript(a,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new m(e,s,a,d,t,h,p,o)}constructor(e,t,r,n,i,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new y,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=s?null!=r?n.lY.epochToArcadeDate(s,r):n.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class y{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>d,Nd:()=>p,jm:()=>h,sK:()=>y});var n=r(40876),i=r(90629);function s(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const o=s();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:s,fromValues:function(e,t,r,n,i,s,o,a,l,u,c,d,p,h,f,m){const y=new Float32Array(16);return y[0]=e,y[1]=t,y[2]=r,y[3]=n,y[4]=i,y[5]=s,y[6]=o,y[7]=a,y[8]=l,y[9]=u,y[10]=c,y[11]=d,y[12]=p,y[13]=h,y[14]=f,y[15]=m,y}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=f(e.strength,t.strength,r),this.radius=f(e.radius,t.radius,r),this.threshold=f(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(f(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||s();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,n=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class d{constructor(e,t,r,n){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=n,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=f(e.offsetX,t.offsetX,r),this.offsetY=f(e.offsetY,t.offsetY,r),this.blurRadius=f(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(f(e.color[0],t.color[0],r)),this.color[1]=Math.round(f(e.color[1],t.color[1],r)),this.color[2]=Math.round(f(e.color[2],t.color[2],r)),this.color[3]=f(e.color[3],t.color[3],r)}clone(){return new d(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:e}}}class p{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=f(e.angle,t.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||s();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function f(e,t,r){return e+(t-e)*r}function m(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function y(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new d(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>h,Tj:()=>c,UT:()=>m,jJ:()=>u});var n=r(90237),i=r(69622),s=r(97768),o=r(74887),a=r(10107),l=r(40608);function u(e,t,r){return(0,o.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))}async function c(e,t,r){return(await(0,o.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return p(e)}}async function f(e){try{return d(await e)}catch(e){return(0,o.QP)(e),p(e)}}function m(e,t){return new y(e,t)}let y=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=p(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,n._)([(0,a.MZ)()],y.prototype,"value",null),(0,n._)([(0,a.MZ)()],y.prototype,"error",null),(0,n._)([(0,a.MZ)()],y.prototype,"finished",null),(0,n._)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n._)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y)},61760:(e,t,r)=>{r.d(t,{PU:()=>o,YW:()=>l,ex:()=>i,hv:()=>a,zp:()=>s}),r(34727);var n=r(90629);r(87317),r(91829);const i=2.4;function s(e){return(0,n.PN)(e*i)}function o(e){return(0,n.Lz)(e)/i}function a(e,t,r){const n=Math.sqrt(e**2+t**2)/r;return n>1?0:3/(Math.PI*r**2)*(1-n**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var n=r(49186),i=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,a.xR)(e.expression,null,d);if(!h)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,f);return new l(f,c,h,m)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{tk:()=>d,BR:()=>c,wI:()=>u,Ov:()=>a,W_:()=>l,TU:()=>o,XX:()=>s});var n=r(70333),i=r(78888);r(5503),r(36563),r(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var n,i=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.A{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=n=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))}}]);