@arcgis/core 5.2.0-next.27 → 5.2.0-next.28

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 (266) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/Pixel.js +1 -1
  5. package/arcade/deepClone.js +1 -1
  6. package/arcade/featureset/support/FeatureSet.js +1 -1
  7. package/arcade/functions/geometry.js +1 -1
  8. package/arcade/languageUtils.js +1 -1
  9. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  10. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/{5ee887fc6e1e0e70e02f.js → 1664434dc7a67c8ce453.js} +1 -1
  13. package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +1 -0
  14. package/assets/esri/core/workers/chunks/1893a4b344aa9b57aa8d.js +1 -0
  15. package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{316a3d5c7842b445e29e.js → 24704e70d1ce01ca4081.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{bf9eca7dd107bdb06614.js → 2665337e1b665e7e2b70.js} +1 -1
  18. package/assets/esri/core/workers/chunks/29a7321fd069253c2521.js +1 -0
  19. package/assets/esri/core/workers/chunks/{31c4128b23968575feca.js → 31d92ba9089617aa59ab.js} +1 -1
  20. package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +1 -0
  21. package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +1 -0
  22. package/assets/esri/core/workers/chunks/{511b9c12a7479d39dac0.js → 409bc7d69b95f7a1634c.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{4e16d7fa2e6f11d082b5.js → 4ba4fd8fa31169760fee.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{268ee59800e64baa9682.js → 4be0c64bbf2449d57ea5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/4fc32e60e63a9c8429b9.js +1 -0
  26. package/assets/esri/core/workers/chunks/{e8e7cd26c43f231cdea2.js → 5189413a83faf3480e29.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5363c622a0571134cadd.js +1 -0
  28. package/assets/esri/core/workers/chunks/{88b08b386926ec889573.js → 548842f8ba9224b15ee4.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5c63b38160c7d063b8af.js +1 -0
  30. package/assets/esri/core/workers/chunks/6183a26837dc087663ad.js +1 -0
  31. package/assets/esri/core/workers/chunks/{a9d477f90e5046400dd5.js → 654a6dc13ff5be88c8b9.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{1f03e34520746e432719.js → 67f44cab103d4411dcc5.js} +1 -1
  33. package/assets/esri/core/workers/chunks/697e0ce10d77b90d4fee.js +1 -0
  34. package/assets/esri/core/workers/chunks/{8f93e6fc11a158d4f1ee.js → 7335a762412bc8c15a2f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{b2b342b06d502fc61ea5.js → 76789f46b2c65d219cf9.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{fae147d03ed723ab234d.js → 78f68f7534716956f5bc.js} +1 -1
  37. package/assets/esri/core/workers/chunks/7b290ac2e8a567ecae4a.js +1 -0
  38. package/assets/esri/core/workers/chunks/7c344c339743295d11d7.js +1 -0
  39. package/assets/esri/core/workers/chunks/{0098544169e429dd98d2.js → 7f1babbb7ead78201ab3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{dadf85890961bcc205eb.js → 7fcf4f3b9131c7516524.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{292498a9c7d462d215c6.js → 86e61841df12dbe20a19.js} +1 -1
  42. package/assets/esri/core/workers/chunks/8aba35305368234c94f8.js +1 -0
  43. package/assets/esri/core/workers/chunks/{d670e134348954ce465d.js → 8b452383ba972b638a0c.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{a3ecde3794a7db3cf283.js → 8d90bef1091204fba0f1.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{a18cb809dd56c5537b3b.js → 8dbf9b1d8bb6817b19c1.js} +1 -1
  46. package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +1 -0
  47. package/assets/esri/core/workers/chunks/{a454df829a72ab02c860.js → 8fd63cb38036f331a803.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{bbcad2fde838819ffc7b.js → 906f4c0fa8135e6c2f03.js} +1 -1
  49. package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +1 -0
  50. package/assets/esri/core/workers/chunks/9ba705a6ddabca0f77b1.js +1 -0
  51. package/assets/esri/core/workers/chunks/a2357aae79bfbb91f125.js +1 -0
  52. package/assets/esri/core/workers/chunks/a3ca0649edb646da0918.js +1 -0
  53. package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +1 -0
  54. package/assets/esri/core/workers/chunks/acbc14395c31f6da509e.js +1 -0
  55. package/assets/esri/core/workers/chunks/{8bd4c43c34aacf3b07da.js → b10f36658aa77bc3a6cf.js} +1 -1
  56. package/assets/esri/core/workers/chunks/b18b6bb85e52b03b85e3.js +680 -0
  57. package/assets/esri/core/workers/chunks/b7458bd3a2f590f32111.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d374cb2d17a2d11c500f.js → c46500cc95a84e2a5f7a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/cc46261e01a985df5aab.js +1 -0
  60. package/assets/esri/core/workers/chunks/{de0c94defb90e1805081.js → d07261f3fb67b9a99369.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{04070767356c12026369.js → d61294dcc3ba41060d44.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{f3d331da3c61af5c5a2f.js → d8ae5b61b5ae71f4796c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/e181d0f5562878b3dc01.js +1 -0
  64. package/assets/esri/core/workers/chunks/{d07068c44d560e4ce02e.js → e5d2fab228d54b18a8a8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/f1d211904d5a1de93cb3.js +1 -0
  66. package/assets/esri/core/workers/chunks/{928b18e13e015330d44b.js → f68b84df093f2894210b.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{3a35779cae6a11cde51b.js → f74b6952c888d92e479e.js} +1 -1
  68. package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +1 -0
  69. package/assets/esri/core/workers/chunks/{66392ff750c28064040a.js → fe20683f442294eb111b.js} +1 -1
  70. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  71. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  72. package/assets/esri/images/portal/propresentation16.png +0 -0
  73. package/assets/esri/images/portal/urbanproject16.png +0 -0
  74. package/assets/esri/images/support/loading-throb.gif +0 -0
  75. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  76. package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
  77. package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
  78. package/assets/esri/themes/base/icons/style.scss +0 -0
  79. package/assets/esri/themes/base/icons/variables.scss +0 -0
  80. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  81. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  82. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  83. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  84. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  85. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  86. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  87. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  88. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  89. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  90. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  91. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  92. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  93. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  94. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  95. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  96. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +24 -0
  97. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
  98. package/assets/esri/themes/dark/main.css +1 -1
  99. package/assets/esri/themes/light/main.css +1 -1
  100. package/assets/esri/themes/light/view.css +1 -1
  101. package/chunks/OITBlend.glsl.js +1 -1
  102. package/chunks/languageUtils.js +1 -1
  103. package/config.js +1 -1
  104. package/core/Loadable.js +1 -1
  105. package/core/colorUtils.js +1 -1
  106. package/core/has.js +1 -1
  107. package/core/workers/WorkerHandle.js +1 -1
  108. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  109. package/geometry/Mesh.js +1 -1
  110. package/geometry/support/meshUtils/loadExternal.js +1 -1
  111. package/identity/OAuthCredential.js +1 -1
  112. package/kernel.js +1 -1
  113. package/layers/AnnotationFeatureLayer.d.ts +2 -2
  114. package/layers/AnnotationFeatureLayer.js +1 -1
  115. package/layers/LinkChartLayer.js +1 -1
  116. package/layers/ParquetLayer.js +1 -1
  117. package/layers/PointCloudLayer.js +1 -1
  118. package/layers/SceneLayer.js +1 -1
  119. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  120. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  121. package/layers/graphics/editingSupport.js +1 -1
  122. package/layers/graphics/sources/MemorySource.js +1 -1
  123. package/layers/graphics/sources/ParquetSource.js +1 -1
  124. package/layers/mixins/EditBusLayer.js +1 -1
  125. package/layers/mixins/SceneService.js +1 -1
  126. package/layers/support/KMLSublayer.js +1 -1
  127. package/layers/support/ParquetFilesData.js +1 -1
  128. package/layers/support/TitleCreator.js +1 -1
  129. package/package.json +3 -3
  130. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +62 -6
  131. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  132. package/support/ArcadeExpression.js +1 -1
  133. package/support/basemapUtils.js +1 -1
  134. package/support/revision.js +1 -1
  135. package/versionManagement/VersionManagementService.js +1 -1
  136. package/versionManagement/VersionManager.js +1 -1
  137. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  138. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  139. package/views/2d/engine/ParentChildStage.js +1 -1
  140. package/views/2d/engine/Stage.js +1 -1
  141. package/views/2d/engine/ThrottledCanvas.js +2 -0
  142. package/views/2d/engine/webgl/Profiler.js +1 -1
  143. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  144. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  145. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  146. package/views/2d/layers/LayerView2D.js +1 -1
  147. package/views/2d/layers/MediaLayerView2D.js +1 -1
  148. package/views/2d/layers/TileLayerView2D.js +1 -1
  149. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  150. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  151. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  152. package/views/2d/layers/features/layerAdapters/featureLayerAdapterUtils.js +2 -0
  153. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  154. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  155. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  156. package/views/3d/camera/constraintUtils.js +1 -1
  157. package/views/3d/glTF/internal/Resource.js +1 -1
  158. package/views/3d/glTF/loader.js +1 -1
  159. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  160. package/views/3d/layers/I3SMeshView3D.js +1 -1
  161. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  162. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  167. package/views/3d/state/GoToOperation.js +1 -1
  168. package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
  169. package/views/3d/state/ViewState.js +1 -1
  170. package/views/3d/state/ViewStateManager.js +1 -1
  171. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  172. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  173. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  174. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  175. package/views/3d/webgl/ManagedFBO.js +1 -1
  176. package/views/3d/webgl/RenderCamera.js +1 -1
  177. package/views/3d/webgl/RenderNode.js +1 -1
  178. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  179. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  180. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  181. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  182. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  183. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  184. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  185. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  186. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  187. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  188. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  189. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  190. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  191. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  192. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  193. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  194. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  195. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  196. package/views/3d/webgl.js +1 -1
  197. package/views/VideoView.js +1 -1
  198. package/views/View2D.js +1 -1
  199. package/views/Viewport2DBaseMixin.js +1 -1
  200. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  201. package/views/draw/support/editingSessionUtils.js +1 -1
  202. package/views/popupAdapter.js +1 -1
  203. package/views/webgl/BufferObject.js +1 -1
  204. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  205. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  206. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  207. package/widgets/BatchAttributeForm/css.js +1 -1
  208. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  209. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  210. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  211. package/widgets/BatchAttributeForm.js +1 -1
  212. package/widgets/Directions/DirectionsViewModel.js +1 -1
  213. package/widgets/Directions.js +1 -1
  214. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  215. package/widgets/Editor.d.ts +11 -1
  216. package/widgets/Editor.js +1 -1
  217. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  218. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  219. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  220. package/widgets/FeatureTable.js +1 -1
  221. package/widgets/Features/FeaturesViewModel.js +1 -1
  222. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  223. package/widgets/Locate/LocateViewModel.js +1 -1
  224. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  225. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  226. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  227. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  228. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  229. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
  230. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  231. package/widgets/Print/PrintViewModel.js +1 -1
  232. package/widgets/Print.js +1 -1
  233. package/widgets/TableList/ListItem.js +1 -1
  234. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  235. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  236. package/widgets/Widget.js +1 -1
  237. package/widgets/support/geolocationUtils.js +1 -1
  238. package/widgets/support/tests.js +1 -1
  239. package/assets/esri/core/workers/chunks/045f178fecc23839bfa8.js +0 -680
  240. package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +0 -1
  241. package/assets/esri/core/workers/chunks/0e81b6aa64d5491870b2.js +0 -1
  242. package/assets/esri/core/workers/chunks/126a8c26618425790804.js +0 -1
  243. package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +0 -1
  244. package/assets/esri/core/workers/chunks/2ed81f1e490cb7e73405.js +0 -1
  245. package/assets/esri/core/workers/chunks/32f26757e36704923286.js +0 -1
  246. package/assets/esri/core/workers/chunks/33e86dd1a54e447fa0e3.js +0 -1
  247. package/assets/esri/core/workers/chunks/35c87b0a4d4ee7ce302d.js +0 -1
  248. package/assets/esri/core/workers/chunks/36b904912cea1744d1c6.js +0 -1
  249. package/assets/esri/core/workers/chunks/3df5394b17e9659ecb8f.js +0 -1
  250. package/assets/esri/core/workers/chunks/4adfe7f8a8efe2cd8e80.js +0 -1
  251. package/assets/esri/core/workers/chunks/5396a894e6f8030ca088.js +0 -1
  252. package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +0 -1
  253. package/assets/esri/core/workers/chunks/6adc17e6e287a365ad8d.js +0 -1
  254. package/assets/esri/core/workers/chunks/76ed8e455f6bd79e561c.js +0 -1
  255. package/assets/esri/core/workers/chunks/831455798b177678720c.js +0 -1
  256. package/assets/esri/core/workers/chunks/8ca88cfc0b9f84dc5832.js +0 -1
  257. package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +0 -1
  258. package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +0 -1
  259. package/assets/esri/core/workers/chunks/a40ede4d3375184f21fe.js +0 -1
  260. package/assets/esri/core/workers/chunks/af96cbc4fb7bef726635.js +0 -1
  261. package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +0 -1
  262. package/assets/esri/core/workers/chunks/f23351a04643c464be84.js +0 -1
  263. package/assets/esri/core/workers/chunks/f912c173c58ae4299cbe.js +0 -1
  264. package/assets/esri/core/workers/chunks/f93facf47aba9b128fcc.js +0 -1
  265. package/views/2d/engine/ManagedCanvas.js +0 -2
  266. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8119],{11221(e,t,r){r.d(t,{t1:()=>w,Jn:()=>A,Rn:()=>T,An:()=>v,rj:()=>b});var s=r(52106),n=r(48938),a=r(23732),i=r(87449),l=r(5482),o=r(93833),c=r(60999);class u{constructor(e,t){this._parent=e,this._abortSignal=t,this._done=!1,this._features=null,this._batchMutex=new c.aD,this._currentPage=null,this._pageCursor=-1}get _numAvailable(){return null==this._currentPage||this._pageCursor<0?0:Math.max(this._currentPage.length-this._pageCursor,0)}_takeNFeatures(e){if(null==this._currentPage)return[];const t=this._currentPage.slice(this._pageCursor,this._pageCursor+e);return this._pageCursor+=t.length,t.map(e=>s.A.fromJSON(e))}_takeOneFeature(){const e=this._currentPage[this._pageCursor];return this._pageCursor+=1,s.A.fromJSON(e)}async _nextBatch(){if(this._done)return!1;const e=await(this._features??=this._parent.queryAll(this._abortSignal));let t;do{if(t=await e.next(),t.done)return this._done=!0,this._currentPage=null,this._pageCursor=-1,!1}while(t.value.length<=0);return this._currentPage=t.value,this._pageCursor=0,!0}async nextBatchAsArcadeFeatures(e,t){const r=await this.nextBatch(e);return null==r?r:r.map(e=>o.Xj.createFromGraphicLikeObject(e.geometry,e.attributes,this._parent,t))}async nextBatch(e){const t={stack:[],error:void 0,hasError:!1};try{if(this._done)return null;if(e<=0)return[];if((0,l.mS)(t,await this._batchMutex.acquire(),!1),this._numAvailable>=e)return this._takeNFeatures(e);const r=[];let s=e;do{const e=this._takeNFeatures(s);s-=e.length,r.push(e)}while(s>0&&await this._nextBatch());const n=r.flat();return n.length>0?n:null}catch(e){t.error=e,t.hasError=!0}finally{(0,l.hk)(t)}}async next(){const e={stack:[],error:void 0,hasError:!1};try{return this._done?null:((0,l.mS)(e,await this._batchMutex.acquire(),!1),this._numAvailable>=1||await this._nextBatch()?this._takeOneFeature():null)}catch(t){e.error=t,e.hasError=!0}finally{(0,l.hk)(e)}}}var h=r(33325),d=r(50145),f=r(71163),p=r(5479),g=r(89696),m=r(16930),y=r(65864),_=r(95466);function b(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new i.dr("NeverReach")}}function T(e,t){for(const r of e)null!=r.geometry&&(r.geometry.spatialReference??=t)}const v=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class w{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_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 m.A({wkid:4326}),this.geometryType=h.ik.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=_.A.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>(0,p.N5)(e)));const t=(await this._allFeatures)();return null==e||e===n._?t:async function*(){for await(const r of t)(0,i.dZ)(e),yield r}()}async databaseType(){if(7===this._databaseType){if(null!==a.A.applicationCache){const e=a.A.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.A.applicationCache&&a.A.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.A.applicationCache&&a.A.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType;return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new i.dr("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(e){if(this._hasCachedFeatures)return this.iterator(e).next();const t=await this.query({limit:1,abortSignal:e});for await(const e of t.features)if(e.length>0)return s.A.fromJSON(e[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,r,s){await this._ensureLoaded();let n=await this.queryStat({stat:e,field:t,limit:r,abortSignal:s});return!1===n.calculated&&(n=await this._manualStat(e,t,r,s)),n.result}async _manualStat(e,t,r,s){let n=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const r of e)t+=r.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return n=await(0,d.dM)(this,t,r,s),{calculated:!0,result:n};case"avg":case"mean":return n=await(0,d.i2)(this,t,s),{calculated:!0,result:n};case"stdev":return n=await(0,d.b$)(this,t,s),{calculated:!0,result:n};case"variance":return n=await(0,d.GV)(this,t,s),{calculated:!0,result:n};case"sum":return n=await(0,d.cz)(this,t,s),{calculated:!0,result:n};case"min":return n=await(0,d.jk)(this,t,s),{calculated:!0,result:n};case"max":return n=await(0,d.T9)(this,t,s),{calculated:!0,result:n};default:return{calculated:!0,result:0}}}iterator(e){return new u(this,e)}async sumArea(e,t,r){let s=0;for await(const n of await this.queryAll(r))for(const r of n)null!=r.geometry&&(s+=null!=t?await(0,f.C)("geodeticArea",[r.geometry,e,t]):await(0,f.C)("area",[r.geometry,e]));return s}async sumLength(e,t,r){let s=0;for await(const n of await this.queryAll(r))for(const r of n)null!=r.geometry&&(s+=null!=t?await(0,f.C)("geodeticLength",[r.geometry,e,t]):await(0,f.C)("length",[r.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.A.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??n._)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,r,s,n){return this._parent.queryAttachments(e,t,r,s,n)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,h.nE)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===h.yT[this.geometryType]?"esriGeometryNull":h.yT[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const r of await this.queryAll(t))for(const t of r){const r={geometry:t.geometry??null,attributes:t.attributes};if(null!==r.geometry&&r.geometry.spatialReference){const{spatialReference:e,...t}=r.geometry;r.geometry=t}e.push(r)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const r=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?(0,y.rS)(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}r.push(s)}return{...this.schema(),features:r,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class A extends w{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}},23732(e,t,r){r.d(t,{A:()=>s});class s{static{this.applicationCache=null}constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}},87449(e,t,r){r.d(t,{dZ:()=>i,dr:()=>a});var s=r(799);const n={Cancelled:"Cancelled",InvalidStatResponse:"Invalid statistics response from service",InvalidRequest:"Invalid request",RequestFailed:"Request failed - {reason}",MissingFeatures:"Missing features",AggregationFieldNotFound:"Aggregation field not found",DataElementsNotFound:"Data elements not found on service",NeverReach:"Encountered unreachable logic",NotImplemented:"Not implemented"};class a extends Error{constructor(e,t){super((0,s.HC)(n[e],t)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,a)}}function i(e){if(null!=e&&e?.aborted)throw new a("Cancelled")}},80609(e,t,r){r.d(t,{C6:()=>T,DA:()=>S,F1:()=>_,F6:()=>g,IY:()=>v,Ju:()=>C,Kb:()=>f,Mi:()=>u,Nf:()=>y,R8:()=>m,YY:()=>c,bD:()=>h,bm:()=>b,kg:()=>d,oj:()=>F});var s=r(66131),n=r(33325),a=r(1262),i=r(15032),l=r(89696),o=r(92647);function c(e,t){return p(e?.parseTree,t,e?.parameters)}function u(e,t,r){return p(e,t,r)}function h(e,t,r,s){const n=p(e.parseTree,0,e.parameters,t,r);return l.A.create(n,{fieldsIndex:s,timeZone:e.timeZone,currentUser:e.currentUser})}function d(e,t,r="AND"){return l.A.create("(("+c(e,0)+")"+r+"("+c(t,0)+"))",{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser})}function f(e){return!0===e.delimited?`"${e.column.split('"').join('""')}"`:e.column}function p(e,t,r,s=null,i=null){let l,o,c,u;switch(e.type){case"interval":return F(p(e.value,t,r,s,i),e.qualifier,e.op);case"case-expression":{let n=" CASE ";"simple"===e.format&&(n+=p(e.operand,t,r,s,i));for(let a=0;a<e.clauses.length;a++)n+=" WHEN "+p(e.clauses[a].operand,t,r,s,i)+" THEN "+p(e.clauses[a].value,t,r,s,i);return null!==e.else&&(n+=" ELSE "+p(e.else,t,r,s,i)),n+=" END ",n}case"parameter":{const s=r[e.value.toLowerCase()];if("string"==typeof s)return"'"+r[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,n.$P)(s))return b(s,t);if((0,n.Lk)(s))return b(s,t);if((0,n.eg)(s))return _(s,t);if((0,n.rX)(s))return m(s,t);if((0,n.f0)(s))return y(s,t);if(Array.isArray(s)){const e=[];for(let r=0;r<s.length;r++)"string"==typeof s[r]?e.push("'"+s[r].toString().replaceAll("'","''")+"'"):(0,n.$P)(s[r])||(0,n.Lk)(s[r])?e.push(b(s[r],t)):(0,n.eg)(s[r])?e.push(_(s[r],t)):(0,n.rX)(s[r])?e.push(m(s[r],t)):(0,n.f0)(s[r])?e.push(y(s[r],t)):e.push(s[r].toString());return e}return s.toString()}case"expression-list":o=[];for(const n of e.value)o.push(p(n,t,r,s,i));return o;case"unary-expression":return" ( NOT "+p(e.expr,t,r,s,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+p(e.left,t,r,s,i)+" AND "+p(e.right,t,r,s,i)+") ";case"OR":return" ("+p(e.left,t,r,s,i)+" OR "+p(e.right,t,r,s,i)+") ";case"IS":if("null"!==e.right.type)throw new a.L("UnsupportedIsRhs");return" ("+p(e.left,t,r,s,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.L("UnsupportedIsRhs");return" ("+p(e.left,t,r,s,i)+" IS NOT NULL )";case"IN":return l=[],"expression-list"===e.right.type?(l=p(e.right,t,r,s,i)," ("+p(e.left,t,r,s,i)+" IN ("+l.join(",")+")) "):(u=p(e.right,t,r,s,i),Array.isArray(u)?" ("+p(e.left,t,r,s,i)+" IN ("+u.join(",")+")) ":" ("+p(e.left,t,r,s,i)+" IN ("+u+")) ");case"NOT IN":return l=[],"expression-list"===e.right.type?(l=p(e.right,t,r,s,i)," ("+p(e.left,t,r,s,i)+" NOT IN ("+l.join(",")+")) "):(u=p(e.right,t,r,s,i),Array.isArray(u)?" ("+p(e.left,t,r,s,i)+" NOT IN ("+u.join(",")+")) ":" ("+p(e.left,t,r,s,i)+" NOT IN ("+u+")) ");case"BETWEEN":return c=p(e.right,t,r,s,i)," ("+p(e.left,t,r,s,i)+" BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"NOTBETWEEN":return c=p(e.right,t,r,s,i)," ("+p(e.left,t,r,s,i)+" NOT BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"LIKE":return""!==e.escape?" ("+p(e.left,t,r,s,i)+" LIKE "+p(e.right,t,r,s,i)+" ESCAPE '"+e.escape+"') ":" ("+p(e.left,t,r,s,i)+" LIKE "+p(e.right,t,r,s,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+p(e.left,t,r,s,i)+" NOT LIKE "+p(e.right,t,r,s,i)+" ESCAPE '"+e.escape+"') ":" ("+p(e.left,t,r,s,i)+" NOT LIKE "+p(e.right,t,r,s,i)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+p(e.left,t,r,s,i)+" "+e.operator+" "+p(e.right,t,r,s,i)+") ";case"||":return" ("+p(e.left,t,r,s,i)+" "+(2===t?"+":e.operator)+" "+p(e.right,t,r,s,i)+") "}throw new a.L("UnsupportedOperator",{operator:e.operator});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 T(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return s&&s.toLowerCase()===e.column.toLowerCase()?"("+i+")":f(e);case"data-type":return e.value;case"function":{const n=p(e.args,t,r,s,i);return g(e.name,n,t)}}throw new a.L("UnsupportedSyntax",{node:e.type})}function g(e,t,r){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new a.L("InvalidFunctionParameters",{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new a.L("InvalidFunctionParameters",{function:"ceiling"});return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new a.L("InvalidFunctionParameters",{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new a.L("InvalidFunctionParameters",{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new a.L("InvalidFunctionParameters",{function:"truncate"});return 2===r?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new a.L("InvalidFunctionParameters",{function:"char_length"});switch(r){case 2:return"LEN("+t[0]+")";case 3:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new a.L("InvalidFunctionParameters",{function:e.toLowerCase()});let r=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(r+=","),r+=t[e];return r+=")",r}case"lower":case"lcase":if(1!==t.length)throw new a.L("InvalidFunctionParameters",{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new a.L("InvalidFunctionParameters",{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(r){case 3:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case 2:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(r){case 3:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case 4:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case 2:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new a.L("InvalidFunctionParameters",{function:e})}function m(e,t){const r=e.toDateTime(),s=0===r.hour&&0===r.minute&&0===r.second&&0===r.millisecond;switch(t){case 6:case 0:case 1:return s?`date '${r.toFormat("yyyy-LL-dd")}'`:`timestamp '${r.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case 3:return s?`TO_DATE('${r.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${r.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case 2:return`'${r.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case 5:return`#${r.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case 4:return`TIMESTAMP '${r.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`timestamp '${r.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function y(e,t){switch(t){case 6:case 0:case 1:default:return e.toSQLWithKeyword();case 3:return`TO_DATE('${e.toFormat("Y-MM-DD")}'`;case 2:return`'${e.toFormat("Y-MM-DD")}'`;case 5:return`#${e.toFormat("Y-MM-DD")}#`;case 4:return`TIMESTAMP '${e.toFormat("Y-MM-DD")}'`}}function _(e,t){switch(e instanceof i.k&&(e=e.toStorageString()),t){case 3:return`TO_DATE('${e}', 'HH24:MI:SS')`;case 2:return`'${e}'`;default:return`time '${e}'`}}function b(e,t){return m(s.lY.dateTimeToArcadeDate((0,n.Lk)(e)?e:o.c9.fromJSDate(e)),t)}function T(e,t){switch(t){case 6:case 0:case 1:case 3:case 5:default:return"date"===e?"CURRENT_DATE":"time"===e?"CURRENT_TIME":"CURRENT_TIMESTAMP";case 2:return"date"===e?"CAST(GETDATE() AS DATE)":"time"===e?"CAST(GETDATE() AS TIME)":"GETDATE()";case 4:return"date"===e?"CURRENT_DATE":"time"===e?"LOCALTIME":"CURRENT_TIMESTAMP"}}function v(e,t,r={}){const s={},n={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeBigInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeTimeOnly:"time-only",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimestampOffset:"timestamp-offset",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer","big-integer":"integer",single:"double","time-only":"time-only","date-only":"date-only","timestamp-offset":"timestemp-offset",double:"double",date:"date",guid:"guid","global-id":"guid",string:"string"};for(const e of t){const t=e.type?a[e.type]:void 0;s[e.name.toLowerCase()]=void 0===t?"":t}for(const e in r){const t=a[r[e]];n[e.toLowerCase()]=void 0===t?"":t}switch(w(s,e.parseTree,e.parameters,n)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"date-only":return"date-only";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function w(e,t,r,s){let i;switch(t.type){case"interval":return"integer";case"case-expression":{const n=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)n.push(w(e,t.clauses[a].value,r,s));null!==t.else&&n.push(w(e,t.else,r,s))}else{for(let a=0;a<t.clauses.length;a++)n.push(w(e,t.clauses[a].value,r,s));null!==t.else&&n.push(w(e,t.else,r,s))}return I(n)}case"parameter":{const e=s[t.value.toLowerCase()];if(void 0===e&&r){const e=r[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,n.$P)(e))return"date";if((0,n.rX)(e))return"date";if((0,n.f0)(e))return"date-only";if((0,n.eg)(e))return"time-only";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const n=[];for(const a of t.value)n.push(w(e,a,r,s));return n}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new a.L("UnsupportedIsRhs");return"boolean";case"*":case"-":case"+":case"/":return I([w(e,t.left,r,s),w(e,t.right,r,s)]);case"||":return"string";default:throw new a.L("UnsupportedOperator",{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":return"date";case"timestamp":return t.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"current-time":return"time"===t.mode?"time-only":"date";case"current-user":return"string";case"column-reference":{const r=e[t.column.toLowerCase()];return void 0===r?"":r}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return!0===t.args?.value[1]?.value?.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(i=w(e,t.args,r,s),Array.isArray(i)){if(i.length<=0)return"double";i=i[0]}return i;case"sign":return"integer";case"ceiling":case"floor":case"abs":return i=w(e,t.args,r,s),Array.isArray(i)&&(i=I(i)),"integer"===i||"double"===i?i:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return i=w(e,t.args,r,s),Array.isArray(i)?i.length>0?i[0]:"":i}return""}throw new a.L("UnsupportedSyntax",{node:t.type})}const A={boolean:1,string:2,integer:3,double:4,date:5};function I(e){if(e){let t="";for(const r of e)""!==r&&(t=""===t||A[t]<A[r]?r:t);return t}return""}function C(e,t){return E(e.parseTree,t)}function S(e){return"column-reference"===e?.parseTree.type}function E(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return E(e.operand,t)||E(e.value,t);case"case-expression":for(const r of e.clauses)if(E(r,t))return!0;return!("simple"!==e.format||!E(e.operand,t))||!(null===e.else||!E(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"time":case"string":case"number":return!1;case"expression-list":for(const r of e.value)if(E(r,t))return!0;return!1;case"unary-expression":return E(e.expr,t);case"binary-expression":return E(e.left,t)||E(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return E(e.args,t)}return!1}function L(e){let t="";return t+=e.period.toUpperCase(),t}function F(e,t,r){let s="";return s="interval-period"===t.type?L(t):L(t.start)+" TO "+L(t.end),"INTERVAL "+r+" "+e+" "+s}},50145(e,t,r){r.d(t,{Dp:()=>u,GV:()=>p,T9:()=>d,b$:()=>g,cz:()=>m,dM:()=>_,i2:()=>f,jk:()=>h});var s=r(87449),n=(r(33325),r(80609)),a=r(44729),i=r(55612),l=r(15032);function o(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/e.length}function c(e){const t=o(e);let r=0;for(let s=0;s<e.length;s++)r+=(t-e[s])**2;return r/(e.length-1)}function u(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return null}async function h(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.min.apply(Math,s)}async function d(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.max.apply(Math,s)}async function f(e,t,r){let s="";t&&!(0,n.DA)(t)&&(s=(0,n.IY)(t,e.fields));const a=await y(e,t,r);if(0===a.length)return null;const i=o(a);return null===i?i:"integer"===s?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(i):i}async function p(e,t,r){const s=await y(e,t,r);return 0===s.length?null:c(s)}async function g(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.sqrt(c(s))}async function m(e,t,r){const s=await y(e,t,r);return 0===s.length?null:function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t}(s)}async function y(e,t,r){const n=await e.queryAll(r),o=[],c={ticker:0};for await(const e of n){if(c.ticker+=e.length,c.ticker>=100&&(c.ticker=0,await new Promise(e=>{setTimeout(e,0)})),r?.aborted)throw new s.dr("Cancelled");for(const r of e){const e=t?.calculateValue(r);null===e||(o[o.length]=e instanceof a.n||e instanceof l.k?e.toNumber():e instanceof i.g?e.toMilliseconds():e)}}return o}async function _(e,t,r=1e3,n=null){if(null==t)return[];const o=await e.queryAll(n),c=[],u=new Set,h={ticker:0};for await(const e of o){if(h.ticker+=e.length,h.ticker>=100&&(h.ticker=0,await new Promise(e=>{setTimeout(e,0)})),n?.aborted)throw new s.dr("Cancelled");for(const s of e){const e=t.calculateValue(s);let n=e;if(e instanceof a.n?n="!!DATEONLY!!-"+e.toString():e instanceof i.g?n="!!TSOFFSETONLY!!-"+e.toString():e instanceof l.k?n="!!TIMEONLY!!-"+e.toString():e instanceof Date&&(n="!!DATE!!-"+e.toString()),null!=e&&(u.has(n)||(c.push(e),u.add(n))),c.length>=r&&-1!==r)return c}}return c}},71163(e,t,r){r.d(t,{C:()=>o});var s=r(29953);let n,a,i=!1;function l(){return n??=(0,s.ho)("arcadeGeometryOperatorsWorker").then(e=>{a=e,i=!0,n=void 0})}async function o(e,t){return i?a.apply("invokeGeometryOp",[e,t]):(await l(),o(e,t))}},69540(e,t,r){r.d(t,{OU:()=>u,Pw:()=>h});var s=r(5482),n=r(69622),a=(r(44208),r(4718)),i=(r(53966),r(97768)),l=r(88620),o=r(64108);const c=Symbol("ClonableMixin"),u=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,l.oY)(this);(0,i.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,s=t.store,n={},o=new Map;for(const t in r){const i=r[t],l=s?.originOf(t),c=i.clonable;if(i.readOnly||!1===c||7!==l&&0!==l&&5!==l&&4!==l)continue;const u=this[t];let h=null;if("function"==typeof c)h=c(u,e);else if("reference"===c)h=u;else if(h=(0,a.TU)(u,e),null!=u&&null==h)continue;0===l?o.set(t,h):n[t]=h}const c=new(0,Object.getPrototypeOf(this).constructor)(n);if(o.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,r]of o)e.set(t,r,0)}return c}};return n=(0,s.Cg)([(0,o.$)("esri.core.Clonable")],n),n},h=u(n.A)},7762(e,t,r){r.d(t,{A:()=>O});var s,n=r(5482),a=r(98291),i=r(4576),l=r(65529),o=r(36563),c=r(4718),u=r(53966),h=r(93687),d=r(76030),f=r(56507),p=r(62788),g=r(10107),m=r(7695),y=r(64108),_=r(95488),b=r(12195);class T{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class v{constructor(e,t,r,s,n){this.target=e,this.added=t,this.removed=r,this.start=s,this.deleteCount=n}}const w=new h.A(()=>new T,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function A(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function I(e){return e?e instanceof M?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function C(e){if(e?.length)return e[0]}function S(e,t,r,s){const n=Math.min(e.length-r,t.length-s);let a=0;for(;a<n&&e[r+a]===t[s+a];)a++;return a}function E(e,t,r,s){t&&t.forEach((t,n,a)=>{e.push(t),E(e,r.call(s,t,n,a),r,s)})}const L=new Set,F=new Set,N=new Set,R=new Map;let D=0,M=s=class extends l.nJ{static ofType(e){if(!e)return s;if(R.has(e))return R.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const s=e.typeMap[r].prototype.declaredClass;t?t+=` | ${s}`:t=s}let r=class extends s{};return(0,n.Cg)([(0,m.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],r.prototype,"itemType",void 0),r=(0,n.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],r),R.set(e,r),r}static isCollection(e){return null!=e&&e instanceof s}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:D++})}normalizeCtorArgs(e){return e?(0,i.yc)(e)||e instanceof s?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?u.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,p.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,I(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,o.hA)();if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,o.hA)(()=>{r.removed=!0,e.splice(e.indexOf(r),1)})}return super.on(e,t)}once(e,t){const r="deref"in t?()=>t.deref():()=>t,s=this.on(e,e=>{r()?.call(null,e),s.remove()});return s}add(e,t){if((0,p.gc)(this._observable),this._emitBeforeChanges(1))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,p.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const r=this.getNextIndex(t);return this._splice(r,0,I(e)),this._emitAfterChanges(1),this}at(e){if((0,p.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,p.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,p.gc)(this._observable);const t=e.map(I);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const r=this._splice(0,this.length),s=r.length;for(let n=0;n<s;n++)e.call(t,r[n],n,r);this._emitAfterChanges(2)}destroyAll(){this.drain(A)}destroyMany(e){const t=this.removeMany(e);return t.forEach(A),t}every(e,t){return(0,p.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,p.gc)(this._observable);const r=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:r})}find(e,t){return(0,p.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,p.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,p.gc)(this._observable);const r=[];return E(r,this,e,t),new s(r)}forEach(e,t){return(0,p.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,p.gc)(this._observable),this._items[e]}getNextIndex(e){(0,p.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,p.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,p.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,p.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,p.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,p.gc)(this._observable);const r=this._items.map(e,t);return new s({items:r})}reorder(e,t=this.length-1){(0,p.gc)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(4))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=C(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,p.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,p.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,p.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,p.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,p.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=C(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,p.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof s?e.toArray():e,r=this._items,n=[],a=t.length;for(let e=0;e<a;e++){const s=t[e],a=r.indexOf(s);if(a>-1){const s=1+S(t,r,e+1,a+1),i=this._splice(a,s);i&&i.length>0&&n.push.apply(n,i),e+=s-1}}return this._emitAfterChanges(2),n}reverse(){if((0,p.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=C(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,p.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,p.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let r=0;r<t;r++)if(e(this.items[r],this.items[r+1])>0)return!0;return!1}splice(e,t,...r){(0,p.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?2:0)|(r.length?1:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,p.gc)(this._observable),this._items.slice()}toJSON(e){return(0,p.gc)(this._observable),this.toArray().map(t=>(0,b.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,p.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,p.gc)(this._observable),this._items.toString()}unshift(...e){return(0,p.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const s=this._items,n=this.itemType;let a,i;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(i=s.splice(e,t),this.hasEventListener("before-remove")){const t=w.acquire();t.target=this,t.cancellable=!0;for(let r=0,n=i.length;r<n;r++)a=i[r],t.reset(a),this.emit("before-remove",t),t.defaultPrevented&&(i.splice(r,1),s.splice(e,0,a),e+=1,r-=1,n-=1);w.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=w.acquire();e.target=this,e.cancellable=!1;const t=i.length;for(let r=0;r<t;r++)e.reset(i[r]),this.emit("after-remove",e);w.release(e)}}if(r?.length){if(n){const e=[];for(const t of r){const r=n.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),a=this.hasEventListener("after-add"),i=e===this.length;if(t||a){const n=w.acquire();n.target=this,n.cancellable=!0;const l=w.acquire();l.target=this,l.cancellable=!1;for(const o of r)t?(n.reset(o),this.emit("before-add",n),n.defaultPrevented||(i?s.push(o):s.splice(e++,0,o),this._length=s.length,a&&(l.reset(o),this.emit("after-add",l)))):(i?s.push(o):s.splice(e++,0,o),this._length=s.length,l.reset(o),this.emit("after-add",l));w.release(l),w.release(n)}else{if(i)for(const e of r)s.push(e);else s.splice(e,0,...r);this._length=s.length}}if((r?.length||i?.length)&&this._notifyChangeEvent(r,i),this.hasEventListener("after-splice")){const s=new v(this,r,i,e,t);this.emit("after-splice",s)}return i}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=w.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,w.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=w.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),w.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;L.clear(),F.clear(),N.clear();for(const{added:t,removed:r}of e){if(t)if(0===N.size&&0===F.size)for(const e of t)L.add(e);else for(const e of t)F.has(e)?(N.add(e),F.delete(e)):N.has(e)||L.add(e);if(r)if(0===N.size&&0===L.size)for(const e of r)F.add(e);else for(const e of r)L.has(e)?L.delete(e):(N.delete(e),F.add(e))}const r=a.A.acquire();L.forEach(e=>{r.push(e)});const s=a.A.acquire();F.forEach(e=>{s.push(e)});const n=this._items,i=t.items,l=a.A.acquire();if(N.forEach(e=>{i.indexOf(e)!==n.indexOf(e)&&l.push(e)}),t.listeners&&(r.length||s.length||l.length)){const e={target:this,added:r,removed:s,moved:l},n=t.listeners.length;for(let r=0;r<n;r++){const s=t.listeners[r];s.removed||s.callback.call(this,e)}}a.A.release(r),a.A.release(s),a.A.release(l)}L.clear(),F.clear(),N.clear()}};(0,n.Cg)([(0,g.MZ)()],M.prototype,"_updating",void 0),(0,n.Cg)([(0,g.MZ)()],M.prototype,"_length",void 0),(0,n.Cg)([(0,g.MZ)()],M.prototype,"length",null),(0,n.Cg)([(0,g.MZ)()],M.prototype,"items",null),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],M.prototype,"updating",null),M=s=(0,n.Cg)([(0,y.$)("esri.core.Collection")],M);const O=M},4902(e,t,r){r.d(t,{s:()=>i});var s=r(5482),n=r(64108);let a=0;const i=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+a++})}};return r=(0,s.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};i(class{})},7695(e,t,r){function s(e){return(t,r)=>{t[r]=e}}r.d(t,{u:()=>s})},36708(e,t,r){r.d(t,{C_:()=>d,OH:()=>g,Vh:()=>m,on:()=>h,pc:()=>y,wB:()=>o,z7:()=>c});var s=r(37955),n=r(36563),a=r(97768),i=r(17676),l=r(14012);function o(e,t,r={}){return u(e,t,r,f)}function c(e,t,r={}){return u(e,t,r,p)}function u(e,t,r={},s){let n=null;const i=r.once?(e,r)=>{s(e)&&((0,a.xt)(n),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(n=(0,l.Cn)(e,i,r.sync,r.equals),r.initial){const t=e();i(t,t)}return n}function h(e,t,r,i={}){let l=null,c=null,u=null;function h(){l&&c&&(c.remove(),i.onListenerRemove?.(l),l=null,c=null)}function d(e){i.once&&i.once&&(0,a.xt)(u),r(e)}const f=o(e,(e,r)=>{h(),(0,s.wb)(e)&&(l=e,c=(0,s.on)(e,t,d),i.onListenerAdd?.(e))},{sync:i.sync,initial:!0});return u=(0,n.hA)(()=>{f.remove(),h()}),u}function d(e,t){return function(e,t,r){if((0,i.G4)(r))return Promise.reject((0,i.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let l=null;function o(){l=(0,a.xt)(l)}return new Promise((s,a)=>{l=(0,n.vE)([(0,i.u7)(r,()=>{o(),a((0,i.NK)())}),u(e,e=>{o(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3650],{85334(e,t,r){r.d(t,{$:()=>M,IB:()=>s,Iy:()=>x,N2:()=>g,RH:()=>v,ZD:()=>b});var n=r(68197),o=r(4576),i=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function c(e){return"l"in e&&"a"in e&&"b"in e}function l(e){return"l"in e&&"c"in e&&"h"in e}r(34727),r(78955),r(91829);const f=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],u=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function p(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw new Error("dimensions do not match");const i=e.length,s=e[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=e[n][o]*t[o];r.push(a)}return r}function m(e){const t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=p(f,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(e){const t=p(u,[e.x/100,e.y/100,e.z/100]).map(e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function y(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function d(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function M(e){return s(e)?e:l(e)?function(e){return h(d(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):c(e)?function(e){return h(d(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(e):e}function g(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let s=o,a=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,c=0===i?0:i/s;return a<0&&(a+=6),a*=60,c*=100,s*=100/255,{h:a,s:c,v:s}}(M(e))}function b(e){return c(e)?e:function(e){return y(m(e))}(M(e))}function v(e){return l(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}(y(m(e)))}(M(e))}function x(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new n.A(e):e)).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,o.k4)((0,i.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let o=0;o<t;o++){const t=Math.round(o*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],i=e.length-1,s=Math.ceil((t-e.length)/i);e:for(let o=0;o<i;o++){const i=e[o],a=e[o+1];for(let o=1;o<=s;o++){const c=o/(s+1);if(n.push(k(i,a,c,r)),n.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,o.k4)(n,r.seed??1)]}(e,t,r)}const C=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function k(e,t,r,i={}){const s=e.r,a=e.g,c=e.b,l=t.r,f=t.g,u=t.b,p=Math.round(s+(l-s)*r),m=Math.round(a+(f-a)*r),h=Math.round(c+(u-c)*r);if(!i.offset)return new n.A([p,m,h]);const y=(0,o.Mo)(i.seed);return new n.A([C(p,y),C(m,y),C(h,y)])}},62577(e,t,r){function n(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function o(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:r,translate:n}=e,o=r[0]??1,i=r[1]??1;return{originPosition:"lowerLeft",scale:[o,"lowerLeft"===t?i:-i,r[2]??1,r[3]??1],translate:[n[0]??0,n[1]??0,n[2]??0,n[3]??0]}}function i({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function s({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function a({scale:e,translate:t},r){return r*e[0]+t[0]}function c({scale:e,translate:t},r){return r*e[1]+t[1]}function l({scale:e,translate:t},r){return(r??0)*e[2]+t[2]}function f({scale:e,translate:t},r){return r?r*e[3]+t[3]:0}function u(e,t){return e&&t?y:e&&!t?m:!e&&t?h:p}r.d(t,{$X:()=>v,B2:()=>s,Gy:()=>M,IE:()=>i,P5:()=>x,Q1:()=>o,SW:()=>g,Tr:()=>b,VV:()=>n});const p=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let o=a(e,n[0]),i=c(e,n[1]);r[0]=[o,i];const{scale:s,originPosition:l}=e,f=s[0],u="lowerLeft"===l?s[1]:-s[1];for(let e=1;e<t.length;e++){const[n,s]=t[e];o+=f*n,i+=u*s,r[e]=[o,i]}return r},m=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let o=a(e,n[0]),i=c(e,n[1]);r[0]=[o,i,l(e,n[2])];const{scale:s,originPosition:f}=e,u=s[0],p="lowerLeft"===f?s[1]:-s[1];for(let n=1;n<t.length;n++){const[s,a,c]=t[n];o+=u*s,i+=p*a,r[n]=[o,i,l(e,c)]}return r},h=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let o=a(e,n[0]),i=c(e,n[1]);r[0]=[o,i,f(e,n[2])];const{scale:s,originPosition:l}=e,u=s[0],p="lowerLeft"===l?s[1]:-s[1];for(let n=1;n<t.length;n++){const[s,a,c]=t[n];o+=u*s,i+=p*a,r[n]=[o,i,f(e,c)]}return r},y=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let o=a(e,n[0]),i=c(e,n[1]);r[0]=[o,i,l(e,n[2]),f(e,n[3])];const{scale:s,originPosition:u}=e,p=s[0],m="lowerLeft"===u?s[1]:-s[1];for(let n=1;n<t.length;n++){const[s,a,c,u]=t[n];o+=p*s,i+=m*a,r[n]=[o,i,l(e,c),f(e,u)]}return r};function d(e,t,r){const n=new Array(r.length);for(let o=0;o<r.length;o++)n[o]=t(e,r[o]);return n}function M(e,t,r){const n=o(e);return t.x=i(n,r.x),t.y=s(n,r.y),null!=r.z&&(t.z=function({scale:e,translate:t},r){return Math.round(((r??0)-t[2])/e[2])}(n,r.z)),null!=r.m&&(t.m=function({scale:e,translate:t},r){return r?Math.round((r-t[3])/e[3]):0}(n,r.m)),t}function g(e,t,r,n=r?.hasZ??!1,i=r?.hasM??!1){if(null!=r){const s=o(e);t.points=u(n,i)(s,r.points),t.hasZ=n,t.hasM=i}return t}function b(e,t,r,n=null!=r?.z,i=null!=r?.m){if(null==r)return t;const s=o(e);return t.x=a(s,r.x),t.y=c(s,r.y),n&&(t.z=l(s,r.z)),i&&(t.m=f(s,r.m)),t}function v(e,t,r,n=r?.hasZ??!1,i=r?.hasM??!1){if(null!=r){const s=o(e);t.rings=d(s,u(n,i),r.rings),t.hasZ=n,t.hasM=i}return t}function x(e,t,r,n=r?.hasZ??!1,i=r?.hasM??!1){if(null!=r){const s=o(e);t.paths=d(s,u(n,i),r.paths),t.hasZ=n,t.hasM=i}return t}},23650(e,t,r){r.d(t,{OverrideHelper:()=>u});var n=r(68197),o=r(85334),i=r(4718),s=r(95466),a=r(55674),c=r(93397),l=r(37615);const f=e=>{if(!e)return[0,0,0,0];const{r:t,g:r,b:n,a:o}=e;return[t,r,n,255*o]};class u{static findApplicableOverrides(e,t,r){if(e&&t){if(e.primitiveName){let n=!1;for(const t of r)if(t.primitiveName===e.primitiveName){n=!0;break}if(!n)for(const n of t)n.primitiveName===e.primitiveName&&r.push(n)}switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(e.effects)for(const n of e.effects)u.findApplicableOverrides(n,t,r);if(e.symbolLayers)for(const n of e.symbolLayers)u.findApplicableOverrides(n,t,r);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMVectorMarker":case"CIMCharacterMarker":case"CIMPictureMarker":if(e.effects)for(const n of e.effects)u.findApplicableOverrides(n,t,r);if(e.markerPlacement&&u.findApplicableOverrides(e.markerPlacement,t,r),"CIMVectorMarker"===e.type){if(e.markerGraphics)for(const n of e.markerGraphics)u.findApplicableOverrides(n,t,r),u.findApplicableOverrides(n.symbol,t,r)}else"CIMCharacterMarker"===e.type?u.findApplicableOverrides(e.symbol,t,r):"CIMHatchFill"===e.type?u.findApplicableOverrides(e.lineSymbol,t,r):"CIMPictureMarker"===e.type&&u.findApplicableOverrides(e.animatedSymbolProperties,t,r)}}}static findEffectOverrides(e,t){if(!e)return null;if("CIMGeometricEffectDashes"===e.type&&(0,c.FH)(e),!t||!e.primitiveName)return{type:"cim-effect-param",effect:e,overrides:[]};const r=(0,c.rB)(e),n=e.primitiveName,o=[];for(const e of t)e.primitiveName===n&&o.push((0,c.rB)(e));return{type:"cim-effect-param",effect:r,overrides:(0,c.pk)(o)}}static async resolveSymbolOverrides(e,t,r,n,o,a,l){if(!e?.symbol)return null;let{symbol:f,primitiveOverrides:p}=e;const m=!!p;if(!m&&!n)return f;f=(0,i.o8)(f),p=(0,i.o8)(p);let h=!0;if(t||(t={attributes:{}},h=!1),m){if(h||(p=p.filter(e=>!e.valueExpressionInfo?.expression.includes("$feature"))),l||(p=p.filter(e=>!e.valueExpressionInfo?.expression.includes("$view"))),p.length>0){const e=(0,c.O2)(t.attributes),n={spatialReference:r,fields:e,geometryType:o};await u.createRenderExpressions(p,n),u.evaluateOverrides(p,t,o??"esriGeometryPoint",a,l,new s.A(e))}u.applyOverrides(f,p)}return n&&u.applyDictionaryTextOverrides(f,t,n,null),f}static{this._expressionToRenderExpression=new Map}static async createRenderExpressions(e,t){const r=[];for(const n of e){const e=n.valueExpressionInfo;if(!e||u._expressionToRenderExpression.has(e.expression))continue;const o=(0,a.Ad)(e.expression,t.spatialReference);r.push(o),o.then(t=>u._expressionToRenderExpression.set(e.expression,t))}r.length>0&&await Promise.all(r)}static evaluateOverrides(e,t,r,n,i,s){const a={$view:{scale:i?.scale}};for(const i of e){i.value&&"object"==typeof i.value&&(0,o.IB)(i.value)&&("Color"===i.propertyName||"StrokeColor"===i.propertyName)&&(i.value=f(i.value));const e=i.valueExpressionInfo;if(!e)continue;const c=u._expressionToRenderExpression.get(e.expression);c&&(i.value=(0,l.A)(c,t,a,r,s,n))}}static applyDictionaryTextOverrides(e,t,r,n,o="Normal"){if(e?.type)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":case"CIMTextSymbol":{const i=e.symbolLayers;if(!i)return;for(const s of i)s&&"CIMVectorMarker"===s.type&&u.applyDictionaryTextOverrides(s,t,r,n,"CIMTextSymbol"===e.type?e.textCase:o)}break;case"CIMVectorMarker":{const o=e.markerGraphics;if(!o)return;for(const e of o)e&&u.applyDictionaryTextOverrides(e,t,r,n)}break;case"CIMMarkerGraphic":{const i=e.textString;if(i&&i.includes("[")){const s=(0,c.gQ)(i,r);e.textString=(0,c.FM)(t,s,n,o)}}}}static applyOverrides(e,t,r,n){if(e.primitiveName)for(const o of t)if(o.primitiveName===e.primitiveName){const t=(0,c.YF)(o.propertyName);if(n&&n.push({cim:e,nocapPropertyName:t,value:e[t]}),r){let t=!1;for(const n of r)n.primitiveName===e.primitiveName&&(t=!0);t||r.push(o)}null!=o.value&&(e[t]=o.value)}switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(e.effects)for(const o of e.effects)u.applyOverrides(o,t,r,n);if(e.symbolLayers)for(const o of e.symbolLayers)u.applyOverrides(o,t,r,n);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMSolidFill":case"CIMVectorMarker":if(e.effects)for(const o of e.effects)u.applyOverrides(o,t,r,n);if("CIMVectorMarker"===e.type&&e.markerGraphics)for(const o of e.markerGraphics)u.applyOverrides(o,t,r,n),u.applyOverrides(o.symbol,t,r,n)}}static restoreOverrides(e){for(const t of e)t.cim[t.nocapPropertyName]=t.value}static buildOverrideKey(e){let t="";for(const r of e)void 0!==r.value&&(t+=`${r.primitiveName}${r.propertyName}${JSON.stringify(r.value)}`);return t}static toValue(e,t){if("DashTemplate"===e)return t.split(" ").map(e=>Number(e));if("Color"===e){const e=new n.A(t).toRgba();return e[3]*=255,e}return t}}},37615(e,t,r){r.d(t,{A:()=>s});var n=r(49186),o=r(53966),i=r(62577);function s(e,t,r,n,i,s){if(null==e)return null;const a=e.references("geometry")&&s?c(t,n,s):t,l=e.repurposeFeature(a,i);try{return e.evaluate(l,r)}catch(e){return o.A.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",e),null}}const a=new Map;function c(e,t,r){const{transform:s,hasZ:c,hasM:l}=r;a.has(t)||a.set(t,function(e){const t={};switch(e){case"esriGeometryPoint":return(e,r,n,o)=>(0,i.Tr)(r,t,e,n,o);case"esriGeometryPolygon":return(e,r,n,o)=>(0,i.$X)(r,t,e,n,o);case"esriGeometryPolyline":return(e,r,n,o)=>(0,i.P5)(r,t,e,n,o);case"esriGeometryMultipoint":return(e,r,n,o)=>(0,i.SW)(r,t,e,n,o);default:return o.A.getLogger("esri.views.2d.support.arcadeOnDemand").error(new n.A("mapview-arcade",`Unable to handle geometryType: ${e}`)),e=>e}}(t));const f=a.get(t)(e.geometry,s,c,l);return{...e,geometry:f}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3781],{83027(e,t,i){i.d(t,{h:()=>r});const r=i(29953).ho},53781(e,t,i){i.r(t),i.d(t,{default:()=>Be});var r=i(5482),s=i(37838),o=i(11254),n=i(69540),a=i(7762),l=i(49186),u=i(36563),d=i(4718),p=i(53966),y=i(97768),c=i(25728),h=i(93637),g=i(17676),f=i(39516),m=i(91429),b=i(89317),w=i(78247),v=i(16930),C=i(55156),T=i(60950),F=i(89808),M=i(99959);const S=Symbol("isFeatureGraphicOrigin");var I;class _ extends M.A{get[(I=S,T.ym)](){return this.layer}get[C.e](){return this.layer}get[F.Q](){return this.layer}constructor(e){super(),this[I]=!0,this.type="feature",this.layer=e}get id(){return this.layer.id}}var O=i(4146),E=i(52106),Z=i(44208),j=i(92474),D=i(61893),A=i(83027),q=i(56507),L=i(5443),P=i(39829),x=i(50498),R=i(54339),G=i(96520),k=i(22671),N=i(7695);let J=0,V=class extends((0,j.WV)((0,D.g)(a.A))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t),r=k.A.fromJSON(i);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return r;const s=this.layer.objectIdField;for(const e of r.features){const t=e.attributes[s],i=this._idToClientGeometry.get(t);void 0!==i&&(e.geometry=i)}return r.geometryType=this.layer.geometryType,r}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new l.A("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");return await this.load(t),await this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:L.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){await this.load();const r=await this._connection.invoke("queryAttributeBins",e?.toJSON(),t);return(await i.e(7745).then(i.bind(i,37745))).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new l.A("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,i=this.layer.uniqueIdFields;let r=null;const s=[],o=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const n=e=>i?.length&&"attributes"in e?(0,R.r)(e,this.layer):"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=n(t);null!=e&&s.push(e)}const a=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(o.push(this._serializeFeature(t)),a&&null!=t.geometry){const e=n(t);null!=e&&a.set(e,t)}(0,G.u)(r?r.features:null,o,this.layer.spatialReference);const{fullExtent:u,featureEditResults:d}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:o,deletes:s});return this.fullExtent=u,r&&r.finish(d.uidToObjectId),this._updateIdToClientGeometries(a,d),this._createEditsResult(d)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const i=[];for(const{geometry:r}of e)null==r||"mesh"!==r.type||r.hasExtent||r.loaded||i.push(r.load({signal:t}));i.length&&await Promise.all(i)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const i of t.updateResults){if(!i.success)continue;const t=e.get(i.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,i=new Array(e.length);let r=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);r||null==o.geometry||(r=o.geometry.type),i[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:i,inferredGeometryType:r,finish(e){const i=s.sourceJSON.objectIdField;for(const r in e){const o=e[r],n=t.get(r);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[i]:n.attributes[i]=o,s._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,i=e.attributes?.[t];null!=i&&this._idToClientGeometry.set(i,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,i=this._geometryForSerialization(e),r=(J++).toString();return i?{uid:r,geometry:i.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?P.A.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,A.h)("MemorySourceWorker",{strategy:(0,Z.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:i,objectIdField:r,hasM:s,hasZ:o,timeInfo:n,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{p.A.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const{uniqueIdFields:d}=this.layer,y=d?.length?{type:d.length>1?"composite":"simple",fields:d.slice(),OIDFieldContainsHashValue:!(1===d?.length&&d.at(0)===this.layer.objectIdField)}:void 0,c={features:u.features,fields:t?.map(e=>e.toJSON()),geometryType:x.Ye.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:r,spatialReference:l?null:i&&i.toJSON(),timeInfo:n?.toJSON()??null,dateFieldsTimeZone:a,uniqueIdInfo:y},h=await this._connection.invoke("load",c,{signal:e});for(const e of h.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});h.featureErrors.length&&p.A.getLogger(this.layer).error("#load()",`Failed to load ${h.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,h.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const g=h.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(g.geometryType=x.Ye.toJSON(u.inferredGeometryType)),this.sourceJSON=g,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),u.finish(h.assignedObjectIds)}};(0,r.Cg)([(0,N.u)({Type:E.A,ensureType:(0,q.dp)(E.A)})],V.prototype,"itemType",void 0),(0,r.Cg)([(0,m.MZ)()],V.prototype,"type",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],V.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],V.prototype,"_workerGeometryType",null),(0,r.Cg)([(0,m.MZ)()],V.prototype,"sourceJSON",void 0),V=(0,r.Cg)([(0,m.$K)("esri.layers.graphics.sources.MemorySource")],V);var K=i(52136),$=i(18768),U=i(63074),Q=i(69208),B=i(25482);let W=class extends((0,n.OU)(B.o)){constructor(e){super(e),this.fieldName=null,this.timeValue=null}};(0,r.Cg)([(0,m.MZ)({type:String,json:{write:{isRequired:!0}}})],W.prototype,"fieldName",void 0),(0,r.Cg)([(0,m.MZ)({type:String,json:{write:{isRequired:!0}}})],W.prototype,"timeValue",void 0),W=(0,r.Cg)([(0,m.$K)("esri.layers.support.TimeSeriesFieldTimeMapping")],W);const z=W;var H=i(79677);let Y=class extends((0,n.OU)(B.o)){constructor(e){super(e),this.name=null,this.fieldTimeMappings=null,this.timeExtent=null,this.timeInterval=null,this.timeIntervalUnits=null,this.timeValueUnits=null,this.title=null,this.type="time-series-fields"}};(0,r.Cg)([(0,m.MZ)({type:String,json:{write:{isRequired:!0}}})],Y.prototype,"name",void 0),(0,r.Cg)([(0,m.MZ)({type:[z],json:{write:{isRequired:!0}}})],Y.prototype,"fieldTimeMappings",void 0),(0,r.Cg)([(0,m.MZ)({type:H.A,json:{write:!0}})],Y.prototype,"timeExtent",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{write:{isRequired:!0}}})],Y.prototype,"timeInterval",void 0),(0,r.Cg)([(0,m.MZ)({type:String,json:{write:{isRequired:!0}}})],Y.prototype,"timeIntervalUnits",void 0),(0,r.Cg)([(0,m.MZ)({type:String,json:{write:{isRequired:!0}}})],Y.prototype,"timeValueUnits",void 0),(0,r.Cg)([(0,m.MZ)({type:String,json:{write:!0}})],Y.prototype,"title",void 0),(0,r.Cg)([(0,m.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,r.Cg)([(0,m.$K)("esri.layers.support.TimeSeriesInfo")],Y);const X=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.dataSeriesInfos=null}};return(0,r.Cg)([(0,m.MZ)({type:[Y],json:{write:{enabled:!0,allowNull:!0,layerContainerTypes:b.K},origins:{"web-scene":{write:!1,read:!1}}}})],i.prototype,"dataSeriesInfos",void 0),i=(0,r.Cg)([(0,m.$K)("esri.layers.mixins.DataSeriesLayer")],i),i};var ee=i(6455),te=i(47685),ie=i(87718),re=i(10086),se=i(56658),oe=i(34287),ne=i(32756),ae=i(8303),le=i(69622);let ue=class extends le.A{constructor(e){super(e),this.updating=!1,this.status="unknown"}};(0,r.Cg)([(0,m.MZ)()],ue.prototype,"updating",void 0),(0,r.Cg)([(0,m.MZ)()],ue.prototype,"status",void 0),ue=(0,r.Cg)([(0,m.$K)("esri.layers.support.PublishingInfo")],ue);const de=Symbol(),pe=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=de}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ue;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const i=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),r.remove()),e.status=o,e.updating=!1,r.removed||(t=setTimeout(i,s,s+125))},r={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch(()=>r.remove()),i(250),this.addHandles(r)}};return(0,r.Cg)([(0,m.MZ)({readOnly:!0,clonable:!1})],s.prototype,"publishingInfo",null),s=(0,r.Cg)([(0,m.$K)("esri.layers.mixins.PublishableLayer")],s),s};var ye=i(54310),ce=i(25036),he=i(82935),ge=i(63396),fe=i(60694),me=i(10873),be=i(15426),we=i(29005),ve=i(33143),Ce=i(30279),Te=i(16194),Fe=i(17036),Me=i(30524),Se=i(46499),Ie=i(39383),_e=i(6666);let Oe=class extends((0,n.OU)(B.o)){constructor(e){super(e),this.enabled=!1,this.drawOrder=[]}};(0,r.Cg)([(0,m.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Oe.prototype,"enabled",void 0),(0,r.Cg)([(0,m.MZ)({type:[String],json:{write:!0,origins:{"web-scene":{write:!1}}}})],Oe.prototype,"drawOrder",void 0),Oe=(0,r.Cg)([(0,m.$K)("esri.layers.support.SymbolLayerDrawing")],Oe);var Ee=i(96184),Ze=i(17311),je=i(91908),De=i(65494),Ae=i(8947),qe=i(41214),Le=i(65615),Pe=i(97552),xe=i(54218),Re=i(30291),Ge=i(33910),ke=i(78553),Ne=i(59923),Je=i(36005),Ve=i(43937);const Ke="FeatureLayer";function $e(e){return e&&e instanceof a.A}const Ue=(0,Fe.p)();function Qe(e,t,i){const r=!!i?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let Be=class extends((0,re.j)((0,se.J)((0,ie.F)(pe((0,te.w6)((0,ee.FJ)((0,U.dM)((0,ne.fY)((0,he.e)(X((0,ge.d)((0,ce.j)((0,ye.J)((0,$.b)((0,oe.q)((0,ae.A)((0,c.M)((0,Q.d)((0,K.p)((0,n.OU)(O.A))))))))))))))))))))){constructor(...e){super(...e),this._debounceReload=(0,g.sg)(async()=>{if(this.destroyed||!this.loaded||this._hasMemorySource())return!1;const e=new AbortController,t=(0,u.rE)(e);this.addHandles(t,"reload"),this._set("reloading",!0);try{const t=await this.reloadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]});return t&&(this.sourceJSON=null,await this.initLayerProperties(await this.createGraphicsSource(e.signal))),e.signal.throwIfAborted(),t}finally{this.removeHandles("reload"),this._set("reloading",!1)}}),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new _(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.symbolLayerDrawing=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.reloading=!1,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=v.A.WGS84,this.subtypeCode=null,this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,g.sg)(async(e,t,r)=>{const{save:s,saveAs:o}=await i.e(3359).then(i.bind(i,33359));switch(e){case 0:return s(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const i=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(g.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new l.A("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,be.VA)(this,"load",e));return this.addResolvingPromise(i),Promise.resolve(this)}reload(){return this._debounceReload()}get _titleCreator(){const e=this._get("_titleCreator");return(0,y.pR)(e),new Ze.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,(0,_e.S$)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,i){return this._readEditingEnabled(t,!0,i)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,i,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return(0,be.C$)(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource())return;if(this._override("fieldConfigurations",e),!this.loaded)return;const t=(0,Te.sS)(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):(0,Te.QX)(this)||null}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,i,r){r?.writeLayerSchema&&(0,h.sM)(i,e?"Table":"Feature Layer",t)}readSymbolLayerDrawing(e,t){const i=t.layerDefinition?.drawingInfo,r=i?.renderer,s=i?.symbolLayerDrawing;return r&&s?new Oe(s):null}readGlobalIdField(e,t){return(0,be.jD)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,be.Zm)(t.layerDefinition||t)}writePopupTemplate(e,t,i,r){e&&(t[i]=e.toJSON({...r,writeFieldFormat:!r?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Me.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,De.L)(r,t,i)??void 0;return e||p.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,be.PD)(t,i)}get source(){return this._get("source")}set source(e){e||(e=null);const t=this._get("source");t!==e&&((Array.isArray(e)||e instanceof a.A)&&(e=new V({layer:this,items:e})),$e(t)&&this._resetMemorySource(t),$e(e)&&this._initMemorySource(e),this._set("source",e))}readSource(e,t){const i=k.A.fromJSON(t.featureSet);return new V({layer:this,items:i?.features??[]})}readTemplates(e,t){const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e=e?.map(e=>we.A.fromJSON(e)),this._fixTemplates(e,r),this._fixTemplates(e,s),e}readTitle(e,t){const i=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(i){if("item-title"===this.sublayerTitleMode)return this.url?(0,fe.yG)(this.url,i):i;let e=i;if(!e&&this.url){const t=(0,fe.qg)(this.url);null!=t&&(e=t.title)}if(!e)return;const t=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&t&&t!==e&&(e=t+" - "+e),(0,fe.cr)(e)}if("item-title"===this.sublayerTitleMode&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let i=(t=t.layerDefinition||t).typeIdField;if(i&&t.fields){i=i.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===i);e&&(i=e.name)}return i}readTypes(e,t){e=(t=t.layerDefinition||t).types;const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e?.map(e=>(e=ve.A.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,s),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t,i){const r=await(0,be.Xl)(this,e,t,Ke,i);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,i,r){const s=await(0,be.bt)(this,e,t,i,Ke,r);return this.lastEditsEventDate=new Date,s}async applyEdits(e,t){return(0,be.ct)(this,e,t)}async uploadAssets(e,t){return(0,be.rn)(this,e,t)}createFieldConfigurations(){return(0,Te.xY)(this)}createPopupTemplate(e){return(0,Re.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:s}=await(0,g.qr)(Promise.all([i.e(893),i.e(3636)]).then(i.bind(i,65515)),e),o=new s({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,r.mS)(t,(0,u.Bf)((0,g.u7)(e,()=>o.cancelLoad())??(0,u.hA)()),!1),await o.load({signal:e}),o}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}createQuery(){const e=(0,be.VZ)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,i=(0,f.mA)(this.definitionExpression,t);return e.where=i||"1=1",e}async deleteAttachments(e,t,i){const r=await(0,be.mm)(this,e,t,Ke,i);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,be.WP)(this,e,Ke)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return(0,be.xd)(this.types,this.typeIdField,e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return(0,be.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return(0,be.lV)(this,e,t,Ke)}async queryFeatures(e,t){const i=await this.load(),r=await i.source.queryFeatures(Pe.A.from(e)??i.createQuery(),t),s=this.graphicOrigin;if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=i,e.origin=s;return r}async queryObjectIds(e,t){return await(0,be.sg)(this,e,t,Ke)}async queryFeatureCount(e,t){return(0,be.Ye)(this,e,t,Ke)}async queryExtent(e,t){return(0,be.B5)(this,e,t,Ke)}async queryRelatedFeatures(e,t){return(0,be.hM)(this,e,t,Ke)}async queryRelatedFeaturesCount(e,t){return(0,be.S2)(this,e,t,Ke)}async queryPivot(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryPivot||!s?.operations?.supportsQueryPivot)throw new l.A(Ke,"Layer source does not support queryPivot capability");const o=await i.e(9958).then(i.bind(i,29958)),n=await r.queryPivot(o.default.from(e),t),a=this.graphicOrigin;if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryTopFeatures(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopFeatures||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ke,"Layer source does not support queryTopFeatures capability");const o=await i.e(7561).then(i.bind(i,57561)),n=await r.queryTopFeatures(o.default.from(e),t),a=this.graphicOrigin;if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryAttributeBins(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryAttributeBins)throw new l.A(Ke,"Layer source does not support queryAttributeBins capability");(0,be.ZJ)(e,s,Ke);const o=await i.e(4575).then(i.bind(i,14575)),n=await r.queryAttributeBins(o.default.from(e),t),a=this.graphicOrigin;if(n.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryTopObjectIds(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopObjectIds||!s?.query.supportsTopFeaturesQuery)throw new l.A(Ke,"Layer source does not support queryTopObjectIds capability");const o=await i.e(7561).then(i.bind(i,57561));return(await r.queryTopObjectIds(o.default.from(e),t)).filter(xe.Et)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopExtents||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ke,"Layer source does not support queryTopExtents capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopCount||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ke,"Layer source does not support queryFeatureCount capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopCount(o.default.from(e),t)}read(e,t){const i=e.featureCollection;if((i||"Feature Collection"===e.type)&&(this.resourceInfo=e),i){const{layers:e,showLegend:r}=i;1===e?.length&&(super.read(e[0],t),null!=r&&super.read({showLegend:r},t))}super.read(e,t),"service"===t?.origin&&(["objectIdField","fields","timeInfo","dateFieldsTimeZone","uniqueIdFields"].forEach(e=>this.revertToOrigin(e,"service")),this.spatialReference||this.revertToOrigin("spatialReference","service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:i,layerContainerType:r}=t;if(this.dynamicDataSource)return(0,Ne.U4)(t,this,"a dynamic data source cannot be written to web scenes, web maps and feature service items"),null;if(this.isTable){if(("web-map"===i||"web-scene"===i)&&"tables"!==r)return(0,Ne.U4)(t,this,"a table source can only be written to tables"),null;if(this._hasMemorySource())return(0,Ne.U4)(t,this,"an in-memory table source cannot be written to web scenes and web maps"),null}else if(this.loaded&&("web-map"===i||"web-scene"===i)&&"tables"===r)return(0,Ne.U4)(t,this,"a non-table source cannot be written to tables in web maps or web scenes"),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new l.A(Ke,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,je.D)(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,i){let r=e.layerDefinition?.capabilities;return r?this._hasEditingCapability(r):(r=e.capabilities,t&&"web-map"===i?.origin&&!this._hasMemorySource()&&r?this._hasEditingCapability(r):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,i,r){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,h.sM)("layerDefinition.capabilities",e,t),i&&!r?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return(0,o.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,Me.yp)(this.renderer,this.fieldsIndex),(0,Me.sv)(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),(0,Ae.L)(this,{origin:"service"})}async hasDataChanged(){return(0,be.jp)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const i=e.prototype?.attributes;i&&t&&delete i[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new l.A("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new l.A("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){const t=[...e.layers||[],...e.tables||[]];return t.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id}};(0,r.Cg)([(0,m.MZ)({clonable:!1,readOnly:!0})],Be.prototype,"_titleCreator",null),(0,r.Cg)([(0,m.MZ)(me.zQ)],Be.prototype,"attributeTableTemplate",void 0),(0,r.Cg)([(0,Je.w)("service","capabilities")],Be.prototype,"readCapabilities",null),(0,r.Cg)([(0,m.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],Be.prototype,"charts",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Be.prototype,"createQueryVersion",null),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.copyrightText"}}})],Be.prototype,"copyright",void 0),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.displayField"}}})],Be.prototype,"displayField",void 0),(0,r.Cg)([(0,m.MZ)({types:Ge.Es,readOnly:!0})],Be.prototype,"defaultSymbol",void 0),(0,r.Cg)([(0,m.MZ)({type:Le.A})],Be.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean})],Be.prototype,"editingEnabled",null),(0,r.Cg)([(0,Je.w)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Be.prototype,"readEditingEnabled",null),(0,r.Cg)([(0,Je.w)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Be.prototype,"readEditingEnabledFromWebMap",null),(0,r.Cg)([(0,Ve.K)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Be.prototype,"writeEditingEnabled",null),(0,r.Cg)([(0,Ve.K)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Be.prototype,"writeEditingEnabledToWebMap",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Be.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,m.MZ)({clonable:!1,readOnly:!0})],Be.prototype,"featureTitleFields",null),(0,r.Cg)([(0,m.MZ)({type:[Ce.A],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy(e,t,i){return{enabled:!i?.writeLayerSchema,ignoreOrigin:1===this.originIdOf(t)}}}}})],Be.prototype,"fieldConfigurations",null),(0,r.Cg)([(0,m.MZ)({...Ue.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Qe}}}}})],Be.prototype,"fields",void 0),(0,r.Cg)([(0,m.MZ)(Ue.fieldsIndex)],Be.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,m.MZ)({type:w.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Be.prototype,"formTemplate",void 0),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.extent"}}})],Be.prototype,"fullExtent",void 0),(0,r.Cg)([(0,m.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Qe,writer(e,t,i){const r=e?be.iX.toJSON(e):null;r&&(0,h.sM)(i,r,t)}}}},read:{source:"layerDefinition.geometryType",reader:be.iX.read}}})],Be.prototype,"geometryType",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0,clonable:!1})],Be.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.hasM"}}})],Be.prototype,"hasM",void 0),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.hasZ"}}})],Be.prototype,"hasZ",void 0),(0,r.Cg)([(0,m.MZ)(me.id)],Be.prototype,"id",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Be.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,m.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Be.prototype,"isTable",void 0),(0,r.Cg)([(0,Je.w)("service","isTable",["type","geometryType"]),(0,Je.w)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Be.prototype,"readIsTable",null),(0,r.Cg)([(0,Ve.K)("web-map","isTable")],Be.prototype,"writeIsTable",null),(0,r.Cg)([(0,m.MZ)(me.kF)],Be.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,m.MZ)({type:[Se.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Ie.w,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:Ie.w,write:{layerContainerTypes:b.K}}})],Be.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,m.MZ)({type:Oe,json:{name:"layerDefinition.drawingInfo.symbolLayerDrawing",write:!0,origins:{"web-scene":{write:!1}}}})],Be.prototype,"symbolLayerDrawing",void 0),(0,r.Cg)([(0,Je.w)(["portal-item","web-map"],"symbolLayerDrawing",["layerDefinition.drawingInfo.renderer","layerDefinition.drawingInfo.symbolLayerDrawing"])],Be.prototype,"readSymbolLayerDrawing",null),(0,r.Cg)([(0,m.MZ)((()=>{const e=(0,d.o8)(me.Ih);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,i){(0,h.sM)(i,(0,ke.p)(e),t)}}},e})())],Be.prototype,"opacity",void 0),(0,r.Cg)([(0,m.MZ)(me.fV)],Be.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:["show","hide"],json:(()=>{const e=(0,d.o8)(me.C1.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Be.prototype,"listMode",void 0),(0,r.Cg)([(0,Je.w)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Be.prototype,"readGlobalIdField",null),(0,r.Cg)([(0,m.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Qe}}}}})],Be.prototype,"objectIdField",void 0),(0,r.Cg)([(0,Je.w)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Be.prototype,"readObjectIdField",null),(0,r.Cg)([(0,m.MZ)({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:b.K}}})],Be.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,m.MZ)(Ue.outFields)],Be.prototype,"outFields",void 0),(0,r.Cg)([(0,m.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Be.prototype,"path",void 0),(0,r.Cg)([(0,m.MZ)(me.M6)],Be.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,m.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Be.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,Ve.K)("popupTemplate")],Be.prototype,"writePopupTemplate",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Be.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Be.prototype,"reloading",void 0),(0,r.Cg)([(0,m.MZ)({types:qe.Hg,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:qe.XJ,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:b.K,overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:b.K})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:b.K})}}})],Be.prototype,"renderer",null),(0,r.Cg)([(0,Je.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,Je.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Be.prototype,"readRenderer",null),(0,r.Cg)([(0,m.MZ)()],Be.prototype,"resourceInfo",void 0),(0,r.Cg)([(0,m.MZ)((()=>{const e=(0,d.o8)(me.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Be.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,m.MZ)({clonable:!1})],Be.prototype,"source",null),(0,r.Cg)([(0,Je.w)("portal-item","source",["featureSet"]),(0,Je.w)("web-map","source",["featureSet"])],Be.prototype,"readSource",null),(0,r.Cg)([(0,m.MZ)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Be.prototype,"spatialReference",void 0),(0,r.Cg)([(0,m.MZ)({type:Number})],Be.prototype,"subtypeCode",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!1})],Be.prototype,"subtypeField",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!1})],Be.prototype,"subtypes",void 0),(0,r.Cg)([(0,m.MZ)({type:[we.A]})],Be.prototype,"templates",void 0),(0,r.Cg)([(0,Je.w)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Be.prototype,"readTemplates",null),(0,r.Cg)([(0,m.MZ)({type:Ee.A})],Be.prototype,"timeInfo",void 0),(0,r.Cg)([(0,m.MZ)()],Be.prototype,"title",void 0),(0,r.Cg)([(0,Je.w)("service","title",["name"]),(0,Je.w)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Be.prototype,"readTitle",null),(0,r.Cg)([(0,Je.w)("web-map","title",["layerDefinition.name","title"])],Be.prototype,"readTitleFromWebMap",null),(0,r.Cg)([(0,m.MZ)({type:String})],Be.prototype,"sublayerTitleMode",void 0),(0,r.Cg)([(0,m.MZ)({json:{read:!1}})],Be.prototype,"type",void 0),(0,r.Cg)([(0,m.MZ)({type:String})],Be.prototype,"typeIdField",void 0),(0,r.Cg)([(0,Je.w)("service","typeIdField"),(0,Je.w)("typeIdField",["layerDefinition.typeIdField"])],Be.prototype,"readTypeIdField",null),(0,r.Cg)([(0,m.MZ)({type:[ve.A]})],Be.prototype,"types",void 0),(0,r.Cg)([(0,Je.w)("service","types",["types"]),(0,Je.w)("types",["layerDefinition.types"])],Be.prototype,"readTypes",null),(0,r.Cg)([(0,m.MZ)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:b.K}}}}})],Be.prototype,"visible",void 0),(0,r.Cg)([(0,Je.w)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Be.prototype,"readVisible",null),Be=(0,r.Cg)([(0,m.$K)("esri.layers.FeatureLayer")],Be)},63396(e,t,i){i.d(t,{d:()=>T});var r=i(5482),s=i(91429),o=i(60950),n=i(99959);class a extends n.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[o.ym](){return this.trackInfoProvider.trackInfo}}var l=i(37838),u=i(69540),d=i(25482),p=i(93637),y=i(50820),c=i(10873),h=i(46499),g=i(41214);let f=class extends((0,u.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,r.Cg)([(0,s.MZ)({type:[h.A],json:{write:!0}})],f.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,s.MZ)(c.kF)],f.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,s.MZ)({types:g.Hg,json:{write:!0}})],f.prototype,"renderer",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"visible",void 0),f=(0,r.Cg)([(0,s.$K)("esri.layers.support.TrackPartInfo")],f);var m=i(96576),b=i(59868),w=i(10184),v=i(43937);let C=class extends((0,u.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.trackLines=new f({renderer:new m.A({symbol:b.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,i){const r=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,p.sM)(i,r,t)}};(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"enabled",void 0),(0,r.Cg)([(0,s.MZ)({type:[y.A],json:{write:!0}})],C.prototype,"fields",void 0),(0,r.Cg)([(0,v.K)("fields")],C.prototype,"writeFields",null),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"latestObservations",void 0),(0,r.Cg)([(0,s.MZ)({type:w.A,json:{write:!0}})],C.prototype,"maxDisplayDuration",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],C.prototype,"maxDisplayObservationsPerTrack",void 0),(0,r.Cg)([(0,s.MZ)(c.M6)],C.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,s.MZ)({type:l.A,json:{name:"popupInfo",write:!0}})],C.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"previousObservations",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"trackLines",void 0),(0,r.Cg)([(0,s.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],C.prototype,"timeField",void 0),C=(0,r.Cg)([(0,s.$K)("esri.layers.support.TrackInfo")],C);const T=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,clonable:!1})],i.prototype,"trackGraphicOrigin",void 0),(0,r.Cg)([(0,s.MZ)({type:C})],i.prototype,"trackInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.TrackableLayer")],i),i}},8947(e,t,i){i.d(t,{L:()=>n});var r=i(60999),s=i(17676),o=i(67076);async function n(e,t,i){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,r.Ke)(n.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new o.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},96520(e,t,i){i.d(t,{u:()=>l});var r=i(86211),s=i(21325),o=i(52006);function n(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=i)}function a(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e){const e=(0,o.yP)(t);e.length>2&&(e[2]*=i)}}function l(e,t,i){if(!e&&!t||!i)return;const s=(0,r.G9)(i);u(e,i,s),u(t,i,s)}function u(e,t,i){if(e)for(const r of e)d(r.geometry,t,i)}function d(e,t,i){if(!e?.spatialReference||(0,s.aI)(e.spatialReference,t))return;const o=(0,r.G9)(e.spatialReference)/i;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("curveRings"in e)a(e,e.curveRings,o);else if("curvePaths"in e)a(e,e.curvePaths,o);else if("rings"in e)n(e,e.rings,o);else if("paths"in e)n(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[737],{20737(e,t,r){r.r(t),r.d(t,{default:()=>K});var s=r(5482),i=r(37838),a=r(11254),o=r(69540),n=r(7762),l=r(49186),u=r(36563),p=r(25728),d=r(17676),y=r(36708),h=r(84952),c=r(91429),b=r(4146),g=r(52136),f=r(18768),m=r(63074),v=r(69208),C=r(10086),w=r(34287),S=r(8303),E=r(54310),M=r(25036),A=r(82935),F=r(4902),_=r(92474),L=r(55156),I=r(60950),T=r(89808),O=r(99959);const Z=Symbol("isAnnotationFeatureGraphicOrigin");var P;class q extends O.A{get[(P=Z,I.ym)](){return this.layer}get[L.e](){return this.layer}get[T.Q](){return this.layer}constructor(e){super(),this[P]=!0,this.type="annotation-feature",this.sublayer=e}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.subtypeCode}__`}}let j=class extends((0,o.OU)((0,F.s)(_.x_))){constructor(e){super(e),this.graphicOrigin=new q(this),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get title(){return this.parent?.subtypes?.find(e=>e.code===this.subtypeCode)?.name??null}};(0,s.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],j.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,c.MZ)({clonable:!1})],j.prototype,"parent",void 0),(0,s.Cg)([(0,c.MZ)({type:Number})],j.prototype,"subtypeCode",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],j.prototype,"title",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],j.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean})],j.prototype,"visible",void 0),j=(0,s.Cg)([(0,c.$K)("esri.layers.support.AnnotationFeatureSublayer")],j);var k=r(60694),x=r(10873),$=r(15426),D=r(17036),Q=r(30524),G=r(91908),H=r(97552),N=r(30291),J=r(36005);const R="annotation-feature-layer",V=(0,D.p)(),U=n.A.ofType(j);let B=class extends((0,C.j)((0,m.dM)((0,A.e)((0,M.j)((0,E.J)((0,f.b)((0,w.q)((0,S.A)((0,p.M)((0,v.d)((0,g.p)((0,o.OU)(b.A))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayers=new U,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.type="annotation-feature",this._dataElementPromise=null,this.addHandles((0,y.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),y.OH))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new l.A(`${R}:missing-url`,"AnnotationFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,$.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new U(t.subtypes.map(({code:e})=>new j({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,s=t.name||(0,k.qg)(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return(0,k.yG)(r,s);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==s)return e=(0,k.cr)(e),s?`${e} - ${(0,k.cr)(s)}`:e;break}}return s?(0,k.cr)(s):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return(0,N.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:i}=await(0,d.qr)(Promise.all([r.e(893),r.e(3636),r.e(3467)]).then(r.bind(r,65515)),e),a=new i({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,s.mS)(t,(0,u.Bf)((0,d.u7)(e,()=>a.cancelLoad())??(0,u.hA)()),!1),await a.load({signal:e}),a}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}createQuery(){const e=(0,$.VZ)(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=(0,h.fj)(this.url,"queryDataElements"),r={f:"json",layers:this.layerId};return this._dataElementPromise=(0,a.A)(t,{...e,responseType:"json",query:r}).then(e=>{const t=e.data.layerDataElements,r=this.layerId,s=t.find(e=>e.layerId===r);if(!s)throw new l.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return s.dataElement}),this._dataElementPromise}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return(0,$.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),s=await r.source.queryFeatures(H.A.from(e)??r.createQuery(),t);if(s?.features)for(const e of s.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin,e.layer=e.sourceLayer=this}return s}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(H.A.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(H.A.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(H.A.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,G.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,Q.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,$.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new l.A(R+":unsupported-version","The feature service must be version 10.8 or above.")}_fetchFirstValidLayerId(e){return(0,a.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};(0,s.Cg)([(0,c.MZ)(x.es)],B.prototype,"barrierWeight",void 0),(0,s.Cg)([(0,c.MZ)({json:{write:!0}})],B.prototype,"editingEnabled",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],B.prototype,"effectiveEditingEnabled",null),(0,s.Cg)([(0,c.MZ)({...V.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],B.prototype,"fields",void 0),(0,s.Cg)([(0,c.MZ)(V.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,c.MZ)(x.id)],B.prototype,"id",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISAnnotationLayer"]})],B.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,c.MZ)(V.outFields)],B.prototype,"outFields",void 0),(0,s.Cg)([(0,c.MZ)(x.M6)],B.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,c.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,c.MZ)({clonable:!1,readOnly:!0})],B.prototype,"source",void 0),(0,s.Cg)([(0,c.MZ)({type:U})],B.prototype,"sublayers",void 0),(0,s.Cg)([(0,J.w)("service","sublayers",["subtypes"])],B.prototype,"readSublayers",null),(0,s.Cg)([(0,c.MZ)({type:String})],B.prototype,"sublayerTitleMode",void 0),(0,s.Cg)([(0,J.w)("service","title",["name"])],B.prototype,"readTitleFromService",null),(0,s.Cg)([(0,J.w)("portal-item","title")],B.prototype,"readTitleFromPortalItem",null),(0,s.Cg)([(0,c.MZ)({json:{read:!1},value:"annotation-feature",readOnly:!0})],B.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)({type:[Number],json:{write:{ignoreOrigin:!0}}})],B.prototype,"visibleLayers",null),B=(0,s.Cg)([(0,c.$K)("esri.layers.AnnotationFeatureLayer")],B);const K=B}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[737,9232],{68197(e,t,n){n.d(t,{A:()=>u});var i=n(40876),r=n(4576),s=n(34727),o=n(56507);function l(e){return(0,s.qE)((0,o.Vr)(e),0,255)}function a(e,t){const n=e.toString(16).padStart(2,"0");return t?n.slice(0,1):n}class u{static blendColors(e,t,n,i=new u){return i.r=Math.round(e.r+(t.r-e.r)*n),i.g=Math.round(e.g+(t.g-e.g)*n),i.b=Math.round(e.b+(t.b-e.b)*n),i.a=e.a+(t.a-e.a)*n,i._sanitize()}static fromRgb(e,t){const n=(0,i.lT)(e);return n?u.fromArray(n,t):null}static fromHex(e,t=new u){const n=(0,i.oW)(e);return n?u.fromArray(n,t):null}static fromArray(e,t=new u){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const n=(0,i.Eq)(e);return n?u.fromArray(n,t):null}static fromJSON(e){return null!=e?new u([e[0],e[1],e[2],(e[3]??255)/255]):void 0}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(e){return e??=[0,0,0,0],e[0]=this.r/255,e[1]=this.g/255,e[2]=this.b/255,e[3]=null!=this.a?this.a:1,e}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)u.fromString(e,this);else if((0,r.yc)(e))u.fromArray(e,this);else{const t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof u||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,n=e?.digits??6,i=3===n||4===n,r=4===n||8===n,s=`#${a(this.r,i)}${a(this.g,i)}${a(this.b,i)}${r?a(Math.round(255*this.a),i):""}`;return t?s.toUpperCase():s}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=l(this.r),n=l(this.g),i=l(this.b);return 0===e||1!==this.a?[t,n,i,l(255*this.a)]:[t,n,i]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,i.c1)(this.r),this.g=(0,i.c1)(this.g),this.b=(0,i.c1)(this.b),this.a=(0,i.G1)(this.a),this}_set(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i}}u.prototype.declaredClass="esri.Color"},52106(e,t,n){n.d(t,{A:()=>x});var i,r,s=n(5482),o=n(37838),l=n(69540),a=n(51447),u=n(25482),c=n(53966),h=n(36708),p=n(24326),d=n(91429),f=n(12195),y=n(65864),g=n(50498),m=n(55156),b=n(60950),v=n(54339),M=n(94128),w=n(33910);function _(e){if(null==e)return null;const t={};for(const n in e){const i=e[n];i&&(t[n]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let x=class extends((0,l.OU)(u.o)){static{i=M.Z}static{r=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const n=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[n,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const n=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",n,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,v.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:_(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const n={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",n,n,e.action)}}_notifyLayer(e,t,n,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const r={graphic:this,property:e,oldValue:t,newValue:n};"origin-transform"===e&&(r.action=i),"attributes"===e&&(r.attributeName=i),this.layer.graphicChanged(r)}_watchMeshGeometryChanges(){this.addHandles([(0,h.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,h.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const n in e){const i=(0,y.rS)(e[n]);i&&(t[n]=i)}return 0!==Object.keys(t).length?t:null}}})],x.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,d.MZ)({value:null})],x.prototype,"attributes",null),(0,s.Cg)([(0,d.MZ)({value:null,types:g.yR,json:{read:y.rS}})],x.prototype,"geometry",null),(0,s.Cg)([(0,d.MZ)()],x.prototype,"distance",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],x.prototype,"isAggregate",void 0),(0,s.Cg)([(0,d.MZ)({clonable:!1})],x.prototype,"layer",void 0),(0,s.Cg)([(0,d.MZ)({clonable:"reference"})],x.prototype,"origin",void 0),(0,s.Cg)([(0,d.MZ)({type:o.A,value:null})],x.prototype,"popupTemplate",null),(0,s.Cg)([(0,d.MZ)({clonable:"reference"})],x.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,d.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],x.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,d.MZ)({value:null,types:w.Es})],x.prototype,"symbol",null),(0,s.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],x.prototype,"_version",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,value:!0})],x.prototype,"visible",null),x=r=(0,s.Cg)([(0,d.$K)("esri.Graphic")],x)},40876(e,t,n){n.d(t,{Eq:()=>d,G1:()=>y,TS:()=>s,Tf:()=>b,V6:()=>r,Vm:()=>f,ay:()=>a,c1:()=>g,c4:()=>o,iw:()=>v,j5:()=>u,lT:()=>h,oW:()=>c,xV:()=>M});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function s(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...s(e)]}function l(e,t,n){n<0&&++n,n>1&&--n;const i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function a(e,t,n,i=1){const r=(e%360+360)%360/360,s=n<=.5?n*(t+1):n+t-n*t,o=2*n-s;return[Math.round(255*l(o,s,r+1/3)),Math.round(255*l(o,s,r)),Math.round(255*l(o,s,r-1/3)),i]}function u(e){const t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,s=t?9===e.length:5===e.length;let o=Number("0x"+e.slice(1));if(isNaN(o))return null;const l=[0,0,0,1];let a;return s&&(a=o&i,o>>=n,l[3]=r*a/255),a=o&i,o>>=n,l[2]=r*a,a=o&i,o>>=n,l[1]=r*a,a=o&i,o>>=n,l[0]=r*a,l}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function h(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),p(t)}return p(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function p(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?y(e[3]):1,e}function d(e){let t=r(e)?s(e):null;return t??=h(e),t??=c(e),t}function f(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function y(e){return m(e,0,1)}function g(e){return Math.round(m(e,0,255))}function m(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const b=2.2,v=1/b;function M(e){return e**v}},66344(e,t,n){n.d(t,{q:()=>l});const i=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const n=this._db.get(e.id+t);return n?.size??0}put(e,t,n,r,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==n&&this._notifyRemove(t,l.entry,l.size,0)),r>this._maxSize)return void this._notifyRemove(t,n,r,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,n,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new s(n,r,a)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const n=this._db.get(t);if(!n)return;this._size-=n.size,e.size-=n.size;let i=n.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,n.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;const n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){const n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;n[r]=(n[r]||0)+e.size,this._clients.forEach(n=>{const{id:r,name:s}=n;if(i.startsWith(r)){const n=t[s]||0;t[s]=n+e.size}})});const i={};this._clients.forEach(e=>{const n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[n]||0;t[n]=r,i[n]=Math.round(100*e.hitRate)+"%"}else i[n]="0%"});const r=Object.keys(t);r.sort((e,n)=>t[n]-t[e]),r.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+i[n]);for(let t=n.length-1;t>=0;--t){const i=n[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,i){const r=this._clients.get(e.split(o)[0])?.removeFunc,s=r?.(t,i,n);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const n=t??this;if(n.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[s,l]of this._db)if(0===l.lifetime&&(!i||s.startsWith(i))){const i=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,l,i),n.size<=.9*e)return;r||=this._db.has(s)}}for(const[r,s]of this._db)if(!i||r.startsWith(i)){const i=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,s,i),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class s{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const o=":";class l{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},6797(e,t,n){n.d(t,{Ui:()=>p});var i=n(69622),r=n(7762),s=n(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof r.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof r.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const i=a(e),r=a(t);if(0===i.length&&0===r.length)return;if(!i.length||!r.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=r.filter(e=>!i.includes(e)),p=i.filter(e=>!r.includes(e)),d=i.filter(n=>r.includes(n)&&u(e,n)!==u(t,n)).concat(s,p).sort(),f=c(e);if(f&&o.has(f)&&d.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=l(e)&&l(t);for(const i of d){const r=u(e,i),s=u(t,i);let o;if((g||"function"!=typeof r&&"function"!=typeof s)&&r!==s&&(null!=r||null!=s)){if(n&&n[i]&&"function"==typeof n[i])o=n[i]?.(r,s);else if(r instanceof Date&&s instanceof Date){if(r.getTime()===s.getTime())continue;o={type:"complete",oldValue:r,newValue:s}}else o="object"==typeof r&&"object"==typeof s&&c(r)===c(s)?h(r,s):{type:"complete",oldValue:r,newValue:s};null!=o&&(null!=y?y.diff[i]=o:y={type:"partial",diff:{[i]:o}})}}return y}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},9093(e,t,n){function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>r,vt:()=>i,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:i,fromValues:function(e,t,n,i,r,s,o,l,a,u,c,h,p,d,f,y){return[e,t,n,i,r,s,o,l,a,u,c,h,p,d,f,y]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,n){n.d(t,{$A:()=>I,Bw:()=>s,C:()=>o,Cc:()=>A,DI:()=>_,Il:()=>G,Io:()=>b,Ln:()=>m,Om:()=>S,Qr:()=>h,Re:()=>u,S8:()=>x,T9:()=>y,WQ:()=>a,Z0:()=>C,_S:()=>d,aI:()=>k,ei:()=>z,fw:()=>j,g7:()=>R,gL:()=>T,hG:()=>v,hZ:()=>l,hs:()=>g,jb:()=>Z,jk:()=>f,lo:()=>$,lw:()=>c,m3:()=>M,oW:()=>L,t2:()=>O,tn:()=>p,uE:()=>D,xg:()=>q,ze:()=>w});var i=n(51850),r=n(34304);function s(e){const t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,n,i){return e[0]=t,e[1]=n,e[2]=i,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function p(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function d(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function y(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function m(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e}function b(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}function v(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function M(e){const t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function x(e,t){const n=t[0],i=t[1],r=t[2];let s=n*n+i*i+r*r;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function S(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],l=n[1],a=n[2];return e[0]=r*a-s*l,e[1]=s*o-i*a,e[2]=i*l-r*o,e}function A(e,t,n,i){const r=t[0],s=t[1],o=t[2];return e[0]=r+i*(n[0]-r),e[1]=s+i*(n[1]-s),e[2]=o+i*(n[2]-o),e}function C(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=n[0]*i+n[4]*r+n[8]*s+n[12],e[1]=n[1]*i+n[5]*r+n[9]*s+n[13],e[2]=n[2]*i+n[6]*r+n[10]*s+n[14],e}function z(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=i*n[0]+r*n[3]+s*n[6],e[1]=i*n[1]+r*n[4]+s*n[7],e[2]=i*n[2]+r*n[5]+s*n[8],e}function T(e,t,n){return j(e,t,n[0],n[1],n[2],n[3])}function j(e,t,n,i,r,s){const o=t[0],l=t[1],a=t[2],u=i*a-r*l,c=r*o-n*a,h=n*l-i*o,p=i*h-r*c,d=r*u-n*h,f=n*c-i*u,y=2*s;return e[0]=o+u*y+2*p,e[1]=l+c*y+2*d,e[2]=a+h*y+2*f,e}function R(e,t){x(F,e),x(E,t);const n=S(F,E);return n>1?0:n<-1?Math.PI:Math.acos(n)}const F=(0,i.vt)(),E=(0,i.vt)();function O(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function k(e,t){if(e===t)return!0;const n=e[0],i=e[1],s=e[2],o=t[0],l=t[1],a=t[2],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(s-a)<=u*Math.max(1,Math.abs(s),Math.abs(a))}function L(e,t,n){const i=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];let o=i*i+r*r+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=i*o,e[1]=r*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const Z=u,N=c,P=h,q=b,$=v,G=s,D=M;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:a,angle:R,bezier:function(e,t,n,i,r,s){const o=1-s,l=o*o,a=s*s,u=l*o,c=3*s*l,h=3*a*o,p=a*s;return e[0]=t[0]*u+n[0]*c+i[0]*h+r[0]*p,e[1]=t[1]*u+n[1]*c+i[1]*h+r[1]*p,e[2]=t[2]*u+n[2]*c+i[2]*h+r[2]*p,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:I,crossAndNormalize:function(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],l=n[1],a=n[2],u=r*a-s*l,c=s*o-i*a,h=i*l-r*o,p=Math.sqrt(u*u+c*c+h*h);return e[0]=u/p,e[1]=c/p,e[2]=h/p,e},direction:L,dist:q,distance:b,div:P,divide:h,dot:S,equals:k,exactEquals:O,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,i,r,s){const o=s*s,l=o*(2*s-3)+1,a=o*(s-2)+s,u=o*(s-1),c=o*(3-2*s);return e[0]=t[0]*l+n[0]*a+i[0]*u+r[0]*c,e[1]=t[1]*l+n[1]*a+i[1]*u+r[1]*c,e[2]=t[2]*l+n[2]*a+i[2]*u+r[2]*c,e},inverse:_,len:G,length:s,lerp:A,max:y,min:f,mul:N,multiply:c,negate:w,normalize:x,random:function(e,t=1){const n=r.Ov,i=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*o,e[1]=Math.sin(i)*o,e[2]=s*t,e},rotateX:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0],s[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),s[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),s[1]=r[1],s[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),s[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),s[2]=r[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:m,set:l,sign:d,sqrDist:$,sqrLen:D,squaredDistance:v,squaredLength:M,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:Z,subtract:u,transformMat3:z,transformMat4:C,transformQuat:T,transformQuatValues:j},Symbol.toStringTag,{value:"Module"}))},90629(e,t,n){n.d(t,{Lz:()=>r,PN:()=>s,cr:()=>o,gs:()=>a,r_:()=>u,tc:()=>l}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(e){return e?e/72*96:0}function s(e){return e?72*e/96:0}function o(e){if("string"==typeof e){const t=e.match(i);if(t){const n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),o="px"===i?s(n):n;return r?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function l(e=0,t=0){return{x:e,y:t}}function a(e=0,t=0){return[e,t]}function u(e=0,t=0,n=0){return[e,t,n]}},13069(e,t,n){n.d(t,{AG:()=>l,lk:()=>r,vD:()=>o,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 o(){return`{${r()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},159(e,t,n){n.d(t,{A:()=>u});var i,r=n(5482),s=n(69540),o=n(25482),l=n(91429),a=n(99157);let u=i=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,r.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,r.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,n){n.d(t,{A:()=>a});var i,r=n(5482),s=n(69540),o=n(25482),l=n(91429);let a=i=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,r.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,n)=>{t[n]=!e}}})],a.prototype,"isInverse",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,r.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=i=(0,r.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,n){n.r(t),n.d(t,{projectBuffer:()=>r});var i=n(49208);function r(e,t,n,r,s,o,l=Math.floor(e.length/3)){const a=(0,i.jd)(t,s);if(null==a)return!1;if(a===i.pO){if(e===r&&n===o)return!0;const t=n+3*l;for(let i=n,s=o;i<t;i++,s++)r[s]=e[i]??0;return!0}const u=n+3*l;for(let t=n,i=o;t<u;t+=3,i+=3)a(e,t,r,i);return!0}},49208(e,t,n){n.d(t,{Tp:()=>h,jd:()=>c,pO:()=>d,w5:()=>u});var i=n(34727),r=n(86211),s=n(73941),o=n(79258),l=n(34403),a=n(21325);const u={2:{5:d,7:null,9:null,10:d,1:w,6:null,8:null,0:null,3:y,11:g,2:d,4:A},5:{5:d,7:null,9:null,10:d,1:w,6:null,8:null,0:null,3:y,11:g,2:d,4:A},7:{5:null,7:d,9:null,10:d,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,n,i){const r=e[t]/F,s=R-2*Math.atan(Math.exp(-e[t+1]/F)),o=F+(e[t+2]??0),l=Math.cos(s)*o;n[i]=Math.cos(r)*l,n[i+1]=Math.sin(r)*l,n[i+2]=Math.sin(s)*o},6:null,8:null,0:null,3:d,11:function(e,t,n,i){f(e,t,n,i),g(n,i,n,i)},2:f,4:function(e,t,n,i){f(e,t,n,i),A(n,i,n,i)}},4:{5:C,7:null,9:null,10:C,1:function(e,t,n,i){C(e,t,n,i),w(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){C(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){C(e,t,n,i),g(n,i,n,i)},2:C,4:d},1:{5:I,7:null,9:null,10:I,1:d,6:null,8:null,0:null,3:function(e,t,n,i){I(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){I(e,t,n,i),g(n,i,n,i)},2:I,4:function(e,t,n,i){I(e,t,n,i),A(n,i,n,i)}},6:{5:null,7:S,9:null,10:S,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:x,10:x,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:w,6:M,8:v,0:null,3:y,11:g,2:d,4:A},11:{5:m,7:null,9:null,10:m,1:function(e,t,n,i){m(e,t,n,i),w(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){m(e,t,n,i),y(n,i,n,i)},11:d,2:m,4:function(e,t,n,i){m(e,t,n,i),A(n,i,n,i)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(z.source.spatialReference===e&&z.dest.spatialReference===t)return z;const n=p(e,z.source),i=p(t,z.dest);return 0===n&&0===i?(0,a.aI)(e,t)?z.projector=d:z.projector=null:z.projector=u[n][i],z}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,r.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function d(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t]??0)}function f(e,t,n,i){n[i]=j*(e[t]/F),n[i+1]=j*(R-2*Math.atan(Math.exp(-e[t+1]/F))),n[i+2]=e[t+2]??0}function y(e,t,n,r){!function(e,t,n,r,s){const o=.4999999*Math.PI,l=(0,i.qE)(T*e[t+1],-o,o),a=Math.sin(l);n[r++]=T*e[t]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[r]=e[t+2]??0}(e,t,n,r,o.$O)}function g(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]??0}function m(e,t,n,i){n[i]=e[t]*O,n[i+1]=e[t+1]*O,n[i+2]=e[t+2]??0}function b(e,t,n,i,r){const s=r+(e[t+2]??0),o=T*e[t],l=T*e[t+1],a=Math.cos(l)*s;n[i]=Math.cos(o)*a,n[i+1]=Math.sin(o)*a,n[i+2]=Math.sin(l)*s}function v(e,t,n,i){b(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){b(e,t,n,i,o.sH.radius)}function w(e,t,n,i){b(e,t,n,i,o.$O.radius)}function _(e,t,n,r,s){const o=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(o*o+l*l+a*a),c=(0,i.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);n[r++]=j*h,n[r++]=j*c,n[r]=u-s}function x(e,t,n,i){_(e,t,n,i,o.Sw.radius)}function S(e,t,n,i){_(e,t,n,i,o.sH.radius)}function I(e,t,n,i){_(e,t,n,i,o.$O.radius)}function A(e,t,n,i){!function(e,t,n,i,r){const s=T*e[t],o=T*e[t+1],l=e[t+2]??0,a=Math.sin(o),u=Math.cos(o),c=r.radius/Math.sqrt(1-r.eccentricitySquared*a*a);n[i++]=(c+l)*u*Math.cos(s),n[i++]=(c+l)*u*Math.sin(s),n[i++]=(c*(1-r.eccentricitySquared)+l)*a}(e,t,n,i,o.$O)}function C(e,t,n,i){const r=l.TP,s=e[t],a=e[t+1],u=e[t+2]??0;let c,h,p,d,f,y,g,m,b,v,M,w,_,x,S,I,A,C,z,T,R;c=Math.abs(u),h=s*s+a*a,p=Math.sqrt(h),d=h+u*u,f=Math.sqrt(d),T=Math.atan2(a,s),y=u*u/d,g=h/d,x=r.a2/f,S=r.a3-r.a4/f,g>.3?(m=c/f*(1+g*(r.a1+x+y*S)/f),z=Math.asin(m),v=m*m,b=Math.sqrt(1-v)):(b=p/f*(1-y*(r.a5-x-g*S)/f),z=Math.acos(b),v=1-b*b,m=Math.sqrt(v)),M=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(M),_=r.a6*w,x=p-w*b,S=c-_*m,A=b*x+m*S,I=b*S-m*x,C=I/(_/M+A),z+=C,R=A+I*C/2,u<0&&(z=-z),n[i++]=j*T,n[i++]=j*z,n[i]=R}const z={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},T=(0,i.kU)(1),j=(0,i.KJ)(1),R=.5*Math.PI,F=o.$O.radius,E=F*Math.PI/180,O=180/(F*Math.PI)},91218(e,t,n){n.r(t),n.d(t,{canProjectWithoutEngine:()=>K,initializeProjection:()=>B,isEqualBaseGCS:()=>J,isLoaded:()=>F,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>O,load:()=>L,project:()=>Z,projectAsync:()=>V,projectExtent:()=>re,projectMany:()=>N,projectMultipoint:()=>Q,projectOrLoad:()=>q,projectOrLoadMany:()=>$,projectPoint:()=>H,projectPolygon:()=>ne,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>k,test:()=>U,tryProject:()=>P,unload:()=>D});var i=n(49186),r=n(17676),s=n(62788),o=n(95488),l=n(51850),a=n(21276),u=n(73941),c=n(5443),h=n(91075),p=n(48526),d=n(86738),f=n(39829),y=n(82799),g=n(16930),m=n(98764),b=n(159),v=n(9762),M=n(49208);function w(e,t,n,i,r,s){return _[0]=e,_[1]=t,_[2]=n,(0,v.projectBuffer)(_,i,0,r,s,0)}const _=(0,l.vt)();var x=n(60408),S=n(21325),I=n(52006);let A=null,C=null,z=null,T=null,j={};const R=new o.I;function F(){return!!(C?.isLoaded()&&z?.isLoaded()&&T?.isLoaded())}function E(){return!!F()||((0,s.gc)(R),L(),!1)}function O(e,t){return!e||!t||K(e,t)||E()}function k(e,t){return!K(e,t)&&!F()}async function L(e){null==A&&(A=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(C=e,C.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(z=e,z.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(T=e,T.load()))])),await A,(0,r.Te)(e),R.notify()}function Z(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),N(e,e[0].spatialReference,t,n)):((0,a.f)(e),N([e],e.spatialReference,t,n)[0])}function N(e,t,n,i){if(null==t||null==n)return e;if(K(t,n,i))return e.map(e=>W(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return N(e.map(e=>W(e,t,g.A.WGS84)),g.A.WGS84,n,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(n))return N(e,t,g.A.WGS84).map(e=>W(e,g.A.WGS84,n));if(!F())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:T.getTransformation(t,n,i.areaOfInterestExtent)||new b.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let r=j[e];r||(r=T.getTransformation(t,n)||new b.A,j[e]=r),i={geographicTransformation:r,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?C.executeMany(e,n,i):z.executeMany(e,n,i)}function P(e,t,n){try{return Z(e,t,n)}catch(e){return null}}function q(e,t){const n=$([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function $(e,t,n){if(!F())for(const n of e)if(null!=n&&!(0,S.aI)(n.spatialReference,t)&&(0,S.fn)(n.spatialReference)&&(0,S.fn)(t)&&!K(n.spatialReference,t))return(0,s.gc)(R),{pending:L(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,t)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(t)?Z(e,t,n):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){A=null,C=null,z=null,T=null,j={}}const U={get loadPromise(){return A}};async function V(e,t,n){if((0,r.Te)(n),!e)return e;const i=$(Array.isArray(e)?e:[e],t,n);if(i.pending)return await i.pending,(0,r.Te)(n),V(e,t,n);const s=i.geometries??[];return Array.isArray(e)?s:s[0]}function K(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,S.aI)(e,t)||(0,S.fn)(e)&&(0,S.fn)(t)&&!!(0,M.jd)(e,t))}function J(e,t){if((0,S.aI)(e,t))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(t))return!1;const n=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),i=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t);return n&&i}async function B(e,t,n,i){if(F())return(0,r.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:r}of e)if(t&&n&&!K(t,n,r))return L(i)}else if(e&&t&&!K(e,t,n))return L(i);return(0,r.NO)(i)}function W(e,t,n){return e?(0,x.fT)(e)?Y(e,t,new d.A,n,0):(0,x.ZC)(e)?se(e,t,new c.A,n,0):(0,x.Bi)(e)?ie(e,t,new f.A,n,0):(0,x.Rg)(e)?te(e,t,new y.A,n,0):(0,x.U9)(e)?X(e,t,new p.A,n,0):null:null}function H(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,r){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:r,(0,v.projectBuffer)(ue,t,0,ue,i,0)?(n.x=ue[0],n.y=ue[1],n.spatialReference=i,void 0!==s||(0,u.xP)(i)?(n.z=ue[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,i)}function X(e,t,n,i,r){const{points:s,hasZ:o,hasM:l}=e,a=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],o?e[2]:r);if(!(0,v.projectBuffer)(c,t,0,c,i,0,u))return null;const h=ae(o,i);for(let e=0;e<u;++e){const t=3*e,n=c[t],i=c[t+1];h&&l?a.push([n,i,c[t+2],s[e][3]]):h?a.push([n,i,c[t+2]]):l?a.push([n,i,s[e][2]]):a.push([n,i])}return n.points=a,n.spatialReference=i,n.hasZ=o,n.hasM=l,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,r){const{curvePaths:s,paths:o,hasZ:l,hasM:a}=e;if(!(s?le(s,l??!1,a??!1,t,n.curvePaths=[],i,r):oe(o,l??!1,a??!1,t,n.paths,i,r)))return null;const u=ae(l,i);return n.spatialReference=i,n.hasZ=u,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,r){const{curveRings:s,rings:o,hasZ:l,hasM:a}=e;return(s?le(s,l??!1,a??!1,t,n.curveRings=[],i,r):oe(o,l??!1,a??!1,t,n.rings,i,r))?(n.spatialReference=i,n.hasZ=ae(l,i),n.hasM=a,n):null}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,r){const{xmin:s,ymin:o,xmax:l,ymax:a,hasZ:u,hasM:c}=e;if(!w(s,o,u?e.zmin:r,t,ue,i))return null;const h=ae(u,i);return n.xmin=ue[0],n.ymin=ue[1],h&&(n.zmin=ue[2]),w(l,a,u?e.zmax:r,t,ue,i)?(n.xmax=ue[0],n.ymax=ue[1],h&&(n.zmax=ue[2]),c&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function oe(e,t,n,i,r,s,o=0){const l=new Array;for(const n of e)for(const e of n)l.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(l,i,0,l,s,0))return!1;let a=0;r.length=0;const u=t?3:2,c=ae(t,s);for(const t of e){const e=new Array;for(const i of t){const t=l.slice(a,a+=3);c||t.pop(),n&&t.push(i[u]),e.push(t)}r.push(e)}return!0}function le(e,t,n,i,r,s,o=0){const l=new Array;for(const n of e)for(const e of n){if((0,I.FG)(e))return!1;if((0,I.aO)(e)){const[n,i]=e.c;l.push(n[0],n[1],t?n[2]:o,i[0],i[1],o);continue}if((0,I.n1)(e)){const[n,i,r]=e.b;l.push(n[0],n[1],t?n[2]:o,i[0],i[1],o,r[0],r[1],o);continue}const n=e;l.push(n[0],n[1],t?n[2]:o)}if(!(0,v.projectBuffer)(l,i,0,l,s,0))return!1;let a=0;r.length=0;const u=t?3:2,c=ae(t,s);for(const t of e){const e=new Array;for(const i of t){const t=l.slice(a,a+=3);if(c||t.pop(),n&&t.push((0,I.yP)(i)[u]),(0,I.FG)(i))return!1;if((0,I.aO)(i)){const n=l[a++],i=l[a++];++a,e.push({c:[t,[n,i]]});continue}if((0,I.n1)(i)){const n=l[a++],i=l[a++];++a;const r=l[a++],s=l[a++];++a,e.push({b:[t,[n,i],[r,s]]});continue}e.push(t)}r.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,S.aI)(t,m.Y0)}const ue=(0,l.vt)()},98764(e,t,n){n.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var i=n(73941),r=n(16930),s=n(21325);const o=new r.A(i.fv),l=new r.A(i.FY),a=new r.A(i.LJ),u=new r.A(i.Ro);function c(e){const t=h.get(e);if(t)return t;let n=o;if(e)if(e===l)n=l;else if(e===a)n=a;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,s.tl)(t)||(0,s.tl)(i)?n=l:((0,s.ZL)(t)||(0,s.ZL)(i))&&(n=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===p?n=l:e===d&&(n=a)}}}return h.set(e,n),n}const h=new Map,p=l.wkt.toUpperCase(),d=a.wkt.toUpperCase()},4197(e,t,n){n.d(t,{Vj:()=>c,cj:()=>u,jh:()=>s,l5:()=>l,yH:()=>a});var i=n(34275),r=n(9093);function s(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e,t){if(0===t.length)return o(e);if(0===e.length)return o(t);const n=s(e.length+t.length);for(let t=0;t<e.length;++t)n[t]=e[t];for(let i=0;i<t.length;++i)n[e.length+i]=t[i];return n}function u(e){return[...e]}function c(e){const t=(0,r.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},70328(e,t,n){n.d(t,{BI:()=>v,DC:()=>h,Ej:()=>d,Ie:()=>m,Jt:()=>b,Ne:()=>f,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>g,iT:()=>p,is:()=>M,qv:()=>_,vI:()=>y,vY:()=>l,v_:()=>x,vt:()=>s,w1:()=>u}),n(35522);var i=n(5443),r=(n(19419),n(4197));function s(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,i,r,o,l=s()){return l[0]=e,l[1]=t,l[2]=n,l[3]=i,l[4]=r,l[5]=o,l}function l(e,t=s()){return function(e,t,n,i=s()){return g(i,_),function(e,t,n=0,i=t.length/3){let r=e[0],s=e[1],o=e[2],l=e[3],a=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]),o=Math.min(o,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),a=Math.max(a,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,n),i}(e,0,e.length/3,t)}function a(e,t=(0,r.jh)(24)){const[n,i,s,o,l,a]=e;return t[0]=n,t[1]=i,t[2]=s,t[3]=n,t[4]=i,t[5]=a,t[6]=n,t[7]=l,t[8]=s,t[9]=n,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,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 c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(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 y(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 g(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 m(e){return e?g(e,_):s(_)}function b(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 v(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 M(e){return 6===e.length}function w(e,t,n){if(null==e||null==t)return e===t;if(!M(e)||!M(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 _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];s()},34403(e,t,n){n.d(t,{TP:()=>o});var i=n(79258);Math.PI;const r=i.$O.radius,s=i.$O.eccentricitySquared,o={a1:r*s,a2:r*s*r*s,a3:r*s*s/2,a4:r*s*r*s*2.5,a5:r*s+r*s*s/2,a6:1-s};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},50498(e,t,n){n.d(t,{Ye:()=>h,gy:()=>c,iI:()=>d,yR:()=>p});var i=n(66552),r=n(5443),s=n(91075),o=n(48526),l=n(86738),a=n(39829),u=n(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}},d=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},55156(e,t,n){n.d(t,{I:()=>r,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function r(e){return(t=e)&&i in t?e[i]:void 0;var t}},20737(e,t,n){n.r(t),n.d(t,{default:()=>W});var i=n(5482),r=n(37838),s=n(11254),o=n(69540),l=n(7762),a=n(49186),u=n(36563),c=n(25728),h=n(17676),p=n(36708),d=n(84952),f=n(91429),y=n(4146),g=n(52136),m=n(18768),b=n(63074),v=n(69208),M=n(10086),w=n(34287),_=n(8303),x=n(54310),S=n(25036),I=n(82935),A=n(4902),C=n(92474),z=n(55156),T=n(60950),j=n(89808),R=n(99959);const F=Symbol("isAnnotationFeatureGraphicOrigin");var E;class O extends R.A{get[(E=F,T.ym)](){return this.layer}get[z.e](){return this.layer}get[j.Q](){return this.layer}constructor(e){super(),this[E]=!0,this.type="annotation-feature",this.sublayer=e}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.subtypeCode}__`}}let k=class extends((0,o.OU)((0,A.s)(C.x_))){constructor(e){super(e),this.graphicOrigin=new O(this),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get title(){return this.parent?.subtypes?.find(e=>e.code===this.subtypeCode)?.name??null}};(0,i.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],k.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,f.MZ)({clonable:!1})],k.prototype,"parent",void 0),(0,i.Cg)([(0,f.MZ)({type:Number})],k.prototype,"subtypeCode",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],k.prototype,"title",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],k.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean})],k.prototype,"visible",void 0),k=(0,i.Cg)([(0,f.$K)("esri.layers.support.AnnotationFeatureSublayer")],k);var L=n(60694),Z=n(10873),N=n(15426),P=n(17036),q=n(30524),$=n(91908),G=n(97552),D=n(30291),U=n(36005);const V="annotation-feature-layer",K=(0,P.p)(),J=l.A.ofType(k);let B=class extends((0,M.j)((0,b.dM)((0,I.e)((0,S.j)((0,x.J)((0,m.b)((0,w.q)((0,_.A)((0,c.M)((0,v.d)((0,g.p)((0,o.OU)(y.A))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayers=new J,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.type="annotation-feature",this._dataElementPromise=null,this.addHandles((0,p.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),p.OH))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,n=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(h.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new a.A(`${V}:missing-url`,"AnnotationFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,N.VA)(this,"load",e));return this.addResolvingPromise(n),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const n=new J(t.subtypes.map(({code:e})=>new k({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);n.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return n}readTitleFromService(e,t){const{url:n}=this,i=t.name||(0,L.qg)(n)?.title;switch(this.sublayerTitleMode){case"item-title":if(n)return(0,L.yG)(n,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=(0,L.cr)(e),i?`${e} - ${(0,L.cr)(i)}`:e;break}}return i?(0,L.cr)(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return(0,D.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:r}=await(0,h.qr)(Promise.all([n.e(893),n.e(3636),n.e(3467)]).then(n.bind(n,65515)),e),s=new r({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,i.mS)(t,(0,u.Bf)((0,h.u7)(e,()=>s.cancelLoad())??(0,u.hA)()),!1),await s.load({signal:e}),s}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}createQuery(){const e=(0,N.VZ)(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=(0,d.fj)(this.url,"queryDataElements"),n={f:"json",layers:this.layerId};return this._dataElementPromise=(0,s.A)(t,{...e,responseType:"json",query:n}).then(e=>{const t=e.data.layerDataElements,n=this.layerId,i=t.find(e=>e.layerId===n);if(!i)throw new a.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),n=e.attributes[t.name];return this.findSublayerForSubtypeCode(n)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return(0,N.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const n=await this.load(),i=await n.source.queryFeatures(G.A.from(e)??n.createQuery(),t);if(i?.features)for(const e of i.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin,e.layer=e.sourceLayer=this}return i}async queryObjectIds(e,t){const n=await this.load();return n.source.queryObjectIds(G.A.from(e)??n.createQuery(),t)}async queryFeatureCount(e,t){const n=await this.load();return n.source.queryFeatureCount(G.A.from(e)??n.createQuery(),t)}async queryExtent(e,t){const n=await this.load();return n.source.queryExtent(G.A.from(e)??n.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,$.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,q.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,N.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new a.A(V+":unsupported-version","The feature service must be version 10.8 or above.")}_fetchFirstValidLayerId(e){return(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const n=[...t.layers||[],...t.tables||[]];return n.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};(0,i.Cg)([(0,f.MZ)(Z.es)],B.prototype,"barrierWeight",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],B.prototype,"editingEnabled",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],B.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,f.MZ)({...K.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],B.prototype,"fields",void 0),(0,i.Cg)([(0,f.MZ)(K.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,f.MZ)(Z.id)],B.prototype,"id",void 0),(0,i.Cg)([(0,f.MZ)({type:["ArcGISAnnotationLayer"]})],B.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)(K.outFields)],B.prototype,"outFields",void 0),(0,i.Cg)([(0,f.MZ)(Z.M6)],B.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:r.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],B.prototype,"source",void 0),(0,i.Cg)([(0,f.MZ)({type:J})],B.prototype,"sublayers",void 0),(0,i.Cg)([(0,U.w)("service","sublayers",["subtypes"])],B.prototype,"readSublayers",null),(0,i.Cg)([(0,f.MZ)({type:String})],B.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,U.w)("service","title",["name"])],B.prototype,"readTitleFromService",null),(0,i.Cg)([(0,U.w)("portal-item","title")],B.prototype,"readTitleFromPortalItem",null),(0,i.Cg)([(0,f.MZ)({json:{read:!1},value:"annotation-feature",readOnly:!0})],B.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:[Number],json:{write:{ignoreOrigin:!0}}})],B.prototype,"visibleLayers",null),B=(0,i.Cg)([(0,f.$K)("esri.layers.AnnotationFeatureLayer")],B);const W=B},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})},52136(e,t,n){n.d(t,{p:()=>s});var i=n(5482),r=n(91429);const s=e=>{const t=e;let n=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,r.MZ)({type:String})],n.prototype,"apiKey",null),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.APIKeyMixin")],n),n}},82935(e,t,n){n.d(t,{B:()=>p,e:()=>d});var i=n(5482),r=n(91429),s=n(89317),o=n(30524),l=n(96184),a=n(73133),u=n(79677),c=n(10184),h=n(36005);const p={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:s.K}}},d=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const i=n.timeOffset,r=a.j.fromJSON(n.timeOffsetUnits);return i&&r?new c.A({value:i,unit:r}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,r.MZ)({type:u.A,json:{write:!1}})],n.prototype,"timeExtent",void 0),(0,i.Cg)([(0,r.MZ)({type:c.A})],n.prototype,"timeOffset",void 0),(0,i.Cg)([(0,h.w)("service","timeOffset",["timeInfo.exportOptions"])],n.prototype,"readOffset",null),(0,i.Cg)([(0,r.MZ)({value:null,type:l.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"timeInfo",null),(0,i.Cg)([(0,r.MZ)(p)],n.prototype,"useViewTime",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.TemporalLayer")],n),n}},28032(e,t,n){n.d(t,{A:()=>a});var i=n(5482),r=n(69540),s=n(25482),o=n(91429),l=n(56400);let a=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"creatorField",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"creationDateField",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"editorField",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"editDateField",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"realm",void 0),(0,i.Cg)([(0,o.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.EditFieldsInfo")],a)},37352(e,t,n){n.d(t,{A:()=>a});var i,r=n(5482),s=n(7762),o=n(25482),l=n(91429);let a=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,r.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,r.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=i=(0,r.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],a)},45067(e,t,n){n.d(t,{A:()=>c});var i=n(5482),r=n(69540),s=n(66552),o=n(25482),l=n(91429);const a=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],c.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],c)},96184(e,t,n){n.d(t,{A:()=>d});var i=n(5482),r=n(69540),s=n(25482),o=n(91429),l=n(79677),a=n(10184),u=n(56400),c=n(36005),h=n(43937);function p(e,t){return a.A.fromJSON({value:e,unit:t})}let d=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?l.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?p(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?p(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],d.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],d.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],d.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,c.w)("fullTimeExtent",["timeExtent"])],d.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,h.K)("fullTimeExtent")],d.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],d.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],d.prototype,"interval",void 0),(0,i.Cg)([(0,c.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],d.prototype,"readInterval",null),(0,i.Cg)([(0,h.K)("interval")],d.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],d.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,u.P6)("timeReference",!0))],d.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],d.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],d.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],d.prototype,"stops",void 0),d=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],d)},17036(e,t,n){n.d(t,{p:()=>a});var i=n(44208),r=n(53966),s=n(20437),o=n(95466),l=n(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},32730(e,t,n){n.d(t,{BI:()=>d,D3:()=>h,XJ:()=>p,lc:()=>c,mX:()=>y,rU:()=>f,tH:()=>M,vK:()=>w,zA:()=>_});var i=n(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+r,"i"),u=new RegExp(s+"$","i");function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function p(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=c(e.labelExpression),t.type="conventional"),t}function d(e){const t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function f(e){const t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(g);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function y(e){let t;return e?(t=(0,i.HC)(e,e=>r+'$feature["'+e+'"]'+s),t=a.test(t)?t.replace(a,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(o,'" + ').replaceAll(l,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,m=/^\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,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=m.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}const w=Symbol("LabelClassInstance");function _(e){return null!=e&&"object"==typeof e&&w in e}},5757(e,t,n){n.d(t,{B:()=>r,P:()=>i});const i=Symbol("PopupTemplateInstance");function r(e){return null!=e&&"object"==typeof e&&i in e}},98205(e,t,n){n.d(t,{KZ:()=>l,eh:()=>o,gf:()=>s,of:()=>r,uY:()=>i});const i=Symbol("SizeVariableInstance");function r(e){return null!=e&&"object"==typeof e&&i in e}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function l(e,t){const n=t||o(e),i=e.valueUnit||"unknown";return"unknown"===n?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}},41366(e,t,n){n.d(t,{K:()=>h,Q:()=>a});var i=n(5482),r=n(66552),s=n(53966),o=n(91429),l=n(93223);const a=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",h=e=>{const t=e;let n=class extends t{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&&u||null,t&&n&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],n.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],n.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],n.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],n.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(a,{name:"parameters.normalizationType"})],n.prototype,"normalizationType",null),n=(0,i.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],n),n}},93470(e,t,n){n.d(t,{Cb:()=>s,HW:()=>c,JR:()=>r,JZ:()=>a,WR:()=>l,b6:()=>h,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},l={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6343],{47609(t,e,r){r.d(e,{A:()=>n});var s=r(66395);class n extends s.A{constructor(t){super(),this.declaredClass="esri.arcade.Portal",this.immutable=!1,this.setField("url",t),this.immutable=!0}get url(){return this.field("url")}}},66395(t,e,r){r.d(e,{A:()=>c});var s=r(66131),n=r(6800),o=r(85935),a=r(78878),i=r(91075),u=r(54218);function l(t,e,r=!1,s=!1){if(null==t)return null;if((0,u.Et)(t)||(0,u.Lm)(t)||(0,u.Kg)(t)||(0,a.e)(t)||(0,a.f)(t)||(0,a.g)(t))return t;if((0,u.cy)(t)){const n=[];for(const o of t)n.push(l(o,e,r,s));return n}if(s&&(0,a.h)(t))return t;const n=new c;n.immutable=!1;for(const[o,a]of Object.entries(t))void 0!==a&&n.setField(o,l(a,e,r,s));return n.immutable=r,n}class c{constructor(t){this.declaredClass="esri.arcade.Dictionary",this.plain=!1,this.immutable=!0,t instanceof c?this.attributes=t.attributes:null==t?this.attributes=Object.create(null):null!=Object.getPrototypeOf(t)?this.attributes={__proto__:null,...t}:this.attributes=t}static containerEntry(t,e){return new c({__proto__:null,key:t,value:e})}static textFormatting(){const t=new c({__proto__:null,newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});return t.immutable=!1,t}field(t){const e=t.toLowerCase(),r=this.attributes[t];if(void 0!==r)return r;for(const t in this.attributes)if(t.toLowerCase()===e)return this.attributes[t];throw new o.D$("FieldNotFound",null,{key:t})}setField(t,e){if(this.immutable)throw new o.D$("Immutable",null);if((0,a.i)(e))throw new o.D$("NoFunctionInDictionary",null);const r=t.toLowerCase();if(e instanceof Date&&(e=s.lY.dateJSToArcadeDate(e)),void 0===this.attributes[t]){for(const t in this.attributes)if(t.toLowerCase()===r)return void(this.attributes[t]=e);this.attributes[t]=e}else this.attributes[t]=e}eraseField(t){if(this.immutable)throw new o.D$("Immutable",null);if(t in this.attributes)return void delete this.attributes[t];const e=t.toLowerCase();for(const t in this.attributes)if(t.toLowerCase()===e)return void delete this.attributes[t]}hasField(t){const e=t.toLowerCase();if(void 0!==this.attributes[t])return!0;for(const t in this.attributes)if(t.toLowerCase()===e)return!0;return!1}keys(){const t=[];for(const e in this.attributes)t.push(e);return t.sort((t,e)=>t.toLowerCase()<e.toLowerCase()?-1:1)}values(){return this.keys().map(t=>this.attributes[t])}entryCount(){return Object.keys(this.attributes).length}isEmpty(){return this.entryCount()<=0}castToText(t=!1){return(0,a.c)(this.attributes,{useNumbersForDates:t})}static convertObjectToArcadeDictionary(t,e,r=!0,s=!1){const n=new c;n.immutable=!1;for(const o in t){const a=t[o];void 0!==a&&n.setField(o.toString(),l(a,e,r,s))}return n.immutable=r,n}static convertJsonToArcade(t,e,r=!1,s=!1){return l(t,e,r,s)}castAsJson(t=null){const e=Object.create(null);for(let r in this.attributes){const s=this.attributes[r];void 0!==s&&(t?.keyTranslate&&(r=t.keyTranslate(r)),e[r]=(0,a.a)(s,t))}return e}async castDictionaryValueAsJsonAsync(t,e,r,s=null,n){const o=await(0,a.b)(r,s,n);return t[e]=o,o}async castAsJsonAsync(t=null,e=null){const r=Object.create(null),n=[];for(let o in this.attributes){const u=this.attributes[o];e?.keyTranslate&&(o=e.keyTranslate(o)),void 0!==u&&((0,a.d)(u)||u instanceof i.A||u instanceof s.lY?r[o]=(0,a.a)(u,e):n.push(this.castDictionaryValueAsJsonAsync(r,o,u,t,e)))}return n.length>0&&await Promise.all(n),r}deepClone(){const t=new c;t.immutable=!1;for(const e of this.keys())t.setField(e,(0,n.G)(this.field(e)));return t}}},48938(t,e,r){r.d(e,{X:()=>n,_:()=>o});var s=r(85935);function n(t){if("string"==typeof t)return t.toLowerCase();if("name"in t)return t.name.toLowerCase();if("string"!=typeof t.value)throw new s.D$("InvalidIdentifier",null);return t.value.toLowerCase()}const o=Object.freeze({aborted:!1})},76343(t,e,r){r.r(e),r.d(e,{BatchTranslationServiceFactory:()=>s.B,PortalTranslationService:()=>s.P,getTranslateParametersKey:()=>s.g,registerFunctions:()=>s.r}),r(48938),r(66395),r(85935),r(78878),r(80672),r(49186),r(53966),r(45475),r(67090),r(62791),r(14942);var s=r(3367)},80672(t,e,r){r.d(e,{Iq:()=>i,RI:()=>a,VQ:()=>l,wI:()=>u});var s=r(47609),n=r(84952),o=r(20655);function a(t,e){return null==e?i(t):new o.A({url:e.url})}function i(t){return t.services?.portal??o.A.getDefault()}function u(t){const e=i(t);return new s.A(e.url)}function l(t,e){const r=t.url;return!!r&&(0,n.ut)(r,e.restUrl)}},3367(t,e,r){r.d(e,{A:()=>v,B:()=>C,P:()=>y,g:()=>m,r:()=>b});var s=r(48938),n=r(66395),o=r(85935),a=r(78878),i=r(80672),u=r(49186),l=r(53966),c=r(91869),h=r(45475),p=r(67090),d=r(62791),g=r(14942),f=r(54218);class y{constructor(t,e){this.portal=t,this._debugLog=e}async translate(t){this.portal.loaded||await this.portal.load();const e=this.portal.helperServices?.aiUtilityServices;if(null==e)return{success:!1};const r=e.api?.text_translate;if(null==r)return{success:!1};const s=e.url+r;try{return t.requestSource??="arcade",{success:!0,results:(await(0,h.T)(s,t,{authMode:"no-prompt"})).map(t=>t.toJSON())}}catch(t){return null!=this._debugLog&&(t instanceof Error||t instanceof u.A)&&this._debugLog(`TranslateText error: ${t.message}`),l.A.getLogger("esri.arcade.functions.aiServices").error(t),{success:!1}}}}class w{constructor(t,e,r){this._parameters=t,this._maxTotalContentSize=e,this._maxContentsLength=r,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(t){const e=new Set(t.filter(t=>!this._normalizedContents.has(t.text)).map(t=>t.text));if(this._requests.length+e.size>this._maxContentsLength)return null;let r=0;for(const t of e)r+=t.length;if((r+this._contentsTotalSize)*(this._parameters.outputCultures.length??1)>this._maxTotalContentSize)return null;const s=this._requests.length;for(const{key:e,text:r}of t)(0,c.tE)(this._normalizedContents,r,()=>[]).push({batchIdx:s,key:e});return this._requests.push(t),this._contentsTotalSize+=r,s}async send(t){const e=[],r=[];let s=0;for(const[t,n]of this._normalizedContents)e.push(new p.k({key:String(s++),text:t})),r.push(n);const n=new d.F(this._parameters);n.input=e;const o=await t.translate(n);if(!o.success)return Array.from(this._requests,()=>o);const a=Array.from(this._requests,()=>({success:!0,results:[]}));for(const t of o.results){const e=Number(t.key);for(const s of r[e])a[s.batchIdx].results.push({...t,key:s.key})}return a}}function m(t){const e=[...new Set(t.outputCultures)].sort(),r=t.inputCulture??null,s=t.portalUrl,n=t.provider;return JSON.stringify([e,r,s,n])}async function _(t,e,r){try{return(await t.yieldFor(r))[e]}catch{return{success:!1}}}class C{constructor(t,e,{maxTotalContentSize:r=5e4,maxContentsLength:s=1e3}={}){this._executor=t,this._service=e,this._openBatches=new Map,this._maxTotalContentSize=r,this._maxContentsLength=s}create(t){return{translate:async e=>{const r=m(e),{input:s,outputCultures:n,inputCulture:o,provider:a,portalUrl:i}=e;if(null==n)return{success:!1};if(null==s||s.every(t=>0===t.text.length))return{success:!1};const u=this._openBatches.get(r);if(null!=u){const e=u.data.tryAdd(s);if(null!=e)return await _(t,e,u);u.send()}const l=new w({outputCultures:n,inputCulture:o,provider:a,portalUrl:i},this._maxTotalContentSize,this._maxContentsLength),c=l.tryAdd(s);if(null!=c){const e=this._executor.openBatch(l,{open:t=>{this._openBatches.set(r,t)},execute:t=>t.send(this._service),close:t=>{this._openBatches.get(r)===t&&this._openBatches.delete(r)}});return await _(t,c,e)}return await this._service.translate(e)}}}}function b(t){"async"===t.mode&&(t.functions[(0,s.X)("TranslateText")]=function(e,r){return t.standardFunctionAsync(e,r,async(t,e,r)=>{if((0,a.B)(r,2,3,e),!(0,f.Kg)(r[0])&&!(0,f.cy)(r[0])&&!(0,a.j)(r[0]))throw new o.D$("InvalidParameter",e);const s=(0,a.S)(r[0]);if(!(0,f.Kg)(r[1])&&!(0,f.cy)(r[1])&&!(0,a.j)(r[1]))throw new o.D$("InvalidParameter",e);const u=(0,a.S)(r[1]);let l=null;if(r.length>=3){if(!(0,f.Kg)(r[2]))throw new o.D$("InvalidParameter",e);l=r[2]}const c=s.map((t,e)=>new p.k({key:String(e),text:t})),h=(0,i.Iq)(t),w=new d.F({outputCultures:u,input:c,inputCulture:l,portalUrl:h.restUrl.replace(/\/sharing\/rest$/,"")}),_=new Map;let C;if(null!=t.lrucache){const e=t.lrucache;C??=m(w),w.input=w.input?.filter(t=>{const r=e.getCachedTranslation(C,t.text);return null==r||(_.set(t.key,{...r,key:t.key}),!1)})}if(w.input?.length){const e=t.services?.translation??new y(h,t.console),r=await e.translate(w);if(!r.success)return new n.A({__proto__:null,success:!1});for(const e of r.results){const r=w.input?.find(t=>t.key===e.key)?.text;if(null==r)throw new o.D$("NeverReach",null);_.set(e.key,e),null!=t.lrucache&&(C??=m(w),t.lrucache.setCachedTranslation(C,r,{detectedLanguage:e.detectedLanguage,translations:e.translations}))}}const b=Array.from(c,t=>{const e=g.s.fromJSON(_.get(t.key));if(null==e)throw new o.D$("NeverReach",null);const r=Object.create(null);for(const t of e.translations)r[t.to]=t.text;return new n.A({__proto__:null,key:e.key,text:t.text,detectedLanguage:new n.A({__proto__:null,language:e.detectedLanguage,score:e.detectedLanguageScore}),translation:new n.A(r)})});return new n.A({__proto__:null,success:!0,results:b})})})}const v=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:C,PortalTranslationService:y,getTranslateParametersKey:m,registerFunctions:b},Symbol.toStringTag,{value:"Module"}))},67090(t,e,r){r.d(e,{k:()=>i});var s=r(5482),n=r(25482),o=r(10107),a=r(64108);let i=class extends n.o{constructor(t){super(t)}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"key",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"text",void 0),i=(0,s.Cg)([(0,a.$)("esri.rest.support.TranslateContent")],i)},62791(t,e,r){r.d(e,{F:()=>u});var s=r(5482),n=r(25482),o=r(10107),a=r(64108),i=r(67090);let u=class extends n.o{constructor(t){super(t),this.outputCultures=null,this.input=null,this.portalUrl="https://www.arcgis.com",this.provider="default",this.inputCulture=null,this.requestSource=null}};(0,s.Cg)([(0,o.MZ)({type:[String],json:{write:!0}})],u.prototype,"outputCultures",void 0),(0,s.Cg)([(0,o.MZ)({type:[i.k],json:{write:!0}})],u.prototype,"input",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{read:!1,write:!1}})],u.prototype,"portalUrl",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0,default:"default"}})],u.prototype,"provider",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"inputCulture",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{read:!1,write:!1}})],u.prototype,"requestSource",void 0),u=(0,s.Cg)([(0,a.$)("esri.rest.support.TranslateParameters")],u)},14942(t,e,r){r.d(e,{s:()=>u});var s=r(5482),n=r(25482),o=r(10107),a=r(64108);let i=class extends n.o{};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"text",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],i.prototype,"to",void 0),i=(0,s.Cg)([(0,a.$)("esri.rest.support.TranslateResult.Translation")],i);let u=class extends n.o{constructor(t){super(t),this.detectedLanguage="en",this.detectedLanguageScore=-1}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"key",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{read:{source:"detectedLanguage.language"},write:{target:"detectedLanguage.language"}}})],u.prototype,"detectedLanguage",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{read:{source:"detectedLanguage.score"},write:{target:"detectedLanguage.score"}}})],u.prototype,"detectedLanguageScore",void 0),(0,s.Cg)([(0,o.MZ)({type:[i],json:{write:!0}})],u.prototype,"translations",void 0),u=(0,s.Cg)([(0,a.$)("esri.rest.support.TranslateResult")],u)},45475(t,e,r){r.d(e,{T:()=>a});var s=r(11254),n=r(2272),o=r(14942);async function a(t,e,r){const a=JSON.stringify(e.toJSON()),i={};"https://www.arcgis.com"!==e.portalUrl&&(i.portal=e.portalUrl),null!=e.requestSource&&(i.request_source=e.requestSource),i.token=await(0,n.gf)(e.portalUrl,null,{signal:r?.signal,prompt:"no-prompt"!==r?.authMode});const u=(0,n.Dl)(t),l=(0,n.jV)(u.query,{...r,query:i,body:a,method:"post",authMode:"anonymous"});return(await(0,s.A)(u.path,l)).data.results.map(t=>o.s.fromJSON(t))}}}]);