@arcgis/core 4.28.0-next.20231002 → 4.28.0-rc.0

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 (257) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02120d192eafd7612475.js +1 -0
  3. package/assets/esri/core/workers/chunks/{4d967e98d229f18d61f5.js → 09e8babe75407c2e64c4.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0beebbb0c6dad0e742d7.js +1 -0
  5. package/assets/esri/core/workers/chunks/0d8ca51043c7784aed96.js +1 -0
  6. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +1 -0
  7. package/assets/esri/core/workers/chunks/{5e9edd06e624f385fa4b.js → 121a9e148509f2fe2210.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +1 -0
  9. package/assets/esri/core/workers/chunks/{0526d623d0b4c12929bd.js → 18ab9cc85a1a7988fdfd.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{7c960a2694c4c3123acf.js → 1a36703ebe934749646e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/24a0cf405195421c0d06.js +1 -0
  12. package/assets/esri/core/workers/chunks/24ff267cf253feac22de.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3c8613596659801fd6ab.js → 29cab345819ec02ed60a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{169a61c6e128b8a16021.js → 2c560a075d9ef2069ed1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8e71dac98135bbc3e6.js +1 -0
  16. package/assets/esri/core/workers/chunks/341fb51b2165522963b3.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ad8e0f82cb1feafa9e2f.js → 36ab90fb34b9716a9983.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2688213bbff536da7917.js → 3ea0b872436fce84b927.js} +1 -1
  19. package/assets/esri/core/workers/chunks/40633064c290dc2af9ea.js +1 -0
  20. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +1 -0
  21. package/assets/esri/core/workers/chunks/44b870cb53ba68b17c32.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8a7fa4e8b0d14da7c9eb.js → 4cc680fe4c9c39d2f853.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{6730c9f0890191a95fdb.js → 4d81aa50d90f5701a343.js} +1 -1
  24. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +1 -0
  25. package/assets/esri/core/workers/chunks/4e6bf1efe3b0b474cbb4.js +1 -0
  26. package/assets/esri/core/workers/chunks/52cef7cd3aaaa4f45c94.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4e04242e707c0eb3aa4a.js → 5a3ccc0a19ac8fa9e524.js} +1 -1
  28. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +1 -0
  29. package/assets/esri/core/workers/chunks/66ba749ab0a631bbfdec.js +1 -0
  30. package/assets/esri/core/workers/chunks/6b14d89d689a21014aec.js +1 -0
  31. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +1 -0
  32. package/assets/esri/core/workers/chunks/{576269fd1f9049876aa1.js → 6b7b5544ed1f9a84623f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/710a6268de62003af825.js +1 -0
  34. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +1 -0
  35. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +1 -0
  36. package/assets/esri/core/workers/chunks/7cf7f2b991a7cbdad2ce.js +1 -0
  37. package/assets/esri/core/workers/chunks/{70dffbf49b0633b1a5f1.js → 8f3680fee85a05839489.js} +1 -1
  38. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +1 -0
  39. package/assets/esri/core/workers/chunks/{c7ebd5d431fb996bfcee.js → 9f8207c82a17508a87a8.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{557305b91f77569ce664.js → a01ffe03b1465c21b9e6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/a298c9031962951e55a9.js +1 -0
  42. package/assets/esri/core/workers/chunks/{329669a9beda89b028dd.js → a5a7bbdd8298016535bc.js} +1 -1
  43. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +1 -0
  44. package/assets/esri/core/workers/chunks/ad38e456a7cee940a165.js +1 -0
  45. package/assets/esri/core/workers/chunks/adfbc168be8c49b51e1b.js +1 -0
  46. package/assets/esri/core/workers/chunks/b0526633a93ef69ec47b.js +1 -0
  47. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +1 -0
  48. package/assets/esri/core/workers/chunks/{36c4b4c3eca57417da2c.js → c260ad3434bb00ba64a7.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{39922ce232338de076ae.js → c459c8d8630eb4b955b1.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c92e75b79aff7b505b31.js +1 -0
  51. package/assets/esri/core/workers/chunks/ca85e88dad30b5f2956b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8e56d40691b6bf75d7cc.js → ce409944221a784ddb61.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d13f75f233cf313e5a1d.js +1 -0
  54. package/assets/esri/core/workers/chunks/d60d5f006375f7fcc88c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{77958089748dc31757cf.js → d6ded127949160103f69.js} +1 -1
  56. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +1 -0
  57. package/assets/esri/core/workers/chunks/{304c81f6297ecba3a324.js → d95eed98316e59f8f35d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/df7267892b6e0493e1d7.js +1 -0
  59. package/assets/esri/core/workers/chunks/{52dca349e1a45555954d.js → e52d5a48e83d8df36f92.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +1 -0
  61. package/assets/esri/core/workers/chunks/e8c7cc974420c0b92d0e.js +1 -0
  62. package/assets/esri/core/workers/chunks/{b7ef554b1213307499fc.js → e93442c6d92229f3a4b0.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{ef5772ca1848d6d01b88.js → eda86faa708cfe4c9f9a.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f2718e260f594537f7fd.js +1 -0
  65. package/assets/esri/core/workers/chunks/f6b7036114b1d754fdd9.js +1 -0
  66. package/assets/esri/core/workers/chunks/{c4631241dc777ca77aaa.js → f6c0680c535c5a3c73ee.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{a0ea1d3e22d52b8a59a8.js → fa6103e3d4e857b0035b.js} +9 -9
  68. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +1 -0
  69. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  70. package/assets/esri/t9n/common.json +1 -1
  71. package/assets/esri/t9n/common_ar.json +1 -1
  72. package/assets/esri/t9n/common_bg.json +1 -1
  73. package/assets/esri/t9n/common_bs.json +1 -1
  74. package/assets/esri/t9n/common_ca.json +1 -1
  75. package/assets/esri/t9n/common_cs.json +1 -1
  76. package/assets/esri/t9n/common_da.json +1 -1
  77. package/assets/esri/t9n/common_de.json +1 -1
  78. package/assets/esri/t9n/common_el.json +1 -1
  79. package/assets/esri/t9n/common_en.json +1 -1
  80. package/assets/esri/t9n/common_es.json +1 -1
  81. package/assets/esri/t9n/common_et.json +1 -1
  82. package/assets/esri/t9n/common_fi.json +1 -1
  83. package/assets/esri/t9n/common_fr.json +1 -1
  84. package/assets/esri/t9n/common_he.json +1 -1
  85. package/assets/esri/t9n/common_hr.json +1 -1
  86. package/assets/esri/t9n/common_hu.json +1 -1
  87. package/assets/esri/t9n/common_id.json +1 -1
  88. package/assets/esri/t9n/common_it.json +1 -1
  89. package/assets/esri/t9n/common_ja.json +1 -1
  90. package/assets/esri/t9n/common_ko.json +1 -1
  91. package/assets/esri/t9n/common_lt.json +1 -1
  92. package/assets/esri/t9n/common_lv.json +1 -1
  93. package/assets/esri/t9n/common_nb.json +1 -1
  94. package/assets/esri/t9n/common_nl.json +1 -1
  95. package/assets/esri/t9n/common_pl.json +1 -1
  96. package/assets/esri/t9n/common_pt-BR.json +1 -1
  97. package/assets/esri/t9n/common_pt-PT.json +1 -1
  98. package/assets/esri/t9n/common_ro.json +1 -1
  99. package/assets/esri/t9n/common_ru.json +1 -1
  100. package/assets/esri/t9n/common_sk.json +1 -1
  101. package/assets/esri/t9n/common_sl.json +1 -1
  102. package/assets/esri/t9n/common_sr.json +1 -1
  103. package/assets/esri/t9n/common_sv.json +1 -1
  104. package/assets/esri/t9n/common_th.json +1 -1
  105. package/assets/esri/t9n/common_tr.json +1 -1
  106. package/assets/esri/t9n/common_uk.json +1 -1
  107. package/assets/esri/t9n/common_vi.json +1 -1
  108. package/assets/esri/t9n/common_zh-CN.json +1 -1
  109. package/assets/esri/t9n/common_zh-HK.json +1 -1
  110. package/assets/esri/t9n/common_zh-TW.json +1 -1
  111. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +2 -1
  112. package/assets/esri/themes/base/widgets/_FeatureForm.scss +0 -1
  113. package/assets/esri/themes/dark/main.css +1 -1
  114. package/assets/esri/themes/light/main.css +1 -1
  115. package/assets/esri/themes/light/view.css +1 -1
  116. package/chunks/pe-wasm.js +1 -1
  117. package/config.js +1 -1
  118. package/core/pbf.js +1 -1
  119. package/geometry/support/WKIDUnitConversion.js +1 -1
  120. package/geometry/support/plane.js +1 -1
  121. package/interfaces.d.ts +37 -39
  122. package/kernel.js +1 -1
  123. package/layers/GroupLayer.js +1 -1
  124. package/layers/SceneLayer.js +1 -1
  125. package/layers/graphics/data/QueryEngine.js +1 -1
  126. package/layers/graphics/data/QueryEngineResult.js +1 -1
  127. package/layers/graphics/editingSupport.js +1 -1
  128. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  129. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  130. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  131. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  132. package/layers/mixins/OperationalLayer.js +1 -1
  133. package/layers/save/featureLayerUtils.js +1 -1
  134. package/layers/save/groupLayerUtils.js +5 -0
  135. package/layers/save/utils.js +1 -1
  136. package/layers/support/LayerLoadContext.js +5 -0
  137. package/layers/support/featureLayerUtils.js +1 -1
  138. package/layers/support/labelFormatUtils.js +1 -1
  139. package/layers/support/layersCreator.js +1 -1
  140. package/layers/support/versionUtils.js +1 -1
  141. package/networks/UtilityNetwork.js +1 -1
  142. package/package.json +1 -1
  143. package/portal/schemas/definitions.js +1 -1
  144. package/portal/support/jsonContext.js +1 -1
  145. package/portal/support/layersLoader.js +1 -1
  146. package/portal/support/loadUtils.js +5 -0
  147. package/portal/support/portalItemUtils.js +1 -1
  148. package/portal/support/portalLayers.js +1 -1
  149. package/renderers/support/RasterSymbolizer.js +1 -1
  150. package/rest/print.js +1 -1
  151. package/support/basemapUtils.js +1 -1
  152. package/support/revision.js +1 -1
  153. package/symbols/PolygonSymbol3D.js +1 -1
  154. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  155. package/views/2d/engine/imagery/colorizer/shadedrelief.js +1 -1
  156. package/views/2d/engine/imagery/colorizer/stretch.js +1 -1
  157. package/views/2d/input/handlers/KeyPan.js +1 -1
  158. package/views/2d/input/handlers/KeyRotate.js +1 -1
  159. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  160. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  161. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  162. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  163. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  164. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  167. package/views/3d/layers/i3s/featureEditing.js +1 -1
  168. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  169. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  170. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  171. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  172. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  173. package/views/DOMContainer.js +1 -1
  174. package/views/draw/DrawGraphicTool.js +1 -1
  175. package/views/draw/DrawOperation.js +1 -1
  176. package/views/draw/support/Box.js +1 -1
  177. package/views/draw/support/Reshape.js +1 -1
  178. package/views/input/VisibilityChange.js +5 -0
  179. package/views/interactive/sketch/constraints.js +1 -1
  180. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  181. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +5 -0
  182. package/views/interactive/snapping/SnappingContext.js +1 -1
  183. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  184. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  185. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  186. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
  187. package/views/interactive/snapping/snappingUtils.js +1 -1
  188. package/webdoc/support/saveUtils.js +1 -1
  189. package/webdoc/webdocSaveUtils.js +1 -1
  190. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  191. package/widgets/DirectionalPad/constants.js +1 -1
  192. package/widgets/DirectionalPad.js +1 -1
  193. package/widgets/Editor/Upload.js +1 -1
  194. package/widgets/Editor/workflowUtils.js +1 -1
  195. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  196. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  197. package/widgets/FeatureForm/FieldInput.js +1 -1
  198. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  199. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  200. package/widgets/FeatureForm.js +1 -1
  201. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  202. package/widgets/FeatureTable/FieldColumn.js +1 -1
  203. package/widgets/FeatureTable/Grid/Column.js +1 -1
  204. package/widgets/FeatureTable.js +1 -1
  205. package/widgets/ScaleRangeSlider.js +1 -1
  206. package/widgets/support/DatePicker.js +1 -1
  207. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  208. package/widgets/support/Selector2D/SelectionOperation2D.js +1 -1
  209. package/widgets/support/Selector2D.js +1 -1
  210. package/widgets/support/TimePicker.js +1 -1
  211. package/widgets/support/dateUtils.js +1 -1
  212. package/assets/esri/core/workers/chunks/027f8b57565c65fbccda.js +0 -1
  213. package/assets/esri/core/workers/chunks/048265fb5953350e3e33.js +0 -1
  214. package/assets/esri/core/workers/chunks/0b9cf14f8aafb76c578b.js +0 -1
  215. package/assets/esri/core/workers/chunks/0ebf58c927bfc4c9d4fe.js +0 -1
  216. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +0 -1
  217. package/assets/esri/core/workers/chunks/1224475f3eefdfd59c76.js +0 -1
  218. package/assets/esri/core/workers/chunks/162b0220e24e9ba72655.js +0 -1
  219. package/assets/esri/core/workers/chunks/1e611cad53b745ee146f.js +0 -1
  220. package/assets/esri/core/workers/chunks/24b1bf1a5d80f43a6c9a.js +0 -1
  221. package/assets/esri/core/workers/chunks/29ed31fd4f9d5cf53686.js +0 -1
  222. package/assets/esri/core/workers/chunks/2b6d1c8e4ed759767827.js +0 -1
  223. package/assets/esri/core/workers/chunks/34b44b0fab88f838885c.js +0 -1
  224. package/assets/esri/core/workers/chunks/364f55294a1d7bf163d7.js +0 -1
  225. package/assets/esri/core/workers/chunks/3714ab435dd5ccf9e694.js +0 -1
  226. package/assets/esri/core/workers/chunks/3788009a5ece453011f3.js +0 -1
  227. package/assets/esri/core/workers/chunks/3aafe8160b3bfbaa6935.js +0 -1
  228. package/assets/esri/core/workers/chunks/41c002e4c42c581cda8d.js +0 -1
  229. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +0 -1
  230. package/assets/esri/core/workers/chunks/4e8d1e6051f6654a5e83.js +0 -1
  231. package/assets/esri/core/workers/chunks/53746e9976758630159b.js +0 -1
  232. package/assets/esri/core/workers/chunks/5449fdd69e12e5cbd12a.js +0 -1
  233. package/assets/esri/core/workers/chunks/57ce4ece0147afb0d43c.js +0 -1
  234. package/assets/esri/core/workers/chunks/5e83d21400a5dec05c81.js +0 -1
  235. package/assets/esri/core/workers/chunks/6047f4487dcd37cca98e.js +0 -1
  236. package/assets/esri/core/workers/chunks/6967d2b3721678b38774.js +0 -1
  237. package/assets/esri/core/workers/chunks/6ac5ca7de651e3d672a1.js +0 -1
  238. package/assets/esri/core/workers/chunks/6b7ee9164149428edb9e.js +0 -1
  239. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +0 -1
  240. package/assets/esri/core/workers/chunks/6d43648d5326e01b4474.js +0 -1
  241. package/assets/esri/core/workers/chunks/74fb07de0f990d45af89.js +0 -1
  242. package/assets/esri/core/workers/chunks/8e9a52062ce059153a89.js +0 -1
  243. package/assets/esri/core/workers/chunks/919a57d372419785cd5e.js +0 -1
  244. package/assets/esri/core/workers/chunks/939f0a1a7d605e389e45.js +0 -1
  245. package/assets/esri/core/workers/chunks/9932f23ba6589df14a3d.js +0 -1
  246. package/assets/esri/core/workers/chunks/a25a38c9f338e0beffef.js +0 -1
  247. package/assets/esri/core/workers/chunks/a97581e584336b46ede7.js +0 -1
  248. package/assets/esri/core/workers/chunks/b1cb932cfadc4dc3f1e4.js +0 -1
  249. package/assets/esri/core/workers/chunks/be3fb6113b0b27b94537.js +0 -1
  250. package/assets/esri/core/workers/chunks/c37119f5692e19aa1ce2.js +0 -1
  251. package/assets/esri/core/workers/chunks/c685f16435d9861bbbd0.js +0 -1
  252. package/assets/esri/core/workers/chunks/d5dfc03673aec8aa57e2.js +0 -1
  253. package/assets/esri/core/workers/chunks/e6416a2684866d677b3e.js +0 -1
  254. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +0 -1
  255. package/assets/esri/core/workers/chunks/eb4aed4fdb44495a4fe6.js +0 -1
  256. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +0 -1
  257. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9059,5732,7865,2596],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var i,n=r(43697),s=r(96674),o=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),u=r(30556),h=r(25031);let y=i=class extends s.wq{static get allTime(){return c}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,e,t));let n=this.end;if(n){const r=(0,o.JE)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;if(n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t,r=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.Nm)(s,e,t,r)),null!=a&&(n.end=(0,o.Nm)(a,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,n._)([(0,l.r)("end")],y.prototype,"readEnd",null),(0,n._)([(0,u.c)("end")],y.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,n._)([(0,l.r)("start")],y.prototype,"readStart",null),(0,n._)([(0,u.c)("start")],y.prototype,"writeStart",null),y=i=(0,n._)([(0,d.j)("esri.TimeExtent")],y);const c=new y,p=new y({start:void 0,end:void 0}),m=y},5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),a=r(52011);let l=class extends n.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const d=l},10699:(e,t,r)=>{r.d(t,{IG:()=>o,iv:()=>a});var i=r(43697),n=r(52011);let s=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,n.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,n.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,n.j)("esri.core.Identifiable")],l)},70921:(e,t,r)=>{r.d(t,{R:()=>s,Z:()=>n});var i=r(46791);function n(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function s(e){return e}},68668:(e,t,r)=>{r.d(t,{G:()=>o,w:()=>a});var i=r(66643),n=r(46791),s=r(83379);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):n.Z.isCollection(t)?t.forEach((e=>o(e))):s.Z.isLoadable(t)&&r.push(t))};t(o);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},17445:(e,t,r)=>{r.d(t,{N1:()=>y,YP:()=>l,Z_:()=>m,gx:()=>d,nn:()=>f,on:()=>h,tX:()=>g}),r(66643),r(46791);var i=r(91460),n=r(50758),s=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return u(e,t,r,c)}function d(e,t,r={}){return u(e,t,r,p)}function u(e,t,r={},i){let n=null;const o=r.once?(e,r)=>{i(e)&&((0,s.hw)(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return n}function h(e,t,r,o={}){let a=null,d=null,u=null;function h(){a&&d&&(d.remove(),o.onListenerRemove?.(a),a=null,d=null)}function y(e){o.once&&o.once&&(0,s.hw)(u),r(e)}const c=l(e,((e,r)=>{h(),(0,i.vT)(e)&&(a=e,d=(0,i.on)(e,t,y),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.kB)((()=>{c.remove(),h()})),u}function y(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,s.hw)(a)}return new Promise(((i,s)=>{a=(0,n.AL)([(0,o.fu)(r,(()=>{l(),s((0,o.zE)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??c)])}))}(e,p,t)}function c(e){return!0}function p(e){return!!e}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>a,rJ:()=>d});var i=r(90344),n=r(25031),s=r(17126);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function a(e,t,r,o=n.By){const a=new s.vF((0,i.f1)(o)),l=s.ou.fromJSDate(e,{zone:a}),d="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,r=n.By){const o=new s.vF((0,i.f1)(r)),a=s.ou.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=a.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const l=u(t);return a.startOf(l).toJSDate()}function d(e,t,r){return 0===e?0:e*o[t]/o[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},90344:(e,t,r)=>{r.d(t,{Xr:()=>p,Ze:()=>b,f1:()=>w,p6:()=>v});var i=r(35454),n=r(70171),s=r(25031);r(17126);const o=Intl.DateTimeFormat().resolvedOptions().timeZone,a=(s.pt,{year:"numeric",month:"numeric",day:"numeric"}),l={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},u={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},y={...h,second:"numeric"},c={"short-date":a,"short-date-short-time":{...a,...h},"short-date-short-time-24":{...a,...h,hour12:!1},"short-date-long-time":{...a,...y},"short-date-long-time-24":{...a,...y,hour12:!1},"short-date-le":a,"short-date-le-short-time":{...a,...h},"short-date-le-short-time-24":{...a,...h,hour12:!1},"short-date-le-long-time":{...a,...y},"short-date-le-long-time-24":{...a,...y,hour12:!1},"long-month-day-year":l,"long-month-day-year-short-time":{...l,...h},"long-month-day-year-short-time-24":{...l,...h,hour12:!1},"long-month-day-year-long-time":{...l,...y},"long-month-day-year-long-time-24":{...l,...y,hour12:!1},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...h},"day-short-month-year-short-time-24":{...d,...h,hour12:!1},"day-short-month-year-long-time":{...d,...y},"day-short-month-year-long-time-24":{...d,...y,hour12:!1},"long-date":u,"long-date-short-time":{...u,...h},"long-date-short-time-24":{...u,...h,hour12:!1},"long-date-long-time":{...u,...y},"long-date-long-time-24":{...u,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":y},p=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const g=c["short-date-short-time"];function b(e){return c[e]}function v(e,t=g){return function(e){let t=f.get(e);if(!t){const r=(0,n.Kd)(),i=m[r]||r,o=w(e.timeZone??s.By),a={...e,timeZone:o};t=new Intl.DateTimeFormat(i,a),f.set(e,t)}return t}(t).format(e)}function w(e){switch(e){case s.By:return o;case s._4:return s.pt;default:return e}}(0,n.Ze)((()=>{f=new WeakMap}))},40504:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var i=r(43697),n=r(57435),s=r(68668),o=r(92604),a=r(16453),l=r(17445),d=r(5600),u=(r(75215),r(67676),r(80442),r(1153)),h=r(52011),y=r(30556),c=r(87085),p=r(71612),m=r(38009),f=r(16859),g=r(72965),b=r(87344),v=r(46791),w=r(70921),_=r(95330);function C(e,t,r){let i,n;if(e)for(let s=0,o=e.length;s<o;s++){if(i=e.at(s),i?.[t]===r)return i;if("group"===i?.type&&(n=C(i.layers,t,r),n))return n}}const T=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||o.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,w.Z)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof c.Z){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else(0,_.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):o.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let i=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,i),i+=1):this.reorder(e,i)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,i._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,i._)([(0,h.j)("esri.support.LayersMixin")],t),t};function L(e,t,r){if(e)for(let i=0,n=e.length;i<n;i++){const n=e.at(i);if(n[t]===r)return n;if("group"===n?.type){const e=L(n.tables,t,r);if(e)return e}}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&o.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,w.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,i._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,i._)([(0,h.j)("esri.support.TablesMixin")],t),t},I=Symbol("WebScene");var S=r(15650);let D=class extends((0,p.h)((0,g.M)((0,m.q)((0,f.I)(E(T((0,a.R)(c.Z)))))))){constructor(e){var t;super(e),this.allLayers=new n.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new n.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,l.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&I in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,l.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),o.Z.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),l.tX),(0,l.YP)((()=>this.visible),this._onVisibilityChange.bind(this),l.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,r,i){const n=[];if(!e)return n;e.forEach((e=>{const t=(0,S.Nw)(e,i.webmap?i.webmap.getLayerJSONFromResourceInfo(e):null,i);t?.layerType&&n.push(t)})),t.layers=n}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:b.T},e)),Promise.resolve(this)}async loadAll(){return(0,s.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,l.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),l.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const r=this.layers;let i=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!i&&(i=r.at(0),i.visible=!0),this._turnOffOtherLayers(i);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,i._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],D.prototype,"allLayers",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],D.prototype,"allTables",void 0),(0,i._)([(0,d.Cb)()],D.prototype,"fullExtent",void 0),(0,i._)([(0,d.Cb)({json:{read:!0,write:!0}})],D.prototype,"blendMode",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],D.prototype,"layers",void 0),(0,i._)([(0,y.c)("layers")],D.prototype,"_writeLayers",null),(0,i._)([(0,d.Cb)({type:["GroupLayer"]})],D.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],D.prototype,"portalItem",null),(0,i._)([(0,d.Cb)()],D.prototype,"spatialReference",void 0),(0,i._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],D.prototype,"type",void 0),(0,i._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],D.prototype,"visibilityMode",null),D=(0,i._)([(0,h.j)("esri.layers.GroupLayer")],D);const M=D},87085:(e,t,r)=>{r.d(t,{Z:()=>v});var i=r(43697),n=(r(66577),r(3172)),s=r(20102),o=r(32448),a=r(10699),l=r(83379),d=r(92604),u=r(95330),h=r(17452),y=r(5600),c=(r(75215),r(67676),r(80442),r(52011)),p=r(68773),m=r(6570),f=r(82971);let g=0,b=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||p.default.portalUrl;throw d.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||d.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,y.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,y.Cb)({type:m.Z})],b.prototype,"fullExtent",void 0),(0,i._)([(0,y.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,y.Cb)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,y.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,y.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,y.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,y.Cb)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,y.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,y.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,y.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,y.Cb)({type:f.Z})],b.prototype,"spatialReference",void 0),(0,i._)([(0,y.Cb)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,y.Cb)()],b.prototype,"url",void 0),(0,i._)([(0,y.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.j)("esri.layers.Layer")],b);const v=b},16859:(e,t,r)=>{r.d(t,{I:()=>C});var i=r(43697),n=r(68773),s=r(40330),o=r(3172),a=r(66643),l=r(20102),d=r(92604),u=r(70586),h=r(95330),y=r(17452),c=r(5600),p=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,h.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||d.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!n||!(0,y.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=b.Z.getDefault();if(n&&n.loaded&&(0,y.Fv)(n.restUrl)===(0,y.Fv)(i))return n.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?w.Z.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,y.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},15650:(e,t,r)=>{r.d(t,{Nw:()=>h});var i=r(20102),n=r(22974),s=r(78286),o=r(827),a=r(84230);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),d=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,o.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,o.k)(e.minScale)??void 0)}function h(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r?.messages&&r.messages.push(new i.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const r=function(e){return"basemap"===e.layerContainerType?l:"operational-layers"===e.layerContainerType?d:null}(t);return null==r||r.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const r=(0,s.hS)("featureCollection.layers",t),i=r?.[0]?.layerDefinition;i&&u(e,i)}else"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,o.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,n.d9)(t)),t}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5286],{88764:(e,t,i)=>{i.d(t,{q:()=>o});var s,n,r,a=i(5732),l={exports:{}};s=l,n=function(){function e(i,s,n,r,a){for(;r>n;){if(r-n>600){var l=r-n+1,o=s-n+1,u=Math.log(l),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(l-c)/l)*(o-l/2<0?-1:1);e(i,s,Math.max(n,Math.floor(s-o*c/l+h)),Math.min(r,Math.floor(s+(l-o)*c/l+h)),a)}var d=i[s],f=n,m=r;for(t(i,n,s),a(i[r],d)>0&&t(i,n,r);f<m;){for(t(i,f,m),f++,m--;a(i[f],d)<0;)f++;for(;a(i[m],d)>0;)m--}0===a(i[n],d)?t(i,n,m):t(i,++m,r),m<=s&&(n=m+1),s<=m&&(r=m-1)}}function t(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function i(e,t){return e<t?-1:e>t?1:0}return function(t,s,n,r,a){e(t,s,n||0,r||t.length-1,a||i)}},void 0!==(r=n())&&(s.exports=r);const o=(0,a.g)(l.exports)},95528:(e,t,i)=>{i.d(t,{t:()=>l});var s=i(22974),n=i(58971),r=i(10661);class a{constructor(e,t){this._observable=new r.s,this._value=e,this._equalityFunction=t}get value(){return(0,n.it)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function l(e,t=s.y7){return new a(e,t)}},82397:(e,t,i)=>{i.d(t,{G6:()=>p,Ie:()=>m,J9:()=>d,RF:()=>h,U1:()=>f,vY:()=>a}),i(33955);const s=(e,t,i)=>[t,i],n=(e,t,i)=>[t,i,e[2]],r=(e,t,i)=>[t,i,e[2],e[3]];function a(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],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function l({scale:e,translate:t},i){return i*e[0]+t[0]}function o({scale:e,translate:t},i){return t[1]-i*e[1]}function u(e,t,i){const s=new Array(i.length);if(!i.length)return s;const[n,r]=e.scale;let a=l(e,i[0][0]),u=o(e,i[0][1]);s[0]=t(i[0],a,u);for(let e=1;e<i.length;e++){const l=i[e];a+=l[0]*n,u-=l[1]*r,s[e]=t(l,a,u)}return s}function c(e,t,i){const s=new Array(i.length);for(let n=0;n<i.length;n++)s[n]=u(e,t,i[n]);return s}function h(e,t,i,s,n){return t.x=function({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}(e,i.x),t.y=function({scale:e,translate:t},i){return Math.round((t[1]-i)/e[1])}(e,i.y),t!==i&&(s&&(t.z=i.z),n&&(t.m=i.m)),t}function d(e,t,i,a,l){return null!=i&&(t.points=function(e,t,i,a){return u(e,i?a?r:n:a?n:s,t)}(e,i.points,a,l)),t}function f(e,t,i,s,n){return null==i||(t.x=l(e,i.x),t.y=o(e,i.y),t!==i&&(s&&(t.z=i.z),n&&(t.m=i.m))),t}function m(e,t,i,a,l){return null!=i&&(t.rings=function(e,t,i,a){return c(e,i?a?r:n:a?n:s,t)}(e,i.rings,a,l)),t}function p(e,t,i,a,l){return null!=i&&(t.paths=function(e,t,i,a){return c(e,i?a?r:n:a?n:s,t)}(e,i.paths,a,l)),t}},11028:(e,t,i)=>{i.d(t,{q:()=>Me});var s=i(67676),n=i(20102),r=i(96674),a=i(22974),l=i(70586),o=i(69801),u=i(95330),c=i(67900),h=i(73615),d=i(60437),f=i(24470),m=i(20322),p=i(33955),g=i(16306),y=i(8744),_=i(98732),x=i(35454),T=i(13867),S=i(8968);const I=new class{constructor(e,t){this._cache=new T.z(e),this._invalidCache=new T.z(t)}get(e,t){const i=`${t.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(void 0!==this._invalidCache.get(i))return null;try{const s=S.WhereClause.create(e,t);return this._cache.put(i,s),s}catch{return this._invalidCache.put(i,null),null}}}(50,500),E="feature-store:unsupported-query",R=" as ",F=new x.X({esriFieldTypeString:"string"}),b=new x.X({esriFieldTypeOID:"oid",esriFieldTypeSmallInteger:"small-integer",esriFieldTypeBigInteger:"big-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long"}),w=new x.X({esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),v=new x.X({esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id"}),A=new Set([...b.jsonValues,...w.jsonValues,...F.jsonValues,...v.jsonValues]),N=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...b.apiValues,...w.apiValues,...F.apiValues,...v.apiValues]);function C(e,t,i={}){const s=k(e,t);if(!s)throw new n.Z(E,"invalid SQL expression",{expression:e});const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.Z(E,`${r} is not standard`,{expression:e});if(i.validateAggregate&&!s.isAggregate)throw new n.Z(E,`${r} does not contain a valid aggregate function`,{expression:e});return s.fieldNames}function V(e,t,i,s){if(!t)return!0;const r="having",a=C(t,e,{validateAggregate:!0,expressionName:r});D(e,a,{expressionName:r,query:s}),P(e,a,{expressionName:r,query:s});const l=I.get(t,e),o=l?.getExpressions().every((t=>{const{aggregateType:s,field:n}=t,r=e.get(n)?.name;return i.some((t=>{const{onStatisticField:i,statisticType:n}=t,a=e.get(i)?.name;return a===r&&n.toLowerCase().trim()===s}))}));if(!o)throw new n.Z(E,"expressions in having should also exist in outStatistics",{having:t});return!0}function k(e,t){return e?I.get(e,t):null}function D(e,t,i={}){i.errorMessage||(i.errorMessage=i.expressionName?`${i.expressionName} contains invalid fields`:"Fields are invalid"),O(e,t,((e,t)=>t.has(e)),i)}function P(e,t,i={}){i.errorMessage||(i.errorMessage=i.expressionName?`${i.expressionName} only supports ${N} field types`:`Only ${N} field types are supported`),O(e,t,((e,t)=>!L(e,t)),i)}function O(e,t,i,s={}){const r=s.verifyExpression??!0,a=[];for(const n of t){const t=i(n,e);if("*"!==n&&!t)if(r){const t=M(n);try{O(e,C(t,e,{validateStandardized:!0}),i,s)}catch(e){const t=e?.details;if(t?.expression)throw e;t?.invalidFields?a.push(...t.invalidFields):a.push(n)}}else a.push(n)}if(a.length)throw new n.Z(E,s.errorMessage,{invalidFields:a,query:s.query})}function M(e){return/\((.*?)\)/.test(e)?e:e.split(R)[0]}function L(e,t,i=A){const s=t.get(e);return!!s&&!i.has(s.type)}var G=i(37427),z=i(61159),Q=i(35308),U=i(49600),q=i(82397),B=i(11490),Z=i(24452),j=i(59266);class Y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=M(t),n=this.fieldsIndex.get(s),r=n?null:k(s,i),a=n?n.name:t.split(R)[1]||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=k(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t){const i=t.normalizationType,s=t.normalizationTotal,n=this.fieldsIndex.isDateField(t.field);return e.map((e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,Z.wk)(r)}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):n&&"string"==typeof r&&(r=r?new Date(r).getTime():null),i&&Number.isFinite(r)){const n="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,Z.fk)(r,i,n,s)}return r}))}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,j.LC)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const l=r.createFunction(t),o=r.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,B.Op)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=r.createExecContext(t,o,n);return r.executeFunction(l,c)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:k(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:k(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}function H(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function $(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var W=i(35671);class X{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new Y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,l=new Set;for(const n of s){const{statisticType:s}=n,o="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(o)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,r);i.push(t)}a.set(o,this._calculateUniqueValues(i,e.returnDistinctValues))}const u=a.get(o);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||l.add(r)}}return l.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,y.JY)(this.query.outSR)&&!(0,y.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,B.S2)({spatialReference:this.query.outSR,...(0,G.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,B.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const i=this.featureAdapter,s=K(this.hasZ,this.hasM),{point:n,mode:r}=e,a="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,o={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(r,this.spatialReference,t),h=new ee(null,0),d=new ee(null,0),f={x:0,y:0,z:0};for(const t of this.items){const r=i.getGeometry(t);if(null==r)continue;const{coords:m,lengths:p}=r;if(h.coords=m,d.coords=m,e.returnEdge){let e=0;for(let r=0;r<p.length;r++){const u=p[r];for(let r=0;r<u;r++,e+=s){const m=h;if(m.coordsIndex=e,r!==u-1){const r=d;r.coordsIndex=e+s;const u=f;J(f,n,m,r);const h=(n.x-u.x)/a,p=(n.y-u.y)/l,g=h*h+p*p;g<=1&&o.candidates.push($(i.getObjectId(t),c(u),Math.sqrt(g),c(m),c(r)))}}}}if(e.returnVertex){const e=u?m.length-s:m.length;for(let r=0;r<e;r+=s){const e=h;e.coordsIndex=r;const s=(n.x-e.x)/a,u=(n.y-e.y)/l,d=s*s+u*u;d<=1&&o.candidates.push(H(i.getObjectId(t),c(e),Math.sqrt(d)))}}}return o.candidates.sort(((e,t)=>e.distance-t.distance)),o}_getPointCreator(e,t,i){const s=null==i||(0,y.fS)(t,i)?e=>e:e=>(0,G.iV)(e,t,i),{hasZ:n}=this;return"3d"===e?n?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:l,scale:o,timeZone:u}=e,c=this.fieldsIndex.isDateField(t),h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:o,timeZone:u}),d=(0,Z.S5)({normalizationType:n,normalizationField:s,minValue:a,maxValue:l}),f=this.fieldsIndex.get(t),m={value:.5,fieldType:f?.type},p=(0,W.qN)(f)?(0,Z.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,Z.i5)({values:h,minValue:a,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,Z.F_)(p,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,l=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a}),o=(0,Z.eT)(l);return(0,Z.Qm)(o,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:d}),m=(0,Z.G2)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:c});return(0,Z.DL)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:c,scale:h,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:d});return(0,Z.oF)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),l=(0,Z.Lq)(r?.type,a);e.sort(((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return l(s,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:a}=this,{outFields:l,outSR:o,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:i,hasM:s&&f,hasZ:n&&d,objectIdFieldName:r,spatialReference:(0,B.S2)(o||a),transform:u&&(0,q.vY)(u)||null}}_createFeatures(e,t){const i=new Y(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:a,returnGeometry:l,returnCentroid:o,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=n&&d,p=s&&f;let g=[],y=0;const _=[...t];if(this._sortFeatures(_,r,((e,t,s)=>i.getFieldValue(e,t,s))),l||o){const e=(0,q.vY)(a)??void 0;if(l&&!o)for(const t of _)g[y++]={attributes:i.getAttributes(t),geometry:(0,B.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!l&&o)for(const t of _)g[y++]={attributes:i.getAttributes(t),centroid:(0,B.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of _)g[y++]={attributes:i.getAttributes(t),centroid:(0,B.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,B.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of _){const t=i.getAttributes(e);t&&(g[y++]={attributes:t})}const x=c||0;if(null!=h){const e=x+h;g=g.slice(x,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){i=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,s=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>i;else if(this.items.length>s)t=!0;else{const e=K(this.hasZ,this.hasM),i=this.featureAdapter;t=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/e>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},i=[],s=new Map,n=new Map,r=new Map,a=new Map,l=new Y(e,this.featureAdapter,this.fieldsIndex),o=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u?.length,f=!!d,m=f?u[0]:null,p=f&&!this.fieldsIndex.get(m);for(const e of o??[]){const{outStatisticFieldName:o,statisticType:h}=e,g=e,y="exceedslimit"!==h?e.onStatisticField:void 0,_="percentile_disc"===h||"percentile_cont"===h,x="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,T=f&&1===d&&(y===m||p)&&"count"===h;if(f){if(!r.has(y)){const e=[];for(const t of u){const i=this._getAttributeValues(l,t,s);e.push(i)}r.set(y,this._calculateUniqueValues(e,!x&&l.returnDistinctValues))}const e=r.get(y);for(const t in e){const{count:i,data:n,items:r,itemPositions:h}=e[t],d=n.join(",");if(!c||l.validateItems(r,c)){const e=a.get(d)||{attributes:{}};if(x){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(g,r);e.aggregateGeometries[i]=t}else{let t=null;if(T)t=i;else{const e=this._getAttributeValues(l,y,s),i=h.map((t=>e[t]));t=_&&"statisticParameters"in g?this._getPercentileValue(g,i):this._getStatisticValue(g,i,null,l.returnDistinctValues)}e.attributes[o]=t}let t=0;u.forEach(((i,s)=>e.attributes[this.fieldsIndex.get(i)?i:"EXPR_"+ ++t]=n[s])),a.set(d,e)}}}else if(x){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(g,this.items);t.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,y,s);t.attributes[o]=_&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,n,l.returnDistinctValues)}i.push({name:o,alias:o,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:i,features:g}}async _getAggregateGeometry(e,t){const{convexHull:s,union:n}=await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)),{statisticType:r,outStatisticFieldName:a}=e,{featureAdapter:l,spatialReference:o,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,B.Op)(u,c,h,l.getGeometry(e)))),f=s(o,d,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===r){const e=f?(0,U._w)(f):(0,U.aO)(n(o,d));m.aggregateGeometries={...e,spatialReference:o},m.outStatisticFieldName=a||"extent"}else if("CentroidAggregate"===r){const e=f?(0,Q.tO)(f):(0,Q.$G)((0,U.aO)(n(o,d)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:o},m.outStatisticFieldName=a||"centroid"}else"ConvexHullAggregate"===r&&(m.aggregateGeometries=f,m.outStatisticFieldName=a||"convexHull");return m}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,W.qN)(this.fieldsIndex.get(n))?(0,Z.H0)({values:t,returnDistinct:s}):(0,Z.i5)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,l=this.fieldsIndex.get(i);return(0,Z.XL)(t,{value:r,orderBy:a,fieldType:l?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i){if(i.has(t))return i.get(t);const s=this.fieldsIndex.get(t),n=this.items.map((i=>e.getFieldValue(i,t,s)));return i.set(t,n),n}_calculateUniqueValues(e,t){const i={},s=this.items,n=s.length;for(let r=0;r<n;r++){const n=s[r],a=[];for(const t of e)a.push(t[r]);const l=a.join(",");null==i[l]?i[l]={count:1,data:a,items:[n],itemPositions:[r]}:(t||i[l].count++,i[l].items.push(n),i[l].itemPositions.push(r))}return i}async _getDataValues(e){const t=new Y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:i,scale:s,timeZone:n}=e;return i?t.getExpressionValues(this.items,i,{viewingMode:"map",scale:s,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},n):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function J(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=n*n+r*r,l=(t.x-i.x)*n+(t.y-i.y)*r,o=Math.min(1,Math.max(0,l/a));e.x=i.x+n*o,e.y=i.y+r*o}function K(e,t){return e?t?4:3:t?3:2}class ee{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}var te=i(10402),ie=i(17590),se=i(99514),ne=i(61247),re=(i(80442),i(92604)),ae=i(54790),le=i(44553),oe=i(17445),ue=i(95528),ce=i(76882);class he{constructor(){this._tasks=new Array,this._running=(0,ue.t)(!1)}get length(){return this._tasks.length}get running(){return this._running.value}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,i){return this._running.value=!0,new Promise(((s,n)=>this._tasks.push(new de(s,n,e,t,i))))}unshift(e,t,i){return this._running.value=!0,new Promise(((s,n)=>this._tasks.unshift(new de(s,n,e,t,i))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const i=(0,u.Hc)(t.signal);if(i&&!t.abortCallback)t.reject((0,u.zE)());else{const s=i?t.abortCallback?.((0,u.zE)()):t.callback(e);(0,u.y8)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return this._running.value=this._tasks.length>0,!0}cancelAll(){const e=(0,u.zE)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0,this._running.value=!1}}class de{constructor(e,t,i,s=void 0,n=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=n}}var fe=i(43697),me=i(92036),pe=i(5600),ge=(i(75215),i(52011));let ye=class extends me.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,fe._)([(0,pe.Cb)()],ye.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,fe._)([(0,pe.Cb)()],ye.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ye=(0,fe._)([(0,ge.j)("esri.views.support.DebugFlags")],ye);const _e=new ye;var xe,Te,Se,Ie=i(95720);(Se=xe||(xe={}))[Se.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Te||(Te={}));const Ee=new Map([[Te.RESOURCE_CONTROLLER_IMMEDIATE,0],[Te.RESOURCE_CONTROLLER,4],[Te.SLIDE,0],[Te.STREAM_DATA_LOADER,0],[Te.ELEVATION_QUERY,0],[Te.TERRAIN_SURFACE,1],[Te.SURFACE_GEOMETRY_UPDATES,1],[Te.LOD_RENDERER,2],[Te.GRAPHICS_CORE,2],[Te.I3S_CONTROLLER,2],[Te.POINT_CLOUD_LAYER,2],[Te.FEATURE_TILE_FETCHER,2],[Te.OVERLAY,4],[Te.STAGE,4],[Te.GRAPHICS_DECONFLICTOR,4],[Te.FILTER_VISIBILITY,4],[Te.SCALE_VISIBILITY,4],[Te.FRUSTUM_VISIBILITY,4],[Te.CLOUDS_GENERATOR,4],[Te.POINT_OF_INTEREST_FREQUENT,6],[Te.POINT_OF_INTEREST_INFREQUENT,30],[Te.LABELER,8],[Te.FEATURE_QUERY_ENGINE,8],[Te.FEATURE_TILE_TREE,16],[Te.FEATURE_TILE_TREE_ACTIVE,0],[Te.ELEVATION_ALIGNMENT,12],[Te.TEXT_TEXTURE_ATLAS,12],[Te.TEXTURE_UNLOAD,12],[Te.LINE_OF_SIGHT_TOOL,16],[Te.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Te.SNAPPING,0],[Te.SHADOW_ACCUMULATOR,30]]);function Re(e){return Ee.has(e)?Ee.get(e):"number"==typeof e?e:1}const Fe=(0,ce.HA)(6.5),be=(0,ce.HA)(1),we=(0,ce.HA)(30),ve=(0,ce.HA)(1e3/30),Ae=(0,ce.HA)(100);var Ne,Ce;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,ue.t)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new ae.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,this._state=Ie.n.INTERACTING,this._tasks=new le.Z,this._runQueue=new le.Z,this._load=0,this._idleStateCallbacks=new le.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,oe.YP)((()=>_e.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),oe.nn);for(const e of Object.keys(Te))this.performanceInfo.tasks.set(Te[e],new ae.Z(Te[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Fe,INTERACTING_BUDGET:ve,IDLE_BUDGET:Ae,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,l.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,i){const s=Re(e),n=new t(this,e,i,s);return this._tasks.push(n),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new ae.Z(e)),n}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===Ie.n.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===Ie.n.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Ie.n.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Fe,i=e.frameDuration,s=be;switch(this.state){case Ie.n.IDLE:t=(0,ce.HA)(0),i=(0,ce.HA)(Math.max(Ae,e.frameDuration)),s=we;break;case Ie.n.INTERACTING:i=(0,ce.HA)(Math.max(ve,e.frameDuration));case Ie.n.ANIMATING:}return i=(0,ce.HA)(i-e.elapsedFrameTime-t),this.state!==Ie.n.IDLE&&i<be&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,ce.HA)(Math.max(i,s)),this._budget.reset(i,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Ie.n.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Ie.n.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,ce.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return Ce.SCHEDULED;let t=Ce.IDLE;return this._tasks.forAll((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=Ce.READY:t!==Ce.READY&&(t=Ce.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),i=this._runQueue.pop();this._budget.resetProgress();try{i.task.runTask(this._budget)===xe.YIELD&&(i.blockFrame=this._frameNumber)}catch(e){re.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${i.name}"`,e),i.blockFrame=this._frameNumber}!this._budget.hasProgressed&&i.blockFrame!==this._frameNumber&&i.needsUpdate&&(i.name,Te.I3S_CONTROLLER,i.blockFrame=this._frameNumber),i.schedulePriority=i.basePriority;const s=this._budget.now()-t;if(i.runtime+=s,this._frameTaskTimes.set(i.priority,this._frameTaskTimes.get(i.priority)+s),this._debug&&s>2*this._budget.budget&&console.log("Task",i.name,"used",s,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(Te))this._frameTaskTimes.set(Te[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,i,s){this._scheduler=e,this.name=t,this._basePriority=s,this.blockFrame=0,this.runtime=0,this._queue=new he,this._handles=new ne.Z,this.schedulePriority=this._basePriority,this._task=(0,ue.t)(null!=i?i:this._queue),this._handles.add((0,oe.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Ve),this._scheduler.removeTask(this),this.schedule=ke.schedule,this.reschedule=ke.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Re(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){this._queue.runTask(e)}}class i{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Ie.n.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=i}(Ne||(Ne={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Ce||(Ce={}));const Ve=(()=>{const e=new Ne.Budget;return e.enabled=!1,e})(),ke=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,u.Hc)(t)){const e=(0,u.zE)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,u.gx)(e(Ve))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}},De="feature-store:unsupported-query",Pe=new o.WJ(2e6);let Oe=0;class Me{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:z.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new o.Xq(Oe+++"$$",Pe)),this.fieldsIndex=(0,r.AK)(e.fieldsIndex)?e.fieldsIndex:se.Z.fromJSON(e.fieldsIndex),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,l.hw)(this._frameTask),this.clearCache(),(0,l.SC)(this._geometryQueryCache),this._changeHandle=(0,l.hw)(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==B.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==B.Ti)throw e;return 0}}async executeQueryForExtent(e,t){const i=e.outSR;try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),n=s.size;return n?{count:n,extent:await this._getBounds(s.items,s.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===B.Ti)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),s=i.items,n=new Set;return await this._reschedule((()=>{for(const e of s)n.add(i.featureAdapter.getObjectId(e))}),t),n}catch(e){if(e===B.Ti)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:n,returnVertex:r}=e;if(!n&&!r)return{candidates:[]};let l=(0,a.d9)(e.query);l=await this._schedule((()=>(0,B.j6)(l,this.definitionExpression,this.spatialReference)),t),l=await this._reschedule((()=>this._checkQuerySupport(l)),t);const o=!(0,y.fS)(i.spatialReference,this.spatialReference);o&&await(0,G._W)(i.spatialReference,this.spatialReference);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,h={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},d=o?(0,G.iV)(h,this.spatialReference):h;if(!d)return{candidates:[]};const f=(await(0,g.aX)((0,p.im)(i),null,{signal:t}))[0],m=(await(0,g.aX)((0,p.im)(d),null,{signal:t}))[0];if(null==f||null==m)return{candidates:[]};const _=new X(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(m.toJSON()))),t),l,this);await this._reschedule((()=>this._executeObjectIdsQuery(_)),t),await this._reschedule((()=>this._executeTimeQuery(_)),t),await this._reschedule((()=>this._executeAttributesQuery(_)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(_,t)),t);const x=f.toJSON(),T=o?(0,G.iV)(x,this.spatialReference):x,S=o?Math.max(d.xmax-d.xmin,d.ymax-d.ymin)/2:s;return _.createSnappingResponse({...e,point:T,distance:S},i.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo?.trackIdField)throw new n.Z(De,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const i=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(i)),t),i.createQueryResponse()}catch(t){if(t!==B.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const{field:s,field2:n,field3:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:s,field2:n,field3:r,valueExpression:a},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=(0,ie.R)(this.timeInfo,this.featureStore);const[t,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.k_)(e),{fullExtent:t,timeExtent:i}}async _getBounds(e,t,i){const s=(0,d.t8)((0,d.Ue)(),d.G_);await this.featureStore.forEachBounds(e,(e=>(0,d.TC)(s,e)));const n={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,B.S2)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(n.zmin=s[2],n.zmax=s[5]);const r=(0,G.iV)(n,t,i);if(r.spatialReference=(0,B.S2)(i),r.xmax-r.xmin==0){const e=(0,c.c9)(r.spatialReference);r.xmin-=e,r.xmax+=e}if(r.ymax-r.ymin==0){const e=(0,c.c9)(r.spatialReference);r.ymin-=e,r.ymax+=e}if(this.hasZ&&null!=r.zmin&&null!=r.zmax&&r.zmax-r.zmin==0){const e=(0,c.c9)(r.spatialReference);r.zmin-=e,r.zmax+=e}return r}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(Ve)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Ve)}async _getAllFeaturesQueryEngineResult(e){return new X(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.d9)(e),e=await this._schedule((()=>(0,B.Up)(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkQuerySupport(e)),i),e={...e,...t};const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),n=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),i),await this._reschedule((()=>this._executeObjectIdsQuery(n)),i),await this._reschedule((()=>this._executeTimeQuery(n)),i),await this._reschedule((()=>this._executeAttributesQuery(n)),i),n}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:n}=e,r=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,l=null==r||(0,y.fS)(r,a.spatialReference)?a:(0,G.iV)(a,r);if(!l)return null;const o=s||n,u=(0,y.JY)(i)&&!(0,y.fS)(this.spatialReference,i)&&o?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(l))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this._reschedule((()=>this._getAllFeatures()),t),n=await this._reschedule((async()=>{const n=await(0,te.cW)("esriSpatialRelDisjoint",l,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||n(c.getGeometry(e))),t);return new X(r,e,this)}),t);return u(n)}if(!h.length)return new X([],e,this);if(this._canExecuteSinglePass(l,e))return u(new X(h,e,this));const d=await(0,te.cW)("esriSpatialRelContains",l,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new X(f,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:n,outSR:r,spatialRel:a,returnGeometry:l,returnCentroid:o}=e,u=this.featureStore.featureSpatialReference,c=!n||null==u||(0,y.fS)(u,n.spatialReference)?n:(0,G.iV)(n,u),h=l||o,d=(0,y.JY)(r)&&!(0,y.fS)(this.spatialReference,r),f=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:n,spatialRelationship:a,outSpatialReference:r}):JSON.stringify({originalFilterGeometry:n,spatialRelationship:a}):null,m=f?this._geometryQueryCache.get(f):null;if(null!=m)return new X(m,e,this);const p=async e=>(d&&h&&await this._project(e,r),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const g=this.featureAdapter;let _=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(n))),i);if("esriSpatialRelDisjoint"===a){if(!_.length)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of _)s.add(g.getObjectId(e));const n=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),i),r=await this._reschedule((async()=>{const t=await(0,te.cW)(a,c,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(n,(e=>!s.has(g.getObjectId(e))||t(g.getGeometry(e))),i);return new X(r,e,this)}),i);return p(r)}if(null!=t){const e=new s.SO;_=_.filter((i=>(0,s.cq)(t.items,i,t.items.length,e)>=0))}if(!_.length){const t=new X([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return p(new X(_,e,this));const x=await(0,te.cW)(a,c,this.geometryType,this.hasZ,this.hasM),T=await this._runSpatialFilter(_,(e=>x(g.getGeometry(e))),i);return p(new X(T,e,this))}async _executeGeometryQueryForSnapping(e,t){const{query:i}=e,{spatialRel:s}=i;if(!e?.items?.length||!i.geometry||!s)return;const n=await(0,te.cW)(s,i.geometry,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(e.items,(e=>n(e.geometry)),t);e.items=r}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,ie.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=k(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const n=new Array,r=async a=>{for(;s<e.length;){const l=e[s++];t(l)&&(n.push(l),a.madeProgress()),a.done&&await this._reschedule((e=>r(e)),i)}};return this._reschedule((e=>r(e)),i).then((()=>n))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),l=r.get(e);(!l||s>a(l,n))&&r.set(e,i)}e.items=Array.from(r.values())}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,te.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.fS)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,G.oj)(e.items.map((e=>(0,B.Op)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=n.map(((t,s)=>i.cloneWithGeometry(e.items[s],(0,_.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,te.hN)(e)){if((0,p.YX)(e))return[(0,f.al)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,p.oU)(e))return e.rings.map((e=>(0,f.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.$P)((0,f.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new n.Z(De,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t,e),(0,te.P0)(e,this.geometryType,this.spatialReference),(0,G._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e,t){let i=[];if(e.valueExpression){const{arcadeUtils:t}=await(0,j.LC)();i=t.extractFieldNames(e.valueExpression)}if(e.field&&i.push(e.field),e.field2&&i.push(e.field2),e.field3&&i.push(e.field3),e.normalizationField&&i.push(e.normalizationField),!i.length&&!e.valueExpression)throw new n.Z(De,"field or valueExpression is required",{params:e});D(this.fieldsIndex,i,{errorMessage:"Cannot calculate statistics for missing fields",query:t}),P(this.fieldsIndex,i,{expressionName:"statistics",query:t})}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.Z(De,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,te.P0)(e,this.geometryType,this.spatialReference),(0,G._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:i,returnDistinctValues:s,outStatistics:r}=e,a=r?r.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(i&&i.length>0){const t=" asc",s=" desc",n=i.map((e=>{const i=e.toLowerCase();return i.includes(t)?i.split(t)[0]:i.includes(s)?i.split(s)[0]:e})).filter((e=>!a.includes(e)));D(this.fieldsIndex,n,{expressionName:"orderByFields",query:e})}if(t&&t.length>0)D(this.fieldsIndex,t,{expressionName:"outFields",query:e});else if(s)throw new n.Z(De,"outFields should be specified for returnDistinctValues",{query:e});!function(e,t,i){if(!t)return!0;const s="where clause",n=C(t,e,{validateStandardized:!0,expressionName:s});D(e,n,{expressionName:s,query:i}),P(e,n,{expressionName:s,query:i})}(this.fieldsIndex,e.where,e)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:i,having:s}=e,r=i?.length,a=t?.length;if(s){if(!r||!a)throw new n.Z(De,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});V(this.fieldsIndex,s,t,e)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const s=t.map((e=>e.onStatisticField)).filter(Boolean);D(this.fieldsIndex,s,{expressionName:"onStatisticFields",query:e}),r&&D(this.fieldsIndex,i,{expressionName:"groupByFieldsForStatistics",query:e});const a=new Set([...b.jsonValues,...w.jsonValues]),l=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...b.apiValues,...w.apiValues]);for(const i of t){const{onStatisticField:t,statisticType:s}=i;if("percentile_disc"!==s&&"percentile_cont"!==s||!("statisticParameters"in i)){if("count"!==s&&"min"!==s&&"max"!==s&&t&&L(t,this.fieldsIndex,a))throw new n.Z(De,`outStatistics with '${s}' statistic type, only supports ${l} field types`,{definition:i,query:e})}else{const{statisticParameters:t}=i;if(!t)throw new n.Z(De,"statisticParameters should be set for percentile type",{definition:i,query:e})}}}}async _getQueryEngineResultForStats(e,t,i){e=(0,a.d9)(e);try{e=await this._schedule((()=>(0,B.Up)(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),i);const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),n=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),i),await this._reschedule((()=>this._executeObjectIdsQuery(n)),i),await this._reschedule((()=>this._executeTimeQuery(n)),i),await this._reschedule((()=>this._executeAttributesQuery(n)),i),n}catch(t){if(t!==B.Ti)throw t;return new X([],e,this)}}}},10402:(e,t,i)=>{i.d(t,{hN:()=>S,P0:()=>T,cW:()=>x});var s=i(20102),n=i(54102),r=i(87416),a=i(33955),l=i(8744);function o(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=o(n,r),{coords:l,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,l[n],l[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=o(t,i),{coords:a,lengths:l}=e;let u=!1,c=0;for(const e of l)u=h(u,a,r,c,e,s,n),c+=e*r;return u}function h(e,t,i,s,n,r,a){let l=e,o=s;for(let e=s,u=s+n*i;e<u;e+=i){o=e+i,o===u&&(o=s);const n=t[e],c=t[e+1],h=t[o],d=t[o+1];(c<a&&d>=a||d<a&&c>=a)&&n+(a-c)/(d-c)*(h-n)<r&&(l=!l)}return l}var d=i(98732),f=i(5428),m=i(37427),p=i(11490);const g="feature-store:unsupported-query",y={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},_={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function x(e,t,s,l,o){if((0,a.oU)(t)&&"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===s){const i=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(i,!1,!1,e,l,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,n.aV)(t,(0,p.Op)(s,l,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,n.lQ)(t,(0,p.Op)(s,l,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=s)?r.h_:(0,r.IY)(h);return Promise.resolve((i=>e(t,(0,p.Op)(s,l,o,i))))}var h;return Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)).then((i=>{const n=i[y[e]].bind(null,t.spatialReference,t);return e=>n((0,p.Op)(s,l,o,e))}))}async function T(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===_.spatialRelationship[e]}(n))throw new s.Z(g,"Unsupported query spatial relationship",{query:e});if((0,l.JY)(r.spatialReference)&&(0,l.JY)(i)){if(!function(e){return null!=e&&!0===_.queryGeometry[(0,a.Ji)(e)]}(r))throw new s.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===_.layerGeometry[e]}(t))throw new s.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry?.spatialReference,e.outSR)}}}function S(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,i)=>{async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:n}=e;let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(s&&n)await t.forEach((e=>{const t=i.getAttribute(e,s),l=i.getAttribute(e,n);null==t||isNaN(t)||(r=Math.min(r,t)),null==l||isNaN(l)||(a=Math.max(a,l))}));else{const e=s||n;await t.forEach((t=>{const s=i.getAttribute(t,e);null==s||isNaN(s)||(r=Math.min(r,s),a=Math.max(a,s))}))}return{start:r,end:a}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const l=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),l=e(r,i);return(null==a||a<=n)&&(null==l||l>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(l,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(l,s||n,r,a)}i.d(t,{R:()=>s,y:()=>n})},11490:(e,t,i)=>{i.d(t,{EG:()=>x,Op:()=>T,S2:()=>R,Ti:()=>m,Up:()=>S,j6:()=>I});var s=i(35454),n=i(67900),r=i(73615),a=i(49600),l=i(33955),o=i(16306),u=i(8744),c=i(98732),h=i(5428),d=i(37427);const f=new s.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,y=new h.Z,_={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function x(e,t,i,s=e.hasZ,n=e.hasM){if(null==t)return null;const r=e.hasZ&&s,a=e.hasM&&n;if(i){const l=(0,c.Nh)(y,t,e.hasZ,e.hasM,"esriGeometryPoint",i,s,n);return(0,c.fQ)(l,r,a)}return(0,c.fQ)(t,r,a)}function T(e,t,i,s,n,r,a=t,l=i){const o=t&&a,u=i&&l,h=null!=s?"coords"in s?s:s.geometry:null;if(null==h)return null;if(n){let s=(0,c.zj)(g,h,t,i,e,n,a,l);return r&&(s=(0,c.Nh)(y,s,o,u,e,r)),_[e]?.(s,o,u)??null}if(r){const s=(0,c.Nh)(y,h,t,i,e,r,a,l);return _[e]?.(s,o,u)??null}return(0,c.hY)(p,h,t,i,a,l),_[e]?.(p,o,u)??null}async function S(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),I(e,t,i)}async function I(e,t,s){if(!e)return null;let{where:r}=e;if(e.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||t&&t===r)&&(e.where=null),!e.geometry)return e;let c=await async function(e){const{distance:t,units:s}=e,r=e.geometry;if(null==t||"vertexAttributes"in r)return r;const a=r.spatialReference,l=s?f.fromJSON(s):(0,n.qE)(a),o=a&&((0,u.sT)(a)||(0,u.sS)(a))?r:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(r,u.Zn)));return(await async function(){return(await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247))).geodesicBuffer}())(o.spatialReference,o,t,l)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;c=(0,a.aO)(c),c.spatialReference=t}if(c){await(0,d._W)(c.spatialReference,s),c=function(e,t){const i=e.spatialReference;return E(e,t)&&(0,l.YX)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(c,s);const t=(await(0,o.aX)((0,l.im)(c)))[0];if(null==t)throw m;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&E(c,s)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,d.iV)(r,r.spatialReference,s,n);if(!a)throw m;a.spatialReference=s,e.geometry=a}return e}function E(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.YX)(e)||(0,l.oU)(e)||(0,l.l9)(e))&&!(0,u.fS)(i,t)&&!(0,r.canProjectWithoutEngine)(i,t)}function R(e){return e&&F in e?JSON.parse(JSON.stringify(e,b)):e}const F="_geVersion",b=(e,t)=>e!==F?t:void 0},10278:(e,t,i)=>{i.d(t,{Z:()=>d});var s=i(43697),n=i(35454),r=i(96674),a=i(5600),l=(i(75215),i(67676),i(80442),i(36030)),o=i(52011);const u=new n.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let h=class extends r.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,s._)([(0,l.J)({classBreaksDef:"class-breaks-definition"})],h.prototype,"type",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"breakCount",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"classificationField",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],h.prototype,"classificationMethod",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"normalizationField",void 0),(0,s._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],h.prototype,"normalizationType",void 0),(0,s._)([(0,a.Cb)({value:null,json:{write:!0}})],h.prototype,"standardDeviationInterval",null),(0,s._)([(0,a.Cb)({value:null,json:{write:!0}})],h.prototype,"definedInterval",null),h=(0,s._)([(0,o.j)("esri.rest.support.ClassBreaksDefinition")],h);const d=h},622:(e,t,i)=>{i.d(t,{k:()=>r});const s=i(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function n(e,t){return Number(e.toFixed(t))}function r(e){const{normalizationTotal:t}=e;return{classBreaks:a(e),normalizationTotal:t}}function a(e){const t=e.definition,{classificationMethod:i,normalizationType:s,definedInterval:r}=t,a=t.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===i)if(c.length>=a){const e=(d-h)/a;let t=h;for(let i=1;i<a;i++){const r=n(h+i*e,6);u.push({minValue:t,maxValue:r,label:l(t,r,s)}),t=r}u.push({minValue:t,maxValue:d,label:l(t,d,s)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:l(e,e,s)})}));else if("natural-breaks"===i){const t=function(e){const t=[],i=[];let s=Number.MIN_VALUE,n=1,r=-1;for(let a=0;a<e.length;a++){const l=e[a];l===s?(n++,i[r]=n):null!==l&&(t.push(l),s=l,n=1,i.push(n),r++)}return{uniqueValues:t,valueFrequency:i}}(c),i=e.valueFrequency||t.valueFrequency,r=o(t.uniqueValues,i,a);let f=h;for(let e=1;e<a;e++)if(t.uniqueValues.length>e){const i=n(t.uniqueValues[r[e]],6);u.push({minValue:f,maxValue:i,label:l(f,i,s)}),f=i}u.push({minValue:f,maxValue:d,label:l(f,d,s)})}else if("quantile"===i)if(c.length>=a&&h!==d){let e=h,t=Math.ceil(c.length/a),i=0;for(let n=1;n<a;n++){let r=t+i-1;r>c.length&&(r=c.length-1),r<0&&(r=0),u.push({minValue:e,maxValue:c[r],label:l(e,c[r],s)}),e=c[r],i+=t,t=Math.ceil((c.length-i)/(a-n))}u.push({minValue:e,maxValue:d,label:l(e,d,s)})}else{let e=-1;for(let t=0;t<c.length;t++){const i=c[t];i!==e&&(e=i,u.push({minValue:e,maxValue:i,label:l(e,i,s)}),e=i)}}else if("standard-deviation"===i){const e=function(e){let t=0;for(let i=0;i<e.length;i++)t+=e[i];return t/=e.length,t}(c),t=function(e,t){let i=0;for(let s=0;s<e.length;s++){const n=e[s];i+=(n-t)*(n-t)}return i/=e.length,Math.sqrt(i)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:l(c[0],c[0],s)});else{const i=function(e,t,i,s,n){let r=Math.max(s-e,t-s)/n/i;return r=r>=1?1:r>=.5?.5:.25,r}(h,d,a,e,t)*t;let r=0,o=h;for(let t=a;t>=1;t--){const a=n(e-(t-.5)*i,6);u.push({minValue:o,maxValue:a,label:l(o,a,s)}),o=a,r++}let c=n(e+.5*i,6);u.push({minValue:o,maxValue:c,label:l(o,c,s)}),o=c,r++;for(let t=1;t<=a;t++)c=r===2*a?d:n(e+(t+.5)*i,6),u.push({minValue:o,maxValue:c,label:l(o,c,s)}),o=c,r++}}else if("defined-interval"===i){if(!r)return u;const e=c[0],t=c[c.length-1],i=Math.ceil((t-e)/r);let a=e;for(let t=1;t<i;t++){const i=n(e+t*r,6);u.push({minValue:a,maxValue:i,label:l(a,i,s)}),a=i}u.push({minValue:a,maxValue:t,label:l(a,t,s)})}return u}function l(e,t,i){let s=null;return s=e===t?i&&"percent-of-total"===i?e+"%":e.toString():i&&"percent-of-total"===i?e+"% - "+t+"%":e+" - "+t,s}function o(e,t,i){const s=e.length,n=[];i>s&&(i=s);for(let e=0;e<i;e++)n.push(Math.round(e*s/i-1));n.push(s-1);let r=u(n,e,t,i);return function(e,t,i,s,n,r){let a=0,l=0,o=0,u=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<r-1;d++)for(;i[d+1]+1!==i[d+2];){i[d+1]=i[d+1]+1;const r=c(d,i,s,n);o=r.sbMean,a=r.sbSdcm;const f=c(d+1,i,s,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[d]+t[d+1])){i[d+1]=i[d+1]-1;break}t[d]=a,t[d+1]=l,e[d]=o,e[d+1]=u,h=!0}for(let d=r-1;d>0;d--)for(;i[d]!==i[d-1]+1;){i[d]=i[d]-1;const r=c(d-1,i,s,n);o=r.sbMean,a=r.sbSdcm;const f=c(d,i,s,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[d-1]+t[d])){i[d]=i[d]+1;break}t[d-1]=a,t[d]=l,e[d-1]=o,e[d]=u,h=!0}}return h}(r.mean,r.sdcm,n,e,t,i)&&(r=u(n,e,t,i)),n}function u(e,t,i,s){let n=[],r=[],a=[],l=0;const o=[],u=[];for(let n=0;n<s;n++){const s=c(n,e,t,i);o.push(s.sbMean),u.push(s.sbSdcm),l+=u[n]}let h,d=l,f=!0;for(;f||l<d;){f=!1,n=[];for(let t=0;t<s;t++)n.push(e[t]);for(let i=0;i<s;i++)for(let n=e[i]+1;n<=e[i+1];n++)if(h=t[n],i>0&&n!==e[i+1]&&Math.abs(h-o[i])>Math.abs(h-o[i-1]))e[i]=n;else if(i<s-1&&e[i]!==n-1&&Math.abs(h-o[i])>Math.abs(h-o[i+1])){e[i+1]=n-1;break}d=l,l=0,r=[],a=[];for(let n=0;n<s;n++){r.push(o[n]),a.push(u[n]);const s=c(n,e,t,i);o[n]=s.sbMean,u[n]=s.sbSdcm,l+=u[n]}}if(l>d){for(let t=0;t<s;t++)e[t]=n[t],o[t]=r[t],u[t]=a[t];l=d}return{mean:o,sdcm:u}}function c(e,t,i,n){let r=0,a=0;for(let s=t[e]+1;s<=t[e+1];s++){const e=n[s];r+=i[s]*e,a+=e}a<=0&&s.warn("Exception in Natural Breaks calculation");const l=r/a;let o=0;for(let s=t[e]+1;s<=t[e+1];s++)o+=n[s]*(i[s]-l)**2;return{sbMean:l,sbSdcm:o}}},24452:(e,t,i)=>{i.d(t,{DL:()=>A,F_:()=>I,G2:()=>w,H0:()=>p,Lq:()=>_,Qm:()=>F,S5:()=>m,XL:()=>y,eT:()=>E,fk:()=>b,i5:()=>g,oF:()=>N,wk:()=>f});var s=i(10278),n=i(622);const r="<Null>",a="equal-interval",l=1,o=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){return null==e||"string"==typeof e&&!e?r:e}function m(e){const t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,s=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!s}function p(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,i=t.filter((e=>null!=e)).sort(),s=i.length,n={count:s,min:i[0],max:i[s-1]};return e.supportsNullCount&&(n.nullcount=t.length-s),e.percentileParams&&(n.median=y(t,e.percentileParams)),n}function g(e){const{values:t,useSampleStdDev:i,supportsNullCount:s}=e;let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=null,l=null,o=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a=null===a?e:a+e,n=Math.min(n,e),r=Math.max(r,e),c++):"string"==typeof e&&c++;if(c&&null!=a){l=a/c;let e=0;for(const i of t)Number.isFinite(i)&&i>=h&&i<=d&&(e+=(i-l)**2);u=i?c>1?e/(c-1):0:c>0?e/c:0,o=Math.sqrt(u)}else n=null,r=null;const f={avg:l,count:c,max:r,min:n,stddev:o,sum:a,variance:u};return s&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=y(t,e.percentileParams)),f}function y(e,t){const{fieldType:i,value:s,orderBy:n,isDiscrete:r}=t,a=_(i,"desc"===n);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(s<=0)return e[0];if(s>=1)return e[e.length-1];const l=(e.length-1)*s,o=Math.floor(l),u=o+1,c=l%1,h=e[o],d=e[u];return u>=e.length||r||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const i=t?1:-1,s=function(e){return e?(e,t)=>{const i=x(e,t,!0);return null!=i?i:t-e}:(e,t)=>{const i=x(e,t,!1);return null!=i?i:e-t}}(t),n=T(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?s(e,t):"string"==typeof e&&"string"==typeof t?n(e,t):i;if("esriFieldTypeDate"===e)return(e,t)=>{const n=new Date(e).getTime(),r=new Date(t).getTime();return isNaN(n)||isNaN(r)?i:s(n,r)};if(h.has(e))return(e,t)=>s(e,t);if("esriFieldTypeString"===e)return(e,t)=>n(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=T(t);return(t,i)=>e(S(t),S(i))}return t?(e,t)=>1:(e,t)=>-1}function x(e,t,i){if(i){if(null==e)return null==t?0:1;if(null==t)return-1}else{if(null==e)return null==t?0:-1;if(null==t)return 1}return null}function T(e){return e?(e,t)=>{const i=x(e,t,!0);return null!=i?i:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const i=x(e,t,!1);return null!=i?i:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}function S(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function I(e,t){let i;for(i in e)d.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function E(e){const t={};for(let i of e)(null==i||"string"==typeof i&&""===i.trim())&&(i=null),null==t[i]?t[i]={count:1,data:i}:t[i].count++;return{count:t}}function R(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function F(e,t,i,s){const n=e.count,r=[];if(i&&t){const e=[],i=R(t[0]);for(const n of i)if(t[1]){const i=R(t[1]);for(const r of i)if(t[2]){const i=R(t[2]);for(const t of i)e.push(`${f(n)}${s}${f(r)}${s}${f(t)}`)}else e.push(`${f(n)}${s}${f(r)}`)}else e.push(n);for(const t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(const e in n){const t=n[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function b(e,t,i,s){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(s)&&0!==s&&(n=e/s*100);break;case"field":Number.isFinite(i)&&0!==i&&(n=e/i);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function w(e,t){const i=v({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||o});return e=function(e,t,i){const s=t??-1/0,n=i??1/0;return e.filter((e=>Number.isFinite(e)&&e>=s&&e<=n))}(e,t.minValue,t.maxValue),(0,n.k)({definition:i,values:e,normalizationTotal:t.normalizationTotal})}function v(e){const{breakCount:t,field:i,normalizationField:n,normalizationType:r}=e,o=e.classificationMethod||a,u="standard-deviation"===o?e.standardDeviationInterval||l:void 0;return new s.Z({breakCount:t,classificationField:i,classificationMethod:o,normalizationField:"field"===r?n:void 0,normalizationType:r,standardDeviationInterval:u})}function A(e,t){let i=e.classBreaks;const s=i.length,n=i[0]?.minValue,r=i[s-1]?.maxValue,a="standard-deviation"===t,l=c;return i=i.map((e=>{const t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(l),s=e?.map((e=>+e.trim()))??[];2===s.length?(i.minStdDev=s[0],i.maxStdDev=s[1],s[0]<0&&s[1]>0&&(i.hasAvg=!0)):1===s.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=s[0]):t.includes(">")&&(i.minStdDev=s[0],i.maxStdDev=null))}return i})),{minValue:n,maxValue:r,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function N(e,t){const i=C(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};const s=i.intervals,n=i.min??0,r=i.max??0,a=s.map(((e,t)=>({minValue:s[t][0],maxValue:s[t][1],count:0})));for(const t of e)if(null!=t&&t>=n&&t<=r){const e=V(s,t);e>-1&&a[e].count++}return{bins:a,minValue:n,maxValue:r,normalizationTotal:t.normalizationTotal}}function C(e,t){const{field:i,classificationMethod:s,standardDeviationInterval:n,normalizationType:r,normalizationField:a,normalizationTotal:l,minValue:o,maxValue:c}=t,h=t.numBins||u;let d=null,f=null,p=null;if(s&&"equal-interval"!==s||r){const{classBreaks:t}=w(e,{field:i,normalizationType:r,normalizationField:a,normalizationTotal:l,classificationMethod:s,standardDeviationInterval:n,minValue:o,maxValue:c,numClasses:h});d=t[0].minValue,f=t[t.length-1].maxValue,p=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=o&&null!=c)d=o,f=c;else{const t=g({values:e,minValue:o,maxValue:c,useSampleStdDev:!r,supportsNullCount:m({normalizationType:r,normalizationField:a,minValue:o,maxValue:c})});d=t.min??null,f=t.max??null}p=function(e,t,i){const s=(t-e)/i,n=[];let r,a=e;for(let e=1;e<=i;e++)r=a+s,r=Number(r.toFixed(16)),n.push([a,e===i?t:r]),a=r;return n}(d??0,f??0,h)}return{min:d,max:f,intervals:p}}function V(e,t){let i=-1;for(let s=e.length-1;s>=0;s--)if(t>=e[s][0]){i=s;break}return i}},95720:(e,t,i)=>{var s;i.d(t,{n:()=>s}),function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(s||(s={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6753,5732,247,2596],{5732:(e,n,t)=>{t.d(n,{c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},20178:(e,n,t)=>{t.d(n,{A:()=>z,B:()=>C,C:()=>V,D:()=>j,E:()=>E,F:()=>H,G:()=>I,H:()=>k,I:()=>_,J:()=>q,K:()=>B,L:()=>P,M:()=>M,N:()=>O,a:()=>u,b:()=>f,c:()=>c,d:()=>l,e:()=>o,f:()=>a,g:()=>F,h:()=>s,i:()=>d,j:()=>g,k:()=>y,l:()=>w,m:()=>b,n:()=>x,o:()=>N,p:()=>D,q:()=>S,r:()=>h,s:()=>m,t:()=>p,u:()=>R,v:()=>v,w:()=>G,x:()=>T,y:()=>A,z:()=>L});var r=t(45837),i=t(37455);function o(e){return r.G.extendedSpatialReferenceInfo(e)}function c(e,n,t){return r.G.clip(i.N,e,n,t)}function u(e,n,t){return r.G.cut(i.N,e,n,t)}function f(e,n,t){return r.G.contains(i.N,e,n,t)}function l(e,n,t){return r.G.crosses(i.N,e,n,t)}function a(e,n,t,o){return r.G.distance(i.N,e,n,t,o)}function s(e,n,t){return r.G.equals(i.N,e,n,t)}function d(e,n,t){return r.G.intersects(i.N,e,n,t)}function p(e,n,t){return r.G.touches(i.N,e,n,t)}function G(e,n,t){return r.G.within(i.N,e,n,t)}function g(e,n,t){return r.G.disjoint(i.N,e,n,t)}function N(e,n,t){return r.G.overlaps(i.N,e,n,t)}function h(e,n,t,o){return r.G.relate(i.N,e,n,t,o)}function y(e,n){return r.G.isSimple(i.N,e,n)}function m(e,n){return r.G.simplify(i.N,e,n)}function w(e,n,t=!1){return r.G.convexHull(i.N,e,n,t)}function b(e,n,t){return r.G.difference(i.N,e,n,t)}function x(e,n,t){return r.G.symmetricDifference(i.N,e,n,t)}function D(e,n,t){return r.G.intersect(i.N,e,n,t)}function R(e,n,t=null){return r.G.union(i.N,e,n,t)}function S(e,n,t,o,c,u,f){return r.G.offset(i.N,e,n,t,o,c,u,f)}function v(e,n,t,o,c=!1){return r.G.buffer(i.N,e,n,t,o,c)}function T(e,n,t,o,c,u,f){return r.G.geodesicBuffer(i.N,e,n,t,o,c,u,f)}function A(e,n,t,o=!0){return r.G.nearestCoordinate(i.N,e,n,t,o)}function L(e,n,t){return r.G.nearestVertex(i.N,e,n,t)}function z(e,n,t,o,c){return r.G.nearestVertices(i.N,e,n,t,o,c)}function C(e,n,t,i){if(null==n||null==i)throw new Error("Illegal Argument Exception");const o=r.G.rotate(n,t,i);return o.spatialReference=e,o}function V(e,n,t){if(null==n||null==t)throw new Error("Illegal Argument Exception");const i=r.G.flipHorizontal(n,t);return i.spatialReference=e,i}function j(e,n,t){if(null==n||null==t)throw new Error("Illegal Argument Exception");const i=r.G.flipVertical(n,t);return i.spatialReference=e,i}function E(e,n,t,o,c){return r.G.generalize(i.N,e,n,t,o,c)}function H(e,n,t,o){return r.G.densify(i.N,e,n,t,o)}function I(e,n,t,o,c=0){return r.G.geodesicDensify(i.N,e,n,t,o,c)}function k(e,n,t){return r.G.planarArea(i.N,e,n,t)}function _(e,n,t){return r.G.planarLength(i.N,e,n,t)}function q(e,n,t,o){return r.G.geodesicArea(i.N,e,n,t,o)}function B(e,n,t,o){return r.G.geodesicLength(i.N,e,n,t,o)}function P(e,n,t){return null==n||null==t?[]:r.G.intersectLinesToPoints(i.N,e,n,t)}function M(e,n){r.G.changeDefaultSpatialReferenceTolerance(e,n)}function O(e){r.G.clearDefaultSpatialReferenceTolerance(e)}const F=Object.freeze(Object.defineProperty({__proto__:null,buffer:v,changeDefaultSpatialReferenceTolerance:M,clearDefaultSpatialReferenceTolerance:O,clip:c,contains:f,convexHull:w,crosses:l,cut:u,densify:H,difference:b,disjoint:g,distance:a,equals:s,extendedSpatialReferenceInfo:o,flipHorizontal:V,flipVertical:j,generalize:E,geodesicArea:q,geodesicBuffer:T,geodesicDensify:I,geodesicLength:B,intersect:D,intersectLinesToPoints:P,intersects:d,isSimple:y,nearestCoordinate:A,nearestVertex:L,nearestVertices:z,offset:S,overlaps:N,planarArea:k,planarLength:_,relate:h,rotate:C,simplify:m,symmetricDifference:x,touches:p,union:R,within:G},Symbol.toStringTag,{value:"Module"}))},30247:(e,n,t)=>{t.r(n),t.d(n,{buffer:()=>r.v,changeDefaultSpatialReferenceTolerance:()=>r.M,clearDefaultSpatialReferenceTolerance:()=>r.N,clip:()=>r.c,contains:()=>r.b,convexHull:()=>r.l,crosses:()=>r.d,cut:()=>r.a,densify:()=>r.F,difference:()=>r.m,disjoint:()=>r.j,distance:()=>r.f,equals:()=>r.h,extendedSpatialReferenceInfo:()=>r.e,flipHorizontal:()=>r.C,flipVertical:()=>r.D,generalize:()=>r.E,geodesicArea:()=>r.J,geodesicBuffer:()=>r.x,geodesicDensify:()=>r.G,geodesicLength:()=>r.K,intersect:()=>r.p,intersectLinesToPoints:()=>r.L,intersects:()=>r.i,isSimple:()=>r.k,nearestCoordinate:()=>r.y,nearestVertex:()=>r.z,nearestVertices:()=>r.A,offset:()=>r.q,overlaps:()=>r.o,planarArea:()=>r.H,planarLength:()=>r.I,relate:()=>r.r,rotate:()=>r.B,simplify:()=>r.s,symmetricDifference:()=>r.n,touches:()=>r.t,union:()=>r.u,within:()=>r.w}),t(45837),t(37455);var r=t(20178)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9379],{13598:(e,t,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(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]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>s,b:()=>a,c:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:s,createView:n,fromValues:function(e,t,r,s,a,n,i,o,u,l,d,c,p,h,y,f){return[e,t,r,s,a,n,i,o,u,l,d,c,p,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>a,d:()=>d,e:()=>u,n:()=>c,s:()=>l,t:()=>n});var s=r(72220);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return s.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/a,o=r[0],u=r[1],l=r[2],d=r[4],c=r[5],p=r[6],h=r[8],y=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let w=0,F=0;for(let r=0;r<i;r++){const r=t[w],s=t[w+1],i=t[w+2];e[F]=o*r+d*s+h*i+m,e[F+1]=u*r+c*s+y*i+g,e[F+2]=l*r+p*s+f*i+b,w+=n,F+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return void s.c.error("source and destination buffers need to have the same number of elements");const i=e.length/a,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],s=t[m+1],i=t[m+2];e[g]=o*r+d*s+h*i,e[g+1]=u*r+c*s+y*i,e[g+2]=l*r+p*s+f*i,m+=n,g+=a}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,s=3){const a=Math.min(e.length/s,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<a;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=s}function d(e,t){c(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r=3,s=r){const a=Math.min(e.length/r,t.length/s);let n=0,i=0;for(let o=0;o<a;o++){const a=t[n],o=t[n+1],u=t[n+2],l=a*a+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*a,e[i+1]=t*o,e[i+2]=t*u}n+=s,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:c,normalizeView:d,scale:l,scaleView:u,shiftRight:function(e,t,r){const s=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<s;e++)a[l]=i[u]>>r,a[l+1]=i[u+1]>>r,a[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:a},Symbol.toStringTag,{value:"Module"}))},85872:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),a=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),l=r(65617),d=r(94139);let c=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,l.c)()}getOriginPoint(e){const[t,r,s]=this.origin;return new d.Z({x:t,y:r,z:s,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:r}){this.origin=(0,l.f)(e,t,r??0)}};(0,s._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,s._)([(0,u.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],c);const p=c},72220:(e,t,r)=>{r.d(t,{c:()=>s});const s=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>w,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,a.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,s.Z)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>m(e,t)))}return m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.dm)(e,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>S,aw:()=>b,uploadAssets:()=>x});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(92604),u=r(95330),l=r(17452),d=r(41123),c=r(16306),p=r(66361),h=r(35671),y=r(2981),f=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,s={}){let l;if((0,p.lQ)(e)&&e.url)l=(0,p.jF)(e.url,e.layerId,s.gdbVersion,"original-and-current-features"===s.returnServiceEditsOption);else{l=(0,u.hh)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,s){if(await e.load(),!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const s=(0,f.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,s,a,i){if(!e||!s&&!a)throw new n.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new n.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new n.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,s,r,!!i,!!u,`${e.type}-layer`),!s.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!s.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||s.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),c.rollbackOnFailureEnabled=!0),!s.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const s=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return s.addFeatures=s.addFeatures.map(O),s.updateFeatures=s.updateFeatures.map(O),s.addAssetFeatures=[],s}(t,s,`${e.type}-layer`),h=r?.globalIdUsed||l,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&e.length>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,s){_(e,t,r,s),v(e,t)}(t,e,h,m))),p.updateFeatures.forEach((t=>function(e,t,r,s){_(e,t,r,s),v(e,t);const a=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,m))),p.deleteFeatures.forEach((t=>function(e,t,r,s){_(e,t,r,s)}(t,e,h,m))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,y.S0)("model/gltf-binary",r.supportedFormats)??(0,y.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])I(t)&&a.push(t);for(const t of e.updateFeatures??[])I(t)&&a.push(t)}(p,e),{edits:await A(p),options:c}}(e,r,s);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,s),p=e=>e.filter((e=>!e.error)).map(i.d9),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function _(e,t,r,s){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(s.length&&"attributes"in e)for(const r of s){const s=e.attributes[r.name];if(void 0!==s&&!(0,h.d2)(r,s))throw new n.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new n.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,l.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function A(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,c.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function O(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function I(e){return"mesh"===e?.geometry?.type}function x(e,t,r,s){if(!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},49379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var s=r(43697),a=(r(66577),r(40330)),n=r(3172),i=r(92835),o=r(67676),u=r(20102),l=r(80442),d=r(35454),c=r(83379),p=r(92604),h=r(78286),y=r(95330),f=r(17452),m=r(41123),g=r(5600),b=(r(75215),r(52011)),w=r(6570),F=r(52138),S=r(13598),_=r(85872),v=r(20773);function R(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,s=r.clone(),a=(0,F.d)(A,[-s.x,-s.y,-s.z]),n=new _.Z({origin:[s.x,s.y,s.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,v.t)(new Float64Array(o.length),o,a),i.vertexAttributesChanged(),i}const A=(0,S.a)();var O=r(84470),I=r(38171),x=r(67900),E=r(73615),q=r(33955),Z=r(14720);async function C(e,t,r){const{geometry:s}=t,a={...t.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=s,u=e.spatialReference;await(0,E.initializeProjection)(i,u);const l=(0,E.project)(n,u);if(a[t.originX]=l.x,a[t.originY]=l.y,a[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=s,d=l.isGeoreferenced?1:(0,x.r6)(i)/(0,x.r6)(u);a[t.translationX]=e[0]*d,a[t.translationY]=e[2]*d,a[t.translationZ]=-e[1]*d,a[t.scaleX]=r[0],a[t.scaleY]=r[2],a[t.scaleZ]=r[1],a[t.rotationX]=n[0],a[t.rotationY]=n[2],a[t.rotationZ]=-n[1],a[t.rotationDeg]=n[3]}return{attributes:a}}return null==s?{attributes:a}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:a}}async function T(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>M(e,t)))),s=await Promise.all((t.updateAttachments??[]).map((t=>M(e,t)))),a=t.deleteAttachments??[];return r.length||s.length||a.length?{adds:r,updates:s,deletes:[...a]}:null}async function M(e,t){const{feature:r,attachment:s}=t,{globalId:a,name:n,contentType:i,data:o,uploadId:u}=s,l={globalId:a};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.IR)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function D(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function P(e,t){return new I.Z({attributes:e.attributes,geometry:(0,q.im)({...e.geometry,spatialReference:t})})}function $(e,t){return{adds:e?.adds?.map((e=>P(e,t)))||[],updates:e?.updates?.map((e=>({original:P(e[0],t),current:P(e[1],t)})))||[],deletes:e?.deletes?.map((e=>P(e,t)))||[],spatialReference:t}}var N=r(25278),U=r(49735),k=r(66677),G=r(50957),B=r(2981),j=r(4967),L=r(59431),Q=r(14165),J=r(18596),V=r(82971);const z=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),H=new Set(["Feature Layer","Oriented Imagery Layer","Table"]),X=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let W=class extends c.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,u=e?.operations?.supportsQueryAttachments??!1;return new U.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,G.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return D((await(0,n.Z)(a,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async updateAttachment(e,t,r){await this.load();const{layer:s}=this;await(0,G.nU)(s,"editing");const a=e.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+a+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,n.Z)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,G.nU)(r,"editing");const s=r.infoFor3D,i=null!=s,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>C(this.layer,e,s)))??[],c=(await Promise.all(d)).filter(o.pC),p=e.updateFeatures?.map((e=>C(this.layer,e,s)))??[],h=(await Promise.all(p)).filter(o.pC),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,Z.Ey)(t))return t.map((e=>e.globalId));if((0,Z.aw)(t))return t.map((e=>e.objectId));const s=r?e.globalIdField:e.objectIdField;return s?t.map((e=>e.getAttribute(s))):[]}(this.layer,e.deleteFeatures,u);(0,L.P)(c,h,r.spatialReference);const f=await T(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,J.Px)(this.layer.url,g,!0);const w=(0,J.JV)(this.layer.url,g||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:c,updates:h,deletes:y,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=z.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=c.length?JSON.stringify(c):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=J.U8);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let _;try{_=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}catch(e){throw function(e){const t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e)&&(F.authMode="immediate",_=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)),e}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=a.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(_)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,G.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,n.Z)(a,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(e){throw this._createAttachmentErrorResult(s,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,n.Z)(`${s}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=a,c=u||l;return{id:o,fullExtent:c&&w.Z.fromJSON(c),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,k.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.Z)(e,{query:{f:"json"}});return X.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(2046).then(r.bind(r,2046));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.Z)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.e4)(Y)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.Z)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,n.Z)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!H.has(r))throw new u.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,N.bU)(e.geometryType).renderer;(0,h.RB)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.Z)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.r9)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=new Array,a=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)s.push(t);else{const r=R(t);a.set(r,t),e.geometry=r,s.push(r)}}await this.uploadAssets(s);for(const[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){p.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(O.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,m.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):p.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,s={addFeatureResults:e?.addResults?.map(D)??[],updateFeatureResults:e?.updateResults?.map(D)??[],deleteFeatureResults:e?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(a);if(s.length>0){n.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new V.Z(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:$(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,B.$6)(s);if(null==n)return e;const i=(0,f.v_)(a.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=s,h=new Q.Z;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,j.e)(i,h),{features:m}=y;return 0===m.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=m.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,g.Cb)()],W.prototype,"type",void 0),(0,s._)([(0,g.Cb)({constructOnly:!0})],W.prototype,"layer",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],W.prototype,"queryTask",null),W=(0,s._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],W);const Y=1e3,K=W},49735:(e,t,r)=>{r.d(t,{Z:()=>v});var s=r(43697),a=r(92036),n=r(20102),i=r(80442),o=r(95330),u=r(17452),l=r(5600),d=(r(75215),r(67676),r(52011)),c=r(2981),p=r(10158),h=r(11282),y=r(41818),f=(r(66577),r(34599)),m=r(14165),g=r(6570),b=r(5396),w=r(4967),F=r(53261),S=r(74889);let _=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],a=(0,i.Z)("featurelayer-pbf-statistics"),n=!s||a;let o;if(this.pbfSupported&&n)try{o=await(0,F.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(o=await(0,w.F)(this.url,r,t)),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return S.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,o.Hl)(Promise.all([r.e(6481),r.e(6170),r.e(6459),r.e(5613)]).then(r.bind(r,25158)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,h.en)(e);return(0,f.Vr)(s,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,b.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:a,processAttachmentQueryResult:n}=await(0,o.Hl)(r.e(540).then(r.bind(r,30540)),t),i=(0,h.en)(this.url);return n(i,await(this.queryAttachmentsSupported?s(i,e,t):a(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,o.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,o.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,o.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,o.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=r,i=(0,c.S0)("model/gltf-binary",s)??(0,c.Ow)("glb",s),o=(0,c.S0)("model/gltf+json",s)??(0,c.Ow)("gtlf",s);for(const e of a){if(e===i){t.formatOf3DObjects=e;break}e!==o||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new n.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:a,originZ:n,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:d,scaleZ:c,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,a,n,i,o,u,l,d,c,p,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,l.Cb)({type:p.n})],_.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"infoFor3D",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],_.prototype,"pbfSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.Cb)({type:String})],_.prototype,"url",void 0),_=(0,s._)([(0,d.j)("esri.tasks.QueryTask")],_);const v=_},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},2981:(e,t,r)=>{r.d(t,{$6:()=>y,$z:()=>n,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>u,dm:()=>l});const s=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=c(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=l(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return p(function(e,t){const r=e.toLowerCase();return d(t).find((e=>h(e)===r))}(e,t))}function o(e,t){return p(c(e,t))}function u(e,t){return h(function(e,t){return d(t).find((t=>p(t)===e))}(e,t))}function l(e,t){return o(e.name,t)??i(e.type,t)}function d(e){return[...s,...e]}function c(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function y(e){return e.tables?.find((e=>"assetMaps"===e.role))}},41818:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.hH)(i,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.Ev)(i,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>o});var s=r(11282),a=r(34599),n=r(74889),i=r(14165);async function o(e,t,r){const s=await u(e,t,r);return n.Z.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),o={...r},u=i.Z.from(t),{data:l}=await(0,a.JT)(n,u,u.sourceSpatialReference,o);return l}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var s=r(11282),a=r(70586),n=r(69285),i=r(98732);function o(e,t){return t}function u(e,t,r,s){switch(r){case 0:return p(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?p(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function l(e,t,r,s){return 2===r?p(e,t,2):u(e,t,r,s)}function d(e,t,r,s){return 2===r?p(e,t,3):u(e,t,r,s)}function c(e,t,r,s){return 3===r?p(e,t,3):l(e,t,r,s)}function p({translate:e,scale:t},r,s){return e[s]+r*t[s]}class h{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,a.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,i.$g)(r.clone(),r,!1,!1,this._transform),n=(0,i.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=this._transform;switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=this._transform;return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?c:t?l:r?d:u}}var y=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const a=(0,s.en)(e),n={...r},i=f.Z.from(t),o=!i.quantizationParameters,{data:u}=await(0,y.qp)(a,i,new h({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),n);return u}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6841,6030],{88669:(e,n,t)=>{function a(){return[0,0,0,0]}function i(e,n,t,a){return[e,n,t,a]}function l(e,n){return new Float64Array(e,n,4)}function o(){return i(1,1,1,1)}function r(){return i(1,0,0,0)}function s(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function c(){return i(0,0,0,1)}t.d(n,{a:()=>l,c:()=>a,f:()=>i});const f=o(),m=r(),d=s(),p=u(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:h,UNIT_X:m,UNIT_Y:d,UNIT_Z:p,ZEROS:[0,0,0,0],clone:function(e){return[e[0],e[1],e[2],e[3]]},create:a,createView:l,fromArray:function(e,n=[0,0,0,0]){const t=Math.min(4,e.length);for(let a=0;a<t;++a)n[a]=e[a];return n},fromValues:i,ones:o,unitW:c,unitX:r,unitY:s,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},36030:(e,n,t)=>{t.d(n,{J:()=>l});var a=t(35454),i=t(5600);function l(e,n={}){const t=e instanceof a.X?e:new a.X(e,n),l={type:n?.ignoreUnknown??1?t.apiValues:String,json:{type:t.jsonValues,read:!n?.readOnly&&{reader:t.read},write:{writer:t.write}}};return void 0!==n?.readOnly&&(l.readOnly=!!n.readOnly),void 0!==n?.default&&(l.json.default=n.default),void 0!==n?.name&&(l.json.name=n.name),void 0!==n?.nonNullable&&(l.nonNullable=n.nonNullable),(0,i.Cb)(l)}},62357:(e,n,t)=>{t.d(n,{F2:()=>o,Wz:()=>r,t_:()=>s,vW:()=>u});const a=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",l=96;function o(e){return e?e/72*l:0}function r(e){return e?72*e/l:0}function s(e){if("string"==typeof e){const n=e.match(a);if(n){const t=Number(n[1]),a=n[3]&&n[3].toLowerCase(),i="-"===e.charAt(0),l="px"===a?r(t):t;return i?-l:l}return console.warn(i),null}return e}function u(e=0,n=0){return{x:e,y:n}}},82397:(e,n,t)=>{t.d(n,{G6:()=>h,Ie:()=>p,J9:()=>m,RF:()=>f,U1:()=>d,vY:()=>o}),t(33955);const a=(e,n,t)=>[n,t],i=(e,n,t)=>[n,t,e[2]],l=(e,n,t)=>[n,t,e[2],e[3]];function o(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],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function r({scale:e,translate:n},t){return t*e[0]+n[0]}function s({scale:e,translate:n},t){return n[1]-t*e[1]}function u(e,n,t){const a=new Array(t.length);if(!t.length)return a;const[i,l]=e.scale;let o=r(e,t[0][0]),u=s(e,t[0][1]);a[0]=n(t[0],o,u);for(let e=1;e<t.length;e++){const r=t[e];o+=r[0]*i,u-=r[1]*l,a[e]=n(r,o,u)}return a}function c(e,n,t){const a=new Array(t.length);for(let i=0;i<t.length;i++)a[i]=u(e,n,t[i]);return a}function f(e,n,t,a,i){return n.x=function({scale:e,translate:n},t){return Math.round((t-n[0])/e[0])}(e,t.x),n.y=function({scale:e,translate:n},t){return Math.round((n[1]-t)/e[1])}(e,t.y),n!==t&&(a&&(n.z=t.z),i&&(n.m=t.m)),n}function m(e,n,t,o,r){return null!=t&&(n.points=function(e,n,t,o){return u(e,t?o?l:i:o?i:a,n)}(e,t.points,o,r)),n}function d(e,n,t,a,i){return null==t||(n.x=r(e,t.x),n.y=s(e,t.y),n!==t&&(a&&(n.z=t.z),i&&(n.m=t.m))),n}function p(e,n,t,o,r){return null!=t&&(n.rings=function(e,n,t,o){return c(e,t?o?l:i:o?i:a,n)}(e,t.rings,o,r)),n}function h(e,n,t,o,r){return null!=t&&(n.paths=function(e,n,t,o){return c(e,t?o?l:i:o?i:a,n)}(e,t.paths,o,r)),n}},73572:(e,n,t)=>{t.d(n,{AJ:()=>o,If:()=>s,QM:()=>r,k0:()=>l,ul:()=>i,wx:()=>u}),t(22021);var a=t(62357);t(98766),t(88669);const i=2.4;function l(e){return(0,a.Wz)(e*i)}function o(e){return(0,a.F2)(e)/i}function r(e,n,t,i){const{radius:l,fieldOffset:o,field:r}=n,u=Math.round((0,a.F2)(l)),c=new Float64Array(t*i);let f,m=Number.NEGATIVE_INFINITY;const d=function(e,n){return null!=e?"string"==typeof n?n=>-1*+n.readAttribute(e):t=>+t.readAttribute(e)+n:e=>1}(r,o),p=new Set;for(const n of e){const e=n.getCursor();for(;e.next();){const n=e.getObjectId();if(p.has(n))continue;p.add(n);const a=e.readLegacyPointGeometry(),l=128;if(a.x<-l||a.x>=t+l||a.y<-l||a.y>i+l)continue;const o=+d(e),r=Math.max(0,Math.round(a.x)-u),h=Math.max(0,Math.round(a.y)-u),v=Math.min(i,Math.round(a.y)+u),y=Math.min(t,Math.round(a.x)+u);for(let e=h;e<v;e++)for(let n=r;n<y;n++){const i=e*t+n,l=s(a.x-n,a.y-e,u);f=c[i]+=l*o,f>m&&(m=f)}}}return{matrix:c.buffer,max:m}}function s(e,n,t){const a=Math.sqrt(e**2+n**2)/t;return a>1?0:3/(Math.PI*t**2)*(1-a**2)**2}function u(e,n){return"function"==typeof e?e:e?"string"==typeof n?n=>-1*+n[e]:t=>+t[e]+n:()=>1}},10278:(e,n,t)=>{t.d(n,{Z:()=>m});var a=t(43697),i=t(35454),l=t(96674),o=t(5600),r=(t(75215),t(67676),t(80442),t(36030)),s=t(52011);const u=new i.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new i.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends l.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,a._)([(0,r.J)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,a._)([(0,o.Cb)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,a._)([(0,o.Cb)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,a._)([(0,o.Cb)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,a._)([(0,o.Cb)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,a._)([(0,o.Cb)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,a._)([(0,o.Cb)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,a._)([(0,o.Cb)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,a._)([(0,s.j)("esri.rest.support.ClassBreaksDefinition")],f);const m=f},622:(e,n,t)=>{t.d(n,{k:()=>l});const a=t(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function i(e,n){return Number(e.toFixed(n))}function l(e){const{normalizationTotal:n}=e;return{classBreaks:o(e),normalizationTotal:n}}function o(e){const n=e.definition,{classificationMethod:t,normalizationType:a,definedInterval:l}=n,o=n.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,n)=>e-n));const f=c[0],m=c[c.length-1];if("equal-interval"===t)if(c.length>=o){const e=(m-f)/o;let n=f;for(let t=1;t<o;t++){const l=i(f+t*e,6);u.push({minValue:n,maxValue:l,label:r(n,l,a)}),n=l}u.push({minValue:n,maxValue:m,label:r(n,m,a)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:r(e,e,a)})}));else if("natural-breaks"===t){const n=function(e){const n=[],t=[];let a=Number.MIN_VALUE,i=1,l=-1;for(let o=0;o<e.length;o++){const r=e[o];r===a?(i++,t[l]=i):null!==r&&(n.push(r),a=r,i=1,t.push(i),l++)}return{uniqueValues:n,valueFrequency:t}}(c),t=e.valueFrequency||n.valueFrequency,l=s(n.uniqueValues,t,o);let d=f;for(let e=1;e<o;e++)if(n.uniqueValues.length>e){const t=i(n.uniqueValues[l[e]],6);u.push({minValue:d,maxValue:t,label:r(d,t,a)}),d=t}u.push({minValue:d,maxValue:m,label:r(d,m,a)})}else if("quantile"===t)if(c.length>=o&&f!==m){let e=f,n=Math.ceil(c.length/o),t=0;for(let i=1;i<o;i++){let l=n+t-1;l>c.length&&(l=c.length-1),l<0&&(l=0),u.push({minValue:e,maxValue:c[l],label:r(e,c[l],a)}),e=c[l],t+=n,n=Math.ceil((c.length-t)/(o-i))}u.push({minValue:e,maxValue:m,label:r(e,m,a)})}else{let e=-1;for(let n=0;n<c.length;n++){const t=c[n];t!==e&&(e=t,u.push({minValue:e,maxValue:t,label:r(e,t,a)}),e=t)}}else if("standard-deviation"===t){const e=function(e){let n=0;for(let t=0;t<e.length;t++)n+=e[t];return n/=e.length,n}(c),n=function(e,n){let t=0;for(let a=0;a<e.length;a++){const i=e[a];t+=(i-n)*(i-n)}return t/=e.length,Math.sqrt(t)}(c,e);if(0===n)u.push({minValue:c[0],maxValue:c[0],label:r(c[0],c[0],a)});else{const t=function(e,n,t,a,i){let l=Math.max(a-e,n-a)/i/t;return l=l>=1?1:l>=.5?.5:.25,l}(f,m,o,e,n)*n;let l=0,s=f;for(let n=o;n>=1;n--){const o=i(e-(n-.5)*t,6);u.push({minValue:s,maxValue:o,label:r(s,o,a)}),s=o,l++}let c=i(e+.5*t,6);u.push({minValue:s,maxValue:c,label:r(s,c,a)}),s=c,l++;for(let n=1;n<=o;n++)c=l===2*o?m:i(e+(n+.5)*t,6),u.push({minValue:s,maxValue:c,label:r(s,c,a)}),s=c,l++}}else if("defined-interval"===t){if(!l)return u;const e=c[0],n=c[c.length-1],t=Math.ceil((n-e)/l);let o=e;for(let n=1;n<t;n++){const t=i(e+n*l,6);u.push({minValue:o,maxValue:t,label:r(o,t,a)}),o=t}u.push({minValue:o,maxValue:n,label:r(o,n,a)})}return u}function r(e,n,t){let a=null;return a=e===n?t&&"percent-of-total"===t?e+"%":e.toString():t&&"percent-of-total"===t?e+"% - "+n+"%":e+" - "+n,a}function s(e,n,t){const a=e.length,i=[];t>a&&(t=a);for(let e=0;e<t;e++)i.push(Math.round(e*a/t-1));i.push(a-1);let l=u(i,e,n,t);return function(e,n,t,a,i,l){let o=0,r=0,s=0,u=0,f=!0;for(let m=0;m<2&&f;m++){0===m&&(f=!1);for(let m=0;m<l-1;m++)for(;t[m+1]+1!==t[m+2];){t[m+1]=t[m+1]+1;const l=c(m,t,a,i);s=l.sbMean,o=l.sbSdcm;const d=c(m+1,t,a,i);if(u=d.sbMean,r=d.sbSdcm,!(o+r<n[m]+n[m+1])){t[m+1]=t[m+1]-1;break}n[m]=o,n[m+1]=r,e[m]=s,e[m+1]=u,f=!0}for(let m=l-1;m>0;m--)for(;t[m]!==t[m-1]+1;){t[m]=t[m]-1;const l=c(m-1,t,a,i);s=l.sbMean,o=l.sbSdcm;const d=c(m,t,a,i);if(u=d.sbMean,r=d.sbSdcm,!(o+r<n[m-1]+n[m])){t[m]=t[m]+1;break}n[m-1]=o,n[m]=r,e[m-1]=s,e[m]=u,f=!0}}return f}(l.mean,l.sdcm,i,e,n,t)&&(l=u(i,e,n,t)),i}function u(e,n,t,a){let i=[],l=[],o=[],r=0;const s=[],u=[];for(let i=0;i<a;i++){const a=c(i,e,n,t);s.push(a.sbMean),u.push(a.sbSdcm),r+=u[i]}let f,m=r,d=!0;for(;d||r<m;){d=!1,i=[];for(let n=0;n<a;n++)i.push(e[n]);for(let t=0;t<a;t++)for(let i=e[t]+1;i<=e[t+1];i++)if(f=n[i],t>0&&i!==e[t+1]&&Math.abs(f-s[t])>Math.abs(f-s[t-1]))e[t]=i;else if(t<a-1&&e[t]!==i-1&&Math.abs(f-s[t])>Math.abs(f-s[t+1])){e[t+1]=i-1;break}m=r,r=0,l=[],o=[];for(let i=0;i<a;i++){l.push(s[i]),o.push(u[i]);const a=c(i,e,n,t);s[i]=a.sbMean,u[i]=a.sbSdcm,r+=u[i]}}if(r>m){for(let n=0;n<a;n++)e[n]=i[n],s[n]=l[n],u[n]=o[n];r=m}return{mean:s,sdcm:u}}function c(e,n,t,i){let l=0,o=0;for(let a=n[e]+1;a<=n[e+1];a++){const e=i[a];l+=t[a]*e,o+=e}o<=0&&a.warn("Exception in Natural Breaks calculation");const r=l/o;let s=0;for(let a=n[e]+1;a<=n[e+1];a++)s+=i[a]*(t[a]-r)**2;return{sbMean:r,sbSdcm:s}}},36841:(e,n,t)=>{t.r(n),t.d(n,{classBreaks:()=>v,heatmapStatistics:()=>b,histogram:()=>y,summaryStatistics:()=>p,uniqueValues:()=>h}),t(66577),t(20102);var a=t(62357),i=t(82971),l=t(82397),o=t(8744),r=t(35671),s=t(73572),u=t(24452),c=t(59266),f=t(94139);let m=null;async function d(e,n){if(!n)return[];const{field:t,field2:a,field3:l,fieldDelimiter:o,fieldInfos:s,timeZone:f}=e,d=t&&s?.find((e=>e.name.toLowerCase()===t.toLowerCase())),p=!!d&&(0,r.y2)(d),h=e.valueExpression,v=e.normalizationType,y=e.normalizationField,b=e.normalizationTotal,x=[],V=e.viewInfoParams;let g=null,T=null;if(h){if(!m){const{arcadeUtils:e}=await(0,c.LC)();m=e}m.hasGeometryOperations(h)&&await m.enableGeometryOperations(),g=m.createFunction(h),T=V?m.getViewInfo({viewingMode:V.viewingMode,scale:V.scale,spatialReference:new i.Z(V.spatialReference)}):null}const I=e.fieldInfos,z=n[0]&&"declaredClass"in n[0]&&"esri.Graphic"===n[0].declaredClass||!I?null:{fields:I};return n.forEach((e=>{const n=e.attributes;let i;if(h){const n=z?{...e,layer:z}:e,t=m.createExecContext(n,T,f);i=m.executeFunction(g,t)}else n&&(i=n[t],a?(i=`${(0,u.wk)(i)}${o}${(0,u.wk)(n[a])}`,l&&(i=`${i}${o}${(0,u.wk)(n[l])}`)):p&&"string"==typeof i&&(i=i?new Date(i).getTime():null));if(v&&"number"==typeof i&&isFinite(i)){const e=n&&parseFloat(n[y]);i=(0,u.fk)(i,v,e,b)}x.push(i)})),x}async function p(e){const{attribute:n,features:t}=e,{normalizationType:a,normalizationField:i,minValue:l,maxValue:o,fieldType:r}=n,s=await d({field:n.field,valueExpression:n.valueExpression,normalizationType:a,normalizationField:i,normalizationTotal:n.normalizationTotal,viewInfoParams:n.viewInfoParams,timeZone:n.timeZone,fieldInfos:n.fieldInfos},t),c=(0,u.S5)({normalizationType:a,normalizationField:i,minValue:l,maxValue:o}),f={value:.5,fieldType:r},m="esriFieldTypeString"===r?(0,u.H0)({values:s,supportsNullCount:c,percentileParams:f}):(0,u.i5)({values:s,minValue:l,maxValue:o,useSampleStdDev:!a,supportsNullCount:c,percentileParams:f});return(0,u.F_)(m,"esriFieldTypeDate"===r)}async function h(e){const{attribute:n,features:t}=e,a=await d({field:n.field,field2:n.field2,field3:n.field3,fieldDelimiter:n.fieldDelimiter,valueExpression:n.valueExpression,viewInfoParams:n.viewInfoParams,timeZone:n.timeZone,fieldInfos:n.fieldInfos},t),i=(0,u.eT)(a);return(0,u.Qm)(i,n.domains,n.returnAllCodedValues,n.fieldDelimiter)}async function v(e){const{attribute:n,features:t}=e,{field:a,normalizationType:i,normalizationField:l,normalizationTotal:o,classificationMethod:r}=n,s=await d({field:a,valueExpression:n.valueExpression,normalizationType:i,normalizationField:l,normalizationTotal:o,viewInfoParams:n.viewInfoParams,timeZone:n.timeZone,fieldInfos:n.fieldInfos},t),c=(0,u.G2)(s,{field:a,normalizationType:i,normalizationField:l,normalizationTotal:o,classificationMethod:r,standardDeviationInterval:n.standardDeviationInterval,numClasses:n.numClasses,minValue:n.minValue,maxValue:n.maxValue});return(0,u.DL)(c,r)}async function y(e){const{attribute:n,features:t}=e,{field:a,normalizationType:i,normalizationField:l,normalizationTotal:o,classificationMethod:r}=n,s=await d({field:a,valueExpression:n.valueExpression,normalizationType:i,normalizationField:l,normalizationTotal:o,viewInfoParams:n.viewInfoParams,timeZone:n.timeZone,fieldInfos:n.fieldInfos},t);return(0,u.oF)(s,{field:a,normalizationType:i,normalizationField:l,normalizationTotal:o,classificationMethod:r,standardDeviationInterval:n.standardDeviationInterval,numBins:n.numBins,minValue:n.minValue,maxValue:n.maxValue})}async function b(e){const{attribute:n,features:t}=e,{field:i,radius:r,fieldOffset:u,transform:c,spatialReference:m}=n,d=n.size??[0,0],p=function(e,n,t,a){const i=(0,o.MP)(t)?(0,o.C5)(t):null,r=i?Math.round((i.valid[1]-i.valid[0])/n.scale[0]):null;return e.map((e=>{const t=new f.Z(e.geometry);return(0,l.RF)(n,t,t,t.hasZ,t.hasM),e.geometry=i?function(e,n,t){return e.x<0?e.x+=n:e.x>t&&(e.x-=n),e}(t,r??0,a[0]):t,e}))}(t??[],c,m,d),{count:h,min:v,max:y,mean:b,stdDev:x}=function(e,n=18,t,i,l,o){const r=new Float64Array(l*o);n=Math.round((0,a.F2)(n));let u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,f=0,m=0,d=0,p=0;const h=(0,s.wx)(i,t);for(const{geometry:t,attributes:a}of e){const{x:e,y:i}=t,v=Math.max(0,e-n),y=Math.max(0,i-n),b=Math.min(o,i+n),x=Math.min(l,e+n),V=+h(a);for(let t=y;t<b;t++)for(let a=v;a<x;a++){const o=t*l+a,h=(0,s.If)(a-e,t-i,n),v=r[o];f=r[o]+=h*V;const y=f-v;m+=y,d+=y*y,f<u&&(u=f),f>c&&(c=f),p++}}if(!p)return{mean:0,stddev:0,min:0,max:0,mid:0,count:0};const v=(c-u)/2;return{mean:m/p,stdDev:Math.sqrt((d-m*m/p)/p),min:u,max:c,mid:v,count:p}}(p,r??void 0,u,i,d[0],d[1]);return{count:h,min:v,max:y,avg:b,stddev:x}}},24452:(e,n,t)=>{t.d(n,{DL:()=>C,F_:()=>T,G2:()=>w,H0:()=>h,Lq:()=>b,Qm:()=>F,S5:()=>p,XL:()=>y,eT:()=>I,fk:()=>M,i5:()=>v,oF:()=>D,wk:()=>d});var a=t(10278),i=t(622);const l="<Null>",o="equal-interval",r=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),m=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function d(e){return null==e||"string"==typeof e&&!e?l:e}function p(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,a=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!a}function h(e){const n=e.returnDistinct?[...new Set(e.values)]:e.values,t=n.filter((e=>null!=e)).sort(),a=t.length,i={count:a,min:t[0],max:t[a-1]};return e.supportsNullCount&&(i.nullcount=n.length-a),e.percentileParams&&(i.median=y(n,e.percentileParams)),i}function v(e){const{values:n,useSampleStdDev:t,supportsNullCount:a}=e;let i=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,o=null,r=null,s=null,u=null,c=0;const f=null==e.minValue?-1/0:e.minValue,m=null==e.maxValue?1/0:e.maxValue;for(const e of n)Number.isFinite(e)?e>=f&&e<=m&&(o=null===o?e:o+e,i=Math.min(i,e),l=Math.max(l,e),c++):"string"==typeof e&&c++;if(c&&null!=o){r=o/c;let e=0;for(const t of n)Number.isFinite(t)&&t>=f&&t<=m&&(e+=(t-r)**2);u=t?c>1?e/(c-1):0:c>0?e/c:0,s=Math.sqrt(u)}else i=null,l=null;const d={avg:r,count:c,max:l,min:i,stddev:s,sum:o,variance:u};return a&&(d.nullcount=n.length-c),e.percentileParams&&(d.median=y(n,e.percentileParams)),d}function y(e,n){const{fieldType:t,value:a,orderBy:i,isDiscrete:l}=n,o=b(t,"desc"===i);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,n)=>o(e,n)))).length)return null;if(a<=0)return e[0];if(a>=1)return e[e.length-1];const r=(e.length-1)*a,s=Math.floor(r),u=s+1,c=r%1,f=e[s],m=e[u];return u>=e.length||l||"string"==typeof f||"string"==typeof m?f:f*(1-c)+m*c}function b(e,n){const t=n?1:-1,a=function(e){return e?(e,n)=>{const t=x(e,n,!0);return null!=t?t:n-e}:(e,n)=>{const t=x(e,n,!1);return null!=t?t:e-n}}(n),i=V(n);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...f].includes(e))return(e,n)=>"number"==typeof e&&"number"==typeof n?a(e,n):"string"==typeof e&&"string"==typeof n?i(e,n):t;if("esriFieldTypeDate"===e)return(e,n)=>{const i=new Date(e).getTime(),l=new Date(n).getTime();return isNaN(i)||isNaN(l)?t:a(i,l)};if(f.has(e))return(e,n)=>a(e,n);if("esriFieldTypeString"===e)return(e,n)=>i(e,n);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=V(n);return(n,t)=>e(g(n),g(t))}return n?(e,n)=>1:(e,n)=>-1}function x(e,n,t){if(t){if(null==e)return null==n?0:1;if(null==n)return-1}else{if(null==e)return null==n?0:-1;if(null==n)return 1}return null}function V(e){return e?(e,n)=>{const t=x(e,n,!0);return null!=t?t:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const t=x(e,n,!1);return null!=t?t:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}function g(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,n){let t;for(t in e)m.includes(t)&&(Number.isFinite(e[t])||(e[t]=null));return n?(["avg","stddev","variance"].forEach((n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))})),e):e}function I(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function z(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function F(e,n,t,a){const i=e.count,l=[];if(t&&n){const e=[],t=z(n[0]);for(const i of t)if(n[1]){const t=z(n[1]);for(const l of t)if(n[2]){const t=z(n[2]);for(const n of t)e.push(`${d(i)}${a}${d(l)}${a}${d(n)}`)}else e.push(`${d(i)}${a}${d(l)}`)}else e.push(i);for(const n of e)i.hasOwnProperty(n)||(i[n]={data:n,count:0})}for(const e in i){const n=i[e];l.push({value:n.data,count:n.count,label:n.label})}return{uniqueValueInfos:l}}function M(e,n,t,a){let i=null;switch(n){case"log":0!==e&&(i=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(a)&&0!==a&&(i=e/a*100);break;case"field":Number.isFinite(t)&&0!==t&&(i=e/t);break;case"natural-log":e>0&&(i=Math.log(e));break;case"square-root":e>0&&(i=e**.5)}return i}function w(e,n){const t=N({field:n.field,normalizationType:n.normalizationType,normalizationField:n.normalizationField,classificationMethod:n.classificationMethod,standardDeviationInterval:n.standardDeviationInterval,breakCount:n.numClasses||s});return e=function(e,n,t){const a=n??-1/0,i=t??1/0;return e.filter((e=>Number.isFinite(e)&&e>=a&&e<=i))}(e,n.minValue,n.maxValue),(0,i.k)({definition:t,values:e,normalizationTotal:n.normalizationTotal})}function N(e){const{breakCount:n,field:t,normalizationField:i,normalizationType:l}=e,s=e.classificationMethod||o,u="standard-deviation"===s?e.standardDeviationInterval||r:void 0;return new a.Z({breakCount:n,classificationField:t,classificationMethod:s,normalizationField:"field"===l?i:void 0,normalizationType:l,standardDeviationInterval:u})}function C(e,n){let t=e.classBreaks;const a=t.length,i=t[0]?.minValue,l=t[a-1]?.maxValue,o="standard-deviation"===n,r=c;return t=t.map((e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(o&&n){const e=n.match(r),a=e?.map((e=>+e.trim()))??[];2===a.length?(t.minStdDev=a[0],t.maxStdDev=a[1],a[0]<0&&a[1]>0&&(t.hasAvg=!0)):1===a.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=a[0]):n.includes(">")&&(t.minStdDev=a[0],t.maxStdDev=null))}return t})),{minValue:i,maxValue:l,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function D(e,n){const t=S(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const a=t.intervals,i=t.min??0,l=t.max??0,o=a.map(((e,n)=>({minValue:a[n][0],maxValue:a[n][1],count:0})));for(const n of e)if(null!=n&&n>=i&&n<=l){const e=k(a,n);e>-1&&o[e].count++}return{bins:o,minValue:i,maxValue:l,normalizationTotal:n.normalizationTotal}}function S(e,n){const{field:t,classificationMethod:a,standardDeviationInterval:i,normalizationType:l,normalizationField:o,normalizationTotal:r,minValue:s,maxValue:c}=n,f=n.numBins||u;let m=null,d=null,h=null;if(a&&"equal-interval"!==a||l){const{classBreaks:n}=w(e,{field:t,normalizationType:l,normalizationField:o,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:i,minValue:s,maxValue:c,numClasses:f});m=n[0].minValue,d=n[n.length-1].maxValue,h=n.map((e=>[e.minValue,e.maxValue]))}else{if(null!=s&&null!=c)m=s,d=c;else{const n=v({values:e,minValue:s,maxValue:c,useSampleStdDev:!l,supportsNullCount:p({normalizationType:l,normalizationField:o,minValue:s,maxValue:c})});m=n.min??null,d=n.max??null}h=function(e,n,t){const a=(n-e)/t,i=[];let l,o=e;for(let e=1;e<=t;e++)l=o+a,l=Number(l.toFixed(16)),i.push([o,e===t?n:l]),o=l;return i}(m??0,d??0,f)}return{min:m,max:d,intervals:h}}function k(e,n){let t=-1;for(let a=e.length-1;a>=0;a--)if(n>=e[a][0]){t=a;break}return t}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2482],{14808:(e,a,i)=>{i.d(a,{Qc:()=>c,WU:()=>d,lt:()=>l});var t=i(19153),n=i(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function s(e=(0,n.Kd)()){let a=(e=e.toLowerCase())in r;if(!a){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],a=!0),a||(e="en")}const[i,t,s="#,##0.###"]=r[e];return{decimal:i,group:t,pattern:s}}function d(e,a){const i=s((a={...a}).locale);a.customs=i;const t=a.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,a,i){const t=(i=i||{}).customs.group,n=i.customs.decimal,r=a.split(";"),s=r[0];if((a=r[e<0?1:0]||"-"+s).includes("%"))e*=100;else if(a.includes("‰"))e*=1e3;else{if(a.includes("¤"))throw new Error("currency notation not supported");if(a.includes("E"))throw new Error("exponential notation not supported")}const d=o,l=s.match(d);if(!l)throw new Error("unable to find a number expression in pattern: "+a);return!1===i.fractional&&(i.places=0),a.replace(d,function(e,a,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const t=a.split("."),n="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;n?r=i.places.substring(n+1):+r>=0||(r=(t[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const s=String(Math.abs(e)).split("."),d=s[1]||"";if(t[1]||i.places){n&&(i.places=i.places.substring(0,n));const e=void 0!==i.places?i.places:t[1]&&t[1].lastIndexOf("0")+1;+e>d.length&&(s[1]=d.padEnd(Number(e),"0")),+r<d.length&&(s[1]=d.substr(0,Number(r)))}else s[1]&&s.pop();const o=t[0].replace(",","");let l=o.indexOf("0");-1!==l&&(l=o.length-l,l>s[0].length&&(s[0]=s[0].padStart(l,"0")),o.includes("#")||(s[0]=s[0].substr(s[0].length-l)));let c,u,m=t[0].lastIndexOf(",");if(-1!==m){c=t[0].length-m-1;const e=t[0].substr(0,m);m=e.lastIndexOf(","),-1!==m&&(u=e.length-m-1)}const T=[];for(let e=s[0];e;){const a=e.length-c;T.push(a>0?e.substr(a):e),e=a>0?e.slice(0,a):"",u&&(c=u,u=void 0)}return s[0]=T.reverse().join(i.group||","),s.join(i.decimal||".")}(e,l[0],{decimal:n,group:t,places:i.places,round:i.round}))}(e,t,a)}const o=/[#0,]*[#0](?:\.0*#*)?/;function l(e){const a=s((e=e||{}).locale),i=e.pattern||a.pattern,n=a.group,r=a.decimal;let d=1;if(i.includes("%"))d/=100;else if(i.includes("‰"))d/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const l=i.split(";");1===l.length&&l.push("-"+l[0]);const c=m(l,(a=>(a="(?:"+(0,t.Qs)(a,".")+")").replace(o,(a=>{const i={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:r,exponent:!1},t=a.split(".");let s=e.places;1===t.length&&1!==d&&(t[1]="###"),1===t.length||0===s?i.fractional=!1:(void 0===s&&(s=e.pattern?t[1].lastIndexOf("0")+1:1/0),s&&null==e.fractional&&(i.fractional=!0),!e.places&&+s<t[1].length&&(s+=","+t[1].length),i.places=s);const o=t[0].split(",");return o.length>1&&(i.groupSize=o.pop().length,o.length>1&&(i.groupSize2=o.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const a=u(e),i=m(e.fractional,(a=>{let i="";return a&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i}),!0);let t=a+i;return i&&(t="(?:(?:"+t+")|(?:"+i+"))"),t+m(e.exponent,(a=>a?"([eE]"+u({signed:e.eSigned})+")":""))}(i)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:d}}function c(e,a){const i=l(a),t=new RegExp("^"+i.regexp+"$").exec(e);if(!t)return NaN;let n=t[1];if(!t[1]){if(!t[2])return NaN;n=t[2],i.factor*=-1}return n=n.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(n)*i.factor}function u(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",m(e.signed,(e=>e?"[-+]":""),!0)+m(e.separator,(a=>{if(!a)return"(?:\\d+)";" "===(a=(0,t.Qs)(a))?a="\\s":" "===a&&(a="\\s\\xa0");const i=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+a+"]\\d{"+n+"})*["+a+"]\\d{"+i+"})";return i-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+a+"]\\d{"+i+"})*)"}),!0)}const m=(e,a,i)=>{if(!(e instanceof Array))return a(e);const t=[];for(let i=0;i<e.length;i++)t.push(a(e[i]));return T(t.join("|"),Boolean(i))},T=(e,a)=>"("+(a?"?:":"")+e+")"},70171:(e,a,i)=>{i.d(a,{G3:()=>o,Kd:()=>d,Ze:()=>m,qe:()=>c});var t=i(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function s(){return r??globalThis.navigator?.language??"en"}function d(){return void 0===n&&(n=s()),n}function o(e=d()){const a=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(e);return a?.[1].toLowerCase()}const l=[];function c(e){return l.push(e),(0,t.kB)((()=>l.splice(l.indexOf(e),1)))}const u=[];function m(e){return u.push(e),(0,t.kB)((()=>l.splice(u.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=s();n!==e&&(n=e,[...u].forEach((a=>{a.call(null,e)})),[...l].forEach((a=>{a.call(null,e)})))}))},70272:(e,a,i)=>{i.d(a,{S6:()=>n,nd:()=>r,u_:()=>t});class t{constructor(e=null,a={},i,t){this.geometry=e,this.attributes=a,this.centroid=i,this.objectId=t,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new t(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function n(e){return!!e.geometry?.coords?.length}class r extends t{}},5428:(e,a,i)=>{i.d(a,{Z:()=>t});class t{constructor(e=[],a=[],i=!1){this.lengths=e??[],this.coords=a??[],this.hasIndeterminateRingOrder=i}static fromRect(e){const[a,i,n,r]=e,s=n-a,d=r-i;return new t([5],[a,i,s,0,0,d,-s,0,0,-d])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,a)=>e+a))}forEachVertex(e){let a=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let i=0;i<this.lengths.length;i++){const t=this.lengths[i];for(let i=0;i<t;i++)e(this.coords[2*(i+a)],this.coords[2*(i+a)+1]);a+=t}}clone(e){return e?(e.set(this.coords),new t(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new t(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},99514:(e,a,i)=>{i.d(a,{Z:()=>o});var t=i(20102),n=i(96674),r=i(92604),s=i(35671),d=i(25031);class o{static fromJSON(e){return new o(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new o(e.fields??[],m(e))}static fromLayerJSON(e){return new o(e.fields??[],m(e))}constructor(e=[],a){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=a?new Map(a):null;const i=[];for(const e of this.fields){const a=e?.name,t=c(a);if(a&&t){const n=l(a);this._fieldsMap.set(a,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(t,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(a)}`),(0,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let a=this._fieldsMap.get(e);return a||(a=this._fieldsMap.get(l(e))??this._normalizedFieldsMap.get(c(e)),a&&this._fieldsMap.set(e,a),a)}getTimeZone(e){const a=this.get(e&&"string"!=typeof e?e.name:e);return a?this._timeZoneByFieldName?this._timeZoneByFieldName.get(a.name):"date"===a.type||"esriFieldTypeDate"===a.type?(r.Z.getLogger("esri.layers.support.FieldsIndex").error(new t.Z("getTimeZone:no-timezone-information",`no time zone information for field '${a.name}'`)),d.pt):u.has(a.type)?d._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){const a=this.get(e);return"time-only"===a?.type||"esriFieldTypeTimeOnly"===a?.type}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function l(e){return e.trim().toLowerCase()}function c(e){return(0,s.q6)(e)?.toLowerCase()??""}const u=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const a=new Map;if(!e.fields)return a;const i=!0===e.datesInUnknownTimezone,{timeInfo:t,editFieldsInfo:n}=e,r=(t?"startField"in t?t.startField:t.startTimeField:"")??"",s=(t?"endField"in t?t.endField:t.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.Jv)(e.dateFieldsTimeReference):null,c=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,d.Jv)(n.dateFieldsTimeReference):o??d.pt:null,m=t?function(e){return"timeZone"in e}(t)?t.timeZone??o:t.timeReference?(0,d.Jv)(t.timeReference):o:null,T=new Map([[l(n?.creationDateField??""),c],[l(n?.editDateField??""),c],[l(r),m],[l(s),m]]);for(const{name:t,type:n}of e.fields)if(u.has(n))a.set(t,d._4);else if("date"!==n&&"esriFieldTypeDate"!==n)a.set(t,null);else if(i)a.set(t,d._4);else{const e=T.get(l(t??""))??o;a.set(t,e)}return a}},84230:(e,a,i)=>{i.d(a,{A2:()=>s,S1:()=>c,fP:()=>o,fb:()=>r,ln:()=>u,oP:()=>l,rQ:()=>d});var t=i(40330),n=i(3172);const r={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(e){const a=e?.type;return"building-scene"===a||"integrated-mesh"===a||"point-cloud"===a||"scene"===a}function d(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){return("feature"===e?.type||"subtype-group"===e?.type)&&"feature-layer"===e.source?.type}async function l(e,a){const i=t.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const r=e.toLowerCase().indexOf("/rest/services");if(-1===r)return null;const s=`${e.substring(0,r)}/rest/info`,d=null!=a?a.signal:null,{data:o}=await(0,n.Z)(s,{query:{f:"json"},responseType:"json",signal:d});return o?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function u(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},25031:(e,a,i)=>{i.d(a,{Jv:()=>l,By:()=>r,mi:()=>o,_4:()=>s,pt:()=>d}),i(84230);const t=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Almaty"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var n=i(17126);const r="system",s="unknown",d="UTC";function o(e,a=!1){return{json:{read:{source:e,reader:(a,i)=>i[e]?l(i[e]):null},write:!!a&&{allowNull:!0,writer(a,i){i[e]=a?function(e){return{timeZoneIANA:e}}(a):null}}}}}function l(e,a=r){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,a=r){if(!e||!t.has(e.timeZone))return a;const i=t.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?i:function(e){const a=n.ou.local().setZone(e),i=Math.min(a.set({month:1,day:1}).offset,a.set({month:5}).offset);return 0===i?"Etc/UTC":`Etc/GMT${n.Qf.instance(-i).formatOffset(0,"narrow")}`}(i)}(e,a):a}}}]);