@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250122

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 (279) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/treeAnalysis.js +1 -1
  3. package/assets/esri/core/t9n/Units_ar.json +1 -1
  4. package/assets/esri/core/t9n/Units_bg.json +1 -1
  5. package/assets/esri/core/t9n/Units_bs.json +1 -1
  6. package/assets/esri/core/t9n/Units_ca.json +1 -1
  7. package/assets/esri/core/t9n/Units_cs.json +1 -1
  8. package/assets/esri/core/t9n/Units_da.json +1 -1
  9. package/assets/esri/core/t9n/Units_de.json +1 -1
  10. package/assets/esri/core/t9n/Units_el.json +1 -1
  11. package/assets/esri/core/t9n/Units_es.json +1 -1
  12. package/assets/esri/core/t9n/Units_et.json +1 -1
  13. package/assets/esri/core/t9n/Units_fi.json +1 -1
  14. package/assets/esri/core/t9n/Units_fr.json +1 -1
  15. package/assets/esri/core/t9n/Units_he.json +1 -1
  16. package/assets/esri/core/t9n/Units_hr.json +1 -1
  17. package/assets/esri/core/t9n/Units_hu.json +1 -1
  18. package/assets/esri/core/t9n/Units_id.json +1 -1
  19. package/assets/esri/core/t9n/Units_it.json +1 -1
  20. package/assets/esri/core/t9n/Units_ja.json +1 -1
  21. package/assets/esri/core/t9n/Units_ko.json +1 -1
  22. package/assets/esri/core/t9n/Units_lt.json +1 -1
  23. package/assets/esri/core/t9n/Units_lv.json +1 -1
  24. package/assets/esri/core/t9n/Units_nl.json +1 -1
  25. package/assets/esri/core/t9n/Units_no.json +1 -1
  26. package/assets/esri/core/t9n/Units_pl.json +1 -1
  27. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  28. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  29. package/assets/esri/core/t9n/Units_ro.json +1 -1
  30. package/assets/esri/core/t9n/Units_ru.json +1 -1
  31. package/assets/esri/core/t9n/Units_sk.json +1 -1
  32. package/assets/esri/core/t9n/Units_sl.json +1 -1
  33. package/assets/esri/core/t9n/Units_sr.json +1 -1
  34. package/assets/esri/core/t9n/Units_sv.json +1 -1
  35. package/assets/esri/core/t9n/Units_th.json +1 -1
  36. package/assets/esri/core/t9n/Units_tr.json +1 -1
  37. package/assets/esri/core/t9n/Units_uk.json +1 -1
  38. package/assets/esri/core/t9n/Units_vi.json +1 -1
  39. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  40. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  41. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  42. package/assets/esri/core/workers/RemoteClient.js +1 -1
  43. package/assets/esri/core/workers/chunks/03b94362ed2a45ee5ea3.js +1 -0
  44. package/assets/esri/core/workers/chunks/0446f2ffad255cd40272.js +1 -0
  45. package/assets/esri/core/workers/chunks/059119f1731c2103c91c.js +1 -0
  46. package/assets/esri/core/workers/chunks/05e58286f8015dba6768.js +1 -0
  47. package/assets/esri/core/workers/chunks/060414956bf316529c48.js +1 -0
  48. package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{6400f39a965900f66ce7.js → 083c73428945fb3d4558.js} +1 -1
  50. package/assets/esri/core/workers/chunks/0d3154b90bc3fd7e6b4c.js +1 -0
  51. package/assets/esri/core/workers/chunks/0ec2ae595fa22998ffea.js +1 -0
  52. package/assets/esri/core/workers/chunks/{105dcc7b7284b1e965b7.js → 15c5b1dd8f398f641f6e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/163451124c66a7a0bcdc.js +1 -0
  54. package/assets/esri/core/workers/chunks/17cc6638a510da164f58.js +1 -0
  55. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
  56. package/assets/esri/core/workers/chunks/1e9349411af082ec03d0.js +1 -0
  57. package/assets/esri/core/workers/chunks/1eb47cfca815ac432cf5.js +1 -0
  58. package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → 20e7fae0c173807ba9a2.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
  60. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
  61. package/assets/esri/core/workers/chunks/21c3882a282a4755e032.js +1 -0
  62. package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → 2488a0da3be64b0a26f4.js} +1 -1
  63. package/assets/esri/core/workers/chunks/254fbd8055ae7a0bb393.js +1 -0
  64. package/assets/esri/core/workers/chunks/2d55eb8059a532ffcc56.js +1 -0
  65. package/assets/esri/core/workers/chunks/3034df78da56fe1c0535.js +1 -0
  66. package/assets/esri/core/workers/chunks/32a96ef30f4608f377d6.js +1 -0
  67. package/assets/esri/core/workers/chunks/{97d66b0d0ff1132966de.js → 33b2f59c2ec10b2a1034.js} +1 -1
  68. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
  69. package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 40efcdf03c5224e6c4f7.js} +1 -1
  70. package/assets/esri/core/workers/chunks/424c7788a708abbf9299.js +1 -0
  71. package/assets/esri/core/workers/chunks/484d99910d110830df76.js +1 -0
  72. package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 486969dba1dc99402172.js} +2 -2
  73. package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 48f4ba1a5bb692903d06.js} +1 -1
  74. package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
  75. package/assets/esri/core/workers/chunks/{decd316936df1ad3fa65.js → 50b538c93696de5eda97.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{de00150030003de05146.js → 52aea8a4f292a66f5cfa.js} +1 -1
  77. package/assets/esri/core/workers/chunks/56f0eb9802f5cf9ad0d9.js +1 -0
  78. package/assets/esri/core/workers/chunks/57ddd64f0c22274d87e0.js +1 -0
  79. package/assets/esri/core/workers/chunks/5b5be7eb139b153934f5.js +1 -0
  80. package/assets/esri/core/workers/chunks/{4af0674fabfc965f1660.js → 5b876743865ef91b5648.js} +1 -1
  81. package/assets/esri/core/workers/chunks/62b88350892198de5055.js +1 -0
  82. package/assets/esri/core/workers/chunks/{206194cf069ad4bcc3ad.js → 6adf4f3d807f1af1c7c1.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6b1285db2d6695a87553.js +1 -0
  84. package/assets/esri/core/workers/chunks/6c425e1041bdeef32832.js +1 -0
  85. package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
  86. package/assets/esri/core/workers/chunks/765b4aefce7c11bbcb1f.js +1 -0
  87. package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 79a265dc21e29d3fd888.js} +1 -1
  88. package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
  89. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
  90. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
  91. package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ee5f43fbe4c2cc199e64.js → 8434cd16effc5efbf1bd.js} +1 -1
  93. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
  94. package/assets/esri/core/workers/chunks/{2779cf112299b612a73a.js → 875cb81f143ff8fe03b5.js} +1 -1
  95. package/assets/esri/core/workers/chunks/885814ef0e34c01a589f.js +1 -0
  96. package/assets/esri/core/workers/chunks/{e610dd938d30f75778bc.js → 8be2d16663a238de9438.js} +1 -1
  97. package/assets/esri/core/workers/chunks/91d5cb094a7051abb6c5.js +1 -0
  98. package/assets/esri/core/workers/chunks/93ba76749746871357e7.js +314 -0
  99. package/assets/esri/core/workers/chunks/991c597f27daa67158c5.js +1 -0
  100. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
  101. package/assets/esri/core/workers/chunks/{33eebe5cb22a03ae90c8.js → 9c88ce9b0020b6f9a37a.js} +1 -1
  102. package/assets/esri/core/workers/chunks/9df7bffadbe0b4aad442.js +1 -0
  103. package/assets/esri/core/workers/chunks/a0a056698f8227210f49.js +1 -0
  104. package/assets/esri/core/workers/chunks/a1cdd09968e11d95c701.js +1 -0
  105. package/assets/esri/core/workers/chunks/a28cb975974b99540432.js +1 -0
  106. package/assets/esri/core/workers/chunks/a29958273958c3e3e932.js +1 -0
  107. package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → af224962edae72b002fa.js} +1 -1
  108. package/assets/esri/core/workers/chunks/af2ed4c8ac238b932d89.js +1 -0
  109. package/assets/esri/core/workers/chunks/af75107f207b2ba01bb4.js +1 -0
  110. package/assets/esri/core/workers/chunks/b1661e6c76ef0800ffd6.js +1 -0
  111. package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
  112. package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
  113. package/assets/esri/core/workers/chunks/b846052b6f80ad6ada89.js +1 -0
  114. package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c473756f8785ab868ba5.js +1 -0
  116. package/assets/esri/core/workers/chunks/c5368ca97b7f7261967a.js +1 -0
  117. package/assets/esri/core/workers/chunks/c685991c9a30f7435933.js +1 -0
  118. package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
  119. package/assets/esri/core/workers/chunks/ce1c89b5a10fb5a7bb49.js +1 -0
  120. package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
  121. package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
  122. package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
  123. package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
  124. package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
  125. package/assets/esri/core/workers/chunks/e2775bcceb62fd0df41b.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → e63ff8d57fd771413488.js} +1 -1
  127. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
  128. package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
  129. package/assets/esri/core/workers/chunks/f016205a8f1fb665d6dd.js +1 -0
  130. package/assets/esri/core/workers/chunks/f02119812ec852edda57.js +1 -0
  131. package/assets/esri/core/workers/chunks/f272070f0878cd3e39a4.js +1 -0
  132. package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
  133. package/assets/esri/core/workers/chunks/{e4f4ad67d778dea5b956.js → f4f6f4933ca58438d7bc.js} +1 -1
  134. package/assets/esri/core/workers/chunks/fdc3d97510c6d43a8882.js +1 -0
  135. package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
  136. package/assets/esri/core/workers/chunks/ff4107b4fd3d3ce24e84.js +1 -0
  137. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  138. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  139. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  140. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  141. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
  142. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
  143. package/assets/esri/themes/dark/main.css +1 -1
  144. package/assets/esri/themes/light/main.css +1 -1
  145. package/assets/esri/themes/light/view.css +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  150. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  151. package/chunks/arcgis-knowledge-client-core.js +1 -1
  152. package/chunks/lyr3DMain.js +1 -1
  153. package/chunks/lyr3DWorker.js +1 -1
  154. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  155. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
  156. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  157. package/editing/templateUtils.js +5 -0
  158. package/geometry/operators/projectOperator.d.ts +4 -0
  159. package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
  160. package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
  161. package/geometry/operators/support/GeographicTransformation.js +1 -1
  162. package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
  163. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
  164. package/geometry/support/GeographicTransformation.d.ts +2 -2
  165. package/geometry/support/GeographicTransformationStep.d.ts +2 -2
  166. package/interfaces.d.ts +522 -53
  167. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  168. package/layers/LinkChartLayer.js +1 -1
  169. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  170. package/networks/support/utils.js +1 -1
  171. package/package.json +1 -1
  172. package/rest/featureService/FeatureService.js +1 -1
  173. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
  174. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
  175. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
  176. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
  177. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
  178. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
  179. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
  180. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
  181. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
  182. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
  183. package/rest/knowledgeGraphService.js +1 -1
  184. package/support/revision.js +1 -1
  185. package/undoredo/support/Services.js +1 -1
  186. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  187. package/views/3d/layers/Lyr3DWasm.js +1 -1
  188. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  189. package/widgets/Editor/UpdateWorkflow.js +1 -1
  190. package/widgets/Editor/workflowUtils.js +1 -1
  191. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  192. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  193. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  194. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  195. package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
  196. package/widgets/FeatureTemplates.js +1 -1
  197. package/widgets/LayerList/LayerListItem.js +1 -1
  198. package/widgets/Locate.js +1 -1
  199. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  200. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  201. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  202. package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
  203. package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
  204. package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
  205. package/widgets/OrientedImageryViewer/css.js +1 -1
  206. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  207. package/widgets/OrientedImageryViewer.js +1 -1
  208. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
  209. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
  210. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  211. package/widgets/UtilityNetworkTrace.js +1 -1
  212. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  213. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  214. package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
  215. package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
  216. package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
  217. package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
  218. package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
  219. package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
  220. package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
  221. package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
  222. package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
  223. package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
  224. package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
  225. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
  226. package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
  227. package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
  228. package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
  229. package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
  230. package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
  231. package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
  232. package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
  233. package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
  234. package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
  235. package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
  236. package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
  237. package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
  238. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
  239. package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
  240. package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
  241. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
  242. package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
  243. package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
  244. package/assets/esri/core/workers/chunks/89198ca24466d939e4e8.js +0 -1
  245. package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
  246. package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
  247. package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
  248. package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
  249. package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
  250. package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
  251. package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
  252. package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
  253. package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
  254. package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
  255. package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
  256. package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
  257. package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
  258. package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
  259. package/assets/esri/core/workers/chunks/c690268f48bc84778b23.js +0 -1
  260. package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
  261. package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
  262. package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
  263. package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
  264. package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
  265. package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
  266. package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
  267. package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
  268. package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
  269. package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
  270. package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
  271. package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
  272. package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
  273. package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
  274. package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
  275. package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
  276. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
  277. package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
  278. package/widgets/support/templateUtils.js +0 -5
  279. /package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js.LICENSE.txt → 486969dba1dc99402172.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return await t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(u);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,o=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(o),c(o),i.layersJSON={layers:o.layers,tables:o.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function o(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function y(e){e.layers?.forEach(o),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1815)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(690),t.e(2944),t.e(9868),t.e(4654),t.e(6298),t.e(4307)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(1768)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(4111),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(5023)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(3816)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(8430)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(8445)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1147),t.e(587),t.e(8540)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(2165),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(364),t.e(984),t.e(8301),t.e(4541)]).then(t.bind(t,30633))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(984),t.e(6049),t.e(8301),t.e(7677),t.e(5943)]).then(t.bind(t,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(6126)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(6298),t.e(9655)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(9465)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(7339),t.e(217),t.e(8613),t.e(6553),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1056),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(7339),t.e(217),t.e(8613),t.e(6553),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(4111),t.e(364),t.e(6688),t.e(7656),t.e(6928)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(697)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(377),t.e(4934)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(518),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(1017)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(7984),t.e(6742)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(217),t.e(284)]).then(t.bind(t,80284))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(690),t.e(2944),t.e(9868),t.e(4654),t.e(6298),t.e(4110)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(1860)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(4111),t.e(8506),t.e(7561)]).then(t.bind(t,59929))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(4111),t.e(364),t.e(9186),t.e(6688),t.e(8535)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(9434)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(3930),t.e(3920)]).then(t.bind(t,1689))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(690),t.e(1056),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(6183)]).then(t.bind(t,16183))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(984),t.e(6049),t.e(8301),t.e(7677),t.e(9547)]).then(t.bind(t,19547))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(9953),t.e(13),t.e(6311),t.e(5494),t.e(4796),t.e(3029),t.e(4296)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(1147),t.e(587),t.e(1904)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(518),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(518)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>o,K8:()=>d,XH:()=>u,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function o(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function u(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData().catch((()=>null));if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters}).catch((()=>null));a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly"),c=s.tileInfo?.format?.toLowerCase()??"",o=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===i||o||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,u.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,u.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,u.rc)(e,t.id);t.className=(0,u.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,u.nu)(e,l,a)),(0,u.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1e3,2393],{52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),s=r(59456),o=r(13874),a=r(61147),l=r(69540),u=r(51447),c=r(25482),p=r(53966),y=r(36708),f=r(24326),h=r(10107),g=(r(44208),r(87811),r(40608)),m=r(65864);function d(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let _=i=class extends(l.A.ClonableMixin(c.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:d(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:c.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,y.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,y.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],_.prototype,"aggregateGeometries",null),(0,n._)([(0,h.MZ)({value:null})],_.prototype,"attributes",null),(0,n._)([(0,h.MZ)({value:null,types:s.yR,json:{read:m.rS}})],_.prototype,"geometry",null),(0,n._)([(0,h.MZ)({type:Boolean})],_.prototype,"isAggregate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],_.prototype,"layer",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],_.prototype,"origin",void 0),(0,n._)([(0,h.MZ)({type:o.A})],_.prototype,"popupTemplate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],_.prototype,"sourceLayer",void 0),(0,n._)([(0,h.MZ)({value:null,types:a.Es})],_.prototype,"symbol",null),(0,n._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],_.prototype,"_version",void 0),(0,n._)([(0,h.MZ)({type:Boolean,value:!0})],_.prototype,"visible",null),_=i=(0,n._)([(0,g.$)("esri.Graphic")],_);const b=_},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),p=r(29005);let y=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[p.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],y);const f=y},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=i=class extends o.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],c);const p=c},83531:(e,t,r)=>{r.d(t,{BR:()=>c,Ov:()=>a,TU:()=>o,W_:()=>l,XX:()=>s,tk:()=>p,wI:()=>u});var i=r(70333),n=r(78888);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},10407:(e,t,r)=>{r.d(t,{It:()=>f,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>y,sQ:()=>p});var i=r(57251),n=r(16930),s=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,y.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?o(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const y={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer"};function f(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let s=!n||n.includes("features:user:edit"),o=!!r&&!!n?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),c=r(10107),p=(r(44208),r(53966),r(36005)),y=r(40608),f=r(43937),h=r(16930),g=r(65864),m=r(20437);const d=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void d.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void d.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,g.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,g.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,g.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,g.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,c.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,c.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,c.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,c.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,f.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,c.MZ)({types:s.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,c.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,f.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,c.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,y.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3200,4307,9340],{38961:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(90237),i=r(5503),o=r(36708),n=r(10107),l=r(40608),a=r(80559);let p=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.MZ)()],p.prototype,"getCollections",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"itemFilterFunction",void 0),p=(0,s._)([(0,l.$)("esri.core.CollectionFlattener")],p);const u=p},81583:(e,t,r)=>{r.d(t,{L:()=>l,g:()=>n});var s=r(60999),i=r(5503),o=r(92474);async function n(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.A.isCollection(t)?t.forEach((e=>n(e))):o.A.isLoadable(t)&&r.push(t))};t(n);let l=null;if(await(0,s.Tj)(r,(async e=>{const t=await(0,s.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)})),l)throw l.error;return e}},39516:(e,t,r)=>{async function s(e,t){const{default:s}=await Promise.resolve().then(r.bind(r,88368));return s.create(e,{fieldsIndex:t})}function i(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function o(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>o,mA:()=>i})},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var s=r(90237),i=r(5503),o=r(38961),n=r(49186),l=r(4718),a=r(81583),p=r(53966),u=r(92071),d=r(74887),y=r(84952),c=r(10107),h=(r(44208),r(36005)),f=r(40608),m=r(16930),g=r(4146),v=r(52106),_=r(13874),b=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),w=r(78888),M=r(66552),S=r(92474),x=r(61893),A=(r(87811),r(93223)),Z=r(5443),F=r(13600),I=r(4902),T=r(56507),O=r(10873);let j=class extends(I.A.IdentifiableMixin(u.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],j.prototype,"title",void 0),(0,s._)([(0,h.w)("service","title",["alias","name"])],j.prototype,"readTitle",null),(0,s._)([(0,c.MZ)()],j.prototype,"layer",void 0),(0,s._)([(0,c.MZ)({type:T.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,isRequired:!0}}})],j.prototype,"id",void 0),(0,s._)([(0,h.w)("service","id")],j.prototype,"readIdOnlyOnce",null),(0,s._)([(0,c.MZ)((0,O.Qo)(String))],j.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)((0,O.Qo)(Boolean))],j.prototype,"isEmpty",void 0),(0,s._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],j.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],j.prototype,"visible",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!0}})],j.prototype,"opacity",void 0),j=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingSublayer")],j);const R=j;var E=r(4071),L=r(17036),B=r(95466),N=r(30524),P=r(83898),q=r(50805),C=r(61956),z=r(54218),$=r(30291),D=r(88625),Q=r(4654),k=r(45671);const V=(0,L.p)();let G=class extends(S.A.LoadableMixin(x.A.EsriPromiseMixin(R))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new B.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new F.default({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,P.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,$.tn)(this,e)}async _fetchService(e){const t=(await(0,w.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:E.P,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:i}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:i}}}createQuery(){const e=new C.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(z.Et)}async queryCachedAttributes(e,t){const r=(0,N.hL)(this.fieldsIndex,await(0,k.TO)(this,(0,k.D8)(this)));return(0,Q.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:q.W4,readOnly:!0})],G.prototype,"nodePages",void 0),(0,s._)([(0,c.MZ)({type:[q.uV],readOnly:!0})],G.prototype,"materialDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.Ot],readOnly:!0})],G.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.L0],readOnly:!0})],G.prototype,"geometryDefinitions",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"store",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],G.prototype,"rootNode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,c.MZ)(V.fields)],G.prototype,"fields",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"fieldsIndex",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:F.default})],G.prototype,"associatedLayer",void 0),(0,s._)([(0,h.w)("service","associatedLayer",["associatedLayerID"])],G.prototype,"readAssociatedLayer",null),(0,s._)([(0,c.MZ)(V.outFields)],G.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0})],G.prototype,"objectIdField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{read:!1}})],G.prototype,"displayField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],G.prototype,"apiKey",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],G.prototype,"customParameters",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Z.A})],G.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:m.A})],G.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"version",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:D.A})],G.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"minScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"maxScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.MZ)({type:["hide","show"],json:{write:!0}})],G.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({types:b.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],G.prototype,"renderer",void 0),(0,s._)([(0,c.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],G.prototype,"definitionExpression",void 0),(0,s._)([(0,c.MZ)(O.M6)],G.prototype,"popupEnabled",void 0),(0,s._)([(0,c.MZ)({type:_.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],G.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.MZ)()],G.prototype,"types",null),(0,s._)([(0,c.MZ)()],G.prototype,"typeIdField",null),(0,s._)([(0,c.MZ)({json:{write:!1}}),(0,A.e)(new M.J({"3DObject":"3d-object",Point:"point"}))],G.prototype,"layerType",void 0),(0,s._)([(0,c.MZ)()],G.prototype,"geometryType",null),(0,s._)([(0,c.MZ)()],G.prototype,"profile",null),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],G.prototype,"statisticsInfo",void 0),G=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],G);const J=G;var U,K=r(67076);const H={type:i.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new i.A(e.map((e=>{const t=function(e){return"group"===e.layerType?X:J}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new K.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let X=U=class extends R{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,a.L)(this,(e=>U.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var Y;(0,s._)([(0,c.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],X.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)(H)],X.prototype,"sublayers",void 0),X=U=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],X),(Y=X||(X={})).sublayersProperty=H,Y.readSublayers=W,Y.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const ee=X;var te=r(52136),re=r(18768),se=r(69208),ie=r(16131),oe=r(8303),ne=r(25036),le=r(58947),ae=r(92009),pe=r(25482),ue=r(13069);let de=class extends pe.A{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],de.prototype,"type",void 0),de=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfo")],de);const ye=de;var ce;let he=ce=class extends pe.A{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new ce({filterType:this.filterType,filterValues:(0,l.o8)(this.filterValues)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:{isRequired:!0}}})],he.prototype,"filterType",void 0),(0,s._)([(0,c.MZ)({type:[String],json:{write:{isRequired:!0}}})],he.prototype,"filterValues",void 0),he=ce=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],he);const fe=he;var me;const ge=i.A.ofType(fe);let ve=me=class extends pe.A{clone(){return new me({filterTypes:(0,l.o8)(this.filterTypes)})}};(0,s._)([(0,c.MZ)({type:ge,json:{write:{isRequired:!0}}})],ve.prototype,"filterTypes",void 0),ve=me=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],ve);const _e=ve;var be;const we=i.A.ofType(_e);let Me=be=class extends ye{constructor(){super(...arguments),this.type="checkbox"}clone(){return new be({filterBlocks:(0,l.o8)(this.filterBlocks)})}};(0,s._)([(0,c.MZ)({type:["checkbox"]})],Me.prototype,"type",void 0),(0,s._)([(0,c.MZ)({type:we,json:{write:{isRequired:!0}}})],Me.prototype,"filterBlocks",void 0),Me=be=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],Me);const Se=Me;let xe=class extends pe.A{};(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],xe.prototype,"type",void 0),xe=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterMode")],xe);const Ae=xe;var Ze;let Fe=Ze=class extends Ae{constructor(){super(...arguments),this.type="solid"}clone(){return new Ze}};(0,s._)([(0,c.MZ)({type:["solid"],readOnly:!0,json:{write:{isRequired:!0}}})],Fe.prototype,"type",void 0),Fe=Ze=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeSolid")],Fe);const Ie=Fe;var Te,Oe=r(51734);let je=Te=class extends Ae{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Te({edges:(0,l.o8)(this.edges)})}};(0,s._)([(0,A.e)({wireFrame:"wire-frame"})],je.prototype,"type",void 0),(0,s._)([(0,c.MZ)(Oe.J)],je.prototype,"edges",void 0),je=Te=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeWireFrame")],je);const Re=je;var Ee;let Le=Ee=class extends Ae{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ee}};(0,s._)([(0,c.MZ)({type:["x-ray"],readOnly:!0,json:{write:{isRequired:!0}}})],Le.prototype,"type",void 0),Le=Ee=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeXRay")],Le);const Be=Le;var Ne;const Pe={nonNullable:!0,types:{key:"type",base:Ae,typeMap:{solid:Ie,"wire-frame":Re,"x-ray":Be}},json:{read:e=>{switch(e?.type){case"solid":return Ie.fromJSON(e);case"wireFrame":return Re.fromJSON(e);case"x-ray":return Be.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let qe=Ne=class extends pe.A{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Ie,this.title=""}clone(){return new Ne({filterExpression:this.filterExpression,filterMode:(0,l.o8)(this.filterMode),title:this.title})}};(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"filterExpression",void 0),(0,s._)([(0,c.MZ)(Pe)],qe.prototype,"filterMode",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"title",void 0),qe=Ne=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterBlock")],qe);const Ce=qe;var ze;const $e=i.A.ofType(Ce);let De=ze=class extends pe.A{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,ue.lk)(),this.name=null}clone(){return new ze({description:this.description,filterBlocks:(0,l.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,l.o8)(this.filterAuthoringInfo)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],De.prototype,"description",void 0),(0,s._)([(0,c.MZ)({type:$e,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"filterBlocks",void 0),(0,s._)([(0,c.MZ)({types:{key:"type",base:ye,typeMap:{checkbox:Se}},json:{read:e=>"checkbox"===e?.type?Se.fromJSON(e):null,write:!0}})],De.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,c.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"id",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"name",void 0),De=ze=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilter")],De);const Qe=De;let ke=class extends pe.A{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,c.MZ)({type:String})],ke.prototype,"fieldName",void 0),(0,s._)([(0,c.MZ)({type:String})],ke.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)({type:String})],ke.prototype,"label",void 0),(0,s._)([(0,c.MZ)({type:Number})],ke.prototype,"min",void 0),(0,s._)([(0,c.MZ)({type:Number})],ke.prototype,"max",void 0),(0,s._)([(0,c.MZ)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],ke.prototype,"mostFrequentValues",void 0),(0,s._)([(0,c.MZ)({type:[Number]})],ke.prototype,"subLayerIds",void 0),ke=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],ke);let Ve=class extends(S.A.LoadableMixin(x.A.EsriPromiseMixin(pe.A))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.A)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,c.MZ)({constructOnly:!0,type:String})],Ve.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:[ke],json:{read:{source:"summary"}}})],Ve.prototype,"fields",null),Ve=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics")],Ve);const Ge=Ve;var Je=r(24212);const Ue=i.A.ofType(Qe),Ke=(0,l.o8)(ee.sublayersProperty),He=Ke.json?.origins;He&&(He["web-scene"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},He["portal-item"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let We=class extends((0,le.w6)((0,re.b)((0,ie.q)((0,oe.A)((0,ne.j)((0,u.P)((0,se.d)((0,te.p)(g.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new Ue,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=ee.readSublayers(e,t,r);return ee.forEachSublayer(s,(e=>e.layer=this)),this._allSublayerOverrides&&(function(e,t){t.forEach((t=>Xe(e,t)))}(s,this._allSublayerOverrides),this._allSublayerOverrides=null),s}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const s=[];ee.forEachSublayer(e,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const s=r?.origin&&e.get(r.origin);s&&(t.sublayers=[],s.overrides.forEach((e=>{t.sublayers.push((0,l.o8)(e))})))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?Xe(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,y.fj)(this.parsedUrl?.path,t.statisticsHRef);return new Ge({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d.QP).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,a.g)(this,(e=>{ee.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(le.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(le.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ae.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.A.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,Je.XF)(p.A.getLogger(this),(0,Je.B)(t,"absolute-height",e)),(0,Je.XF)(p.A.getLogger(this),(0,Je.tW)(t,e))}};function Xe(e,t){const{overrides:r,context:s}=t;ee.forEachSublayer(e,(e=>e.read(r.get(e.id),s)))}(0,s._)([(0,c.MZ)({type:["BuildingSceneLayer"]})],We.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],We.prototype,"allSublayers",void 0),(0,s._)([(0,c.MZ)(Ke)],We.prototype,"sublayers",void 0),(0,s._)([(0,h.w)("service","sublayers")],We.prototype,"readSublayers",null),(0,s._)([(0,c.MZ)({type:Ue,nonNullable:!0,json:{write:!0}})],We.prototype,"filters",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],We.prototype,"activeFilterId",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:Ge})],We.prototype,"summaryStatistics",void 0),(0,s._)([(0,h.w)("summaryStatistics",["statisticsHRef"])],We.prototype,"readSummaryStatistics",null),(0,s._)([(0,c.MZ)({type:[String],json:{read:!1}})],We.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)(O.Fm)],We.prototype,"fullExtent",void 0),(0,s._)([(0,c.MZ)(O.fV)],We.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:["show","hide","hide-children"]})],We.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)((0,O.Qo)(m.A))],We.prototype,"spatialReference",void 0),(0,s._)([(0,c.MZ)(O.Yj)],We.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,s._)([(0,c.MZ)()],We.prototype,"associatedFeatureServiceItem",void 0),We=(0,s._)([(0,f.$)("esri.layers.BuildingSceneLayer")],We);const Ye=We},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new l.A;return i.read(s,r),[i]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,i.sM)(r,[o.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),d=r(29005);let y=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,s._)([(0,l.w)("domains")],y.prototype,"readDomains",null),(0,s._)([(0,p.K)("domains")],y.prototype,"writeDomains",null),(0,s._)([(0,n.MZ)({type:[d.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,s._)([(0,a.$)("esri.layers.support.FeatureType")],y);const c=y},91880:(e,t,r)=>{r.d(t,{A:()=>d});var s,i=r(90237),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new o.J({asc:"ascending",desc:"descending"});let u=s=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i._)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=s=(0,i._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const d=u},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>i});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=l(e);if(s&&(t>s[0]||r<s[1]))return"";const o=a(e,t,r),n=Array.from(o,(e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return n&&"1=1"!==n?n:""}function l(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r=0,maxScale:s=0}of e.filters)t[0]=Math.max(t[0],r||Number.POSITIVE_INFINITY),t[1]=Math.min(t[1],s);return t}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)p(s.minScale??0,s.maxScale??0,t,r)&&(yield s)}}function p(e,t,r,i){return e=0===e?Number.POSITIVE_INFINITY:e,r=0===r?Number.POSITIVE_INFINITY:r,!((i??r)>e||t>r||(0,s.Sp)(r,t)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>c,mX:()=>v,rU:()=>g,tH:()=>S});var s=r(799);const i="__begin__",o="__end__",n=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',d=u+" + ",y=" + "+u;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function v(e){let t;return e?(t=(0,s.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(n,d).replaceAll(l,y)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=b.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var s=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(59456),n=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),y=r(40608),c=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+s),(e=>i-e*n),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=s);const a=o.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(l[0]),i=r(l[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,y.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},41366:(e,t,r)=>{r.d(t,{K:()=>y,Q:()=>p});var s=r(90237),i=r(66552),o=r(53966),n=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const p=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",d="field",y=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,l.e)(p,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},45671:(e,t,r)=>{r.d(t,{D8:()=>o,TO:()=>i});var s=r(30524);async function i(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:i}=t,{objectIdField:o,typeIdField:n,globalIdField:l,relationships:a}=e;if(r.includes("*"))return["*"];const p=i?(0,s.eX)(e):[],u=(0,s.DB)(e.fieldsIndex,[...r,...p]);return n&&u.push(n),u&&o&&e.fieldsIndex?.has(o)&&!u.includes(o)&&u.push(o),u&&l&&e.fieldsIndex?.has(l)&&!u.includes(l)&&u.push(l),a&&a.forEach((t=>{const{keyField:r}=t;u&&r&&e.fieldsIndex?.has(r)&&!u.includes(r)&&u.push(r)})),u}function o(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3200,4307,9340],{52106:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(59456),n=r(13874),l=r(61147),a=r(69540),p=r(51447),u=r(25482),y=r(53966),d=r(36708),c=r(24326),h=r(10107),f=(r(44208),r(87811),r(40608)),m=r(65864);function g(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let v=s=class extends(a.A.ClonableMixin(u.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,p.eF)(y.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:u.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,d.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,d.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,m.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,i._)([(0,h.MZ)({value:null})],v.prototype,"attributes",null),(0,i._)([(0,h.MZ)({value:null,types:o.yR,json:{read:m.rS}})],v.prototype,"geometry",null),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,i._)([(0,h.MZ)({type:n.A})],v.prototype,"popupTemplate",void 0),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,i._)([(0,h.MZ)({value:null,types:l.Es})],v.prototype,"symbol",null),(0,i._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,i._)([(0,h.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=s=(0,i._)([(0,f.$)("esri.Graphic")],v);const _=v},38961:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(90237),i=r(5503),o=r(36708),n=r(10107),l=r(40608),a=r(80559);let p=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.MZ)()],p.prototype,"getCollections",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"itemFilterFunction",void 0),p=(0,s._)([(0,l.$)("esri.core.CollectionFlattener")],p);const u=p},81583:(e,t,r)=>{r.d(t,{L:()=>l,g:()=>n});var s=r(60999),i=r(5503),o=r(92474);async function n(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.A.isCollection(t)?t.forEach((e=>n(e))):o.A.isLoadable(t)&&r.push(t))};t(n);let l=null;if(await(0,s.Tj)(r,(async e=>{const t=await(0,s.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)})),l)throw l.error;return e}},39516:(e,t,r)=>{async function s(e,t){const{default:s}=await Promise.resolve().then(r.bind(r,88368));return s.create(e,{fieldsIndex:t})}function i(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function o(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>o,mA:()=>i})},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var s=r(90237),i=r(5503),o=r(38961),n=r(49186),l=r(4718),a=r(81583),p=r(53966),u=r(92071),y=r(74887),d=r(84952),c=r(10107),h=(r(44208),r(36005)),f=r(40608),m=r(16930),g=r(4146),v=r(52106),_=r(13874),b=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),M=r(78888),w=r(66552),S=r(92474),x=r(61893),A=(r(87811),r(93223)),T=r(5443),Z=r(13600),F=r(4902),I=r(56507),O=r(10873);let j=class extends(F.A.IdentifiableMixin(u.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],j.prototype,"title",void 0),(0,s._)([(0,h.w)("service","title",["alias","name"])],j.prototype,"readTitle",null),(0,s._)([(0,c.MZ)()],j.prototype,"layer",void 0),(0,s._)([(0,c.MZ)({type:I.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,isRequired:!0}}})],j.prototype,"id",void 0),(0,s._)([(0,h.w)("service","id")],j.prototype,"readIdOnlyOnce",null),(0,s._)([(0,c.MZ)((0,O.Qo)(String))],j.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)((0,O.Qo)(Boolean))],j.prototype,"isEmpty",void 0),(0,s._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],j.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],j.prototype,"visible",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!0}})],j.prototype,"opacity",void 0),j=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingSublayer")],j);const L=j;var R=r(4071),E=r(17036),N=r(95466),P=r(30524),B=r(83898),q=r(50805),C=r(61956),z=r(54218),$=r(30291),D=r(88625),G=r(4654),Q=r(45671);const k=(0,E.p)();let V=class extends(S.A.LoadableMixin(x.A.EsriPromiseMixin(L))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new N.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new Z.default({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,B.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,$.tn)(this,e)}async _fetchService(e){const t=(await(0,M.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:R.P,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:i}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:i}}}createQuery(){const e=new C.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(z.Et)}async queryCachedAttributes(e,t){const r=(0,P.hL)(this.fieldsIndex,await(0,Q.TO)(this,(0,Q.D8)(this)));return(0,G.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:q.W4,readOnly:!0})],V.prototype,"nodePages",void 0),(0,s._)([(0,c.MZ)({type:[q.uV],readOnly:!0})],V.prototype,"materialDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.Ot],readOnly:!0})],V.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,c.MZ)({type:[q.L0],readOnly:!0})],V.prototype,"geometryDefinitions",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"store",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],V.prototype,"rootNode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,c.MZ)(k.fields)],V.prototype,"fields",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"fieldsIndex",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Z.default})],V.prototype,"associatedLayer",void 0),(0,s._)([(0,h.w)("service","associatedLayer",["associatedLayerID"])],V.prototype,"readAssociatedLayer",null),(0,s._)([(0,c.MZ)(k.outFields)],V.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0})],V.prototype,"objectIdField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{read:!1}})],V.prototype,"displayField",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],V.prototype,"apiKey",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:String})],V.prototype,"customParameters",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:T.A})],V.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:m.A})],V.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"version",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:D.A})],V.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],V.prototype,"minScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],V.prototype,"maxScale",null),(0,s._)([(0,c.MZ)({readOnly:!0,type:Number})],V.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.MZ)({type:["hide","show"],json:{write:!0}})],V.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({types:b.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],V.prototype,"renderer",void 0),(0,s._)([(0,c.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],V.prototype,"definitionExpression",void 0),(0,s._)([(0,c.MZ)(O.M6)],V.prototype,"popupEnabled",void 0),(0,s._)([(0,c.MZ)({type:_.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],V.prototype,"popupTemplate",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],V.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.MZ)()],V.prototype,"types",null),(0,s._)([(0,c.MZ)()],V.prototype,"typeIdField",null),(0,s._)([(0,c.MZ)({json:{write:!1}}),(0,A.e)(new w.J({"3DObject":"3d-object",Point:"point"}))],V.prototype,"layerType",void 0),(0,s._)([(0,c.MZ)()],V.prototype,"geometryType",null),(0,s._)([(0,c.MZ)()],V.prototype,"profile",null),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],V.prototype,"statisticsInfo",void 0),V=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],V);const J=V;var U,K=r(67076);const H={type:i.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new i.A(e.map((e=>{const t=function(e){return"group"===e.layerType?X:J}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new K.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let X=U=class extends L{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,a.L)(this,(e=>U.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var Y;(0,s._)([(0,c.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],X.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)(H)],X.prototype,"sublayers",void 0),X=U=(0,s._)([(0,f.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],X),(Y=X||(X={})).sublayersProperty=H,Y.readSublayers=W,Y.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const ee=X;var te=r(52136),re=r(18768),se=r(69208),ie=r(16131),oe=r(8303),ne=r(25036),le=r(58947),ae=r(92009),pe=r(25482),ue=r(13069);let ye=class extends pe.A{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],ye.prototype,"type",void 0),ye=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfo")],ye);const de=ye;var ce;let he=ce=class extends pe.A{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new ce({filterType:this.filterType,filterValues:(0,l.o8)(this.filterValues)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:{isRequired:!0}}})],he.prototype,"filterType",void 0),(0,s._)([(0,c.MZ)({type:[String],json:{write:{isRequired:!0}}})],he.prototype,"filterValues",void 0),he=ce=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],he);const fe=he;var me;const ge=i.A.ofType(fe);let ve=me=class extends pe.A{clone(){return new me({filterTypes:(0,l.o8)(this.filterTypes)})}};(0,s._)([(0,c.MZ)({type:ge,json:{write:{isRequired:!0}}})],ve.prototype,"filterTypes",void 0),ve=me=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],ve);const _e=ve;var be;const Me=i.A.ofType(_e);let we=be=class extends de{constructor(){super(...arguments),this.type="checkbox"}clone(){return new be({filterBlocks:(0,l.o8)(this.filterBlocks)})}};(0,s._)([(0,c.MZ)({type:["checkbox"]})],we.prototype,"type",void 0),(0,s._)([(0,c.MZ)({type:Me,json:{write:{isRequired:!0}}})],we.prototype,"filterBlocks",void 0),we=be=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],we);const Se=we;let xe=class extends pe.A{};(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],xe.prototype,"type",void 0),xe=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterMode")],xe);const Ae=xe;var Te;let Ze=Te=class extends Ae{constructor(){super(...arguments),this.type="solid"}clone(){return new Te}};(0,s._)([(0,c.MZ)({type:["solid"],readOnly:!0,json:{write:{isRequired:!0}}})],Ze.prototype,"type",void 0),Ze=Te=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeSolid")],Ze);const Fe=Ze;var Ie,Oe=r(51734);let je=Ie=class extends Ae{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Ie({edges:(0,l.o8)(this.edges)})}};(0,s._)([(0,A.e)({wireFrame:"wire-frame"})],je.prototype,"type",void 0),(0,s._)([(0,c.MZ)(Oe.J)],je.prototype,"edges",void 0),je=Ie=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeWireFrame")],je);const Le=je;var Re;let Ee=Re=class extends Ae{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Re}};(0,s._)([(0,c.MZ)({type:["x-ray"],readOnly:!0,json:{write:{isRequired:!0}}})],Ee.prototype,"type",void 0),Ee=Re=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterModeXRay")],Ee);const Ne=Ee;var Pe;const Be={nonNullable:!0,types:{key:"type",base:Ae,typeMap:{solid:Fe,"wire-frame":Le,"x-ray":Ne}},json:{read:e=>{switch(e?.type){case"solid":return Fe.fromJSON(e);case"wireFrame":return Le.fromJSON(e);case"x-ray":return Ne.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let qe=Pe=class extends pe.A{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Fe,this.title=""}clone(){return new Pe({filterExpression:this.filterExpression,filterMode:(0,l.o8)(this.filterMode),title:this.title})}};(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"filterExpression",void 0),(0,s._)([(0,c.MZ)(Be)],qe.prototype,"filterMode",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"title",void 0),qe=Pe=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilterBlock")],qe);const Ce=qe;var ze;const $e=i.A.ofType(Ce);let De=ze=class extends pe.A{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,ue.lk)(),this.name=null}clone(){return new ze({description:this.description,filterBlocks:(0,l.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,l.o8)(this.filterAuthoringInfo)})}};(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],De.prototype,"description",void 0),(0,s._)([(0,c.MZ)({type:$e,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"filterBlocks",void 0),(0,s._)([(0,c.MZ)({types:{key:"type",base:de,typeMap:{checkbox:Se}},json:{read:e=>"checkbox"===e?.type?Se.fromJSON(e):null,write:!0}})],De.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,c.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"id",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"name",void 0),De=ze=(0,s._)([(0,f.$)("esri.layers.support.BuildingFilter")],De);const Ge=De;let Qe=class extends pe.A{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,c.MZ)({type:String})],Qe.prototype,"fieldName",void 0),(0,s._)([(0,c.MZ)({type:String})],Qe.prototype,"modelName",void 0),(0,s._)([(0,c.MZ)({type:String})],Qe.prototype,"label",void 0),(0,s._)([(0,c.MZ)({type:Number})],Qe.prototype,"min",void 0),(0,s._)([(0,c.MZ)({type:Number})],Qe.prototype,"max",void 0),(0,s._)([(0,c.MZ)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],Qe.prototype,"mostFrequentValues",void 0),(0,s._)([(0,c.MZ)({type:[Number]})],Qe.prototype,"subLayerIds",void 0),Qe=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],Qe);let ke=class extends(S.A.LoadableMixin(x.A.EsriPromiseMixin(pe.A))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,M.A)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,c.MZ)({constructOnly:!0,type:String})],ke.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:[Qe],json:{read:{source:"summary"}}})],ke.prototype,"fields",null),ke=(0,s._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics")],ke);const Ve=ke;var Je=r(24212);const Ue=i.A.ofType(Ge),Ke=(0,l.o8)(ee.sublayersProperty),He=Ke.json?.origins;He&&(He["web-scene"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},He["portal-item"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let We=class extends((0,le.w6)((0,re.b)((0,ie.q)((0,oe.A)((0,ne.j)((0,u.P)((0,se.d)((0,te.p)(g.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new Ue,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=ee.readSublayers(e,t,r);return ee.forEachSublayer(s,(e=>e.layer=this)),this._allSublayerOverrides&&(function(e,t){t.forEach((t=>Xe(e,t)))}(s,this._allSublayerOverrides),this._allSublayerOverrides=null),s}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const s=[];ee.forEachSublayer(e,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const s=r?.origin&&e.get(r.origin);s&&(t.sublayers=[],s.overrides.forEach((e=>{t.sublayers.push((0,l.o8)(e))})))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?Xe(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,d.fj)(this.parsedUrl?.path,t.statisticsHRef);return new Ve({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,a.g)(this,(e=>{ee.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(le.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(le.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ae.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.A.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,Je.XF)(p.A.getLogger(this),(0,Je.B)(t,"absolute-height",e)),(0,Je.XF)(p.A.getLogger(this),(0,Je.tW)(t,e))}};function Xe(e,t){const{overrides:r,context:s}=t;ee.forEachSublayer(e,(e=>e.read(r.get(e.id),s)))}(0,s._)([(0,c.MZ)({type:["BuildingSceneLayer"]})],We.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],We.prototype,"allSublayers",void 0),(0,s._)([(0,c.MZ)(Ke)],We.prototype,"sublayers",void 0),(0,s._)([(0,h.w)("service","sublayers")],We.prototype,"readSublayers",null),(0,s._)([(0,c.MZ)({type:Ue,nonNullable:!0,json:{write:!0}})],We.prototype,"filters",void 0),(0,s._)([(0,c.MZ)({type:String,json:{write:!0}})],We.prototype,"activeFilterId",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,type:Ve})],We.prototype,"summaryStatistics",void 0),(0,s._)([(0,h.w)("summaryStatistics",["statisticsHRef"])],We.prototype,"readSummaryStatistics",null),(0,s._)([(0,c.MZ)({type:[String],json:{read:!1}})],We.prototype,"outFields",void 0),(0,s._)([(0,c.MZ)(O.Fm)],We.prototype,"fullExtent",void 0),(0,s._)([(0,c.MZ)(O.fV)],We.prototype,"legendEnabled",void 0),(0,s._)([(0,c.MZ)({type:["show","hide","hide-children"]})],We.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)((0,O.Qo)(m.A))],We.prototype,"spatialReference",void 0),(0,s._)([(0,c.MZ)(O.Yj)],We.prototype,"elevationInfo",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,s._)([(0,c.MZ)()],We.prototype,"associatedFeatureServiceItem",void 0),We=(0,s._)([(0,f.$)("esri.layers.BuildingSceneLayer")],We);const Ye=We},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new l.A;return i.read(s,r),[i]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,s){const o=e.find((e=>!!e.field));o&&(0,i.sM)(r,[o.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),y=r(29005);let d=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,s._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,s._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,s._)([(0,n.MZ)({type:[y.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,s._)([(0,a.$)("esri.layers.support.FeatureType")],d);const c=d},91880:(e,t,r)=>{r.d(t,{A:()=>y});var s,i=r(90237),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new o.J({asc:"ascending",desc:"descending"});let u=s=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i._)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=s=(0,i._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const y=u},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>i});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=l(e);if(s&&(t>s[0]||r<s[1]))return"";const o=a(e,t,r),n=Array.from(o,(e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return n&&"1=1"!==n?n:""}function l(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r=0,maxScale:s=0}of e.filters)t[0]=Math.max(t[0],r||Number.POSITIVE_INFINITY),t[1]=Math.min(t[1],s);return t}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)p(s.minScale??0,s.maxScale??0,t,r)&&(yield s)}}function p(e,t,r,i){return e=0===e?Number.POSITIVE_INFINITY:e,r=0===r?Number.POSITIVE_INFINITY:r,!((i??r)>e||t>r||(0,s.Sp)(r,t)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>c,mX:()=>v,rU:()=>g,tH:()=>S});var s=r(799);const i="__begin__",o="__end__",n=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',y=u+" + ",d=" + "+u;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function v(e){let t;return e?(t=(0,s.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(n,y).replaceAll(l,d)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,w=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=b.exec(e)||M.exec(e);return t?t[1]||t[3]:(t=w.exec(e),t?t[2]:null)}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var s=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(59456),n=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),y=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+s),(e=>i-e*n),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=s);const a=o.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(l[0]),i=r(l[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>p});var s=r(90237),i=r(66552),o=r(53966),n=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const p=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",y="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&y||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==y&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,l.e)(p,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},45671:(e,t,r)=>{r.d(t,{D8:()=>o,TO:()=>i});var s=r(30524);async function i(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:i}=t,{objectIdField:o,typeIdField:n,globalIdField:l,relationships:a}=e;if(r.includes("*"))return["*"];const p=i?(0,s.eX)(e):[],u=(0,s.DB)(e.fieldsIndex,[...r,...p]);return n&&u.push(n),u&&o&&e.fieldsIndex?.has(o)&&!u.includes(o)&&u.push(o),u&&l&&e.fieldsIndex?.has(l)&&!u.includes(l)&&u.push(l),a&&a.forEach((t=>{const{keyField:r}=t;u&&r&&e.fieldsIndex?.has(r)&&!u.includes(r)&&u.push(r)})),u}function o(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[752],{67482:(e,t,s)=>{function n(e){return null!=a(e)||null!=o(e)}function r(e){return l.test(e)}function i(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=s.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},14607:(e,t,s)=>{s.d(t,{B:()=>u,GP:()=>a,qg:()=>p});var n=s(799),r=s(73444);const i={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,r.JK)()){let t=(e=e.toLowerCase())in i;if(!t){const s=e.split("-");s.length>1&&s[0]in i&&(e=s[0],t=!0),t||(e="en")}const[s,n,o="#,##0.###"]=i[e];return{decimal:s,group:n,pattern:o}}function a(e,t){const s=o((t={...t}).locale);t.customs=s;const n=t.pattern||s.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,s){const n=(s=s||{}).customs.group,r=s.customs.decimal,i=t.split(";"),o=i[0];if((t=i[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===s.fractional&&(s.places=0),t.replace(a,function(e,t,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const n=t.split("."),r="string"==typeof s.places&&s.places.indexOf(",");let i=s.places;r?i=s.places.slice(r+1):+i>=0||(i=(n[1]||[]).length),s.round<0||(e=Number(e.toFixed(Number(i))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||s.places){r&&(s.places=s.places.slice(0,Math.max(0,r)));const e=void 0!==s.places?s.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+i<a.length&&(o[1]=a.slice(0,Math.max(0,Number(i))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let p,c,d=n[0].lastIndexOf(",");if(-1!==d){p=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-p;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(p=c,c=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(e,u[0],{decimal:r,group:n,places:s.places,round:s.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),s=e.pattern||t.pattern,r=t.group,i=t.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const u=s.split(";");1===u.length&&u.push("-"+u[0]);const p=d(u,(t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,(t=>{const s={signed:!1,separator:e.strict?r:[r,""],fractional:e.fractional,decimal:i,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?s.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(s.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),s.places=o);const l=n[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),s=d(e.fractional,(t=>{let s="";return t&&0!==e.places&&(s="\\"+e.decimal,e.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+e.places+"}"),s}),!0);let n=t+s;return s&&(n="(?:(?:"+n+")|(?:"+s+"))"),n+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:r,decimal:i,factor:a}}function p(e,t){const s=u(t),n=new RegExp("^"+s.regexp+"$").exec(e);if(!n)return NaN;let r=n[1];if(!n[1]){if(!n[2])return NaN;r=n[2],s.factor*=-1}return r=r.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(r)*s.factor}function c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const s=e.groupSize,r=e.groupSize2;if(r){const e="(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*["+t+"]\\d{"+s+"})";return s-r>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*)"}),!0)}const d=(e,t,s)=>{if(!Array.isArray(e))return t(e);const n=[];for(let s=0;s<e.length;s++)n.push(t(e[s]));return f(n.join("|"),Boolean(s))},f=(e,t)=>"("+(t?"?:":"")+e+")"},40752:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Z}),s(59456);var n=s(78888),r=s(60999),i=s(67482),o=s(49186),a=s(53966),l=s(74887),u=s(84952),p=s(57251),c=s(7320),d=s(21325),f=s(28735),y=s(43334),m=s(92722),h=s(58376),g=s(83221),S=s(31464),x=s(19730),F=s(14607),N=s(30524);function w(e,t,s){t=(0,N.rS)(t)?.toLowerCase(),s=(0,N.rS)(s)?.toLowerCase();const n=e.map((e=>e.toLowerCase())),r=t?e[n.indexOf(t)]:null,i=s?e[n.indexOf(s)]:null;return{longitudeFieldName:r||e[n.indexOf(b.find((e=>n.includes(e))))],latitudeFieldName:i||e[n.indexOf(I.find((e=>n.includes(e))))]}}const I=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],b=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],C=/^\s*"([\S\s]*)"\s*$/,T=/""/g,_=[","," ",";","|","\t"];function*A(e,t,s){let n=0;for(;n<=e.length;){const r=e.indexOf(t,n),i=e.slice(n,r>-1?r:void 0);n+=i.length+t.length,s&&!i.trim()||(yield i)}}function E(e){const t=e.includes("\r\n")?"\r\n":"\n";return A(e,t,!0)}function v(e,t){return A(e,t,!1)}function O(e,t,s){e=e.trim(),t=t?.trim();const n=[],r=Array.from(new Set([s?.delimiter,..._])).filter((e=>null!=e));for(const s of r){const r=D(e,s).length,i=D(t,s).length??r;r>1&&n.push({weight:Math.min(r,i),delimiter:s})}const i=n.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of i){const n=w(q(e,t).names,s?.longitudeField,s?.latitudeField);if(n.longitudeFieldName&&n.latitudeFieldName)return{delimiter:t,locationInfo:n}}return{delimiter:i[0],locationInfo:null}}function*R(e,t,s,n=()=>Object.create(null)){const r=E(e);r.next();let i="",o="",a=0,l=n(),u=0;e:for(const e of r){const r=v(e,s);for(const e of r)if(i+=o+e,o="",a+=k(e),a%2==0){if(a>0){const e=C.exec(i);if(!e){l=n(),u=0,i="",a=0;continue e}l[t[u]]=e[1].replaceAll(T,'"'),u++}else l[t[u]]=i,u++;i="",a=0}else o=s;0===a?(yield l,l=n(),u=0):o="\n"}}function q(e,t){const s=D(e,t).filter((e=>null!=e)),n=s.map((e=>(0,N.rS)(e)));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),s.splice(e,1));return{names:n,aliases:s}}function D(e,t){if(!e?.length)return[];const s=[];let n="",r="",i=0;const o=v(e,t);for(const e of o)if(n+=r+e,r="",i+=k(e),i%2==0){if(i>0){const e=C.exec(n);e&&s.push(e[1].replaceAll(T,'"'))}else s.push(n);n="",i=0}else r=t;return s}function k(e){let t=0,s=0;for(s=e.indexOf('"',s);s>=0;)t++,s=e.indexOf('"',s+1);return t}function B(e,t,s,n,r){const i=[],o=R(e,s,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<s.length;e++){const t=s[e],o=n[e];if(t===r.longitudeFieldName||t===r.latitudeFieldName)i.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(M(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}i.push({name:t,type:e,alias:o,length:(0,N._b)(e)})}}return i}function M(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=z(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,i.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const z=function(){const e=(0,F.B)(),t=new RegExp("^"+e.regexp+"$"),s=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return r=>{const i=t.exec(r);if(e.factor=n,!i)return NaN;let o=i[1];if(!i[1]){if(!i[2])return NaN;o=i[2],e.factor*=-1}return o=o.replace(s,"").replace(e.decimal,"."),+o*e.factor}}();function j(e){return JSON.parse(JSON.stringify(e))}var P=s(64714),Q=s(95466),L=s(54218),U=s(56400),$=s(16930);const V=(0,P.F0)("esriGeometryPoint"),G=["csv"],H=[0,0];class W{constructor(e,t){this.x=e,this.y=t}}class Z{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const s=t.parsingOptions||{},n={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},r=n.layerDefinition={name:(0,u.e7)(t.url,G)||"csv",dateFieldsTimeReference:{timeZoneIANA:U.n$},drawingInfo:V,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},i=E(e),a=i.next().value?.trim(),l=i.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:p,locationInfo:c}=O(a,l,s);if(!p)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:s});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:s});n.locationInfo=c,n.delimiter=p;const{names:d,aliases:f}=q(a,p),y=B(e,n.delimiter,d,f,n.locationInfo);if(s.fields?.length){const e=new Q.A(s.fields);for(const t of y){const s=e.get(t.name);s&&Object.assign(t,s)}}if(!y.some((e=>"esriFieldTypeOID"===e.type&&(r.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};r.objectIdField=e.name,y.unshift(e)}r.fields=y;const m=new Q.A(r.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=m.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=m.get(n.locationInfo.longitudeFieldName).name),r.timeInfo){const e=r.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(r.timeInfo=null)}return n}(s,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const r=await this._createFeatures(s);this._queryEngine.featureStore.addMany(r);const{fullExtent:i,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=i,a){const{start:e,end:t}=a;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(L.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,h.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const r=(0,u.An)(t);return(await(0,n.A)(r.path,{query:{...r.query,...s},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:s,extent:n,timeInfo:r}=e.layerDefinition,i=new g.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new x.do({fieldsIndex:Q.A.fromLayerJSON({fields:s,dateFieldsTimeReference:{timeZoneIANA:U.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,objectIdField:t,spatialReference:n.spatialReference||{wkid:4326},featureStore:i})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:s}=this._locationInfo,{objectIdField:n,fieldsIndex:r,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=r.fields.filter((e=>e.name!==n)).map((e=>e.name));let h=0;const g={};for(const e of r.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,N.lD)(e);void 0!==t&&(g[e.name]=t)}const S=R(e,u,this._delimiter,(0,P.Vx)(g,n));for(const e of S){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[s]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[s]=u;for(const n in e)if(n!==t&&n!==s)if(r.isDateField(n))e[n]=(0,i._U)(e[n]);else if(r.isNumericField(n)){const t=z(e[n]);isNaN(t)?e[n]=null:e[n]=t}else null!=e[n]&&(e[n]=j(e[n]));e[n]=h,h++,a.push(new W(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,H);else a=(0,p.projectMany)(c.g,a,$.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:s}=a[e],r=l[e];r[n]=e+1,x.push(new y.Om(new m.A([],[t,s]),r,null,r[n]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=z(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,S.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>c,e2:()=>f,f:()=>y});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9465],{38961:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),i=r(5503),o=r(36708),l=r(10107),n=r(40608),a=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,s._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,n.$)("esri.core.CollectionFlattener")],u);const p=u},79465:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$});var s=r(90237),i=(r(59456),r(5503)),o=r(38961),l=r(92071),n=r(74887),a=r(36708),u=r(84952),p=r(10107),y=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),c=r(43937),d=r(16930),f=r(4146),m=r(63074),g=r(16131),v=r(8303),_=r(54310),b=r(25036),w=r(10873),M=r(65529),P=r(25482),S=r(92474),I=r(799),x=r(56507),F=r(92602),Z=r(70333),A=(r(13874),r(78888)),E=r(4718),O=r(70328),R=r(537);r(65494),r(22671);const G={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function k(e){const t=e.folders||[],r=t.slice(),s=new Map,i=new Map,o=new Map,l=new Map,n=new Map,a={esriGeometryPoint:i,esriGeometryPolyline:o,esriGeometryPolygon:l};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,E.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const n=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?T(i,n,e.featureSet.features):"esriGeometryPolyline"===r?T(o,n,e.featureSet.features):"esriGeometryPolygon"===r&&T(l,n,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{n.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const i=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);i&&r.push(i)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,E.o8)(s.get("esriGeometryPoint")),e.polylines=(0,E.o8)(s.get("esriGeometryPolyline")),e.polygons=(0,E.o8)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[G[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=n.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=H([e])}}));const u=H(r);return{folders:t,sublayers:r,extent:u}}function L(e,t,r,s){const i=Z.id?.findCredential(e);e=(0,u.a6)(e,{token:i?.token});const o=F.A.kmlServiceUrl;return(0,A.A)(o,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function C(e,t,r=null,s=[]){const i=[],o={},l=t.sublayers,n=new Set(t.folders.map((e=>e.id)));return l.forEach((t=>{const l=new e;if(r?l.read(t,r):l.read(t),s.length&&n.has(l.id)&&(l.visible=s.includes(l.id)),o[t.id]=l,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=o[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(l)}else i.unshift(l)})),i}function T(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function H(e){const t=(0,O.vt)(O.qv),r=(0,O.vt)(O.qv);for(const s of e){if(s.polygons?.featureSet?.features)for(const e of s.polygons.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(s.polylines?.featureSet?.features)for(const e of s.polylines.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(s.points?.featureSet?.features)for(const e of s.points.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,R.LJ)(t,e.extent),(0,O.RF)(r,t)}return(0,O.aI)(r,O.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:d.A.WGS84}}var U,N=r(5443);let j=U=class extends(M.A.EventedMixin(P.A.JSONSupportMixin(S.A))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.OH),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.OH),(0,a.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.OH),(0,a.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.OH)])}initialize(){(0,a.C_)((()=>this.networkLink)).then((()=>(0,a.C_)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=H(e.sublayers);this.fullExtent=N.A.fromJSON(t),this.sourceJSON=e;const r=(0,x.dp)(i.A.ofType(U),C(U,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return L(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>k(e.data)))}};(0,s._)([(0,p.MZ)()],j.prototype,"description",void 0),(0,s._)([(0,p.MZ)({type:N.A})],j.prototype,"fullExtent",void 0),(0,s._)([(0,p.MZ)()],j.prototype,"id",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,value:null})],j.prototype,"networkLink",void 0),(0,s._)([(0,p.MZ)({json:{write:{allowNull:!0}}})],j.prototype,"parent",void 0),(0,s._)([(0,p.MZ)({type:i.A.ofType(j),json:{write:{allowNull:!0}}})],j.prototype,"sublayers",void 0),(0,s._)([(0,p.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,I._e)(e)}}})],j.prototype,"title",void 0),(0,s._)([(0,p.MZ)({value:!0})],j.prototype,"visible",null),(0,s._)([(0,y.w)("visible",["visibility"])],j.prototype,"readVisible",null),(0,s._)([(0,p.MZ)()],j.prototype,"sourceJSON",void 0),(0,s._)([(0,p.MZ)()],j.prototype,"layer",void 0),j=U=(0,s._)([(0,h.$)("esri.layers.support.KMLSublayer")],j);const z=j,J=["kml","xml"];let q=class extends((0,m.dM)((0,_.J)((0,b.j)((0,g.q)((0,v.A)((0,l.P)(f.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=d.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.OH),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return C(z,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,J)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(n.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=k((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:L(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,p.MZ)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,s._)([(0,p.MZ)({type:d.A})],q.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,s._)([(0,p.MZ)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,s._)([(0,p.MZ)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.MZ)({})],q.prototype,"resourceInfo",void 0),(0,s._)([(0,p.MZ)({type:i.A.ofType(z),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,s._)([(0,y.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,y.w)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,s._)([(0,c.K)("sublayers")],q.prototype,"writeSublayers",null),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,s._)([(0,p.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,s._)([(0,p.MZ)(w.OZ)],q.prototype,"url",void 0),(0,s._)([(0,p.MZ)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,s._)([(0,p.MZ)({type:N.A})],q.prototype,"extent",void 0),(0,s._)([(0,p.MZ)()],q.prototype,"fullExtent",null),q=(0,s._)([(0,h.$)("esri.layers.KMLLayer")],q);const $=q},8303:(e,t,r)=>{r.d(t,{A:()=>M});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),p=r(97768),y=r(74887),h=r(84952),c=r(10107),d=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),v=r(20655),_=r(80812),b=r(41318),w=r(10407);const M=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,y.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,y.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!l||!(0,h.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const a=!0,u=!1,p=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,y.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=P.credential===t?P.user:await this._fetchEditingUser(e);return P.credential=t,P.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,h.S8)(i.restUrl)===(0,h.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,h.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,c.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,s._)([(0,d.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,c.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},P={credential:null,user:null}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(59456),l=r(52106),n=r(66552),a=r(25482),u=r(4718),p=r(10107),y=(r(44208),r(53966),r(36005)),h=r(40608),c=r(43937),d=r(16930),f=r(65864),m=r(20437);const g=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=d.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,l=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)l?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,l]}=r;let n=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;n=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+s),(e=>i-e*l),n,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=d.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],l=r.fromJSON(o),n=o.geometry?.spatialReference;null==l.geometry||n||(l.geometry.spatialReference=s);const a=o.aggregateGeometries,u=l.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(l)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let l=0,n=e.length;l<n;l++){const n=e[l];if(l>0){const e=t(n[0]),l=r(n[1]);e===s&&l===i||(o.push([e-s,l-i]),s=e,i=l)}else s=t(n[0]),i=r(n[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],l=this._quantizePoints(o,t,r);l&&i.push(l)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(l+=i[0],n+=i[1]):(l=i[0],n=i[1]),i[0]=t(l),i[1]=r(n)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(l+=s[0],n+=s[1]):(l=s[0],n=s[1]),s[0]=t(l),s[1]=r(n)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,p.MZ)({type:[l.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,p.MZ)({type:d.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,h.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9465],{52106:(e,t,r)=>{r.d(t,{A:()=>b});var s,i=r(90237),o=r(59456),l=r(13874),n=r(61147),a=r(69540),u=r(51447),p=r(25482),y=r(53966),h=r(36708),c=r(24326),f=r(10107),d=(r(44208),r(87811),r(40608)),g=r(65864);function m(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let v=s=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(y.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:m(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:p.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,h.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,h.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,f.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,g.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,i._)([(0,f.MZ)({value:null})],v.prototype,"attributes",null),(0,i._)([(0,f.MZ)({value:null,types:o.yR,json:{read:g.rS}})],v.prototype,"geometry",null),(0,i._)([(0,f.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,i._)([(0,f.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,i._)([(0,f.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,i._)([(0,f.MZ)({type:l.A})],v.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,i._)([(0,f.MZ)({value:null,types:n.Es})],v.prototype,"symbol",null),(0,i._)([(0,f.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,i._)([(0,f.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=s=(0,i._)([(0,d.$)("esri.Graphic")],v);const b=v},38961:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),i=r(5503),o=r(36708),l=r(10107),n=r(40608),a=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,s._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,n.$)("esri.core.CollectionFlattener")],u);const p=u},79465:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$});var s=r(90237),i=(r(59456),r(5503)),o=r(38961),l=r(92071),n=r(74887),a=r(36708),u=r(84952),p=r(10107),y=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),c=r(43937),f=r(16930),d=r(4146),g=r(63074),m=r(16131),v=r(8303),b=r(54310),_=r(25036),M=r(10873),w=r(65529),S=r(25482),P=r(92474),x=r(799),I=r(56507),A=r(92602),Z=r(70333),F=(r(13874),r(78888)),T=r(4718),L=r(70328),O=r(537);r(65494),r(22671);const G={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function E(e){const t=e.folders||[],r=t.slice(),s=new Map,i=new Map,o=new Map,l=new Map,n=new Map,a={esriGeometryPoint:i,esriGeometryPolyline:o,esriGeometryPolygon:l};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,T.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;s.set(r,t);const n=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?k(i,n,e.featureSet.features):"esriGeometryPolyline"===r?k(o,n,e.featureSet.features):"esriGeometryPolygon"===r&&k(l,n,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{n.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((s=>{const i=function(e,t,r){const s=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return s&&(s.parentFolderId=t,s.networkLink=s),s}(s,t.id,e.networkLinks);i&&r.push(i)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,T.o8)(s.get("esriGeometryPoint")),e.polylines=(0,T.o8)(s.get("esriGeometryPolyline")),e.polygons=(0,T.o8)(s.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[G[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=n.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=j([e])}}));const u=j(r);return{folders:t,sublayers:r,extent:u}}function R(e,t,r,s){const i=Z.id?.findCredential(e);e=(0,u.a6)(e,{token:i?.token});const o=A.A.kmlServiceUrl;return(0,F.A)(o,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:s})}function C(e,t,r=null,s=[]){const i=[],o={},l=t.sublayers,n=new Set(t.folders.map((e=>e.id)));return l.forEach((t=>{const l=new e;if(r?l.read(t,r):l.read(t),s.length&&n.has(l.id)&&(l.visible=s.includes(l.id)),o[t.id]=l,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=o[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(l)}else i.unshift(l)})),i}function k(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function j(e){const t=(0,L.vt)(L.qv),r=(0,L.vt)(L.qv);for(const s of e){if(s.polygons?.featureSet?.features)for(const e of s.polygons.featureSet.features)(0,O.LJ)(t,e.geometry),(0,L.RF)(r,t);if(s.polylines?.featureSet?.features)for(const e of s.polylines.featureSet.features)(0,O.LJ)(t,e.geometry),(0,L.RF)(r,t);if(s.points?.featureSet?.features)for(const e of s.points.featureSet.features)(0,O.LJ)(t,e.geometry),(0,L.RF)(r,t);if(s.mapImages)for(const e of s.mapImages)(0,O.LJ)(t,e.extent),(0,L.RF)(r,t)}return(0,L.aI)(r,L.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var N,J=r(5443);let z=N=class extends(w.A.EventedMixin(S.A.JSONSupportMixin(P.A))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.OH),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.OH),(0,a.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.OH),(0,a.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.OH)])}initialize(){(0,a.C_)((()=>this.networkLink)).then((()=>(0,a.C_)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=j(e.sublayers);this.fullExtent=J.A.fromJSON(t),this.sourceJSON=e;const r=(0,I.dp)(i.A.ofType(N),C(N,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return R(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>E(e.data)))}};(0,s._)([(0,p.MZ)()],z.prototype,"description",void 0),(0,s._)([(0,p.MZ)({type:J.A})],z.prototype,"fullExtent",void 0),(0,s._)([(0,p.MZ)()],z.prototype,"id",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,value:null})],z.prototype,"networkLink",void 0),(0,s._)([(0,p.MZ)({json:{write:{allowNull:!0}}})],z.prototype,"parent",void 0),(0,s._)([(0,p.MZ)({type:i.A.ofType(z),json:{write:{allowNull:!0}}})],z.prototype,"sublayers",void 0),(0,s._)([(0,p.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,x._e)(e)}}})],z.prototype,"title",void 0),(0,s._)([(0,p.MZ)({value:!0})],z.prototype,"visible",null),(0,s._)([(0,y.w)("visible",["visibility"])],z.prototype,"readVisible",null),(0,s._)([(0,p.MZ)()],z.prototype,"sourceJSON",void 0),(0,s._)([(0,p.MZ)()],z.prototype,"layer",void 0),z=N=(0,s._)([(0,h.$)("esri.layers.support.KMLSublayer")],z);const H=z,U=["kml","xml"];let q=class extends((0,g.dM)((0,b.J)((0,_.j)((0,m.q)((0,v.A)((0,l.P)(d.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.OH),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return C(H,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],s=e.toArray();for(;s.length;){const e=s[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&s.push(...e.sublayers.toArray())),s.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,U)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(n.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=E((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:R(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const s of r.sublayers.items)t(s),s.visible&&s.fullExtent&&(null!=e?e.union(s.fullExtent):e=s.fullExtent.clone())};return t(this),e}};(0,s._)([(0,p.MZ)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,s._)([(0,p.MZ)({type:f.A})],q.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,s._)([(0,p.MZ)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,s._)([(0,p.MZ)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.MZ)({})],q.prototype,"resourceInfo",void 0),(0,s._)([(0,p.MZ)({type:i.A.ofType(H),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,s._)([(0,y.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,s._)([(0,y.w)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,s._)([(0,c.K)("sublayers")],q.prototype,"writeSublayers",null),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,s._)([(0,p.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,s._)([(0,p.MZ)(M.OZ)],q.prototype,"url",void 0),(0,s._)([(0,p.MZ)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,s._)([(0,p.MZ)({type:J.A})],q.prototype,"extent",void 0),(0,s._)([(0,p.MZ)()],q.prototype,"fullExtent",null),q=(0,s._)([(0,h.$)("esri.layers.KMLLayer")],q);const $=q},8303:(e,t,r)=>{r.d(t,{A:()=>w});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),p=r(97768),y=r(74887),h=r(84952),c=r(10107),f=(r(44208),r(87811),r(36005)),d=r(40608),g=r(43937),m=r(83531),v=r(20655),b=r(80812),_=r(41318),M=r(10407);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,y.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,y.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,m.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!l||!(0,h.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const a=!0,u=!1,p=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,y.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,M.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,h.S8)(i.restUrl)===(0,h.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,p=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?_.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,h.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,c.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,s._)([(0,f.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,c.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,d.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var s,i=r(90237),o=r(59456),l=r(52106),n=r(66552),a=r(25482),u=r(4718),p=r(10107),y=(r(44208),r(53966),r(36005)),h=r(40608),c=r(43937),f=r(16930),d=r(65864),g=r(20437);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,s){if(e)return void m.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,d.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=f.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,l=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)l?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,l]}=r;let n=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;n=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+s),(e=>i-e*l),n,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=f.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],l=r.fromJSON(o),n=o.geometry?.spatialReference;null==l.geometry||n||(l.geometry.spatialReference=s);const a=o.aggregateGeometries,u=l.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(l)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let l=0,n=e.length;l<n;l++){const n=e[l];if(l>0){const e=t(n[0]),l=r(n[1]);e===s&&l===i||(o.push([e-s,l-i]),s=e,i=l)}else s=t(n[0]),i=r(n[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,d.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],l=this._quantizePoints(o,t,r);l&&i.push(l)}return i.length>0?((0,d.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,d.Bi)(e)?e.rings:e.paths;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(l+=i[0],n+=i[1]):(l=i[0],n=i[1]),i[0]=t(l),i[1]=r(n)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let l,n;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(l+=s[0],n+=s[1]):(l=s[0],n=s[1]),s[0]=t(l),s[1]=r(n)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,p.MZ)({type:[l.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i._)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,i._)([(0,p.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i._)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i._)([(0,p.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i._)([(0,h.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v}}]);