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

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 (355) 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 +307 -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/networks/circuits/queryCircuits.js +1 -1
  177. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  178. package/rest/networks/support/CircuitTraceResult.js +5 -0
  179. package/rest/networks/support/TraceResult.js +1 -1
  180. package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
  181. package/support/revision.js +1 -1
  182. package/symbols/cim/animationUtils.js +1 -1
  183. package/symbols/cim/cimAnalyzer.js +1 -1
  184. package/symbols/cim/defaultCIMValues.js +1 -1
  185. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  186. package/symbols/cim/utils.js +1 -1
  187. package/symbols/support/cimSymbolUtils.js +1 -1
  188. package/symbols/support/previewCIMSymbol.js +1 -1
  189. package/symbols.js +1 -1
  190. package/views/2d/engine/webgl/animations/infos.js +1 -1
  191. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  192. package/views/2d/engine/webgl/animations/utils.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
  197. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
  198. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
  199. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
  200. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  216. package/views/2d/layers/MediaLayerView2D.js +1 -1
  217. package/views/2d/layers/TileLayerView2D.js +1 -1
  218. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  219. package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
  220. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  221. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  222. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  223. package/views/3d/layers/I3SMeshView3D.js +1 -1
  224. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  225. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  226. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  230. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  231. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  232. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  233. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  234. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  235. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  236. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  237. package/views/3d/terrain/OverlayRenderer.js +1 -1
  238. package/views/3d/terrain/TerrainRenderer.js +1 -1
  239. package/views/3d/terrain/TerrainSurface.js +1 -1
  240. package/views/3d/terrain/TileRenderer.js +1 -1
  241. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  242. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  243. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  244. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  245. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  246. package/views/SelectionManager.js +1 -1
  247. package/views/VideoView.js +1 -1
  248. package/views/draw/support/GraphicMover.js +1 -1
  249. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  250. package/views/layers/FeatureLayerView.js +1 -1
  251. package/views/layers/ImageryLayerView.js +1 -1
  252. package/views/layers/ImageryTileLayerView.js +1 -1
  253. package/views/layers/PointCloudLayerView.js +1 -1
  254. package/views/support/TextureCompressionTracker.js +5 -0
  255. package/views/webgl/Texture.js +1 -1
  256. package/webdoc/support/writeUtils.js +1 -1
  257. package/webmap/utils.js +1 -1
  258. package/widgets/Attachments.js +1 -1
  259. package/widgets/BatchAttributeForm.js +1 -1
  260. package/widgets/Directions/DirectionsVisibleElements.js +1 -1
  261. package/widgets/Directions.js +1 -1
  262. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  263. package/widgets/Editor/EditorViewModel.js +1 -1
  264. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  265. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  266. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  267. package/widgets/Editor/workflowUtils.js +1 -1
  268. package/widgets/Feature/support/featureUtils.js +1 -1
  269. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  270. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  271. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  272. package/widgets/FeatureForm.js +1 -1
  273. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  274. package/widgets/Features/FeaturesViewModel.js +1 -1
  275. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  276. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  277. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  278. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  279. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  280. package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
  281. package/widgets/OrientedImageryViewer.js +1 -1
  282. package/widgets/Sketch.js +1 -1
  283. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  284. package/widgets/support/SelectionToolbar.js +1 -1
  285. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  286. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  287. package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
  288. package/assets/esri/core/workers/chunks/03db109e9b695528c35d.js +0 -1
  289. package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +0 -1
  290. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
  291. package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
  292. package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
  293. package/assets/esri/core/workers/chunks/0d78fc2c2bc1152f84db.js +0 -1
  294. package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
  295. package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +0 -1
  296. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
  297. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
  298. package/assets/esri/core/workers/chunks/22e53cb1c8c575fa4d46.js +0 -1
  299. package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
  300. package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
  301. package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
  302. package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +0 -1
  303. package/assets/esri/core/workers/chunks/3d7eedb787c1e3b9fbfc.js +0 -1
  304. package/assets/esri/core/workers/chunks/3fe7be535affae31de7e.js +0 -1
  305. package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +0 -1
  306. package/assets/esri/core/workers/chunks/41cbba9b286cf5558a9c.js +0 -1
  307. package/assets/esri/core/workers/chunks/42bb9bb6fe44a47d9b81.js +0 -1
  308. package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +0 -1
  309. package/assets/esri/core/workers/chunks/4ca0738ed38c15b68a77.js +0 -1
  310. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +0 -1
  311. package/assets/esri/core/workers/chunks/51ba7345c31e6eb79060.js +0 -1
  312. package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
  313. package/assets/esri/core/workers/chunks/52a57106a41b8c9483d7.js +0 -1
  314. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
  315. package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
  316. package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
  317. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
  318. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
  319. package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
  320. package/assets/esri/core/workers/chunks/61f9747c960d959b571b.js +0 -346
  321. package/assets/esri/core/workers/chunks/74182421ba425720dc7f.js +0 -1
  322. package/assets/esri/core/workers/chunks/74c0db9e3a62e9839b23.js +0 -1
  323. package/assets/esri/core/workers/chunks/7b12607633bbdc318936.js +0 -1
  324. package/assets/esri/core/workers/chunks/86023cc5ccbc7ac43479.js +0 -1
  325. package/assets/esri/core/workers/chunks/87eca6de502d18d8b7eb.js +0 -1
  326. package/assets/esri/core/workers/chunks/8aa8f9986b966ccb64e2.js +0 -1
  327. package/assets/esri/core/workers/chunks/8d14e957219364a81d5f.js +0 -66
  328. package/assets/esri/core/workers/chunks/937b653b10e8704b38bf.js +0 -1
  329. package/assets/esri/core/workers/chunks/98ef17d15517368d2383.js +0 -1
  330. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  331. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +0 -1
  332. package/assets/esri/core/workers/chunks/a32dcd5bc4680374d30c.js +0 -1
  333. package/assets/esri/core/workers/chunks/aaa6d45316a7d3466d0f.js +0 -1
  334. package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +0 -1
  335. package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +0 -1
  336. package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +0 -1
  337. package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
  338. package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +0 -1
  339. package/assets/esri/core/workers/chunks/c77cfd8790877393353a.js +0 -1
  340. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
  341. package/assets/esri/core/workers/chunks/d3c0d7799c92c6f0e7d3.js +0 -1
  342. package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
  343. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
  344. package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
  345. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
  346. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
  347. package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
  348. package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
  349. package/assets/esri/core/workers/chunks/f1c6df5cf2ccb6ac47a1.js +0 -1
  350. package/assets/esri/core/workers/chunks/f3d97a4c4f433adbdab5.js +0 -1
  351. package/assets/esri/core/workers/chunks/fc0a3db3d6d26c763fb9.js +0 -1
  352. package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +0 -1
  353. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
  354. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
  355. package/views/support/TextureCompressionHandle.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3367],{3367:(e,t,n)=>{n.d(t,{A:()=>w,B:()=>T,P:()=>m,g:()=>b,r:()=>v});var r=n(48938),i=n(66395),s=n(85935),o=n(78878),a=n(49186),l=n(53966),u=n(91869),c=n(20655),f=n(45475),d=n(67090),p=n(62791),y=n(14942),h=n(54218);class m{constructor(e,t){this.portal=e,this._debugLog=t}async translate(e){this.portal.loaded||await this.portal.load();const t=this.portal.helperServices?.aiUtilityServices;if(null==t)return{success:!1};const n=t.url+t.translateUtility;try{return{success:!0,results:(await(0,f.T)(n,e,{authMode:"no-prompt"})).map((e=>e.toJSON()))}}catch(e){return null!=this._debugLog&&(e instanceof Error||e instanceof a.A)&&this._debugLog(`TranslateText error: ${e.message}`),l.A.getLogger("esri.arcade.functions.aiServices").error(e),{success:!1}}}}class g{constructor(e,t,n){this._parameters=e,this._maxTotalContentSize=t,this._maxContentsLength=n,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(e){const t=new Set(e.filter((e=>!this._normalizedContents.has(e.text))).map((e=>e.text)));if(this._requests.length+t.size>this._maxContentsLength)return null;let n=0;for(const e of t)n+=e.length;if((n+this._contentsTotalSize)*(this._parameters.to.length??1)>this._maxTotalContentSize)return null;const r=this._requests.length;for(const{key:t,text:n}of e)(0,u.tE)(this._normalizedContents,n,(()=>[])).push({batchIdx:r,key:t});return this._requests.push(e),this._contentsTotalSize+=n,r}async send(e){const t=[],n=[];let r=0;for(const[e,i]of this._normalizedContents)t.push(new d.A({key:String(r++),text:e})),n.push(i);const i=new p.A(this._parameters);i.contents=t;const s=await e.translate(i);if(!s.success)return Array.from(this._requests,(()=>s));const o=Array.from(this._requests,(()=>({success:!0,results:[]})));for(const e of s.results){const t=Number(e.key);for(const r of n[t])o[r.batchIdx].results.push({...e,key:r.key})}return o}}function b(e){const t=[...new Set(e.to)].sort(),n=e.from??null,r=e.portalUrl,i=e.translator,s=e.apiKey??null;return JSON.stringify([t,n,r,i,s])}async function S(e,t,n){try{return(await e.yieldFor(n))[t]}catch{return{success:!1}}}class T{constructor(e,t,{maxTotalContentSize:n=5e4,maxContentsLength:r=1e3}={}){this._executor=e,this._service=t,this._openBatches=new Map,this._maxTotalContentSize=n,this._maxContentsLength=r}create(e){return{translate:async t=>{const n=b(t),{contents:r,to:i,from:s,translator:o,portalUrl:a,apiKey:l}=t;if(null==i)return{success:!1};if(null==r||r.every((e=>0===e.text.length)))return{success:!1};const u=this._openBatches.get(n);if(null!=u){const t=u.data.tryAdd(r);if(null!=t)return await S(e,t,u);u.send()}const c=new g({to:i,from:s,translator:o,portalUrl:a,apiKey:l},this._maxTotalContentSize,this._maxContentsLength),f=c.tryAdd(r);if(null!=f){const t=this._executor.openBatch(c,{open:e=>{this._openBatches.set(n,e)},execute:e=>e.send(this._service),close:e=>{this._openBatches.get(n)===e&&this._openBatches.delete(n)}});return await S(e,f,t)}return await this._service.translate(t)}}}}function v(e){"async"===e.mode&&(e.functions[(0,r.X)("TranslateText")]=function(t,n){return e.standardFunctionAsync(t,n,(async(e,t,n)=>{if((0,o.D)(n,2,3,e,t),!(0,h.Kg)(n[0])&&!(0,h.cy)(n[0])&&!(0,o.m)(n[0]))throw new s.D$(e,s.TX.InvalidParameter,t);const r=(0,o.M)(n[0]);if(!(0,h.Kg)(n[1])&&!(0,h.cy)(n[1])&&!(0,o.m)(n[1]))throw new s.D$(e,s.TX.InvalidParameter,t);const a=(0,o.M)(n[1]);let l=null;if(n.length>=3){if(!(0,h.Kg)(n[2]))throw new s.D$(e,s.TX.InvalidParameter,t);l=n[2]}const u=r.map(((e,t)=>new d.A({key:String(t),text:e}))),f=e.services?.portal??c.A.getDefault(),g=new p.A({to:a,contents:u,from:l,portalUrl:f.url}),S=new Map;let T=null;if(null!=e.lrucache){const t=e.lrucache;T??=b(g),g.contents=g.contents?.filter((e=>{const n=t.getCachedTranslation(T,e.text);return null==n||(S.set(e.key,{...n,key:e.key,text:e.text}),!1)}))}if(g.contents?.length){const t=e.services?.translation??new m(f,e.console),n=await t.translate(g);if(!n.success)return new i.A({success:!1});for(const t of n.results){const n=g.contents?.find((e=>e.key===t.key))?.text;if(null==n)throw new s.D$(null,s.TX.NeverReach,null);S.set(t.key,t),null!=e.lrucache&&(T??=b(g),e.lrucache.setCachedTranslation(T,n,{detectedLanguage:t.detectedLanguage,translation:t.translation}))}}const v=Array.from(u,(t=>{const n=y.A.fromJSON(S.get(t.key));if(null==n)throw new s.D$(null,s.TX.NeverReach,null);return n.text=t.text,i.A.convertJsonToArcade(n.toJSON(),e.timeZone??"system",!0)}));return new i.A({success:!0,results:v})}))})}const w=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:T,PortalTranslationService:m,getTranslateParametersKey:b,registerFunctions:v},Symbol.toStringTag,{value:"Module"}))},6800:(e,t,n)=>{n.d(t,{G:()=>l,y:()=>o});var r=n(99719),i=n(78878),s=n(54218);function o(e){a=e}let a;function l(e){return null===e?null:(0,i.g)(e)?e.clone():(0,i.d)(e)?e:(0,i.l)(e)?e.clone():(0,i.m)(e)?e.toArray().map((e=>l(e))):(0,s.cy)(e)?e.map((e=>l(e))):(0,i.n)(e)?a.createFromArcadeFeature(e):(0,i.o)(e)||(0,i.p)(e)?e:(0,i.q)(e)||"esri.arcade.Attachment"===e?.declaredClass?e.deepClone():("esri.arcade.Portal"===e?.declaredClass||(0,i.r)(e)||e instanceof r.x||(0,i.i)(e),e)}},7335:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(93818),i=n(84939);class s extends r.A{constructor(e,t,n,r,i){super(e),this._lazyPath=[],this._hasZ=!1,this._hasM=!1,this._hasZ=n,this._hasM=r,this._spRef=t,this._cacheId=i}get(e){if(void 0===this._lazyPath[e]){const t=this._elements[e];if(void 0===t)return;this._lazyPath[e]=new i.A(t,this._spRef,this._hasZ,this._hasM,this._cacheId,e)}return this._lazyPath[e]}equalityTest(e){return e===this||null!==e&&e instanceof s!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()}}},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>a,qg:()=>c});var r=n(799),i=n(73444);const s={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,i.JK)()){let t=(e=e.toLowerCase())in s;if(!t){const n=e.split("-");n.length>1&&n[0]in s&&(e=n[0],t=!0),t||(e="en")}const[n,r,o="#,##0.###"]=s[e];return{decimal:n,group:r,pattern:o}}function a(e,t){const n=o((t={...t}).locale);t.customs=n;const r=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const r=(n=n||{}).customs.group,i=n.customs.decimal,s=t.split(";"),o=s[0];if((t=s[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let s=n.places;i?s=n.places.slice(i+1):+s>=0||(s=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(s))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(r[1]||n.places){i&&(n.places=n.places.slice(0,Math.max(0,i)));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+s<a.length&&(o[1]=a.slice(0,Math.max(0,Number(s))))}else o[1]&&o.pop();const l=r[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let c,f,d=r[0].lastIndexOf(",");if(-1!==d){c=r[0].length-d-1;const e=r[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(f=e.length-d-1)}const p=[];for(let e=o[0];e;){const t=e.length-c;p.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",f&&(c=f,f=void 0)}return o[0]=p.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:i,group:r,places:n.places,round:n.round}))}(e,r,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,i=t.group,s=t.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,(t=>(t="(?:"+(0,r.Cj)(t,".")+")").replace(l,(t=>{const n={signed:!1,separator:e.strict?i:[i,""],fractional:e.fractional,decimal:s,exponent:!1},r=t.split(".");let o=e.places;1===r.length&&1!==a&&(r[1]="###"),1===r.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?r[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<r[1].length&&(o+=","+r[1].length),n.places=o);const l=r[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=f(e),n=d(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let r=t+n;return n&&(r="(?:(?:"+r+")|(?:"+n+"))"),r+d(e.exponent,(t=>t?"([eE]"+f({signed:e.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:s,factor:a}}function c(e,t){const n=u(t),r=new RegExp("^"+n.regexp+"$").exec(e);if(!r)return NaN;let i=r[1];if(!r[1]){if(!r[2])return NaN;i=r[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function f(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,r.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,i=e.groupSize2;if(i){const e="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*["+t+"]\\d{"+n+"})";return n-i>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"}),!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return p(r.join("|"),Boolean(n))},p=(e,t)=>"("+(t?"?:":"")+e+")"},14942:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(90237),i=n(25482),s=n(10107),o=n(40608);let a=class extends i.A{constructor(e){super(e),this.text=null,this.detectedLanguage="en",this.detectedLanguageScore=-1}};(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"key",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"text",void 0),(0,r._)([(0,s.MZ)({type:String,json:{read:{source:"detectedLanguage.language"},write:{target:"detectedLanguage.language"}}})],a.prototype,"detectedLanguage",void 0),(0,r._)([(0,s.MZ)({type:Number,json:{read:{source:"detectedLanguage.score"},write:{target:"detectedLanguage.score"}}})],a.prototype,"detectedLanguageScore",void 0),(0,r._)([(0,s.MZ)({type:Object,json:{write:!0}})],a.prototype,"translation",void 0),a=(0,r._)([(0,o.$)("esri.rest.support.TranslateResult")],a)},20437:(e,t,n)=>{n.d(t,{A:()=>h});var r,i=n(90237),s=n(66552),o=n(25482),a=n(10107),l=n(56507),u=(n(44208),n(87811),n(93223)),c=n(36005),f=n(40608),d=n(80451),p=n(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=class extends o.A{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i._)([(0,a.MZ)()],h.prototype,"description",void 0),(0,i._)([(0,c.w)("description")],h.prototype,"readDescription",null),(0,i._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],h.prototype,"domain",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i._)([(0,u.e)(p.m)],h.prototype,"type",void 0),(0,i._)([(0,a.MZ)()],h.prototype,"valueType",void 0),(0,i._)([(0,c.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=r=(0,i._)([(0,f.$)("esri.layers.support.Field")],h)},24097:(e,t,n)=>{n.d(t,{K:()=>r});const r={type:String,json:{read:{source:"token"},write:{target:"token"}}}},33325:(e,t,n)=>{n.d(t,{$P:()=>p,At:()=>v,J6:()=>i,JB:()=>A,Lk:()=>y,NI:()=>N,Qi:()=>w,eB:()=>_,eg:()=>g,f0:()=>m,gO:()=>b,ik:()=>S,ke:()=>f,nE:()=>d,rX:()=>h,yT:()=>T,zl:()=>r});var r,i,s,o=n(66131),a=n(44729),l=n(15032),u=n(20437),c=n(96285);function f(e){return u.A.fromJSON(e.toJSON())}function d(e){return e.toJSON?e.toJSON():e}function p(e){return e instanceof Date}function y(e){return e instanceof c.c9}function h(e){return e instanceof o.lY}function m(e){return e instanceof a.n}function g(e){return e instanceof l.k}(s=r||(r={}))[s.Standardised=0]="Standardised",s[s.StandardisedNoInterval=1]="StandardisedNoInterval",s[s.SqlServer=2]="SqlServer",s[s.Oracle=3]="Oracle",s[s.Postgres=4]="Postgres",s[s.PGDB=5]="PGDB",s[s.FILEGDB=6]="FILEGDB",s[s.NotEvaluated=7]="NotEvaluated",function(e){e[e.InFeatureSet=0]="InFeatureSet",e[e.NotInFeatureSet=1]="NotInFeatureSet",e[e.Unknown=2]="Unknown"}(i||(i={}));const b=1e3,S={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},T={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},v={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function w(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function A(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},s={key:n,value:e[n]};return i(r,s)}});var i;const s=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(s.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const a=s.push(t)-1,l=Object.keys(t).sort(r?.(t));for(o="",i=0;i<l.length;i++){const n=l[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return s.splice(a,1),"{"+o+"}"}(e)}function N(e){switch(e.type){case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"subtype-group":case"wfs":return!0;default:return!1}}function _(e){switch(e.type){case"catalog-footprint":case"subtype-sublayer":return!0;default:return N(e)}}},39357:(e,t,n)=>{n.d(t,{H:()=>l});var r,i=n(90237),s=n(25482),o=n(10107),a=(n(44208),n(53966),n(87811),n(40608));let l=r=class extends s.A{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,i._)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=r=(0,i._)([(0,a.$)("esri.layers.support.CodedValue")],l)},45475:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(78888),i=n(2272),s=n(14942);async function o(e,t,n){const o=t.toJSON();o.contents=JSON.stringify(o.contents),o.token=await(0,i.gf)(t.portalUrl,t.apiKey,{signal:n?.signal,prompt:"no-prompt"!==n?.authMode});const a=(0,i.Dl)(e),l=(0,i.jV)(a.query,{...n,query:o,method:"post",authMode:"anonymous"});return(await(0,r.A)(a.path,l)).data.results.map((e=>s.A.fromJSON(e)))}},48938:(e,t,n)=>{n.d(t,{X:()=>i,_:()=>s});var r=n(85935);function i(e){if("string"==typeof e)return e.toLowerCase();if("name"in e)return e.name.toLowerCase();if("string"!=typeof e.value)throw new r.D$(null,r.TX.InvalidIdentifier,null);return e.value.toLowerCase()}const s=Object.freeze({aborted:!1})},53177:(e,t,n)=>{n.d(t,{A:()=>f});var r,i=n(90237),s=n(4718),o=n(10107),a=(n(44208),n(53966),n(93223)),l=n(40608),u=n(39357),c=n(76357);let f=class extends c.A{static{r=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,o.MZ)({type:[u.H],json:{write:{isRequired:!0}}})],f.prototype,"codedValues",void 0),(0,i._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=r=(0,i._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f)},62791:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),i=n(25482),s=n(10107),o=n(40608),a=n(24097),l=n(67090);let u=class extends i.A{constructor(e){super(e),this.to=null,this.contents=null,this.portalUrl="https://www.arcgis.com",this.translator="esri",this.from=null,this.apiKey=null}};(0,r._)([(0,s.MZ)({type:[String],json:{write:!0}})],u.prototype,"to",void 0),(0,r._)([(0,s.MZ)({type:[l.A],json:{write:!0}})],u.prototype,"contents",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"portalUrl",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0,default:"esri"}})],u.prototype,"translator",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"from",void 0),(0,r._)([(0,s.MZ)(a.K)],u.prototype,"apiKey",void 0),u=(0,r._)([(0,o.$)("esri.rest.support.TranslateParameters")],u)},66395:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(66131),i=n(6800),s=n(85935),o=n(78878),a=n(91075),l=n(54218);function u(e,t,n=!1,r=!1){if(null==e)return null;if((0,l.Et)(e))return(0,o.t)(e);if((0,l.Lm)(e))return(0,o.e)(e);if((0,l.Kg)(e))return(0,o.f)(e);if((0,o.g)(e))return(0,o.h)(e,t);if((0,o.j)(e))return e;if((0,o.k)(e))return e;if((0,l.cy)(e)){const i=[];for(const s of e)i.push(u(s,t,n,r));return i}if(r&&(0,o.l)(e))return e;const i=new c;i.immutable=!1;for(const s of Object.keys(e)){const o=e[s];void 0!==o&&i.setField(s,u(o,t,n,r))}return i.immutable=n,i}class c{constructor(e){this.declaredClass="esri.arcade.Dictionary",this.plain=!1,this.immutable=!0,this.attributes=e instanceof c?e.attributes:e??{}}field(e){const t=e.toLowerCase(),n=this.attributes[e];if(void 0!==n)return n;for(const e in this.attributes)if(e.toLowerCase()===t)return this.attributes[e];throw new s.D$(null,s.TX.FieldNotFound,null,{key:e})}setField(e,t){if(this.immutable)throw new s.D$(null,s.TX.Immutable,null);if((0,o.i)(t))throw new s.D$(null,s.TX.NoFunctionInDictionary,null);const n=e.toLowerCase();if(t instanceof Date&&(t=r.lY.dateJSToArcadeDate(t)),void 0===this.attributes[e]){for(const e in this.attributes)if(e.toLowerCase()===n)return void(this.attributes[e]=t);this.attributes[e]=t}else this.attributes[e]=t}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const e in this.attributes)if(e.toLowerCase()===t)return!0;return!1}keys(){let e=[];for(const t in this.attributes)e.push(t);return e=e.sort(),e}castToText(e=!1){return(0,o.c)(this.attributes,{useNumbersForDates:e})}static convertObjectToArcadeDictionary(e,t,n=!0,r=!1){const i=new c;i.immutable=!1;for(const s in e){const o=e[s];void 0!==o&&i.setField(s.toString(),u(o,t,n,r))}return i.immutable=n,i}static convertJsonToArcade(e,t,n=!1,r=!1){return u(e,t,n,r)}castAsJson(e=null){const t={};for(let n in this.attributes){const r=this.attributes[n];void 0!==r&&(e?.keyTranslate&&(n=e.keyTranslate(n)),t[n]=(0,o.a)(r,e))}return t}async castDictionaryValueAsJsonAsync(e,t,n,r=null,i){const s=await(0,o.b)(n,r,i);return e[t]=s,s}async castAsJsonAsync(e=null,t=null){const n={},i=[];for(let s in this.attributes){const l=this.attributes[s];t?.keyTranslate&&(s=t.keyTranslate(s)),void 0!==l&&((0,o.d)(l)||l instanceof a.A||l instanceof r.lY?n[s]=(0,o.a)(l,t):i.push(this.castDictionaryValueAsJsonAsync(n,s,l,e,t)))}return i.length>0&&await Promise.all(i),n}deepClone(){const e=new c;e.immutable=!1;for(const t of this.keys())e.setField(t,(0,i.G)(this.field(t)));return e}}},67090:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(90237),i=n(25482),s=n(10107),o=n(40608);let a=class extends i.A{constructor(e){super(e)}};(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"key",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"text",void 0),a=(0,r._)([(0,o.$)("esri.rest.support.TranslateContent")],a)},76357:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(90237),i=n(66552),s=n(25482),o=n(10107),a=(n(44208),n(53966),n(87811),n(93223)),l=n(40608);const u=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,a.e)(u),(0,o.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,r._)([(0,l.$)("esri.layers.support.Domain")],c)},78878:(e,t,n)=>{n.d(t,{$:()=>Je,A:()=>oe,B:()=>De,C:()=>G,D:()=>W,E:()=>we,F:()=>he,G:()=>Ne,H:()=>_e,I:()=>O,J:()=>xe,K:()=>j,L:()=>Re,M:()=>Fe,N:()=>P,O:()=>re,P:()=>ee,Q:()=>Ie,R:()=>Z,S:()=>Ge,T:()=>Pe,U:()=>Ee,V:()=>je,W:()=>me,X:()=>V,Y:()=>C,Z:()=>Ve,_:()=>ue,a:()=>ke,a0:()=>Oe,a1:()=>Se,a2:()=>ge,a3:()=>be,b:()=>Ce,c:()=>ae,d:()=>I,e:()=>ye,f:()=>le,g:()=>U,h:()=>pe,i:()=>L,j:()=>X,k:()=>H,l:()=>R,m:()=>B,n:()=>E,o:()=>q,p:()=>z,q:()=>K,r:()=>Y,s:()=>ce,t:()=>de,u:()=>Ke,v:()=>D,w:()=>k,x:()=>M,y:()=>$,z:()=>se});var r=n(92602),i=n(70333),s=n(66131),o=n(99719),a=n(85935),l=n(92400),u=n(93818),c=n(7335),f=n(84939),d=n(33325),p=n(14607),y=n(44729),h=n(15032),m=n(5443),g=n(91075),b=n(48526),S=n(86738),T=n(39829),v=n(82799),w=n(16930),A=n(95108),N=n(65864),_=n(73444),x=n(54218),F=n(96285);class Z{constructor(e){this.value=e}}class O{constructor(e){this.value=e}}const D={type:"VOID"},k=Symbol("BREAK"),M=Symbol("CONTINUE");function C(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function L(e){return e instanceof l.fF}function J(e){return e instanceof o.x}function I(e){return!!((0,x.Kg)(e)||(0,x.Et)(e)||U(e)||X(e)||H(e)||(0,x.Lm)(e)||null===e||e===D||"number"==typeof e)}function j(e,t){return void 0===e?t:e}function P(e){return null==e?"":(0,x.cy)(e)||B(e)?"Array":U(e)?"Date":H(e)?"Time":X(e)?"DateOnly":(0,x.Kg)(e)?"String":(0,x.Lm)(e)?"Boolean":(0,x.Et)(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":Y(e)?"KnowledgeGraph":e instanceof o.x?"Module":E(e)?"Feature":e instanceof S.A?"Point":e instanceof T.A?"Polygon":e instanceof v.A?"Polyline":e instanceof b.A?"Multipoint":e instanceof m.A?"Extent":L(e)?"Function":z(e)?"FeatureSet":q(e)?"FeatureSetCollection":V(e)?"Voxel":e===D?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function G(e){return e===D}function R(e){return e instanceof g.A}function E(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function V(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function z(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function K(e){return"esri.arcade.Dictionary"===e?.declaredClass}function $(e){return K(e)||E(e)||V(e)}function q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function Y(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function B(e){return e instanceof u.A}function U(e){return e instanceof s.lY}function X(e){return e instanceof y.n}function H(e){return e instanceof h.k}function Q(e){return null!=e&&"object"==typeof e}function W(e,t,n,r,i){if(e.length<t||e.length>n)throw new a.D$(r,a.TX.WrongNumberOfParameters,i)}function ee(e){return e<0?-Math.round(-e):Math.round(e)}function te(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=C(t,"‰",""),t=C(t,"¤",""),(0,p.GP)(e,{pattern:t}))}function ne(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(re(t),{locale:(0,_.JK)(),numberingSystem:"latn"})}function re(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function ie(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function se(e,t,n){if(null===e){if(null===t||t===D)return ie(null,null,n);if((0,x.Et)(t))return ie(0,t,n);if((0,x.Kg)(t))return ie(0,de(t),n);if((0,x.Lm)(t))return ie(0,de(t),n);if(U(t))return ie(0,t.toNumber(),n);if(H(t))return ie(e,t.toNumber(),n);if(X(t))return ie(e,t.toNumber(),n)}if(e===D){if(null===t||t===D)return ie(null,null,n);if((0,x.Et)(t))return ie(0,t,n);if((0,x.Kg)(t))return ie(0,de(t),n);if((0,x.Lm)(t))return ie(0,de(t),n);if(U(t))return ie(0,t.toNumber(),n);if(H(t))return ie(e,t.toNumber(),n);if(X(t))return ie(e,t.toNumber(),n)}else if((0,x.Et)(e)){if((0,x.Et)(t))return ie(e,t,n);if((0,x.Lm)(t))return ie(e,de(t),n);if(null===t||t===D)return ie(e,0,n);if((0,x.Kg)(t))return ie(e,de(t),n);if(U(t))return ie(e,t.toNumber(),n);if(H(t))return ie(e,t.toNumber(),n);if(X(t))return ie(e,t.toNumber(),n)}else if((0,x.Kg)(e)){if((0,x.Kg)(t))return ie(le(e),le(t),n);if(U(t))return ie(de(e),t.toNumber(),n);if(H(t))return ie(de(e),t.toNumber(),n);if(X(t))return ie(de(e),t.toNumber(),n);if((0,x.Et)(t))return ie(de(e),t,n);if(null===t||t===D)return ie(de(e),0,n);if((0,x.Lm)(t))return ie(de(e),de(t),n)}else if(U(e)){if(U(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=s.lY.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=s.lY.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),ie(e.toNumber(),t.toNumber(),n);if(null===t||t===D)return ie(e.toNumber(),0,n);if((0,x.Et)(t))return ie(e.toNumber(),t,n);if((0,x.Lm)(t))return ie(e.toNumber(),de(t),n);if((0,x.Kg)(t))return ie(e.toNumber(),de(t),n);if(H(t))throw new a.D$(null,a.TX.CannotCompareDateAndTime,null);if(X(t))return ie(e.toNumber(),t.toNumber(),n)}else if((0,x.Lm)(e)){if((0,x.Lm)(t))return ie(e,t,n);if((0,x.Et)(t))return ie(de(e),de(t),n);if(U(t))return ie(de(e),t.toNumber(),n);if(H(t))return ie(de(e),t.toNumber(),n);if(X(t))return ie(de(e),t.toNumber(),n);if(null===t||t===D)return ie(de(e),0,n);if((0,x.Kg)(t))return ie(de(e),de(t),n)}else if(X(e)){if(U(t))return ie(e.toNumber(),t.toNumber(),n);if(null===t||t===D)return ie(e.toNumber(),0,n);if((0,x.Et)(t))return ie(e.toNumber(),t,n);if((0,x.Lm)(t))return ie(e.toNumber(),de(t),n);if((0,x.Kg)(t))return ie(e.toNumber(),de(t),n);if(H(t))throw new a.D$(null,a.TX.CannotCompareDateAndTime,null);if(X(t))return ie(e.toNumber(),t.toNumber(),n)}else if(H(e)){if(U(t))throw new a.D$(null,a.TX.CannotCompareDateAndTime,null);if(null===t||t===D)return ie(e.toNumber(),0,n);if((0,x.Et)(t))return ie(e.toNumber(),t,n);if((0,x.Lm)(t))return ie(e.toNumber(),de(t),n);if((0,x.Kg)(t))return ie(e.toNumber(),de(t),n);if(H(t))return ie(e.toNumber(),t.toNumber(),n);if(X(t))throw new a.D$(null,a.TX.CannotCompareDateAndTime,null)}return!!oe(e,t)&&("<="===n||">="===n)}function oe(e,t){if(e===t)return!0;if(null===e&&t===D||null===t&&e===D)return!0;if(U(e)&&U(t))return e.equals(t);if(H(e)&&H(t))return e.equals(t);if(X(e)&&X(t))return e.equals(t);if(e instanceof c.A)return e.equalityTest(t);if(e instanceof f.A)return e.equalityTest(t);if(e instanceof S.A&&t instanceof S.A){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(Q(e)&&Q(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ae(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":(0,x.Lm)(i)||(0,x.Et)(i)||(0,x.Kg)(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):R(i)?n+=JSON.stringify(r)+":"+ce(i):H(i)||X(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:B(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+ce(i,null,t):U(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function le(e,t){if((0,x.Kg)(e))return e;if(null===e)return"";if((0,x.Et)(e))return te(e,t);if((0,x.Lm)(e))return e.toString();if(U(e))return ne(e,t);if(H(e))return e.toFormat(t);if(X(e))return e.toFormat(t);if(e instanceof g.A)return JSON.stringify(e.toJSON());if((0,x.cy)(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=fe(e[n]);return"["+t.join(",")+"]"}if(e instanceof u.A){const t=[];for(let n=0;n<e.length();n++)t[n]=fe(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():L(e)?"object, Function":e===D?"":J(e)?"object, Module":""}function ue(e){const t=[];if(e instanceof u.A){for(let n=0;n<e.length();n++)t[n]=de(e.get(n));return t}if(!(0,x.cy)(e))return null;for(let n=0;n<e.length;n++)t[n]=de(e[n]);return t}function ce(e,t,n=!1){if((0,x.Kg)(e))return e;if(null===e)return"";if((0,x.Et)(e))return te(e,t);if((0,x.Lm)(e))return e.toString();if(U(e))return ne(e,t);if(H(e))return e.toFormat(t);if(X(e))return e.toFormat(t);if(e instanceof g.A)return e instanceof m.A?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+ve(e.spatialReference)+"}":ve(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if((0,x.cy)(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=fe(e[r],n);return"["+t.join(",")+"]"}if(e instanceof u.A){const t=[];for(let r=0;r<e.length();r++)t[r]=fe(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):L(e)?"object, Function":e===D?"":J(e)?"object, Module":""}function fe(e,t=!1){if(null===e)return"null";if((0,x.Lm)(e)||(0,x.Et)(e)||(0,x.Kg)(e))return JSON.stringify(e);if(e instanceof g.A)return ce(e,null,t);if(e instanceof u.A)return ce(e,null,t);if(Array.isArray(e))return ce(e,null,t);if(U(e))return t?JSON.stringify(e.getTime()):JSON.stringify(ne(e,""));if(H(e))return JSON.stringify(e.toString());if(X(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===D)return"null";return"null"}function de(e,t){return(0,x.Et)(e)?e:null===e||""===e?0:U(e)||X(e)||H(e)?NaN:(0,x.Lm)(e)?e?1:0:(0,x.cy)(e)||""===e||void 0===e?NaN:void 0!==t&&(0,x.Kg)(e)?(t=C(t,"‰",""),t=C(t,"¤",""),(0,p.qg)(e,{pattern:t})):e===D?0:Number(e)}function pe(e,t){if(U(e))return e;if((0,x.Kg)(e)){const n=function(e,t){const n=/ (\d\d)/,r=(0,s.mT)(t);let i=F.c9.fromISO(e,{zone:r});return i.isValid||n.test(e)&&(e=e.replace(n,"T$1"),i=F.c9.fromISO(e,{zone:t}),i.isValid)?i:null}(e,t);if(n)return s.lY.dateTimeToArcadeDate(n)}return null}function ye(e){return(0,x.Lm)(e)?e:(0,x.Kg)(e)?"true"===(e=e.toLowerCase()):!!(0,x.Et)(e)&&0!==e&&!isNaN(e)}function he(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function me(e){if(null===e)return null;if(e instanceof S.A)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof T.A){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof v.A){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof b.A?0===e.points.length?null:e:e instanceof m.A?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function ge(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(U(t))n=t.toNumber();else if(X(t))n=t.toString();else if(H(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=le(t);else{if(null==t)return null;if(""===t)return t;n=de(t)}for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.code===n&&(r=i)}return null===r?le(t):r.name}function be(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=le(t);for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.name===r&&(n=i)}return null===n?t:n.code}function Se(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,s,o=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(o=r)}if(null===o)throw new a.D$(null,a.TX.FieldNotFound,null,{key:e});let l=t.typeIdField,u="id",c=t.types;if(t.subtypeField&&(l=t.subtypeField,u="code",c=t.subtypes??[]),null===r&&n&&l)r=n.hasField(l)?n.field(l):null;else if(l&&null!==r){let e=!1;for(const t of c||[])if(r===t[u]){e=!0;break}if(!e)for(const t of c||[])if(r===t.name){r=t[u],e=!0;break}e||(r=null,n&&l&&(r=n.hasField(l)?n.field(l):null))}return null!=r&&c.some((e=>e[u]===r&&(i=e.domains?.[o.name],i&&"inherited"===i.type&&(i=Te(o.name,t),s=!0),!0))),s||i||(i=Te(e,t)),{field:o,domain:i}}function Te(e,t){let n;return t.fields.some((t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n))),n}function ve(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},s={key:n,value:e[n]};return i(r,s)}});var i;const s=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(s.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const a=s.push(t)-1,l=Object.keys(t).sort(r?.(t));for(o="",i=0;i<l.length;i++){const n=l[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return s.splice(a,1),"{"+o+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const n of e)E(n)?t.push(n.geometry()):t.push(n);return t}function Ae(e,t){if(!(t instanceof S.A))throw new a.D$(null,a.TX.InvalidParameter,null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Ne(e,t){if((0,x.cy)(e)||B(e)){let n=!1,r=!1,i=[],s=t;if((0,x.cy)(e)){for(const t of e)Ae(i,t);i.length>0&&(s=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else{if(!B(e))throw new a.D$(null,a.TX.InvalidParameter,null);for(const t of e.toArray())Ae(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:((0,A.$3)(i)||(i=i.slice().reverse()),new T.A({rings:[i],spatialReference:s,hasZ:n,hasM:r}))}return e}function _e(e,t){if((0,x.cy)(e)||B(e)){let n=!1,r=!1,i=[],s=t;if((0,x.cy)(e)){for(const t of e)Ae(i,t);i.length>0&&(s=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else if(B(e)){for(const t of e.toArray())Ae(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new v.A({paths:[i],spatialReference:s,hasZ:n,hasM:r})}return e}function xe(e,t){if((0,x.cy)(e)||B(e)){let n=!1,r=!1,i=[],s=t;if((0,x.cy)(e)){for(const t of e)Ae(i,t);i.length>0&&(s=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else if(B(e)){for(const t of e.toArray())Ae(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new b.A({points:i,spatialReference:s,hasZ:n,hasM:r})}return e}function Fe(e,t=!0){if(null==e)return[];if((0,x.cy)(e)){const n=[];for(const r of e){const e=le(r);(t||""!==e)&&n.push(e)}return n}if(B(e)){const n=[];for(let r=0;r<e.length();r++){const i=le(e.get(r));(t||""!==i)&&n.push(i)}return n}if(I(e)){const n=le(e);if(t||""!==n)return[n]}return[]}let Ze=0;function Oe(e){return Ze++,Ze%100==0?(Ze=0,new Promise((t=>{setTimeout((()=>{t(e)}),0)}))):e}function De(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function ke(e,t=null){return null==e?null:(0,x.Lm)(e)||(0,x.Et)(e)||(0,x.Kg)(e)?e:e instanceof g.A?!0===t?.keepGeometryType?e:e.toJSON():e instanceof u.A?e.toArray().map((e=>ke(e,t))):Array.isArray(e)?e.map((e=>ke(e,t))):(0,x.$P)(e)?e:U(e)?e.toJSDate():H(e)?e.toString():X(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Me(e,t,n,r,i){const s=await Ce(e,t,n);i[r]=s}async function Ce(e,t=null,n=null){if(e instanceof u.A&&(e=e.toArray()),null==e)return null;if(I(e)||e instanceof g.A||(0,x.$P)(e)||U(e))return ke(e,n);if(Array.isArray(e)){const r=[],i=[];for(const s of e)null===s||I(s)||s instanceof g.A||(0,x.$P)(s)||U(s)?i.push(ke(s,n)):(i.push(null),r.push(Me(s,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function Le(e){return Je(e)?e.parent:e}function Je(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function Ie(e,t,n){const r=Le(e.fullSchema());return null===r?null:r.fields?Se(t,r,e,n):null}function je(e){const t=Le(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map((e=>({name:e.name,code:e.code}))):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null:null}function Pe(e,t,n,r){const i=Le(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const s=Se(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(e){return null}return ge(s,n)}function Ge(e,t,n,r){const i=Le(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(e){return null}return n}return be(Se(t,i,e,r),n)}function Re(e){return e?.timeZone??"system"}function Ee(e){const t=Le(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const e of t.fields)n.push((0,d.nE)(e));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===d.yT[t.geometryType]?"":d.yT[t.geometryType],fields:n}}function Ve(e,t){const n=s.lY.systemTimeZoneCanonicalName;return"system"===e&&(e=n),{version:ze,engineVersion:i.rE,timeZone:e,userTimeZone:n,spatialReference:t instanceof w.A?t.toJSON():t,application:r.A.applicationName??"",engine:"web",locale:(0,_.JK)()}}const ze="1.32",Ke=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:O,ReturnResult:Z,absRound:ee,arcadeVersion:ze,autoCastArrayOfPointsToMultiPoint:xe,autoCastArrayOfPointsToPolygon:Ne,autoCastArrayOfPointsToPolyline:_e,autoCastFeatureToGeometry:we,binaryOperator:De,breakResult:k,castAsJson:ke,castAsJsonAsync:Ce,castRecordToText:ae,continueResult:M,defaultExecutingContext:Ve,defaultTimeZone:Re,defaultUndefined:j,equalityTest:oe,featureDomainCodeLookup:Ge,featureDomainValueLookup:Pe,featureFullDomain:Ie,featureSchema:Ee,featureSubtypes:je,fixNullGeometry:me,fixSpatialReference:he,formatDate:ne,formatNumber:te,getDomain:Se,getDomainCode:be,getDomainValue:ge,getType:P,greaterThanLessThan:se,isArray:x.cy,isBoolean:x.Lm,isDate:U,isDateOnly:X,isDictionary:K,isDictionaryLike:$,isFeature:E,isFeatureSet:z,isFeatureSetCollection:q,isFunctionParameter:L,isGeometry:R,isGraphic:x.DU,isImmutableArray:B,isInteger:x.Fq,isJsDate:x.$P,isKnowledgeGraph:Y,isModule:J,isNumber:x.Et,isObject:Q,isSimpleType:I,isString:x.Kg,isSubtypeGrouplayer:function(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass},isSubtypeSublayer:Je,isTime:H,isVoid:G,isVoxel:V,multiReplace:C,parseGeometryFromJson:function(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),(0,N.rS)(n)},pcCheck:W,stableStringify:ve,standardiseDateFormat:re,tick:Oe,toBoolean:ye,toDate:pe,toNumber:de,toNumberArray:ue,toString:le,toStringArray:Fe,toStringExplicit:ce,voidOperation:D},Symbol.toStringTag,{value:"Module"}))},80451:(e,t,n)=>{n.d(t,{rS:()=>y,gK:()=>p}),n(44208);var r,i=n(53177),s=n(76357),o=n(90237),a=(n(53966),n(87811),n(49186),n(93223)),l=n(40608);let u=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o._)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],u);var c,f=n(10107);let d=class extends s.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,f.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]},isRequired:!0}}})],d.prototype,"maxValue",void 0),(0,o._)([(0,f.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],d.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],d.prototype,"type",void 0),d=c=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],d);const p={key:"type",base:s.A,typeMap:{range:d,"coded-value":i.A,inherited:u}};function y(e){if(!e?.type)return null;switch(e.type){case"range":return d.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},84939:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(93818),i=n(86738);class s extends r.A{constructor(e,t,n,r,i,s){super(e),this._lazyPt=[],this._hasZ=!1,this._hasM=!1,this._spRef=t,this._hasZ=n,this._hasM=r,this._cacheId=i,this._partId=s}get(e){if(void 0===this._lazyPt[e]){const t=this._elements[e];if(void 0===t)return;const n=new i.A(t[0],t[1],this._spRef);this._hasZ&&(n.z=t[2]),this._hasM&&(n.m=this._hasZ?t[3]:t[2]),n.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+e.toString(),this._lazyPt[e]=n}return this._lazyPt[e]}equalityTest(e){return e===this||null!==e&&e instanceof s!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()+"-"+this._partId.toString()}}},92400:(e,t,n)=>{n.d(t,{CU:()=>a,UQ:()=>o,fF:()=>i,o6:()=>s});var r=n(74887);class i{constructor(){}}function s(e,t,n){if(e instanceof i&&!(e instanceof a)){const r=new a;return r.fn=e,r.parameterEvaluator=n,r.context=t,r}return e}class o extends i{constructor(e){super(),this.fn=e}createFunction(e){return(...t)=>this.fn(e,{preparsed:!0,arguments:t})}call(e,t){return this.fn(e,t)}marshalledCall(e,t,n,o){return o(e,t,((t,l,u)=>{u=u.map((t=>t instanceof i&&!(t instanceof a)?s(t,e,o):t));const c=this.call(n,{args:u});return(0,r.$X)(c)?c.then((e=>s(e,n,o))):c}))}}class a extends i{constructor(){super(...arguments),this.fn=null,this.context=null}createFunction(e){return this.fn.createFunction(this.context)}call(e,t){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}marshalledCall(e,t,n){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}}},93818:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(e=[]){this._elements=e}length(){return this._elements.length}get(e){return this._elements[e]}toArray(){return this.slice()}slice(e=0,t=this.length()){const n=[];for(let r=e;r<t;r++)n.push(this.get(r));return n}}},99719:(e,t,n)=>{n.d(t,{x:()=>r});class r{}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4342,5952],{22671:(e,t,i)=>{i.d(t,{A:()=>v});var r,o=i(90237),n=i(52106),s=i(66552),a=i(25482),l=i(4718),p=i(10107),c=(i(44208),i(53966),i(36005)),u=i(40608),d=i(43937),y=i(16930),h=i(65864),f=i(50498),m=i(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[n,s]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const p=this._getHydrationFunction(e,(e=>e*n+r),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const n=e[t],s=i.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,p=s.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(s)}return o}_quantizePoints(e,t,i){let r,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=i(a[1]);e===r&&s===o||(n.push([e-r,s-o]),r=e,o=s)}else r=t(a[0]),o=i(a[1]),n.push([r,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],s=this._quantizePoints(n,t,i);s&&o.push(s)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=i(a)}}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=i(a)}if(r&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,u.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},32756:(e,t,i)=>{i.d(t,{Rr:()=>l,fY:()=>c,ne:()=>p});var r=i(90237),o=i(93637),n=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),a=i(91880);function l(e,t,i){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const o=new a.A;return o.read(r,i),[o]}const p={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,i,r){const n=e.find((e=>!!e.field));n&&(0,o.sM)(i,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,n.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),o=i(69540),n=i(25482),s=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),p=i(43937),c=i(80451),u=i(29005);let d=class extends(o.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,s.MZ)({type:[u.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,l.$)("esri.layers.support.FeatureType")],d)},46140:(e,t,i)=>{i.d(t,{R:()=>o});var r=i(49186);let o=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}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+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}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,i=""){const[o,n]=t.split("."),s=/^\s*\d+\s*$/;if(!o?.match||!s.test(o))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!s.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(o,10),l=parseInt(n,10);return new e(a,l,i)}}},55674:(e,t,i)=>{i.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>h});var r=i(66131),o=i(49186),n=(i(44208),i(44729)),s=i(15032),a=i(65864),l=i(95466),p=i(43668),c=i(98623);const u=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const i of u)t.hasArcadeDependency(i)&&e.add(i);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,i){return f.create(e,t,i,["$feature","$view","$config"])}class f{static async create(e,t,i,r){const{arcade:n,Dictionary:s}=await(0,p.l)();let a;try{a=n.parseScript(e)}catch(t){throw new o.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:r.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},u=n.compileScript(a,c);let d=null;null!=i&&(d=new s(i),d.immutable=!0);const y=new s;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,u,t,y,d,s)}constructor(e,t,i,r,o,n,s,a){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=o,this._viewDict=n,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,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 i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:o,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=o?null!=i?r.lY.epochToArcadeDate(o,i):r.lY.unknownEpochToArcadeDate(o):void 0,currentEnd:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):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:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{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,i){const r=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_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 i=this._getField(e);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(this._boundTarget.attributes[i.name]);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(this._boundTarget.attributes[i.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[i.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[i.name];return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[i.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 i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>o});var r=i(62815);function o(e,t,i){if(!i?.features||!i.hasZ)return;const o=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of i.features)o(e.geometry)}},73681:(e,t,i)=>{i.d(t,{n:()=>l});var r=i(49186),o=i(53966),n=i(46140),s=i(95466),a=i(55674);class l{static async from(e,t,i){const s=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),u={};if(t)for(const e in t)u[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)u.hasOwnProperty(t.name)||(u[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))d.delete(e);d.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,a.xR)(e.expression,null,u);if(!y)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!s||!s.greaterEqual(4,0);h&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const f=new p(i,h);return new l(h,c,y,f)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new s.A(t)}}class p 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]}}},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,o=i(90237),n=i(66552),s=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const p=new n.J({asc:"ascending",desc:"descending"});let c=class extends s.A{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,o._)([(0,a.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],c.prototype,"order",void 0),c=r=(0,o._)([(0,l.$)("esri.layers.support.OrderByInfo")],c)},97927:(e,t,i)=>{i.r(t),i.d(t,{default:()=>V});var r=i(90237),o=i(49186),n=i(4718),s=i(93637),a=i(10107),l=(i(44208),i(53966),i(40608)),p=i(13600),c=i(82935),u=i(66552),d=(i(28735),i(69540)),y=i(25482),h=(i(87811),i(69622)),f=i(21325);let m=class extends h.A{set horizontalWKID(e){e?(0,f.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,f.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&r?.length>1&&o?.length>1}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"horizontalWKID",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"verticalWKID",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"x",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"y",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"z",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"type",void 0),m=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientation")],m);const g=m;let v=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"heading",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationHPR")],v);const _=v;let w=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:r,squaredEccentricity:o,properties:n}=this,s=`${n}`.split("|");return s.splice(1,1),`${e}|${t}|${i}|${r}|${o}|${s.join("|")}`}};(0,r._)([(0,a.MZ)({json:{write:!0}})],w.prototype,"type",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"latitude",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"longitude",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"ellipsoidRadius",void 0),(0,r._)([(0,a.MZ)({json:{write:!0},type:Number})],w.prototype,"squaredEccentricity",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],w.prototype,"properties",void 0),w=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationLTP")],w);const b=w;let M=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],M.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],M.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"omega",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"phi",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"kappa",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"z",void 0),M=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationOPK")],M);const j=M;let x=class extends(d.A.ClonableMixin(y.A.JSONSupportMixin(g))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:r,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||r?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:c,principalOffsetPoint:u,radialDistortionCoefficients:d,tangentialDistortionCoefficients:y}=this,h=[e,t,i,r,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>h.push(e))),h.push(c),u?.forEach((e=>h.push(e))),u?.forEach((e=>h.push(e))),d?.forEach((e=>h.push(e))),y?.forEach((e=>h.push(e)))),h.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,r._)([(0,a.MZ)({json:{write:!0}})],x.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"affineTransformations",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"focalLength",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"principalOffsetPoint",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"radialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:[Number],json:{write:!0}})],x.prototype,"tangentialDistortionCoefficients",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"yaw",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"pitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"roll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"x",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"y",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"z",void 0),x=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.CameraOrientationYPR")],x);const Z=x;var S;!function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(S||(S={}));const T=new Map;T.set(`${S.OPK}`,{desc:"Using Omega Phi Kappa",constructor:j}),T.set(`${S.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:_}),T.set(`${S.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:Z}),T.set(`${S.LTP}`,{desc:"Using Local Tangent Plane",constructor:b});let P=class extends(d.A.ClonableMixin(y.A)){constructor(){super(...arguments),this.url=null}};(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],P.prototype,"lod",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"rasterFunction",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],P.prototype,"url",void 0),P=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],P);let N=class extends(d.A.ClonableMixin(y.A)){constructor(){super(...arguments),this.constantElevation=null}};function D(e,t,i){return e?null!=(r=e)&&"number"==typeof r.constantElevation?new N(e):function(e,t,i){let{url:r}=e;return r?(r=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(r,t,i),new P({...e,url:r})):null}(e,t,i):e;var r}(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],N.prototype,"constantElevation",void 0),N=(0,r._)([(0,l.$)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],N);const O=new u.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),I=new u.J({Feet:"feet",Meter:"meter"}),A=new u.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),F=new Map;F.set(`${S.HPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,heading:s,pitch:a,roll:l,...E([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),F.set(`${S.YPR}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,yaw:s,pitch:a,roll:l,...E([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),F.set(`${S.OPK}`,(function(e){const[t,i,r,o,n,s,a,l,p,c,u,d,y,h,f,m,g,v,_,w,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:r,y:o,z:n,omega:s,phi:a,kappa:l,...E([p,c,u,d,y,h],[m,g],[v,_,w],[b,M],f)}})),F.set(`${S.LTP}`,(function(e){const[t,i,r,o,n,...s]=e.slice(1),a=F.get(n),l=T.get(n)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:r,squaredEccentricity:o,properties:new l(a([n,"",...s]))}:null}));const R=e=>{const t=e.map((e=>parseFloat(e))).filter((e=>!isNaN(e)));if(t.length===e.length)return t};function E(e,t,i,r,o){const n=R(e),s=R(t),a=R(i),l=R(r);return{affineTransformations:6===n?.length?n:void 0,focalLength:6===n?.length?parseFloat(o):void 0,principalOffsetPoint:2!==s?.length?[0,0]:s,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}var $=i(43440),C=i(64272),z=i(92935);const L=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),q=(e,t)=>!L.has(t)&&e;function K(e,t,i,r){const{name:o,write:n,read:s}=((e,t,i)=>{const r=`orientedImageryProperties.${e}`;return{name:r,write:t?{ignoreOrigin:!0,target:r,writer:t}:{ignoreOrigin:!0},read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}})(e,t,i),a={name:o,write:n,read:s,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:q(n,e),read:q(s,e)},"web-map":{name:o,write:n,read:s}}};return r&&a.origins?(a.type=r,a.origins["web-map"].type=r,a.origins["web-scene"].type=r,a):a}let G=class extends p.default{constructor(){super(...arguments),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.useViewTime=!0,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return D(e,t,i)}async save(e){return this._debouncedSaveOperations(z.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(z.X.SAVE_AS,t,e)}findFirstValidLayerId(e){return e.layers?.find((e=>this.supportedSourceTypes.has(e.type)))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.A("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};var J;(0,r._)([(0,a.MZ)({type:$.A,json:{write:!1,read:!1}})],G.prototype,"attributeTableTemplate",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("cameraHeading")})],G.prototype,"cameraHeading",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("cameraHeight")})],G.prototype,"cameraHeight",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("cameraPitch")})],G.prototype,"cameraPitch",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("cameraRoll")})],G.prototype,"cameraRoll",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("coveragePercent")})],G.prototype,"coveragePercent",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("demPathPrefix")})],G.prototype,"demPathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("demPathSuffix")})],G.prototype,"demPathSuffix",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("depthImagePathPrefix")})],G.prototype,"depthImagePathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("depthImagePathSuffix")})],G.prototype,"depthImagePathSuffix",void 0),(0,r._)([(0,a.MZ)({type:Object,json:K("elevationSource")})],G.prototype,"elevationSource",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],G.prototype,"effectiveElevationSource",null),(0,r._)([(0,a.MZ)({type:Number,json:K("farDistance")})],G.prototype,"farDistance",void 0),(0,r._)([(0,a.MZ)()],G.prototype,"geometryType",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("horizontalFieldOfView")})],G.prototype,"horizontalFieldOfView",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("horizontalMeasurementUnit")})],G.prototype,"horizontalMeasurementUnit",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...K("imageGeometryField"),default:"ImageGeometry"}})],G.prototype,"imageGeometryField",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("imagePathPrefix")})],G.prototype,"imagePathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("imagePathSuffix")})],G.prototype,"imagePathSuffix",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...K("imageReferenceField"),default:"OIObjectID"}})],G.prototype,"imageReferenceField",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("imageRotation")})],G.prototype,"imageRotation",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("maximumDistance")})],G.prototype,"maximumDistance",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("nearDistance")})],G.prototype,"nearDistance",void 0),(0,r._)([(0,a.MZ)({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],G.prototype,"operationalLayerType",void 0),(0,r._)([(0,a.MZ)({json:{...K("orientationAccuracy",((e,t,i)=>{(0,s.sM)(i,e.join(";"),t)}),(e=>{const t=e?.split(";")?.map(Number);return function(e){return Array.isArray(e)&&9===e?.length&&!e.some(isNaN)}(t)?t:[0,0,0,0,0,0,0,0,0]}),String)}})],G.prototype,"orientationAccuracy",void 0),(0,r._)([(0,a.MZ)({json:{...K("orientedImageryType",A.write,A.read,A.jsonValues.slice(1))}})],G.prototype,"orientedImageryType",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...K("referenceIDField"),default:"OBJECTID"}})],G.prototype,"referenceIDField",void 0),(0,r._)([(0,a.MZ)({type:String,json:{...K("sequenceOrderField"),default:"SequenceOrder"}})],G.prototype,"sequenceOrderField",void 0),(0,r._)([(0,a.MZ)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],G.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:O.apiValues,json:{...K("timeIntervalUnit",O.write,O.read,O.jsonValues)}})],G.prototype,"timeIntervalUnit",void 0),(0,r._)([(0,a.MZ)((J=(0,n.o8)(c.B),J.json?(J.json.origins=J.json.origins??{},J.json.origins["web-scene"]={write:!1,read:!1},J):J))],G.prototype,"useViewTime",void 0),(0,r._)([(0,a.MZ)({type:Number,json:K("verticalFieldOfView")})],G.prototype,"verticalFieldOfView",void 0),(0,r._)([(0,a.MZ)({type:I.apiValues,json:{...K("verticalMeasurementUnit",I.write,I.read,I.jsonValues)}})],G.prototype,"verticalMeasurementUnit",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("videoPathPrefix")})],G.prototype,"videoPathPrefix",void 0),(0,r._)([(0,a.MZ)({type:String,json:K("videoPathSuffix")})],G.prototype,"videoPathSuffix",void 0),(0,r._)([(0,a.MZ)({type:C.T,json:{origins:{"web-scene":{write:!1,read:!1}}}})],G.prototype,"visibilityTimeExtent",void 0),G=(0,r._)([(0,l.$)("esri.layers.OrientedImageryLayer")],G);const V=G}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,2470,3186,3515,4342,4697],{10407:(e,t,r)=>{r.d(t,{It:()=>p,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>o,mm:()=>h,sQ:()=>d});var i=r(98988),s=r(16930),n=r(28735);function a(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,h.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?a(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,n.ci)(e);const r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const h={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 p(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!r&&!!s?.includes("features:user:fullEdit");const l="update"===i||"admin"===i;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},17311:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69622),n=r(60999),a=r(5503),l=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let d=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.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("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.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:i}=t,s=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:n}]=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,s).global;return n({attributes:i,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)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.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),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],s={};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{s[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const n={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:n,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,i._)([(0,l.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,i._)([(0,l.MZ)()],d.prototype,"_featureUtils",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,i._)([(0,l.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,i._)([(0,l.MZ)()],d.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,l.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,l.MZ)()],d.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)()],d.prototype,"fieldInfoMap",null),(0,i._)([(0,l.MZ)()],d.prototype,"fields",void 0),(0,i._)([(0,l.MZ)()],d.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],d.prototype,"requiredFields",null),d=(0,i._)([(0,o.$)("esri.layers.support.TitleCreator")],d)},22671:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(90237),n=r(52106),a=r(66552),l=r(25482),o=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937),p=r(16930),f=r(65864),y=r(50498),_=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=i=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,a]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*a),l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=p.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],a=r.fromJSON(n),l=n.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=i);const o=n.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(a)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=r(l[1]);e===i&&a===s||(n.push([e-i,a-s]),i=e,s=a)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],a=this._quantizePoints(n,t,r);a&&s.push(a)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(a+=i[0],l+=i[1]):(a=i[0],l=i[1]),i[0]=t(a),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[_.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,h.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:p.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,h.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=i=(0,s._)([(0,d.$)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},30235:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(52106),s=r(87449),n=r(11221),a=r(89169),l=r(33325),o=r(80609),u=r(39516),c=r(91075),d=r(13600),h=r(33143),p=r(20437);class f extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type||this._layer.objectIdField===r.name)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.zl.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,r,i,s){let n="",c=!1;if(null!==i&&(n=i.constructClause(),c=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const d=this._createQuery();d.where=(0,u.mA)(d.where,null===r?null===t?"1=1":"":(0,o.YY)(r,l.zl.Standardised)),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==n?n.split(","):null,d.geometry=null===t?null:t,d.relationParameter=this._makeRelationshipParam(e);const h=await this._layer.queryFeatures(d);if(null===h)return new a.A([],[],c,null);this._checkCancelled(s);const p=[];return h.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];p.push(t),this._featureCache[t]=this._changeFeature(e)})),new a.A([],p,c,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const r=t.attributes[this._layer.objectIdField];e.push(r),this._featureCache[r]=this._changeFeature(t)})),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),r=[];return t.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];r.push(t),this._featureCache[t]=this._changeFeature(e)})),this._wset=new a.A([],r,!1,null),this._wset}async _getFeatures(e,t,r){const i=[];-1!==t&&void 0===this._featureCache[t]&&i.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&i.push(e._known[s]),i.length>r)));s++);if(0===i.length)return"success";throw new s.dr(s.D_.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(h.A.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,s=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let r=0;r<a.length;r++)n.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),n[r].attributes[t]=r;a=n,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof p.A?o.push(t):o.push(p.A.fromJSON(t));let u=n;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:i,objectIdField:r,spatialReference:t},_="esriGeometryNull"===u||null===u;_||(y.geometryType=u);const g=new d.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._layer.queryFeatures(t);return 1===r.features.length?r.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,r)=>{r.d(t,{BI:()=>_,D3:()=>f,XJ:()=>y,lc:()=>p,mX:()=>m,rU:()=>g,tH:()=>S});var i=r(799);const s="__begin__",n="__end__",a=new RegExp(s,"ig"),l=new RegExp(n,"ig"),o=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',d=c+" + ",h=" + "+c;function p(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 y(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=p(e.labelExpression),t.type="conventional"),t}function _(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return m(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function m(e){let t;return e?(t=(0,i.HC)(e,(e=>s+'$feature["'+e+'"]'+n)),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,h)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=F.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var i=r(90237),s=r(93637),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function o(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new l.A;return s.read(i,r),[s]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,s.sM)(r,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),s=r(69540),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),c=r(80451),d=r(29005);let h=class extends(s.A.ClonableMixin(n.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,i._)([(0,a.MZ)({json:{write:!0}})],h.prototype,"id",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],h.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],h.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],h.prototype,"writeDomains",null),(0,i._)([(0,a.MZ)({type:[d.A],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,i._)([(0,o.$)("esri.layers.support.FeatureType")],h)},35704:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(87449),s=r(11221),n=r(89169),a=r(33325),l=r(80609),o=r(74887),u=r(88368),c=r(16930);class d extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.J6.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.J6.Unknown:t)}_getFeature(e,t,r){return this._parent._getFeature(e,t,r)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,r){const i=new n.A([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(i,-1,s,r)),this._checkCancelled(r),null==this._whereClauseFunction){for(let t=0;t<s;t++){const r=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(r)?this._idstates[e[t]]=a.J6.InFeatureSet:this._idstates[e[t]]=a.J6.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const r=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(r))}for(let r=0;r<t;r++)!0===l[r]?this._idstates[e[r]]=a.J6.InFeatureSet:this._idstates[e[r]]=a.J6.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,r,i,s){null!==this._whereClauseFunction||(null!==r?null!==this._whereclause&&(r=(0,l.kg)(this._whereclause,r)):r=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,r,i,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,r,i,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,s));const u=await this._parent._stat(e,t,r,i,o,n,a);return!1===u.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,r,i,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,r,i,s))}async _getAggregatePagesDataSourceDefinition(e,t,r,s,n,a,o){if(null===this._parent)throw new i.dr(i.D_.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,r,s,n,a,o)}static registerAction(){s.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new d({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new d({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,r)=>{r.d(t,{C_:()=>h,OH:()=>y,Vh:()=>_,on:()=>d,pc:()=>g,wB:()=>o,z7:()=>u});var i=r(37955),s=r(36563),n=r(97768),a=r(74887),l=r(14012);function o(e,t,r={}){return c(e,t,r,p)}function u(e,t,r={}){return c(e,t,r,f)}function c(e,t,r={},i){let s=null;const a=r.once?(e,r)=>{i(e)&&((0,n.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,l.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return s}function d(e,t,r,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function h(e){a.once&&a.once&&(0,n.xt)(c),r(e)}const p=o(e,((e,r)=>{d(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,h),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return c=(0,s.hA)((()=>{p.remove(),d()})),c}function h(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function o(){l=(0,n.xt)(l)}return new Promise(((i,n)=>{l=(0,s.vE)([(0,a.u7)(r,(()=>{o(),n((0,a.NK)())})),c(e,(e=>{o(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const y={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},39516:(e,t,r)=>{let i;async function s(){return null==i&&(i=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),i}async function n(e,t){const r=await s(),i=r.get(e,t);if(null==i)throw r.getError(e,t);return i}function a(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 l(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:()=>n,IW:()=>l,mA:()=>a})},40334:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>se,constructFeatureSet:()=>re,constructFeatureSetFromPortalItem:()=>de,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>te,convertToFeatureSet:()=>ce,createFeatureSetCollectionFromMap:()=>oe,createFeatureSetCollectionFromService:()=>ue,initialiseMetaDataCache:()=>X});var i=r(78888);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var n=r(78878),a=r(35704),l=r(52106),o=r(59534),u=r(68423),c=r(86691),d=r(87449),h=r(11221),p=r(89169),f=r(87594),y=r(33325),_=r(80609),g=r(1262),m=r(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,r,i){const s=new w;s.field=e;const n=m.A.create(t,{fieldsIndex:r,timeZone:i}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new g.L8(g.Z7.MissingStatisticParameters);const t=m.A.create((0,_.Mi)(e.parseTree.args.value[0],y.zl.Standardised,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(n);if(null===a)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(s.typeofstat="MIN",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"min"})}else if("MAX"===l){if(s.typeofstat="MAX",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===l)s.typeofstat="COUNT",s.workingexpr=a.expr;else if("STDEV"===l){if(s.typeofstat="STDDEV",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===l){if(s.typeofstat="SUM",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:l})}else if("AVG"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==l)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:l});if(s.typeofstat="VAR",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"var"})}return s}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var F=r(53966),b=r(80200),I=r(74639),S=r(44729),A=r(55612),v=r(15032),T=r(16930),x=r(20437),C=r(95466);const D=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends h.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return y.J6.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,r=1;const i=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+r.toString(),r++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:i,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=D.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:i,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new T.A({wkid:4326});this.fields=[];const s=new w;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=m.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const r=new x.A;if(t.name=this._nextUniqueName(e),r.name=t.tofieldname,r.alias=r.name,(0,_.DA)(t.expression)){const e=this._parent.getField((0,_.YY)(t.expression,y.zl.Standardised));if(!e)throw new d.dr(d.D_.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),r.type=e.type,t.sqlType=e.type}else{r.type=this._convertToEsriFieldType((0,_.IY)(t.expression,this._parent.fields));const e=new x.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=r.type}this.fields.push(r)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const r=new x.A;let i=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),r.name=s.tofieldname,r.alias=r.name;const n=null!==s.workingexpr&&(0,_.DA)(s.workingexpr)?(0,_.YY)(s.workingexpr,y.zl.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(i=this._parent.getField(n),!i)throw new d.dr(d.D_.AggregationFieldNotFound);r.type=i.type}else r.type="double";break;case"MIN":case"MAX":if(""!==n){if(i=this._parent.getField(n),!i)throw new d.dr(d.D_.AggregationFieldNotFound);r.type=i.type}else r.type="double";break;case"COUNT":r.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(i=this._parent.getField(n),!i))throw new d.dr(d.D_.AggregationFieldNotFound);r.type="double"}this.fields.push(r)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,r,i){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,i),this._getFeatures(e,t,r,i)):"success"}async _getFilteredSet(e,t,r,i,s){if(""!==e)return new p.A([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==r)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,_.Ju)(r,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,r=null;break}if(null!==i){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===i.scanForField(this._decodedStatsfield[e].tofieldname)){i=null,l.ordered=!1;break}if(null!==i)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===i.scanForField(e.tofieldname)){i=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;r&&(e=this._reformulateWhereClauseWithoutGroupByFields(r));let t=null;i&&(t=this._reformulateOrderClauseWithoutGroupByFields(i));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new p.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new p.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==r){let t=null;r&&(t=this._reformulateWhereClauseWithoutGroupByFields(r)),e=new a.A({parentfeatureset:e,whereclause:t})}n=new p.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new f.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.workingexpr,y.zl.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.expression,y.zl.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,r){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,r),this._refineSetBlock(e,t,r)):(this._checkCancelled(r),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getPhysicalPage(e,t,r){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,r,[]);const i=await this._getAgregagtePhysicalPage(e,t,r);for(const e of i){const t={geometry:e.geometry,attributes:{}},r={};for(const t in e.attributes)r[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=r[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=r[e.field.toLowerCase()];if(null!=this._featureCache[t.attributes[this.objectIdField]])throw F.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new d.dr(d.D_.NeverReach);this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return i.length}_sequentialGetPhysicalItem(e,t,r,i){return new Promise(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(r)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(i.length):this._nextAggregateItem(e,t,r,i,(n=>{null===n?s(i.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,r,i)))}),n)}))}_nextAggregateItem(e,t,r,i,s,a){try{(0,n.a0)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);i.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const r=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return i.push(r),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(r.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(r)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,r,i,s,a)}}),a)}catch(e){a(e)}}_calculateFieldStat(e,t,r){const i=[];for(const r of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(r);null!==e&&(e instanceof S.n||e instanceof v.k?i.push(e.toNumber()):e instanceof A.g?i.push(e.toMilliseconds()):i.push(e))}else i.push(null);r.attributes[t.tofieldname]=(0,I.s)(t.typeofstat,[i])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.features[0].attributes[r.singlefield]:m.A.convertValueToStorageFormat(r.expression.calculateValue(e.features[0]),r.sqlType);t.attributes[r.tofieldname]=i}for(const r of this._decodedStatsfield)this._calculateFieldStat(e,r,t);const r=[];for(let i=0;i<this._decodedStatsfield.length;i++)r.push(this._calculateFieldStat(e,this._decodedStatsfield[i],t));if(null!=this._featureCache[t.attributes[this.objectIdField]])throw F.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new d.dr(d.D_.NeverReach);return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.attributes[r.singlefield]:r.expression.calculateValue(e);t+=null==i?":":":"+i.toString()}return(0,b.d)(t,b.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){h.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=r(54784),L=r(54461),N=r(70333),E=r(61454),P=r(66395),O=r(50145),j=r(4576),M=r(39516),G=r(65864),U=r(21325),B=r(13600),q=r(54546),Z=r(61956),W=r(7562);class V extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,b.d)(t,b.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=y.zl.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=y.zl.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=y.zl.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=y.zl.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return y.J6.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new Z.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this.recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this.recentlyUsedQueries.addToCache(t,i),i=i.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}async _getFilteredSet(e,t,r,i,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=this._createQuery();o.where=(0,M.mA)(o.where,null===r?null===t?"1=1":"":(0,_.YY)(r,n)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new p.A([],u,l,null)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getFilteredSetUsingPaging(e,t,r,i,s){let n="",a=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),a=!0);const l=await this.databaseType(),o=null===r?null===t?"1=1":"":(0,_.YY)(r,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let d=null;if(!0===this._pageJustIds)d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=this._overrideFields??this._fieldsIncludingObjectId(["*"]);d=new p.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(d,u,0,1,s),d}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,M.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFeatures(e,t,r,i){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,i),this._getFeatures(e,t,r,i);let n=0;for(let i=e._lastFetchedIndex;i<e._known.length;i++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[i]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[i]]){const s=t._featureMap[e._known[i]];null!==s&&(r=!0,this._featureCache[e._known[i]]=s)}}if(!1===r&&(e._known[i]!==t&&s.push(e._known[i]),s.length>=this._maxProcessingRate()-1))break}if(n>=r&&0===s.length)break}if(0===s.length)return"success";const a=this._createQuery();a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),void 0!==l.error)throw new d.dr(d.D_.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,r,i,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=r.parseTree.column;const h=this._layer.fields??[];for(let e=0;e<h.length;e++)if(h[e].name.toLowerCase()===c.toLowerCase()){c=h[e].name;break}const p=this._createQuery();p.where=(0,M.mA)(p.where,null===n?null===s?"1=1":"":(0,_.YY)(n,u)),p.spatialRelationship=this._makeRelationshipEnum(i),p.relationParameter=this._makeRelationshipParam(i),p.geometry=null===s?null:s,p.returnDistinctValues=!0,p.returnGeometry=!1,p.outFields=[c];const f=await this.executeQuery(p,"execute");if(this._checkCancelled(o),!f.hasOwnProperty("features"))throw new d.dr(d.D_.InvalidStatResponse);let y=!1;for(let e=0;e<h.length;e++)if(h[e].name===c){"date"===h[e].type&&(y=!0);break}for(let e=0;e<f.features.length;e++){if(y){const t=f.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(f.features[e].attributes[c]);if(l.length>=a)break}return 0===f.features.length?l:f.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+f.features.length,t,r,i,s,n,a,l,o)}:l}async _distinctStat(e,t,r,i,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,r,i,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,r,i){const s=await this.databaseType();if(this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};const n=this._createQuery();return n.where=(0,M.mA)(n.where,null===i?null===r?"1=1":"":(0,_.YY)(i,s)),n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===r?null:r,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,r,i,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,r,i,s):{calculated:!1};if(!1===u||!1===(0,_.DA)(t)&&!1===o||!1===t.isStandardized)return""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===c?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,r,i,s,n,a);const h=await this.databaseType();if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const p=this._createQuery();p.where=(0,M.mA)(p.where,null===s?null===i?"1=1":"":(0,_.YY)(s,h)),p.spatialRelationship=this._makeRelationshipEnum(r),p.relationParameter=this._makeRelationshipParam(r),p.geometry=null===i?null:i;const f=new W.A;f.statisticType=(0,O.Dp)(e),f.onStatisticField=(0,_.YY)(t,h),f.outStatisticFieldName="ARCADE_STAT_RESULT",p.returnGeometry=!1;let y="ARCADE_STAT_RESULT";p.outStatistics=[f];const g=await this.executeQuery(p,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new d.dr(d.D_.InvalidStatResponse);let m=!1;const w=g.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(m=!0);break}if(m){let e=g.features[0].attributes[y];return null!==e&&(e=new Date(g.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[y]}}_stat(e,t,r,i,s,n,a){return this._stats(e,t,r,i,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let r=!1;const i=this._layer.capabilities?.query,s=!0===i?.supportsSqlExpression;if(null!=i&&!0===i.supportsStatistics&&!0===i.supportsOrderBy&&(r=!0),r)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,_.DA)(t[e].workingexpr)&&!1===s)&&(r=!1);return!1!==r}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map(((e,r)=>({name:t.normalizeFieldName(e)??e,asc:null==n||1===n._directions[r]})))}}let u="",c=!1;null!=n&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,j.MJ)(e,0,e.length,n._fields,0,Math.min(n._fields.length,e.length),((e,t)=>e.toLowerCase()===t.toLowerCase())))&&(u=n.constructClause(),c=!0),""===u&&(u=e.join(","));const d=[];for(let e=0;e<t.length;e++){const r=new W.A;r.onStatisticField=null!==t[e].workingexpr?(0,_.YY)(t[e].workingexpr,l):"",r.outStatisticFieldName=t[e].field,r.statisticType=t[e].toStatisticsName(),d.push(r)}let h=this._maxQueryRate();const f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<h&&(h=f);const y=null===s?null===i?"1=1":"":(0,_.YY)(s,l);return new p.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:h,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===i?null:i,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,r){let i=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(i=(0,M.mA)(i,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new d.dr(d.D_.NotImplemented);i=(0,M.mA)(i,(0,_.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,M.mA)(o.where,i),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(r),!u.hasOwnProperty("features"))throw new d.dr(d.D_.InvalidStatResponse);const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new d.dr(d.D_.NeverReach);const t=[];for(let r=0;r<e.length;r++){const i=e[r],s=[`"${i.name.replace('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];s.push(`"${r.name.replace('"','""')}" = @last_${t}`)}t.push(s.join(" AND "))}const r=t.join(" OR ");return m.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,r,i,s){const n=new B.default({url:e,outFields:null===t?["*"]:t});return new V({layer:n,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,s){const n=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(n)){const a={objectIds:[e],returnMetadata:s};(t&&t>0||r&&r>0)&&(a.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(a.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:n,query:a,method:"attachments"});const l=await n.queryAttachments(new q.A(a)),o=[];return l&&l[e]&&l[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let i=null;s&&t.exifInfo&&(i=P.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new E.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null))})),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,U.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference;for(const i of t.relatedRecordGroups){const s=i.objectId,n=[];for(const e of i.relatedRecords){e.geometry&&(e.geometry.spatialReference=r);const t=new l.A({geometry:e.geometry?(0,G.rS)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new d.dr(d.D_.InvalidRequest)}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,M.mA)(r.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=N.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=N.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new V({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const s=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var Q=r(30235),J=r(26591);class z extends h.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return y.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,r,i,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new p.A([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new p.A([],[],!0,null);if(n.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new J.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const d=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const h=d[this._findObjectId]?d[this._findObjectId].features:[],f=[];for(let e=0;e<h.length;e++)this._featureCache[h[e].attributes[this._relatedLayer.objectIdField]]=h[e],f.push(h[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=r;return new p.A(y||_?f:[],y||_?[]:f,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,r,i,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==i&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(n=i.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,d=null!=r;let h=null,f=!0;!0===this._removeGeometry&&(f=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return h=new p.A(c||d?["GETPAGES"]:[],c||d?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:f,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(h,o,0,0,s),h}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new J.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,r,i){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,i),this._getFeatures(e,t,r,i);let a=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(a++,a<=r&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[i]&&void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>r)))&&!(a>=r&&0===s.length);i++);if(0===s.length)return"success";throw new d.dr(d.D_.MissingFeatures)}async _refineSetBlock(e,t,r){return e}async _stat(e,t,r,i,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,r,i,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,s){return this._relatedLayer.queryAttachments(e,t,r,i,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var $=r(23732),Y=r(92474),K=r(4146),H=r(80812);function X(){null===$.A.applicationCache&&($.A.applicationCache=new $.A)}async function ee(e,t,r){if($.A.applicationCache){const r=$.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new B.default({url:e,outFields:t,sourceJSON:i})}const i=new B.default({url:e,outFields:t}),s=(async()=>(await i.load(),i.sourceJSON))();if($.A.applicationCache){$.A.applicationCache.setLayerInfo(e,s);try{return await s,i}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return await s,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new B.default({url:e,outFields:t,sourceJSON:r})}const s=new B.default({url:e,outFields:t}),n=(async()=>(await s.load(),s.sourceJSON))();r.setCachedLayerMetadata(e,n);try{return await n,s}catch(t){throw r.removeCachedLayerMetadata(e,n),t}}return new B.default({url:e,outFields:t})}async function te(e,t,r,i,s,n=null){return re(await ee(e,["*"],s),t,r,i,s,n)}function re(e,t=null,r=null,i=!0,s=null,n=null){switch(e.type){case"catalog-footprint":return re(e.parent,t,r,i,s,n);case"subtype-sublayer":{const a=re(e.parent,t,r,i,s,n);return a.filter(m.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new Q.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n};return!e.url&&e.source?new Q.A(a):new V(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function ie(e,t){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function se(e,t,r){const s={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},n=await ie(e,null);if(s.metadata=n,void 0!==n.controllerDatasetLayers?.utilityNetworkLayerId&&null!==n.controllerDatasetLayers.utilityNetworkLayerId){if(n.layers)for(const e of n.layers)s.layerNameLkp[e.id]=e.name;if(n.tables)for(const e of n.tables)s.layerNameLkp[e.id]=e.name;const a=n.controllerDatasetLayers.utilityNetworkLayerId;s.networkId=a;const l=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==$.A.applicationCache){const e=$.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const s=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new d.dr(d.D_.DataElementsNotFound)})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(r,s);try{return await s}catch(e){throw $.A.applicationCache.clearLayerInfo(r),e}}return s}(e,a);if(l){s.queryelem=l,s.queryelem?.dataElement&&void 0!==s.queryelem.dataElement.schemaGeneration&&(s.unVersion=s.queryelem.dataElement.schemaGeneration),s.lkp={},s.queryelem.dataElement.domainNetworks||(s.queryelem.dataElement.domainNetworks=[]);for(const e of s.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}}if(s.queryelem.dataElement.terminalConfigurations)for(const e of s.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)s.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const n=await async function(e){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==n.systemLayers?.associationsTableId&&null!==n.systemLayers.associationsTableId){let i=null;if(r&&s.unVersion<8){const r=[];s.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await te(e+"/"+n.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),s.unVersion>=4&&(i=i.filter(m.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})),await i.load())}return{lkp:s.lkp,associations:i,unVersion:s.unVersion,terminals:s.terminals,layerIdLookup:s.layerIdLookup,sourceIdLookup:s.sourceIdLookup}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,r,i=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await te(o,i,s,n,a,l);return new z({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),L.A.registerAction();class ae extends s{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=re(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=this._map.allLayers.find((t=>(0,y.eB)(t)&&t.title===e));if(null!=s)return this._makeAndAddFeatureSet(s,t,r);if(this._map.allTables){const i=this._map.allTables.find((t=>(0,y.eB)(t)&&t.title===e));if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=this._map.allLayers.find((t=>(0,y.eB)(t)&&t.id===e));if(s)return this._makeAndAddFeatureSet(s,t,r);if(this._map.allTables){const i=this._map.allTables.find((t=>(0,y.eB)(t)&&t.id===e));if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class le extends s{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=re(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await ie(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new le(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function oe(e,t,r=null,i=null){return new ae(e,t,r,i)}function ue(e,t,r=null,i=null){return new le(e,t,r,i)}function ce(e,t,r,i,s){if(null===e)return null;if((0,n.p)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof K.A&&(0,y.NI)(e)){const n=e;switch(t){case"datasource":return re(n,s,"outFields"in n?n.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return re(n,s,"outFields"in n?n.outFields:null,!0,r,i)}return null}if((0,n.$)(e)){switch(t){case"datasource":return re(e.parent,s,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return re(e,s,e.parent.outFields,!0,r,i)}return null}return null}async function de(e,t,r,i,s,n,a,l=null){if($.A.applicationCache){const o=$.A.applicationCache.getLayerInfo(e+":"+n.url);if(o)return he(await o,t,r,i,s,a,l)}if(null!=a){const o=a.getCachedPortalItem(n.url,e);if(null!=o)return await he(await o,t,r,i,s,a,l)}const o=new H.default({id:e,portal:n}).load();$.A.applicationCache?$.A.applicationCache.setLayerInfo(e+":"+n.url,o):null!=a&&a.setCachedPortalItem(n.url,e,o);try{return await he(await o,t,r,i,s,a,l)}catch(t){throw $.A.applicationCache&&$.A.applicationCache.clearLayerInfo(e+":"+n.url),null!=a&&a.removeCachedPortalItem(n.url,e,o),t}}async function he(e,t,r,i,s,n,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await ee((0,y.Qi)(e.url??"")+"/"+t,["*"],n);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=n){const t=n.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=K.A.fromPortalItem(e);n.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw n.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=await K.A.fromPortalItem(e)}return re(l,r,i,s,n,a)}},41366:(e,t,r)=>{r.d(t,{K:()=>h,Q:()=>u});var i=r(90237),s=r(66552),n=r(53966),a=r(10107),l=(r(44208),r(87811),r(93223)),o=r(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=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&&n.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,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>a,mW:()=>n});var i=r(34727),s=r(39516);function n(e,t){return{...t,filterMode:e.mode}}function a(e,t,r){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(n&&((0,i.gg)(t,n[0])||(0,i.ZH)(r,n[1])))return"";const a=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const s=c(e.at(0)?.minScale),n=d(e.at(-1)?.maxScale);if((0,i.ZH)(s,t)||(0,i.gg)(n,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],s=e[t+1];if((0,i.ZH)(c(s.minScale),d(r.maxScale)))return!0}return!1}(a,t,r)?"1=1":a.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,s.IW)(e,t)),"");return o&&"1=1"!==o?o:""}function*l(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 i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,s){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(s??r)>e||(0,i.Hx)(t,r)||void 0!==s&&(0,i.Sp)(s,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:()=>s});var i=r(49186);let s=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 i.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[s,n]=t.split("."),a=/^\s*\d+\s*$/;if(!s?.match||!a.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),o=parseInt(n,10);return new e(l,o,r)}}},54461:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(87449),s=r(11221),n=r(89169),a=r(33325);class l extends s.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.J6.NotInFeatureSet)return t;const r=this._idstates[e];return r===a.J6.InFeatureSet||r===a.J6.NotInFeatureSet?r:t===a.J6.InFeatureSet&&void 0===r?this._countedin<this._topnum?(this._idstates[e]=a.J6.InFeatureSet,this._countedin++,a.J6.InFeatureSet):(this._idstates[e]=a.J6.NotInFeatureSet,a.J6.NotInFeatureSet):a.J6.Unknown}async _expandPagedSet(e,t,r,s,n){if(null===this._parent)throw new i.dr(i.D_.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,r,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,r,i){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,i),this._getFeatures(e,t,r,i);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(l++,l<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>a)));i++);if(0===s.length)return"success";const o=new n.A([],s,!1,null),u=Math.min(s.length,r);await this._parent._getFeatures(o,-1,u,i);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,r,i,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let r=0,i=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.J6.InFeatureSet){if(e._known.push(e._candidates[n]),r+=1,null===i?i={start:n,end:n}:i.end===n-1?i.end=n:(s.push(i),i={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.J6.NotInFeatureSet)null===i?i={start:n,end:n}:i.end===n-1?i.end=n:(s.push(i),i={start:n,end:n}),r+=1;else if(l===a.J6.Unknown)break;if(r>=t)break}null!==i&&s.push(i);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.A._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>p,Gj:()=>_,QY:()=>h,lL:()=>g,xR:()=>f});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),a=r(15032),l=r(65864),o=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function p(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,i){const{arcade:n,Dictionary:a}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=n.scriptUsesGeometryEngine(l);o&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,o);const c={vars:i.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},d=n.compileScript(l,c);let h=null;null!=r&&(h=new a(r),h.immutable=!0);const p=new a;return p.immutable=!1,p.setField("scale",0),new y(e,n,l,d,t,p,h,a)}constructor(e,t,r,i,s,n,a,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new _,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:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):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 _{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 i=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,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,l.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 n.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.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:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>y,jJ:()=>u});var i=r(90237),s=r(69622),n=r(97768),a=r(74887),l=r(10107),o=r(40608);function u(e,t,r){return(0,a.Lx)(e.map(((e,i)=>t.apply(r,[e,i]))))}async function c(e,t,r){return(await(0,a.Lx)(e.map(((e,i)=>t.apply(r,[e,i]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return h(e)}}async function f(e){try{return d(await e)}catch(e){return(0,a.QP)(e),h(e)}}function y(e,t){return new _(e,t)}let _=class extends s.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,n.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=h(e),this._cleanup()})),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i._)([(0,l.MZ)()],_.prototype,"value",null),(0,i._)([(0,l.MZ)()],_.prototype,"error",null),(0,i._)([(0,l.MZ)()],_.prototype,"finished",null),(0,i._)([(0,l.MZ)()],_.prototype,"promise",void 0),(0,i._)([(0,l.MZ)()],_.prototype,"_result",void 0),_=(0,i._)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],_)},68423:(e,t,r)=>{r.d(t,{Gr:()=>m,IO:()=>y,a:()=>w,bV:()=>g,p8:()=>_});var i=r(52106),s=r(78502),n=r(87449),a=r(11221),l=r(89169),o=r(33325),u=r(80609),c=r(97768),d=r(1262),h=r(88368),p=r(16930);class f{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends f{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends f{constructor(e,t,r){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=r}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends f{constructor(e,t,r){super(e),this.codefield=t,this.lkp=r,this.reverseLkp={};for(const e in r)this.reverseLkp[r[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const r=this.evaluateNodeToWhereClause(e.parseTree,o.zl.Standardised,this.field.name,this.codefield instanceof h.A?(0,u.YY)(this.codefield,o.zl.Standardised):this.codefield,e.parameters);return r.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.A.create(r,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,r=null,i=null,s){let n,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,r,i,s),e.qualifier,e.op);case"case-expression":{let i=" CASE ";"simple"===e.format&&(i+=this.evaluateNodeToWhereClause(e.operand,t,r,g.BADNESS,s));for(let n=0;n<e.clauses.length;n++)i+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,r,g.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,r,g.BADNESS,s);return null!==e.else&&(i+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,r,g.BADNESS,s)),i+=" END ",i}case"parameter":{const r=s[e.value.toLowerCase()];if("string"==typeof r)return"'"+r.toString().replaceAll("'","''")+"'";if((0,o.$P)(r))return(0,u.bm)(r,t);if((0,o.Lk)(r))return(0,u.bm)(r,t);if((0,o.eg)(r))return(0,u.F1)(r,t);if((0,o.rX)(r))return(0,u.R8)(r,t);if((0,o.f0)(r))return(0,u.Nf)(r,t);if(Array.isArray(r)){const e=[];for(let i=0;i<r.length;i++)"string"==typeof r[i]?e.push("'"+r[i].toString().replaceAll("'","''")+"'"):(0,o.$P)(r[i])||(0,o.Lk)(r[i])?e.push((0,u.bm)(r[i],t)):(0,o.eg)(r[i])?e.push((0,u.F1)(r[i],t)):(0,o.rX)(r[i])?e.push((0,u.R8)(r[i],t)):(0,o.f0)(r[i])?e.push((0,u.Nf)(r[i],t)):e.push(r[i].toString());return e}return r.toString()}case"expression-list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,r,i,s));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,r,g.BADNESS,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"IS":if("null"!==e.right.type)throw new d.L8(d.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new d.L8(d.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NOT NULL )";case"IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,r,i,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+c+")) ";case"NOT IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,r,i,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+i+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+i+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,s)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+i+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const i=this.evaluateNodeToWhereClause(e.args,t,r,g.BADNESS,s);return(0,u.F6)(e.name,i,t)}}throw new d.L8(d.Z7.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof h.A?this.reverseLkp[h.A.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))]:this.reverseLkp[e.attributes[this.codefield]]}}class m extends f{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,o.zl.Standardised),t.getFieldsIndex())}}extractValue(e){return h.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const r of e)if(r.name.toLowerCase()===t.toString().toLowerCase())return r;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new p.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,r,n){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,n),this._getFeatures(e,t,r,n);let u=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(u++,u<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&a.push(e._known[i]),a.length>=o)));i++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,r);await(this._parent?._getFeatures(e,-1,c,n)),this._checkCancelled(n);const d=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&d.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of d){const t=[];for(const r of this.adaptedFields)t[r.field.name]=r.extractValue(e);this._featureCache[e.id]=new i.A({attributes:t,geometry:(0,s.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new n.dr(n.D_.NeverReach)}async _getFilteredSet(e,t,r,i,s){let n=!1;const a=this._reformulateWithoutAdaptions(r);n=a.cannot,r=a.where;let o=!1;if(null!==i){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===i.scanForField(t.field.name)){if(!(t instanceof _)){i=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}i&&e.length>0&&(i=i.replaceFields(e))}null!==r?null!==this._extraFilter&&(r=(0,u.kg)(this._extraFilter,r)):r=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,r,i,s);let d;return this._checkCancelled(s),d=!0===n?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),d}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const r of this.adaptedFields)if(!0===(0,u.Ju)(e,r.field.name)){const i=r.rewriteSql(e,this);if(!0!==i.rewritten){t.cannot=!0,t.where=null;break}t.where=i.where}return t}async _stat(e,t,r,i,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1};const c=await this._parent._stat(e,t,r,i,s,n,a);return!1===c.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:c}async _canDoAggregates(e,t,r,i,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const r of this.adaptedFields)if(e[t].toLowerCase()===r.field.name.toLowerCase()&&!(r instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this._reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return!1;const t=r.clone();t.workingexpr=e.where,n.push(t)}else n.push(r)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,r,i,s))}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,a,l){if(null===this._parent)throw new n.dr(n.D_.NeverReach);const o=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this._reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)throw new n.dr(n.D_.NeverReach);const t=r.clone();t.workingexpr=e.where,o.push(t)}else o.push(r)}const c=this._reformulateWithoutAdaptions(s);if(c.cannot)throw new n.dr(n.D_.NeverReach);return null!==(s=c.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,r,i,s,a,l)}}},73681:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(49186),s=r(53966),n=r(46140),a=r(95466),l=r(55674);class o{static async from(e,t,r){const a=e.dictionary_version?n.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 h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const p=await(0,l.xR)(e.expression,null,d);if(!p)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!a||!a.greaterEqual(4,0);f&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(r,f);return new o(f,c,p,y)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new a.A(t)}}class u extends l.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:()=>l,W_:()=>o,TU:()=>a,XX:()=>n});var i=r(70333),s=r(78888);r(5503),r(36563),r(36708),new WeakMap;const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(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=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.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)}},86691:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(78878),s=r(87449),n=r(11221),a=r(89169),l=r(87594);class o extends n.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const r=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(r);const i=new a.A([],[],!0,null);for(let e=0;e<r.length;e++)i._known.push(r[e].id);return i}async getIdColumnDictionary(e,t,r,s){if(r<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[r+1])return await(0,i.a0)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,r,s);let a=r+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;r+=l.length;const o=await(0,i.a0)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,r,s)}return e._candidates.length>0?(await(0,i.a0)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,r,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.dr(s.D_.NeverReach)}async _getFilteredSet(e,t,r,i,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,r,null===i?this._orderbyclause:i,s);this._checkCancelled(s);const l=new a.A(n._candidates.slice(),n._known.slice(),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===r||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,r)=>{function i(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}r.d(t,{A:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const r=t[e].match(/\S+/g);this._fields.push(r[0]),2===r.length?"asc"===r[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let r=0;r<this._fields.length;r++){const s=this.featureValue(e.feature,this._fields[r],r),n=this.featureValue(t.feature,this._fields[r],r);let a=0;if(a=1===this._directions[r]?i(s,n):-1*i(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let r=0;r<this._fields.length;r++){0!==r&&(t+=",");let i=this._fields[r];for(const t of e)if(i.toLowerCase()===t.field.toLowerCase()){i=t.newfield;break}t+=i,1===this._directions[r]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,r){const i=e.attributes[t];if(void 0!==i)return i;for(const i in e.attributes)if(t.toLowerCase()===i.toLowerCase())return this._fields[r]=i,e.attributes[i];return null}}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,s=r(90237),n=r(66552),a=r(25482),l=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends a.A{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,s._)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1092,3186,3514],{4197:(e,t,n)=>{n.d(t,{jh:()=>r,l5:()=>a,xm:()=>s});var i=n(34275);function r(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}},13069:(e,t,n)=>{n.d(t,{AG:()=>l,lk:()=>r,vD:()=>a,yS:()=>s});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function a(){return`{${r()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(90237),r=n(69622),s=n(60999),a=n(5503),l=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),u=n(30524),d=n(43668);let c=class extends r.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,d.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??n.e(9926).then(n.bind(n,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.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 n=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(n.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:n,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(n,{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 n=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of n){const n=t.split("."),i=this.fieldsIndex.get(n.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const n of t){const t=this.fieldsIndex.get(n);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,n){try{const{attributes:i}=t,r=n?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(n.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const n=this._createFormattedAttributes(e,t,r).global;return s({attributes:i,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:n,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const n=t.getObjectId();if(null==n)return t;if(!(0,u.Kl)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[n];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const n of e){if(!n.fieldName)continue;const e=this.fieldsIndex.get(n.fieldName),i=e?.name??n.fieldName;n.fieldName=i,t.set(i.toLowerCase(),n)}return t}_createFormattedAttributes(e,t,n="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const n=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:n}})}catch{}}const s={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:n,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,i._)([(0,l.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,i._)([(0,l.MZ)()],c.prototype,"_featureUtils",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,i._)([(0,l.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,i._)([(0,l.MZ)()],c.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,l.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,l.MZ)()],c.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)()],c.prototype,"fieldInfoMap",null),(0,i._)([(0,l.MZ)()],c.prototype,"fields",void 0),(0,i._)([(0,l.MZ)()],c.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],c.prototype,"requiredFields",null),c=(0,i._)([(0,o.$)("esri.layers.support.TitleCreator")],c)},32730:(e,t,n)=>{n.d(t,{BI:()=>y,D3:()=>m,XJ:()=>h,lc:()=>p,mX:()=>F,rU:()=>g,tH:()=>M});var i=n(799);const r="__begin__",s="__end__",a=new RegExp(r,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+r,"i"),u=new RegExp(s+"$","i"),d='"',c=d+" + ",f=" + "+d;function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function h(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=p(e.labelExpression),t.type="conventional"),t}function y(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return F(t.expression);case"arcade":return t.expression}return null}function g(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(x);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function F(e){let t;return e?(t=(0,i.HC)(e,(e=>r+'$feature["'+e+'"]'+s)),t=o.test(t)?t.replace(o,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(a,c).replaceAll(l,f)):t='""',t}const x=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,I=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=_.exec(e)||I.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}},39516:(e,t,n)=>{let i;async function r(){return null==i&&(i=Promise.all([n.e(8368),n.e(4123)]).then(n.bind(n,44123)).then((e=>new e.WhereClauseCache(500,500)))),i}async function s(e,t){const n=await r(),i=n.get(e,t);if(null==i)throw n.getError(e,t);return i}function a(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 l(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}n.d(t,{GP:()=>s,IW:()=>l,mA:()=>a})},41366:(e,t,n)=>{n.d(t,{K:()=>f,Q:()=>u});var i=n(90237),r=n(66552),s=n(53966),a=n(10107),l=(n(44208),n(87811),n(93223)),o=n(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),d="percent-of-total",c="field",f=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,n=null!=this.normalizationTotal;return t||n?(e=t&&c||n&&d||null,t&&n&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==d||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,n)=>{n.d(t,{Ch:()=>a,mW:()=>s});var i=n(34727),r=n(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,n){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:i}of e.filters)t[0]=Math.max(t[0],d(n)),t[1]=Math.min(t[1],c(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(n,s[1])))return"";const a=Array.from(l(e,t,n)),o=function(e,t,n){if(0===e.length)return!0;const r=d(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,i.ZH)(r,t)||(0,i.gg)(s,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if((0,i.ZH)(d(r.minScale),c(n.maxScale)))return!0}return!1}(a,t,n)?"1=1":a.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,r.IW)(e,t)),"");return o&&"1=1"!==o?o:""}function*l(e,t,n){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 i of e.filters)o(i.minScale,i.maxScale,t,n)&&(yield i)}}function o(e,t,n,r){return e=d(e),n=d(n),t=c(t),!(!(0,i.Sp)(n,e)&&(r??n)>e||(0,i.Hx)(t,n)||void 0!==r&&(0,i.Sp)(r,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},54339:(e,t,n)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const n=[];for(const i of t.fieldNames)n.push(e.attributes[i]??null);return JSON.stringify(n)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const n=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(n)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}n.d(t,{W:()=>i,r:()=>r})},70328:(e,t,n)=>{n.d(t,{BI:()=>F,Ej:()=>f,Ie:()=>y,Jt:()=>g,Ne:()=>p,RF:()=>d,aI:()=>_,fA:()=>a,gE:()=>o,hZ:()=>h,iT:()=>c,is:()=>x,qv:()=>I,vI:()=>m,vY:()=>l,v_:()=>T,vt:()=>s,w1:()=>u});var i=n(5443),r=(n(19419),n(4197));function s(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,n,i,r,a,l=s()){return l[0]=e,l[1]=t,l[2]=n,l[3]=i,l[4]=r,l[5]=a,l}function l(e,t=s()){return function(e,t,n,i=s()){return h(i,I),function(e,t,n=0,i=t.length/3){let r=e[0],s=e[1],a=e[2],l=e[3],o=e[4],u=e[5];for(let e=0;e<i;e++)r=Math.min(r,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),a=Math.min(a,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),o=Math.max(o,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=r,e[1]=s,e[2]=a,e[3]=l,e[4]=o,e[5]=u}(i,e,t,n),i}(e,0,e.length/3,t)}function o(e,t=(0,r.jh)(24)){const[n,i,s,a,l,o]=e;return t[0]=n,t[1]=i,t[2]=s,t[3]=n,t[4]=i,t[5]=o,t[6]=n,t[7]=l,t[8]=s,t[9]=n,t[10]=l,t[11]=o,t[12]=a,t[13]=i,t[14]=s,t[15]=a,t[16]=i,t[17]=o,t[18]=a,t[19]=l,t[20]=s,t[21]=a,t[22]=l,t[23]=o,t}function u(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new i.A(n?{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 d(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 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[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(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,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function m(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function h(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?h(e,I):s(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 F(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function x(e){return 6===e.length}function _(e,t,n){if(null==e||null==t)return e===t;if(!x(e)||!x(t))return!1;if(n){for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];s()},92935:(e,t,n)=>{var i;n.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},95466:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(49186),r=n(53966),s=n(91869),a=n(3330),l=n(12195),o=n(30524),u=n(98623),d=n(56400),c=n(96285);const f=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 n=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),n.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.te)(e)||(0,o.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.te)(e)||(0,o.Xz)(e)||e.nullable||void 0!==(0,o.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(h(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 i.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$?c.mQ.utcInstance:(0,s.tE)(f,t,(()=>c.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.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,l.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function h(e){return(0,o.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 n=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",a=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,o=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.dateFieldsTimeReference?(0,d.ZS)(r.dateFieldsTimeReference):l??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,d.ZS)(i.timeReference):l:null,f=new Map([[m(r?.creationDateField??""),o],[m(r?.editDateField??""),o],[m(s),c],[m(a),c]]);for(const{name:i,type:r}of e.fields)if(y.has(r))t.set(i,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(n)t.set(i,u.L5);else{const e=f.get(m(i??""))??l;t.set(i,e)}return t}}}]);