@esri/solutions-components 0.10.38 → 0.10.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (842) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +26 -6
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +23 -3
  3. package/dist/cjs/calcite-alert_5.cjs.entry.js +40 -5
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +11 -1
  5. package/dist/cjs/calcite-flow_4.cjs.entry.js +33 -10
  6. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +119 -10
  7. package/dist/cjs/calcite-shell_3.cjs.entry.js +26 -4
  8. package/dist/cjs/card-manager_3.cjs.entry.js +41 -9
  9. package/dist/cjs/consent-manager.cjs.entry.js +12 -0
  10. package/dist/cjs/crowdsource-manager.cjs.entry.js +13 -14
  11. package/dist/cjs/crowdsource-reporter.cjs.entry.js +19 -9
  12. package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
  13. package/dist/cjs/feature-list.cjs.entry.js +13 -3
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/map-select-tools_3.cjs.entry.js +38 -6
  16. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  17. package/dist/cjs/public-notification.cjs.entry.js +11 -2
  18. package/dist/cjs/share-item.cjs.entry.js +1 -1
  19. package/dist/cjs/solution-configuration.cjs.entry.js +20 -5
  20. package/dist/cjs/solution-contents_3.cjs.entry.js +37 -7
  21. package/dist/cjs/solution-item-accordion.cjs.entry.js +11 -1
  22. package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/solutions-components.cjs.js +1 -1
  24. package/dist/cjs/spatial-ref.cjs.entry.js +16 -1
  25. package/dist/collection/assets/t9n/card-manager/resources_ar.json +1 -1
  26. package/dist/collection/assets/t9n/card-manager/resources_bg.json +1 -1
  27. package/dist/collection/assets/t9n/card-manager/resources_bs.json +1 -1
  28. package/dist/collection/assets/t9n/card-manager/resources_ca.json +1 -1
  29. package/dist/collection/assets/t9n/card-manager/resources_cs.json +1 -1
  30. package/dist/collection/assets/t9n/card-manager/resources_da.json +1 -1
  31. package/dist/collection/assets/t9n/card-manager/resources_de.json +1 -1
  32. package/dist/collection/assets/t9n/card-manager/resources_el.json +1 -1
  33. package/dist/collection/assets/t9n/card-manager/resources_es.json +1 -1
  34. package/dist/collection/assets/t9n/card-manager/resources_et.json +1 -1
  35. package/dist/collection/assets/t9n/card-manager/resources_fi.json +1 -1
  36. package/dist/collection/assets/t9n/card-manager/resources_fr.json +1 -1
  37. package/dist/collection/assets/t9n/card-manager/resources_he.json +1 -1
  38. package/dist/collection/assets/t9n/card-manager/resources_hr.json +1 -1
  39. package/dist/collection/assets/t9n/card-manager/resources_hu.json +1 -1
  40. package/dist/collection/assets/t9n/card-manager/resources_id.json +1 -1
  41. package/dist/collection/assets/t9n/card-manager/resources_it.json +1 -1
  42. package/dist/collection/assets/t9n/card-manager/resources_ja.json +1 -1
  43. package/dist/collection/assets/t9n/card-manager/resources_ko.json +1 -1
  44. package/dist/collection/assets/t9n/card-manager/resources_lt.json +1 -1
  45. package/dist/collection/assets/t9n/card-manager/resources_lv.json +1 -1
  46. package/dist/collection/assets/t9n/card-manager/resources_nb.json +1 -1
  47. package/dist/collection/assets/t9n/card-manager/resources_nl.json +1 -1
  48. package/dist/collection/assets/t9n/card-manager/resources_pl.json +1 -1
  49. package/dist/collection/assets/t9n/card-manager/resources_pt-BR.json +1 -1
  50. package/dist/collection/assets/t9n/card-manager/resources_pt-PT.json +1 -1
  51. package/dist/collection/assets/t9n/card-manager/resources_ro.json +1 -1
  52. package/dist/collection/assets/t9n/card-manager/resources_ru.json +1 -1
  53. package/dist/collection/assets/t9n/card-manager/resources_sk.json +1 -1
  54. package/dist/collection/assets/t9n/card-manager/resources_sl.json +1 -1
  55. package/dist/collection/assets/t9n/card-manager/resources_sr.json +1 -1
  56. package/dist/collection/assets/t9n/card-manager/resources_sv.json +1 -1
  57. package/dist/collection/assets/t9n/card-manager/resources_th.json +1 -1
  58. package/dist/collection/assets/t9n/card-manager/resources_tr.json +1 -1
  59. package/dist/collection/assets/t9n/card-manager/resources_uk.json +1 -1
  60. package/dist/collection/assets/t9n/card-manager/resources_vi.json +1 -1
  61. package/dist/collection/assets/t9n/card-manager/resources_zh-CN.json +1 -1
  62. package/dist/collection/assets/t9n/card-manager/resources_zh-HK.json +1 -1
  63. package/dist/collection/assets/t9n/card-manager/resources_zh-TW.json +1 -1
  64. package/dist/collection/assets/t9n/create-feature/resources_ar.json +1 -1
  65. package/dist/collection/assets/t9n/create-feature/resources_bg.json +1 -1
  66. package/dist/collection/assets/t9n/create-feature/resources_bs.json +1 -1
  67. package/dist/collection/assets/t9n/create-feature/resources_ca.json +1 -1
  68. package/dist/collection/assets/t9n/create-feature/resources_cs.json +1 -1
  69. package/dist/collection/assets/t9n/create-feature/resources_da.json +1 -1
  70. package/dist/collection/assets/t9n/create-feature/resources_de.json +1 -1
  71. package/dist/collection/assets/t9n/create-feature/resources_el.json +1 -1
  72. package/dist/collection/assets/t9n/create-feature/resources_es.json +1 -1
  73. package/dist/collection/assets/t9n/create-feature/resources_et.json +1 -1
  74. package/dist/collection/assets/t9n/create-feature/resources_fi.json +1 -1
  75. package/dist/collection/assets/t9n/create-feature/resources_fr.json +1 -1
  76. package/dist/collection/assets/t9n/create-feature/resources_he.json +1 -1
  77. package/dist/collection/assets/t9n/create-feature/resources_hr.json +1 -1
  78. package/dist/collection/assets/t9n/create-feature/resources_hu.json +1 -1
  79. package/dist/collection/assets/t9n/create-feature/resources_id.json +1 -1
  80. package/dist/collection/assets/t9n/create-feature/resources_it.json +1 -1
  81. package/dist/collection/assets/t9n/create-feature/resources_ja.json +1 -1
  82. package/dist/collection/assets/t9n/create-feature/resources_ko.json +1 -1
  83. package/dist/collection/assets/t9n/create-feature/resources_lt.json +1 -1
  84. package/dist/collection/assets/t9n/create-feature/resources_lv.json +1 -1
  85. package/dist/collection/assets/t9n/create-feature/resources_nb.json +1 -1
  86. package/dist/collection/assets/t9n/create-feature/resources_nl.json +1 -1
  87. package/dist/collection/assets/t9n/create-feature/resources_pl.json +1 -1
  88. package/dist/collection/assets/t9n/create-feature/resources_pt-BR.json +2 -2
  89. package/dist/collection/assets/t9n/create-feature/resources_pt-PT.json +1 -1
  90. package/dist/collection/assets/t9n/create-feature/resources_ro.json +1 -1
  91. package/dist/collection/assets/t9n/create-feature/resources_ru.json +1 -1
  92. package/dist/collection/assets/t9n/create-feature/resources_sk.json +1 -1
  93. package/dist/collection/assets/t9n/create-feature/resources_sl.json +1 -1
  94. package/dist/collection/assets/t9n/create-feature/resources_sr.json +1 -1
  95. package/dist/collection/assets/t9n/create-feature/resources_sv.json +1 -1
  96. package/dist/collection/assets/t9n/create-feature/resources_th.json +1 -1
  97. package/dist/collection/assets/t9n/create-feature/resources_tr.json +1 -1
  98. package/dist/collection/assets/t9n/create-feature/resources_uk.json +1 -1
  99. package/dist/collection/assets/t9n/create-feature/resources_vi.json +1 -1
  100. package/dist/collection/assets/t9n/create-feature/resources_zh-CN.json +1 -1
  101. package/dist/collection/assets/t9n/create-feature/resources_zh-HK.json +1 -1
  102. package/dist/collection/assets/t9n/create-feature/resources_zh-TW.json +1 -1
  103. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ar.json +1 -1
  104. package/dist/collection/assets/t9n/crowdsource-reporter/resources_bg.json +1 -1
  105. package/dist/collection/assets/t9n/crowdsource-reporter/resources_bs.json +1 -1
  106. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ca.json +1 -1
  107. package/dist/collection/assets/t9n/crowdsource-reporter/resources_cs.json +1 -1
  108. package/dist/collection/assets/t9n/crowdsource-reporter/resources_da.json +1 -1
  109. package/dist/collection/assets/t9n/crowdsource-reporter/resources_de.json +1 -1
  110. package/dist/collection/assets/t9n/crowdsource-reporter/resources_el.json +1 -1
  111. package/dist/collection/assets/t9n/crowdsource-reporter/resources_es.json +1 -1
  112. package/dist/collection/assets/t9n/crowdsource-reporter/resources_et.json +1 -1
  113. package/dist/collection/assets/t9n/crowdsource-reporter/resources_fi.json +1 -1
  114. package/dist/collection/assets/t9n/crowdsource-reporter/resources_fr.json +1 -1
  115. package/dist/collection/assets/t9n/crowdsource-reporter/resources_he.json +1 -1
  116. package/dist/collection/assets/t9n/crowdsource-reporter/resources_hr.json +1 -1
  117. package/dist/collection/assets/t9n/crowdsource-reporter/resources_hu.json +1 -1
  118. package/dist/collection/assets/t9n/crowdsource-reporter/resources_id.json +1 -1
  119. package/dist/collection/assets/t9n/crowdsource-reporter/resources_it.json +1 -1
  120. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ja.json +1 -1
  121. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ko.json +1 -1
  122. package/dist/collection/assets/t9n/crowdsource-reporter/resources_lt.json +1 -1
  123. package/dist/collection/assets/t9n/crowdsource-reporter/resources_lv.json +1 -1
  124. package/dist/collection/assets/t9n/crowdsource-reporter/resources_nb.json +1 -1
  125. package/dist/collection/assets/t9n/crowdsource-reporter/resources_nl.json +1 -1
  126. package/dist/collection/assets/t9n/crowdsource-reporter/resources_pl.json +1 -1
  127. package/dist/collection/assets/t9n/crowdsource-reporter/resources_pt-BR.json +1 -1
  128. package/dist/collection/assets/t9n/crowdsource-reporter/resources_pt-PT.json +1 -1
  129. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ro.json +1 -1
  130. package/dist/collection/assets/t9n/crowdsource-reporter/resources_ru.json +1 -1
  131. package/dist/collection/assets/t9n/crowdsource-reporter/resources_sk.json +1 -1
  132. package/dist/collection/assets/t9n/crowdsource-reporter/resources_sl.json +1 -1
  133. package/dist/collection/assets/t9n/crowdsource-reporter/resources_sr.json +1 -1
  134. package/dist/collection/assets/t9n/crowdsource-reporter/resources_sv.json +1 -1
  135. package/dist/collection/assets/t9n/crowdsource-reporter/resources_th.json +1 -1
  136. package/dist/collection/assets/t9n/crowdsource-reporter/resources_tr.json +1 -1
  137. package/dist/collection/assets/t9n/crowdsource-reporter/resources_uk.json +1 -1
  138. package/dist/collection/assets/t9n/crowdsource-reporter/resources_vi.json +1 -1
  139. package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-CN.json +1 -1
  140. package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-HK.json +1 -1
  141. package/dist/collection/assets/t9n/crowdsource-reporter/resources_zh-TW.json +1 -1
  142. package/dist/collection/assets/t9n/feature-list/resources_ar.json +2 -2
  143. package/dist/collection/assets/t9n/feature-list/resources_bg.json +2 -2
  144. package/dist/collection/assets/t9n/feature-list/resources_bs.json +2 -2
  145. package/dist/collection/assets/t9n/feature-list/resources_ca.json +2 -2
  146. package/dist/collection/assets/t9n/feature-list/resources_cs.json +2 -2
  147. package/dist/collection/assets/t9n/feature-list/resources_da.json +2 -2
  148. package/dist/collection/assets/t9n/feature-list/resources_de.json +2 -2
  149. package/dist/collection/assets/t9n/feature-list/resources_el.json +2 -2
  150. package/dist/collection/assets/t9n/feature-list/resources_es.json +2 -2
  151. package/dist/collection/assets/t9n/feature-list/resources_et.json +2 -2
  152. package/dist/collection/assets/t9n/feature-list/resources_fi.json +2 -2
  153. package/dist/collection/assets/t9n/feature-list/resources_fr.json +2 -2
  154. package/dist/collection/assets/t9n/feature-list/resources_he.json +2 -2
  155. package/dist/collection/assets/t9n/feature-list/resources_hr.json +2 -2
  156. package/dist/collection/assets/t9n/feature-list/resources_hu.json +2 -2
  157. package/dist/collection/assets/t9n/feature-list/resources_id.json +2 -2
  158. package/dist/collection/assets/t9n/feature-list/resources_it.json +2 -2
  159. package/dist/collection/assets/t9n/feature-list/resources_ja.json +2 -2
  160. package/dist/collection/assets/t9n/feature-list/resources_ko.json +2 -2
  161. package/dist/collection/assets/t9n/feature-list/resources_lt.json +2 -2
  162. package/dist/collection/assets/t9n/feature-list/resources_lv.json +2 -2
  163. package/dist/collection/assets/t9n/feature-list/resources_nb.json +2 -2
  164. package/dist/collection/assets/t9n/feature-list/resources_nl.json +2 -2
  165. package/dist/collection/assets/t9n/feature-list/resources_pl.json +2 -2
  166. package/dist/collection/assets/t9n/feature-list/resources_pt-BR.json +2 -2
  167. package/dist/collection/assets/t9n/feature-list/resources_pt-PT.json +2 -2
  168. package/dist/collection/assets/t9n/feature-list/resources_ro.json +2 -2
  169. package/dist/collection/assets/t9n/feature-list/resources_ru.json +2 -2
  170. package/dist/collection/assets/t9n/feature-list/resources_sk.json +2 -2
  171. package/dist/collection/assets/t9n/feature-list/resources_sl.json +2 -2
  172. package/dist/collection/assets/t9n/feature-list/resources_sr.json +2 -2
  173. package/dist/collection/assets/t9n/feature-list/resources_sv.json +2 -2
  174. package/dist/collection/assets/t9n/feature-list/resources_th.json +2 -2
  175. package/dist/collection/assets/t9n/feature-list/resources_tr.json +2 -2
  176. package/dist/collection/assets/t9n/feature-list/resources_uk.json +2 -2
  177. package/dist/collection/assets/t9n/feature-list/resources_vi.json +2 -2
  178. package/dist/collection/assets/t9n/feature-list/resources_zh-CN.json +2 -2
  179. package/dist/collection/assets/t9n/feature-list/resources_zh-HK.json +2 -2
  180. package/dist/collection/assets/t9n/feature-list/resources_zh-TW.json +2 -2
  181. package/dist/collection/assets/t9n/layer-table/resources_ar.json +1 -1
  182. package/dist/collection/assets/t9n/layer-table/resources_bg.json +1 -1
  183. package/dist/collection/assets/t9n/layer-table/resources_bs.json +1 -1
  184. package/dist/collection/assets/t9n/layer-table/resources_ca.json +1 -1
  185. package/dist/collection/assets/t9n/layer-table/resources_cs.json +1 -1
  186. package/dist/collection/assets/t9n/layer-table/resources_da.json +1 -1
  187. package/dist/collection/assets/t9n/layer-table/resources_de.json +1 -1
  188. package/dist/collection/assets/t9n/layer-table/resources_el.json +1 -1
  189. package/dist/collection/assets/t9n/layer-table/resources_es.json +1 -1
  190. package/dist/collection/assets/t9n/layer-table/resources_et.json +1 -1
  191. package/dist/collection/assets/t9n/layer-table/resources_fi.json +1 -1
  192. package/dist/collection/assets/t9n/layer-table/resources_fr.json +1 -1
  193. package/dist/collection/assets/t9n/layer-table/resources_he.json +1 -1
  194. package/dist/collection/assets/t9n/layer-table/resources_hr.json +1 -1
  195. package/dist/collection/assets/t9n/layer-table/resources_hu.json +1 -1
  196. package/dist/collection/assets/t9n/layer-table/resources_id.json +1 -1
  197. package/dist/collection/assets/t9n/layer-table/resources_it.json +1 -1
  198. package/dist/collection/assets/t9n/layer-table/resources_ja.json +1 -1
  199. package/dist/collection/assets/t9n/layer-table/resources_ko.json +1 -1
  200. package/dist/collection/assets/t9n/layer-table/resources_lt.json +1 -1
  201. package/dist/collection/assets/t9n/layer-table/resources_lv.json +1 -1
  202. package/dist/collection/assets/t9n/layer-table/resources_nb.json +1 -1
  203. package/dist/collection/assets/t9n/layer-table/resources_nl.json +1 -1
  204. package/dist/collection/assets/t9n/layer-table/resources_pl.json +1 -1
  205. package/dist/collection/assets/t9n/layer-table/resources_pt-BR.json +1 -1
  206. package/dist/collection/assets/t9n/layer-table/resources_pt-PT.json +1 -1
  207. package/dist/collection/assets/t9n/layer-table/resources_ro.json +1 -1
  208. package/dist/collection/assets/t9n/layer-table/resources_ru.json +1 -1
  209. package/dist/collection/assets/t9n/layer-table/resources_sk.json +1 -1
  210. package/dist/collection/assets/t9n/layer-table/resources_sl.json +1 -1
  211. package/dist/collection/assets/t9n/layer-table/resources_sr.json +1 -1
  212. package/dist/collection/assets/t9n/layer-table/resources_sv.json +1 -1
  213. package/dist/collection/assets/t9n/layer-table/resources_th.json +1 -1
  214. package/dist/collection/assets/t9n/layer-table/resources_tr.json +1 -1
  215. package/dist/collection/assets/t9n/layer-table/resources_uk.json +1 -1
  216. package/dist/collection/assets/t9n/layer-table/resources_vi.json +1 -1
  217. package/dist/collection/assets/t9n/layer-table/resources_zh-CN.json +1 -1
  218. package/dist/collection/assets/t9n/layer-table/resources_zh-HK.json +1 -1
  219. package/dist/collection/assets/t9n/layer-table/resources_zh-TW.json +1 -1
  220. package/dist/collection/assets/t9n/map-card/resources_ar.json +2 -1
  221. package/dist/collection/assets/t9n/map-card/resources_bg.json +2 -1
  222. package/dist/collection/assets/t9n/map-card/resources_bs.json +2 -1
  223. package/dist/collection/assets/t9n/map-card/resources_ca.json +2 -1
  224. package/dist/collection/assets/t9n/map-card/resources_cs.json +2 -1
  225. package/dist/collection/assets/t9n/map-card/resources_da.json +2 -1
  226. package/dist/collection/assets/t9n/map-card/resources_de.json +2 -1
  227. package/dist/collection/assets/t9n/map-card/resources_el.json +2 -1
  228. package/dist/collection/assets/t9n/map-card/resources_es.json +2 -1
  229. package/dist/collection/assets/t9n/map-card/resources_et.json +2 -1
  230. package/dist/collection/assets/t9n/map-card/resources_fi.json +2 -1
  231. package/dist/collection/assets/t9n/map-card/resources_fr.json +2 -1
  232. package/dist/collection/assets/t9n/map-card/resources_he.json +2 -1
  233. package/dist/collection/assets/t9n/map-card/resources_hr.json +2 -1
  234. package/dist/collection/assets/t9n/map-card/resources_hu.json +2 -1
  235. package/dist/collection/assets/t9n/map-card/resources_id.json +2 -1
  236. package/dist/collection/assets/t9n/map-card/resources_it.json +2 -1
  237. package/dist/collection/assets/t9n/map-card/resources_ja.json +2 -1
  238. package/dist/collection/assets/t9n/map-card/resources_ko.json +2 -1
  239. package/dist/collection/assets/t9n/map-card/resources_lt.json +2 -1
  240. package/dist/collection/assets/t9n/map-card/resources_lv.json +2 -1
  241. package/dist/collection/assets/t9n/map-card/resources_nb.json +2 -1
  242. package/dist/collection/assets/t9n/map-card/resources_nl.json +2 -1
  243. package/dist/collection/assets/t9n/map-card/resources_pl.json +2 -1
  244. package/dist/collection/assets/t9n/map-card/resources_pt-BR.json +2 -1
  245. package/dist/collection/assets/t9n/map-card/resources_pt-PT.json +2 -1
  246. package/dist/collection/assets/t9n/map-card/resources_ro.json +2 -1
  247. package/dist/collection/assets/t9n/map-card/resources_ru.json +2 -1
  248. package/dist/collection/assets/t9n/map-card/resources_sk.json +2 -1
  249. package/dist/collection/assets/t9n/map-card/resources_sl.json +2 -1
  250. package/dist/collection/assets/t9n/map-card/resources_sr.json +2 -1
  251. package/dist/collection/assets/t9n/map-card/resources_sv.json +2 -1
  252. package/dist/collection/assets/t9n/map-card/resources_th.json +2 -1
  253. package/dist/collection/assets/t9n/map-card/resources_tr.json +2 -1
  254. package/dist/collection/assets/t9n/map-card/resources_uk.json +2 -1
  255. package/dist/collection/assets/t9n/map-card/resources_vi.json +2 -1
  256. package/dist/collection/assets/t9n/map-card/resources_zh-CN.json +2 -1
  257. package/dist/collection/assets/t9n/map-card/resources_zh-HK.json +2 -1
  258. package/dist/collection/assets/t9n/map-card/resources_zh-TW.json +2 -1
  259. package/dist/collection/collection-manifest.json +0 -7
  260. package/dist/collection/components/buffer-tools/buffer-tools.js +30 -1
  261. package/dist/collection/components/card-manager/card-manager.js +34 -2
  262. package/dist/collection/components/consent-manager/consent-manager.js +32 -0
  263. package/dist/collection/components/create-feature/create-feature.js +31 -2
  264. package/dist/collection/components/create-related-feature/create-related-feature.js +30 -1
  265. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +21 -23
  266. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +38 -9
  267. package/dist/collection/components/deduct-calculator/deduct-calculator.js +1 -1
  268. package/dist/collection/components/delete-button/delete-button.js +31 -2
  269. package/dist/collection/components/delete-dialog/delete-dialog.js +33 -1
  270. package/dist/collection/components/edit-card/edit-card.js +30 -1
  271. package/dist/collection/components/feature-details/feature-details.js +24 -6
  272. package/dist/collection/components/feature-list/feature-list.js +32 -3
  273. package/dist/collection/components/floor-filter/floor-filter.js +1 -1
  274. package/dist/collection/components/info-card/info-card.js +36 -2
  275. package/dist/collection/components/json-editor/json-editor.js +38 -1
  276. package/dist/collection/components/layer-list/layer-list.js +35 -3
  277. package/dist/collection/components/layer-table/layer-table.js +34 -5
  278. package/dist/collection/components/map-card/map-card.js +31 -2
  279. package/dist/collection/components/map-draw-tools/map-draw-tools.js +30 -1
  280. package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
  281. package/dist/collection/components/map-layer-picker/map-layer-picker.js +30 -1
  282. package/dist/collection/components/map-legend/map-legend.js +1 -1
  283. package/dist/collection/components/map-picker/map-picker.js +30 -1
  284. package/dist/collection/components/map-search/map-search.js +1 -1
  285. package/dist/collection/components/map-select-tools/map-select-tools.js +15 -4
  286. package/dist/collection/components/map-tools/map-tools.js +30 -1
  287. package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
  288. package/dist/collection/components/pdf-download/pdf-download.js +33 -1
  289. package/dist/collection/components/public-notification/public-notification.js +13 -2
  290. package/dist/collection/components/refine-selection/refine-selection.js +15 -1
  291. package/dist/collection/components/share-item/share-item.js +1 -1
  292. package/dist/collection/components/solution-configuration/solution-configuration.js +38 -4
  293. package/dist/collection/components/solution-contents/solution-contents.js +1 -1
  294. package/dist/collection/components/solution-item/solution-item.js +37 -3
  295. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +30 -1
  296. package/dist/collection/components/solution-item-details/solution-item-details.js +38 -1
  297. package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
  298. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +35 -1
  299. package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +35 -1
  300. package/dist/collection/components/solution-resource-item/solution-resource-item.js +35 -1
  301. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +35 -1
  302. package/dist/collection/components/solution-template-data/solution-template-data.js +35 -1
  303. package/dist/collection/components/solution-variables/solution-variables.js +35 -1
  304. package/dist/collection/components/spatial-ref/spatial-ref.js +35 -1
  305. package/dist/collection/demos/crowdsource-manager.html +0 -1
  306. package/dist/collection/demos/crowdsource-reporter.html +2 -2
  307. package/dist/components/buffer-tools2.js +15 -3
  308. package/dist/components/card-manager2.js +18 -3
  309. package/dist/components/consent-manager.js +15 -0
  310. package/dist/components/create-feature2.js +14 -2
  311. package/dist/components/create-related-feature2.js +13 -1
  312. package/dist/components/crowdsource-manager.js +15 -16
  313. package/dist/components/crowdsource-reporter.js +21 -9
  314. package/dist/components/deduct-calculator2.js +1 -1
  315. package/dist/components/delete-button2.js +16 -4
  316. package/dist/components/delete-dialog2.js +16 -1
  317. package/dist/components/edit-card2.js +13 -1
  318. package/dist/components/feature-details2.js +8 -6
  319. package/dist/components/feature-list2.js +15 -3
  320. package/dist/components/floor-filter2.js +1 -1
  321. package/dist/components/info-card2.js +19 -2
  322. package/dist/components/json-editor2.js +21 -1
  323. package/dist/components/layer-list2.js +18 -3
  324. package/dist/components/layer-table2.js +17 -5
  325. package/dist/components/map-card2.js +14 -2
  326. package/dist/components/map-draw-tools2.js +13 -1
  327. package/dist/components/map-fullscreen2.js +1 -1
  328. package/dist/components/map-layer-picker2.js +13 -1
  329. package/dist/components/map-legend2.js +1 -1
  330. package/dist/components/map-picker2.js +13 -1
  331. package/dist/components/map-search2.js +1 -1
  332. package/dist/components/map-select-tools2.js +14 -4
  333. package/dist/components/map-tools2.js +13 -1
  334. package/dist/components/pci-calculator.js +1 -1
  335. package/dist/components/pdf-download2.js +16 -1
  336. package/dist/components/public-notification.js +12 -2
  337. package/dist/components/refine-selection2.js +14 -1
  338. package/dist/components/share-item.js +1 -1
  339. package/dist/components/solution-configuration.js +23 -6
  340. package/dist/components/solution-contents2.js +1 -1
  341. package/dist/components/solution-item-accordion.js +13 -1
  342. package/dist/components/solution-item-details2.js +22 -2
  343. package/dist/components/solution-item-icon2.js +1 -1
  344. package/dist/components/solution-item-sharing2.js +20 -3
  345. package/dist/components/solution-item2.js +22 -5
  346. package/dist/components/solution-organization-variables2.js +18 -1
  347. package/dist/components/solution-resource-item2.js +20 -3
  348. package/dist/components/solution-spatial-ref2.js +20 -3
  349. package/dist/components/solution-template-data2.js +20 -3
  350. package/dist/components/solution-variables2.js +18 -1
  351. package/dist/components/spatial-ref.js +18 -1
  352. package/dist/esm/basemap-gallery_7.entry.js +26 -6
  353. package/dist/esm/buffer-tools_3.entry.js +23 -3
  354. package/dist/esm/calcite-alert_5.entry.js +40 -5
  355. package/dist/esm/calcite-combobox_3.entry.js +11 -1
  356. package/dist/esm/calcite-flow_4.entry.js +33 -10
  357. package/dist/esm/calcite-shell-panel_14.entry.js +119 -10
  358. package/dist/esm/calcite-shell_3.entry.js +26 -4
  359. package/dist/esm/card-manager_3.entry.js +41 -9
  360. package/dist/esm/consent-manager.entry.js +12 -0
  361. package/dist/esm/crowdsource-manager.entry.js +13 -14
  362. package/dist/esm/crowdsource-reporter.entry.js +19 -9
  363. package/dist/esm/deduct-calculator.entry.js +1 -1
  364. package/dist/esm/feature-list.entry.js +13 -3
  365. package/dist/esm/loader.js +1 -1
  366. package/dist/esm/map-select-tools_3.entry.js +38 -6
  367. package/dist/esm/pci-calculator.entry.js +1 -1
  368. package/dist/esm/public-notification.entry.js +11 -2
  369. package/dist/esm/share-item.entry.js +1 -1
  370. package/dist/esm/solution-configuration.entry.js +20 -5
  371. package/dist/esm/solution-contents_3.entry.js +37 -7
  372. package/dist/esm/solution-item-accordion.entry.js +11 -1
  373. package/dist/esm/solution-item-icon.entry.js +1 -1
  374. package/dist/esm/solutions-components.js +1 -1
  375. package/dist/esm/spatial-ref.entry.js +16 -1
  376. package/dist/solutions-components/assets/t9n/card-manager/resources_ar.json +1 -1
  377. package/dist/solutions-components/assets/t9n/card-manager/resources_bg.json +1 -1
  378. package/dist/solutions-components/assets/t9n/card-manager/resources_bs.json +1 -1
  379. package/dist/solutions-components/assets/t9n/card-manager/resources_ca.json +1 -1
  380. package/dist/solutions-components/assets/t9n/card-manager/resources_cs.json +1 -1
  381. package/dist/solutions-components/assets/t9n/card-manager/resources_da.json +1 -1
  382. package/dist/solutions-components/assets/t9n/card-manager/resources_de.json +1 -1
  383. package/dist/solutions-components/assets/t9n/card-manager/resources_el.json +1 -1
  384. package/dist/solutions-components/assets/t9n/card-manager/resources_es.json +1 -1
  385. package/dist/solutions-components/assets/t9n/card-manager/resources_et.json +1 -1
  386. package/dist/solutions-components/assets/t9n/card-manager/resources_fi.json +1 -1
  387. package/dist/solutions-components/assets/t9n/card-manager/resources_fr.json +1 -1
  388. package/dist/solutions-components/assets/t9n/card-manager/resources_he.json +1 -1
  389. package/dist/solutions-components/assets/t9n/card-manager/resources_hr.json +1 -1
  390. package/dist/solutions-components/assets/t9n/card-manager/resources_hu.json +1 -1
  391. package/dist/solutions-components/assets/t9n/card-manager/resources_id.json +1 -1
  392. package/dist/solutions-components/assets/t9n/card-manager/resources_it.json +1 -1
  393. package/dist/solutions-components/assets/t9n/card-manager/resources_ja.json +1 -1
  394. package/dist/solutions-components/assets/t9n/card-manager/resources_ko.json +1 -1
  395. package/dist/solutions-components/assets/t9n/card-manager/resources_lt.json +1 -1
  396. package/dist/solutions-components/assets/t9n/card-manager/resources_lv.json +1 -1
  397. package/dist/solutions-components/assets/t9n/card-manager/resources_nb.json +1 -1
  398. package/dist/solutions-components/assets/t9n/card-manager/resources_nl.json +1 -1
  399. package/dist/solutions-components/assets/t9n/card-manager/resources_pl.json +1 -1
  400. package/dist/solutions-components/assets/t9n/card-manager/resources_pt-BR.json +1 -1
  401. package/dist/solutions-components/assets/t9n/card-manager/resources_pt-PT.json +1 -1
  402. package/dist/solutions-components/assets/t9n/card-manager/resources_ro.json +1 -1
  403. package/dist/solutions-components/assets/t9n/card-manager/resources_ru.json +1 -1
  404. package/dist/solutions-components/assets/t9n/card-manager/resources_sk.json +1 -1
  405. package/dist/solutions-components/assets/t9n/card-manager/resources_sl.json +1 -1
  406. package/dist/solutions-components/assets/t9n/card-manager/resources_sr.json +1 -1
  407. package/dist/solutions-components/assets/t9n/card-manager/resources_sv.json +1 -1
  408. package/dist/solutions-components/assets/t9n/card-manager/resources_th.json +1 -1
  409. package/dist/solutions-components/assets/t9n/card-manager/resources_tr.json +1 -1
  410. package/dist/solutions-components/assets/t9n/card-manager/resources_uk.json +1 -1
  411. package/dist/solutions-components/assets/t9n/card-manager/resources_vi.json +1 -1
  412. package/dist/solutions-components/assets/t9n/card-manager/resources_zh-CN.json +1 -1
  413. package/dist/solutions-components/assets/t9n/card-manager/resources_zh-HK.json +1 -1
  414. package/dist/solutions-components/assets/t9n/card-manager/resources_zh-TW.json +1 -1
  415. package/dist/solutions-components/assets/t9n/create-feature/resources_ar.json +1 -1
  416. package/dist/solutions-components/assets/t9n/create-feature/resources_bg.json +1 -1
  417. package/dist/solutions-components/assets/t9n/create-feature/resources_bs.json +1 -1
  418. package/dist/solutions-components/assets/t9n/create-feature/resources_ca.json +1 -1
  419. package/dist/solutions-components/assets/t9n/create-feature/resources_cs.json +1 -1
  420. package/dist/solutions-components/assets/t9n/create-feature/resources_da.json +1 -1
  421. package/dist/solutions-components/assets/t9n/create-feature/resources_de.json +1 -1
  422. package/dist/solutions-components/assets/t9n/create-feature/resources_el.json +1 -1
  423. package/dist/solutions-components/assets/t9n/create-feature/resources_es.json +1 -1
  424. package/dist/solutions-components/assets/t9n/create-feature/resources_et.json +1 -1
  425. package/dist/solutions-components/assets/t9n/create-feature/resources_fi.json +1 -1
  426. package/dist/solutions-components/assets/t9n/create-feature/resources_fr.json +1 -1
  427. package/dist/solutions-components/assets/t9n/create-feature/resources_he.json +1 -1
  428. package/dist/solutions-components/assets/t9n/create-feature/resources_hr.json +1 -1
  429. package/dist/solutions-components/assets/t9n/create-feature/resources_hu.json +1 -1
  430. package/dist/solutions-components/assets/t9n/create-feature/resources_id.json +1 -1
  431. package/dist/solutions-components/assets/t9n/create-feature/resources_it.json +1 -1
  432. package/dist/solutions-components/assets/t9n/create-feature/resources_ja.json +1 -1
  433. package/dist/solutions-components/assets/t9n/create-feature/resources_ko.json +1 -1
  434. package/dist/solutions-components/assets/t9n/create-feature/resources_lt.json +1 -1
  435. package/dist/solutions-components/assets/t9n/create-feature/resources_lv.json +1 -1
  436. package/dist/solutions-components/assets/t9n/create-feature/resources_nb.json +1 -1
  437. package/dist/solutions-components/assets/t9n/create-feature/resources_nl.json +1 -1
  438. package/dist/solutions-components/assets/t9n/create-feature/resources_pl.json +1 -1
  439. package/dist/solutions-components/assets/t9n/create-feature/resources_pt-BR.json +2 -2
  440. package/dist/solutions-components/assets/t9n/create-feature/resources_pt-PT.json +1 -1
  441. package/dist/solutions-components/assets/t9n/create-feature/resources_ro.json +1 -1
  442. package/dist/solutions-components/assets/t9n/create-feature/resources_ru.json +1 -1
  443. package/dist/solutions-components/assets/t9n/create-feature/resources_sk.json +1 -1
  444. package/dist/solutions-components/assets/t9n/create-feature/resources_sl.json +1 -1
  445. package/dist/solutions-components/assets/t9n/create-feature/resources_sr.json +1 -1
  446. package/dist/solutions-components/assets/t9n/create-feature/resources_sv.json +1 -1
  447. package/dist/solutions-components/assets/t9n/create-feature/resources_th.json +1 -1
  448. package/dist/solutions-components/assets/t9n/create-feature/resources_tr.json +1 -1
  449. package/dist/solutions-components/assets/t9n/create-feature/resources_uk.json +1 -1
  450. package/dist/solutions-components/assets/t9n/create-feature/resources_vi.json +1 -1
  451. package/dist/solutions-components/assets/t9n/create-feature/resources_zh-CN.json +1 -1
  452. package/dist/solutions-components/assets/t9n/create-feature/resources_zh-HK.json +1 -1
  453. package/dist/solutions-components/assets/t9n/create-feature/resources_zh-TW.json +1 -1
  454. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ar.json +1 -1
  455. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_bg.json +1 -1
  456. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_bs.json +1 -1
  457. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ca.json +1 -1
  458. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_cs.json +1 -1
  459. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_da.json +1 -1
  460. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_de.json +1 -1
  461. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_el.json +1 -1
  462. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_es.json +1 -1
  463. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_et.json +1 -1
  464. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_fi.json +1 -1
  465. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_fr.json +1 -1
  466. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_he.json +1 -1
  467. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_hr.json +1 -1
  468. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_hu.json +1 -1
  469. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_id.json +1 -1
  470. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_it.json +1 -1
  471. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ja.json +1 -1
  472. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ko.json +1 -1
  473. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_lt.json +1 -1
  474. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_lv.json +1 -1
  475. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_nb.json +1 -1
  476. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_nl.json +1 -1
  477. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pl.json +1 -1
  478. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pt-BR.json +1 -1
  479. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_pt-PT.json +1 -1
  480. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ro.json +1 -1
  481. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_ru.json +1 -1
  482. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sk.json +1 -1
  483. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sl.json +1 -1
  484. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sr.json +1 -1
  485. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_sv.json +1 -1
  486. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_th.json +1 -1
  487. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_tr.json +1 -1
  488. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_uk.json +1 -1
  489. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_vi.json +1 -1
  490. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-CN.json +1 -1
  491. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-HK.json +1 -1
  492. package/dist/solutions-components/assets/t9n/crowdsource-reporter/resources_zh-TW.json +1 -1
  493. package/dist/solutions-components/assets/t9n/feature-list/resources_ar.json +2 -2
  494. package/dist/solutions-components/assets/t9n/feature-list/resources_bg.json +2 -2
  495. package/dist/solutions-components/assets/t9n/feature-list/resources_bs.json +2 -2
  496. package/dist/solutions-components/assets/t9n/feature-list/resources_ca.json +2 -2
  497. package/dist/solutions-components/assets/t9n/feature-list/resources_cs.json +2 -2
  498. package/dist/solutions-components/assets/t9n/feature-list/resources_da.json +2 -2
  499. package/dist/solutions-components/assets/t9n/feature-list/resources_de.json +2 -2
  500. package/dist/solutions-components/assets/t9n/feature-list/resources_el.json +2 -2
  501. package/dist/solutions-components/assets/t9n/feature-list/resources_es.json +2 -2
  502. package/dist/solutions-components/assets/t9n/feature-list/resources_et.json +2 -2
  503. package/dist/solutions-components/assets/t9n/feature-list/resources_fi.json +2 -2
  504. package/dist/solutions-components/assets/t9n/feature-list/resources_fr.json +2 -2
  505. package/dist/solutions-components/assets/t9n/feature-list/resources_he.json +2 -2
  506. package/dist/solutions-components/assets/t9n/feature-list/resources_hr.json +2 -2
  507. package/dist/solutions-components/assets/t9n/feature-list/resources_hu.json +2 -2
  508. package/dist/solutions-components/assets/t9n/feature-list/resources_id.json +2 -2
  509. package/dist/solutions-components/assets/t9n/feature-list/resources_it.json +2 -2
  510. package/dist/solutions-components/assets/t9n/feature-list/resources_ja.json +2 -2
  511. package/dist/solutions-components/assets/t9n/feature-list/resources_ko.json +2 -2
  512. package/dist/solutions-components/assets/t9n/feature-list/resources_lt.json +2 -2
  513. package/dist/solutions-components/assets/t9n/feature-list/resources_lv.json +2 -2
  514. package/dist/solutions-components/assets/t9n/feature-list/resources_nb.json +2 -2
  515. package/dist/solutions-components/assets/t9n/feature-list/resources_nl.json +2 -2
  516. package/dist/solutions-components/assets/t9n/feature-list/resources_pl.json +2 -2
  517. package/dist/solutions-components/assets/t9n/feature-list/resources_pt-BR.json +2 -2
  518. package/dist/solutions-components/assets/t9n/feature-list/resources_pt-PT.json +2 -2
  519. package/dist/solutions-components/assets/t9n/feature-list/resources_ro.json +2 -2
  520. package/dist/solutions-components/assets/t9n/feature-list/resources_ru.json +2 -2
  521. package/dist/solutions-components/assets/t9n/feature-list/resources_sk.json +2 -2
  522. package/dist/solutions-components/assets/t9n/feature-list/resources_sl.json +2 -2
  523. package/dist/solutions-components/assets/t9n/feature-list/resources_sr.json +2 -2
  524. package/dist/solutions-components/assets/t9n/feature-list/resources_sv.json +2 -2
  525. package/dist/solutions-components/assets/t9n/feature-list/resources_th.json +2 -2
  526. package/dist/solutions-components/assets/t9n/feature-list/resources_tr.json +2 -2
  527. package/dist/solutions-components/assets/t9n/feature-list/resources_uk.json +2 -2
  528. package/dist/solutions-components/assets/t9n/feature-list/resources_vi.json +2 -2
  529. package/dist/solutions-components/assets/t9n/feature-list/resources_zh-CN.json +2 -2
  530. package/dist/solutions-components/assets/t9n/feature-list/resources_zh-HK.json +2 -2
  531. package/dist/solutions-components/assets/t9n/feature-list/resources_zh-TW.json +2 -2
  532. package/dist/solutions-components/assets/t9n/layer-table/resources_ar.json +1 -1
  533. package/dist/solutions-components/assets/t9n/layer-table/resources_bg.json +1 -1
  534. package/dist/solutions-components/assets/t9n/layer-table/resources_bs.json +1 -1
  535. package/dist/solutions-components/assets/t9n/layer-table/resources_ca.json +1 -1
  536. package/dist/solutions-components/assets/t9n/layer-table/resources_cs.json +1 -1
  537. package/dist/solutions-components/assets/t9n/layer-table/resources_da.json +1 -1
  538. package/dist/solutions-components/assets/t9n/layer-table/resources_de.json +1 -1
  539. package/dist/solutions-components/assets/t9n/layer-table/resources_el.json +1 -1
  540. package/dist/solutions-components/assets/t9n/layer-table/resources_es.json +1 -1
  541. package/dist/solutions-components/assets/t9n/layer-table/resources_et.json +1 -1
  542. package/dist/solutions-components/assets/t9n/layer-table/resources_fi.json +1 -1
  543. package/dist/solutions-components/assets/t9n/layer-table/resources_fr.json +1 -1
  544. package/dist/solutions-components/assets/t9n/layer-table/resources_he.json +1 -1
  545. package/dist/solutions-components/assets/t9n/layer-table/resources_hr.json +1 -1
  546. package/dist/solutions-components/assets/t9n/layer-table/resources_hu.json +1 -1
  547. package/dist/solutions-components/assets/t9n/layer-table/resources_id.json +1 -1
  548. package/dist/solutions-components/assets/t9n/layer-table/resources_it.json +1 -1
  549. package/dist/solutions-components/assets/t9n/layer-table/resources_ja.json +1 -1
  550. package/dist/solutions-components/assets/t9n/layer-table/resources_ko.json +1 -1
  551. package/dist/solutions-components/assets/t9n/layer-table/resources_lt.json +1 -1
  552. package/dist/solutions-components/assets/t9n/layer-table/resources_lv.json +1 -1
  553. package/dist/solutions-components/assets/t9n/layer-table/resources_nb.json +1 -1
  554. package/dist/solutions-components/assets/t9n/layer-table/resources_nl.json +1 -1
  555. package/dist/solutions-components/assets/t9n/layer-table/resources_pl.json +1 -1
  556. package/dist/solutions-components/assets/t9n/layer-table/resources_pt-BR.json +1 -1
  557. package/dist/solutions-components/assets/t9n/layer-table/resources_pt-PT.json +1 -1
  558. package/dist/solutions-components/assets/t9n/layer-table/resources_ro.json +1 -1
  559. package/dist/solutions-components/assets/t9n/layer-table/resources_ru.json +1 -1
  560. package/dist/solutions-components/assets/t9n/layer-table/resources_sk.json +1 -1
  561. package/dist/solutions-components/assets/t9n/layer-table/resources_sl.json +1 -1
  562. package/dist/solutions-components/assets/t9n/layer-table/resources_sr.json +1 -1
  563. package/dist/solutions-components/assets/t9n/layer-table/resources_sv.json +1 -1
  564. package/dist/solutions-components/assets/t9n/layer-table/resources_th.json +1 -1
  565. package/dist/solutions-components/assets/t9n/layer-table/resources_tr.json +1 -1
  566. package/dist/solutions-components/assets/t9n/layer-table/resources_uk.json +1 -1
  567. package/dist/solutions-components/assets/t9n/layer-table/resources_vi.json +1 -1
  568. package/dist/solutions-components/assets/t9n/layer-table/resources_zh-CN.json +1 -1
  569. package/dist/solutions-components/assets/t9n/layer-table/resources_zh-HK.json +1 -1
  570. package/dist/solutions-components/assets/t9n/layer-table/resources_zh-TW.json +1 -1
  571. package/dist/solutions-components/assets/t9n/map-card/resources_ar.json +2 -1
  572. package/dist/solutions-components/assets/t9n/map-card/resources_bg.json +2 -1
  573. package/dist/solutions-components/assets/t9n/map-card/resources_bs.json +2 -1
  574. package/dist/solutions-components/assets/t9n/map-card/resources_ca.json +2 -1
  575. package/dist/solutions-components/assets/t9n/map-card/resources_cs.json +2 -1
  576. package/dist/solutions-components/assets/t9n/map-card/resources_da.json +2 -1
  577. package/dist/solutions-components/assets/t9n/map-card/resources_de.json +2 -1
  578. package/dist/solutions-components/assets/t9n/map-card/resources_el.json +2 -1
  579. package/dist/solutions-components/assets/t9n/map-card/resources_es.json +2 -1
  580. package/dist/solutions-components/assets/t9n/map-card/resources_et.json +2 -1
  581. package/dist/solutions-components/assets/t9n/map-card/resources_fi.json +2 -1
  582. package/dist/solutions-components/assets/t9n/map-card/resources_fr.json +2 -1
  583. package/dist/solutions-components/assets/t9n/map-card/resources_he.json +2 -1
  584. package/dist/solutions-components/assets/t9n/map-card/resources_hr.json +2 -1
  585. package/dist/solutions-components/assets/t9n/map-card/resources_hu.json +2 -1
  586. package/dist/solutions-components/assets/t9n/map-card/resources_id.json +2 -1
  587. package/dist/solutions-components/assets/t9n/map-card/resources_it.json +2 -1
  588. package/dist/solutions-components/assets/t9n/map-card/resources_ja.json +2 -1
  589. package/dist/solutions-components/assets/t9n/map-card/resources_ko.json +2 -1
  590. package/dist/solutions-components/assets/t9n/map-card/resources_lt.json +2 -1
  591. package/dist/solutions-components/assets/t9n/map-card/resources_lv.json +2 -1
  592. package/dist/solutions-components/assets/t9n/map-card/resources_nb.json +2 -1
  593. package/dist/solutions-components/assets/t9n/map-card/resources_nl.json +2 -1
  594. package/dist/solutions-components/assets/t9n/map-card/resources_pl.json +2 -1
  595. package/dist/solutions-components/assets/t9n/map-card/resources_pt-BR.json +2 -1
  596. package/dist/solutions-components/assets/t9n/map-card/resources_pt-PT.json +2 -1
  597. package/dist/solutions-components/assets/t9n/map-card/resources_ro.json +2 -1
  598. package/dist/solutions-components/assets/t9n/map-card/resources_ru.json +2 -1
  599. package/dist/solutions-components/assets/t9n/map-card/resources_sk.json +2 -1
  600. package/dist/solutions-components/assets/t9n/map-card/resources_sl.json +2 -1
  601. package/dist/solutions-components/assets/t9n/map-card/resources_sr.json +2 -1
  602. package/dist/solutions-components/assets/t9n/map-card/resources_sv.json +2 -1
  603. package/dist/solutions-components/assets/t9n/map-card/resources_th.json +2 -1
  604. package/dist/solutions-components/assets/t9n/map-card/resources_tr.json +2 -1
  605. package/dist/solutions-components/assets/t9n/map-card/resources_uk.json +2 -1
  606. package/dist/solutions-components/assets/t9n/map-card/resources_vi.json +2 -1
  607. package/dist/solutions-components/assets/t9n/map-card/resources_zh-CN.json +2 -1
  608. package/dist/solutions-components/assets/t9n/map-card/resources_zh-HK.json +2 -1
  609. package/dist/solutions-components/assets/t9n/map-card/resources_zh-TW.json +2 -1
  610. package/dist/solutions-components/demos/crowdsource-manager.html +0 -1
  611. package/dist/solutions-components/demos/crowdsource-reporter.html +2 -2
  612. package/dist/solutions-components/p-0a2e5861.entry.js +6 -0
  613. package/dist/solutions-components/{p-739ce6f3.entry.js → p-2f784608.entry.js} +1 -1
  614. package/dist/solutions-components/{p-1c2d0e90.entry.js → p-3e44cfab.entry.js} +1 -1
  615. package/dist/solutions-components/{p-841816a1.entry.js → p-41314f33.entry.js} +7 -7
  616. package/dist/solutions-components/{p-18089a0b.entry.js → p-471d5c7f.entry.js} +2 -2
  617. package/dist/solutions-components/p-5001cc41.entry.js +6 -0
  618. package/dist/solutions-components/p-561c0e02.entry.js +6 -0
  619. package/dist/solutions-components/p-56beff4c.entry.js +6 -0
  620. package/dist/solutions-components/p-592f2000.entry.js +6 -0
  621. package/dist/solutions-components/p-5cbf3eed.entry.js +6 -0
  622. package/dist/solutions-components/p-62d8796c.entry.js +17 -0
  623. package/dist/solutions-components/p-6d1922cc.entry.js +6 -0
  624. package/dist/solutions-components/p-80e81af7.entry.js +6 -0
  625. package/dist/solutions-components/{p-82ddf716.entry.js → p-8e2f4995.entry.js} +1 -1
  626. package/dist/solutions-components/{p-6502d0f8.entry.js → p-b7fbaeb7.entry.js} +1 -1
  627. package/dist/solutions-components/p-cced387c.entry.js +6 -0
  628. package/dist/solutions-components/{p-a5d79c86.entry.js → p-ce53e33d.entry.js} +2 -2
  629. package/dist/solutions-components/{p-59ccd27c.entry.js → p-d51c07d2.entry.js} +1 -1
  630. package/dist/solutions-components/p-d75cf651.entry.js +11 -0
  631. package/dist/solutions-components/p-d7afbe8d.entry.js +11 -0
  632. package/dist/solutions-components/p-e1e21798.entry.js +12 -0
  633. package/dist/solutions-components/p-e9026f9a.entry.js +6 -0
  634. package/dist/solutions-components/solutions-components.esm.js +1 -1
  635. package/dist/types/components/buffer-tools/buffer-tools.d.ts +8 -0
  636. package/dist/types/components/card-manager/card-manager.d.ts +8 -0
  637. package/dist/types/components/consent-manager/consent-manager.d.ts +8 -0
  638. package/dist/types/components/create-feature/create-feature.d.ts +8 -0
  639. package/dist/types/components/create-related-feature/create-related-feature.d.ts +8 -0
  640. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -4
  641. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +8 -0
  642. package/dist/types/components/deduct-calculator/deduct-calculator.d.ts +1 -1
  643. package/dist/types/components/delete-button/delete-button.d.ts +9 -1
  644. package/dist/types/components/delete-dialog/delete-dialog.d.ts +8 -0
  645. package/dist/types/components/edit-card/edit-card.d.ts +8 -0
  646. package/dist/types/components/feature-details/feature-details.d.ts +4 -0
  647. package/dist/types/components/feature-list/feature-list.d.ts +8 -0
  648. package/dist/types/components/info-card/info-card.d.ts +8 -0
  649. package/dist/types/components/json-editor/json-editor.d.ts +8 -0
  650. package/dist/types/components/layer-list/layer-list.d.ts +8 -0
  651. package/dist/types/components/layer-table/layer-table.d.ts +9 -1
  652. package/dist/types/components/map-card/map-card.d.ts +8 -0
  653. package/dist/types/components/map-draw-tools/map-draw-tools.d.ts +8 -0
  654. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +8 -0
  655. package/dist/types/components/map-picker/map-picker.d.ts +8 -0
  656. package/dist/types/components/map-select-tools/map-select-tools.d.ts +4 -0
  657. package/dist/types/components/map-tools/map-tools.d.ts +8 -0
  658. package/dist/types/components/pdf-download/pdf-download.d.ts +8 -0
  659. package/dist/types/components/public-notification/public-notification.d.ts +4 -0
  660. package/dist/types/components/refine-selection/refine-selection.d.ts +4 -0
  661. package/dist/types/components/solution-configuration/solution-configuration.d.ts +8 -0
  662. package/dist/types/components/solution-item/solution-item.d.ts +8 -0
  663. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +8 -0
  664. package/dist/types/components/solution-item-details/solution-item-details.d.ts +8 -0
  665. package/dist/types/components/solution-item-sharing/solution-item-sharing.d.ts +8 -0
  666. package/dist/types/components/solution-organization-variables/solution-organization-variables.d.ts +8 -0
  667. package/dist/types/components/solution-resource-item/solution-resource-item.d.ts +8 -0
  668. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +8 -0
  669. package/dist/types/components/solution-template-data/solution-template-data.d.ts +8 -0
  670. package/dist/types/components/solution-variables/solution-variables.d.ts +8 -0
  671. package/dist/types/components/spatial-ref/spatial-ref.d.ts +8 -0
  672. package/dist/types/components.d.ts +266 -120
  673. package/dist/types/preact.d.ts +0 -16
  674. package/package.json +5 -5
  675. package/dist/cjs/feature-comments.cjs.entry.js +0 -61
  676. package/dist/cjs/feature-form-flow-item.cjs.entry.js +0 -61
  677. package/dist/cjs/features-flow-item.cjs.entry.js +0 -61
  678. package/dist/cjs/layout-manager.cjs.entry.js +0 -114
  679. package/dist/cjs/list-flow-item.cjs.entry.js +0 -61
  680. package/dist/cjs/location-flow-item.cjs.entry.js +0 -61
  681. package/dist/cjs/refine-results-flow-item.cjs.entry.js +0 -61
  682. package/dist/collection/assets/t9n/feature-comments/resources.json +0 -3
  683. package/dist/collection/assets/t9n/feature-comments/resources_en.json +0 -3
  684. package/dist/collection/assets/t9n/feature-form-flow-item/resources.json +0 -3
  685. package/dist/collection/assets/t9n/feature-form-flow-item/resources_en.json +0 -3
  686. package/dist/collection/assets/t9n/layout-manager/resources.json +0 -7
  687. package/dist/collection/assets/t9n/layout-manager/resources_ar.json +0 -7
  688. package/dist/collection/assets/t9n/layout-manager/resources_bg.json +0 -7
  689. package/dist/collection/assets/t9n/layout-manager/resources_bs.json +0 -7
  690. package/dist/collection/assets/t9n/layout-manager/resources_ca.json +0 -7
  691. package/dist/collection/assets/t9n/layout-manager/resources_cs.json +0 -7
  692. package/dist/collection/assets/t9n/layout-manager/resources_da.json +0 -7
  693. package/dist/collection/assets/t9n/layout-manager/resources_de.json +0 -7
  694. package/dist/collection/assets/t9n/layout-manager/resources_el.json +0 -7
  695. package/dist/collection/assets/t9n/layout-manager/resources_en.json +0 -7
  696. package/dist/collection/assets/t9n/layout-manager/resources_es.json +0 -7
  697. package/dist/collection/assets/t9n/layout-manager/resources_et.json +0 -7
  698. package/dist/collection/assets/t9n/layout-manager/resources_fi.json +0 -7
  699. package/dist/collection/assets/t9n/layout-manager/resources_fr.json +0 -7
  700. package/dist/collection/assets/t9n/layout-manager/resources_he.json +0 -7
  701. package/dist/collection/assets/t9n/layout-manager/resources_hr.json +0 -7
  702. package/dist/collection/assets/t9n/layout-manager/resources_hu.json +0 -7
  703. package/dist/collection/assets/t9n/layout-manager/resources_id.json +0 -7
  704. package/dist/collection/assets/t9n/layout-manager/resources_it.json +0 -7
  705. package/dist/collection/assets/t9n/layout-manager/resources_ja.json +0 -7
  706. package/dist/collection/assets/t9n/layout-manager/resources_ko.json +0 -7
  707. package/dist/collection/assets/t9n/layout-manager/resources_lt.json +0 -7
  708. package/dist/collection/assets/t9n/layout-manager/resources_lv.json +0 -7
  709. package/dist/collection/assets/t9n/layout-manager/resources_nb.json +0 -7
  710. package/dist/collection/assets/t9n/layout-manager/resources_nl.json +0 -7
  711. package/dist/collection/assets/t9n/layout-manager/resources_pl.json +0 -7
  712. package/dist/collection/assets/t9n/layout-manager/resources_pt-BR.json +0 -7
  713. package/dist/collection/assets/t9n/layout-manager/resources_pt-PT.json +0 -7
  714. package/dist/collection/assets/t9n/layout-manager/resources_ro.json +0 -7
  715. package/dist/collection/assets/t9n/layout-manager/resources_ru.json +0 -7
  716. package/dist/collection/assets/t9n/layout-manager/resources_sk.json +0 -7
  717. package/dist/collection/assets/t9n/layout-manager/resources_sl.json +0 -7
  718. package/dist/collection/assets/t9n/layout-manager/resources_sr.json +0 -7
  719. package/dist/collection/assets/t9n/layout-manager/resources_sv.json +0 -7
  720. package/dist/collection/assets/t9n/layout-manager/resources_th.json +0 -7
  721. package/dist/collection/assets/t9n/layout-manager/resources_tr.json +0 -7
  722. package/dist/collection/assets/t9n/layout-manager/resources_uk.json +0 -7
  723. package/dist/collection/assets/t9n/layout-manager/resources_vi.json +0 -7
  724. package/dist/collection/assets/t9n/layout-manager/resources_zh-CN.json +0 -7
  725. package/dist/collection/assets/t9n/layout-manager/resources_zh-HK.json +0 -7
  726. package/dist/collection/assets/t9n/layout-manager/resources_zh-TW.json +0 -7
  727. package/dist/collection/assets/t9n/list-flow-item/resources.json +0 -3
  728. package/dist/collection/assets/t9n/list-flow-item/resources_en.json +0 -3
  729. package/dist/collection/assets/t9n/location-flow-item/resources.json +0 -3
  730. package/dist/collection/assets/t9n/location-flow-item/resources_en.json +0 -3
  731. package/dist/collection/components/feature-comments/feature-comments.css +0 -19
  732. package/dist/collection/components/feature-comments/feature-comments.js +0 -80
  733. package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.css +0 -19
  734. package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.js +0 -80
  735. package/dist/collection/components/features-flow-item/features-flow-item.css +0 -19
  736. package/dist/collection/components/features-flow-item/features-flow-item.js +0 -80
  737. package/dist/collection/components/layout-manager/layout-manager.css +0 -73
  738. package/dist/collection/components/layout-manager/layout-manager.js +0 -161
  739. package/dist/collection/components/list-flow-item/list-flow-item.css +0 -19
  740. package/dist/collection/components/list-flow-item/list-flow-item.js +0 -80
  741. package/dist/collection/components/location-flow-item/location-flow-item.css +0 -19
  742. package/dist/collection/components/location-flow-item/location-flow-item.js +0 -80
  743. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.css +0 -19
  744. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +0 -80
  745. package/dist/components/feature-comments.d.ts +0 -11
  746. package/dist/components/feature-comments.js +0 -76
  747. package/dist/components/feature-form-flow-item.d.ts +0 -11
  748. package/dist/components/feature-form-flow-item.js +0 -76
  749. package/dist/components/features-flow-item.d.ts +0 -11
  750. package/dist/components/features-flow-item.js +0 -76
  751. package/dist/components/layout-manager.d.ts +0 -11
  752. package/dist/components/layout-manager.js +0 -159
  753. package/dist/components/list-flow-item.d.ts +0 -11
  754. package/dist/components/list-flow-item.js +0 -76
  755. package/dist/components/location-flow-item.d.ts +0 -11
  756. package/dist/components/location-flow-item.js +0 -76
  757. package/dist/components/refine-results-flow-item.d.ts +0 -11
  758. package/dist/components/refine-results-flow-item.js +0 -76
  759. package/dist/esm/feature-comments.entry.js +0 -57
  760. package/dist/esm/feature-form-flow-item.entry.js +0 -57
  761. package/dist/esm/features-flow-item.entry.js +0 -57
  762. package/dist/esm/layout-manager.entry.js +0 -110
  763. package/dist/esm/list-flow-item.entry.js +0 -57
  764. package/dist/esm/location-flow-item.entry.js +0 -57
  765. package/dist/esm/refine-results-flow-item.entry.js +0 -57
  766. package/dist/solutions-components/assets/t9n/feature-comments/resources.json +0 -3
  767. package/dist/solutions-components/assets/t9n/feature-comments/resources_en.json +0 -3
  768. package/dist/solutions-components/assets/t9n/feature-form-flow-item/resources.json +0 -3
  769. package/dist/solutions-components/assets/t9n/feature-form-flow-item/resources_en.json +0 -3
  770. package/dist/solutions-components/assets/t9n/layout-manager/resources.json +0 -7
  771. package/dist/solutions-components/assets/t9n/layout-manager/resources_ar.json +0 -7
  772. package/dist/solutions-components/assets/t9n/layout-manager/resources_bg.json +0 -7
  773. package/dist/solutions-components/assets/t9n/layout-manager/resources_bs.json +0 -7
  774. package/dist/solutions-components/assets/t9n/layout-manager/resources_ca.json +0 -7
  775. package/dist/solutions-components/assets/t9n/layout-manager/resources_cs.json +0 -7
  776. package/dist/solutions-components/assets/t9n/layout-manager/resources_da.json +0 -7
  777. package/dist/solutions-components/assets/t9n/layout-manager/resources_de.json +0 -7
  778. package/dist/solutions-components/assets/t9n/layout-manager/resources_el.json +0 -7
  779. package/dist/solutions-components/assets/t9n/layout-manager/resources_en.json +0 -7
  780. package/dist/solutions-components/assets/t9n/layout-manager/resources_es.json +0 -7
  781. package/dist/solutions-components/assets/t9n/layout-manager/resources_et.json +0 -7
  782. package/dist/solutions-components/assets/t9n/layout-manager/resources_fi.json +0 -7
  783. package/dist/solutions-components/assets/t9n/layout-manager/resources_fr.json +0 -7
  784. package/dist/solutions-components/assets/t9n/layout-manager/resources_he.json +0 -7
  785. package/dist/solutions-components/assets/t9n/layout-manager/resources_hr.json +0 -7
  786. package/dist/solutions-components/assets/t9n/layout-manager/resources_hu.json +0 -7
  787. package/dist/solutions-components/assets/t9n/layout-manager/resources_id.json +0 -7
  788. package/dist/solutions-components/assets/t9n/layout-manager/resources_it.json +0 -7
  789. package/dist/solutions-components/assets/t9n/layout-manager/resources_ja.json +0 -7
  790. package/dist/solutions-components/assets/t9n/layout-manager/resources_ko.json +0 -7
  791. package/dist/solutions-components/assets/t9n/layout-manager/resources_lt.json +0 -7
  792. package/dist/solutions-components/assets/t9n/layout-manager/resources_lv.json +0 -7
  793. package/dist/solutions-components/assets/t9n/layout-manager/resources_nb.json +0 -7
  794. package/dist/solutions-components/assets/t9n/layout-manager/resources_nl.json +0 -7
  795. package/dist/solutions-components/assets/t9n/layout-manager/resources_pl.json +0 -7
  796. package/dist/solutions-components/assets/t9n/layout-manager/resources_pt-BR.json +0 -7
  797. package/dist/solutions-components/assets/t9n/layout-manager/resources_pt-PT.json +0 -7
  798. package/dist/solutions-components/assets/t9n/layout-manager/resources_ro.json +0 -7
  799. package/dist/solutions-components/assets/t9n/layout-manager/resources_ru.json +0 -7
  800. package/dist/solutions-components/assets/t9n/layout-manager/resources_sk.json +0 -7
  801. package/dist/solutions-components/assets/t9n/layout-manager/resources_sl.json +0 -7
  802. package/dist/solutions-components/assets/t9n/layout-manager/resources_sr.json +0 -7
  803. package/dist/solutions-components/assets/t9n/layout-manager/resources_sv.json +0 -7
  804. package/dist/solutions-components/assets/t9n/layout-manager/resources_th.json +0 -7
  805. package/dist/solutions-components/assets/t9n/layout-manager/resources_tr.json +0 -7
  806. package/dist/solutions-components/assets/t9n/layout-manager/resources_uk.json +0 -7
  807. package/dist/solutions-components/assets/t9n/layout-manager/resources_vi.json +0 -7
  808. package/dist/solutions-components/assets/t9n/layout-manager/resources_zh-CN.json +0 -7
  809. package/dist/solutions-components/assets/t9n/layout-manager/resources_zh-HK.json +0 -7
  810. package/dist/solutions-components/assets/t9n/layout-manager/resources_zh-TW.json +0 -7
  811. package/dist/solutions-components/assets/t9n/list-flow-item/resources.json +0 -3
  812. package/dist/solutions-components/assets/t9n/list-flow-item/resources_en.json +0 -3
  813. package/dist/solutions-components/assets/t9n/location-flow-item/resources.json +0 -3
  814. package/dist/solutions-components/assets/t9n/location-flow-item/resources_en.json +0 -3
  815. package/dist/solutions-components/p-04ab956c.entry.js +0 -6
  816. package/dist/solutions-components/p-06364211.entry.js +0 -6
  817. package/dist/solutions-components/p-1f07e21a.entry.js +0 -6
  818. package/dist/solutions-components/p-46416e11.entry.js +0 -6
  819. package/dist/solutions-components/p-70c0050c.entry.js +0 -6
  820. package/dist/solutions-components/p-720de4db.entry.js +0 -6
  821. package/dist/solutions-components/p-74bcef23.entry.js +0 -11
  822. package/dist/solutions-components/p-76154700.entry.js +0 -6
  823. package/dist/solutions-components/p-938bc915.entry.js +0 -6
  824. package/dist/solutions-components/p-97fe6ec5.entry.js +0 -6
  825. package/dist/solutions-components/p-9c4fef09.entry.js +0 -17
  826. package/dist/solutions-components/p-9d56f4b5.entry.js +0 -6
  827. package/dist/solutions-components/p-9da8a590.entry.js +0 -6
  828. package/dist/solutions-components/p-aac0c89c.entry.js +0 -6
  829. package/dist/solutions-components/p-be4c7ffd.entry.js +0 -6
  830. package/dist/solutions-components/p-d2612c30.entry.js +0 -6
  831. package/dist/solutions-components/p-df7de4b7.entry.js +0 -12
  832. package/dist/solutions-components/p-e345f9c4.entry.js +0 -6
  833. package/dist/solutions-components/p-eadff42b.entry.js +0 -11
  834. package/dist/solutions-components/p-fa1c368c.entry.js +0 -6
  835. package/dist/solutions-components/p-ff3858c6.entry.js +0 -6
  836. package/dist/types/components/feature-comments/feature-comments.d.ts +0 -19
  837. package/dist/types/components/feature-form-flow-item/feature-form-flow-item.d.ts +0 -19
  838. package/dist/types/components/features-flow-item/features-flow-item.d.ts +0 -19
  839. package/dist/types/components/layout-manager/layout-manager.d.ts +0 -69
  840. package/dist/types/components/list-flow-item/list-flow-item.d.ts +0 -19
  841. package/dist/types/components/location-flow-item/location-flow-item.d.ts +0 -19
  842. package/dist/types/components/refine-results-flow-item/refine-results-flow-item.d.ts +0 -19
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as i,g as s,h as e,H as a,F as h}from"./p-4e6eb06e.js";import{l,g as o}from"./p-f4aadb3b.js";import{g as c,a as n,b as r,c as d,h as u,d as p,q as f}from"./p-d572627c.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";const m=class{constructor(s){t(this,s),this.togglePanel=i(this,"togglePanel",7),this.center=void 0,this.commentButtonText=void 0,this.commentSubmittedMessage=void 0,this.defaultWebmap="",this.description=void 0,this.enableAnonymousAccess=void 0,this.enableAnonymousComments=void 0,this.enableComments=void 0,this.enableHome=!0,this.enableLogin=void 0,this.enableNewReports=void 0,this.enableSearch=!0,this.enableZoom=!0,this.isMobile=void 0,this.layerExpressions=[],this.layerId=void 0,this.level=void 0,this.locale=void 0,this.loginTitle=void 0,this.mapInfos=[],this.mapView=void 0,this.objectId=void 0,this.reportButtonText=void 0,this.reportingOptions=void 0,this.reportsHeader=void 0,this.reportSubmittedMessage=void 0,this.searchConfiguration=void 0,this.showComments=void 0,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.theme="light",this.zoomToScale=void 0,this.floorLevel=void 0,this._featureCreationFailedErrorMsg=void 0,this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._mapInfo=void 0,this._reportSubmitted=!1,this._selectedLayerName=void 0,this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=void 0,this._updatedProgressBarStatus=.25,this._updatedSorting=void 0,this._updatedSortOption="sortNewest",this._commentSubmitted=!1,this._addingCommentFailed=!1}get el(){return s(this)}_createFeature;_currentFeatureId;_defaultCenter;_defaultLevel;_editableLayerIds;_featureDetails;_featureList;_currentFeature;_selectedRelatedFeature;_relatedTable;_filterList;_highlightHandle;_layerList;_createRelatedFeature;_layers;_mapChange;_mapClickHandle;reactiveUtils;FeatureFilter;_selectedFeature;_selectedFeatureIndex;_selectedLayerId;_shareNode;_urlParamsLoaded;_validLayers;_nonVisibleValidLayers;_selectedLayer;_layerItemsHash;_showFullPanel;_floorExpression;_formElements=[];_filterUrlParams;_filterInitState;_prevSelectedLayerId;async isMobileWatchHandler(){this.updatePanelState(!1,this._showFullPanel)}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.setMapView()}))}async floorLevelWatchHandler(){if(this._editableLayerIds)for(const t of this._editableLayerIds){const i=await c(this.mapView,t);i.floorInfo?.floorField&&this._updateFloorDefinitionExpression(i)}"layer-list"===this._flowItems[this._flowItems.length-1]&&this._layerList&&await this._layerList.refresh(),this._featureList&&this._featureList.refresh(),this._createFeature&&this._createFeature.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),setTimeout((()=>{"layer-list"===this._flowItems[this._flowItems.length-1]&&this._layerList&&this._layerList.refresh(),this._featureList&&this._featureList.refresh()}),50))}togglePanel;async componentWillLoad(){this._urlParamsLoaded=!1,await this._initModules(),await this._getTranslations(),await(this.mapView?.when((async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter((t=>this.reportingOptions[t].visible)):[],await this.setMapView()})))}render(){const t="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return e(a,{key:"fbe7fdc13c462e0fe155107ac784f03b3922d624"},this._reportSubmitted&&e("calcite-alert",{key:"9bcf7856ad01e7bc59142a862c50b9d84c443268","auto-close":!0,class:t+" report-submitted-msg",icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._reportSubmitted=!1},open:!0,placement:"top"},e("div",{key:"7b81a7c8b3d66159a790ab3d13be9f1b65a6202e",slot:"message"},this.reportSubmittedMessage?this.reportSubmittedMessage:this._translations.submitMsg)),this._featureCreationFailedErrorMsg&&e("calcite-alert",{key:"ee2f17e3326ef7c60fb2ee06ed313fd28cf7084a","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._featureCreationFailedErrorMsg=""},open:!0,placement:"top"},e("div",{key:"b356832ee6d4d16a84cdea0abb6b1c677f9ca1f6",slot:"title"},this._translations.error),e("div",{key:"8aa16df1114b75b6a3e2a76de7fb5c7cbc5d3632",slot:"message"},this._featureCreationFailedErrorMsg)),this._commentSubmitted&&e("calcite-alert",{key:"e99693c23ef18b62daf892fccaacbbfe2486702d","auto-close":!0,class:"report-submitted "+t,icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._commentSubmitted=!1},open:!0,placement:"top"},e("div",{key:"58ccda0d3782dbe70d346b973b7648f8ae4c8c8f",slot:"message"},this.commentSubmittedMessage||this._translations.commentSubmittedMsg)),this._addingCommentFailed&&e("calcite-alert",{key:"e49e9e3b33df17dd90b3263bec6c17566f6f7b1b","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._addingCommentFailed=!1},open:!0,placement:"top"},e("div",{key:"cfb88dd323ead1398cd73849f68a9c2846ef9d14",slot:"title"},this._translations.error),e("div",{key:"b27e8983a74c8613e569400b7c7ad0b14d43f323",slot:"message"},this._translations.addingCommentFailedMsg)),e("div",{key:"7ac3d49d6383d2a88e54d91fa00e2c81aa91a890"},e("calcite-shell",{key:"709e673f4e9261b4283c7593926d605c8a049abd","content-behind":!0},this._getReporter())))}async _initModules(){const[t,i]=await l(["esri/core/reactiveUtils","esri/layers/support/FeatureFilter"]);this.reactiveUtils=t,this.FeatureFilter=i}async setSelectedLayer(t,i){this._selectedLayerId=t,this._selectedLayer=await c(this.mapView,t),this._selectedLayerName=i,this._validLayers.forEach((i=>{this._nonVisibleValidLayers.find((t=>t.id===i.id))||i.set("visible",!t||i.id===t)}))}_getLayersConfig(t){return this.reportingOptions&&this.reportingOptions[t]?this.reportingOptions[t]:null}_getReporter(){const t=[];return this._flowItems.forEach((i=>{switch(i){case"layer-list":t.push(this.getLayerListFlowItem());break;case"feature-list":t.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":t.push(this.getFilterPanel()),this._restoreFilters();break;case"feature-details":t.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":t.push(this.getChooseCategoryFlowItem());break;case"feature-create":t.push(this.getFeatureCreateFlowItem());break;case"comment-details":t.push(this.getCommentDetailsFlowItem());break;case"add-comment":t.push(this.getAddCommentFlowItem())}})),e("calcite-panel",{class:"width-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},this.mapView?e("calcite-flow",null,t?.length>0&&t):e("calcite-loader",{label:"",scale:"m"}))}async sortOptionClick(t,i,s){this._updatedSorting={field:t,order:i},this._updatedSortOption=s}_toggleSort(){const t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return e("calcite-popover",{autoClose:!0,label:"",offsetDistance:0,placement:this.isMobile?"leading-start":"bottom-start",pointerDisabled:!0,referenceElement:"sort-popover"},e("calcite-list",{"selection-mode":"single"},e("calcite-list-item",{label:this._translations.sortNewest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"desc","sortNewest")},selected:"sortNewest"===this._updatedSortOption,value:"sortNewest"}),e("calcite-list-item",{label:this._translations.sortOldest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"asc","sortOldest")},selected:"sortOldest"===this._updatedSortOption,value:"sortOldest"}),t&&e(h,null,e("calcite-list-item",{label:this._translations.sortHighestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"desc","sortHighestVoted")},selected:"sortHighestVoted"===this._updatedSortOption,value:"sortHighestVoted"}),e("calcite-list-item",{label:this._translations.sortLowestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"asc","sortLowestVoted")},selected:"sortLowestVoted"===this._updatedSortOption,value:"sortLowestVoted"}))))}_restoreFilters(){setTimeout((()=>{this._filterList&&this._filterUrlParams&&this._filterInitState&&this._filterList.restoreFilters(this._filterUrlParams[0],this._filterInitState),this._filterInitState=null}),200)}async _handleFilterListReset(){this._filterActive=!1,this._filterUrlParams=null,this._filterInitState=null}async _handleFilterUpdate(){this._showLoadingIndicator=!0,this._filterActive=this._filterList.urlParams.getAll("filter").length>0,this._filterUrlParams=this._filterList.urlParams.getAll("filter"),await this._featureList.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportsHeader},this.isMobile&&this.getActionToExpandCollapsePanel(),this._hasValidLayers&&this.enableNewReports&&e("calcite-button",{appearance:"solid",onClick:this.navigateToChooseCategory.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),e("calcite-panel",{"full-height":!0,"full-width":!0},e("layer-list",{applyLayerViewFilter:this.showMyReportsOnly,class:"height-full",layers:this._editableLayerIds?.length>0?this._editableLayerIds:this._layers,locale:this.locale,mapView:this.mapView,onLayerSelect:this.displayFeaturesList.bind(this),onLayersListLoaded:this.layerListLoaded.bind(this),ref:t=>this._layerList=t,showFeatureCount:!0,showNextIcon:!0})))}getChooseCategoryFlowItem(){const t=this.reportingOptions?Object.keys(this.reportingOptions).filter((t=>this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd)):[];return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},e("calcite-panel",{"full-height":!0,"full-width":!0},e("div",{class:"progress-bar"},e("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),e("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},e("div",{slot:"message"},this._translations.chooseCategoryMsg)),e("layer-list",{class:"height-full",layers:t,locale:this.locale,mapView:this.mapView,onLayerSelect:this.navigateToCreateFeature.bind(this),showFeatureCount:!1,showNextIcon:!1})))}getFeatureCreateFlowItem(){return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,onCalciteFlowItemBack:this.backFromCreateFeaturePanel.bind(this)},this._showSubmitCancelButton&&e("div",{class:"width-full",slot:"footer"},e("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),e("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateFeaturePanel.bind(this),width:"full"},this._translations.cancel)),e("calcite-panel",{"full-height":!0,"full-width":!0},e("div",{class:"progress-bar"},e("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),e("create-feature",{customizeSubmit:!0,enableSearch:!0,floorLevel:this.floorLevel,formElements:this._formElements.find((t=>t.id===this._selectedLayerId)),isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onDrawComplete:this.onFormReady.bind(this),onEditingAttachment:this.showSubmitCancelButton.bind(this),onFail:this.createFeatureFailed.bind(this),onModeChanged:this.backFromCreateFeaturePanel.bind(this),onProgressStatus:this.updatedProgressStatus.bind(this),onSuccess:this.onReportSubmitted.bind(this),ref:t=>this._createFeature=t,searchConfiguration:this.searchConfiguration,selectedLayerId:this._selectedLayerId})))}updatedProgressStatus(t){this._updatedProgressBarStatus=t.detail}onFormReady(){this._showSubmitCancelButton=!0}showSubmitCancelButton(t){this._showSubmitCancelButton=!t.detail}onCreateFeatureSubmitButtonClick(){this._createFeature&&this._createFeature.submit()}backFromCreateFeaturePanel(){this._createFeature&&this.updateNonVisibleLayersOnMap(!1),this.backFromSelectedPanel()}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature&&this._createRelatedFeature.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(t){console.error(t.detail),this._featureCreationFailedErrorMsg=t.detail.message}async onReportSubmitted(){this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=.25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(t){console.error(t.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromSelectedPanel(),this._showLoadingIndicator=!0,await this._featureDetails.refresh(this._currentFeature),setTimeout((()=>{this._showLoadingIndicator=!1}),300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList&&await this._layerList.refresh(),1===this._editableLayerIds.length?(await this._featureList.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(t){t.detail.layerId&&t.detail.layerName&&await this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._selectedLayerId!==this._prevSelectedLayerId&&this._filterActive&&await this.resetFilter(),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(t){this._nonVisibleValidLayers.find((t=>t.id===this._selectedLayerId))&&this._selectedLayer.set("visible",t)}async layerListLoaded(t){const i=t.detail,s=await n(this.mapView),e=[];this._validLayers=[],this._nonVisibleValidLayers=[],s.forEach((t=>{i.includes(t.id)&&(this._validLayers.push(t),t.visible||this._nonVisibleValidLayers.push(t),this._getLayersConfig(t.id)?.reporting&&this._layerItemsHash[t.id]&&this._layerItemsHash[t.id].supportsAdd&&e.push(t.id))})),this.handleMapClick(),this._hasValidLayers=e.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}async displayFeaturesList(t){this._updatedSorting={field:"",order:"desc"},this._updatedSortOption="sortNewest",await this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._flowItems=[...this._flowItems,"feature-list"],this._selectedLayerId!==this._prevSelectedLayerId&&this._filterActive&&await this.resetFilter(),this._prevSelectedLayerId=this._selectedLayerId}async resetFilter(){(await c(this.mapView,this._prevSelectedLayerId)).definitionExpression=this._filterInitState.initDefExpressions[this._prevSelectedLayerId],this._handleFilterListReset()}async backFromFilterPanel(){this._filterInitState=await this._filterList.getFilterInitState(),await this._featureList.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=.25;const t=[...this._flowItems];"comment-details"!==t[t.length-1]&&"add-comment"!==t[t.length-1]&&this.clearHighlights(),"reporting-layer-list"!==t[t.length-1]&&("feature-create"!==t[t.length-1]||"feature-list"!==t[0]&&"feature-list"!==t[t.length-2])||this.updatePanelState(this._sidePanelCollapsed,!1),t.pop(),1!==t.length||"layer-list"!==t[0]?this._flowItems=[...t]:this.navigateToHomePage()}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(t,i){this._sidePanelCollapsed=t,this._showFullPanel=i,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(t){this._showLoadingIndicator=!0,await this.setSelectedFeatures([t.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){const t=this._currentFeature.layer,i=await r(this.mapView);t.relationships.some((s=>{const e=i.filter((i=>t.url===i.url&&i.layerId===s.relatedTableId));if(e&&e.length>0)return this._relatedTable=e[0],!0}))}async updatingFeatureDetails(t){this._showLoadingIndicator=t}async selectionChanged(t){this.updatingFeatureDetails(!0),await this.setCurrentFeature(t.detail.selectedFeature[0]),this.highlightOnMap(t.detail.selectedFeature[0]),this._selectedFeatureIndex=t.detail.selectedFeatureIndex,await this._featureDetails.refresh(t.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(t){this._selectedRelatedFeature=[t.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(t,i){const s=this.layerExpressions?.filter((t=>t.id===this._selectedLayerId)),a=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash[this._selectedLayerId].supportsAdd,h=s?.length>0;return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:i,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this._toggleSort(),e("calcite-action",{icon:"sort-ascending-arrow",id:"sort-popover",slot:"header-actions-end",text:this._translations.sort,title:this._translations.sort}),h&&e("calcite-action",{icon:"filter",indicator:this._filterActive,onClick:()=>{this._flowItems=[...this._flowItems,"filter-panel"]},slot:"header-actions-end",text:this._translations.filter,title:this._translations.filter}),this.isMobile&&this.getActionToExpandCollapsePanel(),this.enableNewReports&&a&&e("calcite-button",{appearance:"solid",onClick:this.navigateToCreateFeature.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),e("calcite-panel",{"full-height":!0},e("feature-list",{applyLayerViewFilter:this.showMyReportsOnly,class:"height-full",highlightOnHover:!0,locale:this.locale,mapView:this.mapView,noFeaturesFoundMsg:this._translations.featureErrorMsg,onFeatureSelect:this.onFeatureSelectFromList.bind(this),pageSize:30,ref:t=>this._featureList=t,reportingOptions:this.reportingOptions,selectedLayerId:t,showFeatureSymbol:this.showFeatureSymbol,sortingInfo:this._updatedSorting})))}getFilterPanel(){const t=this.layerExpressions?this.layerExpressions.filter((t=>t.id===this._selectedLayerId)):[];return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._translations?.filterLayerTitle?.replace("{{title}}",this._selectedLayerName),loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromFilterPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),e("div",{class:"width-full",slot:"footer"},e("div",{class:"width-full",slot:"footer"},e("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",disabled:!this._filterActive,onClick:()=>{this._filterList?.forceReset()},width:"full"},this._translations.resetFilter),e("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromFilterPanel.bind(this),width:"full"},this._translations.close))),e("calcite-panel",{"full-height":!0},e("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtnOnClick:()=>{},comboboxOverlayPositioning:"fixed",layerExpressions:t,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:t=>this._filterList=t,resetBtn:!1,resetFiltersOnDisconnect:!1,view:this.mapView,zoomBtn:!1})))}getFeatureDetailsFlowItem(){const t=this._getLayersConfig(this._selectedLayerId)?.comment&&this._selectedLayer.relationships.length>0&&this._relatedTable;return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),e("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"share-node",embed:!1,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,removePopoverOffset:!0,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",slot:"header-actions-end",socialMedia:!0,view:this.mapView}),this._selectedFeature.length>1&&this.getFeaturesPagination(),e("calcite-panel",null,e("feature-details",{class:"full-height",graphics:this._selectedFeature,layerItemsHash:this._layerItemsHash,locale:this.locale,mapView:this.mapView,onAddComment:this.showAddCommentsPanel.bind(this),onCommentSelect:this.onCommentSelectFromList.bind(this),onFeatureSelectionChange:this.selectionChanged.bind(this),onLikeOrDislikeClicked:()=>{this._featureList.refresh(!0)},onLoadingStatus:t=>{this.updatingFeatureDetails(t.detail)},ref:t=>this._featureDetails=t,reportingOptions:this.reportingOptions,showUserImageInCommentsList:this.showUserImageInCommentsList}),t&&e("calcite-button",{appearance:"solid",onClick:this.showAddCommentsPanel.bind(this),slot:"footer",width:"full"},this.commentButtonText||this._translations.comment)))}getFeaturesPagination(){return e("div",{class:"feature-pagination"},e("div",null,e("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-left",id:"solutions-back",onClick:()=>{this._featureDetails.back()},scale:"s",width:"full"}),e("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},e("span",null,this._translations.back))),e("calcite-button",{appearance:"transparent",onClick:()=>{this._featureDetails.toggleListView()},scale:"s"},e("span",{class:"pagination-count"},this._getCount())),e("div",null,e("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-right",id:"solutions-next",onClick:()=>{this._featureDetails.next()},scale:"s",width:"full"}),e("calcite-tooltip",{placement:"top","reference-element":"solutions-next"},e("span",null,this._translations.next))))}getCommentDetailsFlowItem(){return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),e("calcite-panel",{"full-height":!0},e("info-card",{allowEditing:!1,graphics:this._selectedRelatedFeature,highlightEnabled:!1,isLoading:!1,isMobile:!1,locale:this.locale,mapView:this.mapView,paginationEnabled:!1})))}getAddCommentFlowItem(){return e("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromCreateRelatedFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),e("div",{class:"width-full",slot:"footer"},this._showSubmitCancelButton&&e("div",{class:"width-full",slot:"footer"},e("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateRelatedFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),e("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateRelatedFeaturePanel.bind(this),width:"full"},this._translations.cancel))),e("calcite-panel",null,e("create-related-feature",{customizeSubmit:!0,locale:this.locale,mapView:this.mapView,onFail:this.addCommentFailed.bind(this),onFormReady:this.onFormReady.bind(this),onIsActionPending:this.showSubmitCancelButton.bind(this),onSuccess:this.onCommentSubmitted.bind(this),ref:t=>this._createRelatedFeature=t,selectedFeature:this._currentFeature,table:this._relatedTable})))}async setSelectedFeatures(t){this._selectedFeature=t,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:null)}async setCurrentFeature(t){if(this._currentFeature=t,t&&t.layer){const i=t.layer;this.setSelectedLayer(i.id,i.title),this._currentFeatureId=t.attributes[i.objectIdField],this._getLayersConfig(i.id)?.comment&&i.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&this.setSelectedLayer("",""),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(t){if(this.clearHighlights(),t&&t.geometry&&t.layer){const i=await d(this.mapView,t.layer.id);i.highlightOptions=null,this._highlightHandle=await u([t.getObjectId()],i,this.mapView,!0,this.zoomToScale)}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return e("calcite-action",{icon:this._sidePanelCollapsed?"chevrons-up":"chevrons-down",onClick:this.toggleSidePanel.bind(this),slot:"header-actions-end",text:this._sidePanelCollapsed?this._translations.expand:this._translations.collapse})}async setMapView(){await this.getLayersToShowInList(),await this._updateFeatures(),1===this._editableLayerIds?.length?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0)}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",this.onMapClick.bind(this))}async onMapClick(t){this.mapView.popupEnabled=!1;const i=await this.mapView.hitTest(t);if(i.results.length>0){const t=[];i.results.forEach((function(i){"graphic"===i.type&&t.push(i.graphic)}));const s=t.filter((t=>this._validLayers.includes(t.layer))),e=t.filter((t=>!this._validLayers.includes(t.layer)&&t?.layer?.popupEnabled&&t?.layer?.id));if(s.length>0&&(await this.setSelectedFeatures(s),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(t[0])):this._flowItems=[...this._flowItems,"feature-details"]),e.length>0){this.mapView.popupEnabled=!0;const t={features:e,updateLocationEnabled:!0};await this.mapView.openPopup(t)}}}_getCount(){const t=(this._selectedFeatureIndex+1).toString(),i=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",t).replace("{{total}}",i)}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}_updateFloorDefinitionExpression(t){const i=`${t.floorInfo.floorField} = '${this.floorLevel}'`,s=t.definitionExpression;t.definitionExpression=s?.indexOf(this._floorExpression)>-1?s.replace(this._floorExpression,i):i,this._floorExpression=i}_getFormElements(){const t=this._selectedLayer,i=t?.floorInfo?.floorField;if(i&&this.floorLevel&&t?.formTemplate){const i=this._formElements.find((i=>i.id===t.id));0!==this._formElements.length&&i||this._formElements.push({id:t.id,orgElements:t.formTemplate.elements,orgExpressionInfos:t.formTemplate.expressionInfos})}}reduceToConfiguredLayers(t,i){return Object.keys(t).reduce(((s,e)=>{const a=this.reportingOptions?this._getLayersConfig(e)?.visible:t[e].supportsAdd;return!i.includes(e)&&a&&s.push(e),s}),[])}async _updateFeatures(){for(const t of this._editableLayerIds){const i=await d(this.mapView,t);await this._showMyFeaturesOnly(i);const s=i.layer?.floorInfo?.floorField;s&&this.floorLevel&&this._updateFloorDefinitionExpression(i.layer)}}async _showMyFeaturesOnly(t){const i=this.mapView.map.portalItem.portal?.credential?.userId;if(i){const s=t.layer.editFieldsInfo?.creatorField.toLowerCase();t.filter=this.showMyReportsOnly&&s?new this.FeatureFilter({where:s+"='"+i+"'"}):null}}async getLayersToShowInList(){const t=await p(this.mapView,!0),i=await n(this.mapView),s=[];i.forEach((i=>{"feature"===i?.type&&i?.editingEnabled&&i?.capabilities?.operations?.supportsAdd&&(t[i.id].supportsAdd=!0),i?.editingEnabled||s.push(i.id)})),this._editableLayerIds=this.reduceToConfiguredLayers(t,s),this._layerItemsHash=t}async renderFeaturesList(){this._flowItems=["feature-list"];const t={detail:this._editableLayerIds};await this.layerListLoaded(t),this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0].title)}_updateShareURL(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this._selectedLayerId?i.searchParams.set("layerid",this._selectedLayerId):i.searchParams.delete("layerid"),this._selectedFeature?.length?i.searchParams.set("oid",this._currentFeatureId):i.searchParams.delete("oid"),this._shareNode.shareUrl=i.href}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){const t=await c(this.mapView,this.layerId);if(t){const i=await f([Number(this.objectId)],t,[],!0,this.mapView.spatialReference);i.length&&(await this.setSelectedFeatures(i),this._flowItems=this._flowItems.length&&"feature-details"!==this._flowItems[this._flowItems.length-1]?[...this._flowItems,"feature-details"]:[...this._flowItems])}}}static get watchers(){return{isMobile:["isMobileWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],floorLevel:["floorLevelWatchHandler"],showMyReportsOnly:["showMyReportsOnlyWatchHandler"]}}};m.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100% !important}.width-0{width:0}.height-full{height:100% !important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}";export{m as crowdsource_reporter}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{g as t,r as e,h as i,H as n}from"./p-4e6eb06e.js";import{g as r,a as s,b as o}from"./p-e9d3365f.js";import{s as a}from"./p-c350eacb.js";import"./p-d0d020a5.js";import"./p-7530a02f.js";import{g as h}from"./p-f4aadb3b.js";import{r as c,N as u,c as l,e as f,A as d}from"./p-9bb44f57.js";import"./p-80cb7c73.js";import"./p-dc9d4be3.js";import"./p-d4056c1c.js";import"./p-0a24ad5f.js";
6
+ import{g as t,r as e,h as i,H as n}from"./p-4e6eb06e.js";import{g as s,a as r,b as o}from"./p-e9d3365f.js";import{s as a}from"./p-c350eacb.js";import"./p-d0d020a5.js";import"./p-7530a02f.js";import{g as h}from"./p-f4aadb3b.js";import{r as c,N as u,c as l,e as d,A as f}from"./p-9bb44f57.js";import"./p-80cb7c73.js";import"./p-dc9d4be3.js";import"./p-d4056c1c.js";import"./p-0a24ad5f.js";
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
9
9
 
@@ -17,4 +17,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
17
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */var p=function(){return p=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},p.apply(this,arguments)};function w(t,e){var i=e;return i.rawResponse=!1,c(t,i).then((function(t){var e={token:t.access_token,username:t.username,expires:new Date(Date.now()+(1e3*t.expires_in-1e3)),ssl:!0===t.ssl};return t.refresh_token&&(e.refreshToken=t.refresh_token),e}))}function m(t,e){var i=e;return i.params.referer="undefined"!=typeof window&&window.location&&window.location.host?window.location.host:u,c(t,i)}var g=/^https?:\/\/(\S+)\.arcgis\.com.+/;function v(t){return g.test(t)}function b(t){if(!g.test(t))return null;var e=t.match(g)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}var k=function(){function t(t){if(this.clientId=t.clientId,this._refreshToken=t.refreshToken,this._refreshTokenExpires=t.refreshTokenExpires,this.username=t.username,this.password=t.password,this._token=t.token,this._tokenExpires=t.tokenExpires,this.portal=t.portal?l(t.portal):"https://www.arcgis.com/sharing/rest",this.ssl=t.ssl,this.provider=t.provider||"arcgis",this.tokenDuration=t.tokenDuration||20160,this.redirectUri=t.redirectUri,this.refreshTokenTTL=t.refreshTokenTTL||20160,this.server=t.server,this.federatedServers={},this.trustedDomains=[],t.server){var e=this.getServerRootUrl(t.server);this.federatedServers[e]={token:t.token,expires:t.tokenExpires}}this._pendingTokenRequests={}}return Object.defineProperty(t.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),t.beginOAuth2=function(e,i){void 0===i&&(i=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var n,r=p({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),s=r.portal,o=r.provider,a=r.clientId,h=r.expiration,c=r.redirectUri,u=r.popup,l=r.popupWindowFeatures,w=r.state,m=r.locale,g=r.params;if(n="arcgis"===o?s+"/oauth2/authorize?client_id="+a+"&response_type=token&expiration="+(e.duration||h)+"&redirect_uri="+encodeURIComponent(c)+"&state="+w+"&locale="+m:s+"/oauth2/social/authorize?client_id="+a+"&socialLoginProviderName="+o+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||h)+"&redirect_uri="+encodeURIComponent(c)+"&state="+w+"&locale="+m,g&&(n=n+"&"+f(g)),u){var v,b=((v={promise:null,resolve:null,reject:null}).promise=new Promise((function(t,e){v.resolve=t,v.reject=e})),v);return i["__ESRI_REST_AUTH_HANDLER_"+a]=function(e,i){if(e){var n=JSON.parse(e);b.reject(new d(n.errorMessage,n.error))}else if(i){var r=JSON.parse(i);b.resolve(new t({clientId:a,portal:s,ssl:r.ssl,token:r.token,tokenExpires:new Date(r.expires),username:r.username}))}},i.open(n,"oauth-window",l),b.promise}i.location.href=n},t.completeOAuth2=function(e,i){void 0===i&&(i=window);var n=p({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),r=n.portal,s=n.clientId,o=n.popup;function a(e,n){try{var a=void 0,h="__ESRI_REST_AUTH_HANDLER_"+s;if(o&&(i.opener?i.opener.parent&&i.opener.parent[h]?a=i.opener.parent[h]:i.opener&&i.opener[h]&&(a=i.opener[h]):i!==i.parent&&i.parent&&i.parent[h]&&(a=i.parent[h]),a))return a(e?JSON.stringify(e):void 0,JSON.stringify(n)),void i.close()}catch(t){throw new d('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new d(e.errorMessage,e.error);return new t({clientId:s,portal:r,ssl:n.ssl,token:n.token,tokenExpires:n.expires,username:n.username})}var h=i.location.hash.replace(/^#/,"").split("&").reduce((function(t,e){var i=function(t){var e=t.split("="),i=e[1];return{key:decodeURIComponent(e[0]),value:decodeURIComponent(i)}}(e);return t[i.key]=i.value,t}),{});if(!h.access_token){var c=void 0,u="Unknown error";return h.error&&(c=h.error,u=h.error_description),a({error:c,errorMessage:u})}return a(void 0,{token:h.access_token,expires:new Date(Date.now()+1e3*parseInt(h.expires_in,10)-6e4),ssl:"true"===h.ssl,username:h.username})},t.fromParent=function(e,i){var n;return!i&&window&&(i=window),new Promise((function(r,s){i.addEventListener("message",n=function(e){if(e.source===i.parent&&e.data)try{return r(t.parentMessageHandler(e))}catch(t){return s(t)}},!1),i.parent.postMessage({type:"arcgis:auth:requestCredential"},e)})).then((function(t){return i.removeEventListener("message",n,!1),t}))},t.authorize=function(t,e){t.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var i=p({portal:"https://arcgis.com/sharing/rest",expiration:20160},t);e.writeHead(301,{Location:i.portal+"/oauth2/authorize?client_id="+i.clientId+"&expiration="+(t.duration||i.expiration)+"&response_type=code&redirect_uri="+encodeURIComponent(i.redirectUri)}),e.end()},t.exchangeAuthorizationCode=function(e,i){var n=p({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=n.portal,s=n.clientId,o=n.redirectUri,a=n.refreshTokenTTL;return w(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:s,redirect_uri:o,code:i}}).then((function(e){return new t({clientId:s,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:a,refreshTokenExpires:new Date(Date.now()+60*(a-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})}))},t.deserialize=function(e){var i=JSON.parse(e);return new t({clientId:i.clientId,refreshToken:i.refreshToken,refreshTokenExpires:new Date(i.refreshTokenExpires),username:i.username,password:i.password,token:i.token,tokenExpires:new Date(i.tokenExpires),portal:i.portal,ssl:i.ssl,tokenDuration:i.tokenDuration,redirectUri:i.redirectUri,refreshTokenTTL:i.refreshTokenTTL})},t.fromCredential=function(e){var i=void 0===e.ssl||e.ssl,n=e.expires||Date.now()+72e5;return new t({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:i,token:e.token,username:e.userId,tokenExpires:new Date(n)})},t.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return t.fromCredential(e.data.credential);if("arcgis:auth:error"===e.data.type){var i=new Error(e.data.error.message);throw i.name=e.data.error.name,i}throw new Error("Unknown message type.")},t.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},t.prototype.getUser=function(t){var e=this;if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);var i=this.portal+"/community/self",n=p(p({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingUserRequest=c(i,n).then((function(t){return e._user=t,e._pendingUserRequest=null,t})),this._pendingUserRequest},t.prototype.getPortal=function(t){var e=this;if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);var i=this.portal+"/portals/self",n=p(p({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingPortalRequest=c(i,n).then((function(t){return e._portalInfo=t,e._pendingPortalRequest=null,t})),this._pendingPortalRequest},t.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then((function(t){return t.username}))},t.prototype.getToken=function(t,e){return n=t,r=v(i=this.portal),s=v(n),o=b(i),a=b(n),r&&s&&o===a||new RegExp(this.portal,"i").test(t)?this.getFreshToken(e):this.getTokenForServer(t,e);var i,n,r,s,o,a},t.prototype.validateAppAccess=function(t){return this.getToken(this.portal).then((function(e){return function(t,e,i){return void 0===i&&(i="https://www.arcgis.com/sharing/rest"),c(i+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:e,token:t}})}(e,t)}))},t.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},t.prototype.serialize=function(){return JSON.stringify(this)},t.prototype.enablePostMessageAuth=function(t,e){!e&&window&&(e=window),this._hostHandler=this.createPostMessageHandler(t),e.addEventListener("message",this._hostHandler,!1)},t.prototype.disablePostMessageAuth=function(t){!t&&window&&(t=window),t.removeEventListener("message",this._hostHandler,!1)},t.prototype.refreshSession=function(t){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(t):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new d("Unable to refresh token."))},t.prototype.getServerRootUrl=function(t){var e=l(t).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/),i=e[1],n=e[2].split("/"),r=n[0],s=n.slice(1);return""+i+r.toLowerCase()+"/"+s.join("/")},t.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some((function(e){return t.startsWith(e)}))?"include":"same-origin"},t.prototype.createPostMessageHandler=function(t){var e=this;return function(i){var n=t.indexOf(i.origin)>-1,r="arcgis:auth:requestCredential"===i.data.type,s=e.tokenExpires.getTime()>Date.now();if(n&&r){var o={};if(s){var a=e.toCredential();a.server=a.server.replace("/sharing/rest",""),o={type:"arcgis:auth:credential",credential:a}}else o={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}};i.source.postMessage(o,i.origin)}}},t.prototype.getTokenForServer=function(t,e){var i=this,n=this.getServerRootUrl(t),r=this.federatedServers[n];return r&&r.expires&&r.expires.getTime()>Date.now()?Promise.resolve(r.token):(this._pendingTokenRequests[n]||(this._pendingTokenRequests[n]=this.fetchAuthorizedDomains().then((function(){return c(n+"/rest/info",{credentials:i.getDomainCredentials(t)}).then((function(r){if(r.owningSystemUrl){if(s=r.owningSystemUrl,o=l(function(t){if(!g.test(t))return t;switch(b(t)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(i.portal)).replace(/https?:\/\//,""),a=l(s).replace(/https?:\/\//,""),new RegExp(a,"i").test(o))return c(r.owningSystemUrl+"/sharing/rest/info",e);throw new d(t+" is not federated with "+i.portal+".","NOT_FEDERATED")}var s,o,a;if(r.authInfo&&void 0!==i.federatedServers[n])return Promise.resolve({authInfo:r.authInfo});throw new d(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")})).then((function(t){return t.authInfo.tokenServicesUrl})).then((function(e){return i.token&&i.tokenExpires.getTime()>Date.now()?m(e,{params:{token:i.token,serverUrl:t,expiration:i.tokenDuration,client:"referer"}}):m(e,{params:{username:i.username,password:i.password,expiration:i.tokenDuration,client:"referer"}}).then((function(t){return i._token=t.token,i._tokenExpires=new Date(t.expires),t}))})).then((function(t){return i.federatedServers[n]={expires:new Date(t.expires),token:t.token},delete i._pendingTokenRequests[n],t.token}))}))),this._pendingTokenRequests[n])},t.prototype.getFreshToken=function(t){var e=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(t).then((function(t){return e._pendingTokenRequests[e.portal]=null,t.token}))),this._pendingTokenRequests[this.portal])},t.prototype.refreshWithUsernameAndPassword=function(t){var e=this,i=p({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},t);return m(this.portal+"/generateToken",i).then((function(t){return e._token=t.token,e._tokenExpires=new Date(t.expires),e}))},t.prototype.refreshWithRefreshToken=function(t){var e=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(t);var i=p({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},t);return w(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e}))},t.prototype.refreshRefreshToken=function(t){var e=this,i=p({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},t);return w(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e._refreshToken=t.refreshToken,e._refreshTokenExpires=new Date(Date.now()+60*(e.refreshTokenTTL-1)*1e3),e}))},t.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then((function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter((function(t){return!t.startsWith("http://")})).map((function(t){return t.startsWith("https://")?t:"https://"+t}))),t}))},t}();const y=class{get el(){return t(this)}async serializedAuthenticationWatchHandler(){this.authentication=this.serializedAuthentication?k.deserialize(this.serializedAuthentication):new k({})}async valueWatchHandler(){await this._loadSolution(this.solutionItemId)}constructor(t){e(this,t),this.authentication=new k({}),this.serializedAuthentication="",this.solutionItemId="",this.showLoading=!1,this._currentEditItemId="",this._organizationVariables="",this._solutionContentsComponent=void 0,this._solutionIsLoaded=!1,this._solutionVariables="",this._templateHierarchy=[],this._translations=void 0,this._treeOpen=!0,this.serializedAuthentication&&(this.authentication=k.deserialize(this.serializedAuthentication)),this._loadSolution(this.solutionItemId),window.addEventListener("solutionStoreHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges=t.detail,this._solutionEditorHasChanges,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges=t.detail,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasErrors",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges,this._solutionEditorHasErrors=t.detail)}))}async componentWillLoad(){return this._getTranslations()}render(){const t=a.getStoreInfo("spatialReferenceInfo"),e=a.getStoreInfo("featureServices").length>0,o=a.getStoreInfo("solutionData");return this._solutionVariables=JSON.stringify(r(o.templates,this._translations)),this._organizationVariables=JSON.stringify(s(this._translations)),i(n,{key:"08cdec33157c18874228bb7bcda82fd901945d02"},this._solutionIsLoaded?null:i("calcite-loader",{label:""}),i("div",{key:"d0879082066b862e136e13986c4794d33f454b72",class:"configuration-container"},i("div",{key:"499fb11ca6715151d6099aa24cfc0a7514c0fa84",class:"configuration"},i("calcite-tabs",{key:"3376e20f7d1145f6c0afb4e888f55c93e971c2b2",class:"config-tabs"},i("calcite-tab-nav",{key:"f35ab50ff86a62b7ba6c96c23a2541622555bdf5",slot:"tab-nav"},i("calcite-tab-title",{key:"1ee9c1381b78a8f644c1b830a86c9b5a531f6f72"},this._translations.definitionTab),e?i("calcite-tab-title",null,this._translations.spatialReferenceTab):null),i("calcite-tab",{key:"0a7df1b0a81334da90d2d04a7f7867d529aaa55d",class:"config-tab",selected:!0},i("div",{key:"024773d4bd5fcf8c83af8a7a07b0193231bb2e24",class:"config-solution"},i("div",{key:"37cea9d9565b489357aaf1c11c6fb5f7d2746cfd",class:this._treeOpen?"config-inventory":"config-inventory-hide"},i("solution-contents",{id:"configInventory",key:`${this.solutionItemId}-contents`,ref:t=>this._solutionContentsComponent=t})),i("calcite-button",{key:"140bcd46e2c4ca519311ae4d9ea62a5f9ac36c29",appearance:"transparent",class:"collapse-btn","icon-start":this._treeOpen?"chevrons-left":"chevrons-right",id:"collapse-vars",onClick:()=>this._toggleTree(),scale:"s",title:this._treeOpen?this._translations.collapse:this._translations.expand}),i("div",{key:"c727ebda3f2efe5dd85a5e3b3b1625b1ff56769e",class:"config-item"},i("solution-item",{authentication:this.authentication,"item-id":this._currentEditItemId,key:`${this.solutionItemId}-item`,"organization-variables":this._organizationVariables,"solution-item-id":this.solutionItemId,"solution-variables":this._solutionVariables})))),e?i("calcite-tab",{class:"config-tab"},i("div",{class:"config-solution"},i("solution-spatial-ref",{enableDefault:!!t.default,enabled:t?.enabled,featureServices:a.getStoreInfo("featureServices").map((t=>t.name)),id:"configure-solution-spatial-ref",key:`${this.solutionItemId}-spatial-ref`}))):null))))}_solutionStoreHasChanges=!1;_solutionEditorHasChanges=!1;_solutionEditorHasErrors=!1;_canSave=!1;_solutionItemSelected(t){this._currentEditItemId=t.detail}async getSpatialReferenceInfo(){return Promise.resolve(a.getStoreInfo("spatialReferenceInfo"))}async saveSolution(){this._solutionIsLoaded=!1,await a.saveSolution(),this._solutionIsLoaded=!0,this.solutionItemId=null}async unloadSolution(){this.solutionItemId=null}_initProps(){const t=a.getStoreInfo("solutionData");let e;this._templateHierarchy=[...o(t.templates)],this._solutionContentsComponent&&(this._solutionContentsComponent.templateHierarchy=this._templateHierarchy),this._templateHierarchy.length>0&&(e=a.getItemInfo(this._templateHierarchy[0].id)),this._currentEditItemId=e?e.itemId:""}async _loadSolution(t){return t?(this._solutionIsLoaded=!1,await a.loadSolution(t,this.authentication),this._initProps(),this._solutionIsLoaded=!0):this._reset(),Promise.resolve()}_reset(){this._currentEditItemId="",this._organizationVariables="",this._solutionVariables="",this._templateHierarchy=[]}_toggleTree(){this._treeOpen=!this._treeOpen}_updateSaveability(t,e,i){const n=(t||e)&&!i;this._canSave!==n&&window.dispatchEvent(new CustomEvent("solutionCanSave",{detail:n,bubbles:!0,cancelable:!1,composed:!0})),this._canSave=n}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{serializedAuthentication:["serializedAuthenticationWatchHandler"],solutionItemId:["valueWatchHandler"]}}};y.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%}.config-solution{position:absolute;top:3.5rem;right:-1px;bottom:-1px;left:-1px;display:flex;padding:0.5rem}.config-inventory{display:inline;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-inventory-hide{display:none;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-item{position:relative;display:inline;flex-grow:1;overflow-y:auto;margin-inline-start:0.5rem}solution-contents{position:relative;height:100%}solution-item{position:relative;height:100%}solution-spatial-ref{position:relative;height:100%;width:100%;overflow-y:auto}";export{y as solution_configuration}
20
+ ***************************************************************************** */var p=function(){return p=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},p.apply(this,arguments)};function w(t,e){var i=e;return i.rawResponse=!1,c(t,i).then((function(t){var e={token:t.access_token,username:t.username,expires:new Date(Date.now()+(1e3*t.expires_in-1e3)),ssl:!0===t.ssl};return t.refresh_token&&(e.refreshToken=t.refresh_token),e}))}function m(t,e){var i=e;return i.params.referer="undefined"!=typeof window&&window.location&&window.location.host?window.location.host:u,c(t,i)}var g=/^https?:\/\/(\S+)\.arcgis\.com.+/;function v(t){return g.test(t)}function b(t){if(!g.test(t))return null;var e=t.match(g)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}var k=function(){function t(t){if(this.clientId=t.clientId,this._refreshToken=t.refreshToken,this._refreshTokenExpires=t.refreshTokenExpires,this.username=t.username,this.password=t.password,this._token=t.token,this._tokenExpires=t.tokenExpires,this.portal=t.portal?l(t.portal):"https://www.arcgis.com/sharing/rest",this.ssl=t.ssl,this.provider=t.provider||"arcgis",this.tokenDuration=t.tokenDuration||20160,this.redirectUri=t.redirectUri,this.refreshTokenTTL=t.refreshTokenTTL||20160,this.server=t.server,this.federatedServers={},this.trustedDomains=[],t.server){var e=this.getServerRootUrl(t.server);this.federatedServers[e]={token:t.token,expires:t.tokenExpires}}this._pendingTokenRequests={}}return Object.defineProperty(t.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),t.beginOAuth2=function(e,i){void 0===i&&(i=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var n,s=p({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),r=s.portal,o=s.provider,a=s.clientId,h=s.expiration,c=s.redirectUri,u=s.popup,l=s.popupWindowFeatures,w=s.state,m=s.locale,g=s.params;if(n="arcgis"===o?r+"/oauth2/authorize?client_id="+a+"&response_type=token&expiration="+(e.duration||h)+"&redirect_uri="+encodeURIComponent(c)+"&state="+w+"&locale="+m:r+"/oauth2/social/authorize?client_id="+a+"&socialLoginProviderName="+o+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||h)+"&redirect_uri="+encodeURIComponent(c)+"&state="+w+"&locale="+m,g&&(n=n+"&"+d(g)),u){var v,b=((v={promise:null,resolve:null,reject:null}).promise=new Promise((function(t,e){v.resolve=t,v.reject=e})),v);return i["__ESRI_REST_AUTH_HANDLER_"+a]=function(e,i){if(e){var n=JSON.parse(e);b.reject(new f(n.errorMessage,n.error))}else if(i){var s=JSON.parse(i);b.resolve(new t({clientId:a,portal:r,ssl:s.ssl,token:s.token,tokenExpires:new Date(s.expires),username:s.username}))}},i.open(n,"oauth-window",l),b.promise}i.location.href=n},t.completeOAuth2=function(e,i){void 0===i&&(i=window);var n=p({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),s=n.portal,r=n.clientId,o=n.popup;function a(e,n){try{var a=void 0,h="__ESRI_REST_AUTH_HANDLER_"+r;if(o&&(i.opener?i.opener.parent&&i.opener.parent[h]?a=i.opener.parent[h]:i.opener&&i.opener[h]&&(a=i.opener[h]):i!==i.parent&&i.parent&&i.parent[h]&&(a=i.parent[h]),a))return a(e?JSON.stringify(e):void 0,JSON.stringify(n)),void i.close()}catch(t){throw new f('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new f(e.errorMessage,e.error);return new t({clientId:r,portal:s,ssl:n.ssl,token:n.token,tokenExpires:n.expires,username:n.username})}var h=i.location.hash.replace(/^#/,"").split("&").reduce((function(t,e){var i=function(t){var e=t.split("="),i=e[1];return{key:decodeURIComponent(e[0]),value:decodeURIComponent(i)}}(e);return t[i.key]=i.value,t}),{});if(!h.access_token){var c=void 0,u="Unknown error";return h.error&&(c=h.error,u=h.error_description),a({error:c,errorMessage:u})}return a(void 0,{token:h.access_token,expires:new Date(Date.now()+1e3*parseInt(h.expires_in,10)-6e4),ssl:"true"===h.ssl,username:h.username})},t.fromParent=function(e,i){var n;return!i&&window&&(i=window),new Promise((function(s,r){i.addEventListener("message",n=function(e){if(e.source===i.parent&&e.data)try{return s(t.parentMessageHandler(e))}catch(t){return r(t)}},!1),i.parent.postMessage({type:"arcgis:auth:requestCredential"},e)})).then((function(t){return i.removeEventListener("message",n,!1),t}))},t.authorize=function(t,e){t.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var i=p({portal:"https://arcgis.com/sharing/rest",expiration:20160},t);e.writeHead(301,{Location:i.portal+"/oauth2/authorize?client_id="+i.clientId+"&expiration="+(t.duration||i.expiration)+"&response_type=code&redirect_uri="+encodeURIComponent(i.redirectUri)}),e.end()},t.exchangeAuthorizationCode=function(e,i){var n=p({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),s=n.portal,r=n.clientId,o=n.redirectUri,a=n.refreshTokenTTL;return w(s+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:r,redirect_uri:o,code:i}}).then((function(e){return new t({clientId:r,portal:s,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:a,refreshTokenExpires:new Date(Date.now()+60*(a-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})}))},t.deserialize=function(e){var i=JSON.parse(e);return new t({clientId:i.clientId,refreshToken:i.refreshToken,refreshTokenExpires:new Date(i.refreshTokenExpires),username:i.username,password:i.password,token:i.token,tokenExpires:new Date(i.tokenExpires),portal:i.portal,ssl:i.ssl,tokenDuration:i.tokenDuration,redirectUri:i.redirectUri,refreshTokenTTL:i.refreshTokenTTL})},t.fromCredential=function(e){var i=void 0===e.ssl||e.ssl,n=e.expires||Date.now()+72e5;return new t({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:i,token:e.token,username:e.userId,tokenExpires:new Date(n)})},t.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return t.fromCredential(e.data.credential);if("arcgis:auth:error"===e.data.type){var i=new Error(e.data.error.message);throw i.name=e.data.error.name,i}throw new Error("Unknown message type.")},t.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},t.prototype.getUser=function(t){var e=this;if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);var i=this.portal+"/community/self",n=p(p({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingUserRequest=c(i,n).then((function(t){return e._user=t,e._pendingUserRequest=null,t})),this._pendingUserRequest},t.prototype.getPortal=function(t){var e=this;if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);var i=this.portal+"/portals/self",n=p(p({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingPortalRequest=c(i,n).then((function(t){return e._portalInfo=t,e._pendingPortalRequest=null,t})),this._pendingPortalRequest},t.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then((function(t){return t.username}))},t.prototype.getToken=function(t,e){return n=t,s=v(i=this.portal),r=v(n),o=b(i),a=b(n),s&&r&&o===a||new RegExp(this.portal,"i").test(t)?this.getFreshToken(e):this.getTokenForServer(t,e);var i,n,s,r,o,a},t.prototype.validateAppAccess=function(t){return this.getToken(this.portal).then((function(e){return function(t,e,i){return void 0===i&&(i="https://www.arcgis.com/sharing/rest"),c(i+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:e,token:t}})}(e,t)}))},t.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},t.prototype.serialize=function(){return JSON.stringify(this)},t.prototype.enablePostMessageAuth=function(t,e){!e&&window&&(e=window),this._hostHandler=this.createPostMessageHandler(t),e.addEventListener("message",this._hostHandler,!1)},t.prototype.disablePostMessageAuth=function(t){!t&&window&&(t=window),t.removeEventListener("message",this._hostHandler,!1)},t.prototype.refreshSession=function(t){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(t):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new f("Unable to refresh token."))},t.prototype.getServerRootUrl=function(t){var e=l(t).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/),i=e[1],n=e[2].split("/"),s=n[0],r=n.slice(1);return""+i+s.toLowerCase()+"/"+r.join("/")},t.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some((function(e){return t.startsWith(e)}))?"include":"same-origin"},t.prototype.createPostMessageHandler=function(t){var e=this;return function(i){var n=t.indexOf(i.origin)>-1,s="arcgis:auth:requestCredential"===i.data.type,r=e.tokenExpires.getTime()>Date.now();if(n&&s){var o={};if(r){var a=e.toCredential();a.server=a.server.replace("/sharing/rest",""),o={type:"arcgis:auth:credential",credential:a}}else o={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}};i.source.postMessage(o,i.origin)}}},t.prototype.getTokenForServer=function(t,e){var i=this,n=this.getServerRootUrl(t),s=this.federatedServers[n];return s&&s.expires&&s.expires.getTime()>Date.now()?Promise.resolve(s.token):(this._pendingTokenRequests[n]||(this._pendingTokenRequests[n]=this.fetchAuthorizedDomains().then((function(){return c(n+"/rest/info",{credentials:i.getDomainCredentials(t)}).then((function(s){if(s.owningSystemUrl){if(r=s.owningSystemUrl,o=l(function(t){if(!g.test(t))return t;switch(b(t)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(i.portal)).replace(/https?:\/\//,""),a=l(r).replace(/https?:\/\//,""),new RegExp(a,"i").test(o))return c(s.owningSystemUrl+"/sharing/rest/info",e);throw new f(t+" is not federated with "+i.portal+".","NOT_FEDERATED")}var r,o,a;if(s.authInfo&&void 0!==i.federatedServers[n])return Promise.resolve({authInfo:s.authInfo});throw new f(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")})).then((function(t){return t.authInfo.tokenServicesUrl})).then((function(e){return i.token&&i.tokenExpires.getTime()>Date.now()?m(e,{params:{token:i.token,serverUrl:t,expiration:i.tokenDuration,client:"referer"}}):m(e,{params:{username:i.username,password:i.password,expiration:i.tokenDuration,client:"referer"}}).then((function(t){return i._token=t.token,i._tokenExpires=new Date(t.expires),t}))})).then((function(t){return i.federatedServers[n]={expires:new Date(t.expires),token:t.token},delete i._pendingTokenRequests[n],t.token}))}))),this._pendingTokenRequests[n])},t.prototype.getFreshToken=function(t){var e=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(t).then((function(t){return e._pendingTokenRequests[e.portal]=null,t.token}))),this._pendingTokenRequests[this.portal])},t.prototype.refreshWithUsernameAndPassword=function(t){var e=this,i=p({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},t);return m(this.portal+"/generateToken",i).then((function(t){return e._token=t.token,e._tokenExpires=new Date(t.expires),e}))},t.prototype.refreshWithRefreshToken=function(t){var e=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(t);var i=p({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},t);return w(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e}))},t.prototype.refreshRefreshToken=function(t){var e=this,i=p({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},t);return w(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e._refreshToken=t.refreshToken,e._refreshTokenExpires=new Date(Date.now()+60*(e.refreshTokenTTL-1)*1e3),e}))},t.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then((function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter((function(t){return!t.startsWith("http://")})).map((function(t){return t.startsWith("https://")?t:"https://"+t}))),t}))},t}();const y=class{get el(){return t(this)}async serializedAuthenticationWatchHandler(){this.authentication=this.serializedAuthentication?k.deserialize(this.serializedAuthentication):new k({})}async valueWatchHandler(){await this._loadSolution(this.solutionItemId)}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}constructor(t){e(this,t),this.authentication=new k({}),this.locale=void 0,this.serializedAuthentication="",this.solutionItemId="",this.showLoading=!1,this._currentEditItemId="",this._organizationVariables="",this._solutionContentsComponent=void 0,this._solutionIsLoaded=!1,this._solutionVariables="",this._templateHierarchy=[],this._translations=void 0,this._treeOpen=!0,this.serializedAuthentication&&(this.authentication=k.deserialize(this.serializedAuthentication)),this._loadSolution(this.solutionItemId),window.addEventListener("solutionStoreHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges=t.detail,this._solutionEditorHasChanges,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges=t.detail,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasErrors",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges,this._solutionEditorHasErrors=t.detail)}))}async componentWillLoad(){return this._getTranslations()}render(){const t=a.getStoreInfo("spatialReferenceInfo"),e=a.getStoreInfo("featureServices").length>0,o=a.getStoreInfo("solutionData");return this._solutionVariables=JSON.stringify(s(o.templates,this._translations)),this._organizationVariables=JSON.stringify(r(this._translations)),i(n,{key:"d80cc0f64b56dd3a8c09d6e024e069d24c12293d"},this._solutionIsLoaded?null:i("calcite-loader",{label:""}),i("div",{key:"f24cf4b573829ccd47e7d3a7751724d08e132415",class:"configuration-container"},i("div",{key:"d64771a9775435e9eb5ed9aeb52449c363486376",class:"configuration"},i("calcite-tabs",{key:"a8aab9934676aee18425a67fbd599887c4d87f36",class:"config-tabs"},i("calcite-tab-nav",{key:"69cbb95f6a50d9886ab97b8f3c05a00ea51b937a",slot:"tab-nav"},i("calcite-tab-title",{key:"911bb46f0bb14981347b1d30a30ef3451184f987"},this._translations.definitionTab),e?i("calcite-tab-title",null,this._translations.spatialReferenceTab):null),i("calcite-tab",{key:"db3f2b1102a7e47183904c2c17dededdfba7f863",class:"config-tab",selected:!0},i("div",{key:"7e7651392f73499e9454ccd2b5ed335d63d02db6",class:"config-solution"},i("div",{key:"36d895fadc1e6509a16537a4628d51dd9f7153eb",class:this._treeOpen?"config-inventory":"config-inventory-hide"},i("solution-contents",{id:"configInventory",key:`${this.solutionItemId}-contents`,ref:t=>this._solutionContentsComponent=t})),i("calcite-button",{key:"aa965867d04aebd46dbaae4ddd34f655dc77dd40",appearance:"transparent",class:"collapse-btn","icon-start":this._treeOpen?"chevrons-left":"chevrons-right",id:"collapse-vars",onClick:()=>this._toggleTree(),scale:"s",title:this._treeOpen?this._translations.collapse:this._translations.expand}),i("div",{key:"a02de6d666c1017f7d3ad08878ecc381d01e4632",class:"config-item"},i("solution-item",{authentication:this.authentication,"item-id":this._currentEditItemId,key:`${this.solutionItemId}-item`,locale:this.locale,"organization-variables":this._organizationVariables,"solution-item-id":this.solutionItemId,"solution-variables":this._solutionVariables})))),e?i("calcite-tab",{class:"config-tab"},i("div",{class:"config-solution"},i("solution-spatial-ref",{enableDefault:!!t.default,enabled:t?.enabled,featureServices:a.getStoreInfo("featureServices").map((t=>t.name)),id:"configure-solution-spatial-ref",key:`${this.solutionItemId}-spatial-ref`,locale:this.locale}))):null))))}_solutionStoreHasChanges=!1;_solutionEditorHasChanges=!1;_solutionEditorHasErrors=!1;_canSave=!1;_solutionItemSelected(t){this._currentEditItemId=t.detail}async getSpatialReferenceInfo(){return Promise.resolve(a.getStoreInfo("spatialReferenceInfo"))}async saveSolution(){this._solutionIsLoaded=!1,await a.saveSolution(),this._solutionIsLoaded=!0,this.solutionItemId=null}async unloadSolution(){this.solutionItemId=null}_initProps(){const t=a.getStoreInfo("solutionData");let e;this._templateHierarchy=[...o(t.templates)],this._solutionContentsComponent&&(this._solutionContentsComponent.templateHierarchy=this._templateHierarchy),this._templateHierarchy.length>0&&(e=a.getItemInfo(this._templateHierarchy[0].id)),this._currentEditItemId=e?e.itemId:""}async _loadSolution(t){return t?(this._solutionIsLoaded=!1,await a.loadSolution(t,this.authentication),this._initProps(),this._solutionIsLoaded=!0):this._reset(),Promise.resolve()}_reset(){this._currentEditItemId="",this._organizationVariables="",this._solutionVariables="",this._templateHierarchy=[]}_toggleTree(){this._treeOpen=!this._treeOpen}_updateSaveability(t,e,i){const n=(t||e)&&!i;this._canSave!==n&&window.dispatchEvent(new CustomEvent("solutionCanSave",{detail:n,bubbles:!0,cancelable:!1,composed:!0})),this._canSave=n}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{serializedAuthentication:["serializedAuthenticationWatchHandler"],solutionItemId:["valueWatchHandler"],locale:["localeWatchHandler"]}}};y.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%}.config-solution{position:absolute;top:3.5rem;right:-1px;bottom:-1px;left:-1px;display:flex;padding:0.5rem}.config-inventory{display:inline;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-inventory-hide{display:none;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-item{position:relative;display:inline;flex-grow:1;overflow-y:auto;margin-inline-start:0.5rem}solution-contents{position:relative;height:100%}solution-item{position:relative;height:100%}solution-spatial-ref{position:relative;height:100%;width:100%;overflow-y:auto}";export{y as solution_configuration}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as e,g as a,h as r,a as t}from"./p-4e6eb06e.js";const s=class{constructor(a){e(this,a),this.isPortal=!1,this.type="",this.typeKeywords=[]}get el(){return a(this)}render(){return r("div",{key:"17d5be934c3f22a38a9b277f4b76790e616b3335",title:this.type},r("img",{key:"3c42dd44b54c18a4a960669fc28330efcf23cab1",class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,a){const r=this._getItemIcon(e,a);return t("group"===r?`./item-icons/${r}16.png`:`./item-icons/${r}16.svg`)}_getItemIcon(e,a){const r=e.toLowerCase(),t=a||[],s=t.includes("Hosted Service");switch(r.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(t.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";const e=t.includes("Spatiotemporal");return t.includes("Table")?e?"spatiotemporaltable":"table":t.includes("Route Layer")?"routelayer":t.includes("Markup")?"markup":e?"spatiotemporal":t.includes("UtilityNetwork")?"utilitynetwork":s?"featureshosted":"features";case"group":return"group";case"group layer":return t.includes("Map")?"layergroup2d":t.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return s||t.includes("Tiled")?"maptiles":"mapimages";case"scene service":return t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"image service":return t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return t.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return t.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return t.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":if(t.includes("ArcGIS Pro"))return"mapsgray";case"explorer map":if(t.indexOf("Explorer Document"))return"mapsgray";if(t.includes("Explorer Mapping Application"))return"datafilesgray";case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"image":return"image";case"cad drawing":return"cad";case"service definition":case"geojson":case"360 vr experience":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return t.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geoprocessing service":case"geodata service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer":case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"hub initiative":return"hubinitiative";case"hub page":return"hubpage";case"hub event":return"hubevent";case"hub site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image":return"image";case"image collection":return"imagecollection";case"style":return t.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return t.includes("storymaptemplate")?"storymapstemplate":t.includes("storymapcollection")?"storymapcollection":t.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";default:return t.includes("Document")?"datafilesgray":r.includes("service")?"layers":"maps"}}static get assetsDirs(){return["item-icons"]}};s.style=".item-type-icon{pointer-events:none;display:block;height:1rem;margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{margin-inline-end:0.375rem}";export{s as solution_item_icon}
6
+ import{r as e,g as a,h as r,a as t}from"./p-4e6eb06e.js";const s=class{constructor(a){e(this,a),this.isPortal=!1,this.type="",this.typeKeywords=[]}get el(){return a(this)}render(){return r("div",{key:"cc13e7bfc0a58ca1727651c3c31b0dc4e50f716a",title:this.type},r("img",{key:"76808f6a3ced35a15626d4a4d30e7a2b8185d8d6",class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,a){const r=this._getItemIcon(e,a);return t("group"===r?`./item-icons/${r}16.png`:`./item-icons/${r}16.svg`)}_getItemIcon(e,a){const r=e.toLowerCase(),t=a||[],s=t.includes("Hosted Service");switch(r.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(t.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";const e=t.includes("Spatiotemporal");return t.includes("Table")?e?"spatiotemporaltable":"table":t.includes("Route Layer")?"routelayer":t.includes("Markup")?"markup":e?"spatiotemporal":t.includes("UtilityNetwork")?"utilitynetwork":s?"featureshosted":"features";case"group":return"group";case"group layer":return t.includes("Map")?"layergroup2d":t.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return s||t.includes("Tiled")?"maptiles":"mapimages";case"scene service":return t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"image service":return t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return t.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return t.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return t.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":if(t.includes("ArcGIS Pro"))return"mapsgray";case"explorer map":if(t.indexOf("Explorer Document"))return"mapsgray";if(t.includes("Explorer Mapping Application"))return"datafilesgray";case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"image":return"image";case"cad drawing":return"cad";case"service definition":case"geojson":case"360 vr experience":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return t.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geoprocessing service":case"geodata service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer":case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"hub initiative":return"hubinitiative";case"hub page":return"hubpage";case"hub event":return"hubevent";case"hub site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image":return"image";case"image collection":return"imagecollection";case"style":return t.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return t.includes("storymaptemplate")?"storymapstemplate":t.includes("storymapcollection")?"storymapcollection":t.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";default:return t.includes("Document")?"datafilesgray":r.includes("service")?"layers":"maps"}}static get assetsDirs(){return["item-icons"]}};s.style=".item-type-icon{pointer-events:none;display:block;height:1rem;margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{margin-inline-end:0.375rem}";export{s as solution_item_icon}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as i,g as s,c as e,F as a}from"./p-4e6eb06e.js";import{c as h}from"./p-ff336351.js";import{c,s as n,a as o}from"./p-ad9d1221.js";import{l as r,g as l,f as d}from"./p-f4aadb3b.js";import{b as f,d as p,a as m,c as b}from"./p-d572627c.js";import"./p-4f82eb55.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";
7
+ /*!
8
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
+ * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
10
+ * v2.13.0
11
+ */const y="frame",u="frame--advancing",g="frame--retreating",w=class{constructor(i){t(this,i),this.itemMutationObserver=h("mutation",(()=>this.updateFlowProps())),this.getFlowDirection=(t,i)=>t&&i>1||t>1?i<t?"retreating":"advancing":null,this.updateFlowProps=()=>{const{customItemSelectors:t,el:i,items:s}=this,e=Array.from(i.querySelectorAll("calcite-flow-item"+(t?`,${t}`:""))).filter((t=>t.closest("calcite-flow")===i)),a=s.length,h=e.length,c=e[h-1],n=e[h-2];if(h&&c&&e.forEach((t=>{t.showBackButton=t===c&&h>1,t.hidden=t!==c})),n&&(n.menuOpen=!1),this.items=e,a!==h){const t=this.getFlowDirection(a,h);this.itemCount=h,this.flowDirection=t}},this.customItemSelectors=void 0,this.flowDirection=null,this.itemCount=0,this.items=[]}async back(){const{items:t}=this,i=t[t.length-1];if(!i)return;const s=i.beforeBack?i.beforeBack:()=>Promise.resolve();try{await s.call(i)}catch(t){return}return i.remove(),i}async setFocus(){await c(this);const{items:t}=this,i=t[t.length-1];return i?.setFocus()}connectedCallback(){this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateFlowProps()}async componentWillLoad(){n(this)}componentDidLoad(){o(this)}disconnectedCallback(){this.itemMutationObserver?.disconnect()}async handleItemBackClick(t){if(!t.defaultPrevented)return await this.back(),this.setFocus()}render(){const{flowDirection:t}=this;return i("div",{key:"01fbee965d48cb54fa5bd1b53a3435538df84332",class:{[y]:!0,[u]:"advancing"===t,[g]:"retreating"===t}},i("slot",{key:"495880eceeb04387dd1352aa00337f037ab0636c"}))}get el(){return s(this)}};w.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0px}:host ::slotted(calcite-flow-item),:host ::slotted(calcite-panel){block-size:100%}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation:calcite-frame-advance var(--calcite-animation-timing)}:host .frame--retreating{animation:calcite-frame-retreat var(--calcite-animation-timing)}@keyframes calcite-frame-advance{0%{--tw-bg-opacity:0.5;transform:translate3d(50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity:0.5;transform:translate3d(-50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}:host([hidden]){display:none}[hidden]{display:none}";const k=class{constructor(i){t(this,i),this.success=e(this,"success",7),this.fail=e(this,"fail",7),this.isActionPending=e(this,"isActionPending",7),this.formReady=e(this,"formReady",7),this.locale=void 0,this.mapView=void 0,this.table=void 0,this.selectedFeature=void 0,this.customizeSubmit=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=void 0}get el(){return s(this)}Editor;_editor;reactiveUtils;_container;_addingAttachment;_isSubmitBtnClicked=!1;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.init()}))}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}success;fail;isActionPending;formReady;async componentWillLoad(){await this._getTranslations(),await this.initModules()}async init(){this.mapView&&await this.createEditorWidget()}async initModules(){const[t,i]=await r(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}render(){const t=this._editorLoading?"":"display-none";return i(a,{key:"48fffd1e9dd429d339d9a72e35f5c31561fc076f"},this.showGuidingMsg&&i("calcite-notice",{key:"9a6f700c135bb7593e4338981a30531e3d9fba8a",class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},i("div",{key:"7044e923a9fab833a7a6fe0bb97fa688d7e6eecc",slot:"message"},this._translations.provideDetailsMsg)),i("calcite-loader",{key:"15599ae77e451d220689c13098a31c5788714306",class:t,label:"",scale:"s"}))}async componentDidLoad(){await this.init()}disconnectedCallback(){this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this._editor=new this.Editor({view:this.mapView,visibleElements:{snappingControls:!1},container:this._container}),this.el.appendChild(this._container);const t=this.reactiveUtils.watch((()=>this._editor.viewModel.featureTemplatesViewModel.state),(t=>{"ready"===t&&(this._editorLoading=!0)}));this._editor.viewModel.addHandles(t);const i=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"adding-attachment"===t||"editing-attachment"===t?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)}));this._editor.viewModel.addHandles(i);const s=this.reactiveUtils.watch((()=>this._editor.viewModel.featureFormViewModel?.state),(t=>{"ready"===t&&this.formReady.emit()}));this._editor.viewModel.addHandles(s)}async startCreate(){const t=this.selectedFeature.layer,i=this.table,s=t.relationships[0],e=i.relationships.find((i=>t.layerId===i.relatedTableId)),a=await t.queryFeatures({objectIds:[this.selectedFeature.getObjectId()],outFields:[t.objectIdField,s.keyField]}),h=i.templates[0],c={attributeOverrides:this.makeAttributesForRelatedFeature(a.features[0],s,e),layer:i,template:h};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(c),await this.hideEditorsElements(),this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this))}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach((t=>{const i=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");i?.querySelector("header")?.setAttribute("style","display: none"),i?.querySelector("footer")?.setAttribute("style","display: none")})))}makeAttributesForRelatedFeature(t,i,s){const e=i.keyField;let a;t.attributes.hasOwnProperty(e)?a=t.getAttribute(e):t.attributes.hasOwnProperty(e.toLowerCase())?a=t.getAttribute(e.toLowerCase()):t.attributes.hasOwnProperty(e.toUpperCase())&&(a=t.getAttribute(e.toUpperCase()));let h=s.keyField;const c=this.table.fields.find((t=>t.name.toLocaleLowerCase()===h.toLocaleLowerCase()));return h=c.name,{[h]:a}}async submitted(t){if(t.invalid.length)this._isSubmitBtnClicked=!1;else if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some((t=>{if(t.error)throw t.error}))}catch(t){return void this.fail.emit(t)}this.success.emit()}}timeout(t){return new Promise((i=>setTimeout(i,t)))}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],_editorLoading:["_editorLoadingWatchHandler"]}}};k.style=":host{display:block}.esri-editor__panel-toolbar{display:none !important}.display-none{display:none !important}.esri-editor__panel-content{padding-block:10px !important}.notice-msg{padding:10px;width:calc(100% - 20px)}";const v=class{constructor(i){t(this,i),this.loadingStatus=e(this,"loadingStatus",7),this.commentSelect=e(this,"commentSelect",7),this.addComment=e(this,"addComment",7),this.likeOrDislikeClicked=e(this,"likeOrDislikeClicked",7),this.featureSelectionChange=e(this,"featureSelectionChange",7),this.mapView=void 0,this.graphics=void 0,this.reportingOptions=void 0,this.layerItemsHash=void 0,this.locale=void 0,this.showUserImageInCommentsList=!1,this._likeFieldAvailable=!1,this._likeCount=0,this._disLikeCount=0,this._dislikeFieldAvailable=!1,this._commentsAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._relatedFeaturesOIDs=void 0,this._updating=!1}get el(){return s(this)}_infoCard;_commentsList;_selectedGraphic;_likeField;_dislikeField;Graphic;RelationshipQuery;_validFieldTypes=["small-integer","integer","big-integer","single","long"];relatedTableId;async graphicsWatchHandler(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}async refresh(t){await this.getCompleteGraphic(t),await this.processComments(),this.isLikeDislikeConfigured(t.layer)?t&&this.graphics.length>1&&this.checkLikeDislikeFields():(this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1)}async back(){this._infoCard.back()}async next(){this._infoCard.next()}async toggleListView(){this._infoCard.toggleListView()}loadingStatus;commentSelect;addComment;likeOrDislikeClicked;featureSelectionChange;async componentWillLoad(){await this._initModules(),await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}render(){const t=this._relatedFeaturesOIDs?.length>0?`objectId in(${this._relatedFeaturesOIDs})`:"1=0";return i("calcite-panel",{key:"be7bebe9da698d963a2602fcacb95ac7206ac1e9","full-height":!0},i("info-card",{key:"1e069f52d59d42f3e2b88463ea7c536c65a0a6b5",allowEditing:!1,graphics:this.graphics,highlightEnabled:!1,isLoading:!1,isMobile:!1,locale:this.locale,mapView:this.mapView,onSelectionChanged:t=>{this.featureSelectionChange.emit(t.detail)},paginationEnabled:!1,position:"relative",ref:t=>this._infoCard=t}),(this._likeFieldAvailable||this._dislikeFieldAvailable||this._commentsAvailable)&&i("div",{key:"d53f5a1726e4c6299ffd04e266d84005181645f6",class:"buttons-container"},this._commentsAvailable&&i("calcite-button",{key:"4c2616cc9e0107258f5313b66ae96fa31fe582c5",appearance:"transparent",iconEnd:"speech-bubble",kind:"neutral",onClick:()=>{this.addComment.emit()},scale:"m"},this._relatedFeaturesOIDs.length),this._likeFieldAvailable&&i("calcite-button",{key:"7c87aa085df04a8b58625097c2ce70e5853b82f9",appearance:"transparent",iconEnd:"thumbs-up",kind:this._isLikeBtnClicked?"brand":"neutral",loading:this._updating,onClick:this.onLikeButtonClick.bind(this),scale:"m"},this._likeCount??this._selectedGraphic.attributes[this._likeField]??0),this._dislikeFieldAvailable&&i("calcite-button",{key:"59eb48b91fc2a394cafdcbeeebf5baafae9a8c9b",appearance:"transparent",iconEnd:"thumbs-down",kind:this._isDislikeBtnClicked?"brand":"neutral",loading:this._updating,onClick:this.onDislikeButtonClick.bind(this),scale:"m"},this._disLikeCount??this._selectedGraphic.attributes[this._dislikeField]??0)),this.relatedTableId&&this._commentsAvailable&&i("feature-list",{key:"f34ee203202944666c40e14bdfdc59265414fbe1",class:"height-full",locale:this.locale,mapView:this.mapView,onFeatureSelect:t=>{this.commentSelect.emit(t.detail)},pageSize:5,ref:t=>this._commentsList=t,selectedLayerId:this.relatedTableId,showErrorWhenNoFeatures:!1,showInitialLoading:!1,showUserImageInList:this.showUserImageInCommentsList,textSize:"small",whereClause:t}))}async _initModules(){const[t,i]=await r(["esri/rest/support/RelationshipQuery","esri/Graphic"]);this.RelationshipQuery=t,this.Graphic=i}async getCompleteGraphic(t){if(t){const i=t.layer,s=i.createQuery();s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this._selectedGraphic=e.features[0]}}async processComments(){const t=this._selectedGraphic.layer;if(this.reportingOptions&&this.reportingOptions[t.id]&&this.reportingOptions[t.id].comment&&t.relationships?.length>0){const i=await f(this.mapView);let s=null,e=null;if(t.relationships.some((a=>{const h=i.filter((i=>t.url===i.url&&i.layerId===a.relatedTableId));if(h&&h.length>0)return s=h[0],e=a.id,!0})),this.relatedTableId=s?.id??"",this.relatedTableId){const i=this._selectedGraphic.attributes[t.objectIdField],a=new this.RelationshipQuery({objectIds:[i],outFields:["*"],relationshipId:e}),h=await t.queryRelatedFeatures(a).catch((t=>{console.error(t)})),c=[];h[i]&&h[i].features.forEach((t=>{c.push(t.attributes[s.objectIdField])})),this._relatedFeaturesOIDs=c,this._commentsAvailable=!0}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1,this.relatedTableId=""}isLikeDislikeConfigured(t){let i=!1,s=!1;if(this.reportingOptions&&this.reportingOptions[t.id]){if(!this.reportingOptions[t.id].like&&!this.reportingOptions[t.id].dislike)return!1;const e=this.reportingOptions[t.id].likeField,a=this.reportingOptions[t.id].dislikeField;if(!e&&!a)return!1;t.fields.forEach((h=>{this._validFieldTypes.indexOf(h.type)>-1&&this.layerItemsHash[t.id].supportsUpdate&&(h.name===e&&this.reportingOptions[t.id].like?i=!0:h.name===a&&this.reportingOptions[t.id].dislike&&(s=!0))}))}return i||s}checkLikeDislikeFields(){this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._likeCount=0,this._disLikeCount=0;const t=this._selectedGraphic.layer;if(this.reportingOptions&&this.reportingOptions[t.id]){if(this._likeField=this.reportingOptions[t.id].likeField,this._dislikeField=this.reportingOptions[t.id].dislikeField,!this._likeField&&!this._dislikeField)return;t.fields.forEach((i=>{this._validFieldTypes.indexOf(i.type)>-1&&this.layerItemsHash[t.id].supportsUpdate&&(i.name===this._likeField&&this.reportingOptions[t.id].like?(this._likeFieldAvailable=!0,this._likeCount=this._selectedGraphic.attributes[i.name]):i.name===this._dislikeField&&this.reportingOptions[t.id].dislike&&(this._dislikeFieldAvailable=!0,this._disLikeCount=this._selectedGraphic.attributes[i.name]))})),this.getFromLocalStorage()}}onLikeButtonClick(){this._isDislikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&this.onDislikeButtonClick(),this._isLikeBtnClicked=!this._isLikeBtnClicked,this._isLikeBtnClicked?this._likeCount++:this._likeCount--,this.updateFeaturesLikeDislikeField(this._likeField,this._isLikeBtnClicked)}onDislikeButtonClick(){this._isLikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].like&&this.onLikeButtonClick(),this._isDislikeBtnClicked=!this._isDislikeBtnClicked,this._isDislikeBtnClicked?this._disLikeCount++:this._disLikeCount--,this.updateFeaturesLikeDislikeField(this._dislikeField,this._isDislikeBtnClicked)}async updateFeaturesLikeDislikeField(t,i){const s={},e=this._selectedGraphic.layer;this._updating=!0;const a=this._selectedGraphic;a.attributes[t]=Number(a.attributes[t])+(i?1:-1),s[e.objectIdField]=a.attributes[e.objectIdField],s[t]=a.attributes[t];const h=new this.Graphic;h.attributes=s;const c={updateFeatures:[h]};await e.applyEdits(c).then((()=>{this._selectedGraphic=a,this.setInLocalStorage(),this._updating=!1,this.likeOrDislikeClicked.emit()}),(t=>{this._updating=!1,console.log(t)}))}getFromLocalStorage(){const t=localStorage[this._selectedGraphic.layer.id];if(t){const i=JSON.parse(t).filter((t=>t.id===this._selectedGraphic.getObjectId()));i.length>0&&(this._isLikeBtnClicked=i[0].like,this._isDislikeBtnClicked=i[0].dislike)}}setInLocalStorage(){const t=this._selectedGraphic.layer.id,i=localStorage[t];let s=[];if(i){s=JSON.parse(i);const t=s.findIndex((t=>t.id===this._selectedGraphic.getObjectId()));t>=0&&s.splice(t,1)}s.push({id:this._selectedGraphic.getObjectId(),like:this._isLikeBtnClicked&&0!==this._likeCount,dislike:this._isDislikeBtnClicked&&0!==this._disLikeCount}),localStorage.setItem(t,JSON.stringify(s))}static get watchers(){return{graphics:["graphicsWatchHandler"]}}};v.style=":host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}";const L=class{constructor(i){t(this,i),this.layerSelect=e(this,"layerSelect",7),this.layersListLoaded=e(this,"layersListLoaded",7),this.mapView=void 0,this.layers=void 0,this.locale=void 0,this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=void 0}get el(){return s(this)}_layerItemsHash;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async refresh(){await this.setLayers()}layerSelect;layersListLoaded;async componentWillLoad(){await this._getTranslations()}async componentDidLoad(){await this.setLayers()}render(){return i(a,{key:"a151c8fd65c50aacb23dcd0c858e52c0c7cd7e5e"},this._isLoading&&i("calcite-loader",{key:"544a134bccc29048ca80b996844cc944bcd97a24",label:"",scale:"m"}),!this._isLoading&&this.mapView&&this._noLayersToDisplay&&i("calcite-notice",{key:"7557f91c8c3349c120c043ea59458b4c834dce2e",class:"error-msg",icon:"layers-reference",kind:"danger",open:!0},i("div",{key:"ea8b20f8c7da5053641cfad56e3395ae3c6286f5",slot:"title"},this._translations.error),i("div",{key:"38aaed7b456aba0b1dd70183be03e9133834dfb4",slot:"message"},this._translations.noLayerToDisplayErrorMsg)),!this._isLoading&&this.mapView&&i("calcite-list",{key:"817de422b8387cafb7f9a17515cf9b3c13998522","selection-appearance":"border","selection-mode":"none"},this.renderLayerList()))}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){const t=[];this._layerItemsHash=await p(this.mapView,!0);const i=await m(this.mapView);for(const s of i)if("feature"===s?.type&&this.showFeatureCount){const i=s.createQuery();if(s?.definitionExpression&&(i.where=i.where+" AND "+s.definitionExpression),this.applyLayerViewFilter){const t=await b(this.mapView,s.id);t?.filter?.where&&(i.where=i.where?i.where+" AND "+t.filter.where:t.filter.where)}const e=s.queryFeatureCount(i);t.push(e),e.then((async t=>{const i=isNaN(t)?"":await d(t,{places:0,api:4,type:"decimal"});this._layerItemsHash[s.id].formattedFeatureCount=i}))}await Promise.all(t).then((()=>{const t=this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=t.reverse(),this.handleNoLayersToDisplay()}),(()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()}))}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){const i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce(((t,s)=>(i.indexOf(s)>-1&&t.push(s),t)),[])}renderLayerList(){return this._mapLayerIds.length>0&&this._mapLayerIds.reduce(((t,i)=>(this._layerItemsHash[i]&&t.push(this.getLayerListItem(i)),t)),[])}getLayerListItem(t){const s=this._layerItemsHash[t].formattedFeatureCount;return i("calcite-list-item",{onCalciteListItemSelect:()=>{this.onLayerItemSelected(t)}},i("div",{class:"layer-name",slot:"content-start"},this._layerItemsHash[t].name),this.showFeatureCount&&void 0!==s&&""!==s&&i("div",{class:this.showNextIcon?"":"feature-count",slot:"content-end"},"("+s+")"),this.showNextIcon&&i("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}onLayerItemSelected(t){this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t].name})}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};L.style=":host{display:block}.error-msg{padding:10px}.layer-name{font-weight:500;padding:10px 12px}.feature-count{padding-right:12px}";export{w as calcite_flow,k as create_related_feature,v as feature_details,L as layer_list}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as e,F as i,g as s,c as a,H as o}from"./p-4e6eb06e.js";import{c as n,d as l}from"./p-5e25a0b8.js";import{s as c,e as r}from"./p-621ad249.js";import{g as d}from"./p-f4aadb3b.js";import"./p-ff336351.js";import"./p-4f82eb55.js";import"./p-7d542581.js";import"./p-91371f97.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";
7
+ /*!
8
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
+ * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
10
+ * v2.13.0
11
+ */const h="content",p="content--behind",b="content-bottom",f="center-content",m=class{constructor(e){t(this,e),this.handleHeaderSlotChange=t=>{this.hasHeader=!!c(t)},this.handleFooterSlotChange=t=>{this.hasFooter=!!c(t)},this.handleAlertsSlotChange=t=>{this.hasAlerts=!!c(t),r(t)?.map((t=>{"CALCITE-ALERT"===t.tagName&&(t.embedded=!0)}))},this.handleSheetsSlotChange=t=>{this.hasSheets=!!c(t),r(t)?.map((t=>{"CALCITE-SHEET"===t.tagName&&(t.embedded=!0)}))},this.handleModalsSlotChange=t=>{this.hasModals=!!c(t),r(t)?.map((t=>{"CALCITE-MODAL"===t.tagName&&(t.embedded=!0)}))},this.handlePanelTopChange=t=>{this.hasPanelTop=c(t)},this.handlePanelBottomChange=t=>{this.hasPanelBottom=c(t)},this.handleDialogsSlotChange=t=>{this.hasDialogs=!!c(t),r(t)?.map((t=>{"CALCITE-DIALOG"===t.tagName&&(t.embedded=!0)}))},this.contentBehind=!1,this.hasHeader=!1,this.hasFooter=!1,this.hasAlerts=!1,this.hasModals=!1,this.hasDialogs=!1,this.hasSheets=!1,this.hasPanelTop=!1,this.hasPanelBottom=!1,this.hasOnlyPanelBottom=!1,this.panelIsResizing=!1}handleCalciteInternalShellPanelResizeStart(t){this.panelIsResizing=!0,t.stopPropagation()}handleCalciteInternalShellPanelResizeEnd(t){this.panelIsResizing=!1,t.stopPropagation()}updateHasOnlyPanelBottom(){this.hasOnlyPanelBottom=!this.hasPanelTop&&this.hasPanelBottom}connectedCallback(){n(this)}disconnectedCallback(){l(this)}renderHeader(){return e("div",{hidden:!this.hasHeader},e("slot",{key:"header",name:"header",onSlotchange:this.handleHeaderSlotChange}))}renderFooter(){return e("div",{class:"footer",hidden:!this.hasFooter,key:"footer"},e("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))}renderAlerts(){return e("div",{hidden:!this.hasAlerts},e("slot",{key:"alerts",name:"alerts",onSlotchange:this.handleAlertsSlotChange}))}renderSheets(){return e("div",{hidden:!this.hasSheets},e("slot",{key:"sheets",name:"sheets",onSlotchange:this.handleSheetsSlotChange}))}renderModals(){return e("div",{hidden:!this.hasModals},e("slot",{key:"modals",name:"modals",onSlotchange:this.handleModalsSlotChange}))}renderDialogs(){return e("div",{hidden:!this.hasDialogs},e("slot",{key:"dialogs",name:"dialogs",onSlotchange:this.handleDialogsSlotChange}))}renderContent(){const{panelIsResizing:t}=this,i=e("slot",{key:"default-slot"}),s=t?e("div",{class:"content--non-interactive"},i):i,a=e("slot",{key:"center-row-slot",name:"center-row"}),o=e("slot",{key:"panel-bottom-slot",name:"panel-bottom",onSlotchange:this.handlePanelBottomChange}),n=e("slot",{key:"panel-top-slot",name:"panel-top",onSlotchange:this.handlePanelTopChange}),l="content-container";return this.contentBehind?[e("div",{class:{[h]:!0,[p]:!0},key:l},s),e("div",{class:{[f]:!0,[b]:this.hasOnlyPanelBottom}},n,o,a)]:[e("div",{class:{[h]:!0,[b]:this.hasOnlyPanelBottom},key:l},n,s,o,a)]}renderMain(){return e("div",{class:"main"},e("slot",{name:"panel-start"}),this.renderContent(),e("slot",{name:"panel-end"}))}renderPositionedSlots(){return e("div",{class:"positioned-slot-wrapper"},this.renderAlerts(),this.renderModals(),this.renderDialogs(),this.renderSheets())}render(){return e(i,{key:"6864b8b95b6edd871ad622b0d49a3f4a42a0a8a8"},this.renderHeader(),this.renderMain(),this.renderFooter(),this.renderPositionedSlots())}get el(){return s(this)}static get watchers(){return{hasPanelTop:["updateHasOnlyPanelBottom"],hasPanelBottom:["updateHasOnlyPanelBottom"]}}};m.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:absolute;inset:0px;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden;--calcite-shell-tip-spacing:26vw}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto;justify-content:space-between}.content ::slotted(calcite-shell-center-row),.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0px;border-width:0px;z-index:calc(var(--calcite-z-index) - 1);display:initial}.content--non-interactive{pointer-events:none;display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap}::slotted(calcite-shell-center-row){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-start]::slotted(calcite-shell-panel),slot[name=panel-end]::slotted(calcite-shell-panel){position:relative;z-index:calc(var(--calcite-z-index) + 1)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-color-border-3)}slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-top]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-bottom]::slotted(calcite-shell-center-row:not([detached])){border-inline-start-width:1px;border-inline-end-width:1px;border-color:var(--calcite-color-border-3)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}.content-bottom{justify-content:flex-end}::slotted(calcite-shell-center-row){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:var(--calcite-z-index-toast);box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.25rem;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);inset-block-end:0.5rem;inset-inline:var(--calcite-shell-tip-spacing)}slot[name=center-row]::slotted(calcite-shell-center-row),slot[name=panel-bottom]::slotted(calcite-shell-center-row){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-center-row){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}:host([hidden]){display:none}[hidden]{display:none}";const u=class{constructor(e){t(this,e),this.editsComplete=a(this,"editsComplete",7),this.deleteDialog=void 0,this.buttonType="button",this.disabled=!1,this.icon=void 0,this.ids=[],this.layer=void 0,this.locale=void 0,this._confirmDelete=!1,this._deleteEndabled=!1,this._supportsDelete=void 0,this._translations=void 0}get el(){return s(this)}async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;async componentWillLoad(){await this._getTranslations()}render(){return e(o,{key:"1816da3d5cd7903b4e699dffa4ac4836dca722bb"},"button"===this.buttonType?e("calcite-button",{appearance:"outline",disabled:!this._deleteEndabled,id:"solutions-delete",kind:"danger",onClick:()=>this._delete(),width:"full"},this._translations.deleteCount.replace("{{n}}",this.ids.length.toString())):e("calcite-action",{appearance:"solid",compact:!0,disabled:!this._deleteEndabled,id:this.icon,onClick:()=>this._delete(),scale:"s",text:this._translations.delete},e("calcite-button",{appearance:"transparent",iconStart:this.icon,kind:"danger"},this._translations.delete)),this._deleteMessage(),e("calcite-tooltip",{key:"26fc4d4b4ea02b7a6c5e3f87abe2c5b8f96a3654",placement:"bottom","reference-element":"button"===this.buttonType?"solutions-delete":this.icon},e("span",{key:"c2f7b101bb3a99274fe7f364ad29365c212d856e"},this._translations.delete)))}async componentDidLoad(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete,this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids.length>0}_delete(){this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:e("delete-dialog",{id:"solution-delete-dialog",ids:this.ids,layer:this.layer,locale:this.locale,onDeleteDialogClose:()=>this._confirmDelete=!1,open:this._confirmDelete})}async _getTranslations(){const t=await d(this.el);this._translations=t[0]}static get watchers(){return{ids:["idsWatchHandler"],layer:["layerWatchHandler"],locale:["localeWatchHandler"]}}};u.style=":host{display:block}.delete-modal{position:fixed}";const w=class{constructor(e){t(this,e),this.editsComplete=a(this,"editsComplete",7),this.deleteDialogClose=a(this,"deleteDialogClose",7),this.ids=[],this.layer=void 0,this.locale=void 0,this.open=!1,this._isDeleting=!1,this._translations=void 0}get el(){return s(this)}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;deleteDialogClose;async componentWillLoad(){await this._getTranslations()}render(){const t=1===this.ids.length?this._translations?.confirmSingle:this._translations?.confirmMultiple;return e(o,{key:"eafca7d4325c65ff21fbfeaa24ea14e95bc25a34"},e("calcite-modal",{key:"745e52d7b23318492914662cc769a1206baefd28","aria-labelledby":"modal-title",class:"delete-modal",kind:"danger",onCalciteModalClose:()=>this._close(),open:this.open,widthScale:"s"},e("div",{key:"363614f6eaf30c30c6c2ccde3875dfff5cd94088",class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.deleteFeature),e("div",{key:"b3b6f74495894589b7fd8be54265c4a69ffaa62e",slot:"content"},t),e("calcite-button",{key:"d325fcf12624bac39f56ec690f7e4e9660789891",appearance:"outline",kind:"danger",onClick:()=>this._close(),slot:"secondary",width:"full"},this._translations?.cancel),e("calcite-button",{key:"73a10546ad92065c949bfacca3eb3d508685030e",kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"primary",width:"full"},this._translations?.delete)))}async _deleteFeatures(){this._isDeleting=!0;const t=this.ids.map((t=>({objectId:t})));await this.layer.applyEdits({deleteFeatures:t}),this._isDeleting=!1,this._close(),this.editsComplete.emit("delete")}_close(){this.open=!1,this.deleteDialogClose.emit()}async _getTranslations(){const t=await d(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};w.style=":host{display:block}.delete-modal{position:fixed}";export{m as calcite_shell,u as delete_button,w as delete_dialog}
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as i,g as e,h as s,H as a}from"./p-4e6eb06e.js";import{l as n,g as h}from"./p-f4aadb3b.js";import{z as o}from"./p-621ad249.js";import{f as c}from"./p-80cb7c73.js";import{s as l}from"./p-51c6e6fe.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-7d542581.js";import"./p-91371f97.js";import"./p-dc9d4be3.js";const r=class{constructor(e){t(this,e),this.bufferComplete=i(this,"bufferComplete",7),this.distanceChanged=i(this,"distanceChanged",7),this.unitChanged=i(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.locale=void 0,this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=void 0}get el(){return e(this)}_geometryEngine;_bufferTimeout;_unitElement;_units;geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units[t]}bufferComplete;distanceChanged;unitChanged;async componentWillLoad(){await this._defineTranslations(),await this._initModules()}render(){return s(a,{key:"4fbfb01938d285a2b022834f712013cea10945f9"},"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _defineTranslations(){await this._getTranslations(),this._initTranslatedUnits()}async _initModules(){const[t]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=t}_initTranslatedUnits(){this._units={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers}}_getUnits(){return Object.keys(this._units).map((t=>s("calcite-option",{label:this._units[t],selected:this.unit===t,value:t})))}_setDistance(t){const i=parseInt(t.target.value,10);this.distance!==i&&i>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i}),this.distance=i,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{if(this.geometries?.length>0&&this.unit&&this.distance>0){const t=this.geometries[0].spatialReference,i=t.isWGS84||t.isWebMercator?this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults):this._geometryEngine.buffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400))}_getTextBoxDisplay(){return s("div",{class:"c-container"},s("calcite-input",{class:"padding-end-1 w-50",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:t=>this._setDistance(t),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),s("calcite-select",{class:"flex-1 w-50",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:t=>{this._unitElement=t}},this._getUnits()))}_getSliderDisplay(){return s("div",null,s("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}_testAccess(t,i){switch(t){case"_setUnit":return this._setUnit(i);case"_setDistance":return this._setDistance(i)}return null}static get watchers(){return{geometries:["geometriesWatchHandler"],disabled:["disabledWatchHandler"],locale:["localeWatchHandler"]}}};r.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}';
7
+ /*!
8
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
+ * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
10
+ * v2.13.0
11
+ */
12
+ const d={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},p=class{constructor(i){t(this,i),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=o(d,this.icon,this.status)}connectedCallback(){this.requestedIcon=o(d,this.icon,this.status)}render(){return s(a,{key:"c7d1b37721cec28dee1020b81ff66dee7fc8bc44","calcite-hydrated-hidden":this.el.hidden},this.renderIcon(this.requestedIcon),s("slot",{key:"7147d81e906765c154b4a61e31706a72c1ef3ae0"}))}renderIcon(t){if(t)return s("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:t,scale:"s"})}get el(){return e(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};p.style=":host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;--calcite-input-message-spacing-value:0.25rem;margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-color-status-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-color-status-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-color-status-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-color-brand)}:host([scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([scale=m]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}";const g=class{constructor(e){t(this,e),this.selectionLoadingChange=i(this,"selectionLoadingChange",7),this.sketchGraphicsChange=i(this,"sketchGraphicsChange",7),this.drawUndo=i(this,"drawUndo",7),this.drawRedo=i(this,"drawRedo",7),this.active=!1,this.drawMode=c.SKETCH,this.editGraphicsEnabled=!0,this.graphics=void 0,this.locale=void 0,this.mapView=void 0,this.pointSymbol=void 0,this.polylineSymbol=void 0,this.polygonSymbol=void 0,this.redoEnabled=!1,this.undoEnabled=!1,this._translations=void 0,this._selectionMode=void 0}get el(){return e(this)}GraphicsLayer;SketchViewModel;Sketch;_sketchGraphicsLayer;_sketchViewModel;_sketchWidget;_sketchElement;graphicsWatchHandler(t,i){t&&t.length>0&&JSON.stringify(t)!==JSON.stringify(i)&&this._sketchGraphicsLayer&&(this._updateGraphicsSymbols(t),this._sketchGraphicsLayer.removeAll(),this._sketchGraphicsLayer.addMany(t))}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}mapViewWatchHandler(t,i){t&&t!==i&&this._init()}async clear(){this._clearSketch()}async updateGraphics(){this._updateGraphics()}selectionLoadingChange;sketchGraphicsChange;drawUndo;drawRedo;async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}disconnectedCallback(){this._sketchWidget.cancel(),this._clearSketch()}render(){const t=this.drawMode===c.SKETCH?"display-none":"esri-widget esri-sketch__panel border-left esri-sketch__section";return s(a,{key:"c94ac0dde3ba21569ef86cb3ba5e92a427acd10f"},s("div",{key:"c699bf597d5a28d62dbba20fa6ddca38f406294f",class:this.drawMode===c.SKETCH?"border":"border esri-widget esri-sketch__panel"},s("div",{key:"78058d9155a650bb59e59ab9064a0286b7479759",ref:t=>{this._sketchElement=t}}),s("div",{key:"8cfc53dda2d1b272841acf40bd70b951111c359e",class:t},s("calcite-action",{key:"5a8f0d0429f7d3df587957ae77ed935b0f99a5a0",disabled:!this.undoEnabled,icon:"undo",onClick:()=>this._undo(),scale:"s",text:this._translations.undo}),s("calcite-action",{key:"163067cba4a163dc32d23c2d96cb2d9d967d287e",disabled:!this.redoEnabled,icon:"redo",onClick:()=>this._redo(),scale:"s",text:this._translations.redo}))))}async _initModules(){const[t,i,e]=await n(["esri/layers/GraphicsLayer","esri/widgets/Sketch","esri/widgets/Sketch/SketchViewModel"]);this.GraphicsLayer=t,this.Sketch=i,this.SketchViewModel=e}_init(){this.mapView&&this._sketchElement&&(this._initGraphicsLayer(),this._initSketch())}_initGraphicsLayer(){const t=this._translations.sketchLayer,i=this.mapView.map.layers.findIndex((i=>i.title===t));i>-1?this._sketchGraphicsLayer=this.mapView.map.layers.getItemAt(i):(this._sketchGraphicsLayer=new this.GraphicsLayer({title:t,listMode:"hide"}),l.managedLayers[t]="sketch",this.mapView.map.layers.add(this._sketchGraphicsLayer)),this.graphics&&this.graphics.length>0&&this._sketchGraphicsLayer.addMany(this.graphics)}_initSketch(){const t={layer:this._sketchGraphicsLayer,view:this.mapView,defaultCreateOptions:{mode:"hybrid"},defaultUpdateOptions:{preserveAspectRatio:!1,enableScaling:!1,enableRotation:!1,tool:"reshape",toggleToolOnClick:!1}};this._sketchWidget=new this.Sketch({...t,container:this._sketchElement,creationMode:"single",visibleElements:{duplicateButton:!1,selectionTools:{"lasso-selection":!1,"rectangle-selection":!1},createTools:{circle:!1},undoRedoMenu:!1,settingsMenu:this.drawMode===c.SKETCH}}),this._sketchViewModel=new this.SketchViewModel({...t}),this._sketchWidget.viewModel.polylineSymbol=this.polylineSymbol,this._sketchWidget.viewModel.pointSymbol=this.pointSymbol,this._sketchWidget.viewModel.polygonSymbol=this.polygonSymbol;let i=!1;this._sketchWidget.on("create",(t=>{"complete"===t.state&&(this.graphics=[t.graphic],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}),this.drawMode===c.REFINE&&(i=!0,this._sketchWidget.viewModel.create(t.tool))),"cancel"===t.state&&this.drawMode===c.REFINE&&i&&(i=!i,this._sketchWidget.viewModel.create(t.tool))})),this._sketchWidget.on("update",(t=>{if(this.editGraphicsEnabled){const i=t?.toolEventInfo?.type;"reshape-stop"!==i&&"move-stop"!==i||(this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}))}else this._sketchWidget.viewModel.cancel(),this._sketchViewModel.cancel()})),this._sketchWidget.on("delete",(()=>{this.graphics=[],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("undo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("redo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})}))}_clearSketch(){this._sketchWidget?.viewModel.cancel(),this.graphics=[],this._sketchGraphicsLayer?.removeAll()}_undo(){this.drawUndo.emit()}_redo(){this.drawRedo.emit()}_updateGraphics(){setTimeout((()=>{1===this.graphics.length&&this._sketchWidget.update(this.graphics,{tool:"reshape",enableRotation:!1,enableScaling:!1,preserveAspectRatio:!1,toggleToolOnClick:!1})}),100)}_updateGraphicsSymbols(t){const i=t[0].geometry.type,e="point"===i?this.pointSymbol:"polyline"===i?this.polylineSymbol:"polygon"===i?this.polygonSymbol:void 0;e&&t.forEach((t=>t.symbol=e))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{graphics:["graphicsWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"]}}};g.style=':host{display:block}.border{outline:1px solid var(--calcite-color-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110, 110, 110, .3)}.border-left[dir="rtl"]{border-right:1px solid rgba(110, 110, 110, .3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0;justify-content:flex-start !important}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}';export{r as buffer_tools,p as calcite_input_message,g as map_draw_tools}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as i,g as s,h as e,H as a}from"./p-4e6eb06e.js";import{g as h,l as o}from"./p-f4aadb3b.js";import{g as l,q as n,e as c,f as d,i as r,j as p,c as b}from"./p-d572627c.js";import{d as f}from"./p-ff9e28d1.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-7530a02f.js";import"./p-d0d020a5.js";import"./p-9bb44f57.js";const u=class{constructor(s){t(this,s),this.createWorkFlowStarted=i(this,"createWorkFlowStarted",7),this.backFromCreateWorkFlow=i(this,"backFromCreateWorkFlow",7),this.featureOrRecordSubmitted=i(this,"featureOrRecordSubmitted",7),this.customInfoText=void 0,this.enableEditGeometry=!1,this.isMobile=void 0,this.layer=void 0,this.locale=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this.selectedFeaturesIds=void 0,this.enableCreateFeatures=!0,this.selectingFeatureFromMap=void 0,this._cardLoading=!1,this._graphics=void 0,this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._translations=void 0}get el(){return s(this)}_isFeatureCreated=!1;_createFeature;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}createWorkFlowStarted;backFromCreateWorkFlow;featureOrRecordSubmitted;async featureSelectionChange(t){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();const i=t.detail;this._graphics=await this._getFeaturesByIds(i)}async layerSelectionChange(t){this._showCreateFeatureComponent&&this._backFromCreateFeature();const i=t.detail[0];this.layer=await l(this.mapView,i)}async componentWillLoad(){await this._getTranslations(),this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){const t=this._graphics?.length>0?"":"display-none",i=0===this._graphics?.length&&this._showCreateFeatureComponent?"":"display-none",s=this._graphics?.length>0||this._showCreateFeatureComponent?"display-none":"",h=this.layer?.isTable,o=h?this._translations.createRecord:this._translations.createFeature,l=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,n=this.enableCreateFeatures&&this.layer?.capabilities?.operations?.supportsAdd;return e(a,{key:"1dc448368b85b83ccc2f76f59cff83559d1d1285"},e("div",{key:"7c058f7a4ca2db84f0ad35efba90a1485e5c7989",class:"overflow-auto height-full"},e("calcite-shell",{key:"1388666d3d11efee37efc1524011594237cccc35",class:"position-relative "+t},e("div",{key:"3f93c4de344e49eec16e447bc1ca44cb280f84cc",class:"position-static z-index-500"},e("info-card",{key:"c5b8cafef2595b8ae85725d583caebf9754ce1fb",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView}))),e("calcite-shell",{key:"bfa2f41e657f390335545f46ab744d4d980c3926",class:"position-relative "+s},e("calcite-flow-item",{key:"bf19ce4b69b52c5652629f38859e03a0a99f8374"},e("calcite-panel",{key:"1ea46998a73ad636ad2a956e72181a0570edd5d0"},e("div",{key:"d853f429c30daa5abcfe6576b7242fa48251ae53",class:"padding-1"},e("calcite-notice",{key:"dffa52ec3fa7a22494b6dadd7b1c6d512e25c192",icon:this.selectingFeatureFromMap?"map":"table",iconFlipRtl:!0,open:!0},e("div",{key:"728b56c9281dfe09d1604882635a53803c5f4253",slot:"message"},l))),!this.isMobile&&n&&e("calcite-button",{key:"260042d84c529d5508630bca7bdb39db1c2408cb",disabled:!this.layer,onClick:()=>this._createFeatureBtnClicked(),slot:"footer",width:"full"},h?this._translations.createRecord:this._translations.createFeature)))),e("calcite-shell",{key:"c30cbc2dc6e70319440bf9ed7c3d7f7ede38c3a1",class:"position-relative "+i},e("calcite-flow-item",{key:"901c5a407a8418c34ee72c4dd4b16443c3766819"},e("calcite-panel",{key:"a6faf502cd08060a42582cbd95d7354b1e192a43",heading:o},e("calcite-action",{key:"23e9c295f7476f935055c30227774e173315194d",class:"back-button hydrated",icon:"chevron-left",onClick:this._backFromCreateFeature.bind(this),scale:"s",slot:"header-actions-start",text:""}),this.getEditorComponent(),this._showSubmitBtn&&e("calcite-button",{key:"3ee5c310e5fad8aa5d6abd8ae1347c46d3ada1be",appearance:"solid",class:"footer-top-button footer-button",onClick:()=>{this._createFeature.submit()},slot:"footer",width:"full"},this._translations.create))))))}getEditorComponent(){return e("div",null,this._showCreateFeatureComponent&&e("create-feature",{customizeSubmit:!0,locale:this.locale,mapView:this.mapView,onDrawComplete:()=>{this._showSubmitBtn=!0},onEditingAttachment:t=>{this._showSubmitBtn=!t.detail},onProgressStatus:()=>{setTimeout((()=>{this._isFeatureCreated=!1}),2e3)},onSuccess:this._featureCreated.bind(this),ref:t=>this._createFeature=t,selectedLayerId:this.layer?.id,showGuidingMsgWhileDrawing:!1}))}async _getFeaturesByIds(t){return(t.length>0?await n(t,this.layer,[],!0,this.mapView.spatialReference):[]).sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit(),setTimeout((()=>{this._showCreateFeatureComponent=!0}),50)}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};u.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}.position-static{position:static !important}.z-index-500{z-index:500 !important}card-manager{display:block}";const m=class{constructor(s){t(this,s),this.featureSelectionChange=i(this,"featureSelectionChange",7),this.toggleFilter=i(this,"toggleFilter",7),this.appLayout=void 0,this.defaultGlobalId=void 0,this.defaultLayerId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.locale=void 0,this.mapHidden=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.selectedIds=[],this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this.zoomToScale=void 0,this.createFilterModal=!0,this._allIds=[],this._controlsThatFit=void 0,this._csvExporting=!1,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._layer=void 0,this._selectAllActive=!1,this._deleteDialogOpen=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=void 0,this._translations=void 0,this._fullTextSearchInfo=void 0,this._searchPlaceHolder="",this._size=0}get el(){return s(this)}FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_filterList;_floorExpression;_floorField;_floorFacility;_floorLevel;_floorSite;_layerExpressions;_loaded=!1;_mapClickHandle;_observerSet=!1;_previousCurrentId;reactiveUtils;_refreshHandle;_resizeObserver;_selectAllElement;_selectionFromMap=!1;_shareNode;_shiftIsPressed=!1;_showHideDropdown;_skipOnChange=!1;_moreDropdown;_table;_tableNode;_timeout;_toolbar;_toolbarSizeInfos;_searchExpression;appLayoutWatchHandler(){this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}enableCSVWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}mapHiddenWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){this._resetColumnTemplates(),this.createFilterModal&&this._initLayerExpressions(),this._initToolInfos(),this._updateToolbar(),await this._sortTable()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression=void 0,this._searchExpression=void 0,this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})))}async _layerWatchHandler(){this._fetchingData=!0,await(this._layer?.when((async()=>{this._definitionExpression=this._layer.definitionExpression,this._floorField=this._layer.floorInfo?.floorField,this._updateFloorDefinitionExpression(),await this._resetTable(),this.createFilterModal&&this._initLayerExpressions(),this._updateShareUrl(),this._fetchingData=!1})))}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0]))}async filterReset(){await this._handleFilterListReset()}async filterUpdate(){await this._handleFilterUpdate()}async closeFilter(){await this._closeFilter()}async refresh(){this._table&&await this._refresh()}featureSelectionChange;toggleFilter;async selectionChanged(t){const i=t.detail.selectedFeature[0],s=i.getObjectId(),e=this._table;if(e.rowHighlightIds.length&&e.rowHighlightIds.removeAll(),e.rowHighlightIds.add(s),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(t);const e=i.layer;let a;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===e.title&&"feature"===t.layer.type)return a=t,!0})),a&&await c([s],a,this.mapView,!0,void 0,this.zoomToScale)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await d(this._layer)),await this._refresh()}async facilityChanged(t){this._floorFacility=t.detail,this._updateFloorDefinitionExpression()}async levelChanged(t){this._floorLevel=t.detail,this._updateFloorDefinitionExpression()}async siteChanged(t){this._floorSite=t.detail,this._updateFloorDefinitionExpression()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}clearSelection(){this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const t=this._fetchingData?"display-none":"",i=this._fetchingData?"":"display-none",s=this._size.toString(),h=this.selectedIds.length.toString(),o=this.isMobile?"height-full":"height-full-adjusted",l=this._canShowFullTextSearch();return this._validateActiveActions(),e(a,{key:"5cbb5ba55c63eaf278666aac034a01d971d9f12a"},e("calcite-shell",{key:"8a27d87fc002b72fe478d25885b2ab04261362ca"},this._getTableControlRow("header"),e("div",{key:"250c356a30389b8cb95628953f3bb3ec5c88361d",class:`width-full ${o}`},e("calcite-panel",{key:"9d5dbb084031bdface1dbc3a1dbc2fa33eb163b5",class:"height-full width-full"},l&&e("div",{key:"2d45ae4255a1d0e3cf14aa0f6a01915a38626bc7",class:"search-container"},e("calcite-input",{key:"c73546fef30db70d01cf8978a5daf9ea4193ddc2",class:"search",clearable:!0,icon:"search",onCalciteInputChange:t=>{this._searchTextChanged(t)},placeholder:this._searchPlaceHolder,title:this._searchPlaceHolder,type:"search"})),e("calcite-loader",{key:"61621afb1e5fa67e25b878320c8497200b8265cd",class:i,label:this._translations.fetchingData,scale:"l"}),e("div",{key:"0ef4fe0e4099ec60f4c38e2c421920c9a8fe3c4f",class:t,ref:this.onTableNodeCreate}))),this.isMobile?void 0:e("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",s).replace("{{selected}}",h))),this.createFilterModal&&this._filterModal(),e("delete-dialog",{key:"e2564b1d08476f762577247ffb41a00e5c41514c",id:"deleteDialogId",ids:this._getIds(),layer:this._layer,locale:this.locale,onDeleteDialogClose:()=>this._deleteDialogOpen=!1,open:this._deleteDialogOpen,ref:t=>this._deleteDialog=t}))}_deleteDialog;async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0)}componentDidRender(){document.onclick=t=>this._handleDocumentClick(t),document.onkeydown=t=>this._handleKeyDown(t),document.onkeyup=t=>this._handleKeyUp(t),this._updateToolbar()}async _initModules(){const[t,i,s]=await o(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=s}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),this._searchFullText()}async _searchFullText(){if(this._searchExpression&&this._clearSearchDefinitionExpression(),this._fullTextSearchInfo.length&&this._fullTextSearchInfo[0].searchTerm){const t=this._layer.createQuery();t.fullText=this._fullTextSearchInfo;const i=await this._layer.queryObjectIds(t);await this._updateSearchDefinitionExpression(i?.length?i:[-1])}await new Promise((t=>setTimeout(t,800))),await this._updateAllIds()}_clearSearchDefinitionExpression(){const t=this._layer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._layer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async _updateSearchDefinitionExpression(t){const i=this._layer.definitionExpression;if(t?.length){const s=`objectId in(${t})`;this._layer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,s):i?`${i} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return((this._layer?.capabilities)?.query)?.supportsFullTextSearch&&this._layer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._layer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._layer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const s=[];i.forEach((t=>{const i=this._layer.getField(t.trim());s.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",s.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_onResize(){this._updateToolbar()}_getTableControlRow(t){const i=this._canShowFullTextSearch()?"border-bottom":"";return e("div",{class:`display-flex height-51-px ${i}`,ref:t=>this._toolbar=t,slot:t},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const t=this.isMobile?"width-full":"",i=this.isMobile?"border-top":"";return e("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},e("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},e("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this._layer?[this._layer?.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(i.isDanger?this._getDangerAction(i.icon,i.label,i.func,i.disabled):i.isSublist?e("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(i.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._showHideDropdown=t},this._getAction(i.active,this._showHideOpen?"chevron-down":i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getFieldlist(){return this._columnsInfo?e("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>{const i=this._columnsInfo[t];return e("calcite-dropdown-item",{id:`layer-table-${t.toLowerCase().replaceAll(" ","")}`,label:t,onClick:t=>{const i=t.target;this._columnsInfo[i.label]=i.selected,i.selected?this._table.showColumn(i.label):this._table.hideColumn(i.label)},selected:i},t)}))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,s=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.icon?!i:!t)}))}_validateActiveActions(){const t=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive),"selected-items-filter"===i.icon&&(i.active=this._showOnlySelected))}))}_initToolInfos(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate&&!1,s=this._featuresEmpty(),e=this._hasFilterExpressions();this._translations&&(this._toolInfos=[this.mapHidden?void 0:{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},e?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.createFilterModal?this._toggleFilter():this.toggleFilter.emit(),disabled:!1,isOverflow:!1}:void 0,i?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!i,isOverflow:!1}:void 0,this._deleteEnabled?{active:void 0,icon:"trash",indicator:void 0,label:this._translations.delete,func:()=>this._showDelete(),disabled:!t,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!t,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!t,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:()=>this._selectAll(),label:this._translations.selectAll,disabled:s,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:s,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:s,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0)}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){const t=`${this._floorField} = '${this._floorLevel}'`,i=this._layer.definitionExpression;this._layer.definitionExpression=i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):i?`${i} AND (${t})`:t,this._floorExpression=t}}_featuresSelected(){return this.selectedIds.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this._layer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this._layer.id))),t?.length>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,a)=>(s.indexOf(a.id)<0&&(i>t?i-=a.width:e.push(a)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),h.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?e("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},e("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},e("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),e("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>e("calcite-dropdown-group",{class:`${t.disabled?"disabled":""} ${"trash"===t.icon?"delete-red":""}`,selectionMode:"none"},e("calcite-dropdown-item",{disabled:t.loading,iconStart:t.isSublist&&this._showHideOpen?"chevron-down":t.loading?"":t.icon,id:`layer-table-${t.icon}`,onClick:t.func},t.loading?e("div",{class:"display-flex"},e("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_getAction(t,i,s,a,h,o,l,n){const c=void 0===this._layer||o;return e("div",{class:"display-flex",id:this._getId(i),slot:n},e("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:`layer-table-${i}`,indicator:s,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_showDelete(){this._deleteDialogOpen=!0}_getShare(t){return e("div",{class:"share-action",id:this._getId(t)},e("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this.mapInfo?.id?i.searchParams.set("webmap",this.mapInfo.id):i.searchParams.delete("webmap"),this._layer?.id?i.searchParams.set("layer",this._layer.id):i.searchParams.delete("layer"),this.selectedIds?.length>0?i.searchParams.set("oid",this.selectedIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_getToolTip(t,i,s){return document.getElementById(i)?e("calcite-tooltip",{placement:t,"reference-element":i},e("span",null,s)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,s,a){const h=void 0===this._layer||a;return e("div",{class:"display-flex",id:this._getId(t)},"trash"===t?e("delete-button",{buttonType:"action",class:"display-flex",disabled:h,icon:t,id:"solutions-delete",ids:this._getIds(),layer:this._layer,locale:this.locale}):e("calcite-action",{appearance:"solid",disabled:h,id:t,onClick:s,text:i},e("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table?.highlightIds?.toArray()}onTableNodeCreate=t=>{this._tableNode=t};async _getTable(t,i){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}));const t=this.reactiveUtils.watch((()=>this._table.size),(t=>{this._size=t}));this._table.viewModel.addHandles(t)})))}async _handleOnChange(t){const i=[...this._table.highlightIds.toArray()];if(this._skipOnChange)this._skipOnChange=!1;else{if(!this._ctrlIsPressed&&!this._shiftIsPressed||this._selectionFromMap&&this._shiftIsPressed)if(this.selectedIds.length>0){this._skipOnChange=!0;const s=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._clearSelection(),this.selectedIds=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse();else if(this._ctrlIsPressed)this.selectedIds=i.reverse();else if(this._shiftIsPressed&&i?.length>0)if(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...i].reverse()[0],1===i.length)this._skipOnChange=!1;else if(this._previousCurrentId!==this._currentId){const t=this._table.activeSortOrders.reduce(((t,i)=>(t.push(`${i.fieldName} ${i.direction}`),t)),[]),s=await r(0,this._layer,[],t);let e=!1;const a=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),h=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(a<h?a:h)+1!==(h>a?h:a);const o=s.reduce(((t,i)=>{const s=i;return s===this._currentId||s===this._previousCurrentId?(e=!e,t.indexOf(s)<0&&t.push(s)):e&&t.indexOf(s)<0&&t.push(s),t}),[]),l=a<h?o.reverse():o;this.selectedIds=[...new Set([...l,...this.selectedIds])],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._selectionFromMap=!1}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this.selectedIds)}_resetColumnTemplates(){const t=this._getColumnTemplates(this._layer?.id,this._layer?.fields),i=t?.some(((t,i)=>JSON.stringify(this._table?.tableTemplate.columnTemplates[i])!==JSON.stringify(t)));if(this._table&&t&&(i||!this._columnsInfo)){this._table.tableTemplate=new this.TableTemplate({columnTemplates:t});const i=t.map((t=>t.fieldName));this._initColumnsInfo(i)}}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await d(this._layer),this._table)this._table.view=this.mapView,this._table.layer=this._layer;else{const t=this._getColumnTemplates(this._layer.id,this._layer?.fields);await this._getTable(this._tableNode,t)}await this._initLayerRefresh(),this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,await this._table.when(),setTimeout((()=>{this._loaded||(console.log(`table.state: ${this._table.state}`),this.finishLoading())}),1e3),await this.reactiveUtils.once((()=>"loaded"===this._table.state)).then((async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),this._initToolInfos(),this._updateToolbar()}catch(t){console.log(t)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._refreshHandle=this._layer.on("refresh",(t=>{t.dataChanged&&(this._skipOnChange=!0,this._updateAllIds())}))}async _updateAllIds(){this._allIds=await d(this._layer),this.selectedIds=this.selectedIds.filter((t=>this._allIds.indexOf(t)>-1)),await this._refresh()}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=void 0,this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId?.length>0&&this._table){const t=await p(this.defaultGlobalId,this._layer),i=t?.length>0?t.map((t=>t.getObjectId())):void 0;i&&await this._selectDefaultFeature(i),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=void 0,this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(t){const i=this._table?.columns.reduce(((i,s)=>((!t||t?.indexOf(s.name)>-1)&&(i[s.name]=!s.hidden),i)),{}),s=this._table?.columns.map((t=>t.name));(t?t.filter((t=>s.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,s)=>(t[s]=i[s],t)),{}):i}async _selectDefaultFeature(t){t.length>0&&this._table.highlightIds.addMany(t)}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){let t,i=this._layer?.objectIdField,s="desc";this.mapInfo?.layerOptions?.layers?.length>0&&this._layer?.id&&(t=this.mapInfo.layerOptions.layers.filter((t=>t.id===this._layer.id)),t&&t.length>0&&(t=t[0],t.sortField&&t.fields?.includes(t.sortField)&&(i=t.sortField),s=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,s)})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(t){const i=t.target?.id;i.startsWith("layer-table-")?this._moreDropdown.open=!0:this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(i)<0&&"chevron-right"!==i&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_handleKeyUp(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_filterModal(){return e("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},e("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations?.filter?.replace("{{title}}",this._layer?.title)),e("div",{slot:"content"},e("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>{this._handleFilterListReset()},onFilterUpdate:()=>{this._handleFilterUpdate()},ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1})))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(){const t=this._layer.definitionExpression;if(this._floorExpression){const i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=this._definitionExpression!==this._layer.definitionExpression&&(!this._floorExpression||this._layer.definitionExpression!==this._floorExpression),this._updateShareUrl(),await this._searchFullText()}async _closeFilter(){this._filterOpen&&(this._allIds=await d(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},s=await this.mapView.hitTest(t.screenPoint,i);s.results.length>0?(s.results.forEach((t=>{const i=t.graphic.getObjectId();this._table.highlightIds.indexOf(i)<0&&(this._selectionFromMap=!0,this._table.highlightIds.add(i))})),this._showOnlySelected&&this._table.filterBySelection()):this._clearSelection()}_selectAll(){const t=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){this.selectedIds=[],this._table?.highlightIds.removeAll(),this._table?.rowHighlightIds.removeAll(),this._finishOnChange()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){const t=this.mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._filterActive=this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0)).length>0}_switchSelected(){const t=[...this.selectedIds];this._table.highlightIds.removeAll();const i=this._allIds.reduce(((i,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]).sort(((t,i)=>t-i));this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const s=this._table.columns.toArray().reduce(((t,i)=>(i.hidden||t.push(i.name.toLocaleLowerCase()),t)),[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,await f(null,t,!1,!1,!0,s,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((s=>{if(s?.icon===t)return s.loading=i,!0}))}async _refresh(){await this._table.refresh(),this._allIds=await d(this._layer),this.featureSelectionChange.emit(this.selectedIds)}async _zoom(){if(this._layer){const t=await b(this.mapView,this._layer.id);await c(this.selectedIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0;const t=await l(this.mapView,i);t&&await t.when((()=>{this._layer=t,this._getFullTextSearchInfo()}))}this._fetchingData=!1}_getColumnTemplates(t,i){let s;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return s=i,!0}));const e=s?.fields&&s?.fieldOrder?s.fieldOrder.filter((t=>s.fields.indexOf(t)>-1)):void 0;let a;return i&&(a=s&&s?.fields?i.reduce(((t,i)=>{if(s.fields.indexOf(i.name)>-1){const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};t.push(s)}return t}),[]).sort(this._sortFields.bind(this,s?.fieldOrder)):i.map((t=>({type:"field",fieldName:t.name,label:t.alias,menuConfig:this._getMenuConfig(t.name)})))),e?a?.sort(this._sortFields.bind(this,e)):a}_sortFields(t,i,s){return t?.indexOf(i.fieldName)-t.indexOf(s.fieldName)}_getMenuConfig(t){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(t)}}]}}_handleHideClick(t){this._columnsInfo[t]=!1,this._table.hideColumn(t),this._table.tableTemplate.columnTemplates.forEach((i=>{i.fieldName===t&&(i.visible=!1)}))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],defaultOid:["defaultOidWatchHandler"],defaultGlobalId:["defaultGlobalIdWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],enableShare:["enableShareWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],locale:["localeWatchHandler"],mapHidden:["mapHiddenWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],selectedIds:["selectedIdsWatchHandler"]}}};function v(t){return function(t){return-1!==t?.indexOf("http://")}(t)?t.replace(/^http:\/\//,"https://"):t}m.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}';const y=class{constructor(s){t(this,s),this.mapChanged=i(this,"mapChanged",7),this.beforeMapChanged=i(this,"beforeMapChanged",7),this.toggleFilter=i(this,"toggleFilter",7),this.clearSelection=i(this,"clearSelection",7),this.appLayout=void 0,this.appProxies=void 0,this.defaultWebmapId="",this.defaultLayerId=void 0,this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableShare=!1,this.enableSingleExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.locale=void 0,this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this.isMapLayout=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.selectedFeaturesIds=void 0,this.selectedLayer=void 0,this.zoomToScale=void 0,this.onlyShowUpdatableLayers=void 0,this.isMobile=void 0,this.mapInfo=void 0,this._translations=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0,this._showHideOpen=!1,this._toolInfos=void 0,this._controlsThatFit=void 0}get el(){return s(this)}esriConfig;Home;MapView;WebMap;_defaultWebmapHonored=!1;_homeWidget;_loadedId="";_mapDiv;_mapPicker;_mapTools;_moreDropdown;_mapListExpanded=!1;_filterActive=!1;_definitionExpression;_mapLayerPicker;_resizeObserver;_shareNode;_showHideDropdown;_toolbar;_timeout;_toolbarSizeInfos;_defaultVisibleToolSizeInfos;_observerSet=!1;appLayoutWatchHandler(){this._updateShareUrl()}enableHomeWatchHandler(){this._initHome()}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedLayerWatchHandler(){await(this.selectedLayer?.when((async()=>{this._definitionExpression=this.selectedLayer.definitionExpression})))}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(){this._filterActive=this._definitionExpression!==this.selectedLayer.definitionExpression,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.updateLayer()}mapChanged;beforeMapChanged;toggleFilter;clearSelection;async mapInfoChange(t){await this._loadMap(t.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout((()=>{this._initToolInfos()}),50)}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._updateToolbar())))}render(){const t=this.isMapLayout?"display-flex height-49-px":"",i=this.hidden?"visibility-hidden-1":"",s="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",h=this.mapInfos?.length>1||this.isMapLayout?"map-height":"height-full",o=this.isMapLayout?"":"display-none";return this._validateActiveActions(),e(a,{key:"0b617eeb40229e49a32f5e4a557bfa0f88588fae"},e("div",{key:"d93aa32cd31279e468e4570af231a3f3788b9897",class:`${t} width-full`,ref:t=>this._toolbar=t},this._getActionBar(),!this.isMobile&&this.isMapLayout&&this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile&&this.isMapLayout?this._getShare("share"):void 0),e("calcite-progress",{key:"0ac01b19752ded5ddf0b06723b30fa669b2f6933",class:o,value:0}),e("div",{key:"256bc38d71e3de4ab7ba7328ce12c32fa9ef0d2b",class:`${h} ${i}`,ref:t=>this._mapDiv=t}),e("map-tools",{key:"e86f179871e8b315ff8d6ecb87545d9af8222590",basemapConfig:this.basemapConfig,class:`box-shadow ${s}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:this.enableSingleExpand,homeZoomToolsSize:this.homeZoomToolsSize,locale:this.locale,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,position:this.mapWidgetsPosition,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async componentDidRender(){this.isMapLayout&&this._updateToolbar(),document.onclick=t=>this._handleDocumentClick(t)}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),this._updateShareUrl()}async _initModules(){const[t,i,s,e]=await o(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=s,this.esriConfig=e}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,s=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),e=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&s?s[0]:!t?.id&&this.mapInfos.length>0?this.mapInfos[0]:t;const a=this._webMapInfo.id,h=i&&t?.id===this.defaultWebmapId;if(this._loadedId!==a&&!i||h){const t=new this.WebMap({portalItem:{id:a}});this.appProxies&&(await t.load(),await(o=t,l=this.esriConfig,n=this.appProxies,n&&n.forEach((t=>{o.allLayers.forEach((i=>{i&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=v(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=v(t.proxyUrl))}}))}))})),o)),this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"center"}),this._loadedId=a,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!h||this._defaultWebmapHonored,this.mapChanged.emit({id:a,mapView:this.mapView})}))}else i?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(a)):e&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:a,mapView:this.mapView}));var o,l,n;this._updateShareUrl()}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const s=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,a)=>(s.indexOf(a.id)<0&&(i>t?i-=a.width:e.push(a)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||i+o.width<=t)?(e.indexOf(o.id)<0&&(i+=o.width),h.push(o)):s.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,s)}}),250))}_setControlsThatFit(t,i){let s=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const e=document.getElementById("solutions-action-bar");e?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!s&&(s=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),s&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,s)=>{0===s?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionBar(){const t=this.mapInfos?.length>1?"":"display-none",i=this.isMapLayout?"display-flex":"display-block",s=this.isMobile?"border-top":"",a=this.isMapLayout?"":"display-none";return e("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},e("map-picker",{class:t,isMapLayout:this.isMapLayout,locale:this.locale,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),e("div",{class:`mapView-header display-flex ${a}`},e("div",{class:`border-end ${i} ${s}`,id:"solutions-map-layer-picker-container"},this.mapView&&e("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",ref:t=>this._mapLayerPicker=t,scale:"l",selectedIds:this.selectedLayer?[this.selectedLayer.id]:[],showSingleLayerAsLabel:!0,showTables:!0,showTablesDisabled:!0,type:"dropdown"}))),!this.isMobile&&this.isMapLayout?this._getActions():void 0)}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?e("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},e("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},e("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),e("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>e("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:"none"},e("calcite-dropdown-item",{disabled:t.loading,iconStart:t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?e("div",{class:"display-flex"},e("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label)))))):void 0}_getShare(t){return e("div",{class:"share-action",id:this._getId(t)},e("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>{this._shareNode=t,this._updateShareUrl()},scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_closeShowHide(){this._showHideOpen=!1}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_initToolInfos(){const t=this.selectedFeaturesIds?.length>0,i=this._hasFilterExpressions(),s=this.selectedFeaturesIds?.length>1&&!1;this._translations&&(this._toolInfos=[{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},i?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,s?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!s,isOverflow:!1}:void 0,{active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer.refresh(),disabled:!1,isOverflow:!1},{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!t,isOverflow:!1}],this._defaultVisibleToolSizeInfos=void 0)}_validateActiveActions(){const t=["filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&"filter"===i.icon&&(i.indicator=this._filterActive)}))}_validateEnabledActions(){const t=this.selectedFeaturesIds?.length>0,i=this.selectedFeaturesIds?.length>1&&this.selectedLayer?.capabilities?.operations?.supportsUpdate,s=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach((e=>{e&&s.indexOf(e.icon)>-1&&(e.disabled="pencil"===e.icon?!i:!t)}))}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const t="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=t,this._homeWidget.domNode.style.width=t}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_forceShowHide(){this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_handleDocumentClick(t){const i=t.target?.id;"solutions-subset-list"===i?this._moreDropdown.open=!0:this._showHideOpen&&"solutions-subset-list"!==i&&"solutions-more"!==i&&"chevron-down"!==i&&this._moreDropdown&&(this._showHideOpen=!1,this._moreDropdown.open=!1),"MAP-PICKER"===t.target.tagName&&(this._mapListExpanded=!this._mapListExpanded,this._mapPicker.toggle(this._mapListExpanded)),"MAP-PICKER"!==t.target.tagName&&(this._mapListExpanded=!1,this._mapPicker.close())}async _zoom(){if(this.selectedLayer){const t=await b(this.mapView,this.selectedLayer.id);await c(this.selectedFeaturesIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this.selectedLayer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this.selectedLayer.id))),t?.length>0}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getToolTip(t,i,s){return document.getElementById(i)?e("calcite-tooltip",{placement:t,"reference-element":"map-"+i},e("span",null,s)):void 0}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getAction(t,i,s,a,h,o,l,n){const c=void 0===this.selectedLayer||o;return e("div",{class:"display-flex",id:this._getId(i),slot:n},e("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:"map-"+i,indicator:s,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_getId(t){return`solutions-action-${t}`}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableHome:["enableHomeWatchHandler"],enableShare:["enableShareWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],selectedLayer:["selectedLayerWatchHandler"],selectedFeaturesIds:["selectedFeaturesIdsWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"]}}};y.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}.display-block{display:block}";export{u as card_manager,m as layer_table,y as map_card}