@arcgis/map-components 5.1.0-next.104 → 5.1.0-next.105

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 (263) hide show
  1. package/dist/cdn/3AKJIFJP.js +2 -0
  2. package/dist/cdn/6IRKJ76J.js +2 -0
  3. package/dist/cdn/6QJQJ4I7.js +2 -0
  4. package/dist/cdn/FMT63SES.js +2 -0
  5. package/dist/cdn/IMSDXTQ5.js +2 -0
  6. package/dist/cdn/JFWOTBXI.js +2 -0
  7. package/dist/cdn/JIAEOA2S.js +2 -0
  8. package/dist/cdn/PKV6NA3M.js +2 -0
  9. package/dist/cdn/TKQLQE4E.js +2 -0
  10. package/dist/cdn/TZVSBVJN.js +2 -0
  11. package/dist/cdn/{KASY64TA.js → UQCQAL4T.js} +1 -1
  12. package/dist/cdn/{UCPJMQPU.js → VVIDVEKK.js} +1 -1
  13. package/dist/cdn/{AWQHNAWY.js → XB5I52AG.js} +1 -1
  14. package/dist/cdn/XIJGC7OK.js +2 -0
  15. package/dist/cdn/assets/feature-next/t9n/messages.ar.json +1 -0
  16. package/dist/cdn/assets/feature-next/t9n/messages.bg.json +1 -0
  17. package/dist/cdn/assets/feature-next/t9n/messages.bs.json +1 -0
  18. package/dist/cdn/assets/feature-next/t9n/messages.ca.json +1 -0
  19. package/dist/cdn/assets/feature-next/t9n/messages.cs.json +1 -0
  20. package/dist/cdn/assets/feature-next/t9n/messages.da.json +1 -0
  21. package/dist/cdn/assets/feature-next/t9n/messages.de.json +1 -0
  22. package/dist/cdn/assets/feature-next/t9n/messages.el.json +1 -0
  23. package/dist/cdn/assets/feature-next/t9n/messages.en.json +1 -0
  24. package/dist/cdn/assets/feature-next/t9n/messages.es.json +1 -0
  25. package/dist/cdn/assets/feature-next/t9n/messages.et.json +1 -0
  26. package/dist/cdn/assets/feature-next/t9n/messages.fi.json +1 -0
  27. package/dist/cdn/assets/feature-next/t9n/messages.fr.json +1 -0
  28. package/dist/cdn/assets/feature-next/t9n/messages.he.json +1 -0
  29. package/dist/cdn/assets/feature-next/t9n/messages.hr.json +1 -0
  30. package/dist/cdn/assets/feature-next/t9n/messages.hu.json +1 -0
  31. package/dist/cdn/assets/feature-next/t9n/messages.id.json +1 -0
  32. package/dist/cdn/assets/feature-next/t9n/messages.it.json +1 -0
  33. package/dist/cdn/assets/feature-next/t9n/messages.ja.json +1 -0
  34. package/dist/cdn/assets/feature-next/t9n/messages.ko.json +1 -0
  35. package/dist/cdn/assets/feature-next/t9n/messages.lt.json +1 -0
  36. package/dist/cdn/assets/feature-next/t9n/messages.lv.json +1 -0
  37. package/dist/cdn/assets/feature-next/t9n/messages.nl.json +1 -0
  38. package/dist/cdn/assets/feature-next/t9n/messages.no.json +1 -0
  39. package/dist/cdn/assets/feature-next/t9n/messages.pl.json +1 -0
  40. package/dist/cdn/assets/feature-next/t9n/messages.pt-BR.json +1 -0
  41. package/dist/cdn/assets/feature-next/t9n/messages.pt-PT.json +1 -0
  42. package/dist/cdn/assets/feature-next/t9n/messages.ro.json +1 -0
  43. package/dist/cdn/assets/feature-next/t9n/messages.ru.json +1 -0
  44. package/dist/cdn/assets/feature-next/t9n/messages.sk.json +1 -0
  45. package/dist/cdn/assets/feature-next/t9n/messages.sl.json +1 -0
  46. package/dist/cdn/assets/feature-next/t9n/messages.sr.json +1 -0
  47. package/dist/cdn/assets/feature-next/t9n/messages.sv.json +1 -0
  48. package/dist/cdn/assets/feature-next/t9n/messages.th.json +1 -0
  49. package/dist/cdn/assets/feature-next/t9n/messages.tr.json +1 -0
  50. package/dist/cdn/assets/feature-next/t9n/messages.uk.json +1 -0
  51. package/dist/cdn/assets/feature-next/t9n/messages.vi.json +1 -0
  52. package/dist/cdn/assets/feature-next/t9n/messages.zh-CN.json +1 -0
  53. package/dist/cdn/assets/feature-next/t9n/messages.zh-HK.json +1 -0
  54. package/dist/cdn/assets/feature-next/t9n/messages.zh-TW.json +1 -0
  55. package/dist/cdn/assets/features/t9n/messages.ar.json +1 -1
  56. package/dist/cdn/assets/features/t9n/messages.bg.json +1 -1
  57. package/dist/cdn/assets/features/t9n/messages.bs.json +1 -1
  58. package/dist/cdn/assets/features/t9n/messages.ca.json +1 -1
  59. package/dist/cdn/assets/features/t9n/messages.cs.json +1 -1
  60. package/dist/cdn/assets/features/t9n/messages.da.json +1 -1
  61. package/dist/cdn/assets/features/t9n/messages.de.json +1 -1
  62. package/dist/cdn/assets/features/t9n/messages.el.json +1 -1
  63. package/dist/cdn/assets/features/t9n/messages.en.json +1 -1
  64. package/dist/cdn/assets/features/t9n/messages.es.json +1 -1
  65. package/dist/cdn/assets/features/t9n/messages.et.json +1 -1
  66. package/dist/cdn/assets/features/t9n/messages.fi.json +1 -1
  67. package/dist/cdn/assets/features/t9n/messages.fr.json +1 -1
  68. package/dist/cdn/assets/features/t9n/messages.he.json +1 -1
  69. package/dist/cdn/assets/features/t9n/messages.hr.json +1 -1
  70. package/dist/cdn/assets/features/t9n/messages.hu.json +1 -1
  71. package/dist/cdn/assets/features/t9n/messages.id.json +1 -1
  72. package/dist/cdn/assets/features/t9n/messages.it.json +1 -1
  73. package/dist/cdn/assets/features/t9n/messages.ja.json +1 -1
  74. package/dist/cdn/assets/features/t9n/messages.ko.json +1 -1
  75. package/dist/cdn/assets/features/t9n/messages.lt.json +1 -1
  76. package/dist/cdn/assets/features/t9n/messages.lv.json +1 -1
  77. package/dist/cdn/assets/features/t9n/messages.nl.json +1 -1
  78. package/dist/cdn/assets/features/t9n/messages.no.json +1 -1
  79. package/dist/cdn/assets/features/t9n/messages.pl.json +1 -1
  80. package/dist/cdn/assets/features/t9n/messages.pt-BR.json +1 -1
  81. package/dist/cdn/assets/features/t9n/messages.pt-PT.json +1 -1
  82. package/dist/cdn/assets/features/t9n/messages.ro.json +1 -1
  83. package/dist/cdn/assets/features/t9n/messages.ru.json +1 -1
  84. package/dist/cdn/assets/features/t9n/messages.sk.json +1 -1
  85. package/dist/cdn/assets/features/t9n/messages.sl.json +1 -1
  86. package/dist/cdn/assets/features/t9n/messages.sr.json +1 -1
  87. package/dist/cdn/assets/features/t9n/messages.sv.json +1 -1
  88. package/dist/cdn/assets/features/t9n/messages.th.json +1 -1
  89. package/dist/cdn/assets/features/t9n/messages.tr.json +1 -1
  90. package/dist/cdn/assets/features/t9n/messages.uk.json +1 -1
  91. package/dist/cdn/assets/features/t9n/messages.vi.json +1 -1
  92. package/dist/cdn/assets/features/t9n/messages.zh-CN.json +1 -1
  93. package/dist/cdn/assets/features/t9n/messages.zh-HK.json +1 -1
  94. package/dist/cdn/assets/features/t9n/messages.zh-TW.json +1 -1
  95. package/dist/cdn/assets/features-next/t9n/messages.ar.json +1 -0
  96. package/dist/cdn/assets/features-next/t9n/messages.bg.json +1 -0
  97. package/dist/cdn/assets/features-next/t9n/messages.bs.json +1 -0
  98. package/dist/cdn/assets/features-next/t9n/messages.ca.json +1 -0
  99. package/dist/cdn/assets/features-next/t9n/messages.cs.json +1 -0
  100. package/dist/cdn/assets/features-next/t9n/messages.da.json +1 -0
  101. package/dist/cdn/assets/features-next/t9n/messages.de.json +1 -0
  102. package/dist/cdn/assets/features-next/t9n/messages.el.json +1 -0
  103. package/dist/cdn/assets/features-next/t9n/messages.en.json +1 -0
  104. package/dist/cdn/assets/features-next/t9n/messages.es.json +1 -0
  105. package/dist/cdn/assets/features-next/t9n/messages.et.json +1 -0
  106. package/dist/cdn/assets/features-next/t9n/messages.fi.json +1 -0
  107. package/dist/cdn/assets/features-next/t9n/messages.fr.json +1 -0
  108. package/dist/cdn/assets/features-next/t9n/messages.he.json +1 -0
  109. package/dist/cdn/assets/features-next/t9n/messages.hr.json +1 -0
  110. package/dist/cdn/assets/features-next/t9n/messages.hu.json +1 -0
  111. package/dist/cdn/assets/features-next/t9n/messages.id.json +1 -0
  112. package/dist/cdn/assets/features-next/t9n/messages.it.json +1 -0
  113. package/dist/cdn/assets/features-next/t9n/messages.ja.json +1 -0
  114. package/dist/cdn/assets/features-next/t9n/messages.ko.json +1 -0
  115. package/dist/cdn/assets/features-next/t9n/messages.lt.json +1 -0
  116. package/dist/cdn/assets/features-next/t9n/messages.lv.json +1 -0
  117. package/dist/cdn/assets/features-next/t9n/messages.nl.json +1 -0
  118. package/dist/cdn/assets/features-next/t9n/messages.no.json +1 -0
  119. package/dist/cdn/assets/features-next/t9n/messages.pl.json +1 -0
  120. package/dist/cdn/assets/features-next/t9n/messages.pt-BR.json +1 -0
  121. package/dist/cdn/assets/features-next/t9n/messages.pt-PT.json +1 -0
  122. package/dist/cdn/assets/features-next/t9n/messages.ro.json +1 -0
  123. package/dist/cdn/assets/features-next/t9n/messages.ru.json +1 -0
  124. package/dist/cdn/assets/features-next/t9n/messages.sk.json +1 -0
  125. package/dist/cdn/assets/features-next/t9n/messages.sl.json +1 -0
  126. package/dist/cdn/assets/features-next/t9n/messages.sr.json +1 -0
  127. package/dist/cdn/assets/features-next/t9n/messages.sv.json +1 -0
  128. package/dist/cdn/assets/features-next/t9n/messages.th.json +1 -0
  129. package/dist/cdn/assets/features-next/t9n/messages.tr.json +1 -0
  130. package/dist/cdn/assets/features-next/t9n/messages.uk.json +1 -0
  131. package/dist/cdn/assets/features-next/t9n/messages.vi.json +1 -0
  132. package/dist/cdn/assets/features-next/t9n/messages.zh-CN.json +1 -0
  133. package/dist/cdn/assets/features-next/t9n/messages.zh-HK.json +1 -0
  134. package/dist/cdn/assets/features-next/t9n/messages.zh-TW.json +1 -0
  135. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ar.json +1 -1
  136. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.bg.json +1 -1
  137. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.bs.json +1 -1
  138. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ca.json +1 -1
  139. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.cs.json +1 -1
  140. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.da.json +1 -1
  141. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.de.json +1 -1
  142. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.el.json +1 -1
  143. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.es.json +1 -1
  144. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.et.json +1 -1
  145. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.fi.json +1 -1
  146. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.fr.json +1 -1
  147. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.he.json +1 -1
  148. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.hr.json +1 -1
  149. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.hu.json +1 -1
  150. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.id.json +1 -1
  151. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.it.json +1 -1
  152. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ja.json +1 -1
  153. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ko.json +1 -1
  154. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.lt.json +1 -1
  155. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.lv.json +1 -1
  156. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.nl.json +1 -1
  157. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.no.json +1 -1
  158. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pl.json +1 -1
  159. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pt-BR.json +1 -1
  160. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.pt-PT.json +1 -1
  161. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ro.json +1 -1
  162. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.ru.json +1 -1
  163. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sk.json +1 -1
  164. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sl.json +1 -1
  165. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sr.json +1 -1
  166. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.sv.json +1 -1
  167. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.th.json +1 -1
  168. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.tr.json +1 -1
  169. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.uk.json +1 -1
  170. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.vi.json +1 -1
  171. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-CN.json +1 -1
  172. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-HK.json +1 -1
  173. package/dist/cdn/assets/utility-network-trace-analysis/t9n/messages.zh-TW.json +1 -1
  174. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ar.json +1 -1
  175. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bg.json +1 -1
  176. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bs.json +1 -1
  177. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ca.json +1 -1
  178. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.cs.json +1 -1
  179. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.da.json +1 -1
  180. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.de.json +1 -1
  181. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.el.json +1 -1
  182. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.es.json +1 -1
  183. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.et.json +1 -1
  184. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fi.json +1 -1
  185. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fr.json +1 -1
  186. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.he.json +1 -1
  187. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hr.json +1 -1
  188. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hu.json +1 -1
  189. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.id.json +1 -1
  190. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.it.json +1 -1
  191. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ja.json +1 -1
  192. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ko.json +1 -1
  193. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lt.json +1 -1
  194. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lv.json +1 -1
  195. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.nl.json +1 -1
  196. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.no.json +1 -1
  197. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pl.json +1 -1
  198. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-BR.json +1 -1
  199. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-PT.json +1 -1
  200. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ro.json +1 -1
  201. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ru.json +1 -1
  202. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sk.json +1 -1
  203. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sl.json +1 -1
  204. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sr.json +1 -1
  205. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sv.json +1 -1
  206. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.th.json +1 -1
  207. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.tr.json +1 -1
  208. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.uk.json +1 -1
  209. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.vi.json +1 -1
  210. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-CN.json +1 -1
  211. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-HK.json +1 -1
  212. package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-TW.json +1 -1
  213. package/dist/cdn/index.js +1 -1
  214. package/dist/cdn/main.css +1 -1
  215. package/dist/chunks/action-utils.js +37 -23
  216. package/dist/components/arcgis-aggregated-features/customElement.js +1 -1
  217. package/dist/components/arcgis-aggregated-features/index.js +1 -1
  218. package/dist/components/arcgis-bookmarks/customElement.d.ts +1 -1
  219. package/dist/components/arcgis-feature/customElement.d.ts +4 -4
  220. package/dist/components/arcgis-feature/customElement.js +69 -111
  221. package/dist/components/arcgis-feature-next/customElement.d.ts +444 -0
  222. package/dist/components/arcgis-feature-next/customElement.js +279 -0
  223. package/dist/components/arcgis-feature-next/index.d.ts +1 -0
  224. package/dist/components/arcgis-feature-next/index.js +13 -0
  225. package/dist/components/arcgis-feature-relationship/customElement.js +76 -73
  226. package/dist/components/arcgis-feature-relationship/index.js +1 -0
  227. package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +18 -15
  228. package/dist/components/arcgis-feature-utility-network-association-list/index.js +1 -0
  229. package/dist/components/arcgis-feature-utility-network-associations/customElement.js +63 -53
  230. package/dist/components/arcgis-features/customElement.d.ts +28 -52
  231. package/dist/components/arcgis-features/customElement.js +181 -184
  232. package/dist/components/arcgis-features/index.js +0 -1
  233. package/dist/components/arcgis-features-next/customElement.d.ts +678 -0
  234. package/dist/components/arcgis-features-next/customElement.js +400 -0
  235. package/dist/components/arcgis-features-next/index.d.ts +1 -0
  236. package/dist/components/arcgis-features-next/index.js +15 -0
  237. package/dist/components/arcgis-popup/customElement.d.ts +2 -2
  238. package/dist/components/arcgis-popup/customElement.js +1 -1
  239. package/dist/components/arcgis-popup/index.js +1 -1
  240. package/dist/components/arcgis-search/customElement.d.ts +1 -1
  241. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +32 -33
  242. package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +5 -0
  243. package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +47 -47
  244. package/dist/docs/api.json +1 -1
  245. package/dist/docs/docs.json +1 -1
  246. package/dist/docs/vscode.html-custom-data.json +1 -1
  247. package/dist/docs/web-types.json +1 -1
  248. package/dist/index.d.ts +20 -0
  249. package/dist/loader.js +7 -5
  250. package/dist/types/lumina.d.ts +17 -1
  251. package/dist/types/preact.d.ts +19 -1
  252. package/dist/types/react.d.ts +21 -1
  253. package/dist/types/stencil.d.ts +17 -1
  254. package/package.json +4 -4
  255. package/dist/cdn/37PU5RQF.js +0 -2
  256. package/dist/cdn/6U7WM64M.js +0 -2
  257. package/dist/cdn/AHWGHYPQ.js +0 -2
  258. package/dist/cdn/FNHPWOUX.js +0 -2
  259. package/dist/cdn/HVKDLP74.js +0 -2
  260. package/dist/cdn/LTUURA6B.js +0 -2
  261. package/dist/cdn/SKRNQKVO.js +0 -2
  262. package/dist/cdn/W2QDJLIF.js +0 -2
  263. package/dist/cdn/XIN3BIAA.js +0 -2
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as b}from"./MP6Z45SA.js";import c from"./VCOJNSMR.js";import a from"./R3NYK6BO.js";import{a as P}from"./HMWOHSHV.js";import{d as R}from"./TGNR3DAP.js";import{M as O,N as S,O as j,P as q,S as L,U as Q,a as x,b as o}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([{templateHasKey:V,stripHTML:k},{renderingSanitizer:H},{isRelatableFeatureSupportedLayer:J,findRelatedLayer:U},{substitute:X,formatNumber:T},{watch:_,on:Y},K,z,{ignoreAbortErrors:D},ee,,{g:B}])=>{var te=x`:host{position:relative;flex:1 1 auto}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,re=y=>{let e=[];if(y.formTemplate){let{description:t,title:r}=y.formTemplate;y.fields?.forEach(i=>{let s=r&&V(r,i.name),a=t&&V(t,i.name);(s||a)&&e.push(i.name)})}return e},M=100,E=class extends j{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await D(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await D(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await D(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=b(this._queryController,M),this._queryFeatureCountDebounced=b(this._queryFeatureCountController,M),this._queryPageDebounced=b(this._queryPageController,M),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=O(),this.relatedFeatures=new K,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new K,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=te}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=B(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&J(e.parent)?e.parent:e;return U(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return X(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[_(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),_(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),_(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),_(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),Y(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:f}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:v}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:w}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),I=w.map(({count:u,value:c})=>{let m=t.subtypes?.find(A=>A.code===c)?.name;return c!=null&&m?{count:u,value:c,name:m}:void 0}).filter(u=>u!=null);this.allCategories=I}return}let{historicMoment:p,gdbVersion:C}=e,F=new z({cacheHint:f,gdbVersion:C,historicMoment:p,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),h=await e.queryRelatedFeaturesCount(F,{signal:r?.signal});this.allCategories=void 0,this.featureCount=h[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:f,showAllEnabled:p,supportsCacheHint:C}=this,{canQuery:F,objectId:h}=this;if(!F||!a||!l||h==null)return[];let v=p?((i-1)*s+r)%r:0,w=p?s:t,I=l.objectIdField,u="subtypeField"in l?l.subtypeField:void 0,c=[...n.map(d=>d.field),...re(l),...g,I,u].filter(d=>d!=null),m=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,W=new z({orderByFields:m,start:v,num:w,outFields:c,cacheHint:C,historicMoment:A,gdbVersion:Z,relationshipId:f,returnGeometry:!1,objectIds:[h],where:this._getRelationshipWhereClause(l)}),$=(await a.queryRelatedFeatures(W,{signal:e?.signal}))[h]?.features||[];return l.type==="subtype-group"&&u?$.forEach(d=>{let G=d.attributes[u],N=l.findSublayerForSubtypeCode?.(G);d.sourceLayer=N,d.layer=N}):$.forEach(d=>{d.sourceLayer=l,d.layer=l}),$}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;t&&this._addFlowItem(L(P(e,o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)))}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(L(P(t,o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`)))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new ee({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${q(R("list-item",{"list-item-hidden":s==="loading"}))} .description=${k(l.toString())} .label=${k(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}><div slot=heading><div .innerHTML=${H.sanitize(a??"")??""}></div></div><div slot=description><div .innerHTML=${H.sanitize(l??"")??""}></div></div>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class="feature-observer" ${S(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${q(R("list",{"list-querying":t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};Q("arcgis-feature-relationship",E);return E},"applications/Components/stringUtils","applications/Components/sanitizerUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/Feature",a,c)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import i from"./6U7WM64M.js";import h from"./VCOJNSMR.js";import g from"./R3NYK6BO.js";import{a as M}from"./HMWOHSHV.js";import f from"./ZDOE5UWP.js";import"./PC4PAQXQ.js";import e from"./ZOPB777S.js";import{a as P}from"./TNDRCMN3.js";import d from"./V2RXBLNO.js";import c from"./OCLLMQGL.js";import{h as O}from"./CIFVM6AU.js";import"./EPO62377.js";import a from"./FKLH5Y2K.js";import{a as T,d as b}from"./TGNR3DAP.js";import{M as v,N as p,O as B,P as C,R as u,S as L,U as N,a as R,b as o,o as x,x as F}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([j,Z,K,{initializeProjection:G},{renderingSanitizer:f},{stripHTML:D},{substitute:g,formatNumber:$},{watch:d},W,,,,H,,,{d:k},{c:z,d:V}])=>{var X=R`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function q(m){return m?.declaredClass.startsWith("esri.layers.")??!1}function J(m){if(!(!m||!("featureReduction"in m)))return m.featureReduction?.type}var Y=H(K),E=class extends B{constructor(){super(...arguments),this._zoomToFeature=new j({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=P(),this._selectedFeatureComponent=v(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._openRelatedFeatureAbortController=null,this.flowItems=new Z,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=Y(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new Z,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=O()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=F(),this.arcgisClose=F(),this.arcgisTriggerAction=F()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=X}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureItem?.heading)&&!!(this.content||this.viewModel.selectedFeatureItem?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}get featureViewModelAbilities(){let{featureItemAbilities:e}=this.viewModel;return e?{attachmentsContent:e.attachmentsContent,chartAnimation:e.chartAnimation,customContent:e.customContent,fieldsContent:e.fieldsContent,mediaContent:e.mediaContent,relationshipContent:e.relationshipContent,textContent:e.textContent,utilityNetworkAssociationsContent:e.utilityNetworkAssociationsContent}:void 0}set featureViewModelAbilities(e){this.viewModel.featureItemAbilities=new W(e??{})}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),await this._destroySpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await G(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),!e)return;let r=await this.viewModel.fetchFeatures(e,{...t,signal:n});this.location=r.location,this.promises=r.pendingFeatures}async next(){return this.viewModel.next()}async previous(){return this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if(!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await V(e,this.viewModel)}loaded(){this.manager.onLifecycle(()=>[d(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),d(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),d(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),d(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),d(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),d(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),d(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),d(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),d(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),d(()=>this.referenceElement,(e,t)=>{this._destroySpinner(t),this._createSpinner()},{initial:!0}),d(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult],()=>{this._createSpinner()},{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&x(()=>this.selectedFeatureComponent=e)}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=k(i),n=q(s)?s:null,r=t.get(n);r||(r=[],t.set(n,r)),r.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),this._openRelatedFeatureAbortController!==t)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null);return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),this._openRelatedFeatureAbortController!==t)return;let s=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(this._openRelatedFeatureAbortController!==t)return;let n=s.execute(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",r=i==="zoom-to-feature"?g(n,{messages:t}):i==="remove-selected-feature"?g(n,{messages:t}):i==="zoom-to-clustered-features"?g(n,{messages:t}):i==="browse-aggregated-features"?g(n,{messages:t}):e.title;return r&&s?g(r,s):r??""}_onMainKeydown(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),t==="ArrowRight"&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||J(k(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);x(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=T(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=T(e)}async _destroySpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl)}async _createSpinner(){let e=this.referenceElement;e&&(await this._destroySpinner(e),this._spinnerEl=L(o`<arcgis-spinner auto-destroy-disabled .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return o`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return o`<div class="pagination-text">${g(a.pageText??"",{index:$(t+1),total:$(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,selectedFeatureIndex:i,pendingPromisesCount:s}=t;return o`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${g(e.pageText??"",{index:$(i+1),total:$(a)})} text-enabled title=${e.selectFeature??u}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??u}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??u}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return o`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(f.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,r)=>i.set(n,r));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?o`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let r=a.get(n)?.map(c=>{let l=i.get(c);return l==null?null:this._renderFeatureMenuItem(c,l)}),h=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&h!==null?M(n??"map-graphics",o`<calcite-list-item-group .heading=${h}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?o`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??u}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:r,selectedFeature:h}=this,{active:c}=this.viewModel,l=this._getHeading();return r==="list"&&!h?null:o`<calcite-flow-item class=${C(b({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!c} .collapsed=${i} .collapseDirection=${n?"down":"up"} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${D(l)} ${p(this._rootFlowItemNode)}><div slot=heading><div .innerHTML=${f.sanitize(l??"")??""}></div></div>${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(b("container","content-container"))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:r,_collapseEnabled:h,_isCollapsed:c,featureNavigationTop:l,headingLevel:w}=this,{active:_,featureItems:A,pendingPromisesCount:I}=e,y=a??i.selectFeature;if(s==="feature"&&!n)return null;let S=!r;return o`<calcite-flow-item class=${C(b({"flow-item-collapsed":c}))} .closable=${s==="list"&&!t} .closed=${!_} .collapsed=${s==="list"&&c} .collapseDirection=${l?"down":"up"} .collapsible=${s==="list"&&h} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} .description=${this.hideFeatureMenuHeading?void 0:g(i.total??"",{total:A.length})} .heading=${this.hideFeatureMenuHeading?void 0:y} .headingLevel=${w} .loading=${e.waitingForContents} .selected=${S} @calciteFlowItemBack=${U=>{U.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${p(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${I>0?o`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${S?this._renderFeatureMenu():null}</div><div class="feature-menu-observer" ${p(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n}=this,r="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,h=r&&!s,c=e.flowType==="feature-association",l=a.returnToInitialFeature??"",w=a?.selectFeature,_=this._getActionTitle(this._zoomToFeature),A=!this.hideActionBar&&c&&r,I=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?o`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return o`<calcite-flow-item .closable=${!i} .closed=${!n} class="flow-item-drill-in" .description=${D(this._getDrillInFlowItemDescription(e)??"")} .heading=${this.hideHeading?void 0:D(e.heading??"")} .selected=${t} @calciteFlowItemBack=${y=>{y.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${this.hideHeading?null:o`<div slot=heading><div .innerHTML=${f.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${f.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l??""} title=${l??""??u}></calcite-action>${h?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${w??""} title=${w??u}></calcite-action>`:null}${A?o`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${_} title=${_??u} @click=${()=>z(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${I}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((c,l)=>this._renderFlowItem(c,this._featureFlowItemSelected&&l===e.length-1)),r=this._renderBrowseAggregateContainer(!!i),h=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${p(this._flowContainerNode)}>${h}${r}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel;return this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .description=${this._aggregatedFeatureCount?g(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${n=>{n.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .feature=${s??void 0} .flowItems=${this.flowItems} .map=${this.map??void 0} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${p(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(s=>s.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent;return!this._isCollapsed&&!this.hideActionBar&&i?o`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${p(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`:null}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t);return o`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} title=${a??u} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?.content?M(t,o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${p(this._selectedFeatureComponent)}></arcgis-feature>`):typeof e=="string"?M(e,o`<div .innerHTML=${f.sanitize(e)??""}></div>`):e??null}};N("arcgis-features",E);return E},"support/actions/ActionButton","core/Collection","popup/Features","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils","popup/support/FeatureAbilities",a,c,d,e,f,g,h,i)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as o}from"./HMWOHSHV.js";import g from"./ZDOE5UWP.js";import"./PC4PAQXQ.js";import f from"./ZOPB777S.js";import{a as b}from"./TNDRCMN3.js";import e from"./V2RXBLNO.js";import c from"./OCLLMQGL.js";import"./CIFVM6AU.js";import"./EPO62377.js";import a from"./FKLH5Y2K.js";import"./TGNR3DAP.js";import{N as l,O as p,U as m,a as u,b as i,p as d,x as s}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([w,,{when:f},R,,,,_,{a:y}])=>{var $=u`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;--calcite-panel-background-color: var(--calcite-color-foreground-1);calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}`,C=_(R),h=class extends p{constructor(){super(...arguments),this._messages=b({blocking:!0}),this._viewModel=C(this),this._highlightHandles=[],this._handleRunTraceButtonClick=()=>{this._setTraceWarnings(),!(this.showNoStartingPointsWarning||this.showMissingTerminalWarning)&&(this.showNoStartingPointsWarning=!1,this.showMissingTerminalWarning=!1,this._clearTraceResult(),this._switchTab("results"),this._runTrace())},this._handleTraceInputsRefChange=e=>{e&&(this._traceInputsElement=e)},this._handleTraceResultsRefChange=e=>{e&&(this._traceResultsElement=e)},this.activeTab="input",this.showMissingTerminalWarning=!1,this.showNoStartingPointsWarning=!1,this.mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new w([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideFeatureResults=!1,this.state=this._viewModel.state,this.view=this._viewModel.view,this.arcgisHideGraphicsChange=s(),this.arcgisReady=s(),this.arcgisTraceLocationSelectEnd=s(),this.arcgisTraceLocationSelectStart=s(),this.arcgisTraceResultClear=s(),this.arcgisTraceResultFeaturesReady=s()}static{this.properties={activeTab:16,traceError:16,traceResult:16,showMissingTerminalWarning:16,showNoStartingPointsWarning:16,mode:16,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideFeatureResults:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=$}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get _isSubnetworkNameTraceSelected(){return!!this._traceInputsElement?.unTraceConfiguration?.subnetworkName&&this._traceInputsElement?.selectedNamedTraceConfiguration?.traceType==="subnetwork"}get traceResultFeatures(){return this._traceResultsElement?.traceResultFeatures??[]}async destroy(){this._clearHighlights(),this._traceResultsElement?.destroy(),this._traceInputsElement?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[f(()=>!this._viewModel.utilityNetwork,()=>this._switchTab("input"))])}_clearTraceResult(){this.traceResult=void 0,this._clearHighlights(),this._clearAggregatedGeometryGraphics()}_setTraceWarnings(){let e=this._traceInputsElement?.traceLocations,t=this._traceInputsElement?.traceLocationFlagInfos,a=!!this._traceInputsElement?.unTraceConfiguration?.subnetworkName,r=e?.some(n=>n.type==="starting-point"),c=t?.some(n=>!!n.flagProperties.terminalConfiguration&&!n.flagProperties.selectedTerminals?.size)??!1;this.traceError=void 0,this.showNoStartingPointsWarning=!this._isSubnetworkNameTraceSelected&&!r||this._isSubnetworkNameTraceSelected&&!a,this.showMissingTerminalWarning=c}_switchTab(e){this.activeTab=e}_getLoadError(e){let{_messages:t}=this;switch(e){case"no-user-type-extension":return t.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return t.errors.loadErrors.noUtilityNetwork;case"no-view":return t.errors.loadErrors.noView;case"sceneView-not-supported":return t.errors.loadErrors.sceneViewNotSupported;default:return e}}_clearHighlights(){this._highlightHandles.forEach(e=>e.remove()),this._highlightHandles=[]}_clearAggregatedGeometryGraphics(){this._traceResultsElement?.clearAggregatedGeometryGraphics()}_highlightResults(){let{traceResult:e,view:t}=this,a=this._viewModel.utilityNetwork;!a||!e?.elements||!t||a.getObjectIdsFromElements(e.elements).forEach(r=>{let c=t.allLayerViews.find(v=>{let g=v.layer;if(a.isUtilityLayer(g)){let T=Number(r.layerUrl.split("/").pop());return g.layerId===T}return!1});if(!c)return;let n=c.highlight(r.objectIds);this._highlightHandles.push(n)})}async _runTrace(){let e=this._traceInputsElement?.selectedNamedTraceConfiguration,t=this._traceInputsElement?.unTraceConfiguration;if(!(e?.traceType&&t)){d("error",this,"Trace configuration not found");return}let a=this._traceInputsElement?.traceLocations;try{this.traceResult=await this._viewModel.executeTraceConfiguration({traceType:e.traceType,traceConfiguration:t,traceLocations:a??[],resultTypes:e.resultTypes,outSpatialReference:this.view?.spatialReference}),this.disableHighlightFeatureResults||this._highlightResults()}catch(r){y(r,this,"Error while running trace"),this.traceError=r,this.traceResult=void 0}}_handleHideGraphicsChange(e){e.stopPropagation(),this.arcgisHideGraphicsChange.emit(e.detail)}_handleTraceLocationSelectStart(e){e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented&&e.preventDefault()}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}_handleTraceResultFeaturesReady(e){e.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}_handleAggregatedGeometryGraphicsColorChange(e){let t=e.detail;this.aggregatedGeometryGraphicsColor=new w(t)}_handleSelectedNamedTraceConfigurationChange(){this.showNoStartingPointsWarning=!1,this.showMissingTerminalWarning=!1}_handleUtilityNetworkChange(){this._viewModel.utilityNetwork=this._traceInputsElement?.selectedUtilityNetwork}renderMissingTerminalWarning(){return i`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this.showMissingTerminalWarning=!1}><div slot=title>${this._messages.errors.missingTerminalTitle}</div><div slot=message>${this._messages.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}renderNoStartingPointsWarning(){return i`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this.showNoStartingPointsWarning=!1}><div slot=title>${this._messages.errors.noStartingPointsTitle}</div><div slot=message>${this._messages.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}renderResultsTab(){return o(`${this.el.id}__results-tab-item`,i`<calcite-tab .selected=${this.activeTab==="results"}>${this.state==="executing"?i`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`:i`<arcgis-utility-network-trace-results .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this._allLayers} .messageOverrides=${{resultFeaturesAreHidden:this.messageOverrides?.resultFeaturesAreHidden}} .referenceElement=${this.referenceElement} .traceConfigTitle=${this._selectedTraceConfig?.title} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this._viewModel.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this._handleAggregatedGeometryGraphicsColorChange} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} @arcgisTraceResultFeaturesReady=${this._handleTraceResultFeaturesReady} ${l(this._handleTraceResultsRefChange)}></arcgis-utility-network-trace-results>`}</calcite-tab>`)}renderResultsFooter(){let{traceResult:e}=this,t=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this._traceResultsElement?.state==="ready",a=this._traceResultsElement?.numResults??0;return i`<calcite-button appearance=outline width=full @click=${()=>{this._switchTab("input"),this._clearTraceResult(),this.arcgisTraceResultClear.emit()}} .disabled=${!t} slot=footer>${a>0&&!this.hideFeatureResults&&this.state!=="executing"?this._messages.buttons.clearResultsCustom.replace("{number}",a.toString()):this._messages.buttons.clearResultsGeneric}</calcite-button>`}renderInputTab(){let{mode:e}=this,{loadError:t}=this._viewModel,a=(t==="no-user-type-extension"||t==="sceneView-not-supported"?i`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this._getLoadError(t)}</div></calcite-notice>`:void 0)??i`${this.showNoStartingPointsWarning&&e==="default"&&this.renderNoStartingPointsWarning()||""}${this.showMissingTerminalWarning&&e==="default"&&this.renderMissingTerminalWarning()||""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${r=>{r.stopPropagation(),r.detail.name==="mode"&&(this.mode=r.target.mode)}} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} ${l(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs>`;return o(`${this.el.id}__inputs-tab-item`,i`<calcite-tab .selected=${this.activeTab==="input"}><div class="inputs-tab-container">${a}</div></calcite-tab>`)}renderInputFooter(){let{mode:e,state:t}=this;if(e!=="default")return null;let a=t==="disabled"||t==="loading"||!this._traceInputsElement?.unTraceConfiguration;return i`<calcite-button appearance=solid width=full @click=${this._handleRunTraceButtonClick} slot=footer .disabled=${a}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{activeTab:e,state:t}=this;return i`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this._switchTab("input")} .selected=${e==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this._switchTab("results")} .selected=${e==="results"} .disabled=${t==="disabled"||t==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.renderInputTab()}${t==="ready"||t==="executing"?this.renderResultsTab():null}</calcite-tabs>${e==="input"?this.renderInputFooter():null}${e==="results"?this.renderResultsFooter():null}</calcite-panel>`}};m("arcgis-utility-network-trace-analysis",h);return h},"Color","core/Error","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",a,c,e,f,g)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./VCOJNSMR.js";import b from"./R3NYK6BO.js";import{a as y}from"./HMWOHSHV.js";import a from"./ZDOE5UWP.js";import{a as p}from"./PC4PAQXQ.js";import{h as f}from"./CIFVM6AU.js";import"./EPO62377.js";import"./TGNR3DAP.js";import{O as F,S as _,U as A,a as m,b as d,o}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([,v,b,S,{getDisplayedSymbol:C},{stripHTML:x},{watch:l},{d:I},,{d:w}])=>{var B=m`calcite-notice{padding:var(--calcite-space-lg)}`,u=class extends F{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.selectedAggregatedFeatureIndex=-1,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.loading=!1,this.selectedAggregateBoundaryFeature=new b({symbol:new S({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=f()("aggregatedFeatureCount","selectedAggregatedFeatureIndex","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,selectedAggregatedFeatureIndex:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=B}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}async next(){await this._selectRelativeAggregatedFeature(1)}async previous(){await this._selectRelativeAggregatedFeature(-1)}loaded(){this.manager.onLifecycle(()=>[l(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),l(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),l(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._setSelectedAggregatedFeatureIndex(t?this.aggregatedFeatures.indexOf(t):-1),this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){o(()=>this.aggregatedFeatureCount=e)}_setSelectedAggregatedFeatureIndex(e){o(()=>this.selectedAggregatedFeatureIndex=e)}_setAggregatedFeatureItemsReadOnly(e){o(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),o(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){o(()=>this.loading=e)}_cancelQuery(){this._abortController=p(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._setSelectedAggregatedFeatureIndex(-1),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new v({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=w(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let g=r.createQuery(),s=e.getObjectId();return g.aggregateIds=s!=null?[s]:[],[r,g]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,g=new AbortController;this._abortController=g,this._setLoading(!0);try{let[s,n]=await Promise.all([a.queryFeatures(r,{signal:g.signal}),a.queryExtent(r,{signal:g.signal})]);if(this._abortController!==g||g.signal.aborted)return;this._abortController=null,this._setLoading(!1);let i=s.features??[];this._setAggregatedFeaturesState(i),n.extent?this._updateAggregateBoundaryFeature(n.extent):this._removeAggregateBoundaryFeature()}catch(s){if(this._abortController!==g||(this._abortController=null,this._setLoading(!1),I(s)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await C(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(_(y(e,d`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .graphic=${e.graphic} .map=${this.map} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature>`)))}async _selectRelativeAggregatedFeature(e){let{aggregatedFeatures:t,aggregatedFeatureItems:a,flowItems:r}=this;if(!r||t.length===0||a.length===0)return;let g=t.length,s=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<g?this.selectedAggregatedFeatureIndex:-1;if(s===-1){let h=r.getItemAt(r.length-1)?.graphic;s=h?t.indexOf(h):-1}let n=s===-1?e>0?0:g-1:(s+e+g)%g,i=a[n];if(!i?.graphic)return;this._setSelectedAggregatedFeatureIndex(n);let c=r.getItemAt(r.length-1);if(c?.flowType==="feature"){c.graphic=i.graphic,this._removeSelectedAggregatedFeature(),await this._addSelectedAggregatedFeature(i.graphic);return}await this._selectFeature(i)}_renderChevronIconNode(){return d`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?d`<calcite-list .loading=${t} display-mode=flat .filterEnabled=${e.length>10} .filterPlaceholder=${this.messages?.aggregatedFeaturesPlaceholder??""} .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>d`<calcite-list-item .label=${x(a.heading)??""} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:d`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};A("arcgis-aggregated-features",u);return u},"core/Collection","popup/Feature","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./JQVJUBK3.js";import b from"./R3NYK6BO.js";import{a as d}from"./HMWOHSHV.js";import{P as f,S as h,U as y,a as g,b as a}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([{stripHTML:$},{formatNumber:_,substitute:A},{f:u},w])=>{var b=g`:host{position:relative;flex:1 1 auto}.list-item--hidden{display:none}.feature-observer{bottom:var(--calcite-spacing-xxl);position:relative;text-align:center;z-index:2}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.notice-container{margin-bottom:var(--calcite-spacing-xs)}`,v="nested",p=class extends w{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.displayCount=3,this.flowType="feature-utility-network-association-type"}static{this.properties={autoDestroyDisabled:5,description:1,displayCount:9,endIndex:32,flowItems:0,flowType:1,heading:1,map:0,referenceElement:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=b}get endIndex(){let{currentFeaturePage:e,featuresPerPage:t,maxFeatureCount:s}=this;return Math.min(e*t,s)}async destroy(){await this.manager.destroy()}_featureViewModelMatch(e,t){let s=e.graphic,i=s?.layer,o=null;u(i)&&i.parent?o=i.parent.globalIdField??null:i&&"globalIdField"in i&&(o=i.globalIdField);let r=o?s?.getAttribute(o):null,l=t.graphic,n=l?.layer,c=null;u(n)&&n.parent?c=n.parent.globalIdField??null:n&&"globalIdField"in n&&(c=n.globalIdField);let m=c?l?.getAttribute(c):null;return!!(r&&m&&r===m)}_findFlowItem(e){return this.flowItems?.findIndex(t=>{if(t.flowType!=="feature-association")return!1;let s=t.viewModel;return this._featureViewModelMatch(s,e)})??-1}_formatPercentAlong(e){let{percentAlong:t}=e;return t==null?"":_(t,{style:"percent",maximumFractionDigits:2})}async _handleFeatureClick(e,t,s){let{flowItems:i}=this;if(e){i?.destroyAll();return}if(t<0||!i){await this._selectAssociation(s);return}for(;i.length>t+1;)i.pop()}_isConnectivityAssociation(e){let{associationType:t}=e;return t==="connectivity"||t==="junction-junction-connectivity"||t==="junction-edge-from-connectivity"||t==="junction-edge-midspan-connectivity"||t==="junction-edge-to-connectivity"}_isConnectivityMidspanAssociation(e){return e.associationType==="junction-edge-midspan-connectivity"}_isParentFeature(e){let t=this.flowItems?.getItemAt(0);if(!t)return!1;let s=t.parentFeatureViewModel;return this._featureViewModelMatch(s,e)}async _selectAssociation(e){let{flowItems:t}=this;t&&t.push(h(d(this.parentFeatureViewModel,a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${"feature-association"} .graphic=${e.graphic} .map=${this.map} .referenceElement=${this.referenceElement} show-utility-network-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)))}_showAllAssociations(e){let{flowItems:t,description:s}=this;if(!t||!e)return;this.showAllEnabled=!0;let i=e?.title??"";t.push(h(a`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this.associationViewModels} .description=${s} .flowItems=${t} .flowType=${this.flowType} .heading=${i} .messages=${this.messages} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .selectedLayer=${e} .showAllEnabled=${this.showAllEnabled}></arcgis-feature-utility-network-association-list>`))}render(){let{associationViewModels:e,state:t}=this,s=this.selectedLayer?.title??this.messages?.noTitle??"";return a`<div class="root">${t==="loading"||t==="querying"?this._renderLoading():a`<calcite-list .displayMode=${v} .filterEnabled=${this.showAllEnabled&&!!this.selectedLayer} .filterLabel=${this.messages?.associationFilterPlaceholder} .filterPlaceholder=${this.messages?.associationFilterPlaceholder} .label=${s}>${this.showAllEnabled&&this.selectedLayer?a`${this._renderFeatureCountWarning()}${this._renderAssociatedFeatureListPage()}${this._renderFeatureObserver()}`:Array.from(e.keys(),i=>this._renderTypeList(i))}</calcite-list>`}</div>`}_renderAssociatedFeature(e){let{featureViewModel:t,title:s}=e,i=this.state==="loading",o=this._findFlowItem(t),r=o<0&&this._isParentFeature(t),l=r||o>=0,n=`associated-feature-${e.association.globalId}`;return a`<calcite-list-item class=${f(i?"list-item--hidden":"")} .description=${$(e.terminalName??"")} .label=${$(s)} @calciteListItemSelect=${async()=>await this._handleFeatureClick(r,o,t)}>${this._isConnectivityAssociation(e.association)?this._renderConnectivityIcon(e.association.associationType,n):null}${this._isConnectivityMidspanAssociation(e.association)?a`<calcite-chip .label=${this._formatPercentAlong(e.association)} scale=s slot=content-end>${this._formatPercentAlong(e.association)}</calcite-chip>`:null}${this._renderChevronIconNode(l)}</calcite-list-item>`}_renderAssociatedFeatureList(e){return e.toArray().map(t=>this._renderAssociatedFeature(t))}_renderAssociatedFeatureListPage(){let e=this.associationViewModels.get(this.selectedLayer).slice(0,this.endIndex);return[...this._renderTooltips(e),...this._renderAssociatedFeatureList(e)]}_renderChevronIconNode(e){return a`<calcite-icon flip-rtl .icon=${e?"move-up":"chevron-right"} scale=s slot=content-end></calcite-icon>`}_renderItemTooltip(e){let{tooltipReferenceMap:t}=this,s=`associated-feature-${e.association.globalId}`;return this._isConnectivityAssociation(e.association)?a`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(s)}>${this.getConnectivityTooltip(e.association.associationType)}</calcite-tooltip>`:null}_renderTypeList(e){let{messages:t}=this,{displayCount:s}=this,i=this.associationViewModels.get(e),o=i.slice(0,s),r=o.length<i.length,l=A(t?.numberRecords??"",{number:i.length.toString()}),n=t?.showAll??"";return d("show-all",a`<calcite-list-item expanded .label=${e.title} .value=${e.id}><calcite-chip .label=${String(i.length)} scale=s slot=content-end>${i.length}</calcite-chip><calcite-list .group=${e.id} .label=${e.title??""}>${[this._renderTooltips(o),this._renderAssociatedFeatureList(o)]}${r?d("show-all-item",a`<calcite-list-item .description=${l} .label=${n} @calciteListItemSelect=${()=>this._showAllAssociations(e)}><calcite-icon icon=list scale=s slot=content-end></calcite-icon></calcite-list-item>`):null}</calcite-list></calcite-list-item>`)}_renderTooltips(e){return e.toArray().map(t=>this._renderItemTooltip(t))}};y("arcgis-feature-utility-network-association-list",p);return p},"applications/Components/stringUtils","intl",b,c)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as I}from"./MP6Z45SA.js";import a from"./R3NYK6BO.js";import{a as A}from"./HMWOHSHV.js";import{O as q,S as L,U as N,a as T,b as p}from"./MTKZBIHD.js";import"./3TTFCHAA.js";export default $arcgis.t(([{createReactiveMap:C,findUtilityNetwork:V,getOrCreateMapValue:Q},{stripHTML:S},f,{ignoreAbortErrors:$},{watch:k},D,B,P,x,G,{b:E,f:F}])=>{var O=T`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,j={assetGroup:"assetgroup",assetType:"assettype"},U="{00000000-0000-0000-0000-000000000000}",v=class extends q{constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await $(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await $(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=I(this._queryController,M),this._queryFeatureCountDebounced=I(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=C(),this._associationViewModels=C(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=O}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=F(t)?t.parent:t;return V(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:o,_queryPageAbortController:r,associationTypes:l}=this;return o||t&&!a?"loading":i||r?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[k(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),k(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),k(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){this._addFlowItem(L(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this.parentFeatureViewModel?.heading} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`))}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a);return await t.queryFeatureCount({where:o,outFields:["*"],returnGeometry:!1},{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let o=await this._findLayersBySourceId(t);await this._loadLayers(o);let r=o.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(r)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let o=new Map,r=Array.from(e.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=o.get(y)??[];w.push(n),o.set(y,w)}})})});await Promise.all(r);let l=[];return await Promise.all(t.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=o.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===U&&e.globalId===U){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,o=e.fromNetworkElement,r=e.toNetworkElement,l=s(a,o),c=s(i,r);return l&&c&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(r=>!!e?.isUtilityLayer(r)&&r.layerId===a),o=s.allTables.filter(r=>!!e?.isUtilityLayer(r)&&r.layerId===a);return i.concat(o).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,o=t.fieldsIndex.get(j.assetGroup),r=t.fieldsIndex.get(j.assetType),l=s!=null,c=a!=null,d=i?D.sqlIn(i,e):null,u=l?`(${o?.name} = ${s})`:null,h=l&&c?`(${r?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,o=i!=null?i.toString():null,r=t.getObjectId()?.toString();return o||r||""}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:o,_canQuery:r,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),o?.load()]),!r||!s||!i||!o)return;let c=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:o}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!o||!e||!a||!i||!s)return;let r=F(e)?e.parent:e,l=new B({globalId:s,networkSourceId:i.getSourceIdByLayerId(r.layerId)}),c=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new P({elements:[l],types:Array.from(c)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let o=this._getFeatureQueryWhereClause(t,e,s,a),r=new x({where:o,outFields:["*"],cacheHint:this._supportsCacheHint}),{features:l}=await E(t,r,i);return l}_parseFeatureObjects(t,e){let s=C();t.forEach(a=>{let i=(a?.feature).sourceLayer;Q(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,o)=>{let r=this._associationFeatures.get(o);r?i.forEach(l=>{r.find(c=>this._matchesGlobalFeature(l,c))||(i.remove(l),i.length||this._associationViewModels.delete(o))}):(i.removeAll(),this._associationViewModels.delete(o))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,o)=>{let r=this._associationViewModels.get(o)||new f;i?.filter(Boolean).forEach((l,c)=>{if(!r.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;r.add({title:m,association:d,featureViewModel:new G({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(o,r)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,o=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!o}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return A(`association-type-${t.type}`,p`<calcite-list-item .description=${S(t.description)} .label=${S(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return A("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};N("arcgis-feature-utility-network-associations",v);return v},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","rest/support/Query","popup/Feature",a)