@arcgis/core 4.24.0-next.20220516 → 4.24.0-next.20220520

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 (434) hide show
  1. package/analysis/LengthDimension.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/02aa9a409ceec694f857.js +1 -0
  5. package/assets/esri/core/workers/chunks/0b859c90debb9fb09786.js +1 -0
  6. package/assets/esri/core/workers/chunks/{99badac039fb3ef82937.js → 10cd3a846e297006f3a3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{92898387584524a8e626.js → 128f461007ef039d4f73.js} +1 -1
  8. package/assets/esri/core/workers/chunks/18b4f015e1d6be7a8965.js +1 -0
  9. package/assets/esri/core/workers/chunks/{ae554c88e862a5761f2e.js → 1c2805cc97dcee70e60d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1ccbd183f3638f2c6c0f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9964386c07e73404cff9.js → 21a169ebef6c9a207eeb.js} +1 -1
  12. package/assets/esri/core/workers/chunks/26646a7545a194e67441.js +1 -0
  13. package/assets/esri/core/workers/chunks/{919d0d8b1c2176760973.js → 2b74415adc8342ce356a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e6b0f74226b9394bfa7a.js → 38a752f8bd456c8912a8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4487fb2d274e49bdb2b0.js +1 -0
  16. package/assets/esri/core/workers/chunks/{82bc24bdc9c6ebaf58c0.js → 48996d5b621ff694369d.js} +1 -1
  17. package/assets/esri/core/workers/chunks/54711b8a98104eeec833.js +1 -0
  18. package/assets/esri/core/workers/chunks/55b2b80b9e3684feaa8e.js +1 -0
  19. package/assets/esri/core/workers/chunks/5606cc14a4d54bc0ba3e.js +1 -0
  20. package/assets/esri/core/workers/chunks/605202e3c29250650492.js +1 -0
  21. package/assets/esri/core/workers/chunks/{aa49841b14c6e6df2a07.js → 66e8a253312d72a8e7f9.js} +1 -1
  22. package/assets/esri/core/workers/chunks/67937dd1030220b81b8f.js +1 -0
  23. package/assets/esri/core/workers/chunks/6e48b0db65bcaaace838.js +1 -0
  24. package/assets/esri/core/workers/chunks/70078370e36e77de220a.js +1 -0
  25. package/assets/esri/core/workers/chunks/7c4b69c7c82cab7a91f9.js +1 -0
  26. package/assets/esri/core/workers/chunks/7e150c38e25fbb8bacaf.js +1 -0
  27. package/assets/esri/core/workers/chunks/824a700ba611e6c4fa9a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{c0e6dbecdbd30066a82c.js → 82b6535a30287c74ba13.js} +1 -1
  29. package/assets/esri/core/workers/chunks/8878bc8ee647f9eadc62.js +1 -0
  30. package/assets/esri/core/workers/chunks/88912dbc2b60623bc6a3.js +1 -0
  31. package/assets/esri/core/workers/chunks/97015a05c44cc206a81a.js +1 -0
  32. package/assets/esri/core/workers/chunks/{c66ac36da6392b6bf331.js → 9890f2bd8d9b7047e9c8.js} +1 -1
  33. package/assets/esri/core/workers/chunks/9e12f192f236501e40c5.js +1 -0
  34. package/assets/esri/core/workers/chunks/a5ee17cdc9eb23ebeaf0.js +1 -0
  35. package/assets/esri/core/workers/chunks/a7a430ccf0f732c97bab.js +1 -0
  36. package/assets/esri/core/workers/chunks/b09f7fd69658cbc33743.js +1 -0
  37. package/assets/esri/core/workers/chunks/{44403c3ecc7d949a577c.js → b362d1ae9a87397ce2c5.js} +83 -77
  38. package/assets/esri/core/workers/chunks/bc31a14919558a5993ab.js +1 -0
  39. package/assets/esri/core/workers/chunks/{46411f32b29a0e783105.js → c23b3901bf93ae5e1429.js} +1 -1
  40. package/assets/esri/core/workers/chunks/c5fadaa98749ffb490f5.js +1 -0
  41. package/assets/esri/core/workers/chunks/ca035cb79695ce94f46f.js +1 -0
  42. package/assets/esri/core/workers/chunks/d2cdb2379c3eeb06f886.js +1 -0
  43. package/assets/esri/core/workers/chunks/{0ecaa28b8bff1d779d66.js → d6315aa9eedf79a7bca1.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{86ce33b38887e7dec7f9.js → db0c40ed1c2e923c6be0.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{6281b15009712a5dee3c.js → e136355e15c9b5fd36cf.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{a508d936296185456b9a.js → e150cd6da55e02e7e83d.js} +1 -1
  47. package/assets/esri/core/workers/chunks/f1c313ea55222de59780.js +1 -0
  48. package/assets/esri/core/workers/chunks/f5089121d845ec594008.js +1 -0
  49. package/assets/esri/core/workers/chunks/f6aaee4db0bd5096164c.js +1 -0
  50. package/assets/esri/core/workers/chunks/f87403249f57b13a172a.js +1 -0
  51. package/assets/esri/core/workers/chunks/f9d83a48b69c5728feba.js +1 -0
  52. package/assets/esri/core/workers/chunks/fe18d2d251a5ad80eb54.js +1 -0
  53. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  54. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  55. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  56. package/assets/esri/themes/base/_color.scss +3 -0
  57. package/assets/esri/themes/base/_core.scss +2 -0
  58. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +24 -0
  59. package/assets/esri/themes/base/widgets/_Daylight.scss +75 -129
  60. package/assets/esri/themes/base/widgets/_FloorFilter.scss +3 -3
  61. package/assets/esri/themes/base/widgets/_LayerList.scss +24 -0
  62. package/assets/esri/themes/base/widgets/_NumericalFeedbackControls.scss +23 -0
  63. package/assets/esri/themes/base/widgets/_SnappingControls.scss +2 -7
  64. package/assets/esri/themes/base/widgets/_Weather.scss +10 -3
  65. package/assets/esri/themes/base/widgets/_Widget.scss +0 -8
  66. package/assets/esri/themes/dark/main.css +1 -1
  67. package/assets/esri/themes/light/main.css +1 -1
  68. package/assets/esri/themes/light/view.css +1 -1
  69. package/assets/esri/widgets/Daylight/t9n/Daylight.json +1 -1
  70. package/assets/esri/widgets/Daylight/t9n/Daylight_ar.json +1 -1
  71. package/assets/esri/widgets/Daylight/t9n/Daylight_bg.json +1 -1
  72. package/assets/esri/widgets/Daylight/t9n/Daylight_bs.json +1 -1
  73. package/assets/esri/widgets/Daylight/t9n/Daylight_ca.json +1 -1
  74. package/assets/esri/widgets/Daylight/t9n/Daylight_cs.json +1 -1
  75. package/assets/esri/widgets/Daylight/t9n/Daylight_da.json +1 -1
  76. package/assets/esri/widgets/Daylight/t9n/Daylight_de.json +1 -1
  77. package/assets/esri/widgets/Daylight/t9n/Daylight_el.json +1 -1
  78. package/assets/esri/widgets/Daylight/t9n/Daylight_en.json +1 -1
  79. package/assets/esri/widgets/Daylight/t9n/Daylight_es.json +1 -1
  80. package/assets/esri/widgets/Daylight/t9n/Daylight_et.json +1 -1
  81. package/assets/esri/widgets/Daylight/t9n/Daylight_fi.json +1 -1
  82. package/assets/esri/widgets/Daylight/t9n/Daylight_fr.json +1 -1
  83. package/assets/esri/widgets/Daylight/t9n/Daylight_he.json +1 -1
  84. package/assets/esri/widgets/Daylight/t9n/Daylight_hr.json +1 -1
  85. package/assets/esri/widgets/Daylight/t9n/Daylight_hu.json +1 -1
  86. package/assets/esri/widgets/Daylight/t9n/Daylight_id.json +1 -1
  87. package/assets/esri/widgets/Daylight/t9n/Daylight_it.json +1 -1
  88. package/assets/esri/widgets/Daylight/t9n/Daylight_ja.json +1 -1
  89. package/assets/esri/widgets/Daylight/t9n/Daylight_ko.json +1 -1
  90. package/assets/esri/widgets/Daylight/t9n/Daylight_lt.json +1 -1
  91. package/assets/esri/widgets/Daylight/t9n/Daylight_lv.json +1 -1
  92. package/assets/esri/widgets/Daylight/t9n/Daylight_nb.json +1 -1
  93. package/assets/esri/widgets/Daylight/t9n/Daylight_nl.json +1 -1
  94. package/assets/esri/widgets/Daylight/t9n/Daylight_pl.json +1 -1
  95. package/assets/esri/widgets/Daylight/t9n/Daylight_pt-BR.json +1 -1
  96. package/assets/esri/widgets/Daylight/t9n/Daylight_pt-PT.json +1 -1
  97. package/assets/esri/widgets/Daylight/t9n/Daylight_ro.json +1 -1
  98. package/assets/esri/widgets/Daylight/t9n/Daylight_ru.json +1 -1
  99. package/assets/esri/widgets/Daylight/t9n/Daylight_sk.json +1 -1
  100. package/assets/esri/widgets/Daylight/t9n/Daylight_sl.json +1 -1
  101. package/assets/esri/widgets/Daylight/t9n/Daylight_sr.json +1 -1
  102. package/assets/esri/widgets/Daylight/t9n/Daylight_sv.json +1 -1
  103. package/assets/esri/widgets/Daylight/t9n/Daylight_th.json +1 -1
  104. package/assets/esri/widgets/Daylight/t9n/Daylight_tr.json +1 -1
  105. package/assets/esri/widgets/Daylight/t9n/Daylight_uk.json +1 -1
  106. package/assets/esri/widgets/Daylight/t9n/Daylight_vi.json +1 -1
  107. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-CN.json +1 -1
  108. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-HK.json +1 -1
  109. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-TW.json +1 -1
  110. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  111. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  112. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  113. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  114. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  115. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  116. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  117. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  118. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  119. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  120. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  121. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  122. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  123. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  124. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  125. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  126. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  127. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  128. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  129. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  130. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  131. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  132. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  133. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  134. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  135. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  136. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  137. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  138. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  139. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  140. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  141. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  142. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  143. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  144. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  145. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  146. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  147. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  148. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  149. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  150. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  151. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls.json +1 -0
  152. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ar.json +1 -0
  153. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bg.json +1 -0
  154. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bs.json +1 -0
  155. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ca.json +1 -0
  156. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_cs.json +1 -0
  157. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_da.json +1 -0
  158. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_de.json +1 -0
  159. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_el.json +1 -0
  160. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_en.json +1 -0
  161. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_es.json +1 -0
  162. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_et.json +1 -0
  163. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fi.json +1 -0
  164. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fr.json +1 -0
  165. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_he.json +1 -0
  166. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hr.json +1 -0
  167. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hu.json +1 -0
  168. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_id.json +1 -0
  169. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_it.json +1 -0
  170. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ja.json +1 -0
  171. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ko.json +1 -0
  172. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lt.json +1 -0
  173. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lv.json +1 -0
  174. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nb.json +1 -0
  175. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nl.json +1 -0
  176. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pl.json +1 -0
  177. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-BR.json +1 -0
  178. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-PT.json +1 -0
  179. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ro.json +1 -0
  180. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ru.json +1 -0
  181. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sk.json +1 -0
  182. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sl.json +1 -0
  183. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sr.json +1 -0
  184. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sv.json +1 -0
  185. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_th.json +1 -0
  186. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_tr.json +1 -0
  187. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_uk.json +1 -0
  188. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_vi.json +1 -0
  189. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-CN.json +1 -0
  190. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-HK.json +1 -0
  191. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-TW.json +1 -0
  192. package/chunks/BlendLayers.glsl.js +6 -9
  193. package/chunks/ComponentShader.glsl.js +68 -51
  194. package/chunks/DefaultMaterial.glsl.js +41 -35
  195. package/chunks/RasterColorizer.glsl.js +13 -13
  196. package/chunks/RealisticTree.glsl.js +41 -41
  197. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  198. package/chunks/arcgis-knowledge-client-core.js +1 -1
  199. package/chunks/geometryEngineBase.js +1 -1
  200. package/chunks/vxlLayer.js +1 -1
  201. package/core/CollectionFlattener.js +1 -1
  202. package/core/Identifiable.js +1 -1
  203. package/core/promiseUtils.js +1 -1
  204. package/core/quantityUtils.js +1 -1
  205. package/core/support/WatchUpdatingTracking.js +1 -1
  206. package/geohash/GeohashTree.js +1 -1
  207. package/geometry/projection.js +1 -1
  208. package/geometry/support/heightModelInfoUtils.js +1 -1
  209. package/interfaces.d.ts +236 -150
  210. package/layers/LineOfSightLayer.d.ts +4 -0
  211. package/layers/LineOfSightLayer.js +5 -0
  212. package/layers/SceneLayer.js +1 -1
  213. package/layers/VoxelWasmPerSceneView.js +1 -1
  214. package/layers/graphics/data/projectionSupport.js +1 -1
  215. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  216. package/layers/mixins/ArcGISImageService.js +1 -1
  217. package/layers/mixins/ImageryTileMixin.js +1 -1
  218. package/layers/mixins/refresh.js +1 -1
  219. package/layers/support/MediaElementBase.js +1 -1
  220. package/layers/support/PolygonFilter.d.ts +4 -0
  221. package/layers/support/PolygonFilter.js +5 -0
  222. package/layers/support/RasterJobHandler.js +1 -1
  223. package/layers/support/RasterWorker.js +1 -1
  224. package/layers/support/layerOriginUtils.js +1 -1
  225. package/package.json +1 -1
  226. package/renderers/FlowRenderer.js +1 -1
  227. package/rest/knowledgeGraph/GraphQuery.js +1 -1
  228. package/rest/knowledgeGraph/GraphQueryResult.js +1 -1
  229. package/rest/knowledgeGraph/GraphQueryStreaming.js +5 -0
  230. package/rest/knowledgeGraph/GraphQueryStreamingResult.js +5 -0
  231. package/rest/knowledgeGraph/GraphSearch.js +1 -1
  232. package/rest/knowledgeGraph/GraphSearchStreaming.js +5 -0
  233. package/rest/knowledgeGraph/wasmInterface/KnowledgeWasmInterface.js +5 -0
  234. package/rest/knowledgeGraph/wasmInterface/WasmQueryWrapperInterfaces.js +1 -1
  235. package/rest/knowledgeGraph/wasmInterface/{knowledgeWasmDecoderAccess.js → knowledgeWasmAccess.js} +0 -0
  236. package/rest/knowledgeGraph/wasmInterface/queryToWasmEncodedFactories.js +5 -0
  237. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  238. package/rest/knowledgeGraph/wasmInterface/wasmToGeometryFactories.js +1 -1
  239. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  240. package/rest/knowledgeGraphService.js +1 -1
  241. package/smartMapping/statistics/support/WorkerClient.js +1 -1
  242. package/smartMapping/statistics/support/statsWorker.js +1 -1
  243. package/smartMapping/statistics/support/utils.js +1 -1
  244. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  245. package/smartMapping/support/adapters/support/utils.js +1 -1
  246. package/support/revision.js +1 -1
  247. package/symbols/cim/CIMSymbolHelper.js +1 -1
  248. package/symbols/cim/Rasterizer.js +1 -1
  249. package/symbols/cim/cimAnalyzer.js +1 -1
  250. package/views/2d/engine/flow/BrushFlow.js +1 -1
  251. package/views/2d/engine/flow/FlowDisplayData.js +1 -1
  252. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  253. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  254. package/views/2d/engine/flow/FlowView2D.js +1 -1
  255. package/views/2d/engine/flow/createFlowStyle.js +5 -0
  256. package/views/2d/engine/flow/dataUtils.js +1 -1
  257. package/views/2d/engine/flow/styles/Imagery.js +5 -0
  258. package/views/2d/engine/flow/styles/Particles.js +5 -0
  259. package/views/2d/engine/flow/styles/Stack.js +5 -0
  260. package/views/2d/engine/flow/styles/Streamlines.js +5 -0
  261. package/views/2d/engine/flow/utils.js +5 -0
  262. package/views/2d/engine/webgl/Overlay.js +1 -1
  263. package/views/2d/engine/webgl/definitions.js +1 -1
  264. package/views/2d/engine/webgl/effects/highlight/parameters.js +1 -1
  265. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  266. package/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate.js +1 -1
  267. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  268. package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
  269. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  270. package/views/2d/layerViewModuleImportUtils.js +1 -1
  271. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  272. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  273. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  274. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  275. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  276. package/views/2d/layers/KMLLayerView2D.js +1 -1
  277. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  278. package/views/2d/layers/MediaLayerView2D.js +1 -1
  279. package/views/2d/layers/RouteLayerView2D.js +1 -1
  280. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  281. package/views/2d/layers/features/support/BinStore.js +1 -1
  282. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  283. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  284. package/views/3d/analysis/Dimensioning/DimensioningVisualization.js +1 -1
  285. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  286. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  287. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  288. package/views/3d/analysis/Dimensioning/settings.js +1 -1
  289. package/views/3d/analysis/DimensioningAnalysisView3D.js +1 -1
  290. package/views/3d/analysis/LengthDimensionResult.js +1 -1
  291. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  292. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  293. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  294. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  295. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  296. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  297. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  298. package/views/3d/environment/SnowyWeather.js +1 -1
  299. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  300. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  301. package/views/3d/interactive/editingTools/manipulations/MoveXYGraphicManipulation.js +1 -1
  302. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  303. package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
  304. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  305. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  306. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  307. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  308. package/views/3d/layerViewModuleImportUtils.js +1 -1
  309. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  310. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  311. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  312. package/views/3d/layers/GraphicsView3D.js +1 -1
  313. package/views/3d/layers/LineOfSightLayerView3D.js +5 -0
  314. package/views/3d/layers/MediaLayerView3D.js +1 -1
  315. package/views/3d/layers/RouteLayerView3D.js +1 -1
  316. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  317. package/views/3d/layers/SceneLayerView3D.js +1 -1
  318. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  319. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  320. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  321. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  322. package/views/3d/terrain/RasterTile.js +1 -1
  323. package/views/3d/terrain/TextureReference.js +1 -1
  324. package/views/3d/terrain/TileCompositor.js +1 -1
  325. package/views/3d/terrain/TileRenderer.js +1 -1
  326. package/views/3d/terrain/terrainUtils.js +1 -1
  327. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  328. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  329. package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
  330. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  331. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +2 -2
  332. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +14 -21
  333. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +8 -0
  334. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  335. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  336. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  337. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  338. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  339. package/views/MapView.js +1 -1
  340. package/views/PopupView.js +1 -1
  341. package/views/SceneView.js +1 -1
  342. package/views/ToolViewManager.js +1 -1
  343. package/views/analysis/analysisViewUtils.js +5 -0
  344. package/views/draw/DrawAction.js +1 -1
  345. package/views/draw/DrawOperation.js +1 -1
  346. package/views/draw/support/Reshape.js +1 -1
  347. package/views/interactive/tooltip/ExtentTooltipInfos.js +1 -1
  348. package/views/interactive/tooltip/NumericalFeedbackOptions.d.ts +4 -0
  349. package/views/interactive/tooltip/NumericalFeedbackOptions.js +5 -0
  350. package/views/interactive/tooltip/ReshapeTooltipInfos.js +5 -0
  351. package/views/interactive/tooltip/SegmentLabelOptions.js +5 -0
  352. package/views/interactive/tooltip/TooltipOptions.js +1 -1
  353. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +5 -0
  354. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  355. package/views/support/hitTestSelectUtils.js +1 -1
  356. package/views/ui/DefaultUI.js +1 -1
  357. package/widgets/BasemapGallery.js +1 -1
  358. package/widgets/BasemapLayerList.js +1 -1
  359. package/widgets/Bookmarks.js +1 -1
  360. package/widgets/Daylight/DaylightViewModel.js +1 -1
  361. package/widgets/Daylight/VisibleElements.js +5 -0
  362. package/widgets/Daylight/css.js +5 -0
  363. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  364. package/widgets/Daylight.js +1 -1
  365. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  366. package/widgets/Editor/workflowUtils.js +1 -1
  367. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  368. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  369. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  370. package/widgets/LayerList/ListItem.js +1 -1
  371. package/widgets/LayerList.js +1 -1
  372. package/widgets/Popup/PopupViewModel.js +1 -1
  373. package/widgets/Popup.js +1 -1
  374. package/widgets/Print/PrintViewModel.js +1 -1
  375. package/widgets/Search.js +1 -1
  376. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  377. package/widgets/Sketch/SketchViewModel.js +1 -1
  378. package/widgets/Slider.js +1 -1
  379. package/widgets/Weather/VisibleElements.js +1 -1
  380. package/widgets/Weather/WeatherViewModel.js +1 -1
  381. package/widgets/Weather/css.js +1 -1
  382. package/widgets/Weather/enums.js +1 -1
  383. package/widgets/Weather.js +1 -1
  384. package/widgets/Widget.js +1 -1
  385. package/widgets/support/DatePicker.js +1 -1
  386. package/widgets/support/NumericalFeedbackControls/NumericalFeedbackControlsViewModel.js +5 -0
  387. package/widgets/support/NumericalFeedbackControls/VisibleElements.js +5 -0
  388. package/widgets/support/NumericalFeedbackControls/css.js +5 -0
  389. package/widgets/support/NumericalFeedbackControls.js +5 -0
  390. package/widgets/support/SnappingControls.js +1 -1
  391. package/widgets/support/timeWidgetUtils.js +1 -1
  392. package/analysis/DimensioningAnalysis.d.ts +0 -4
  393. package/analysis/LengthDimension.d.ts +0 -4
  394. package/assets/esri/core/workers/chunks/06c1bae22fa9698e9427.js +0 -1
  395. package/assets/esri/core/workers/chunks/161ad66d11d80a9048bb.js +0 -1
  396. package/assets/esri/core/workers/chunks/1d91aa745b49b2ab36cf.js +0 -1
  397. package/assets/esri/core/workers/chunks/23da29c22825c242c5af.js +0 -1
  398. package/assets/esri/core/workers/chunks/263a99045803b278f56d.js +0 -1
  399. package/assets/esri/core/workers/chunks/2798a7dc75a236c1c962.js +0 -1
  400. package/assets/esri/core/workers/chunks/2aede0d1dcac8592436b.js +0 -1
  401. package/assets/esri/core/workers/chunks/329b005a06c0e7f0e9f1.js +0 -1
  402. package/assets/esri/core/workers/chunks/366e5c1abd1ab6d3e548.js +0 -1
  403. package/assets/esri/core/workers/chunks/40b11eea270f6688ff9c.js +0 -1
  404. package/assets/esri/core/workers/chunks/40d5ee3105c5468c307b.js +0 -1
  405. package/assets/esri/core/workers/chunks/48810a9391b787f195ed.js +0 -1
  406. package/assets/esri/core/workers/chunks/49baead4baf2766a2ae7.js +0 -1
  407. package/assets/esri/core/workers/chunks/49d75dc1c42dfdc3c3d3.js +0 -1
  408. package/assets/esri/core/workers/chunks/5210f0b42dba27945226.js +0 -1
  409. package/assets/esri/core/workers/chunks/5b4efe0014162f777534.js +0 -1
  410. package/assets/esri/core/workers/chunks/5cf2064bfd9d0847d9ec.js +0 -1
  411. package/assets/esri/core/workers/chunks/5edb60bed8f151431d3e.js +0 -1
  412. package/assets/esri/core/workers/chunks/66f627d68dbb0fdb725f.js +0 -1
  413. package/assets/esri/core/workers/chunks/6d7e2a23a0a5dd9ded1d.js +0 -1
  414. package/assets/esri/core/workers/chunks/7e5c22b5a32ac74b1b6e.js +0 -1
  415. package/assets/esri/core/workers/chunks/8298328526da62398e1b.js +0 -1
  416. package/assets/esri/core/workers/chunks/8b497d9c37a8f577a467.js +0 -1
  417. package/assets/esri/core/workers/chunks/967af0aa4dc4da032fdc.js +0 -1
  418. package/assets/esri/core/workers/chunks/a57cace73522b95fffd8.js +0 -1
  419. package/assets/esri/core/workers/chunks/ae5ce55cd1a32525f101.js +0 -1
  420. package/assets/esri/core/workers/chunks/aeeb364b7c1876f6e7db.js +0 -1
  421. package/assets/esri/core/workers/chunks/b426f7b4c3dc60a366f6.js +0 -1
  422. package/assets/esri/core/workers/chunks/b7d7ad127f8939cbdec2.js +0 -1
  423. package/assets/esri/core/workers/chunks/c6929ab080e934047a21.js +0 -1
  424. package/assets/esri/core/workers/chunks/dd6c9a114ad38cf622ba.js +0 -1
  425. package/assets/esri/core/workers/chunks/e6f76f62cf58fb1e67c6.js +0 -1
  426. package/assets/esri/core/workers/chunks/fdafc815fbd51ee17f13.js +0 -1
  427. package/layers/AnalysisLayer.js +0 -5
  428. package/views/2d/engine/flow/FlowGLResources.js +0 -5
  429. package/views/2d/engine/flow/FlowStyle.js +0 -5
  430. package/views/2d/engine/flow/flowRendererUtils.js +0 -5
  431. package/views/3d/analysis/DimensioningAnalysisView3D.d.ts +0 -4
  432. package/views/3d/analysis/LengthDimensionResult.d.ts +0 -4
  433. package/views/3d/layers/AnalysisLayerView3D.js +0 -5
  434. package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +0 -8
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import"../geometry.js";import{lengthDimensionAxes as o}from"./dimensionUtils.js";import{Clonable as e}from"../core/Clonable.js";import{isNone as r,isSome as s}from"../core/maybe.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import l from"../geometry/Point.js";let a=class extends e{constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.axis="horizontal",this.offset=0,this.heading=0}get extent(){if(r(this.startPoint))return null;const t=p.fromPoint(this.startPoint);return s(this.endPoint)&&t.union(p.fromPoint(this.endPoint)),t}};t([i({type:["length"]})],a.prototype,"type",void 0),t([i({type:l})],a.prototype,"startPoint",void 0),t([i({type:l})],a.prototype,"endPoint",void 0),t([i({type:o,nonNullable:!0})],a.prototype,"axis",void 0),t([i({type:Number,nonNullable:!0})],a.prototype,"offset",void 0),t([i({type:Number,nonNullable:!0})],a.prototype,"heading",void 0),t([i({readOnly:!0})],a.prototype,"extent",null),a=t([n("esri.analysis.LengthDimension")],a);const m=a;export{m as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import"../geometry.js";import{lengthDimensionAxes as o}from"./dimensionUtils.js";import{Clonable as r}from"../core/Clonable.js";import{cyclicalDeg as e}from"../core/Cyclical.js";import{isNone as s,isSome as i}from"../core/maybe.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as p}from"../core/accessorSupport/decorators/cast.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{ensureNumber as a}from"../core/accessorSupport/ensureType.js";import l from"../geometry/Extent.js";import c from"../geometry/Point.js";let y=class extends r{constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.axis="horizontal",this.offset=0,this.heading=0}get extent(){if(s(this.startPoint))return null;const t=l.fromPoint(this.startPoint);return i(this.endPoint)&&t.union(l.fromPoint(this.endPoint)),t}};t([n({type:["length"]})],y.prototype,"type",void 0),t([n({type:c})],y.prototype,"startPoint",void 0),t([n({type:c})],y.prototype,"endPoint",void 0),t([n({type:o,nonNullable:!0})],y.prototype,"axis",void 0),t([n({type:Number,nonNullable:!0})],y.prototype,"offset",void 0),t([n({type:Number,nonNullable:!0}),p((t=>e.normalize(a(t),0,!0)))],y.prototype,"heading",void 0),t([n({readOnly:!0})],y.prototype,"extent",null),y=t([m("esri.analysis.LengthDimension")],y);const u=y;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Graphic.js";import t from"../../../request.js";import i from"../../Attachment.js";import r from"../support/FeatureSet.js";import s from"../support/IdSet.js";import{defaultMaxRecords as a,stableStringify as n,FeatureServiceDatabaseType as l,IdState as o,extractServiceUrl as u}from"../support/shared.js";import{toWhereClause as d,isSingleField as h}from"../support/sqlUtils.js";import{decodeStatType as c}from"../support/stats.js";import{createMD5Hash as p,outputTypes as y}from"../../../core/MD5.js";import{id as f}from"../../../kernel.js";import{fromJSON as _}from"../../../geometry/support/jsonUtils.js";import m from"../../../layers/FeatureLayer.js";import{convertToFeatureSet as g}from"../../../layers/graphics/featureConversionUtils.js";import"../../../core/Error.js";import"../../../core/has.js";import"../../../core/promiseUtils.js";import"../../../layers/support/source/DataLayerSource.js";import{executeQueryJSON as F}from"../../../rest/query/executeQueryJSON.js";import"../../../core/arrayUtils.js";import"../../../core/urlUtils.js";import"../../../core/unitUtils.js";import"../../../geometry/support/spatialReferenceUtils.js";import{executeQueryPBF as S}from"../../../rest/query/operations/query.js";import b from"../../../rest/support/FeatureSet.js";import R from"../../../rest/support/Query.js";import"../../../rest/query/support/AttachmentInfo.js";import"../../../rest/support/AttachmentQuery.js";import{executeForCount as w}from"../../../rest/query/executeForCount.js";import"../../../geometry.js";import{executeForIds as D}from"../../../rest/query/executeForIds.js";import"../../../rest/support/RelationshipQuery.js";import"../../../geometry/support/normalizeUtils.js";import"../../../rest/support/TopFeaturesQuery.js";import{OptimizedFeatureSetParserContext as x}from"../../../rest/query/operations/pbfOptimizedFeatureSet.js";import I from"../../../rest/support/StatisticDefinition.js";import q from"../../Dictionary.js";class P extends r{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return a}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=n(e.toJSON());return p(t,y.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}else;if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=l.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=l.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=l.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=l.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return o.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new R;t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(i){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}async queryPBF(e){e.quantizationParameters={mode:"edit"};const t=await S(this._layer.parsedUrl,e,new x({}));return b.fromJSON(g(t.data)).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?this._layer.gdbVersion:"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title,source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){const i="execute"===t?F:"executeForCount"===t?w:D,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(t),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}async _getFilteredSet(e,t,i,r,a){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e){return new s([],[],!0,null)}if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,a);let l="",o=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(l=r.constructClause(),o=!0);const u=new R;u.where=null===i?null===t?"1=1":"":d(i,n),this._requestStandardised&&(u.sqlFormat="standard"),u.spatialRelationship=this._makeRelationshipEnum(e),u.outSpatialReference=this.spatialReference,u.orderByFields=""!==l?l.split(","):null,u.geometry=null===t?null:t,u.relationParameter=this._makeRelationshipParam(e);let h=await this.executeQuery(u,"executeForIds");null===h&&(h=[]),this._checkCancelled(a);return new s([],h,o,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,a){let n="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=await this.databaseType();let u=null===i?null===t?"1=1":"":d(i,o);this._layer.definitionExpression&&this._useDefinitionExpression&&(u=""!==u?"(("+this._layer.definitionExpression+") AND ("+u+"))":this._layer.definitionExpression);let h=this._maxQueryRate();const c=this._layer.capabilities.query.maxRecordCount;void 0!==c&&c<h&&(h=c);let p=null;if(!0===this._pageJustIds)p=new s([],["GETPAGES"],l,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:h,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);p=new s([],["GETPAGES"],l,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:h,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(p,h,0,1,a),p}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,a=e.pagesDefinition.internal.lastPage,n=new R;this._requestStandardised&&(n.sqlFormat="standard"),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==a)return"done";for(let o=0;o<l.features.length;o++)e.pagesDefinition.internal.set[s+o]=l.features[o].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let o=0;o<l.features.length;o++)this._featureCache[l.features[o].attributes[this._layer.objectIdField]]=l.features[o];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const r of t)if(r.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let o=e._lastFetchedIndex;o<e._known.length;o++){if(e._lastFetchedIndex+=1,a++,void 0===this._featureCache[e._known[o]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[o]]){const r=t._featureMap[e._known[o]];null!==r&&(i=!0,this._featureCache[e._known[o]]=r)}}if(!1===i&&(e._known[o]!==t&&s.push(e._known[o]),s.length>=this._maxProcessingRate()-1))break}if(a>=i&&0===s.length)break}if(0===s.length)return"success";const n=new R;this._requestStandardised&&(n.sqlFormat="standard"),n.objectIds=s,n.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),n.returnGeometry=!0,!0===this._removeGeometry&&(n.returnGeometry=!1),n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new Error(l.error);for(let o=0;o<l.features.length;o++)this._featureCache[l.features[o].attributes[this._layer.objectIdField]]=l.features[o];return"success"}async _getDistinctPages(e,t,i,r,s,a,n,l,o){await this._ensureLoaded();const u=await this.databaseType();let h=i.parseTree.column;for(let d=0;d<this._layer.fields.length;d++)if(this._layer.fields[d].name.toLowerCase()===h.toLowerCase()){h=this._layer.fields[d].name;break}const c=new R;this._requestStandardised&&(c.sqlFormat="standard");let p=null===a?null===s?"1=1":"":d(a,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(p=""!==p?"(("+this._layer.definitionExpression+") AND ("+p+"))":this._layer.definitionExpression),c.where=p,c.spatialRelationship=this._makeRelationshipEnum(r),c.relationParameter=this._makeRelationshipParam(r),c.geometry=null===s?null:s,c.returnDistinctValues=!0,c.returnGeometry=!1,c.outFields=[h];const y=await this.executeQuery(c,"execute");if(this._checkCancelled(o),!y.hasOwnProperty("features"))throw new Error("Unnexected Result querying statistics from layer");let f=!1;for(let d=0;d<this._layer.fields.length;d++)if(this._layer.fields[d].name===h){"date"===this._layer.fields[d].type&&(f=!0);break}for(let d=0;d<y.features.length;d++){if(f){const e=y.features[d].attributes[h];null!==e?l.push(new Date(e)):l.push(e)}else l.push(y.features[d].attributes[h]);if(l.length>=n)break}if(0===y.features.length)return l;if(y.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<n){return{calculated:!0,result:await this._getDistinctPages(e+y.features.length,t,i,r,s,a,n,l,o)}}return l}async _distinctStat(e,t,i,r,s,a,n){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,a,[],n)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType(),a=new R;if(this._requestStandardised&&(a.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===r?null===i?"1=1":"":d(r,s);this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),a.where=n,a.where=n,a.spatialRelationship=this._makeRelationshipEnum(t),a.relationParameter=this._makeRelationshipParam(t),a.geometry=null===i?null:i,a.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(a,"executeForCount")}}async _stats(e,t,i,r,s,a,n){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,i,r,s):{calculated:!1};if(!1===o||!1===h(t)&&!1===l||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n);if("distinct"===e)return!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n):this._distinctStat(e,t,i,r,s,a,n);const p=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const y=new R;this._requestStandardised&&(y.sqlFormat="standard");let f=null===s?null===r?"1=1":"":d(s,p);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),y.where=f,y.spatialRelationship=this._makeRelationshipEnum(i),y.relationParameter=this._makeRelationshipParam(i),y.geometry=null===r?null:r;const _=new I;_.statisticType=c(e),_.onStatisticField=d(t,p),_.outStatisticFieldName="ARCADE_STAT_RESULT",y.returnGeometry=!1;let m="ARCADE_STAT_RESULT";y.outStatistics=[_];const g=await this.executeQuery(y,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new Error("Unnexected Result querying statistics from layer");let F=!1;for(let d=0;d<g.fields.length;d++)if("ARCADE_STAT_RESULT"===g.fields[d].name.toUpperCase()){m=g.fields[d].name,"date"===g.fields[d].type&&(F=!0);break}if(F){let e=g.features[0].attributes[m];return null!==e&&(e=new Date(g.features[0].attributes[m])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[m]}}_stat(e,t,i,r,s,a,n){return this._stats(e,t,i,r,s,a,n)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(i=!0),i)for(let s=0;s<t.length-1;s++)null!==t[s].workingexpr&&(!1===t[s].workingexpr.isStandardized||!1===h(t[s].workingexpr)&&!1===r)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,a,n,l){await this._ensureLoaded();const o=await this.databaseType();let u="",h=!1,c=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(u=n.constructClause(),c=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(c=!1,h=!0,u=this._layer.objectIdField);const p=[];for(let s=0;s<t.length;s++){const e=new I;e.onStatisticField=null!==t[s].workingexpr?d(t[s].workingexpr,o):"",e.outStatisticFieldName=t[s].field,e.statisticType=t[s].toStatisticsName(),p.push(e)}""===u&&(u=e.join(","));let y=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<y&&(y=f);let _=null===a?null===r?"1=1":"":d(a,o);this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression);return new s([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:h,generatedOid:l,resultRecordCount:y,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:p,geometry:null===r?null:r,where:_,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(t,i,r){let s=t.pagesDefinition.where;!0===t.pagesDefinition.useOIDpagination&&(s=""!==s?"("+s+") AND ("+t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString()+")":t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString());const a=t.pagesDefinition.internal.lastRetrieved,n=a,l=t.pagesDefinition.internal.lastPage,o=new R;if(this._requestStandardised&&(o.sqlFormat="standard"),o.where=s,o.spatialRelationship=t.pagesDefinition.spatialRel,o.relationParameter=t.pagesDefinition.relationParam,o.outFields=t.pagesDefinition.outFields,o.outStatistics=t.pagesDefinition.outStatistics,o.geometry=t.pagesDefinition.geometry,o.groupByFieldsForStatistics=t.pagesDefinition.groupByFieldsForStatistics,o.num=t.pagesDefinition.resultRecordCount,o.start=t.pagesDefinition.internal.lastPage,o.returnGeometry=t.pagesDefinition.returnGeometry,o.orderByFields=""!==t.pagesDefinition.orderByFields?t.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(r),!u.hasOwnProperty("features"))throw new Error("Unnexected Result querying aggregates from layer");const d=[];if(t.pagesDefinition.internal.lastPage!==l)return[];for(let e=0;e<u.features.length;e++)t.pagesDefinition.internal.set[n+e]=u.features[e].attributes[t.pagesDefinition.generatedOid];for(let h=0;h<u.features.length;h++)d.push(new e({attributes:u.features[h].attributes,geometry:null}));return!0===t.pagesDefinition.useOIDpagination?0===u.features.length?t.pagesDefinition.internal.fullyResolved=!0:t.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[t.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==t.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(t.pagesDefinition.internal.fullyResolved=!0),t.pagesDefinition.internal.lastRetrieved=a+u.features.length,t.pagesDefinition.internal.lastPage+=t.pagesDefinition.resultRecordCount,d}static create(e,t,i,r,s){const a=new m({url:e,outFields:null===t?["*"]:t});return new P({layer:a,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return u(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,a){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:a};(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(n.attachmentTypes=s),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"});const l=await this._layer.queryAttachments(n),o=[];return l&&l[e]&&l[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let s=null;a&&t.exifInfo&&(s=q.convertJsonToArcade(t.exifInfo,!0)),o.push(new i(t.id,t.name,t.contentType,t.size,r,s))})),o}return[]}async queryRelatedFeatures(i){const r={f:"json",relationshipId:i.relationshipId.toString(),definitionExpression:i.where,outFields:i.outFields.join(","),returnGeometry:i.returnGeometry.toString()};void 0!==i.resultOffset&&null!==i.resultOffset&&(r.resultOffset=i.resultOffset.toString()),void 0!==i.resultRecordCount&&null!==i.resultRecordCount&&(r.resultRecordCount=i.resultRecordCount.toString()),i.orderByFields&&(r.orderByFields=i.orderByFields.join(",")),i.objectIds.length>0&&(r.objectIds=i.objectIds.join(",")),i.outSpatialReference&&(r.outSR=JSON.stringify(i.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const s=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(s.data){const t={},i=s.data;if(i&&i.relatedRecordGroups){const r=i.spatialReference;for(const s of i.relatedRecordGroups){const a=s.objectId,n=[];for(const t of s.relatedRecords){t.geometry&&(t.geometry.spatialReference=r);const i=new e({geometry:t.geometry?_(t.geometry):null,attributes:t.attributes});n.push(i)}t[a]={features:n,exceededTransferLimit:!0===i.exceededTransferLimit}}}return t}throw new Error("Invalid Request")}async getFeatureByObjectId(e,t){const i=new R;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await F(this._layer.parsedUrl.path,i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=f?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=f?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let i=this._layer.url;const r=i.toLowerCase().indexOf("/rest/services");if(i=r>-1?i.substring(0,r):i,i){i+="/rest/info";try{const e=await t(i,{query:{f:"json"}});let r="";return e.data&&e.data.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(s){return""}}return""}getDataSourceFeatureSet(){const e=new P({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}export{P as default};
5
+ import e from"../../../Graphic.js";import t from"../../../request.js";import i from"../../Attachment.js";import r from"../support/FeatureSet.js";import s from"../support/IdSet.js";import{defaultMaxRecords as a,stableStringify as n,FeatureServiceDatabaseType as l,IdState as o,extractServiceUrl as u}from"../support/shared.js";import{toWhereClause as d,isSingleField as h}from"../support/sqlUtils.js";import{decodeStatType as c}from"../support/stats.js";import{createMD5Hash as p,outputTypes as y}from"../../../core/MD5.js";import{id as f}from"../../../kernel.js";import{fromJSON as _}from"../../../geometry/support/jsonUtils.js";import m from"../../../layers/FeatureLayer.js";import{convertToFeatureSet as g}from"../../../layers/graphics/featureConversionUtils.js";import"../../../core/Error.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../layers/support/source/DataLayerSource.js";import{executeQueryJSON as F}from"../../../rest/query/executeQueryJSON.js";import"../../../core/arrayUtils.js";import"../../../core/urlUtils.js";import"../../../core/unitUtils.js";import"../../../geometry/support/spatialReferenceUtils.js";import{executeQueryPBF as S}from"../../../rest/query/operations/query.js";import b from"../../../rest/support/FeatureSet.js";import R from"../../../rest/support/Query.js";import"../../../rest/query/support/AttachmentInfo.js";import"../../../rest/support/AttachmentQuery.js";import{executeForCount as w}from"../../../rest/query/executeForCount.js";import"../../../geometry.js";import{executeForIds as D}from"../../../rest/query/executeForIds.js";import"../../../rest/support/RelationshipQuery.js";import"../../../geometry/support/normalizeUtils.js";import"../../../rest/support/TopFeaturesQuery.js";import{OptimizedFeatureSetParserContext as x}from"../../../rest/query/operations/pbfOptimizedFeatureSet.js";import I from"../../../rest/support/StatisticDefinition.js";import q from"../../Dictionary.js";class P extends r{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return a}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=n(e.toJSON());return p(t,y.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const i of this._layer.outFields)if(i.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}else;if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=l.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=l.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=l.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=l.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return o.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new R;t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(i){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}async queryPBF(e){e.quantizationParameters={mode:"edit"};const t=await S(this._layer.parsedUrl,e,new x({}));return b.fromJSON(g(t.data)).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?this._layer.gdbVersion:"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title,source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){const i="execute"===t?F:"executeForCount"===t?w:D,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(t),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}async _getFilteredSet(e,t,i,r,a){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e){return new s([],[],!0,null)}if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,a);let l="",o=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(l=r.constructClause(),o=!0);const u=new R;u.where=null===i?null===t?"1=1":"":d(i,n),this._requestStandardised&&(u.sqlFormat="standard"),u.spatialRelationship=this._makeRelationshipEnum(e),u.outSpatialReference=this.spatialReference,u.orderByFields=""!==l?l.split(","):null,u.geometry=null===t?null:t,u.relationParameter=this._makeRelationshipParam(e);let h=await this.executeQuery(u,"executeForIds");null===h&&(h=[]),this._checkCancelled(a);return new s([],h,o,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,a){let n="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=await this.databaseType();let u=null===i?null===t?"1=1":"":d(i,o);this._layer.definitionExpression&&this._useDefinitionExpression&&(u=""!==u?"(("+this._layer.definitionExpression+") AND ("+u+"))":this._layer.definitionExpression);let h=this._maxQueryRate();const c=this._layer.capabilities.query.maxRecordCount;void 0!==c&&c<h&&(h=c);let p=null;if(!0===this._pageJustIds)p=new s([],["GETPAGES"],l,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:h,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);p=new s([],["GETPAGES"],l,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:h,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(p,h,0,1,a),p}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,a=e.pagesDefinition.internal.lastPage,n=new R;this._requestStandardised&&(n.sqlFormat="standard"),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==a)return"done";for(let o=0;o<l.features.length;o++)e.pagesDefinition.internal.set[s+o]=l.features[o].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let o=0;o<l.features.length;o++)this._featureCache[l.features[o].attributes[this._layer.objectIdField]]=l.features[o];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const r of t)if(r.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let o=e._lastFetchedIndex;o<e._known.length;o++){if(e._lastFetchedIndex+=1,a++,void 0===this._featureCache[e._known[o]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[o]]){const r=t._featureMap[e._known[o]];null!==r&&(i=!0,this._featureCache[e._known[o]]=r)}}if(!1===i&&(e._known[o]!==t&&s.push(e._known[o]),s.length>=this._maxProcessingRate()-1))break}if(a>=i&&0===s.length)break}if(0===s.length)return"success";const n=new R;this._requestStandardised&&(n.sqlFormat="standard"),n.objectIds=s,n.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),n.returnGeometry=!0,!0===this._removeGeometry&&(n.returnGeometry=!1),n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new Error(l.error);for(let o=0;o<l.features.length;o++)this._featureCache[l.features[o].attributes[this._layer.objectIdField]]=l.features[o];return"success"}async _getDistinctPages(e,t,i,r,s,a,n,l,o){await this._ensureLoaded();const u=await this.databaseType();let h=i.parseTree.column;for(let d=0;d<this._layer.fields.length;d++)if(this._layer.fields[d].name.toLowerCase()===h.toLowerCase()){h=this._layer.fields[d].name;break}const c=new R;this._requestStandardised&&(c.sqlFormat="standard");let p=null===a?null===s?"1=1":"":d(a,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(p=""!==p?"(("+this._layer.definitionExpression+") AND ("+p+"))":this._layer.definitionExpression),c.where=p,c.spatialRelationship=this._makeRelationshipEnum(r),c.relationParameter=this._makeRelationshipParam(r),c.geometry=null===s?null:s,c.returnDistinctValues=!0,c.returnGeometry=!1,c.outFields=[h];const y=await this.executeQuery(c,"execute");if(this._checkCancelled(o),!y.hasOwnProperty("features"))throw new Error("Unnexected Result querying statistics from layer");let f=!1;for(let d=0;d<this._layer.fields.length;d++)if(this._layer.fields[d].name===h){"date"===this._layer.fields[d].type&&(f=!0);break}for(let d=0;d<y.features.length;d++){if(f){const e=y.features[d].attributes[h];null!==e?l.push(new Date(e)):l.push(e)}else l.push(y.features[d].attributes[h]);if(l.length>=n)break}if(0===y.features.length)return l;if(y.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<n){return{calculated:!0,result:await this._getDistinctPages(e+y.features.length,t,i,r,s,a,n,l,o)}}return l}async _distinctStat(e,t,i,r,s,a,n){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,a,[],n)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType(),a=new R;if(this._requestStandardised&&(a.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===r?null===i?"1=1":"":d(r,s);this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),a.where=n,a.where=n,a.spatialRelationship=this._makeRelationshipEnum(t),a.relationParameter=this._makeRelationshipParam(t),a.geometry=null===i?null:i,a.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(a,"executeForCount")}}async _stats(e,t,i,r,s,a,n){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,i,r,s):{calculated:!1};if(!1===o||!1===h(t)&&!1===l||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n);if("distinct"===e)return!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n):this._distinctStat(e,t,i,r,s,a,n);const p=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const y=new R;this._requestStandardised&&(y.sqlFormat="standard");let f=null===s?null===r?"1=1":"":d(s,p);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),y.where=f,y.spatialRelationship=this._makeRelationshipEnum(i),y.relationParameter=this._makeRelationshipParam(i),y.geometry=null===r?null:r;const _=new I;_.statisticType=c(e),_.onStatisticField=d(t,p),_.outStatisticFieldName="ARCADE_STAT_RESULT",y.returnGeometry=!1;let m="ARCADE_STAT_RESULT";y.outStatistics=[_];const g=await this.executeQuery(y,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new Error("Unnexected Result querying statistics from layer");let F=!1;for(let d=0;d<g.fields.length;d++)if("ARCADE_STAT_RESULT"===g.fields[d].name.toUpperCase()){m=g.fields[d].name,"date"===g.fields[d].type&&(F=!0);break}if(F){let e=g.features[0].attributes[m];return null!==e&&(e=new Date(g.features[0].attributes[m])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[m]}}_stat(e,t,i,r,s,a,n){return this._stats(e,t,i,r,s,a,n)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(i=!0),i)for(let s=0;s<t.length-1;s++)null!==t[s].workingexpr&&(!1===t[s].workingexpr.isStandardized||!1===h(t[s].workingexpr)&&!1===r)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,a,n,l){await this._ensureLoaded();const o=await this.databaseType();let u="",h=!1,c=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(u=n.constructClause(),c=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(c=!1,h=!0,u=this._layer.objectIdField);const p=[];for(let s=0;s<t.length;s++){const e=new I;e.onStatisticField=null!==t[s].workingexpr?d(t[s].workingexpr,o):"",e.outStatisticFieldName=t[s].field,e.statisticType=t[s].toStatisticsName(),p.push(e)}""===u&&(u=e.join(","));let y=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<y&&(y=f);let _=null===a?null===r?"1=1":"":d(a,o);this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression);return new s([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:h,generatedOid:l,resultRecordCount:y,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:p,geometry:null===r?null:r,where:_,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(t,i,r){let s=t.pagesDefinition.where;!0===t.pagesDefinition.useOIDpagination&&(s=""!==s?"("+s+") AND ("+t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString()+")":t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString());const a=t.pagesDefinition.internal.lastRetrieved,n=a,l=t.pagesDefinition.internal.lastPage,o=new R;if(this._requestStandardised&&(o.sqlFormat="standard"),o.where=s,o.spatialRelationship=t.pagesDefinition.spatialRel,o.relationParameter=t.pagesDefinition.relationParam,o.outFields=t.pagesDefinition.outFields,o.outStatistics=t.pagesDefinition.outStatistics,o.geometry=t.pagesDefinition.geometry,o.groupByFieldsForStatistics=t.pagesDefinition.groupByFieldsForStatistics,o.num=t.pagesDefinition.resultRecordCount,o.start=t.pagesDefinition.internal.lastPage,o.returnGeometry=t.pagesDefinition.returnGeometry,o.orderByFields=""!==t.pagesDefinition.orderByFields?t.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(r),!u.hasOwnProperty("features"))throw new Error("Unnexected Result querying aggregates from layer");const d=[];if(t.pagesDefinition.internal.lastPage!==l)return[];for(let e=0;e<u.features.length;e++)t.pagesDefinition.internal.set[n+e]=u.features[e].attributes[t.pagesDefinition.generatedOid];for(let h=0;h<u.features.length;h++)d.push(new e({attributes:u.features[h].attributes,geometry:null}));return!0===t.pagesDefinition.useOIDpagination?0===u.features.length?t.pagesDefinition.internal.fullyResolved=!0:t.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[t.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==t.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(t.pagesDefinition.internal.fullyResolved=!0),t.pagesDefinition.internal.lastRetrieved=a+u.features.length,t.pagesDefinition.internal.lastPage+=t.pagesDefinition.resultRecordCount,d}static create(e,t,i,r,s){const a=new m({url:e,outFields:null===t?["*"]:t});return new P({layer:a,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return u(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,a){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:a};(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(n.attachmentTypes=s),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"});const l=await this._layer.queryAttachments(n),o=[];return l&&l[e]&&l[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let s=null;a&&t.exifInfo&&(s=q.convertJsonToArcade(t.exifInfo,!0)),o.push(new i(t.id,t.name,t.contentType,t.size,r,s))})),o}return[]}async queryRelatedFeatures(i){const r={f:"json",relationshipId:i.relationshipId.toString(),definitionExpression:i.where,outFields:i.outFields.join(","),returnGeometry:i.returnGeometry.toString()};void 0!==i.resultOffset&&null!==i.resultOffset&&(r.resultOffset=i.resultOffset.toString()),void 0!==i.resultRecordCount&&null!==i.resultRecordCount&&(r.resultRecordCount=i.resultRecordCount.toString()),i.orderByFields&&(r.orderByFields=i.orderByFields.join(",")),i.objectIds.length>0&&(r.objectIds=i.objectIds.join(",")),i.outSpatialReference&&(r.outSR=JSON.stringify(i.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const s=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(s.data){const t={},i=s.data;if(i&&i.relatedRecordGroups){const r=i.spatialReference;for(const s of i.relatedRecordGroups){const a=s.objectId,n=[];for(const t of s.relatedRecords){t.geometry&&(t.geometry.spatialReference=r);const i=new e({geometry:t.geometry?_(t.geometry):null,attributes:t.attributes});n.push(i)}t[a]={features:n,exceededTransferLimit:!0===i.exceededTransferLimit}}}return t}throw new Error("Invalid Request")}async getFeatureByObjectId(e,t){const i=new R;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await F(this._layer.parsedUrl.path,i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=f?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=f?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let i=this._layer.url;const r=i.toLowerCase().indexOf("/rest/services");if(i=r>-1?i.substring(0,r):i,i){i+="/rest/info";try{const e=await t(i,{query:{f:"json"}});let r="";return e.data&&e.data.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(s){return""}}return""}getDataSourceFeatureSet(){const e=new P({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}export{P as default};
@@ -1 +1 @@
1
- var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s}),r(80442);var n=r(78286),o=r(17202);const s={apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.24.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${o.r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>{if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>g,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;e.length=t.length;for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function g(e,t,r,n){const o=null==r?e.length:r,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const b=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;b.clear();for(let e=0;e<n;++e)b.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(b.has(e[t])&&(s&&s.push(e[t]),b.delete(e[t]),e[t]=e[r-1],--r,--t,0===b.size||0===r))return b.clear(),r;for(let t=0;t<i;++t)if(b.has(e[t])&&(s&&s.push(e[t]),b.delete(e[t]),e[t]=e[r-1],--r,--t,0===b.size||0===r))return b.clear(),r;return b.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},60235:(e,t,r)=>{"use strict";r.d(t,{x9:()=>i});var n=r(80442);const o=new Set;function s(e,t,r=!1){r&&o.has(t)||(r&&o.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:o,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),o&&(c+=`\n\t⚙️ Version: ${o}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),s(e,c,a)}}},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";let n;function o(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>o}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},o.add=(e,t,r,s)=>((s||void 0===n[e])&&(n[e]=t),r&&o(e)),o.cache=n,o.add("esri-deprecation-warnings",!0),(()=>{o.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));o.add(e,n),o.add("ios",n)}o.add("trident",parseFloat(r.split("Trident/")[1])||void 0),o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("trident")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-canvas-svg-support",!o("trident")),o.add("esri-wasm","WebAssembly"in globalThis),o.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),o.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),o.add("esri-atomics","Atomics"in globalThis),o.add("esri-workers","Worker"in globalThis),o.add("web-feat:cache","caches"in globalThis),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-point-coverage",.1),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("mapview-transitions-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-enabled",!1),o.add("mapimagelayer-popup-identify-max-tolerance",20),o.add("heatmap-allow-raster-fallback",!0),o.add("heatmap-force-raster",!1),o.add("heatmap-kernel-density",!1),o.add("heatmap-kernel-density-disable-conversion",!1),o("host-webworker")||o("host-browser")&&(o.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),o.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{o.add("esri-image-decode",!0,!0,!0)})).catch((()=>{o.add("esri-image-decode",!1,!0,!0)}))}return!1})),o.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>d,yd:()=>s}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function g(e){return null}function b(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function w(e){return e.filter((e=>n(e)))}function v(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{Bd:()=>g,Fd:()=>b,JR:()=>m,O3:()=>d,Pt:()=>l,R2:()=>y,RY:()=>p,SC:()=>f,U2:()=>v,Wg:()=>a,Wi:()=>o,hw:()=>h,j0:()=>_,lV:()=>w,o8:()=>s,pC:()=>n,s3:()=>c,yl:()=>u,yw:()=>i})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,o)=>{let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>k,zE:()=>l,dD:()=>v,hh:()=>E,vr:()=>A,Ds:()=>C,as:()=>_,WW:()=>O,R8:()=>w,D_:()=>y,Hc:()=>d,y8:()=>P,fu:()=>g,$F:()=>b,r9:()=>h,k_:()=>u,H9:()=>p,Yn:()=>j,gx:()=>S,Hl:()=>m});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o;r(60235);var s=r(20102),i=r(91460),a=r(92604),c=r(70586);function l(e="Aborted"){return new s.Z("AbortError",e)}function u(e,t="Aborted"){if(d(e))throw l(t)}function f(e){return(0,c.pC)(e)?"aborted"in e?e:e.signal:e}function d(e){const t=f(e);return(0,c.pC)(t)&&t.aborted}function h(e){if(y(e))throw e}function p(e){if(!y(e))throw e}function g(e,t){const r=f(e);if(!(0,c.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function b(e,t){const r=f(e);if(!(0,c.Wi)(r))return u(r),(0,i.IH)(r,"abort",(()=>t(l())))}function m(e,t){const r=f(t);return(0,c.Wi)(r)?e:new Promise(((r,n)=>{let o=g(t,(()=>n(l())));const s=()=>o=(0,c.hw)(o);e.then(s,s),e.then(r,n)}))}function y(e){return e&&"AbortError"===e.name}async function w(e){try{return await e}catch(e){if(!y(e))throw e}}function v(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}async function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await _(r),o={};return t.map(((e,t)=>o[e]=n[t])),o}const t=e;return function(e){return new Promise(((t,r)=>{try{e(t)}catch(e){Promise.resolve().then((()=>r(e)))}}))}((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}async function O(e){return(await _(e)).filter((e=>!!e.value)).map((e=>e.value))}function k(e,t,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);g(n,(()=>{s&&(clearTimeout(s),o(l()))}))}))}function P(e){return e&&"function"==typeof e.then}function S(e){return P(e)?e:Promise.resolve(e)}function C(e,t=-1){let r,n,o,s,i=null;const a=(...u)=>{if(r){n=u,s&&s.reject(l()),s=v();const e=(0,c.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||v(),s=null,t>0){const n=new AbortController;r=S(e(...u,n.signal));const o=r;k(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=S(e(...u));const f=()=>{const e=n;n=o=r=i=null,null!=e&&a(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,c.j0)(h.promise)};return a}function E(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function A(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,c.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=g(t,(()=>{(0,c.pC)(s)&&s.abort()})),s}async function j(e){await Promise.resolve(),u(e)}a.Z.getLogger("esri.core.promiseUtils")},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,Hx:()=>f,KZ:()=>c,Uc:()=>u,W0:()=>i,ZY:()=>d,eP:()=>s,fS:()=>p,lq:()=>a,tP:()=>o,xZ:()=>h,z3:()=>l})},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>V,B7:()=>E,D6:()=>U,Fv:()=>Z,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>ge,P$:()=>D,PF:()=>F,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>A,ed:()=>I,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>L,mN:()=>P,oC:()=>te,oh:()=>W,qg:()=>j,rS:()=>Q,sJ:()=>Y,tD:()=>$,tm:()=>N,u0:()=>S,v_:()=>B,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,g=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,b=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(b));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w={};let v=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`}();const O=()=>v,k=()=>_;function P(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),P(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=P(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function N(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function U(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(U(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function J(e){return w[e]||(re(e)||te(e)?w[e]=[new y(q(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===v.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===v.scheme&&n===v.authority&&!g.test(e)||(se()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function V(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function Q(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===v.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===v.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=P(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=v.scheme),e)}function de(e,t){const r=P(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=P(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=P(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function ge(e){if((0,i.Wi)(e))return null;const t=e.match(be);return t?t[1]:null}const be=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5406),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(4478)]).then(r.bind(r,14478)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936),r.e(6529)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(6481),r.e(6459),r.e(3356)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(9662),r.e(6208)]).then(r.bind(r,2255)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(9662),r.e(4325),r.e(908)]).then(r.bind(r,61837)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(2736)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(176),r.e(2398),r.e(3716)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(6481),r.e(2631),r.e(8936),r.e(7799)]).then(r.bind(r,28615)),SceneLayerWorker:()=>Promise.all([r.e(3739),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(5406),r.e(2548),r.e(1825),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:g,ON:b}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const l=(0,c.jt)();return new Promise(((r,o)=>{if((0,a.Hc)(n))return this._processWork(),void o((0,a.zE)());const c=(0,a.fu)(n,(()=>{const e=this._outJobs.get(l);e&&(this._outJobs.delete(l),this._processWork(),(0,i.hw)(e.abortHandle),this._post({type:d,jobId:l}),o((0,a.zE)()))})),u={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(l,u),this._post({type:h,jobId:l,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:g,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,i.hw)(e.abortHandle),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case g:this._onOpenPortMessage(t);break;case b:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,s=this._outJobs;if(!s.has(t))return;const a=s.get(t);this._processWork(),s.delete(t),(0,i.hw)(a.abortHandle),r?a.reject(o.Z.fromJSON(JSON.parse(r))):a.resolve(n)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>c,Cs:()=>n,QM:()=>u,jt:()=>a,oi:()=>l});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.24",i={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),s=e.options,i=s.responseType;s.signal=t?.signal,s.responseType="native"===i||"native-request-init"===i?"native-request-init":["blob","json","text"].includes(i)&&(0,o.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,s),c={data:a.data,ssl:a.ssl};switch(a.requestOptions.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20220516",o="e1af4b88f986d13fd846231452b7dee6755c472f"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"919d0d8b1c2176760973",176:"86ce33b38887e7dec7f9",247:"b24a76738482ebfc626f",280:"ab97a35f7a7d5cf1da19",461:"505b0aa5ee3e5a26c351",565:"c3e7290fb128d4fefd44",576:"812a5abfadd747a09b6f",639:"e51f0e71f2a55af604d3",739:"c6929ab080e934047a21",751:"44403c3ecc7d949a577c",819:"5d3e774ce7b006c8cba8",908:"92898387584524a8e626",1197:"06c1bae22fa9698e9427",1400:"9d738aab0d907cd09a9d",1408:"dd6c9a114ad38cf622ba",1412:"1db8bfb1731be3ae320c",1421:"770cf0a66102100abe74",1423:"7ea06c86adfc827fda08",1433:"dfdd853dd6c023089963",1534:"16c4e0a32d50d4db984d",1562:"eeed138930a4a805691d",1773:"2aede0d1dcac8592436b",1785:"1aba8c73c62a64e0658c",1825:"26827ec144676e6385f8",1916:"e6f76f62cf58fb1e67c6",1938:"d4ed4d2f5129ee750276",2133:"04f7a5fceba712596683",2134:"1c010202b4c7e1d15f23",2320:"7e5c22b5a32ac74b1b6e",2398:"5baa162351551817838b",2399:"1d91aa745b49b2ab36cf",2485:"66f627d68dbb0fdb725f",2548:"5210f0b42dba27945226",2631:"fc9b5f40c5179a8c90de",2664:"e6b0f74226b9394bfa7a",2723:"49d75dc1c42dfdc3c3d3",2736:"5637a192b47ed9cfd5d6",2855:"be4bf1e4cbe2a593f8b3",3027:"4cdd29e1f3a1c7a39af7",3121:"672da24bbf86718bf48d",3127:"586ede983ab00d69fd1f",3128:"366e5c1abd1ab6d3e548",3172:"b597c04a4abb98e29d1c",3191:"8b497d9c37a8f577a467",3230:"b4f171db73355c6f766e",3301:"ae5ce55cd1a32525f101",3356:"cc372e1bc7ce932c4b76",3388:"ab2a0480dc2b608deda3",3471:"8965ab74e03506e3475e",3529:"82bc24bdc9c6ebaf58c0",3668:"5cf2064bfd9d0847d9ec",3716:"9964386c07e73404cff9",3723:"99badac039fb3ef82937",3739:"7391422fc51acb96a25d",3750:"f2cfad73498829c140db",3852:"f60bbd47e9376e8b10f6",3853:"a508d936296185456b9a",3879:"40b11eea270f6688ff9c",3974:"0ecaa28b8bff1d779d66",4133:"8793070d288878d6f49b",4166:"a57cace73522b95fffd8",4325:"329b005a06c0e7f0e9f1",4358:"5c334b4a40c2c5f7e5ad",4475:"8c50af01668496e1fec2",4477:"f0e462f5a16852f33225",4478:"aa49841b14c6e6df2a07",4499:"ea73a1d9cad5e1a5d861",4547:"aeeb364b7c1876f6e7db",4695:"f356e505c36397fda3cf",4720:"4281b4b27f4767cdd3ae",4756:"8298328526da62398e1b",4889:"17be5bd0d1c233d73d7a",4910:"24217129d492e170f0f0",5001:"d63f736b3560c577a8a4",5235:"12feeace7215248be23f",5329:"c8a3a28809542396c6fd",5406:"967af0aa4dc4da032fdc",5787:"263a99045803b278f56d",5837:"49baead4baf2766a2ae7",5853:"3c8c020d9e723888352b",5886:"0a6977144ea1abf96fbf",5906:"48810a9391b787f195ed",6105:"c40d9caf5189be2c698e",6130:"8865c5cc28df60364e60",6135:"161ad66d11d80a9048bb",6199:"2798a7dc75a236c1c962",6208:"13387f56acbc3291561a",6233:"9c4c721d890b49697132",6237:"c544df83e86a9d36b68c",6459:"c535c18c00e823665603",6481:"8b1c1e9a1d57d0610040",6529:"5fd787f63362defc984f",6690:"b78c3e9d31c4a562cdf0",6710:"b577ec80647cf2ece397",6748:"7cf3cff7b28ff007dbad",6774:"af3766a2d27419c7766c",6810:"5f47e9fc1e50b0d61248",6841:"b426f7b4c3dc60a366f6",6920:"8102bb78fe96e6197e4e",6968:"2290bd6dc2e6bb136e14",7175:"ae554c88e862a5761f2e",7202:"3e94e35f44aadbb332ff",7277:"125b14c2ccd96d7c20c2",7374:"1d253bf2561842e990aa",7572:"8417b3d5821b306a0fc4",7799:"b97a34d2e7cceef1ac41",7832:"b7d7ad127f8939cbdec2",7845:"d94c5f36d52cf71f0bb9",7873:"93eb468381bfcf0e47d7",8008:"6281b15009712a5dee3c",8062:"46411f32b29a0e783105",8096:"db4d320962f3900a58af",8157:"1d109cd048170e2d529a",8163:"620dc3c13c345d5aa9f6",8227:"76b424b6d2c1ef089324",8297:"fdafc815fbd51ee17f13",8326:"99d2911ca31de4040d43",8422:"c0e6dbecdbd30066a82c",8636:"2f4a8eff11d263fa798a",8758:"70b6356357e7640c4e8b",8828:"d16b328d32a6ddc2fdb9",8875:"c66ac36da6392b6bf331",8899:"8033531b0cc706b40d86",8936:"fdf80a371b7b2a45f1ff",9070:"c2a36243eb105d570bff",9153:"eb3855d3753d6b8334bd",9169:"cda2b237cbef22f688fa",9291:"18033ced727c5fd9729e",9296:"23da29c22825c242c5af",9348:"40d5ee3105c5468c307b",9454:"6d7e2a23a0a5dd9ded1d",9490:"7574316b3af61c389e8f",9662:"5b4efe0014162f777534",9884:"356db8b8297282c77291",9932:"5edb60bed8f151431d3e"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
1
+ var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s}),r(80442);var n=r(78286),o=r(17202);const s={apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.24.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${o.r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>{if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>b,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;e.length=t.length;for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function b(e,t,r,n){const o=null==r?e.length:r,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const g=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";let n;function o(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>o}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},o.add=(e,t,r,s)=>((s||void 0===n[e])&&(n[e]=t),r&&o(e)),o.cache=n,o.add("esri-deprecation-warnings",!0),(()=>{o.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));o.add(e,n),o.add("ios",n)}o.add("trident",parseFloat(r.split("Trident/")[1])||void 0),o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("trident")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-canvas-svg-support",!o("trident")),o.add("esri-wasm","WebAssembly"in globalThis),o.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),o.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),o.add("esri-atomics","Atomics"in globalThis),o.add("esri-workers","Worker"in globalThis),o.add("web-feat:cache","caches"in globalThis),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-point-coverage",.1),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("mapview-transitions-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-enabled",!1),o.add("mapimagelayer-popup-identify-max-tolerance",20),o.add("heatmap-allow-raster-fallback",!0),o.add("heatmap-force-raster",!1),o.add("heatmap-kernel-density",!1),o.add("heatmap-kernel-density-disable-conversion",!1),o("host-webworker")||o("host-browser")&&(o.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),o.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{o.add("esri-image-decode",!0,!0,!0)})).catch((()=>{o.add("esri-image-decode",!1,!0,!0)}))}return!1})),o.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>d,yd:()=>s}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function b(e){return null}function g(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function w(e){return e.filter((e=>n(e)))}function v(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{Bd:()=>b,Fd:()=>g,JR:()=>m,O3:()=>d,Pt:()=>l,R2:()=>y,RY:()=>p,SC:()=>f,U2:()=>v,Wg:()=>a,Wi:()=>o,hw:()=>h,j0:()=>_,lV:()=>w,o8:()=>s,pC:()=>n,s3:()=>c,yl:()=>u,yw:()=>i})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,o)=>{let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>O,zE:()=>c,dD:()=>w,hh:()=>C,vr:()=>E,Ds:()=>S,as:()=>v,WW:()=>_,R8:()=>y,D_:()=>m,Hc:()=>f,y8:()=>k,fu:()=>p,$F:()=>b,r9:()=>d,k_:()=>l,H9:()=>h,Yn:()=>A,gx:()=>P,Hl:()=>g});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e="Aborted"){return new s.Z("AbortError",e)}function l(e,t="Aborted"){if(f(e))throw c(t)}function u(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function f(e){const t=u(e);return(0,a.pC)(t)&&t.aborted}function d(e){if(m(e))throw e}function h(e){if(!m(e))throw e}function p(e,t){const r=u(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function b(e,t){const r=u(e);if(!(0,a.Wi)(r))return l(r),(0,i.IH)(r,"abort",(()=>t(c())))}function g(e,t){const r=u(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=p(t,(()=>n(c())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function m(e){return e&&"AbortError"===e.name}async function y(e){try{return await e}catch(e){if(!m(e))throw e}}function w(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}async function v(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await v(r),o={};return t.map(((e,t)=>o[e]=n[t])),o}const t=e;return function(e){return new Promise(((t,r)=>{try{e(t)}catch(e){Promise.resolve().then((()=>r(e)))}}))}((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}async function _(e){return(await v(e)).filter((e=>!!e.value)).map((e=>e.value))}function O(e,t,r){const n=new AbortController;return p(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);p(n,(()=>{s&&(clearTimeout(s),o(c()))}))}))}function k(e){return e&&"function"==typeof e.then}function P(e){return k(e)?e:Promise.resolve(e)}function S(e,t=-1){let r,n,o,s,i=null;const l=(...u)=>{if(r){n=u,s&&s.reject(c()),s=w();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||w(),s=null,t>0){const n=new AbortController;r=P(e(...u,n.signal));const o=r;O(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=P(e(...u));const f=()=>{const e=n;n=o=r=i=null,null!=e&&l(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return l}function C(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function E(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=p(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}async function A(e){await Promise.resolve(),l(e)}},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,Hx:()=>f,KZ:()=>c,Uc:()=>u,W0:()=>i,ZY:()=>d,eP:()=>s,fS:()=>p,lq:()=>a,tP:()=>o,xZ:()=>h,z3:()=>l})},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>Q,B7:()=>E,D6:()=>U,Fv:()=>Z,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>be,P$:()=>D,PF:()=>F,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>A,ed:()=>I,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>L,mN:()=>P,oC:()=>te,oh:()=>W,qg:()=>j,rS:()=>V,sJ:()=>Y,tD:()=>$,tm:()=>N,u0:()=>S,v_:()=>B,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w={};let v=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`}();const O=()=>v,k=()=>_;function P(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),P(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=P(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function N(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function U(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(U(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function J(e){return w[e]||(re(e)||te(e)?w[e]=[new y(q(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===v.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===v.scheme&&n===v.authority&&!b.test(e)||(se()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function Q(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function V(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===v.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===v.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=P(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=v.scheme),e)}function de(e,t){const r=P(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=P(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=P(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(ge);return t?t[1]:null}const ge=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(9293),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(4478)]).then(r.bind(r,14478)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936),r.e(6529)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(6481),r.e(6459),r.e(3356)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(9662),r.e(6208)]).then(r.bind(r,2255)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(9662),r.e(4325),r.e(908)]).then(r.bind(r,61837)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(2736)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(176),r.e(2398),r.e(3716)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(6481),r.e(2631),r.e(8936),r.e(7799)]).then(r.bind(r,28615)),SceneLayerWorker:()=>Promise.all([r.e(3739),r.e(1412)]).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(3739),r.e(1562),r.e(1534),r.e(5886),r.e(9293),r.e(2548),r.e(1825),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const l=(0,c.jt)();return new Promise(((r,o)=>{if((0,a.Hc)(n))return this._processWork(),void o((0,a.zE)());const c=(0,a.fu)(n,(()=>{const e=this._outJobs.get(l);e&&(this._outJobs.delete(l),this._processWork(),(0,i.hw)(e.abortHandle),this._post({type:d,jobId:l}),o((0,a.zE)()))})),u={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(l,u),this._post({type:h,jobId:l,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,i.hw)(e.abortHandle),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,s=this._outJobs;if(!s.has(t))return;const a=s.get(t);this._processWork(),s.delete(t),(0,i.hw)(a.abortHandle),r?a.reject(o.Z.fromJSON(JSON.parse(r))):a.resolve(n)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>c,Cs:()=>n,QM:()=>u,jt:()=>a,oi:()=>l});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.24",i={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),s=e.options,i=s.responseType;s.signal=t?.signal,s.responseType="native"===i||"native-request-init"===i?"native-request-init":["blob","json","text"].includes(i)&&(0,o.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,s),c={data:a.data,ssl:a.ssl};switch(a.requestOptions.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20220520",o="8ee859ce5acc33f8b8f9b2eb4506897ddfa5adcc"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"2b74415adc8342ce356a",176:"db0c40ed1c2e923c6be0",247:"b24a76738482ebfc626f",280:"ab97a35f7a7d5cf1da19",461:"505b0aa5ee3e5a26c351",565:"c3e7290fb128d4fefd44",576:"812a5abfadd747a09b6f",639:"e51f0e71f2a55af604d3",739:"26646a7545a194e67441",751:"b362d1ae9a87397ce2c5",819:"5d3e774ce7b006c8cba8",908:"128f461007ef039d4f73",1197:"1ccbd183f3638f2c6c0f",1400:"9d738aab0d907cd09a9d",1408:"70078370e36e77de220a",1412:"1db8bfb1731be3ae320c",1421:"770cf0a66102100abe74",1423:"7ea06c86adfc827fda08",1433:"dfdd853dd6c023089963",1534:"16c4e0a32d50d4db984d",1562:"eeed138930a4a805691d",1773:"bc31a14919558a5993ab",1785:"1aba8c73c62a64e0658c",1825:"26827ec144676e6385f8",1916:"67937dd1030220b81b8f",1920:"a5ee17cdc9eb23ebeaf0",1938:"d4ed4d2f5129ee750276",2133:"04f7a5fceba712596683",2134:"1c010202b4c7e1d15f23",2320:"f1c313ea55222de59780",2398:"5baa162351551817838b",2485:"f5089121d845ec594008",2548:"8878bc8ee647f9eadc62",2631:"fc9b5f40c5179a8c90de",2664:"38a752f8bd456c8912a8",2723:"97015a05c44cc206a81a",2736:"5637a192b47ed9cfd5d6",2855:"be4bf1e4cbe2a593f8b3",3027:"4cdd29e1f3a1c7a39af7",3121:"672da24bbf86718bf48d",3127:"586ede983ab00d69fd1f",3128:"54711b8a98104eeec833",3172:"b597c04a4abb98e29d1c",3191:"d2cdb2379c3eeb06f886",3230:"b4f171db73355c6f766e",3301:"88912dbc2b60623bc6a3",3308:"824a700ba611e6c4fa9a",3356:"cc372e1bc7ce932c4b76",3388:"ab2a0480dc2b608deda3",3471:"8965ab74e03506e3475e",3529:"48996d5b621ff694369d",3716:"21a169ebef6c9a207eeb",3723:"10cd3a846e297006f3a3",3739:"7391422fc51acb96a25d",3750:"f2cfad73498829c140db",3852:"f60bbd47e9376e8b10f6",3853:"e150cd6da55e02e7e83d",3879:"605202e3c29250650492",3974:"d6315aa9eedf79a7bca1",4133:"8793070d288878d6f49b",4166:"f87403249f57b13a172a",4325:"7c4b69c7c82cab7a91f9",4358:"5c334b4a40c2c5f7e5ad",4475:"8c50af01668496e1fec2",4477:"f0e462f5a16852f33225",4478:"66e8a253312d72a8e7f9",4499:"ea73a1d9cad5e1a5d861",4547:"4487fb2d274e49bdb2b0",4695:"f356e505c36397fda3cf",4720:"4281b4b27f4767cdd3ae",4756:"18b4f015e1d6be7a8965",4889:"17be5bd0d1c233d73d7a",4910:"24217129d492e170f0f0",5001:"d63f736b3560c577a8a4",5235:"12feeace7215248be23f",5329:"c8a3a28809542396c6fd",5787:"c5fadaa98749ffb490f5",5837:"f9d83a48b69c5728feba",5853:"3c8c020d9e723888352b",5886:"0a6977144ea1abf96fbf",5906:"6e48b0db65bcaaace838",6105:"c40d9caf5189be2c698e",6130:"8865c5cc28df60364e60",6199:"fe18d2d251a5ad80eb54",6208:"13387f56acbc3291561a",6233:"9c4c721d890b49697132",6237:"c544df83e86a9d36b68c",6459:"c535c18c00e823665603",6481:"8b1c1e9a1d57d0610040",6529:"5fd787f63362defc984f",6690:"b78c3e9d31c4a562cdf0",6710:"b577ec80647cf2ece397",6748:"7cf3cff7b28ff007dbad",6774:"af3766a2d27419c7766c",6810:"5f47e9fc1e50b0d61248",6841:"f6aaee4db0bd5096164c",6920:"8102bb78fe96e6197e4e",6968:"2290bd6dc2e6bb136e14",7175:"1c2805cc97dcee70e60d",7202:"3e94e35f44aadbb332ff",7277:"125b14c2ccd96d7c20c2",7374:"1d253bf2561842e990aa",7572:"8417b3d5821b306a0fc4",7799:"b97a34d2e7cceef1ac41",7832:"ca035cb79695ce94f46f",7845:"d94c5f36d52cf71f0bb9",7873:"93eb468381bfcf0e47d7",8008:"e136355e15c9b5fd36cf",8062:"c23b3901bf93ae5e1429",8096:"db4d320962f3900a58af",8157:"1d109cd048170e2d529a",8163:"620dc3c13c345d5aa9f6",8227:"76b424b6d2c1ef089324",8297:"b09f7fd69658cbc33743",8326:"99d2911ca31de4040d43",8422:"82b6535a30287c74ba13",8636:"2f4a8eff11d263fa798a",8758:"70b6356357e7640c4e8b",8828:"d16b328d32a6ddc2fdb9",8875:"9890f2bd8d9b7047e9c8",8899:"8033531b0cc706b40d86",8936:"fdf80a371b7b2a45f1ff",9070:"c2a36243eb105d570bff",9153:"eb3855d3753d6b8334bd",9169:"cda2b237cbef22f688fa",9291:"18033ced727c5fd9729e",9293:"9e12f192f236501e40c5",9296:"0b859c90debb9fb09786",9348:"7e150c38e25fbb8bacaf",9454:"a7a430ccf0f732c97bab",9490:"7574316b3af61c389e8f",9662:"5606cc14a4d54bc0ba3e",9884:"356db8b8297282c77291",9904:"55b2b80b9e3684feaa8e",9932:"02aa9a409ceec694f857"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9932],{10699:(e,t,r)=>{r.d(t,{IG:()=>s});var i=r(43697),o=r(52011);let n=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,o.j)("esri.core.Identifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,o.j)("esri.core.Identifiable")],a)},16453:(e,t,r)=>{r.d(t,{R:()=>w,w:()=>b});var i=r(43697),o=r(15923),n=r(70586),s=r(41103),a=r(22974),l=r(31263);class c{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new c,r=this._originStores[l.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.d9)(e),l.s3.DEFAULTS)}));for(let r=l.s3.SERVICE;r<l.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,a.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=l.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,n.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=l.s3.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var d=r(50549),h=r(1153),u=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,n.j0)((0,h.vw)(this)),r=t.store,i=new c;t.store=i,(0,s.M)(t,r,i)}read(e,t){(0,d.i)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,l.M9)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,l.M9)(t),o=(0,h.vw)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,h.vw)(e).store}let m=class extends(p(o.Z)){};m=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var g=r(76169);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e={},t){return(0,g.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,h.vw)(this).setAtOrigin(e,t,(0,l.M9)(r))}removeOrigin(e){const t=v(this),r=(0,l.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),l.s3.USER)}updateOrigin(e,t){const r=v(this),i=(0,l.M9)(t),o=this.get(e);for(let t=i+1;t<l.kk;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,u.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,h.vw)(e).store}const w=e=>{let t=class extends(f(p(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(w(o.Z)){};b=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],b)},78346:(e,t,r)=>{r.d(t,{bA:()=>G});var i=r(20102),o=r(80442),n=r(95330),s=r(80903),a=r(25045),l=r(40330),c=r(92604),d=r(70586),h=r(94362),u=r(99880),p=r(68773),y=(r(2587),r(17452));const m={};function g(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=m.baseUrl),m.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var f=r(41213);class v{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new v,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,f.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,f.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await a.default.loadWorker(e);i||(i=await import(e));const o=a.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:o})}}}var b=r(70171),S=r(17202);const _=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:k}=h.Cs;let L,I;const C="Failed to create Worker. Fallback to execute module in main thread";async function E(e){return new Promise((t=>{function r(o){const n=(0,h.QM)(o);n&&n.type===k&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),_.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let M=0;const O=c.Z.getLogger("esri.core.workers"),{ABORT:T,INVOKE:x,OPEN:j,OPENED:D,RESPONSE:A}=h.Cs;class N{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),O.error(e)}))}static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return E(new w);if(!L&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=p.Z.default){const t={...p.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(p.Z));e.assetsPath=(0,y.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,o.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,u.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=p.Z.workers.loaderConfig,r=g({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={version:l.i8,buildDate:S.r,revision:S.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);L=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(L)try{e=new Worker(L,{name:"esri-worker-"+M++})}catch(t){_.warn(C,I),e=new w}else _.warn(C,I),e=new w;return E(e)}();return new N(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,o)=>{const s={resolve:t,reject:o,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:T,jobId:i})}))};this._outJobs.set(i,s),this._post({type:j,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case A:this._onResponseMessage(t);break;case T:this._onAbortMessage(t);break;case x:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:o}=e,s=o?new AbortController:null,a=this._inJobs,c=l.Nv[t];let d;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);d=c.call(null,i,{signal:s?s.signal:null})}catch(e){return void this._post({type:A,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(d)?(a.set(r,{controller:s,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:A,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:A,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:A,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:o}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),r?n.reject(i.Z.fromJSON(JSON.parse(r))):n.resolve(o))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let R=(0,o.Z)("esri-workers-debug")?1:(0,o.Z)("host-browser")?navigator.hardwareConcurrency-1:0;R||(R=(0,o.Z)("safari")&&(0,o.Z)("mac")||(0,o.Z)("trident")?7:2);let Z=0;const P=[];async function U(e,t){const r=new s.Z;return await r.open(e,t),r}async function G(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return U([a.default.connect(r)],{...t,client:i})}if(await async function(){if(H)return H;$=new AbortController;const e=[];for(let t=0;t<R;t++){const r=N.create(t).then((e=>(P[t]=e,e)));e.push(r)}return H=Promise.all(e),H}(),(0,n.k_)(t.signal),"dedicated"===r){const r=Z++%R;return U([await P[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,R);if(r<R){const i=new Array(r);for(let o=0;o<r;++o){const r=Z++%R;i[o]=P[r].open(e,t)}return U(i,t)}}return U(P.map((r=>r.open(e,t))),t)}let $,H=null},79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),c=r(20941),d=r(5600),h=(r(80442),r(75215),r(71715)),u=r(52011),p=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new c.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new c.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,d.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,p.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,h.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,d.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,h.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,h.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,h.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,u.j)("esri.geometry.HeightModelInfo")],f);const w=f},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),o=r(3172),n=r(20102),s=r(70586);async function a(e){if((0,s.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,o){const s=t.exec(r);if(!s)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=s[1]?`${s[1]}/`:"",c=s[2],d=(0,i.Su)(o),h=`${l}${c}.json`,u=d?`${l}${c}_${d}.json`:h;let p;try{p=await a(e(u))}catch(t){if(u===h)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await a(e(h))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const c={};var d,h=r(99880);(0,i.tz)((d={pattern:"esri/",location:h.V},new l(d)))},90344:(e,t,r)=>{r.d(t,{Ze:()=>g,p6:()=>f});var i=r(35454),o=r(70171);const n={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},a={year:"numeric",month:"short",day:"numeric"},l={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},d={...c,second:"numeric"},h={"short-date":n,"short-date-short-time":{...n,...c},"short-date-short-time-24":{...n,...c,hour12:!1},"short-date-long-time":{...n,...d},"short-date-long-time-24":{...n,...d,hour12:!1},"short-date-le":n,"short-date-le-short-time":{...n,...c},"short-date-le-short-time-24":{...n,...c,hour12:!1},"short-date-le-long-time":{...n,...d},"short-date-le-long-time-24":{...n,...d,hour12:!1},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...c},"long-month-day-year-short-time-24":{...s,...c,hour12:!1},"long-month-day-year-long-time":{...s,...d},"long-month-day-year-long-time-24":{...s,...d,hour12:!1},"day-short-month-year":a,"day-short-month-year-short-time":{...a,...c},"day-short-month-year-short-time-24":{...a,...c,hour12:!1},"day-short-month-year-long-time":{...a,...d},"day-short-month-year-long-time-24":{...a,...d,hour12:!1},"long-date":l,"long-date-short-time":{...l,...c},"long-date-short-time-24":{...l,...c,hour12:!1},"long-date-long-time":{...l,...d},"long-date-long-time-24":{...l,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":d},u=(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"}),p=(u.apiValues,u.toJSON.bind(u),u.fromJSON.bind(u),{ar:"ar-u-nu-latn-ca-gregory"});let y=new WeakMap,m=h["short-date-short-time"];function g(e){return h[e]||null}function f(e,t){return function(e){const t=e||m;if(!y.has(t)){const e=(0,o.Kd)(),r=p[(0,o.Kd)()]||e;y.set(t,new Intl.DateTimeFormat(r,t))}return y.get(t)}(t).format(e)}(0,o.Ze)((()=>{y=new WeakMap,m=h["short-date-short-time"]}))},18848:(e,t,r)=>{r.d(t,{sh:()=>l,uf:()=>c});var i=r(70586),o=r(70171);const n={ar:"ar-u-nu-latn"};let s=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function c(e,t){return function(e){const t=e||a;if(!s.has(t)){const r=(0,o.Kd)(),i=n[(0,o.Kd)()]||r;s.set(t,new Intl.NumberFormat(i,e))}return(0,i.j0)(s.get(t))}(t).format(e)}(0,o.Ze)((()=>{s=new WeakMap,a={}}))},940:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(92604),o=r(78286),n=r(19153),s=r(90344),a=r(18848);const l=i.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:i={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let i,n;const s=e.indexOf(":");if(-1===s?i=e.trim():(i=e.slice(0,s).trim(),n=e.slice(s+1).trim()),!i)return"";const a=(0,o.hS)(i,t);if(null==a)return"";const l=r[n]||r[i];return l?d(a,l):n?h(a,n):u(a)}(e,t,i)))}function d(e,t){switch(t.type){case"date":return(0,s.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),u(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,s.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,s.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,s.p6)(e):""}}},49932:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(70586),l=r(16453),c=r(95330),d=r(17452),h=r(5600),u=r(67676),p=(r(80442),r(75215),r(71715)),y=r(52011),m=r(79235),g=r(87085),f=r(46486),v=r(17287),w=r(38009),b=r(16859),S=r(21506),_=r(50758),k=r(78346);const L=s.Z.getLogger("esri.core.workers.WorkerHandle");class I extends class{constructor(e,t,r,i,o={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,k.bA)(e,{...o,schedule:i}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,o.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>L.error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,_.kB)((()=>{r.removed=!0,(0,u.Od)(this._listeners,r),this._thread&&(0,a.pC)(r.threadHandle)&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this._transferLists[e],o=i?i(t):[];return this._thread.invoke(e,t,{transferList:o,signal:r})}return this._promise?this._promise.then((()=>((0,c.k_)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach(((e,t)=>{e===this&&C.delete(t)})),this.destroy())}}const C=new Map,E=s.Z.getLogger("esri.layers.ElevationLayer");let M=class extends((0,f.Z)((0,v.Y)((0,w.q)((0,b.I)((0,l.R)(g.Z)))))){constructor(...e){super(...e),this.copyright=null,this.heightModelInfo=null,this.path=null,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get((0,a.Wg)(e));return t||((0,a.pC)(e)?(t=new I((t=>e.schedule(t))),C.set(e,t)):(t=new I,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.RY)(this._lercDecoder)}set minScale(e){this.constructed&&E.warn(`${this.declaredClass}.minScale support has been removed (since 4.5)`)}get minScale(){}set maxScale(e){this.constructed&&E.warn(`${this.declaredClass}.maxScale support has been removed (since 4.5)`)}get maxScale(){}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=(0,a.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(c.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,i){const n=(0,a.pC)((i=i||{signal:null}).signal)?i.signal:i.signal=(new AbortController).signal,s={responseType:"array-buffer",signal:n},l={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,i))).then((()=>(0,o.default)(this.getTileUrl(e,t,r),s))).then((e=>this._lercDecoder.decode(e.data,l,n))).then((e=>({values:e.pixelData,width:e.width,height:e.height,maxZError:e.fileInfo.maxZError,noDataValue:e.noDataValue,minValue:e.minValue,maxValue:e.maxValue})))}getTileUrl(e,t,r){const i=!this.tilemapCache&&this.supportsBlankTile,o=(0,d.B7)({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${o?"?"+o:""}`}async queryElevation(e,t){const{ElevationQuery:i}=await Promise.all([r.e(4547),r.e(3127)]).then(r.bind(r,33127));return(0,c.k_)(t),(new i).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:i}=await Promise.all([r.e(4547),r.e(3127)]).then(r.bind(r,33127));return(0,c.k_)(t),(new i).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,o.default)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile.__isDefault__}};(0,i._)([(0,h.Cb)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,type:m.Z})],M.prototype,"heightModelInfo",void 0),(0,i._)([(0,h.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],M.prototype,"minScale",null),(0,i._)([(0,h.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],M.prototype,"maxScale",null),(0,i._)([(0,h.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,i._)([(0,h.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)()],M.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,i._)([(0,h.Cb)(S.HQ)],M.prototype,"url",void 0),(0,i._)([(0,h.Cb)()],M.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,i._)([(0,y.j)("esri.layers.ElevationLayer")],M),M.prototype.fetchTile.__isDefault__=!0;const O=M},87085:(e,t,r)=>{r.d(t,{Z:()=>b});var i=r(43697),o=(r(66577),r(3172)),n=r(20102),s=r(32448),a=r(10699),l=r(83379),c=r(92604),d=r(95330),h=r(17452),u=r(5600),p=(r(67676),r(80442),r(75215),r(52011)),y=r(68773);const m=c.Z.getLogger("esri.layers.support.fromPortalItem");var g=r(6570),f=r(82971);let v=0,w=class extends(s.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,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},i=await Promise.all([r.e(4547),r.e(8008)]).then(r.bind(r,28008));try{return await i.fromItem(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",o=r&&r.portal&&r.portal.url||y.Z.portalUrl;throw m.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||c.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,h.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,u.Cb)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],w.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,u.Cb)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,u.Cb)({type:f.Z})],w.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"url",void 0),(0,i._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,p.j)("esri.layers.Layer")],w);const b=w},46486:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),o=(r(66577),r(5600)),n=(r(67676),r(80442),r(75215),r(71715)),s=r(52011),a=r(45322),l=r(56608),c=r(82971);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.includes("Tilemap")?new l.y({layer:this}):null}};return(0,i._)([(0,o.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,o.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,o.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,o.Cb)({type:c.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,i._)([(0,o.Cb)(a.h)],t.prototype,"tileInfo",void 0),(0,i._)([(0,o.Cb)()],t.prototype,"tilemapCache",void 0),(0,i._)([(0,n.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,i._)([(0,o.Cb)()],t.prototype,"version",void 0),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>c});var i=r(43697),o=r(92604),n=r(70586),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(66677);const c=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,s.Cb)()],t.prototype,"title",null),(0,i._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},38009:(e,t,r)=>{r.d(t,{q:()=>p});var i=r(43697),o=r(20102),n=r(17452),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(30556),c=r(50549),d=r(76169);const h={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,OGCFeatureLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"web-map/tables":{ArcGISFeatureLayer:!0},"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}};var u=r(21506);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,d.d)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e||"Layer"}read(e,t){t&&(t.layer=this),(0,c.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=h[e];let i=r&&r[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new o.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.Z&&"web-document-write:property-required"===e.name)).length;return(0,n.jc)(r?.url)?(t?.messages?.push(new o.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,s.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,s.Cb)(u.rT)],t.prototype,"listMode",void 0),(0,i._)([(0,l.c)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,s.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,s.Cb)(u.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,l.c)("title")],t.prototype,"writeTitle",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.OperationalLayer")],t),t}},21506:(e,t,r)=>{r.d(t,{qG:()=>b,PV:()=>g,id:()=>_,iR:()=>p,rn:()=>m,rT:()=>I,u1:()=>L,rO:()=>k,Oh:()=>v,bT:()=>w,C_:()=>u,Lx:()=>f,vg:()=>S,YI:()=>h,HQ:()=>y});var i=r(92835),o=r(6570),n=r(82971),s=r(25929),a=r(70586),l=(r(95330),r(35463)),c=r(20682),d=r(65242);const h={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},p={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},m={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},g={value:null,type:c.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={type:Number,json:{origins:{"web-document":{write:!0,read:!0},"portal-item":{write:!0}}}},w={...v,json:{...v.json,origins:{"web-document":{...v.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,d.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,d.b)(t.drawingInfo.transparency)}}},b={type:i.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:r}=this.layer,o=this.view?.timeExtent;let n=this.layer.timeExtent;e&&(n=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(n));let s=r?o&&n?o.intersection(n):o||n:n;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(s));const c=this._get("timeExtent");return s.equals(c)?c:s}},S={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=o.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=n.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},_={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},L={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},I={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},99282:(e,t,r)=>{r.d(t,{a:()=>n});var i=r(67900),o=r(68441);const n={inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",o.sv.radius)}},20682:(e,t,r)=>{r.d(t,{Z:()=>S});var i,o=r(43697),n=r(35454),s=r(96674),a=r(70586),l=r(5600),c=(r(67676),r(80442),r(75215),r(71715)),d=r(52011),h=r(30556),u=r(35671);let p=i=class extends s.wq{async collectRequiredFields(e,t){return(0,u.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,o._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],p);const y=p;var m=r(99282);const g=function(){const e=Object.keys(m.a);return e.sort(),e}();var f;const v=(0,n.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new n.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=f=class extends s.wq{constructor(){super(...arguments),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):(0,a.pC)(e)||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}};(0,o._)([(0,l.Cb)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,o._)([(0,c.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,o._)([(0,h.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,o._)([(0,l.Cb)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],b.prototype,"mode",null),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,o._)([(0,l.Cb)({type:g,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=f=(0,o._)([(0,d.j)("esri.layers.support.ElevationInfo")],b);const S=b},65242:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>n});var i=r(75215);function o(e){const t=(0,i.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9296],{10699:(t,e,r)=>{r.d(e,{IG:()=>n});var i=r(43697),s=r(52011);let o=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,i._)([(0,s.j)("esri.core.Identifiable")],e),e};let a=class extends(n(class{})){};a=(0,i._)([(0,s.j)("esri.core.Identifiable")],a)},16453:(t,e,r)=>{r.d(e,{R:()=>b,w:()=>_});var i=r(43697),s=r(15923),o=r(70586),n=r(41103),a=r(22974),l=r(31263);class p{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new p,r=this._originStores[l.s3.DEFAULTS];r&&r.forEach(((t,r)=>{e.set(r,(0,a.d9)(t),l.s3.DEFAULTS)}));for(let r=l.s3.SERVICE;r<l.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{t&&t.has(s)||e.set(s,(0,a.d9)(i),r)}))}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=l.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(t,e),!this._values.has(t)||(0,o.j0)(this._propertyOriginMap.get(t))<=r){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),i!==e}return!1}delete(t,e=l.s3.USER){const r=this._originStores[e];if(!r)return;const i=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return i}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],i=r&&r.get(t),s=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),s!==i}originOf(t){return this._propertyOriginMap.get(t)||l.s3.DEFAULTS}forEach(t){this._values.forEach(t)}}var u=r(50549),d=r(1153),h=r(52011);const c=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,o.j0)((0,d.vw)(this)),r=e.store,i=new p;e.store=i,(0,n.M)(e,r,i)}read(t,e){(0,u.i)(this,t,e)}getAtOrigin(t,e){const r=y(this),i=(0,l.M9)(e);if("string"==typeof t)return r.get(t,i);const s={};return t.forEach((t=>{s[t]=r.get(t,i)})),s}originOf(t){return(0,l.x3)(this.originIdOf(t))}originIdOf(t){return y(this).originOf(t)}revert(t,e){const r=y(this),i=(0,l.M9)(e),s=(0,d.vw)(this);let o;o="string"==typeof t?"*"===t?r.keys(i):[t]:t,o.forEach((t=>{s.invalidate(t),r.revert(t,i),s.commit(t)}))}};return e=(0,i._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function y(t){return(0,d.vw)(t).store}let g=class extends(c(s.Z)){};g=(0,i._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var f=r(76169);const v=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){return m(this).delete(t,(0,l.M9)(e))}write(t={},e){return(0,f.c)(this,t=t||{},e),t}setAtOrigin(t,e,r){(0,d.vw)(this).setAtOrigin(t,e,(0,l.M9)(r))}removeOrigin(t){const e=m(this),r=(0,l.M9)(t),i=e.keys(r);for(const t of i)e.originOf(t)===r&&e.set(t,e.get(t,r),l.s3.USER)}updateOrigin(t,e){const r=m(this),i=(0,l.M9)(e),s=this.get(t);for(let e=i+1;e<l.kk;++e)r.delete(t,e);r.set(t,s,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function m(t){return(0,d.vw)(t).store}const b=t=>{let e=class extends(v(c(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(b(s.Z)){};_=(0,i._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],_)},87085:(t,e,r)=>{r.d(e,{Z:()=>_});var i=r(43697),s=(r(66577),r(3172)),o=r(20102),n=r(32448),a=r(10699),l=r(83379),p=r(92604),u=r(95330),d=r(17452),h=r(5600),c=(r(67676),r(80442),r(75215),r(52011)),y=r(68773);const g=p.Z.getLogger("esri.layers.support.fromPortalItem");var f=r(6570),v=r(82971);let m=0,b=class extends(n.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,v.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=v.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},i=await Promise.all([r.e(4547),r.e(8008)]).then(r.bind(r,28008));try{return await i.fromItem(e)}catch(t){const r=e&&e.portalItem,i=r&&r.id||"unset",s=r&&r.portal&&r.portal.url||y.Z.portalUrl;throw g.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,u.D_)(t)||p.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){if(this.parent){const t=this,e=this.parent;"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):"baseLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const t=this.url;return t?(0,d.mN)(t):null}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.default)(t,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.Cb)({type:f.Z})],b.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,h.Cb)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,h.Cb)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,h.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,h.Cb)({type:v.Z})],b.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,h.Cb)()],b.prototype,"url",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.j)("esri.layers.Layer")],b);const _=b},39296:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var i=r(43697),s=r(20102),o=r(16453),n=r(1654),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),p=r(87085),u=r(16859);let d=class extends((0,u.I)((0,o.R)(p.Z))){constructor(t){super(t),this.resourceInfo=null,this.type="unsupported"}initialize(){this.addResolvingPromise(new Promise(((t,e)=>{(0,n.Os)((()=>{const t=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let r="Unsupported layer type";t&&(r+=" "+t),e(new s.Z("layer:unsupported-layer-type",r,{layerType:t}))}))})))}read(t,e){const r={resourceInfo:t};null!=t.id&&(r.id=t.id),null!=t.title&&(r.title=t.title),super.read(r,e)}write(t){return Object.assign(t||{},this.resourceInfo,{id:this.id})}};(0,i._)([(0,a.Cb)({readOnly:!0})],d.prototype,"resourceInfo",void 0),(0,i._)([(0,a.Cb)({type:["show","hide"]})],d.prototype,"listMode",void 0),(0,i._)([(0,a.Cb)({json:{read:!1},readOnly:!0,value:"unsupported"})],d.prototype,"type",void 0),d=(0,i._)([(0,l.j)("esri.layers.UnsupportedLayer")],d);const h=d},16859:(t,e,r)=>{r.d(e,{I:()=>_});var i=r(43697),s=r(40330),o=r(3172),n=r(66643),a=r(20102),l=r(92604),p=r(70586),u=r(95330),d=r(17452),h=r(5600),c=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),g=r(30556),f=r(65587),v=r(15235),m=r(86082);const b=l.Z.getLogger("esri.layers.mixins.PortalLayer"),_=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r&&r.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,u.k_)(e),await i.load({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData},e)}catch(t){throw(0,u.D_)(t)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,u.r9)(t),!0))))}async _fetchUserHasEditingPrivileges(t){const e=this.url?s.id?.findCredential(this.url):null;if(!e)return!0;const r=I.credential===e?I.user:await this._fetchEditingUser(t);return I.credential=e,I.user=r,(0,p.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=s.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,a=f.Z.getDefault();if(a&&a.loaded&&(0,d.Fv)(a.restUrl)===(0,d.Fv)(i))return a.user;const l=`${i}/community/self`,u=(0,p.pC)(t)?t.signal:null,h=await(0,n.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?m.default.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e&&e.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,i._)([(0,h.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,i._)([(0,c.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,i._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),e=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],e),e},I={credential:null,user:null}}}]);