@esri/solutions-components 0.8.39 → 0.8.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (273) hide show
  1. package/dist/assets/t9n/solution-spatial-ref/resources.json +3 -3
  2. package/dist/assets/t9n/solution-spatial-ref/resources_en.json +2 -2
  3. package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +2 -2
  4. package/dist/assets/t9n/solution-spatial-ref/resources_he.json +2 -2
  5. package/dist/cjs/_commonjsHelpers-baf43783.js +20 -0
  6. package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -2
  7. package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -2
  8. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +3 -2
  9. package/dist/cjs/calcite-alert_4.cjs.entry.js +7 -6
  10. package/dist/cjs/calcite-block_5.cjs.entry.js +5 -4
  11. package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
  12. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +3 -2
  13. package/dist/cjs/calcite-flow_6.cjs.entry.js +3 -2
  14. package/dist/cjs/calcite-pagination.cjs.entry.js +1 -1
  15. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +9 -8
  16. package/dist/cjs/card-manager_3.cjs.entry.js +6 -5
  17. package/dist/cjs/{common-03600219.js → common-7ee7ad73.js} +1 -1
  18. package/dist/cjs/consent-manager.cjs.entry.js +3 -2
  19. package/dist/cjs/{core-b459e4f2.js → core-7f0bcc12.js} +1 -1
  20. package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -2
  21. package/dist/cjs/crowdsource-reporter.cjs.entry.js +3 -2
  22. package/dist/cjs/{downloadUtils-839a1425.js → downloadUtils-2e169425.js} +7 -7
  23. package/dist/cjs/{esri-loader-fce6a9cb.js → esri-loader-a56cbcbe.js} +2 -13
  24. package/dist/cjs/feature-list.cjs.entry.js +7 -6
  25. package/dist/cjs/{helpers-7cee3150.js → helpers-95c28cf3.js} +1 -1
  26. package/dist/cjs/{html2canvas-ef5cae40.js → html2canvas-29c6b9cc.js} +2 -2
  27. package/dist/cjs/{index.es-dd4d4842.js → index.es-301b8d18.js} +11 -10
  28. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +6 -5
  29. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -2
  30. package/dist/cjs/instant-apps-create.cjs.entry.js +5 -4
  31. package/dist/cjs/instant-apps-export.cjs.entry.js +5 -4
  32. package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
  33. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +5 -4
  34. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -3
  35. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -3
  36. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -3
  37. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -5
  38. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -4
  39. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -6
  40. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -6
  41. package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -4
  42. package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -4
  43. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -4
  44. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +5 -4
  45. package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -4
  46. package/dist/cjs/{languageSwitcher-1154d55d.js → languageSwitcher-f0bb94fa.js} +1 -1
  47. package/dist/cjs/{languageUtil-d23251cd.js → languageUtil-f22ce913.js} +1 -1
  48. package/dist/cjs/layout-manager.cjs.entry.js +3 -2
  49. package/dist/cjs/{loadModules-4189814e.js → loadModules-36d49819.js} +1 -1
  50. package/dist/cjs/loader.cjs.js +1 -1
  51. package/dist/cjs/{locale-62f4cef2.js → locale-708985a1.js} +2 -2
  52. package/dist/cjs/{locale-6973733d.js → locale-f6fd03d2.js} +1 -1
  53. package/dist/cjs/map-select-tools_3.cjs.entry.js +6 -5
  54. package/dist/cjs/{popupUtils-bae7f923.js → popupUtils-36e57a27.js} +2 -2
  55. package/dist/cjs/public-notification.cjs.entry.js +6 -5
  56. package/dist/cjs/{purify-4a0e9dfb.js → purify-17c0fc4a.js} +2 -2
  57. package/dist/cjs/{restHelpersGet-afc74285.js → restHelpersGet-be451f4a.js} +1 -1
  58. package/dist/cjs/solution-configuration.cjs.entry.js +10 -350
  59. package/dist/cjs/solution-contents_3.cjs.entry.js +58 -48
  60. package/dist/cjs/solution-resource-a09a6fe0.js +145 -0
  61. package/dist/cjs/{solution-store-c8bada29.js → solution-store-d9f3ea44.js} +8 -10
  62. package/dist/cjs/solutions-components.cjs.js +1 -1
  63. package/dist/cjs/spatial-ref.cjs.entry.js +6 -5
  64. package/dist/cjs/store-manager.cjs.entry.js +17 -13
  65. package/dist/cjs/templates-f7a3bf48.js +401 -0
  66. package/dist/cjs/{utils-1de4eaa0.js → utils-31a22d49.js} +1 -1
  67. package/dist/collection/components/solution-item/solution-item.js +1 -1
  68. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +11 -1
  69. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +83 -47
  70. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +25 -24
  71. package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
  72. package/dist/collection/components/solution-variables/solution-variables.js +1 -1
  73. package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
  74. package/dist/collection/components/store-manager/store-manager.js +11 -13
  75. package/dist/collection/demos/data/election-outreach.json +2981 -0
  76. package/dist/collection/demos/solution-item.html +7 -6
  77. package/dist/collection/demos/solution-spatial-ref.html +10 -4
  78. package/dist/collection/demos/solution-template-data.html +5 -5
  79. package/dist/collection/utils/interfaces.ts +0 -2
  80. package/dist/collection/utils/solution-store.js +6 -8
  81. package/dist/collection/utils/solution-store.ts +12 -13
  82. package/dist/collection/utils/templates.js +113 -26
  83. package/dist/collection/utils/templates.ts +125 -30
  84. package/dist/collection/utils/test/templates.e2e.js +2 -2
  85. package/dist/collection/utils/test/templates.e2e.ts +2 -2
  86. package/dist/components/_commonjsHelpers.js +16 -0
  87. package/dist/components/core.js +1 -1
  88. package/dist/components/downloadUtils.js +1 -1
  89. package/dist/components/esri-loader.js +2 -10
  90. package/dist/components/html2canvas.js +1 -1
  91. package/dist/components/index.es.js +1 -1
  92. package/dist/components/instant-apps-interactive-legend-classic2.js +1 -1
  93. package/dist/components/pagination.js +1 -1
  94. package/dist/components/purify.js +1 -1
  95. package/dist/components/solution-configuration.js +1 -342
  96. package/dist/components/solution-item2.js +1 -1
  97. package/dist/components/solution-resource.js +1 -1
  98. package/dist/components/solution-spatial-ref2.js +52 -44
  99. package/dist/components/solution-store.js +6 -8
  100. package/dist/components/solution-template-data2.js +1 -1
  101. package/dist/components/solution-variables2.js +1 -1
  102. package/dist/components/spatial-ref2.js +1 -1
  103. package/dist/components/store-manager.js +11 -13
  104. package/dist/components/templates.js +395 -0
  105. package/dist/esm/_commonjsHelpers-089957fe.js +16 -0
  106. package/dist/esm/basemap-gallery_7.entry.js +3 -2
  107. package/dist/esm/buffer-tools_3.entry.js +3 -2
  108. package/dist/esm/calcite-action-pad_2.entry.js +3 -2
  109. package/dist/esm/calcite-alert_4.entry.js +7 -6
  110. package/dist/esm/calcite-block_5.entry.js +5 -4
  111. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  112. package/dist/esm/calcite-dropdown-group_2.entry.js +3 -2
  113. package/dist/esm/calcite-flow_6.entry.js +3 -2
  114. package/dist/esm/calcite-pagination.entry.js +1 -1
  115. package/dist/esm/calcite-shell-panel_14.entry.js +9 -8
  116. package/dist/esm/card-manager_3.entry.js +6 -5
  117. package/dist/esm/{common-8697fccd.js → common-96e3ddb0.js} +1 -1
  118. package/dist/esm/consent-manager.entry.js +3 -2
  119. package/dist/esm/{core-4bd4a70f.js → core-6a3c13ac.js} +1 -1
  120. package/dist/esm/crowdsource-manager.entry.js +3 -2
  121. package/dist/esm/crowdsource-reporter.entry.js +3 -2
  122. package/dist/esm/{downloadUtils-97acca92.js → downloadUtils-5fbd8a40.js} +6 -6
  123. package/dist/esm/{esri-loader-3080dcc0.js → esri-loader-781d738a.js} +2 -10
  124. package/dist/esm/feature-list.entry.js +7 -6
  125. package/dist/esm/{helpers-7c88b974.js → helpers-3d53560f.js} +1 -1
  126. package/dist/esm/{html2canvas-fd387d87.js → html2canvas-6443b68e.js} +1 -1
  127. package/dist/esm/{index.es-ee5497bc.js → index.es-66571353.js} +6 -5
  128. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +6 -5
  129. package/dist/esm/instant-apps-control-panel.entry.js +3 -2
  130. package/dist/esm/instant-apps-create.entry.js +5 -4
  131. package/dist/esm/instant-apps-export.entry.js +5 -4
  132. package/dist/esm/instant-apps-header.entry.js +3 -2
  133. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -3
  134. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -3
  135. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -3
  136. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -3
  137. package/dist/esm/instant-apps-interactive-legend.entry.js +6 -5
  138. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -4
  139. package/dist/esm/instant-apps-language-switcher.entry.js +7 -6
  140. package/dist/esm/instant-apps-language-translator.entry.js +7 -6
  141. package/dist/esm/instant-apps-measurement.entry.js +5 -4
  142. package/dist/esm/instant-apps-popover.entry.js +5 -4
  143. package/dist/esm/instant-apps-scoreboard.entry.js +5 -4
  144. package/dist/esm/instant-apps-sign-in.entry.js +5 -4
  145. package/dist/esm/instant-apps-splash.entry.js +5 -4
  146. package/dist/esm/{languageSwitcher-0f693a04.js → languageSwitcher-b665499d.js} +1 -1
  147. package/dist/esm/{languageUtil-de206286.js → languageUtil-a3e6adf6.js} +1 -1
  148. package/dist/esm/layout-manager.entry.js +3 -2
  149. package/dist/esm/{loadModules-43119ac8.js → loadModules-9c062d08.js} +1 -1
  150. package/dist/esm/loader.js +1 -1
  151. package/dist/esm/{locale-42369411.js → locale-28d48640.js} +1 -1
  152. package/dist/esm/{locale-70630b7c.js → locale-b4e7d56f.js} +2 -2
  153. package/dist/esm/map-select-tools_3.entry.js +6 -5
  154. package/dist/esm/{popupUtils-98ad70f3.js → popupUtils-4a91aa2a.js} +2 -2
  155. package/dist/esm/public-notification.entry.js +6 -5
  156. package/dist/esm/{purify-caded4cd.js → purify-72515357.js} +1 -1
  157. package/dist/esm/{restHelpersGet-dab84057.js → restHelpersGet-5c822bcd.js} +1 -1
  158. package/dist/esm/solution-configuration.entry.js +7 -347
  159. package/dist/esm/solution-contents_3.entry.js +58 -48
  160. package/dist/esm/{solution-resource-a2fff3bf.js → solution-resource-3108caf7.js} +1 -1
  161. package/dist/esm/{solution-store-30a19a45.js → solution-store-1c36ce1d.js} +8 -10
  162. package/dist/esm/solutions-components.js +1 -1
  163. package/dist/esm/spatial-ref.entry.js +6 -5
  164. package/dist/esm/store-manager.entry.js +17 -13
  165. package/dist/esm/templates-824ea028.js +395 -0
  166. package/dist/esm/{utils-9bb48951.js → utils-5484fcbf.js} +1 -1
  167. package/dist/solutions-components/demos/data/election-outreach.json +2981 -0
  168. package/dist/solutions-components/demos/solution-item.html +7 -6
  169. package/dist/solutions-components/demos/solution-spatial-ref.html +10 -4
  170. package/dist/solutions-components/demos/solution-template-data.html +5 -5
  171. package/dist/solutions-components/{p-3eb49703.js → p-00291b93.js} +3 -3
  172. package/dist/solutions-components/p-0cd87dca.entry.js +6 -0
  173. package/dist/solutions-components/p-13404ad7.entry.js +6 -0
  174. package/dist/solutions-components/{p-bf27cd5f.js → p-1c3c83a5.js} +1 -1
  175. package/dist/solutions-components/p-1e6c6ec4.entry.js +6 -0
  176. package/dist/solutions-components/p-219f209e.entry.js +6 -0
  177. package/dist/solutions-components/{p-b1abf15c.entry.js → p-2467b476.entry.js} +3 -3
  178. package/dist/solutions-components/p-295f850a.entry.js +6 -0
  179. package/dist/solutions-components/p-2961c63c.entry.js +6 -0
  180. package/dist/solutions-components/{p-946ee345.js → p-2afdcdfc.js} +2 -2
  181. package/dist/solutions-components/p-2d6d44b5.entry.js +6 -0
  182. package/dist/solutions-components/p-36e199e0.entry.js +6 -0
  183. package/dist/solutions-components/{p-d27ab863.js → p-3d7cff5e.js} +1 -1
  184. package/dist/solutions-components/{p-b2f11718.entry.js → p-3e8562b5.entry.js} +1 -1
  185. package/dist/solutions-components/{p-49250010.js → p-427b4593.js} +1 -1
  186. package/dist/solutions-components/{p-f1ae51dc.js → p-44fea43a.js} +1 -1
  187. package/dist/solutions-components/{p-afd2b67b.entry.js → p-4b27da06.entry.js} +1 -1
  188. package/dist/solutions-components/{p-7fe77355.js → p-5cc6eb18.js} +1 -1
  189. package/dist/solutions-components/p-61f88049.entry.js +6 -0
  190. package/dist/solutions-components/{p-d029b513.js → p-65581d83.js} +1 -1
  191. package/dist/solutions-components/p-6a68306c.js +6 -0
  192. package/dist/solutions-components/p-6c7a990a.entry.js +6 -0
  193. package/dist/solutions-components/p-6e6e6d23.entry.js +6 -0
  194. package/dist/solutions-components/p-7696af8e.entry.js +6 -0
  195. package/dist/solutions-components/{p-7afca6b4.js → p-7d1af07b.js} +1 -1
  196. package/dist/solutions-components/{p-6c7e34c1.entry.js → p-881ead62.entry.js} +2 -2
  197. package/dist/solutions-components/p-90864588.entry.js +6 -0
  198. package/dist/solutions-components/{p-59f016a1.js → p-91142a26.js} +1 -1
  199. package/dist/solutions-components/p-932d6f29.entry.js +6 -0
  200. package/dist/solutions-components/{p-71c212e6.entry.js → p-969828ab.entry.js} +1 -1
  201. package/dist/solutions-components/p-986ee365.entry.js +6 -0
  202. package/dist/solutions-components/p-9e3b0220.entry.js +6 -0
  203. package/dist/solutions-components/{p-7996f123.js → p-a0300d31.js} +1 -1
  204. package/dist/solutions-components/p-a8d62b7d.entry.js +6 -0
  205. package/dist/solutions-components/p-ae50581b.entry.js +6 -0
  206. package/dist/solutions-components/{p-89f6ff72.js → p-af2c8aa9.js} +1 -1
  207. package/dist/solutions-components/p-b7123452.entry.js +6 -0
  208. package/dist/solutions-components/p-b92e9047.entry.js +6 -0
  209. package/dist/solutions-components/p-bb7463ed.entry.js +6 -0
  210. package/dist/solutions-components/p-bbc7dd5e.entry.js +6 -0
  211. package/dist/solutions-components/p-bd871071.entry.js +21 -0
  212. package/dist/solutions-components/p-c6fd40f9.entry.js +6 -0
  213. package/dist/solutions-components/{p-42ea2581.js → p-c742acd9.js} +1 -1
  214. package/dist/solutions-components/p-cb4842dd.entry.js +6 -0
  215. package/dist/solutions-components/{p-bd459df3.entry.js → p-ccd1e256.entry.js} +2 -2
  216. package/dist/solutions-components/p-ce4b6931.entry.js +6 -0
  217. package/dist/solutions-components/p-d2de2b2a.entry.js +6 -0
  218. package/dist/solutions-components/p-d300430b.entry.js +6 -0
  219. package/dist/solutions-components/p-d4056c1c.js +6 -0
  220. package/dist/solutions-components/p-d73b90ab.entry.js +6 -0
  221. package/dist/solutions-components/{p-4e92c1ba.entry.js → p-dae9d5b3.entry.js} +1 -1
  222. package/dist/solutions-components/p-df56c019.entry.js +6 -0
  223. package/dist/solutions-components/p-e80751f4.entry.js +6 -0
  224. package/dist/solutions-components/{p-132b1138.entry.js → p-e8ed3fa6.entry.js} +2 -2
  225. package/dist/solutions-components/{p-1d369231.js → p-eed41e1a.js} +1 -1
  226. package/dist/solutions-components/p-fdd93685.js +22 -0
  227. package/dist/solutions-components/{p-6acf6c8f.js → p-ff87b9de.js} +1 -1
  228. package/dist/solutions-components/{p-c9b22653.js → p-ffd41e25.js} +1 -1
  229. package/dist/solutions-components/solutions-components.esm.js +1 -1
  230. package/dist/solutions-components/utils/interfaces.ts +0 -2
  231. package/dist/solutions-components/utils/solution-store.ts +12 -13
  232. package/dist/solutions-components/utils/templates.ts +125 -30
  233. package/dist/solutions-components/utils/test/templates.e2e.ts +2 -2
  234. package/dist/solutions-components_commit.txt +8 -0
  235. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +21 -25
  236. package/dist/types/components/store-manager/store-manager.d.ts +3 -3
  237. package/dist/types/components.d.ts +10 -2
  238. package/dist/types/utils/templates.d.ts +35 -5
  239. package/package.json +5 -4
  240. package/dist/cjs/solution-resource-ffe3c333.js +0 -145
  241. package/dist/solutions-components/p-11b4cd1a.entry.js +0 -6
  242. package/dist/solutions-components/p-123fcb43.entry.js +0 -6
  243. package/dist/solutions-components/p-12b84e3b.entry.js +0 -36
  244. package/dist/solutions-components/p-1a8f7075.entry.js +0 -6
  245. package/dist/solutions-components/p-2a7111ad.entry.js +0 -6
  246. package/dist/solutions-components/p-36f5dee9.entry.js +0 -6
  247. package/dist/solutions-components/p-52bcd209.entry.js +0 -6
  248. package/dist/solutions-components/p-57961ae0.entry.js +0 -6
  249. package/dist/solutions-components/p-5b2d9899.entry.js +0 -6
  250. package/dist/solutions-components/p-5bd6a732.entry.js +0 -6
  251. package/dist/solutions-components/p-5fb4ddc2.entry.js +0 -6
  252. package/dist/solutions-components/p-622f33ee.entry.js +0 -6
  253. package/dist/solutions-components/p-652140aa.entry.js +0 -6
  254. package/dist/solutions-components/p-6d0404a6.entry.js +0 -6
  255. package/dist/solutions-components/p-789eb1c2.entry.js +0 -6
  256. package/dist/solutions-components/p-7a2f1801.entry.js +0 -6
  257. package/dist/solutions-components/p-7dcf6b16.entry.js +0 -6
  258. package/dist/solutions-components/p-8413a2ae.entry.js +0 -6
  259. package/dist/solutions-components/p-941e55f0.entry.js +0 -6
  260. package/dist/solutions-components/p-9b38e6a0.entry.js +0 -6
  261. package/dist/solutions-components/p-9c1fbf73.entry.js +0 -6
  262. package/dist/solutions-components/p-9d82f0e3.entry.js +0 -6
  263. package/dist/solutions-components/p-9fa1855f.entry.js +0 -6
  264. package/dist/solutions-components/p-a2390bee.entry.js +0 -6
  265. package/dist/solutions-components/p-a805c11f.entry.js +0 -6
  266. package/dist/solutions-components/p-af1c9389.entry.js +0 -6
  267. package/dist/solutions-components/p-b7d060b0.entry.js +0 -6
  268. package/dist/solutions-components/p-c4160bf7.js +0 -6
  269. package/dist/solutions-components/p-da75df88.entry.js +0 -6
  270. package/dist/solutions-components/p-e0277e0b.entry.js +0 -6
  271. package/dist/solutions-components/p-e11a4728.entry.js +0 -6
  272. package/dist/solutions-components/p-e89c05d6.entry.js +0 -6
  273. /package/dist/solutions-components/{p-8ad54f5c.js → p-e3196917.js} +0 -0
@@ -1,6 +0,0 @@
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,a as s,h as e,H as a,g as l}from"./p-fa1ceaf9.js";import{b as o,c as n,a as h}from"./p-c1cf3ebc.js";import{l as c,g as d}from"./p-c9b22653.js";import{e as r,h as p}from"./p-996c1ac5.js";import{s as g}from"./p-c4ddb206.js";import{c as b,r as m}from"./p-3eb49703.js";import"./p-c4160bf7.js";import"./p-8c6d9b5a.js";import"./p-d27ab863.js";import"./p-a230b270.js";import"./p-7996f123.js";const u=class{constructor(s){t(this,s),this.searchConfigurationChange=i(this,"searchConfigurationChange",7),this._onboardingImageUrl="",this._titleValue=void 0,this._numSelected=0,this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.defaultExportTitle="",this.defaultNumLabelsPerPage=6,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.locale=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._exportGraphics=!1,this._addMap=!1,this._addResults=!0,this._addTitle=!1,this._downloadActive=!0,this._exportType=o.PDF,this._fetchingData=!1,this._isMobile=void 0,this._numDuplicates=0,this._pageType=n.LIST,this._saveEnabled=!1,this._selectionSets=[],this._translations=void 0}async mapViewWatchHandler(t){(null==t?void 0:t.popup)&&(this._popupsEnabled=null==t?void 0:t.popup.autoOpenEnabled),this._initSearchConfiguration(this.searchConfiguration)}async watchSearchConfigurationHandler(t,i){const s=JSON.stringify(t);this.mapView&&(s!==JSON.stringify(i)||s&&!this._searchConfiguration)&&(this._searchConfiguration=JSON.parse(s),this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setLineSymbol(t)}async sketchPointSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setPointSymbol(t)}async sketchPolygonSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setPolygonSymbol(t)}async pageTypeWatchHandler(t,i){var s;if(this._checkPopups(),(null===(s=this.mapView)||void 0===s?void 0:s.popup)&&(this.mapView.popupEnabled=t===n.LIST&&this._popupsEnabled),t===n.EXPORT&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._updateExportGraphics(),this._fetchingData=!1),this._clearHighlight(),i!==n.SELECT&&i!==n.REFINE||await this._clearSelection(),i===n.EXPORT&&this._removeExportGraphics(),t!==n.SELECT)return this._highlightFeatures()}selectionSetsChanged(t){this._selectionSets=[...t.detail]}connectedCallback(){this._mediaQuery=window.matchMedia("(max-width: 600px)"),this._mediaQuery.addEventListener("change",(t=>this._setIsMobile(t)))}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initSymbols(),this._onboardingImageUrl=s("../assets/data/images/onboarding.png")}render(){return e(a,{key:"329b485ac7b134bf2ae1758c07a2ca7988706cb5"},e("calcite-shell",{key:"d8280c38878b047cdaa55beb31d8895a420f3661"},e("calcite-action-bar",{key:"a83fcca2612f13b3f0220b3015a96750223f016b",class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:this._isMobile?"footer":"header"},this._getActionGroup("list-check",n.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",n.REFINE,this._translations.refineSelection):null,this._getActionGroup("export",n.EXPORT,this._translations.export)),this._getPage(this._pageType)))}async componentDidLoad(){this._initSearchConfiguration(this.searchConfiguration)}disconnectedCallback(){this._mediaQuery.removeEventListener("change",(t=>this._setIsMobile(t)))}async _initModules(){const[t,i,s]=await c(["esri/geometry/geometryEngine","esri/symbols/support/jsonUtils","esri/Graphic"]);this._geometryEngine=t,this._jsonUtils=i,this.Graphic=s}_initSearchConfiguration(t){this.searchConfiguration&&!this._searchConfiguration&&this.mapView&&(this._searchConfiguration=t,this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(t){this.sketchLineSymbol="simple-line"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(t){this.sketchPointSymbol="simple-marker"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(t){this.sketchPolygonSymbol="simple-fill"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(t){this._isMobile=t.matches}_getActionGroup(t,i,s){return e("calcite-action-group",{class:this.showRefineSelection?"w-1-3":"w-1-2",layout:"horizontal"},e("div",{class:"background-override"},e("calcite-action",{active:this._pageType===i,alignment:"center",class:"width-full height-full",compact:!1,icon:t,id:t,onClick:()=>{this._setPageType(i)},text:""})),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":t},e("span",null,s)))}_setPageType(t){this._pageType=t}_getPage(t){let i;switch(t){case n.LIST:i=this._getListPage();break;case n.SELECT:i=this._getSelectPage();break;case n.EXPORT:i=this._getExportPage();break;case n.REFINE:i=this._getRefinePage()}return i}_getListPage(){const t=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.myLists),this._getNotice(t?this._translations.listHasSetsTip:this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1","word-wrap-anywhere"),t?this._getSelectionSetList():this._getOnboardingImage(),e("div",{class:"display-flex padding-1"},e("calcite-button",{onClick:()=>{this._setPageType(n.SELECT)},width:"full"},e("span",{class:"font-weight-500"},this._translations.add))))}_getOnboardingImage(){return e("div",{class:"display-flex padding-sides-1"},e("img",{class:"img-container",role:"presentation",src:this._onboardingImageUrl}))}_getSelectionSetList(){return e("div",{class:"padding-top-1-2 padding-bottom-1-2"},e("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((t,i,s)=>{var a;const l=this._getSelectionSetIds(i);let o=!0;return i.workflowType===h.REFINE&&(o=Object.keys(i.refineInfos).reduce(((t,s)=>{const e=i.refineInfos[s];return t+(e.addIds.length+e.removeIds.length)}),0)>0),o&&t.push(e("calcite-list-item",{label:i.label,onClick:()=>this._gotoSelection(i,this.mapView)},e("div",{slot:"content"},e("div",{class:"list-label"},i.label),e("div",{class:"list-description"},null===(a=null==i?void 0:i.layerView)||void 0===a?void 0:a.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",l.length.toString()))),this._getAction(!0,"pencil","",(t=>this._openSelection(i,t)),!1,"actions-end"),this._getAction(!0,"x","",(t=>this._deleteSelection(s,t)),!1,"actions-end"))),t}),[])))}_getSelectionSetIds(t){return t.workflowType!==h.REFINE?t.selectedIds:Object.keys(t.refineInfos).reduce(((i,s)=>[...i,...t.refineInfos[s].addIds]),[])}_hasSelections(t=!1){let i=[];const s=this._selectionSets.some((t=>{if(t.workflowType===h.REFINE)return i=this._getSelectionSetIds(t),!0}));return t&&s?i.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){const t=this._getExportInfos(),i=await b(this.mapView.map,t),s=m(i);return i.length-s.length}_getExportInfos(){return this._selectionSets.reduce(((t,i)=>(i.download&&(i.workflowType!==h.REFINE?this._updateIds(i.layerView.layer.id,i.layerView,i.selectedIds,t):Object.keys(i.refineInfos).forEach((s=>{const e=i.refineInfos[s];e.addIds.length>0&&this._updateIds(s,e.layerView,e.addIds,t)}))),t)),{})}_updateIds(t,i,s,e){return e[t]?e[t].ids=e[t].ids.concat(s):e[t]={layerView:i,ids:s},e}_getSelectPage(){const t=this._translations.selectSearchTip;return e("calcite-panel",null,this._getLabel(this._translations.stepTwoFull,!0),this._getNotice(t,"padding-1","word-wrap-anywhere"),e("div",null,e("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",customLabelEnabled:this.customLabelEnabled,defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.addresseeLayerIds,isUpdate:!!this._activeSelection,locale:this.locale,mapView:this.mapView,noResultText:this.noResultText,onSelectionSetChange:t=>this._updateForSelection(t),ref:t=>{this._selectTools=t},searchConfiguration:this._searchConfiguration,selectionLayerIds:this.selectionLayerIds,selectionSet:this._activeSelection,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getExportPage(){const t=this._hasSelections(this.showRefineSelection),i=this._numDuplicates>0?"display-block":"display-none";return e("calcite-panel",null,e("div",null,this._getLabel(this._translations.export,!1),t?e("div",null,this._getNotice(this._translations.exportTip,"padding-sides-1"),this._getLabel(this._translations.exportListsLabel),this._getExportSelectionLists(),e("div",{class:"padding-sides-1 "+i},e("div",{class:"display-flex"},e("calcite-label",{layout:"inline"},e("calcite-checkbox",{ref:t=>{this._removeDuplicates=t}}),e("div",{class:"display-flex"},this._translations.removeDuplicate,e("div",{class:"info-message padding-start-1-2"},e("calcite-input-message",{class:"info-blue margin-top-0",scale:"m"},` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`)))),e("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale.toLowerCase()),icon:"question",id:"remove-duplicates-icon",scale:"s"})),e("calcite-popover",{closable:!0,label:"",referenceElement:"remove-duplicates-icon"},e("span",{class:"tooltip-message"},this._translations.duplicatesTip))),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("calcite-segmented-control",{class:"w-100",onCalciteSegmentedControlChange:t=>this._exportTypeChange(t),width:"full"},e("calcite-segmented-control-item",{checked:this._exportType===o.PDF,class:"w-50 end-border",value:o.PDF},e("span",{class:"font-weight-500"},this._translations.pdf)),e("calcite-segmented-control-item",{checked:this._exportType===o.CSV,class:"w-50",value:o.CSV},e("span",{class:"font-weight-500"},this._translations.csv)))),e("div",{class:"padding-bottom-1"},this._getExportOptions()),e("div",{class:"padding-1 display-flex"},e("calcite-button",{disabled:!this._downloadActive||this._fetchingData||!this._addMap&&!this._addResults,loading:this._fetchingData,onClick:()=>{this._export()},width:"full"},e("span",{class:"font-weight-500"},this._translations.export)))):this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")))}_exportTypeChange(t){this._exportType=t.target.value}_getExportOptions(){const t=this._addTitle?"display-block":"display-none",i=this._addMap?"display-flex":"display-none",s=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"",a=this._addResults?"":"display-none";return e("div",{class:this._exportType===o.PDF?"display-block":"display-none"},this._getLabel(this._translations.pdfOptions,!0),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addResults,onCalciteCheckboxChange:()=>this._addResults=!this._addResults}),this._translations.addResults)),e("div",{class:`padding-top-sides-1 ${a}`},e("calcite-label",{class:"label-margin-0"},this._translations.selectPDFLabelOption)),e("div",{class:`padding-sides-1 ${a}`},e("pdf-download",{defaultNumLabelsPerPage:parseInt(this.defaultNumLabelsPerPage.toString(),10),disabled:!this._downloadActive,ref:t=>{this._downloadTools=t}})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addTitle,onCalciteCheckboxChange:()=>this._addTitle=!this._addTitle}),this._translations.title)),e("div",{class:t},this._getLabel(this._translations.title,!0,""),e("calcite-input-text",{class:"padding-sides-1",onCalciteInputTextInput:()=>this._changeTitle(),placeholder:this._translations.titlePlaceholder,ref:t=>{this._titleElement=t},value:s})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addMap,onCalciteCheckboxChange:()=>this._handleAddMapChange()}),this._translations.includeMap)),e("div",{class:`padding-top-sides-1 ${i}`},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._exportGraphics,onCalciteCheckboxChange:()=>this._handleExportGraphicsChange()}),this._translations.listGraphics),e("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale.toLowerCase()),icon:"question",id:"list-graphics-icon",scale:"s"}),e("calcite-popover",{closable:!0,label:"",referenceElement:"list-graphics-icon"},e("span",{class:"tooltip-message"},this._translations.listGraphicsTip))))}_handleAddMapChange(){this._addMap=!this._addMap,this._updateExportGraphics()}_handleExportGraphicsChange(){this._exportGraphics=!this._exportGraphics,this._updateExportGraphics()}_getManagedLayer(t){let i;return Object.keys(g.managedLayers).some((s=>{const e=this.mapView.map.layers.findIndex((t=>t.title===s));if(g.managedLayers[s]===t)return i=this.mapView.map.layers.getItemAt(e),!0})),i}_updateExportGraphics(t=!1){!t&&this._exportGraphics&&this._addMap||this._removeExportGraphics(),this._exportGraphics&&this._addMap&&this._addExportGraphics()}_removeExportGraphics(){const t=this._getManagedLayer("sketch"),i=this._getManagedLayer("buffer");t&&t.graphics.removeAll(),i&&i.graphics.removeAll()}_addExportGraphics(){const t=this._getManagedLayer("sketch"),i=this._getManagedLayer("buffer");this._selectionSets.forEach((s=>{if(s.download&&(t&&t.graphics.add(s.sketchGraphic),i)){const t=new this.Graphic({geometry:s.buffer,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});i.graphics.add(t)}}))}_getRefinePage(){const t=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.refineSelection),t?e("div",null,this._getNotice(this._translations.refineTip,"padding-sides-1"),e("refine-selection",{enabledLayerIds:this.selectionLayerIds,locale:this.locale,mapView:this.mapView,selectionSets:this._selectionSets,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})):this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1"))}_getPageNavButtons(t,i,s,a,l,o){return e("div",{class:"padding-bottom-1"},e("div",{class:"display-flex padding-top-sides-1"},e("calcite-button",{disabled:i,onClick:s,width:"full"},e("span",{class:"font-weight-500"},t))),e("div",{class:"display-flex padding-top-1-2 padding-sides-1"},e("calcite-button",{appearance:"outline",disabled:l,onClick:o,width:"full"},e("span",{class:"font-weight-500"},a))))}_changeTitle(){this._titleValue=this._titleElement.value}_getNotice(t,i="padding-1",s=""){return e("calcite-notice",{class:i,icon:"lightbulb",kind:"success",open:!0},e("div",{class:s,slot:"message"},t))}_getLabel(t,i=!1,s="font-bold"){return e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:s+=i?" label-margin-0":""},t))}_getExportSelectionLists(){return this._selectionSets.reduce(((t,i)=>{var s;const a=this._getSelectionSetIds(i),l=i.workflowType!==h.REFINE||a.length>0;return!this._downloadActive&&i.download&&l&&(this._downloadActive=!0),l&&t.push(e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-checkbox",{checked:i.download,class:"align-center",onClick:()=>{this._toggleDownload(i.id)}}),e("calcite-list",{class:"list-border margin-start-1-2 width-full",id:"download-list"},e("calcite-list-item",{disabled:!i.download,label:i.label,onClick:()=>{this._toggleDownload(i.id)}},e("div",{slot:"content"},e("div",{class:"list-label"},i.label),e("div",{class:"list-description"},null===(s=null==i?void 0:i.layerView)||void 0===s?void 0:s.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",a.length.toString()))))))),t}),[])||e("div",null)}async _toggleDownload(t){let i=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===t?!s.download:s.download,i=!!s.download||i,s))),this._updateExportGraphics(!0),this._downloadActive=i,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _export(){const t=this._addResults?this._getSelectionIdsAndViews(this._selectionSets,!0):{};if(this._exportType===o.PDF){let i="";if(this._addMap&&this.mapView){const t=await this.mapView.takeScreenshot({width:1500,height:2e3});i=null==t?void 0:t.dataUrl}this._fetchingData=!0,await this._downloadTools.downloadPDF(this.mapView.map,t,this._removeDuplicates.checked,this._addTitle?this._titleElement.value:"",i),this._fetchingData=!1}this._exportType===o.CSV&&(this._fetchingData=!0,await this._downloadTools.downloadCSV(this.mapView.map,t,this._removeDuplicates.checked),this._fetchingData=!1)}_getSelectionIdsAndViews(t,i=!1){return(i?t.filter((t=>t.download)):t).reduce(((t,i)=>{var s;if(i.workflowType===h.REFINE)Object.keys(i.refineInfos).forEach((s=>{const e=i.refineInfos[s];e.addIds&&(t=this._updateExportInfos(t,e.layerView.layer.id,i.label,e.addIds,e.layerView))}));else{const e=null===(s=null==i?void 0:i.layerView)||void 0===s?void 0:s.layer.id;t=this._updateExportInfos(t,e,i.label,i.selectedIds,i.layerView)}return t}),{})}_updateExportInfos(t,i,s,e,a){return i&&Object.keys(t).indexOf(i)>-1?(t[i].ids=[...new Set([...t[i].ids,...e])],t[i].selectionSetNames.push(s)):i&&(t[i]={ids:e,layerView:a,selectionSetNames:[s]}),t}_getAction(t,i,s,a,l=!1,o=""){return e("calcite-action",{disabled:!t,icon:i,iconFlipRtl:!0,indicator:l,onClick:a,slot:o,text:s})}_updateForSelection(t){this._numSelected=t.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType(n.LIST)}async _saveSelection(){var t,i;const s=await(null===(t=this._selectTools)||void 0===t?void 0:t.getSelection()),e=null===(i=this._selectTools)||void 0===i?void 0:i.isUpdate;return this._selectionSets=e?this._selectionSets.map((t=>t.id===s.id?s:t)):[...this._selectionSets,s],this._home()}async _clearSelection(){var t;await(null===(t=this._selectTools)||void 0===t?void 0:t.clearSelection()),this._numSelected=0,this._activeSelection=void 0}_deleteSelection(t,i){return i.stopPropagation(),this._selectionSets=this._selectionSets.filter(((i,s)=>{if(s!==t)return i})),this._highlightFeatures()}_gotoSelection(t,i){r(t.selectedIds,t.layerView,i,this.featureHighlightEnabled,this.featureEffect)}_openSelection(t,i){i.stopPropagation(),this._activeSelection=t,this._pageType=t.workflowType===h.REFINE?n.REFINE:n.SELECT}async _highlightFeatures(){this._clearHighlight();const t=this._getSelectionIdsAndViews(this._selectionSets,this._pageType===n.EXPORT),i=Object.keys(t);if(i.length>0)for(let s=0;s<i.length;s++){const e=t[i[s]];g.highlightHandles.push(await p(e.ids,e.layerView,this.mapView))}}_checkPopups(){var t;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(t=this.mapView)||void 0===t?void 0:t.popupEnabled)}_clearHighlight(){g&&g.highlightHandles&&g.removeHandles()}async _getTranslations(){const t=await d(this.el);this._translations=t[0]}get el(){return l(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"],sketchLineSymbol:["sketchLineSymbolWatchHandler"],sketchPointSymbol:["sketchPointSymbolWatchHandler"],sketchPolygonSymbol:["sketchPolygonSymbolWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};u.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.padding-top-1-2{padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-bottom-1-2{padding-bottom:.5rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-start-1-2{padding-inline-start:0.5rem}.list-border{border:1px solid var(--calcite-color-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-color-foreground-2)}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-color-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:0.125rem;color:var(--calcite-color-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-color-foreground-3:var(--calcite-color-brand);--calcite-color-foreground-2:var(--calcite-color-brand-hover);--calcite-color-text-1:var(--calcite-color-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}';export{u as public_notification}
@@ -1,6 +0,0 @@
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 s,h as i,H as o,g as e}from"./p-fa1ceaf9.js";import{l as n}from"./p-d029b513.js";import{b as a}from"./p-49250010.js";import{w as r}from"./p-04674a1e.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const l="instant-apps-scoreboard",d=`${l}--`,c=`${l}__`,p=r.medium[1],h={BASE:l,itemsContainer:`${c}items-container`,items:`${c}items`,item:`${c}item`,label:`${c}item-label`,value:`${c}item-value`,valuePlaceholder:`${c}item-value-placeholder`,position:{bottom:`${c}position--bottom`,side:`${c}position--side`,left:`${c}position--left`,right:`${c}position--right`},mode:{floating:`${c}mode--floating`,pinned:`${c}mode--pinned`}},b=class{constructor(i){t(this,i),this.scoreboardItemsUpdated=s(this,"scoreboardItemsUpdated",7),this.view=void 0,this.items=void 0,this.position="bottom",this.mode="floating",this.itemLimit=6,this.autoDockEnabled=!0,this.geometry=null,this.state="loading",this.messages=void 0,this.itemIndex=0,this.layers=void 0,this.layerViews=void 0,this.isMobile=!1}scoreboardItemsUpdatedHandler(){this.scoreboardItemsUpdated.emit(this.items)}generateUIDs(){this.itemIndex=0,this.items.forEach(this.generateUID())}async storeLayers(){this.state="calculating",await this.view.map.loadAll();const t=this.items.map((t=>{var s;return null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.id}));this.layers=this.view.map.allLayers.filter((s=>(s=>(t=>!t.isTable)(s)&&(t=>"feature"===t.type||"scene"===t.type)(s)&&(s=>t.indexOf(s.id)>-1)(s))(s))),this.watchLayerVisibility()}async storeLayerViews(){if(this.layers&&this.layers.length>0){this.layers.forEach((t=>t.outFields=["*"]));const t=[];this.layers.forEach((s=>{const i=this.view.whenLayerView(s);t.push(i)}));const s=(await Promise.allSettled(t)).filter((t=>"fulfilled"==t.status&&t.value)).map((t=>t.value)),i=[];s.forEach((t=>{var s;return i.push(null===(s=this.reactiveUtils)||void 0===s?void 0:s.whenOnce((()=>!t.updating)))})),await Promise.all(i),this.layerViews=new this.Collection([...s])}}calculateScoreboardItemValuesFromGeometry(){this.calculateScoreboardItemValues()}async calculateScoreboardItemValues(){if(this.layers&&0===this.layers.length||this.layerViews&&0===this.layerViews.length)return;this.state="calculating";const t=[...this.items],s=[];this.queryStatDefinitions(t,s);const i=await Promise.all(s);this.handleQueryFeaturesResponses(i,t),this.items.length=0,t.forEach((t=>this.items.push(t))),this.state="complete",this.scoreboardItemsUpdatedHandler(),this.initStationaryWatcher()}async componentWillLoad(){var t;new ResizeObserver((()=>{this.itemIndex=0,this.autoDockEnabled&&(this.isMobile=!!this.checkMobile)})).observe(null===(t=this.el)||void 0===t?void 0:t.parentElement);try{this.state="loading",await this.initMessages()}catch(t){return this.state="disabled",Promise.reject()}finally{if(!this.view||!this.items)return this.state="disabled",Promise.reject();try{return await this.initModules(),Promise.resolve()}catch(t){return this.state="disabled",Promise.reject()}}}async componentDidLoad(){var t;if("disabled"!==this.state)try{await(null===(t=this.reactiveUtils)||void 0===t?void 0:t.whenOnce((()=>{var t;return null===(t=this.view)||void 0===t?void 0:t.ready}))),this.generateUIDs(),await this.loadMapResources(),this.storeLayers(),this.initViewUpdateWatcher()}catch(t){this.state="disabled",console.error(`${l}: FAILED TO LOAD MAP RESOURCES`)}}disconnectedCallback(){var t,s,i,o,e,n;this.state="disabled",this.itemIndex=0,null===(t=this.layers)||void 0===t||t.removeAll(),null===(s=this.layers)||void 0===s||s.destroy(),this.layers=null,null===(i=this.layerViews)||void 0===i||i.removeAll(),null===(o=this.layerViews)||void 0===o||o.destroy(),this.layerViews=null,null===(e=this.handles)||void 0===e||e.removeAll(),null===(n=this.handles)||void 0===n||n.destroy(),this.handles=null}async initMessages(){let t;try{return t=(await a(this.el))[0],this.messages=Object.assign(Object.assign({},this.messages),t),Promise.resolve()}catch(t){console.error("FAILED TO LOAD MESSAGES"),Promise.reject()}}async initModules(){try{const[t,s,i,o]=await n(["esri/core/Handles","esri/core/reactiveUtils","esri/core/Collection","esri/intl"]);return this.reactiveUtils=s,this.Collection=i,this.intl=o,this.handles=new t,this.layers=new i,this.layerViews=new i,Promise.resolve()}catch(t){return console.error(t),this.state="disabled",Promise.reject()}}async loadMapResources(){const{map:t}=this.view,s=t;try{return await s.loadAll(),Promise.resolve()}catch(t){return console.error(t),this.state="disabled",Promise.reject()}}generateUID(){return t=>{const s=Math.random(),i=Math.floor(10*Math.random())+11,o=s.toString(i).replace("0.","");t.uid=o}}render(){var t,s;const{state:e}=this,n="disabled"===e,a="loading"===e||"calculating"===e||(null===(t=this.view)||void 0===t?void 0:t.updating)?this.renderProgress():null;return i(o,{key:"b74bee3afeabbef6595bfe6662ad69cf89b189a3",class:`${this.getPositionClass} ${this.getStyleClass}`},n?null:[a,(null===(s=this.items)||void 0===s?void 0:s.length)>0?this.renderBase():null])}renderBase(){return i("div",{key:"instant-apps-scoreboard-base",class:l},this.renderContent())}renderContent(){const{state:t}=this;return"loading"===t?this.renderLoader():"calculating"===t||"complete"===t?this.renderItemsContainer():null}renderItemsContainer(){const[t,s]=this.renderPreviousNextButtons();return i("div",{class:h.itemsContainer},t,this.renderItems(),s)}renderPreviousNextButtons(){var t,s,o;const e=this.getItemLimit(),n=(null===(t=this.items.filter((t=>t.visible)))||void 0===t?void 0:t.length)<=e,a=0===this.itemIndex,r=this.isEnd,l=!!this.isMobile||"bottom"===this.position,d=l?"start":"center",c={previous:l?"chevron-left":"chevron-up",next:l?"chevron-right":"chevron-down"},p=a||n?"blank":c.previous,h=r||n?"blank":c.next,b={previous:a||n,next:r||n},u="transparent",m=this.isMobile?"s":"l",v={previous:null===(s=this.messages)||void 0===s?void 0:s.previous,next:null===(o=this.messages)||void 0===o?void 0:o.next};return[i("calcite-action",{onClick:this.previousItem.bind(this),icon:p,disabled:b.previous,alignment:d,scale:m,appearance:u,text:v.previous,label:v.previous}),i("calcite-action",{onClick:this.nextItem.bind(this),icon:h,disabled:b.next,alignment:d,scale:m,appearance:u,text:v.next,label:v.next})]}renderItems(){const{items:t}=h,s=this.getItemsToDisplay.map((t=>this.renderItem(t)));return i("ul",{class:t},s)}renderItem(t){const{label:s}=t;return i("li",{class:h.item},i("span",{class:h.label,title:s},s),this.renderValue(t))}renderValue(t){var s,o,e;const{displayValue:n}=t,a="disabled"===this.state,r=void 0===n&&"calculating"===this.state,l=n||(null===(s=this.messages)||void 0===s?void 0:s.NA),d=null===(o=this.layers)||void 0===o?void 0:o.find((s=>{var i;return(null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.id)===s.id})),c=!(null==d?void 0:d.visible),p=r?this.renderValuePlaceholder():a?"":c?i("calcite-icon",{icon:"view-hide",scale:"l",title:null===(e=this.messages)||void 0===e?void 0:e.layerVisibilityOff}):l;return i("span",{class:h.value},p)}renderValuePlaceholder(){return i("span",{class:h.valuePlaceholder})}renderProgress(){return i("calcite-progress",{key:`${d}calcite-progress`,type:"indeterminate"})}renderLoader(){var t;const s=null===(t=this.messages)||void 0===t?void 0:t.loading;return i("calcite-loader",{key:`${d}calcite-loader`,label:s,text:s,scale:"m"})}get getPositionClass(){const{bottom:t,left:s,right:i,side:o}=h.position;return this.isMobile||"bottom"===this.position?t:`${"left"===this.position?s:i} ${o}`}get getStyleClass(){const{floating:t,pinned:s}=h.mode;return this.isMobile?s:"floating"===this.mode?t:s}get checkMobile(){var t,s;const i=null===(s=null===(t=this.el)||void 0===t?void 0:t.parentElement)||void 0===s?void 0:s.offsetWidth;return!isNaN(i)&&i>0&&i<p}get getItemsToDisplay(){const t=this.getItemLimit();return this.items.filter((t=>t.visible)).slice(this.itemIndex,t+this.itemIndex)}get isEnd(){const t=this.getItemLimit(),s=this.items.slice(this.items.length-t).map((t=>t.uid)),i=this.items.slice(this.itemIndex,this.itemIndex+t).map((t=>t.uid));return s.every(((t,s)=>t===i[s]))}previousItem(){this.itemIndex=this.itemIndex-1}nextItem(){this.itemIndex=this.itemIndex+1}queryStatDefinitions(t,s){const i=(t,s)=>{const i=t.createQuery(),o=this.geometry?this.geometry:this.view.extent;return i.outStatistics=[s],i.geometry=o,i};t.forEach((()=>async t=>{var o;const e=null===(o=this.layerViews)||void 0===o?void 0:o.find((s=>{var i;return s.layer.id===(null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.id)}));if(!e)return;const n=(t=>{const{field:s,operation:i}=t;return{onStatisticField:s,outStatisticFieldName:`${s}_${i}`,statisticType:i}})(t),a=i(e,n),r=e.queryFeatures(a);s.push(r)})())}handleQueryFeaturesResponses(t,s){t.forEach((()=>(t,i)=>{const o=(t=>{const s=t.features[0],{attributes:i}=s;return Object.values(i)[0]})(t),e=null!==o,n=e?this.intl.formatNumber(o,{notation:"compact",compactDisplay:"short"}):null;s[i].displayValue=e?`${n}`:"",s[i].value=o})())}initStationaryWatcher(){var t,s;const i={once:!0,initial:!0},o=()=>{var t;return null===(t=this.reactiveUtils)||void 0===t?void 0:t.when((()=>{var t;return!(null===(t=this.view)||void 0===t?void 0:t.interacting)}),(()=>this.calculateScoreboardItemValues()),i)},e="stationary-watcher-key";(null===(t=this.handles)||void 0===t?void 0:t.has(e))&&this.handles.remove(e),null===(s=this.handles)||void 0===s||s.add((()=>{var t;return null===(t=this.reactiveUtils)||void 0===t?void 0:t.when((()=>{var t;return null===(t=this.view)||void 0===t?void 0:t.stationary}),(()=>o()))})(),e)}initViewUpdateWatcher(){return this.reactiveUtils.watch((()=>{var t;return null===(t=this.view)||void 0===t?void 0:t.updating}),(()=>{this.reactiveUtils.when((()=>{var t;return!(null===(t=this.view)||void 0===t?void 0:t.updating)}),(()=>this.calculateScoreboardItemValues()),{once:!0,initial:!0})}),{initial:!0})}watchLayerVisibility(){var t,s;if(!this.layers)return;const i="visbilityWatcherKey";null===(t=this.handles)||void 0===t||t.remove(i);const o=[];this.layers.forEach((t=>{const s=async()=>{const s=await this.view.whenLayerView(t);await this.reactiveUtils.whenOnce((()=>!1===(null==s?void 0:s.updating))),this.calculateScoreboardItemValues()},i=this.reactiveUtils.watch((()=>null==t?void 0:t.visible),(async()=>s()));o.push(i)})),null===(s=this.handles)||void 0===s||s.add([...o],i)}getItemLimit(){return this.itemLimit<2||this.itemLimit>6?6:this.itemLimit}get el(){return e(this)}static get watchers(){return{items:["generateUIDs","storeLayers"],layers:["storeLayerViews"],geometry:["calculateScoreboardItemValuesFromGeometry"],layerViews:["calculateScoreboardItemValues"]}}};b.style=":host{display:block;--instant-apps-scoreboard-background-color:var(--calcite-color-foreground-1);--instant-apps-scoreboard-text-color:var(--calcite-color-text-1);--instant-apps-scoreboard-mobile-position-bottom:0;background-color:var(--instant-apps-scoreboard-background-color);color:var(--instant-apps-scoreboard-text-color)}:host .instant-apps-scoreboard{box-sizing:border-box;border:1px solid var(--calcite-color-border-1);box-shadow:0px 3px 15px rgba(0, 0, 0, 0.2);border-radius:3px}:host .instant-apps-scoreboard calcite-loader{--calcite-loader-padding:1rem}:host .instant-apps-scoreboard__items-container{display:flex}:host .instant-apps-scoreboard__items-container calcite-action{height:100%}:host .instant-apps-scoreboard__items,:host .instant-apps-scoreboard__item{box-sizing:border-box;display:flex}:host .instant-apps-scoreboard__items{list-style-type:none;padding-left:0;margin:0;padding-top:1.75%;padding-bottom:1.75%;width:100%}:host .instant-apps-scoreboard__item{flex-direction:column;justify-content:flex-end;align-items:center;padding:1%}:host .instant-apps-scoreboard__item-label{box-sizing:border-box;line-height:24px;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;word-break:break-word;font-size:1rem;font-weight:400;text-align:center}:host .instant-apps-scoreboard__item-value{display:flex;justify-content:center;align-items:center;min-width:32px;min-height:32px;margin-top:5px;font-size:1.5rem;font-weight:900}:host .instant-apps-scoreboard__item-value-placeholder{display:inline-block;width:32px;height:32px;background-color:var(--calcite-color-foreground-3);border-radius:4px}:host(.instant-apps-scoreboard__position--bottom){bottom:0}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__items{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__item{min-width:10vw;vertical-align:top}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating){left:50%;max-width:calc(100% - 30px);transform:translate(-50%, -15px)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:25vw}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){left:unset;bottom:0;transform:unset;width:100%}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{min-width:unset}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{width:100%;justify-content:space-between}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard{display:flex;justify-content:center;align-items:center;width:10vw;overflow-y:auto}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container{flex-direction:column;height:100%;box-sizing:border-box}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container calcite-action{height:unset;width:100%}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items{flex-direction:column;padding:10px}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__item{padding-top:0.5vh;padding-bottom:0.5vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating){top:15px;left:15px;max-height:calc(100% - 30px)}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:10vw;min-height:35vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned){top:unset;left:unset;transform:unset;height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{justify-content:space-between}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--floating){left:15px}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--floating){left:unset;right:15px}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--pinned){left:0}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--pinned){left:unset;right:0}@media only screen and (min-width: 992px){:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){bottom:var(--instant-apps-scoreboard-mobile-position-bottom)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__item{justify-content:center;min-width:unset;flex-grow:1}}";export{b as instant_apps_scoreboard}
@@ -1,6 +0,0 @@
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 i,c as t,h as e,H as s,g as o}from"./p-fa1ceaf9.js";import{g as h}from"./p-c9b22653.js";import{E as l}from"./p-c1cf3ebc.js";import{g as a}from"./p-996c1ac5.js";import"./p-c4160bf7.js";const n=class{constructor(e){i(this,e),this.showIntroductionWindow=t(this,"showIntroductionWindow",7),this.showCoverPage=t(this,"showCoverPage",7),this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._hideMapOnLoadHonored=!1,this._shouldSetMapView=!1,this.appProxies=void 0,this.basemapConfig=void 0,this.coverPageEnabled=void 0,this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableInlineEdit=!1,this.enableLegend=!0,this.enableSearch=!0,this.enableShare=!1,this.enableZoom=!0,this.hideMapOnLoad=!1,this.mapInfos=[],this.onlyShowUpdatableLayers=!0,this.popupHeaderColor=void 0,this.popupHeaderHoverColor=void 0,this.popupHeaderHoverTextColor=void 0,this.popupHeaderTextColor=void 0,this.searchConfiguration=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.zoomToScale=void 0,this._expandPopup=!1,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=void 0,this._layer=void 0,this._layoutMode=l.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._tableOnly=!1}enableZoomWatchHandler(){this._initMapZoom()}hideMapOnLoadWatchHandler(){this.showHideMapPopupAndTable(this.hideMapOnLoad&&!this._isMobile),this._expandPopup=this.hideMapOnLoad&&!this._isMobile}mapInfosWatchHandler(){console.log("mapInfosWatchHandler"),console.log(this.mapInfos)}async featureSelectionChange(i){var t;this._numSelected=null===(t=i.detail)||void 0===t?void 0:t.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async idsFound(i){const t=i.detail;this._tableOnly=t.tableIds.length>0&&0===t.layerIds.length,this._tableOnly&&(this._expandPopup=!0)}async layoutChanged(i){this._layoutMode=i.detail}async mapChanged(i){this._mapChange=i.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async beforeMapChanged(){this._expandPopup&&(this._shouldSetMapView=!0)}async layerSelectionChange(i){const t=i.detail[0],e=await a(this._mapView,t);await e.when((()=>{this._layer=e}))}async mapInfoChange(){this._expandPopup=this.hideMapOnLoad&&!this._isMobile,this._hideMapOnLoadHonored=!1}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return e(s,{key:"09154a91e9c1ca9ee6fffcc9d15f6488d1572429"},e("calcite-shell",{key:"78268044775861d16a557d7e95678614c3be90c8",class:"position-relative"},e("calcite-panel",{key:"2efe00d79d9c939400bc13558e8ad89a06ae68ab",class:"width-full height-full "+(this.popupHeaderColor&&"#FFFFFF"!==this.popupHeaderColor?"border-width-0":"")},this._getBody(this._layoutMode,this._panelOpen,this._hideTable)),this._getFooter()))}async componentDidRender(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el)}_getFooter(){var i,t,s,o;const h=(null===(i=this._layer)||void 0===i?void 0:i.editingEnabled)&&(null===(o=null===(s=null===(t=this._layer)||void 0===t?void 0:t.capabilities)||void 0===s?void 0:s.operations)||void 0===o?void 0:o.supportsDelete);return this._isMobile&&this._numSelected>0&&!this._hideFooter?e("div",{class:"width-100",slot:"footer"},e("div",{class:"display-flex padding-1-2"},e("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),h?e("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer}):void 0)):void 0}_getDividerIcon(i,t){let e="";switch(i){case l.HORIZONTAL:e=t?"chevrons-up":"chevrons-down";break;case l.VERTICAL:case l.GRID:e=t?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(i,t,e){let s="";switch(i){case l.HORIZONTAL:s=(t&&!e?"height-1-2 display-grid":t&&e?"height-full":"height-0")+" width-full position-relative";break;case l.GRID:s="height-full position-relative "+(t?"width-1-3":"width-0");break;case l.VERTICAL:s="height-full position-relative "+(t?"width-1-2":"width-0")}return s}_getTableSizeClass(i,t){let e="";switch(i){case l.HORIZONTAL:e=(t?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=(t?"width-2-3":"width-full")+" height-full display-flex";break;case l.VERTICAL:e=(t?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(i,t,s){const o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return e("calcite-panel",{class:"width-full height-full"},e("div",{class:"width-full height-full overflow-hidden "+(i===l.HORIZONTAL?"":"display-flex")},this._getMapAndCard(i,t,s),this._getTable(i,t,s)),this.coverPageEnabled&&e("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&e("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"information-letter",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})))}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(i,t,s){const o=this._getMapSizeClass(i,t,s);return e("div",{class:`${o} overflow-hidden`},this._getMapNode(t),this._getPopupExpandNode())}_getMapNode(i){var t;return e("div",{class:(this._layoutMode!==l.HORIZONTAL||this._isMobile&&!i?"adjusted-height-50":"")+" overflow-hidden"},e("map-card",{appProxies:this.appProxies,basemapConfig:this.basemapConfig,class:"width-full",defaultWebmapId:this.defaultWebmap,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:!0,hidden:this._expandPopup&&!this._isMobile,homeZoomIndex:3,homeZoomPosition:"top-left",homeZoomToolsSize:"s",mapInfos:null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>!1!==i.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"]}))}_getPopupExpandNode(){var i;const t=this._expandPopup?"chevrons-down":"chevrons-up",s="expand-popup",o=this._expandPopup?this._translations.collapsePopup:this._translations.expandPopup,h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",l=this._expandPopup?1===(null===(i=this.mapInfos)||void 0===i?void 0:i.length)||this._isMobile?"position-absolute-0":"position-absolute-50":"height-full",a=this._isMobile?"display-none height-0":"";return e("div",{class:`${this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark"} ${l} ${this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":""}`,style:{"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor}},e("calcite-panel",null,this._isMobile?void 0:e("div",{class:`display-flex align-items-center ${a}`,slot:"header-content"},e("calcite-icon",{icon:"information",scale:"s"}),e("div",{class:"padding-inline-start-75"},this._translations.information)),e("calcite-action",{class:a,disabled:this._tableOnly,icon:t,id:s,onClick:()=>this._togglePopup(),slot:"header-actions-end",text:""}),this._tableOnly?void 0:e("calcite-tooltip",{class:h,label:"",placement:"bottom","reference-element":s},e("span",null,o)),this._getCardNode()))}_togglePopup(){this._expandPopup=!this._expandPopup,this._hideMapOnLoadHonored=!0}_getCardNode(){return e("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},e("card-manager",{class:(this._expandPopup||this._isMobile?"height-full":"height-50")+" width-full",isMobile:this._isMobile,mapView:null==this?void 0:this._mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(i,t,s){var o,h;const a=s&&this._isMobile?"visibility-hidden":"",n=this._getTableSizeClass(i,t),d=this._getDividerIcon(i,t),r=t?this._translations.close:this._translations.open,c="toggle-layout",p=i===l.HORIZONTAL?"horizontal":"vertical",g=i===l.HORIZONTAL?"header":"panel-start",u=this.defaultWebmap&&this.defaultLayer,f=this.defaultGlobalId?(null===(o=this.defaultGlobalId)||void 0===o?void 0:o.indexOf(","))>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,b=this.defaultOid?(null===(h=this.defaultOid)||void 0===h?void 0:h.indexOf(","))>-1?this.defaultOid.split(",").map((i=>parseInt(i,10))):[parseInt(this.defaultOid,10)]:void 0;return e("calcite-shell",{class:`${n} ${a} border-bottom`},this._isMobile?void 0:e("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:p,slot:g},e("calcite-action",{class:"toggle-node",icon:d,id:c,onClick:()=>this._toggleLayout(),text:""}),e("calcite-tooltip",{label:r,placement:"bottom","reference-element":c},e("span",null,r))),e("div",{class:"width-full height-full position-relative"},e("layer-table",{defaultGlobalId:u?f:void 0,defaultLayerId:u?this.defaultLayer:"",defaultOid:u&&!f?b:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this.enableInlineEdit,enableShare:this.enableShare,isMobile:this._isMobile,mapHidden:this._expandPopup,mapInfo:this._mapInfo,mapView:null==this?void 0:this._mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:i=>this._layerTable=i,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})))}_onResize(){const i=this.el.offsetWidth<1024,t=!this._isMobile&&i;this._isMobile=i,this._layoutMode=this._isMobile?l.HORIZONTAL:l.GRID,t&&(this._panelOpen=!0),(this.hideMapOnLoad&&!this._hideMapOnLoadHonored||this._isMobile)&&this.hideMapOnLoadWatchHandler()}_toggleLayout(){this._panelOpen=!this._panelOpen}showHideMapPopupAndTable(i){this._expandPopup=!1,this._hideTable=i,this._hideFooter=i}_getMapInfo(i){let t;return this.mapInfos.some((e=>{if(e.id===i)return t=e,!0})),Object.assign({},t)}async _setMapView(){var i;this._mapInfo=this._getMapInfo(this._mapChange.id),this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored||null===(i=this.defaultCenter)||void 0===i?void 0:i.split(";").map((i=>parseFloat(i))),e=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&e&&(await this._mapView.goTo({center:t,zoom:e}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView.ui.remove("zoom")}async _getTranslations(){const i=await h(this.el);this._translations=i[0]}get el(){return o(this)}static get watchers(){return{enableZoom:["enableZoomWatchHandler"],hideMapOnLoad:["hideMapOnLoadWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};n.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}";export{n as crowdsource_manager}
@@ -1,6 +0,0 @@
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{h as e,r as i,f as t,g as n}from"./p-fa1ceaf9.js";import{h as a,g as s,v as l,a as r,i as c,b as o,c as d,d as v,s as p,e as u,f as g,j as h,u as f,k as m,l as y}from"./p-bf27cd5f.js";import{c as b}from"./p-c4160bf7.js";import{l as _}from"./p-d029b513.js";import"./p-8c6d9b5a.js";const w=96;function k(e){return e?e/72*w:0}var x={exports:{}};!function(e){var i,t="http://www.w3.org/",n="".concat(t,"2000/svg"),a="".concat(t,"1999/xlink"),s=[],l=function(e,i){var t={};return Object.keys(e).forEach((function(i){t[i]=e[i]})),i&&Object.keys(i).forEach((function(e){t[e]=i[e]})),t},r=function(e,i){return e.vnodeSelector===i.vnodeSelector&&(e.properties&&i.properties?e.properties.key===i.properties.key&&e.properties.bind===i.properties.bind:!e.properties&&!i.properties)},c=function(e){if("string"!=typeof e)throw new Error("Style values must be strings")},o=function(e,i,t){if(""!==i.vnodeSelector)for(var n=t;n<e.length;n++)if(r(e[n],i))return n;return-1},d=function(e,i,t,n){var a=e[i];if(""!==a.vnodeSelector){var s=a.properties;if(!(s?void 0===s.key?s.bind:s.key:void 0))for(var l=0;l<e.length;l++)if(l!==i&&r(e[l],a))throw{error:new Error("".concat(t.vnodeSelector," had a ").concat(a.vnodeSelector," child ").concat("added"===n?n:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),parentNode:t,childNode:a}}},v=function(e){if(e.properties){var i=e.properties.enterAnimation;i&&i(e.domNode,e.properties)}},p=[],u=!1,g=function(e){(e.children||[]).forEach(g),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},h=function(){u=!1,p.forEach(g),p.length=0},f=function(e){p.push(e),u||(u=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(h,{timeout:16}):setTimeout(h,16))},m=function(e){var i=e.domNode;if(e.properties){var t=e.properties.exitAnimation;if(t){i.style.pointerEvents="none";return void t(i,(function(){i.parentNode&&(i.parentNode.removeChild(i),f(e))}),e.properties)}}i.parentNode&&(i.parentNode.removeChild(i),f(e))},y=function(e,i,t){(function(e,i,t){if(i)for(var n=0,a=i;n<a.length;n++)b(a[n],e,void 0,t)})(e,i.children,t),i.text&&(e.textContent=i.text),function(e,i,t){if(i)for(var s=t.eventHandlerInterceptor,l=Object.keys(i),r=l.length,o=function(r){var o,d=l[r],v=i[d];if("className"===d)throw new Error('Property "className" is not supported, use "class".');if("class"===d)_(e,v,!0);else if("classes"===d)for(var p=Object.keys(v),u=p.length,g=0;g<u;g++){var h=p[g];v[h]&&e.classList.add(h)}else if("styles"===d){var f=Object.keys(v),m=f.length;for(g=0;g<m;g++){var y=f[g],b=v[y];b&&(c(b),t.styleApplyer(e,y,b))}}else if("key"!==d&&null!=v){var w=typeof v;"function"===w?(0===d.lastIndexOf("on",0)&&(s&&(v=s(d,v,e,i)),"oninput"===d&&(o=v,v=function(e){o.apply(this,[e]),e.target["oninput-value"]=e.target.value})),e[d]=v):t.namespace===n?"href"===d?e.setAttributeNS(a,d,v):e.setAttribute(d,v):"string"===w&&"value"!==d&&"innerHTML"!==d?e.setAttribute(d,v):e[d]=v}},d=0;d<r;d++)o(d)}(e,i.properties,t),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[e,t,i.vnodeSelector,i.properties,i.children])},b=function(e,i,t,a){var s,r,c=0,o=e.vnodeSelector,d=i.ownerDocument;if(""===o)e.domNode?e.domNode.nodeValue=e.text:(r=e.domNode=d.createTextNode(e.text),void 0!==t?i.insertBefore(r,t):i.appendChild(r));else{for(var v=0;v<=o.length;++v){var p=o.charAt(v);if(v===o.length||"."===p||"#"===p){var u=o.charAt(c-1),g=o.slice(c,v);"."===u?r.classList.add(g):"#"===u?r.id=g:("svg"===g&&(a=l(a,{namespace:n})),void 0!==a.namespace?r=e.domNode=d.createElementNS(a.namespace,g):(r=e.domNode=e.domNode||((null===(s=e.properties)||void 0===s?void 0:s.is)?d.createElement(g,{is:e.properties.is}):d.createElement(g)),"input"===g&&e.properties&&void 0!==e.properties.type&&r.setAttribute("type",e.properties.type)),void 0!==t?i.insertBefore(r,t):r.parentNode!==i&&i.appendChild(r)),c=v+1}}y(r,e,a)}},_=function(e,i,t){i&&i.split(" ").forEach((function(i){i&&e.classList.toggle(i,t)}))};i=function(e,t,p){var u=e.domNode,g=!1;if(e===t)return!1;var h=!1;if(""===t.vnodeSelector){if(t.text!==e.text){var f=u.ownerDocument.createTextNode(t.text);return u.parentNode.replaceChild(f,u),t.domNode=f,!0}t.domNode=u}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(p=l(p,{namespace:n})),e.text!==t.text&&(h=!0,void 0===t.text?u.removeChild(u.firstChild):u.textContent=t.text),t.domNode=u,h=function(e,t,n,a,l){if(n===a)return!1;for(var c,p=(n=n||s).length,u=(a=a||s).length,g=0,h=0,f=!1;h<u;){var y=g<p?n[g]:void 0,_=a[h];if(void 0!==y&&r(y,_))f=i(y,_,l)||f,g++;else{var w=o(n,_,g+1);if(w>=0){for(c=g;c<w;c++)m(n[c]),d(n,c,e,"removed");f=i(n[w],_,l)||f,g=w+1}else b(_,t,g<p?n[g].domNode:void 0,l),v(_),d(a,h,e,"added")}h++}if(p>g)for(c=g;c<p;c++)m(n[c]),d(n,c,e,"removed");return f}(t,u,e.children,t.children,p)||h,h=function(e,i,t,s){if(t){for(var l=!1,r=Object.keys(t),o=r.length,d=0;d<o;d++){var v=r[d],p=t[v],u=i[v];if("class"===v)u!==p&&(_(e,u,!1),_(e,p,!0));else if("classes"===v)for(var g=e.classList,h=Object.keys(p),f=h.length,m=0;m<f;m++){var y=h[m],b=!!p[y];b!==!!u[y]&&(l=!0,b?g.add(y):g.remove(y))}else if("styles"===v){var w=Object.keys(p),k=w.length;for(m=0;m<k;m++){var x=w[m],L=p[x];L!==u[x]&&(l=!0,L?(c(L),s.styleApplyer(e,x,L)):s.styleApplyer(e,x,""))}}else if(p||"string"!=typeof u||(p=""),"value"===v){var $=e[v];$!==p&&(e["oninput-value"]?$===e["oninput-value"]:p!==u)&&(e[v]=p,e["oninput-value"]=void 0),p!==u&&(l=!0)}else if(p!==u){var j=typeof p;"function"===j&&s.eventHandlerInterceptor||(s.namespace===n?"href"===v?e.setAttributeNS(a,v,p):e.setAttribute(v,p):"string"===j&&"innerHTML"!==v?"role"===v&&""===p?e.removeAttribute(v):e.setAttribute(v,p):e[v]!==p&&(e[v]=p),l=!0)}}return l}}(u,e.properties,t.properties,p)||h,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[u,p,t.vnodeSelector,t.properties,t.children]);return h&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(u,t.properties,e.properties),g};var w=function(e,t){return{getLastRender:function(){return e},update:function(n){if(e.vnodeSelector!==n.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var a=e;e=n,i(a,n,t)},domNode:e.domNode}},k={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(e,i,t){"-"===i.charAt(0)?e.style.setProperty(i,t):e.style[i]=t}},x=function(e){return l(k,e)},L={create:function(e,i){return i=x(i),b(e,document.createElement("div"),void 0,i),w(e,i)},append:function(e,i,t){return t=x(t),b(i,e,void 0,t),w(i,t)},insertBefore:function(e,i,t){return t=x(t),b(i,e.parentNode,e,t),w(i,t)},merge:function(e,i,t){return t=x(t),i.domNode=e,y(e,i,t),w(i,t)},replace:function(e,i,t){return t=x(t),b(i,e.parentNode,e,t),e.parentNode.removeChild(e),w(i,t)}},$=function(e,i,t){for(var n=0,a=i.length;n<a;n++){var s=i[n];Array.isArray(s)?$(e,s,t):null!=s&&!1!==s&&("string"==typeof s&&(s={vnodeSelector:"",properties:void 0,children:void 0,text:s.toString(),domNode:null}),t.push(s))}};var j;j=Array.prototype.find?function(e,i){return e.find(i)}:function(e,i){return e.filter(i)[0]};var O=function(e,i,t){return function(){return n};function n(n){t("domEvent",n);var a=i(),s=function(e,i){for(var t=[];e&&e!==i;)t.push(e),e=e.parentNode;return t}(n.currentTarget,a.domNode);s.reverse();var l,r=function(e,i){var t=e;return i.forEach((function(e){t=t&&t.children?j(t.children,(function(i){return i.domNode===e})):void 0})),t}(a.getLastRender(),s);return e.scheduleRender(),r&&(l=r.properties["on".concat(n.type)].apply(r.properties.bind||this,arguments)),t("domEventProcessed",n),l}};e.createCache=function(){var e,i;return{invalidate:function(){i=void 0,e=void 0},result:function(t,n){if(e)for(var a=0;a<t.length;a++)e[a]!==t[a]&&(i=void 0);return i||(i=n(),e=t),i}}},e.createMapping=function(e,i,t){var n=[],a=[];return{results:a,map:function(s){for(var l=s.map(e),r=a.slice(),c=0,o=0;o<s.length;o++){var d=s[o],v=l[o];if(v===n[c])a[o]=r[c],t(d,r[c],o),c++;else{for(var p=!1,u=1;u<n.length+1;u++){var g=(c+u)%n.length;if(n[g]===v){a[o]=r[g],t(s[o],r[g],o),c=g+1,p=!0;break}}p||(a[o]=i(d,o))}}a.length=s.length,n=l}}},e.createProjector=function(e){var i,t,n=x(e),a=n.performanceLogger,s=!0,l=!1,r=[],c=[],o=function(e,t,s){var l;n.eventHandlerInterceptor=O(i,(function(){return l}),a),l=e(t,s(),n),r.push(l),c.push(s)},d=function(){if(t=void 0,s){s=!1,a("renderStart",void 0);for(var e=0;e<r.length;e++){var i=c[e]();a("rendered",void 0),r[e].update(i),a("patched",void 0)}a("renderDone",void 0),s=!0}};return i={renderNow:d,scheduleRender:function(){t||l||(t=requestAnimationFrame(d))},stop:function(){t&&(cancelAnimationFrame(t),t=void 0),l=!0},resume:function(){l=!1,s=!0,i.scheduleRender()},append:function(e,i){o(L.append,e,i)},insertBefore:function(e,i){o(L.insertBefore,e,i)},merge:function(e,i){o(L.merge,e,i)},replace:function(e,i){o(L.replace,e,i)},detach:function(e){for(var i=0;i<c.length;i++)if(c[i]===e)return c.splice(i,1),r.splice(i,1)[0];throw new Error("renderFunction was not found")}}},e.dom=L,e.h=function(e,i,t){if(Array.isArray(i))t=i,i=void 0;else if(i&&("string"==typeof i||i.vnodeSelector)||t&&("string"==typeof t||t.vnodeSelector))throw new Error("h called with invalid arguments");var n,a;return t&&1===t.length&&"string"==typeof t[0]?n=t[0]:t&&($(e,t,a=[]),0===a.length&&(a=void 0)),{vnodeSelector:e,properties:i,children:a,text:""===n?void 0:n,domNode:null}}}(x.exports);const L=x.exports.createProjector(),$=20,j={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function O(i="vertical"){const t="stroke:rgb(200, 200, 200);stroke-width:1";return"vertical"===i?e("svg",{height:"4",width:"10"},e("line",{x1:"0",y1:"2",x2:"10",y2:"2",style:t})):e("svg",{height:"10",width:"10"},e("line",{x1:"5",y1:"0",x2:"5",y2:"10",style:t}))}function z(e,i="vertical"){const t=document.createElement("div");return t.style.height=`${$}px`,t.className=j.univariateAboveAndBelowSymbol,null!=e&&(t.style.opacity=e.toString()),L.append(t,O.bind(null,i)),t}function R(e,i,t="vertical",n){e.infos.forEach(((e,a)=>{if(n&&2===a)e.preview=z(i,t);else{const{size:i}=e,n=k(i)+("horizontal"===t?20:10),a="div"===e.preview.tagName.toLowerCase(),s=a?e.preview:document.createElement("div");s&&(s.className=j.univariateAboveAndBelowSymbol),"horizontal"===t?s&&(s.style.width=`${n}px`):s&&(s.style.height=`${n}px`),a||s&&s.appendChild(e.preview),e.preview=s}}))}function E(e,i="classic"){const t=e.infos,n=t[0].size,a=t[t.length-1].size;return"classic"===i?(k(n)+10)/2:(k(n)-k(a))/2}async function A(e,i){if(!e)return Promise.resolve(null);const t=e.infos.map((e=>e.color)),[n]=await _(["esri/symbols/support/symbolUtils"]),a=n.renderColorRampPreviewHTML("full"===i.type?t:"above"===i.type?t.slice(0,3):t.slice(2,5),{width:i.width,height:i.height,align:i.rampAlignment,effectList:i.effectList});return a.className=j.colorRamp,null!=i.opacity&&(a.style.opacity=i.opacity.toString()),Promise.resolve(a)}function F(e,i,t,n="vertical"){const a=function(e,i,t,n="vertical"){let a=0;const s=e.infos,l=Math.floor(s.length/2),r="full"===i||"below"===i?s.length-1:l;for(let e="full"===i||"above"===i?0:l;e<=r;e++)a+=t&&e===l?"horizontal"===n?10:$:k(s[e].size)+("horizontal"===n?20:10);return Math.round(a)}(e,i,t,n),s=e.infos,l=Math.floor(s.length/2),r="full"===i||"above"===i?0:l,c="full"===i||"below"===i?s.length-1:l,o=t?"vertical"===n?$:10:0,d="vertical"===n?10*("full"===i?2:1):20*("full"===i?2:1);return Math.round(a-(k("full"===i?s[r].size+s[c].size:"above"===i?s[r].size:s[c].size)/2+o/2+d/2))}const M="esri-legend__layer-body",I="esri-legend__layer-row",T="esri-legend__layer-cell esri-legend__layer-cell--info",C="esri-legend__layer-cell esri-legend__layer-cell--symbols",N="esri-legend__symbol",S="esri-legend__ramps",P="esri-legend__size-ramp",H="esri-legend__ramp-labels",D="esri-legend__ramp-label",q="esri-univariate-above-and-below-ramp__label",B={display:"flex",alignItems:"flex-start"},U={marginLeft:"3px"},V={display:"table-cell",verticalAlign:"middle"},W=class{constructor(e){i(this,e),this.calculatingFeatureCount=!1,this.legendvm=void 0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"},this.messages=void 0,this.isLoading=!0,this.intLegendId=void 0}handleFilterModeChange(){a(this.filterMode,this.legendvm.view)}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0});const[e,i,n]=await _(["esri/intl","esri/core/reactiveUtils","esri/core/Handles"]);this.reactiveUtils=i,this.handles=new n,this.intl=e}async componentDidLoad(){this.initLegend()}async initLegend(){try{await this.reactiveUtils.whenOnce((()=>{var e;return null===(e=this.legendvm)||void 0===e?void 0:e.view}));const e=async()=>{var e,i,t,n;try{const a=await(null===(t=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===t?void 0:t.load());await(null===(n=null==a?void 0:a.basemap)||void 0===n?void 0:n.load());const s=null==a?void 0:a.allLayers,l=null==s?void 0:s.map((e=>e.load())),r=(await Promise.allSettled(l)).map((e=>"fulfilled"===(null==e?void 0:e.status)&&(null==e?void 0:e.value)?e.value:null)).filter((e=>!!e)),o=[];r.forEach((e=>{var i;(null===(i=this.legendvm)||void 0===i?void 0:i.view)&&o.push(this.legendvm.view.whenLayerView(e))})),await Promise.allSettled(o);const d=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),d)),this.isLoading=!1,this.setupWatchersAndListeners()}catch(e){console.error(e),this.isLoading=!1}};this.legendvm.view.when(e),this.legendvm.view.map.layers.on("after-changes",e)}catch(e){this.isLoading=!1}}disconnectedCallback(){var e,i;null===(e=this.handles)||void 0===e||e.removeAll(),null===(i=this.handles)||void 0===i||i.destroy(),this.handles=null}render(){var i,t,n;const a=this.renderFilteredLayers();return this.isLoading?e("calcite-loader",{key:"interactive-legend-loader",scale:"m",label:null===(i=this.messages)||void 0===i?void 0:i.loading,text:null===(t=this.messages)||void 0===t?void 0:t.loading}):e("div",{key:"interactive-legend-classic-container",class:s(this.el)},(null==a?void 0:a.length)>0?a:e("div",{class:"esri-legend__message"},null===(n=this.messages)||void 0===n?void 0:n.noLegend))}renderFilteredLayers(){var e,i;return(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.activeLayerInfos)||void 0===i?void 0:i.toArray()).map((e=>this.renderLegendForLayer(e))).filter((e=>!!e))}renderLegendForLayer(i,t){var n,a;if(!i.ready)return null;if(i.children.length){const a=i.children.map((e=>this.renderLegendForLayer(e,!0))).toArray();return e("instant-apps-interactive-legend-group-legend-element",{class:s(this.el),legendvm:this.legendvm,featureCount:this.featureCount,activeLayerInfo:i,isChild:t},e("div",{style:{paddingLeft:"20px"},id:`${null===(n=null==i?void 0:i.layer)||void 0===n?void 0:n.id}-legend-layer`,slot:"content"},a))}const l=i.legendElements;if(l&&!l.length)return null;const r=l.map(((e,t)=>this.renderLegendForElement(e,i.layer,i.effectList,i,t))).filter((e=>!!e));return r.length?e("instant-apps-interactive-legend-layer-element",{class:s(this.el),legendvm:this.legendvm,featureCount:this.featureCount,activeLayerInfo:i,messages:this.messages,isChild:t},e("div",{slot:"content",id:`${null===(a=null==i?void 0:i.layer)||void 0===a?void 0:a.id}-legend-layer`,class:"esri-legend__layer"},r)):null}renderLegendForElement(i,t,n,a,r,c,o){const d="color-ramp"===i.type,v="opacity-ramp"===i.type,p="size-ramp"===i.type;let u=null;const g=l(a,i,r),h="relationship-ramp"===(null==i?void 0:i.type);if("symbol-table"===i.type||p){const s=i.infos.map(((e,s)=>this.renderLegendForElementInfo(e,t,n,p,i,a,r,s,g,o||null))).filter((e=>!!e));s.length&&(u=e("div",{class:M},s))}else"color-ramp"===i.type||"opacity-ramp"===i.type||"heatmap-ramp"===i.type||"stretch-ramp"===i.type?u=this.renderLegendForRamp(i,t.opacity):"relationship-ramp"===i.type?u=e("instant-apps-interactive-legend-relationship",{class:s(this.el),key:"relationship-ramp",filterMode:this.filterMode,activeLayerInfo:a,legendElement:i,messages:this.messages}):"pie-chart-ramp"===i.type?u=this.renderPieChartRamp(i):"univariate-above-and-below-ramp"===i.type?u=this.renderUnivariateAboveAndBelowRamp(i,t.opacity,n):"univariate-color-size-ramp"===i.type&&(u=this.renderUnivariateColorSizeRamp(i,t.opacity,n));if(!u)return null;const f=i.title;let m=null;if("string"==typeof f)m=f;else if(f){const e=this.getTitle(this.messages,f,d||v);m=this.isRendererTitle(f,d||v)&&f.title?`${f.title} (${e})`:e}return e("instant-apps-interactive-legend-legend-element",{class:s(this.el),activeLayerInfo:a,isSizeRamp:p,isChild:c,isColorRamp:d,isRelationshipRamp:h,isInteractive:g,zoomTo:this.zoomTo,legendElement:i,titleText:m,legendvm:this.legendvm,legendElementIndex:r,messages:this.messages},e("div",{slot:"content"},u))}renderPieChartRamp(i){var t;return e("div",{innerHTML:`${null===(t=i.preview)||void 0===t?void 0:t.outerHTML}`})}async renderUnivariateAboveAndBelowRamp(i,t,n){const{sizeRampElement:a,colorRampElement:s}=function(e,i,t="vertical"){const n=e.infos;let a=n.find((({type:e})=>"size-ramp"===e)),s=n.find((({type:e})=>"color-ramp"===e));return a&&(a=Object.assign({},a),a.infos=[...a.infos],R(a,i,t,!0)),s&&(s=Object.assign({},s),s.infos=[...s.infos]),"horizontal"===t&&(null==a||a.infos.reverse(),null==s||s.infos.reverse()),{sizeRampElement:a,colorRampElement:s}}(i,t);if(!a)return null;const l=F(a,"above",!0),r=F(a,"below",!0),c=await A(s,{width:12,height:l,rampAlignment:"vertical",opacity:t,type:"above",effectList:n}),o=await A(s,{width:12,height:r,rampAlignment:"vertical",opacity:t,type:"below",effectList:n}),d=E(a),v=a.infos.map((e=>e.label)),p=v.map(((i,t)=>{const n=2===t;return 0===t?e("div",{class:i?c?q:D:""},i):n?e("div",null):null})),u=v.length-1,g=Math.floor(v.length/2),h=v.map(((i,t)=>t===g||t===u?e("div",{class:i?c?q:D:""},i):null)),f={display:"table-cell",verticalAlign:"middle"},m={marginTop:`${d}px`},y={height:`${l}px`},b={height:`${r}px`};return e("div",{key:"univariate-above-and-below-ramp-preview",style:B},e("div",{class:M},a.infos.map(((i,t)=>e("div",{class:`${I} ${P}`},e("div",{class:N,style:f,innerHTML:`${i.preview.outerHTML}`}),c||t%2!=0?null:e("div",{class:T},v[t]))))),c?e("div",{style:m,key:"color-ramp-preview"},e("div",{style:U},e("div",{style:V},e("div",{class:S},c)),e("div",{style:V},e("div",{class:H,style:y},p))),e("div",{style:U},e("div",{style:V},e("div",{class:S},o)),e("div",{style:V},e("div",{class:H,style:b},h)))):null)}renderUnivariateColorSizeRamp(i,t,n){const{sizeRampElement:a,colorRampElement:s}=function(e,i="vertical"){const t=e.infos;let n=t.find((({type:e})=>"size-ramp"===e)),a=t.find((({type:e})=>"color-ramp"===e));return n&&(n=Object.assign({},n),n.infos=[...n.infos],R(n,null,i,!1)),a&&(a=Object.assign({},a),a.infos=[...a.infos]),"horizontal"===i&&(null==n||n.infos.reverse(),null==a||a.infos.reverse()),{sizeRampElement:n,colorRampElement:a}}(i);if(!a)return null;const l=E(a),r=F(a,"full",!1),c=A(s,{width:12,height:r,rampAlignment:"vertical",opacity:t,type:"full",effectList:n}),o=a.infos.length-1,d=a.infos.map(((i,t)=>0===t||t===o?e("div",{class:i.label?s?q:D:""},i.label):null)),v={display:"table-cell",verticalAlign:"middle"},p={marginTop:`${l}px`},u={height:`${r}px`};return e("div",{key:"univariate-above-and-below-ramp-preview",style:B},e("div",{class:M},a.infos.map((i=>e("div",{class:`${I} ${P}`},e("div",{class:N,style:v,innerHTML:`${i.preview.outerHTML}`}))))),e("div",{style:p,key:"color-ramp-preview"},e("div",{style:U},e("div",{style:V},e("div",{class:S},c)),e("div",{style:V},e("div",{class:H,style:u},d)))))}renderLegendForRamp(i,t){var n;const a=i.infos,s="heatmap-ramp"===i.type,l="stretch-ramp"===i.type,r=i.preview,c="opacity-ramp"===i.type?"esri-legend__opacity-ramp":"";r&&(r.classList.add("esri-legend__color-ramp"),c&&r.classList.add(c)),null!=t&&r&&(r.style.opacity=t.toString());const o=a.map((i=>e("div",{class:i.label?D:""},s?this.messages[i.label]||i.label:l?this.getStretchStopLabel(i):i.label))),d={height:null===(n=null==r?void 0:r.style)||void 0===n?void 0:n.height};return e("div",{class:I},e("div",{class:C,style:Object.assign({},{width:"24px"})},e("div",{ref:e=>{var i;(null==e?void 0:e.firstChild)&&(null===(i=null==e?void 0:e.firstChild)||void 0===i||i.remove()),null==e||e.appendChild(r)},class:S})),e("div",{class:T},e("div",{class:H,style:Object.assign({},d)},o)))}getStretchStopLabel(e){return e.label?this.messages[e.label]+": "+("string"==typeof e.value?e.value:this.intl.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})):""}renderLegendForElementInfo(i,t,n,a,l,v,p,u,g,h){var f,m;if(i.type)return this.renderLegendForElement(i,t,n,v,p,!0,i);let b;if(i.preview?b=e("div",{class:N,innerHTML:`${i.preview.outerHTML}`}):i.src&&(b=this.renderImage(i,t,!1)),!b)return null;const _=a?` ${P}`:"";let w;const k=y(t),x=r(k,h);if(c.data){const e=o(k,t,i,x,u),n=d(x?null==x?void 0:x.nestedInfos:k);w=1===(null===(f=null==k?void 0:k.categories)||void 0===f?void 0:f.size)?!(null==e?void 0:e.selected):n||(null==e?void 0:e.selected)}return x&&!(null==i?void 0:i.value)||!g?e("div",{class:I},e("div",{class:`${C}${_}`},b),e("div",{class:`${T}`},this.getTitle(this.messages,i.label,!1)||"")):e("button",{onClick:this.applyFilter(i,t,u,h),class:`${I} instant-apps-interactive-legend__layer-row--interactive${w?" instant-apps-interactive-legend-element-info--selected":""}`},e("div",{class:`${C}${_}`},b),e("div",{class:`${T}`},this.getTitle(this.messages,i.label,!1)||""),this.featureCount?e("instant-apps-interactive-legend-count",{class:s(this.el),categoryId:x?l.title:null!==(m=i.label)&&void 0!==m?m:null==t?void 0:t.id,activeLayerInfo:v,legendvm:this.legendvm,messages:this.messages,selected:w,legendElement:l,infoIndex:u}):null)}renderImage(i,t,n){const{label:a,src:s,opacity:l}=i,r=n?" esri-legend__imagery-layer-image--stretched":"",c=n?"":` ${N}`,o={opacity:`${null!=l?l:t.opacity}`};return e("img",{alt:this.getTitle(this.messages,a,!1),src:s,width:i.width,height:i.height,class:`$${r}${c}`,style:o})}getTitle(e,i,t){var n,a;if(!i)return;if("string"==typeof i||"number"==typeof i)return i;if("value"in i||"unit"in i)return this.intl.substitute(null!==(n=null==e?void 0:e.dotValue)&&void 0!==n?n:"",i);if("colorName"in i||"bandName"in i)return e[i.colorName]+": "+(e[i.bandName]||i.bandName);if("showCount"in i)return i.showCount?e.clusterCountTitle:null;let s=null;return this.isRampTitle(i,t)?s=i.ratioPercentTotal?"showRatioPercentTotal":i.ratioPercent?"showRatioPercent":i.ratio?"showRatio":i.normField?"showNormField":i.field?"showField":null:this.isRendererTitle(i,t)&&(s=i.normField?"showNormField":i.normByPct?"showNormPct":i.field?"showField":null),s?null===(a=this.intl)||void 0===a?void 0:a.substitute("showField"===s?"{field}":e[s],{field:i.field,normField:i.normField}):""}isRampTitle(e,i){return i}isRendererTitle(e,i){return!i}setupWatchersAndListeners(){var e,i,n,a,s,l,r;const o=null===(a=null===(n=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===n?void 0:n.allLayers)||void 0===a?void 0:a.filter((e=>"feature"===(null==e?void 0:e.type)));o.forEach((async e=>{var i,t,n,a;try{const s=await(null===(t=null===(i=this.legendvm)||void 0===i?void 0:i.view)||void 0===t?void 0:t.whenLayerView(e)),l=`fLayerViewScale-${null==e?void 0:e.id}`;(null===(n=this.handles)||void 0===n?void 0:n.has(l))||null===(a=this.handles)||void 0===a||a.add(s.watch("visibleAtCurrentScale",(async()=>this.createDataForLayer(e))),l)}catch(e){}})),null==o||o.forEach((e=>{var i,t,n;const a=`fLayer-${null==e?void 0:e.id}`;(null===(i=this.handles)||void 0===i?void 0:i.has(a))||null===(t=this.handles)||void 0===t||t.add(null===(n=this.reactiveUtils)||void 0===n?void 0:n.watch((()=>null==e?void 0:e.visible),(async()=>this.createDataForLayer(e))),a)})),null===(s=this.handles)||void 0===s||s.add(this.reactiveUtils.when((()=>this.legendvm),(()=>{this.reactiveUtils.watch((()=>{var e,i;return null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating}),(()=>{var e,i;this.calculatingFeatureCount||(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating)&&(this.calculatingFeatureCount=!0,this.reactiveUtils.when((()=>{var e,i;return!(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating)}),(async()=>{const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e)),this.calculatingFeatureCount=!1}),{once:!0,initial:!0}))}),{initial:!0})}),{initial:!0,once:!0})),null===(l=this.handles)||void 0===l||l.add(this.reactiveUtils.on((()=>{var e;return null===(e=this.legendvm)||void 0===e?void 0:e.activeLayerInfos}),"change",(async e=>{var i;const n=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),n)),t(this.el),null===(i=this.handles)||void 0===i||i.add(this.reactiveUtils.on((()=>e.children),"change",(async()=>{const e=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),e)),t(this.el)})))}))),null===(r=this.handles)||void 0===r||r.add(this.reactiveUtils.on((()=>{var e,i,t;return null===(t=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===t?void 0:t.layers}),"after-changes",(async()=>{const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e)),this.calculatingFeatureCount=!1})))}async createDataForLayer(e){var i;const t=p.get("data"),n=null==t?void 0:t[null==e?void 0:e.id],a=g(null===(i=this.legendvm)||void 0===i?void 0:i.activeLayerInfos),s=null==a?void 0:a.find((i=>{var t;return(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.id)===(null==e?void 0:e.id)}));if(!n&&s){const i=await h(this.legendvm,s,this.reactiveUtils);if(f({intLegendLayerData:i,layerId:null==e?void 0:e.id}),this.featureCount){const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e))}}}applyFilter(e,i,t,n){return async()=>{var a;const s=Object.assign({},null===(a=c.data)||void 0===a?void 0:a[null==i?void 0:i.id]);n?await m(s,e,t,this.filterMode,n):await m(s,e,t,this.filterMode),f({intLegendLayerData:s,layerId:null==i?void 0:i.id})}}get el(){return n(this)}static get watchers(){return{filterMode:["handleFilterModeChange"]}}};W.style=".sc-instant-apps-interactive-legend-classic-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-caption-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-color-text-1);--instant-apps-interactive-legend-field-name-font-size:1rem;--instant-apps-interactive-legend-total-feature-count-font-size:0.875rem;--instant-apps-interactive-legend-info-font-size:0.875rem;--instant-apps-interactive-legend-info-item-background--selected:#c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark:#009af2;--instant-apps-interactive-legend-info-item-background--hover:#e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark:#4a4a4a;--instant-apps-interactive-legend-info-item-color--selected:var(--calcite-color-text-2);--instant-apps-interactive-legend-secondary-background-color:var(--calcite-color-background);--instant-apps-interactive-legend-ui-margin:20px 15px;--instant-apps-interactive-legend-ui-padding:20px 15px}.sc-instant-apps-interactive-legend-classic-h .esri-legend__service.sc-instant-apps-interactive-legend-classic{padding:0}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-body.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__group-layer-child.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-child-table.sc-instant-apps-interactive-legend-classic{margin:0;overflow:hidden}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic calcite-action.sc-instant-apps-interactive-legend-classic{margin-right:5px}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-classic{white-space:nowrap}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-classic calcite-button.sc-instant-apps-interactive-legend-classic{margin:2px}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell.esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic{display:flex;align-items:center}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-body.sc-instant-apps-interactive-legend-classic{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol.sc-instant-apps-interactive-legend-classic>.esri-legend__layer-body.sc-instant-apps-interactive-legend-classic{margin:0}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic{display:table-row}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-cell.sc-instant-apps-interactive-legend-classic{display:table-cell}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--symbols.sc-instant-apps-interactive-legend-classic{justify-content:center;width:20%}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{width:65%}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{margin:1px;background:transparent;border:none;width:100%}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{position:relative}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{color:var(--calcite-color-text-inverse)}.sc-instant-apps-interactive-legend-classic-h .hide.sc-instant-apps-interactive-legend-classic{display:none}@media (min-width: 992px){.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{cursor:pointer}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}";export{W as instant_apps_interactive_legend_classic}
@@ -1,6 +0,0 @@
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 n,h as i,H as s,g as e}from"./p-fa1ceaf9.js";import{l as o}from"./p-d029b513.js";import{g as a}from"./p-49250010.js";import{g as r}from"./p-a9a72626.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const p="instant-apps-export calcite-mode-light",l="instant-apps-export-print",h="instant-apps-export-print__content-container",c="instant-apps-export-print__extra-container",d="instant-apps-export-print__legend-container",u="instant-apps-export-print__compass-container",v="instant-apps-export-print__scale-bar-container",x="instant-apps-export-print__popup-container",b="instant-apps-export-print__popup-content",_="instant-apps-export-print__popup-title",g="instant-apps-export-print__view",f="instant-apps-export-print__view-container",m="instant-apps-export-print__view-wrapper",w="instant-app-export-drag",k=class{constructor(i){t(this,i),this.exportOutputUpdated=n(this,"exportOutputUpdated",7),this.output=void 0,this.beforeExport=()=>Promise.resolve(),this.popoverIcon="export",this.extraContent=void 0,this.extraContentLabel=void 0,this.headerTitle="",this.includeExtraContent=!0,this.includeLegend=!0,this.includeMap=!0,this.includePopup=!1,this.mode="popover",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.scale="m",this.showHeaderTitle=!0,this.showIncludeLegend=!0,this.showIncludeMap=!1,this.showIncludePopup=!0,this.showScaleBar=!1,this.view=void 0,this.maskBackground="rgba(255, 51, 0, 0.1)",this.maskBorder="2px dashed rgb(255, 51, 0)",this.baseClass=p,this.exportIsLoading=void 0,this.messages=void 0}watchIncludeMap(t){t&&this.updateLegend()}watchView(){this.handleIncludePopup()}async componentWillLoad(){this.baseClass="dark"===r(this.el)?"instant-apps-export calcite-mode-dark":p,a(this),await this.initializeModules()}componentDidLoad(){this.printContainerEl.prepend(this.printEl),this.handleIncludePopup()}async initializeModules(){const[t,n]=await o(["esri/core/Handles","esri/core/reactiveUtils"]);return this.handles=new t,this.reactiveUtils=n,Promise.resolve()}render(){const t="popover"===this.mode?this.renderPopover():this.renderPanel(),n=this.renderCompass();return i(s,{key:"d561a14661edad3e4ad5f0041537acdc1fb724a1"},i("div",{key:"917848051ac8114c4ba527332c8688791a9c75d0",class:this.baseClass,onMouseEnter:this.handleWidgetCreation.bind(this),onFocusin:this.handleWidgetCreation.bind(this)},t,i("div",{key:"3421d8bde7ce6f91062b538f087c155946358e01",class:"instant-apps-export__visually-hidden"},n)))}renderPopover(){var t,n,s;const e=this.renderPanel();return[i("calcite-popover",{referenceElement:"export-popover-btn",label:null===(t=this.messages)||void 0===t?void 0:t.exportPopover,overlayPositioning:this.popoverPositioning,placement:this.popoverPlacement,autoClose:!0,ref:t=>this.popoverEl=t},e),i("calcite-action",{id:"export-popover-btn",alignment:"center",icon:this.popoverIcon,scale:this.scale,title:null===(n=this.messages)||void 0===n?void 0:n.exportBtn,text:null===(s=this.messages)||void 0===s?void 0:s.exportBtn})]}renderPanel(){var t,n;const s=this.showHeaderTitle?this.renderTitle():null,e=null!=this.extraContent?this.renderSwitch("includeExtraContent",this.extraContentLabel):null,o=this.showIncludeMap?this.renderSwitch("includeMap"):null,a=this.includeMap?this.renderMapOptions():null,r=this.renderPrint();return i("div",{class:"inline"===this.mode?"instant-apps-export__inline-container":"instant-apps-export__popover-container"},s,e,o,a,this.includeMap?i("calcite-button",{appearance:"transparent",width:"full",onClick:this.setMapAreaOnClick.bind(this),disabled:this.exportIsLoading},null===(t=this.messages)||void 0===t?void 0:t.setMapArea):null,i("calcite-button",{width:"full",onClick:this.exportOnClick.bind(this),disabled:this.exportIsLoading},null===(n=this.messages)||void 0===n?void 0:n.export),r)}renderTitle(){var t;return i("calcite-label",null,null===(t=this.messages)||void 0===t?void 0:t.title,i("calcite-input",{value:this.headerTitle,onCalciteInputInput:this.updateHeaderTitle.bind(this)}))}renderSwitch(t,n){var s;const e=null!=n?n:null===(s=this.messages)||void 0===s?void 0:s[t];return i("calcite-label",{layout:"inline-space-between"},e,i("calcite-switch",{checked:this[t],value:t,onCalciteSwitchChange:this.optionOnChange.bind(this)}))}renderMapOptions(){const t=this.showIncludeLegend?this.renderSwitch("includeLegend"):null,n=this.showIncludePopup?this.renderSwitch("includePopup"):null;return i("div",null,t,n)}renderPrint(){const t=this.includeMap?this.renderPrintMap():null,n=this.renderExtraContent(),s=this.includeMap&&this.showIncludeLegend?this.renderLegend():null,e=this.includeMap&&this.showIncludePopup?this.renderPopup():null;return i("div",{ref:t=>this.printContainerEl=t},i("div",{class:l,ref:t=>this.printEl=t},t,s,i("div",{class:h},e,n)))}renderPrintMap(){return i("div",{class:f,ref:t=>this.viewContainerEl=t},i("div",{class:m,ref:t=>this.viewWrapperEl=t},this.headerTitle?i("instant-apps-header",{titleText:this.headerTitle,backgroundColor:"#fff",textColor:"#323232"}):null,i("img",{class:g,ref:t=>this.viewEl=t}),i("div",{class:v,ref:t=>this.scaleBarContainerEl=t})))}renderLegend(){return i("div",{class:d,ref:t=>this.legendContainerEl=t})}renderCompass(){return i("div",{class:u,ref:t=>this.compassContainerEl=t})}renderPopup(){return i("div",{class:x,ref:t=>this.popupContainerEl=t},i("div",{ref:t=>this.popupTitleEl=t,class:_}),i("div",{ref:t=>this.popupContentEl=t,class:b}))}renderExtraContent(){return i("div",{class:c,id:"export-content",ref:t=>this.extraContainerEl=t})}optionOnChange(t){const{checked:n,value:i}=t.target;this[i]=n,this.updateExportOutput()}updateHeaderTitle(t){this.headerTitle=t.target.value,this.updateExportOutput()}async exportOnClick(){this.removeScreenshotElements(),await this.beforeExport(),null==this.viewWrapperEl||this.viewWrapperEl.contains(this.compassContainerEl)||this.viewWrapperEl.append(this.compassContainerEl),this.handleViewExportOnClick(),null!=this.popoverEl&&(this.popoverEl.open=!1)}async handleViewExportOnClick(){null!=this.view?(this.addPrintStyling(),document.body.prepend(this.printEl),this.handleExtraContent(),this.includeMap?(this.updateScaleBar(),this.updatePopupToPrint(),this.viewScreenshot(),this.handleImgLoaded()):this.handleImgLoaded()):null!=this.popoverEl&&(this.popoverEl.open=!1)}addPrintStyling(){null==this.printStyleEl&&(this.printStyleEl=document.createElement("style"),this.printStyleEl.innerHTML='\n @media print {\n @page {\n size: Portrait;\n margin: .25in;\n }\n\n html, body {\n padding: 0;\n margin: 0;\n height: 100%;\n width: 100%;\n }\n\n body > *:not(.instant-apps-export-print) { display: none; }\n }\n\n * {\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n }\n\n\n .instant-apps-export-print {\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: -999;\n color: #323232 !important;\n display: grid;\n gap: 24px;\n grid-auto-flow: row;\n --esri-calcite-mode-name: "light";\n }\n\n .instant-apps-export-print, .instant-apps-export-print * {\n box-sizing: border-box;\n }\n\n .instant-apps-export-print__view-section {\n height: 100%;\n }\n\n .instant-apps-export-print__view-container {\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n }\n\n .instant-apps-export-print__view-wrapper {\n height: fit-content;\n width: fit-content;\n position: relative;\n display: flex;\n flex-direction: column;\n border: 2pt solid #323232;\n overflow: hidden;\n }\n\n .instant-apps-export-print__view {\n object-fit: contain;\n }\n\n .instant-apps-export-print__popup-container {\n height: min-content;\n max-width: 350px;\n display: none;\n color: #323232;\n background: #fff;\n border: 1pt solid #323232;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__popup-title {\n border-bottom: 1pt solid #323232;\n }\n\n .instant-apps-export-print__popup-content {\n background: #fff;\n padding-top: 8pt;\n }\n\n .instant-apps-export-print__popup-content .esri-feature-media__chart {\n background: #fff;\n }\n\n .instant-apps-export-print__legend-container {\n height: min-content;\n background: #fff;\n overflow: unset;\n }\n\n .esri-legend--card, .esri-legend--card__service-content {\n flex-flow: row wrap;\n }\n\n .instant-apps-export-print .esri-widget > *:not(.esri-scale-bar.esri-widget > *) {\n background: #fff;\n color: #323232;\n }\n\n .instant-apps-export-print__popup-content * {\n color: #323232;\n }\n\n .instant-apps-export-print .esri-widget__heading {\n margin: 2pt 7pt;\n padding: 0;\n color: #323232;\n }\n\n .instant-apps-export-print .esri-legend__ramp-label:before {\n border-color: rgba(0,0,0,0) rgba(50,50,50,.8) rgba(0,0,0,0) rgba(0,0,0,0);\n }\n\n .instant-apps-export-print .esri-legend--card__section {\n padding: 4pt 0 4pt;\n min-width: unset;\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__section:first-child {\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service {\n border: none;\n flex: 0 1 auto;\n break-inside: avoid;\n }\n\n .instant-apps-export-print .esri-legend--card {\n border: none;\n gap: 6pt 12pt;\n }\n\n .instant-apps-export-print .esri-legend--card:not(:first-child),\n .instant-apps-export-print .esri-compass.esri-widget:not(:first-child) {\n display: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-container {\n height: unset;\n padding: 0;\n border-bottom: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-text {\n padding-bottom: 4px;\n }\n\n .instant-apps-export-print__compass-container {\n position: absolute;\n top: 65px;\n left: 15px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n --calcite-ui-icon-color: #000;\n border-radius: 50%;\n height: fit-content;\n }\n\n .instant-apps-export-print__compass-container .esri-compass {\n background: #fff;\n }\n\n .instant-apps-export-print__compass-container .esri-compass__icon.esri-icon-compass {\n color: #000;\n }\n\n .instant-apps-export-print__compass-container.esri-compass.esri-widget--button {\n background: #fff;\n }\n\n .instant-apps-export-print__scale-bar-container {\n width: 100%;\n position: absolute;\n bottom: 15px;\n margin: 0 15px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label {\n color: #323232;\n font-size: 10px;\n padding: 0 4px;\n }\n \n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label {\n height: 10px;\n padding: 0 2px;\n line-height: 11px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__bar-container:nth-child(1n+3) {\n display: none;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__bar-container.esri-scale-bar__bar-container--line {\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line {\n background-color: rgba(255, 255, 255, 0.66);\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top {\n width: var(--instant-apps-scale-bar-top) !important;\n border-bottom: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom {\n width: var(--instant-apps-scale-bar-bottom) !important;\n border-top: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label-container--line {\n position: unset;\n margin: 0 2px;\n background-color: rgba(255, 255, 255, 0.66);\n height: 10px;\n display: flex;\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:after,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:after {\n background-color: #323232;\n border-right: 2px solid #323232;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__item-navigation {\n display: none;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__chart.esri-feature-media__chart--rendered * {\n width: 100%!important;\n }\n\n .instant-apps-export-print__popup-content .esri-popup__content {\n margin: 0;\n }\n\n .instant-apps-export-print__content-container {\n display: flex;\n gap: 24px;\n break-inside: avoid;\n break-before: auto;\n }',document.body.prepend(this.printStyleEl))}handleImgLoaded(){this.exportIsLoading=!0,setTimeout((()=>{this.exportIsLoading=void 0,this.setupViewPrintElements()}),1500)}handleExtraContent(){const t=this.printEl.querySelector("#export-content");null!=t&&(t.innerHTML="",null!=this.extraContent&&this.includeExtraContent?(t.style.display="block",t.append(this.extraContent.cloneNode(!0))):t.style.display="none")}resetPrintContent(){var t,n;if(null!=this.view){this.screenshot=null,null===(t=this.printContainerEl)||void 0===t||t.prepend(this.printEl),null===(n=this.printStyleEl)||void 0===n||n.remove(),this.printStyleEl=void 0;const i=this.printEl.querySelector("#export-content");i&&(i.innerHTML="")}}async updatePopupToPrint(){var t,n;if(null!=this.view&&(null!=this.popupContainerEl&&(this.popupContainerEl.style.display=this.includePopup&&this.view.popup.visible?"block":"none",this.checkPopupOpen()),this.view.popup.visible&&null!=this.view.popup.selectedFeature)){const i=document.createElement(`h${null!==(t=this.view.popup.headingLevel)&&void 0!==t?t:2}`);i.innerHTML=null!==(n=this.view.popup.title)&&void 0!==n?n:"",i.className="esri-widget__heading esri-popup__header-title",null!=this.popupTitleEl&&(this.popupTitleEl.style.display=this.view.popup.title?"block":"none",this.popupTitleEl.innerHTML="",this.popupTitleEl.prepend(i))}}updateExportOutput(){this.output={},this.showHeaderTitle&&(this.output.headerTitle=this.headerTitle),this.showIncludeLegend&&(this.output.includeLegend=this.includeLegend),this.showIncludeMap&&(this.output.includeMap=this.includeMap),this.showIncludePopup&&(this.output.includePopup=this.includePopup),this.exportOutputUpdated.emit()}setupViewPrintElements(){if(null!=this.view){this.handleLegendSetup();const t=document.title;this.showHeaderTitle&&this.headerTitle&&(document.title=this.headerTitle),window.print(),document.title=t,setTimeout((()=>{this.resetPrintContent()}),1e3)}}handleLegendSetup(){var t;if(this.showIncludeLegend&&null!=this.view&&this.includeMap&&null!=this.legendContainerEl){const n=null!=this.legend&&(null===(t=this.legend.activeLayerInfos)||void 0===t?void 0:t.length)>0;this.legendContainerEl.style.display=this.includeLegend&&n?"block":"none"}}handleWidgetCreation(){this.includeMap&&(this.handleLegendCreation(),this.handleCompassCreation())}handleIncludePopup(){var t,n;if(this.showIncludePopup){const i="includePopup";null===(t=this.handles)||void 0===t||t.remove(i),null===(n=this.reactiveUtils)||void 0===n||n.whenOnce((()=>{var t;return null===(t=this.view)||void 0===t?void 0:t.ready})).then((()=>{var t;null===(t=this.handles)||void 0===t||t.add(this.reactiveUtils.watch((()=>{var t,n;return null===(n=null===(t=this.view)||void 0===t?void 0:t.popup)||void 0===n?void 0:n.visible}),(t=>{this.includePopup=t})),i)}))}}handleLegendCreation(){var t,n,i,s,e;if(null!=this.view&&this.showIncludeLegend&&null!=this.legendContainerEl){const o=this.view.map,a=null===(n=null===(t=this.legend)||void 0===t?void 0:t.view)||void 0===n?void 0:n.map;null!=(null===(i=null==o?void 0:o.portalItem)||void 0===i?void 0:i.id)&&(null===(s=null==o?void 0:o.portalItem)||void 0===s?void 0:s.id)===(null===(e=null==a?void 0:a.portalItem)||void 0===e?void 0:e.id)||this.updateLegend()}}updateLegend(){var t;null===(t=this.view)||void 0===t||t.when((async t=>{if(null!=this.legend&&(this.legend.destroy(),this.legend=null),null!=this.legendContainerEl){this.legendContainerEl.innerHTML="";const n=document.createElement("div");this.legendContainerEl.append(n);const[i]=await o(["esri/widgets/Legend"]);this.legend=new i({container:n,view:t,style:{type:"card",layout:"side-by-side"}})}}))}handleCompassCreation(){var t,n,i,s;if(null!=this.view&&null!=this.compassContainerEl){const e=this.view.map,o=null===(n=null===(t=this.compass)||void 0===t?void 0:t.view)||void 0===n?void 0:n.map;(null===(i=null==e?void 0:e.portalItem)||void 0===i?void 0:i.id)===(null===(s=null==o?void 0:o.portalItem)||void 0===s?void 0:s.id)||this.updateCompass()}}updateCompass(){var t;null===(t=this.view)||void 0===t||t.when((async t=>{var n;null===(n=this.compass)||void 0===n||n.destroy(),this.compass=null;const i=document.createElement("div");this.compassContainerEl.append(i);const[s]=await o(["esri/widgets/Compass"]);this.compass=new s({container:i,view:t})}))}updateScaleBar(){if(this.scaleBarContainerEl&&null!=this.view&&(this.scaleBarContainerEl.innerHTML="",this.showScaleBar)){const t=this.view.ui.getComponents(),n=null==t?void 0:t.find((({container:t})=>{var n;return null===(n=null==t?void 0:t.className)||void 0===n?void 0:n.includes("esri-scale-bar")}));null!=(null==n?void 0:n.container)&&"string"!=typeof n.container&&this.scaleBarContainerEl.append(n.container.cloneNode(!0))}}async viewScreenshot(){var t;if(null!=this.view&&this.includeMap&&(null==this.screenshot&&(null===(t=this.scaleBarContainerEl)||void 0===t||t.classList.toggle("instant-apps-export-print__scale-bar-container--position",this.view.width>1e3),this.screenshot=await this.view.takeScreenshot({width:2*this.view.width,height:2*this.view.height})),this.handleScaleBarSize(),null!=this.viewEl&&null!=this.viewWrapperEl)){const{height:t,width:n}=this.screenshot.data;t>n?this.setMaxRowHeightOnViewContainer():this.setMaxWidthOnViewContainer(),this.viewEl.src=this.screenshot.dataUrl}}setMaxRowHeightOnViewContainer(){this.printEl.style.gridTemplateRows="minmax(auto, 70%)",this.viewEl.style.height="100%",this.viewEl.style.width="",this.viewWrapperEl.style.height="100%",this.viewWrapperEl.style.width="fit-content"}setMaxWidthOnViewContainer(){this.printEl.style.gridTemplateRows="",this.viewEl.style.width="100%",this.viewEl.style.height="",this.viewWrapperEl.style.height="fit-content",this.viewWrapperEl.style.width="100%"}checkPopupOpen(){if(null!=this.view){const t=this.view.popup.container,n=null==t?void 0:t.querySelector(".esri-popup .esri-feature__main-container");if(null!=n){const t=n.querySelectorAll("canvas");this.popupContentEl.innerHTML="",this.popupContentEl.append(n.cloneNode(!0));const i=this.popupContentEl.querySelectorAll("canvas");t.forEach(((t,n)=>{var s;const e=t.toDataURL(),o=document.createElement("img");o.src=e;const a=t.getAttribute("style");a&&o.setAttribute("style",a);const r=i[n];null!=r&&(r.replaceWith(o),document.querySelector("link[href*='esri/themes/dark/main.css']")&&null!=(null===(s=o.parentElement)||void 0===s?void 0:s.parentElement)&&(o.parentElement.style.background="#242424",o.parentElement.parentElement.style.background="#242424"))}))}}}createScreenshot(){var t,n;if(null!=this.view){this.screenshotPreview=document.createElement("div"),this.screenshotPreview.className="screenshot-preview hide",this.screenshotImgContainer=document.createElement("div"),this.screenshotImgContainer.className="screenshot-img-container",this.screenshotImg=document.createElement("img");const i=document.createElement("div"),s=document.createElement("calcite-button"),e=document.createElement("calcite-button");s.innerHTML=null===(t=this.messages)||void 0===t?void 0:t.export,e.innerHTML=null===(n=this.messages)||void 0===n?void 0:n.returnToMap,e.appearance="outline-fill",s.onclick=this.exportOnClick.bind(this),e.onclick=this.screenshotReturn.bind(this),i.append(e,s),this.screenshotImgContainer.append(this.screenshotImg,i),this.screenshotPreview.append(this.screenshotImgContainer),this.view.container.append(this.screenshotPreview)}}createMaskDiv(){null!=this.view&&(this.maskDivEl=document.createElement("div"),this.maskDivEl.id="screenshot-mask",this.maskDivEl.className="hide screenshot-cursor",this.maskDivEl.style.setProperty("--instant-apps-screenshot-mask-background",this.maskBackground),this.maskDivEl.style.setProperty("--instant-apps-screenshot-mask-border",this.maskBorder),this.screenshotStyle=document.createElement("style"),this.screenshotStyle.innerHTML="\n.screenshot-preview.hide, .hide {\n display: none;\n}\n\n.screenshot-cursor {\n cursor: crosshair;\n}\n\n.relative {\n position: relative;\n}\n\n#screenshot-mask {\n position: absolute;\n background: var(--instant-apps-screenshot-mask-background);\n border: var(--instant-apps-screenshot-mask-border);\n}\n\n.screenshot-preview {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n text-align: center;\n background-color: rgba(0, 0, 0, 0.75);\n}\n\n.screenshot-preview * {\n box-sizing: border-box;\n}\n\n.screenshot-img-container img {\n max-height: 75%;\n max-width: 75%;\n object-fit: contain;\n border: 10px solid white;\n box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.5);\n margin-bottom: 0.5em;\n}\n\n.screenshot-img-container {\n height: 100%;\n width: 100%;\n overflow-y: auto;\n margin-bottom: 8px;\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n}\n\n.screenshot-img-container calcite-button {\n margin: 5px;\n}",this.view.container.append(this.screenshotStyle),this.view.container.append(this.maskDivEl))}screenshotReturn(){this.removeScreenshotElements(),this.exportIsLoading=!1,this.screenshot=null}setMapAreaOnClick(){null!=this.view&&(this.exportIsLoading=!0,this.createMaskDiv(),this.createScreenshot(),this.view.container.classList.add("screenshot-cursor","relative"),this.view.addHandles(this.view.on("drag",(async t=>{null!=this.view&&(t.stopPropagation(),"end"!==t.action?this.updateMaskSize(t):this.maskScreenshot())})),w))}updateMaskSize(t){if(null!=this.view){const n=this.clamp(Math.min(t.origin.x,t.x),0,this.view.width),i=this.clamp(Math.max(t.origin.x,t.x),0,this.view.width),s=this.clamp(Math.min(t.origin.y,t.y),0,this.view.height),e=this.clamp(Math.max(t.origin.y,t.y),0,this.view.height);this.area={x:n,y:s,width:i-n,height:e-s},this.setMaskPosition(this.area)}}maskScreenshot(){var t;if(null!=this.view&&null!=this.area){this.view.removeHandles(w);const n=this.area.height,i=this.area.width;this.showScaleBar&&(null===(t=this.scaleBarContainerEl)||void 0===t||t.classList.toggle("instant-apps-export-print__scale-bar-container--position",this.view.width>1e3&&.75*this.view.width<i)),this.view.takeScreenshot({area:this.area,width:2*i,height:2*n,format:"jpg"}).then((t=>{var n;this.screenshot=t,this.showPreview(),null===(n=this.view)||void 0===n||n.container.classList.remove("screenshot-cursor"),this.setMaskPosition(null)}))}}setMaskPosition(t){null!=t?(this.maskDivEl.classList.remove("hide"),this.maskDivEl.style.left=`${t.x}px`,this.maskDivEl.style.top=`${t.y}px`,this.maskDivEl.style.width=`${t.width}px`,this.maskDivEl.style.height=`${t.height}px`):this.maskDivEl.remove()}clamp(t,n,i){return t<n?n:t>i?i:t}showPreview(){this.screenshotPreview.classList.remove("hide"),null!=this.screenshotImg&&null!=this.screenshot&&(this.screenshotImg.src=this.screenshot.dataUrl)}handleScaleBarSize(){var t;if(this.showScaleBar&&"2d"===(null===(t=this.view)||void 0===t?void 0:t.type)&&null!=this.scaleBarContainerEl){const t=this.scaleBarContainerEl.querySelector(".esri-scale-bar__line--top"),n=this.scaleBarContainerEl.querySelector(".esri-scale-bar__line--bottom");this.setScalebarWidth(t,"top"),this.setScalebarWidth(n,"bottom")}}setScalebarWidth(t,n){var i;if(null!=t&&null!=this.screenshot){const s=this.screenshot.data.width/2,e=Number(t.style.width.replace("px",""));null===(i=this.scaleBarContainerEl)||void 0===i||i.style.setProperty(`--instant-apps-scale-bar-${n}`,e/s*100+"%")}}removeScreenshotElements(){var t,n;null===(t=this.screenshotPreview)||void 0===t||t.remove(),null===(n=this.screenshotStyle)||void 0===n||n.remove()}get el(){return e(this)}static get watchers(){return{includeMap:["watchIncludeMap"],view:["watchView"]}}};k.style=":host{display:block;--instant-apps-export-action-background:var(--calcite-color-foreground-1);--instant-apps-export-action-background-hover:var(--calcite-color-foreground-2);--instant-apps-export-action-background-press:var(--calcite-color-foreground-3);--instant-apps-export-action-height:100%;--instant-apps-export-action-width:fit-content;--instant-apps-export-action-icon-color:var(--calcite-color-text-3);--instant-apps-export-action-icon-hover-color:var(--calcite-color-text-1);--instant-apps-export-background:var(--calcite-color-foreground-1);--instant-apps-export-text-color:var(--calcite-color-text-1);--instant-apps-export-popover-width:250px}.instant-apps-export{height:100%}.instant-apps-export *{box-sizing:border-box}.instant-apps-export__popover-container,.instant-apps-export__inline-container{padding:12px;background:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export__popover-container{width:var(--instant-apps-export-popover-width)}.instant-apps-export calcite-action{height:var(--instant-apps-export-action-height);width:var(--instant-apps-export-action-width);--calcite-color-foreground-1:var(--instant-apps-export-action-background);--calcite-color-foreground-2:var(--instant-apps-export-action-background-hover);--calcite-color-foreground-3:var(--instant-apps-export-action-background-press);--calcite-color-text-3:var(--instant-apps-export-action-icon-color);--calcite-color-text-1:var(--instant-apps-export-action-icon-hover-color)}.instant-apps-export .instant-apps-export-print{display:none}.instant-apps-export__visually-hidden{position:absolute;top:0;z-index:-1;visibility:hidden}.instant-apps-export calcite-input{--calcite-color-foreground-1:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export calcite-popover{--calcite-color-foreground-1:var(--instant-apps-export-background)}.instant-apps-export calcite-switch{--calcite-color-foreground-1:#fff;--calcite-color-foreground-2:#f3f3f3}.instant-apps-export calcite-button:last-of-type{margin-top:0.5rem}.instant-apps-export .calcite-mode-dark calcite-switch{--calcite-color-foreground-1:#2b2b2b;--calcite-color-foreground-2:#202020}.instant-apps-export__compass-container.esri-widget{background:#fff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.instant-apps-export__compass-container.esri-widget .esri-compass__icon.esri-icon-compass{color:#6e6e6e}.hide{display:none}.screenshotCursor{cursor:crosshair}";export{k as instant_apps_export}
@@ -1,6 +0,0 @@
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 e,h as a,H as s,g as i}from"./p-fa1ceaf9.js";import{g as n}from"./p-89f6ff72.js";import{S as h}from"./p-a230b270.js";import{w as o}from"./p-04674a1e.js";import{g as r}from"./p-a42ff7fe.js";import"./p-c4160bf7.js";const d={base:"instant-apps-header--standard",headerContainer:"instant-apps-header__header-container",headerContent:"instant-apps-header__header-content",flipRtl:"instant-apps-header--rtl",logoScale:"instant-apps-header__logo-scale--",logoHeight:"instant-apps-header__logo-height--",standardHeight:"instant-apps-header__standard-height",actionsEndContainer:"instant-apps-header__actions-end-container",alignment:{center:"instant-apps-header__header-content--center",right:"instant-apps-header__header-content--right"}},p=class{constructor(a){t(this,a),this.infoIsOpenChanged=e(this,"infoIsOpenChanged",6),this._sanitizer=new h({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this.dir=void 0,this.titleText=void 0,this.titleTextLink=void 0,this.backgroundColor=void 0,this.textColor=void 0,this.logoImage=void 0,this.logoScale="m",this.logoImageAltText=void 0,this.logoLink=void 0,this.infoButton=!1,this.infoIsOpen=!1,this.infoTitleText=void 0,this.customHeaderHtml=void 0,this.headerAlignment="left",this.customHeaderCss=void 0,this.fontFamily="var(--calcite-sans-family);",this.mobileWidthBreakpoint=o.medium[1],this.initialScale="m"}sanitizeCustomHeaderHtml(){this.customHeaderHtml=this._sanitizer.sanitize(this.customHeaderHtml)}componentWillLoad(){this.dir=n(this.el),this.handleMobileBreakpoints(),this.dir=n(this.el),this.customHeaderHtml=this._sanitizer.sanitize(this.customHeaderHtml)}render(){var t,e,i,n;const h="undefined"===this.logoImage||"undefined"===(null===(e=null===(t=this.logoImage)||void 0===t?void 0:t.split("?"))||void 0===e?void 0:e[0])||""===(null===(n=null===(i=this.logoImage)||void 0===i?void 0:i.split("?"))||void 0===n?void 0:n[0])||!this.logoImage,o=this.renderLogo(h),p=this.renderTitle(),l="right"===this.headerAlignment||"center"===this.headerAlignment?d.headerContent.concat(" ",d.alignment[this.headerAlignment]):d.headerContent,c=r(this.fontFamily);return a(s,{key:"f93285efa9fe03f2cdedfe0e870f7cb44802e151"},this.customHeaderHtml?[a("style",null,this.customHeaderCss),a("div",{id:"customHeader",innerHTML:this.customHeaderHtml})]:a("header",{class:`${d.base}${"rtl"===this.dir?` ${d.flipRtl}`:""}${this.logoImage&&!h?` ${d.logoHeight}${this.logoScale}`:` ${d.standardHeight}`}`,style:{backgroundColor:this.backgroundColor,fontFamily:c}},a("div",{class:d.headerContainer},a("span",{class:l},o,p,this.infoButton?a("calcite-button",{style:{"--calcite-color-text-1":this.textColor},id:"infoButton",alignment:"start",appearance:"transparent",kind:"neutral","icon-start":"information-f",scale:"s",label:this.infoTitleText,title:this.infoTitleText,onClick:this.toggleInfo.bind(this)}):null),a("div",{class:d.actionsEndContainer},a("slot",{name:"actions-end"})))))}renderLogo(t){return t?"":this.logoImage&&this.logoLink?a("a",{href:`${this.logoLink}`,target:"_blank"},a("img",{class:`${d.logoScale}${this.logoScale}`,src:`${this.logoImage}`,alt:`${this.logoImageAltText}`})):this.logoImage?a("img",{class:`${d.logoScale}${this.logoScale}`,src:`${this.logoImage}`,alt:this.logoImageAltText}):""}renderTitle(){return this.titleText&&this.titleTextLink?a("a",{style:{color:this.textColor},href:`${this.titleTextLink}`,rel:"noopener noreferrer",target:"_blank"},a("h1",{style:{color:this.textColor}},this.titleText)):a("h1",{style:{color:this.textColor}},this.titleText)}toggleInfo(){this.infoIsOpen=!this.infoIsOpen,this.infoIsOpenChanged.emit(this.infoIsOpen)}mqlCallback(){return t=>{const{matches:e}=t;this.logoScale=e?"s":this.initialScale}}handleMobileBreakpoints(){this.initialScale=this.logoScale;const t=window.matchMedia(`(max-width: ${this.mobileWidthBreakpoint}px)`);t.matches&&(this.logoScale="s"),t.addEventListener("change",this.mqlCallback())}get el(){return i(this)}static get watchers(){return{customHeaderHtml:["sanitizeCustomHeaderHtml"]}}};p.style=":host{--instant-apps-header-height:auto;--instant-apps-header-min-height:50px;--instant-apps-header-title-text-link-decoration:underline;--instant-apps-header-height--logo-scale--s:55px;--instant-apps-header-logo-width--logo-scale--s:35px;--instant-apps-header-logo-height--logo-scale--s:35px;--instant-apps-header-height--logo-scale--m:70px;--instant-apps-header-logo-width--logo-scale--m:50px;--instant-apps-header-logo-height--logo-scale--m:50px;--instant-apps-header-height--logo-scale--l:80px;--instant-apps-header-logo-width--logo-scale--l:60px;--instant-apps-header-logo-height--logo-scale--l:60px;--instant-apps-header-actions-end-height:auto;width:100%}:host .image.image_resized img{width:100%}:host .instant-apps-header--standard{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family);min-height:var(--instant-apps-header-min-height)}:host .instant-apps-header--standard .instant-apps-header__header-container{display:flex;align-items:center;width:100%;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container slot{display:flex;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*){display:flex;min-height:var(--instant-apps-header-min-height);height:var(--instant-apps-header-height)}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*) calcite-button{height:100%}:host .instant-apps-header--standard .instant-apps-header__header-content{box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;height:inherit;padding:5px 10px}:host .instant-apps-header--standard .instant-apps-header__header-content a{display:flex;align-items:center;-webkit-text-decoration:var(--instant-apps-header-title-text-link-decoration);text-decoration:var(--instant-apps-header-title-text-link-decoration)}:host .instant-apps-header--standard .instant-apps-header__header-content a img{padding-right:0}:host .instant-apps-header--standard .instant-apps-header__header-content img{margin:10px}:host .instant-apps-header--standard .instant-apps-header__header-content h1{margin:0;font-size:1.25rem;color:var(--calcite-color-text-1);font-weight:430;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-header--standard .instant-apps-header__header-content #infoButton{margin-inline-start:10px}:host .instant-apps-header--standard .instant-apps-header__header-content--center{justify-content:center}:host .instant-apps-header--standard .instant-apps-header__header-content--right{justify-content:end}:host .instant-apps-header__logo-height--s{height:var(--instant-apps-header-height--logo-scale--s)}:host .instant-apps-header__logo-height--s .instant-apps-header__header-content h1{font-size:1.125rem}:host .instant-apps-header__logo-scale--s{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}:host .instant-apps-header__logo-height--m{height:var(--instant-apps-header-height--logo-scale--m)}:host .instant-apps-header__logo-scale--m{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}:host .instant-apps-header__logo-height--l{height:var(--instant-apps-header-height--logo-scale--l)}:host .instant-apps-header__logo-height--l .instant-apps-header__header-content h1{font-size:1.375rem}:host .instant-apps-header__logo-scale--l{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}:host .instant-apps-header__actions-end-container{height:var(--instant-apps-header-actions-end-height);display:flex}:host .instant-apps-header__sign-in-container{height:inherit;display:flex;align-items:center}:host .instant-apps-header__sign-in-container calcite-dropdown,:host .instant-apps-header__sign-in-container calcite-navigation-user{height:100%}:host .instant-apps-header__sign-in-container calcite-button{margin:0 10px}:host .instant-apps-header__sign-in-container calcite-dropdown-group{min-width:140px}";export{p as instant_apps_header}
@@ -1,6 +0,0 @@
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 o,h as i,H as e,g as a}from"./p-fa1ceaf9.js";import{g as l}from"./p-49250010.js";import"./p-d029b513.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const s=class{constructor(i){t(this,i),this.measureActive=o(this,"measureActive",7),this.messages=void 0,this.view=void 0,this.areaUnit=void 0,this.linearUnit=void 0,this.coordinateFormat=void 0,this.activeToolType=void 0,this.closable=!1}async componentWillLoad(){l(this)}componentDidLoad(){}render(){var t;return i(e,{key:"7a579ade6dca5d875e5dac86e1ef23778babd570"},i("calcite-panel",{key:"91593087bbf31b2ec252d802962e8ece7246c7d6",heading:null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.label,closable:this.closable},i("div",{key:"628cb313218c45b1375ab96d1d9b349f07d02a75"},this.renderActionPad()),this.renderMeasureToolPanel()))}renderMeasureToolPanel(){const{view:t,coordinateFormat:o,areaUnit:e,linearUnit:a,activeToolType:l}=this;return i("calcite-panel",{class:"instant-apps-measurement__content"},i("instant-apps-measurement-tool",{ref:t=>{this.measureTool=t},view:t,measureConfiguration:{coordinateFormat:o,areaUnit:e,linearUnit:a,activeToolType:l}}))}renderActionPad(){const{messages:t,activeToolType:o}=this;return i("calcite-action-pad",{"expand-disabled":!0,layout:"horizontal",position:"end"},i("calcite-action",{class:"distance"===o?"active-tool":"",text:null==t?void 0:t.line,icon:"measure",scale:"m","data-value":"distance",onClick:this._handleToolClick.bind(this)},i("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.line)),i("calcite-action",{class:"area"===o?"active-tool":"",text:null==t?void 0:t.area,scale:"m",icon:"measure-area","data-value":"area",onClick:this._handleToolClick.bind(this)},i("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.area)),i("calcite-action",{class:"point"===o?"active-tool":"",text:null==t?void 0:t.point,scale:"m",icon:"pin-plus","data-value":"point",onClick:this._handleToolClick.bind(this)},i("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.point)),i("calcite-action",{text:null==t?void 0:t.clear,scale:"m",icon:"trash","data-value":"clear",onClick:this._handleToolClick.bind(this)},i("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.clear)))}_handleToolClick(t){var o,i,e,a;if(!(null==this?void 0:this.measureTool))return;const l=null===(o=null==t?void 0:t.target)||void 0===o?void 0:o.dataset.value;this.measureTool.activeTool=l;const s=document.getElementsByClassName("active-tool");for(let t=0;t<(null==s?void 0:s.length);t++)null===(e=null===(i=s[t])||void 0===i?void 0:i.classList)||void 0===e||e.remove("active-tool");null===(a=null==t?void 0:t.target)||void 0===a||a.classList.add("active-tool"),this.measureActive.emit(void 0!==l&&"clear"!==l)}get el(){return a(this)}};s.style=".sc-instant-apps-measurement-h .sc-instant-apps-measurement.sc-instant-apps-measurement{background:var(--calcite-color-foreground-1)}.sc-instant-apps-measurement-h .active-tool.sc-instant-apps-measurement{--calcite-color-foreground-1:#c7eaff}";export{s as instant_apps_measurement}
@@ -1,6 +0,0 @@
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,h as o,g as s}from"./p-fa1ceaf9.js";import{g as e}from"./p-7fe77355.js";import{l}from"./p-d029b513.js";import{a as n}from"./p-49250010.js";import{g as a,f as d}from"./p-42ea2581.js";import"./p-8c6d9b5a.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const r=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.messages=void 0,this.selectedLanguage=null,this.t9nData=null}async componentWillLoad(){var t,i,o,s,r,c,h,u,v,p,w,m;const[f,g,b]=await l(["esri/intl","esri/WebMap","esri/request"]);this.intl=f,this.request=b,this.messages=await e(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await a(this.portalItem);const t=await d(b,this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const e=new URLSearchParams(window.location.search).get("locale"),l=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===e)))||void 0===o?void 0:o.length)>0,a=n(f,this.portalItem.portal),d=(null===(c=null===(r=null===(s=this.locales)||void 0===s?void 0:s.map((t=>null==t?void 0:t.locale)))||void 0===r?void 0:r.filter((t=>t===a)))||void 0===c?void 0:c.length)>0;this.selectedLanguage=l?e:d?a:this.userLocale;const b=this.selectedLanguage;if(b!==this.userLocale&&(this.calciteDropdownItemSelectCallback(b)(),this.selectedLanguageUpdated.emit({locale:b,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[b])&&void 0!==u?u:null})),this.view){const t=this.view.map;this.defaultWebMapId=null===(v=null==t?void 0:t.portalItem)||void 0===v?void 0:v.id;const i=null===(m=null===(w=null===(p=this.locales)||void 0===p?void 0:p.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===w?void 0:w[0])||void 0===m?void 0:m.webmap;i&&(this.view.map=new g({portalItem:{id:i}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),s=this.renderDefaultLocale();return o("calcite-dropdown",{key:"04fe84d0c2f2eb750b0882ff4f35c29a849c32fb",onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down","width-scale":"m"},t,s,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,s,e,n;this.selectedLanguage=t;const{intl:a,selectedLanguage:d,t9nData:r,userLocale:c}=this,h=this.locales.filter((t=>t.locale===d))[0];d!==c&&(h.data=r[t]);const u=new URLSearchParams(window.location.search);if(d!==c?u.set("locale",this.selectedLanguage):u.delete("locale"),a.setLocale(d),this.view){const[t]=await l(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===d)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(n=null===(e=null===(s=this.view)||void 0===s?void 0:s.map)||void 0===e?void 0:e.portalItem)||void 0===n?void 0:n.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",this.selectedLanguage),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${u}`)),this.selectedLanguageUpdated.emit(h)}}getSelectedLanguageText(t){const{messages:i}=this,o=null==i?void 0:i.translatedLanguageNames,s=null==i?void 0:i.languages;return`${null==o?void 0:o[t]} - ${null==s?void 0:s[t]}`}async refresh(){try{const t=await a(this.portalItem),i=await d(this.request,t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return s(this)}};r.style=":host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand:var(--calcite-color-text-3);--calcite-color-brand-hover:var(--calcite-color-text-3)}";export{r as instant_apps_language_switcher}
@@ -1,6 +0,0 @@
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 a,c as t,h as n,H as s,F as e,g as i}from"./p-fa1ceaf9.js";import{g as r,a as l,s as o,E as c,b as p,l as g,c as u}from"./p-7fe77355.js";import{l as d}from"./p-d029b513.js";import{c as h}from"./p-49250010.js";import{g as v,f as m}from"./p-42ea2581.js";import"./p-8c6d9b5a.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const _="instant-apps-language-translator",b={BASE:_,header:`${_}__header`,headerText:`${_}__header-text`,savingIndicator:`${_}__saving-indicator`,closeButton:`${_}__close-button`,headerTip:`${_}__header-tip`,topBar:`${_}__top-bar`,topBarSection:`${_}__top-bar-section`,collapseSearchContainer:`${_}__collapse-search-container`,userLangText:`${_}__user-lang-text`,lastItem:`${_}--last-item`,writingIcon:`${_}__writing-icon`},f=class{constructor(n){a(this,n),this.translatorDataUpdated=t(this,"translatorDataUpdated",7),this.portalItem=void 0,this.appSettings=void 0,this.locales=void 0,this.open=!1,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0,this.saving=!1,this.messages=void 0,this.isCollapse=!0}handleT9nItemUpdate(){this.translatorDataUpdated.emit()}handleLocaleChange(){this.initUIData(),this.initSelectLanguage()}handleAppSettings(){this.initUIData(),this.initSelectLanguage()}async componentDidLoad(){this.initialize()}async initialize(){const[a,t]=await d(["esri/intl","esri/request"]);this.intl=a,this.request=t,await this.initMessages(),this.initUIData(),this.initPortalItemResourceT9nData(),this.initSelectLanguage()}async initMessages(){try{const{el:a}=this,t=await r(a);return this.messages=t,Promise.resolve()}catch(a){return Promise.reject()}}initUIData(){const{appSettings:a,locales:t}=this,n=l(a,t);o.set("uiData",n)}initSelectLanguage(){var a,t;if(!this.intl)return;const{locales:n}=this,s=null!==(t=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.locale)&&void 0!==t?t:this.intl.getLocale(),e=o.get("currentLanguage");0===this.locales.filter((a=>a.locale===e)).length&&o.set("currentLanguage",s)}async initPortalItemResourceT9nData(){try{const a=await v(this.portalItem);o.set("portalItemResource",a);const t=await m(this.request,a);o.set("portalItemResourceT9n",null!=t?t:{})}catch(a){}}render(){return n(s,{key:"fc32ca4cd8da2d20de670b77e7e6e324fbe15e80"},this.renderModal(),this.renderPopoverTip())}renderModal(){return n("calcite-modal",{open:this.open,scale:"l",fullscreen:!0,onCalciteModalClose:this.close.bind(this)},this.renderHeader(),this.renderContent(),this.renderPrimaryButton())}renderPopoverTip(){var a;return n("calcite-popover",{label:"",referenceElement:"headerTip",placement:"trailing","auto-close":!0,closable:!0},n("div",{class:b.headerTip},null===(a=this.messages)||void 0===a?void 0:a.headerTip))}renderHeader(){const a=o.get("saving");return n("header",{class:b.header,slot:"header"},this.renderHeaderText(),a?this.renderSavingIndicator():null)}renderHeaderText(){const{messages:a}=this;return n("div",{class:b.headerText},n("span",null,null==a?void 0:a.header),n("calcite-button",{id:"headerTip",appearance:"transparent"},n("calcite-icon",{icon:c.Popover,scale:"s"})))}renderSavingIndicator(){var a;const t=o.get("saving"),s=null===(a=this.messages)||void 0===a?void 0:a.saving;return n("div",{class:b.savingIndicator},t?n("calcite-loader",{label:s,inline:!0}):null,n("span",null,s))}renderContent(){const a=p(this.locales);return n("div",{slot:"content"},this.renderTopBar(),(null==a?void 0:a.length)>0?this.renderUIData():this.renderNotice())}renderTopBar(){return n("div",{class:b.topBar},this.renderLeadingTopBarSection(),this.renderTrailingTopBarSection())}renderLeadingTopBarSection(){return n("div",{class:b.topBarSection},this.renderUserLocale(),this.renderCollapseSearchContainer())}renderUserLocale(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.languages,s=h(this.el);return n("div",{class:b.userLangText},null==t?void 0:t[s])}renderCollapseSearchContainer(){return n("div",{class:b.collapseSearchContainer},this.renderExpandCollapseButton(),this.renderSearch())}renderExpandCollapseButton(){const{isCollapse:a,messages:t}=this,s=a?null==t?void 0:t.collapseAll:null==t?void 0:t.expandAll;return n(e,null,n("slot",{name:"primary-custom-action"}),n("slot",{name:"secondary-custom-action"}),n("calcite-button",{onClick:this.handleExpandCollapseAll.bind(this),appearance:"transparent","icon-start":c.ExpandCollapse},s))}renderSearch(){var a;return n("instant-apps-language-translator-search",{onSuggestionSelected:this.onSuggestionSelect.bind(this),t9nPlaceholder:null===(a=this.messages)||void 0===a?void 0:a.searchPlaceholder})}renderTrailingTopBarSection(){return n("div",{class:b.topBarSection},this.renderLanguageSelection(),n("slot",{name:"translation-custom-action"}))}renderLanguageSelection(){var a;return n("calcite-label",{layout:"inline"},null===(a=this.messages)||void 0===a?void 0:a.translatedLanguage,n("calcite-select",{label:"",onCalciteSelectChange:this.handleLanguageSelection.bind(this)},this.renderTranslatedLangOptions()))}renderTranslatedLangOptions(){const a=o.get("uiData"),t=null==a?void 0:a.get("locales"),s=p(t);return null==s?void 0:s.map((a=>{const{messages:t}=this,s=null==t?void 0:t.translatedLanguageNames,e=null==t?void 0:t.languages;return n("calcite-option",{key:`translated-lang-option-${a}`,value:a},`${null==s?void 0:s[a]} - ${null==e?void 0:e[a]}`)}))}renderUIData(){if(!(null==g?void 0:g.uiData))return;const a=u();return n("div",null,null==a?void 0:a.map(((t,n)=>this.renderUIDataItem(t,n,a.length))))}renderNotice(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.noLanguage;return n("calcite-notice",{open:!0,icon:"exclamation-mark-triangle",kind:"warning"},n("div",{slot:"title"},null==t?void 0:t.title),n("div",{slot:"message"},null==t?void 0:t.message))}renderUIDataItem(a,t,s){var e,i;const r=null===(i=null===(e=this.appSettings)||void 0===e?void 0:e.translatedLanguageLabels)||void 0===i?void 0:i[g.currentLanguage],l=`${t===s-1?b.lastItem:""}`,o=this.appSettings.content.filter((t=>t.id===a))[0];return n("instant-apps-language-translator-item",{key:`${a}-${t}`,class:l,fieldName:a,translatedLanguageLabels:r,setting:o,userLocaleInputOnChangeCallback:this.userLocaleInputOnChangeCallback,translatedLocaleInputOnChangeCallback:this.translatedLocaleInputOnChangeCallback})}renderPrimaryButton(){var a;return n("calcite-button",{onClick:()=>this.open=!1,slot:"primary",class:b.closeButton},null===(a=this.messages)||void 0===a?void 0:a.close)}handleExpandCollapseAll(){this.isCollapse=!this.isCollapse;const a=new Map(g.uiData);u().forEach((t=>a.get(t).expanded=this.isCollapse)),o.set("uiData",a)}onSuggestionSelect(a){const t=a.detail,n=new Map(g.uiData);u().forEach((a=>{n.get(a).selected=a===t})),o.set("uiData",n)}close(){this.open=!1}handleLanguageSelection(a){o.set("currentLanguage",a.target.value)}async getTranslationData(){return o.get("portalItemResourceT9n")}async setTranslationData(a){return o.set("portalItemResourceT9n",a)}async getPortalItemResource(){return o.get("portalItemResource")}async batchWriteToPortalItemResource(a){o.set("saving",!0);try{const t=await this.getPortalItemResource(),n=JSON.stringify(a),s=new Blob([n],{type:"application/json"});return await t.update(s),setTimeout((()=>o.set("saving",!1)),1500),this.translatorDataUpdated.emit(),Promise.resolve()}catch(a){return console.error("Error writing to portal item resource: ",a),o.set("saving",!1),Promise.reject()}}get el(){return i(this)}static get watchers(){return{locales:["handleLocaleChange"],appSettings:["handleAppSettings"]}}};f.style=".sc-instant-apps-language-translator-h{display:block}.sc-instant-apps-language-translator-h calcite-modal.sc-instant-apps-language-translator{--calcite-modal-content-padding:0}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header.sc-instant-apps-language-translator{display:flex;justify-content:space-between;width:100%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-text.sc-instant-apps-language-translator{font-size:18px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator{display:flex;align-items:center;font-size:14.5px;color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__writing-icon.sc-instant-apps-language-translator{display:flex;justify-content:center;align-items:center;margin-right:5px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__close-button.sc-instant-apps-language-translator{width:175px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-tip.sc-instant-apps-language-translator{padding:20px;max-width:45vw}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator{display:flex;width:100%;position:sticky;top:0;background:var(--calcite-color-foreground-1);z-index:1}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator calcite-label.sc-instant-apps-language-translator{--calcite-label-margin-bottom:0;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator{box-sizing:border-box;display:flex;align-items:center;width:50%;padding:0.5%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__user-lang-text.sc-instant-apps-language-translator{font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:first-child{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:nth-child(2) calcite-select.sc-instant-apps-language-translator{width:255px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator calcite-input.sc-instant-apps-language-translator{width:300px;margin-left:30px}.ck.ck-reset.ck-editor.ck-rounded-corners.sc-instant-apps-language-translator{margin-top:10px !important;margin-left:55px !important}.ck-editor__editable.sc-instant-apps-language-translator{height:70px !important;font-size:0.875rem !important;line-height:1.375 !important}.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:first-child,.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:last-child{--ck-spacing-large:0.5rem !important}";export{f as instant_apps_language_translator}
@@ -1,6 +0,0 @@
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 e,f as t,h as n,g as i,c as a}from"./p-fa1ceaf9.js";import{l as s}from"./p-d029b513.js";import{g as c,i as r,r as l,t as o,w as p,n as d,x as v,y as g,l as h,v as m}from"./p-bf27cd5f.js";import"./p-c4160bf7.js";import"./p-8c6d9b5a.js";const f=class{constructor(t){e(this,t),this.showTotal=!1,this.legendvm=void 0,this.activeLayerInfo=void 0,this.categoryId=void 0,this.infoIndex=void 0,this.messages=void 0,this.selected=void 0,this.legendElement=void 0}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0});const[e]=await s(["esri/intl","esri/core/reactiveUtils","esri/core/Handles"]);this.intl=e}render(){var e;return n("div",{key:"int-legend-count"},this.showTotal?n("span",null,null===(e=this.messages)||void 0===e?void 0:e.totalFeatureCount,": ",this.getTotalFeatureCount()):n("span",{key:"element-info-count",class:` instant-apps-interactive-legend__info-count-text ${c(this.el)}${this.selected?" instant-apps-interactive-legend__info-count-text--selected":""}`},this.getCount()))}getCount(){var e,t;const{categoryId:n}=this,i=this.activeLayerInfo.layer.id,a=null===(t=null===(e=r.data[i])||void 0===e?void 0:e.categories)||void 0===t?void 0:t.size;if(!(r.data&&i&&n||a))return"";const s=r.data[i];if(!s)return;const{categories:c}=s,l=c.get(n);let o;return o=(null==l?void 0:l.nestedInfos)?g(l,this.infoIndex):l,isNaN(null==o?void 0:o.count)?"":this.intl.formatNumber(o.count)}getTotalFeatureCount(){const e=this.activeLayerInfo.layer.id;if(!r.data||!e)return"";const t=r.data[e];if(!t)return;const{categories:n}=t,i=l(n);let a;if(o(n))a=p(i);else if(d(this.activeLayerInfo)){const e=h(this.activeLayerInfo.layer);a=l(e.categories)[1].count}else a=v(i);return this.intl.formatNumber(a)}get el(){return i(this)}};f.style=".sc-instant-apps-interactive-legend-count-h{display:flex;align-items:center}.instant-apps-interactive-legend__info-count-text.sc-instant-apps-interactive-legend-count{font-size:var(--instant-apps-interactive-legend-info-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}.calcite-mode-dark.instant-apps-interactive-legend__info-count-text.instant-apps-interactive-legend__info-count-text--selected.sc-instant-apps-interactive-legend-count{color:var(--calcite-color-text-inverse)}html[dir=rtl] .sc-instant-apps-interactive-legend-count-h{margin-left:0;margin-right:auto}";const u=class{constructor(t){e(this,t),this.layerCaptionElementExpandUpdatedEvent=a(this,"layerCaptionElementExpandUpdated",7),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=!1,this.expanded=!0}render(){var e,t,i,a;const s=m(this.activeLayerInfo),{expanded:r}=this,l=r?null===(e=this.messages)||void 0===e?void 0:e.collapse:null===(t=this.messages)||void 0===t?void 0:t.expand,o=this.isChild?" instant-apps-interactive-legend__heading-text--group-item":"";return n("header",{key:"3e8966360930dd6fbfc0bf3b822704922263f1fa",class:`instant-apps-interactive-legend__header ${c(this.el)}`},n("calcite-action",{key:"c12b32be05c449b5a915d813ae8dd5d8b0a22457",onClick:this.toggleExpanded(),icon:r?"chevron-down":"chevron-up",appearance:"transparent",text:l,label:l,scale:"s"}),n("span",{key:"baba497877c870983107258ef3497950021c3a1a"},n("span",{key:"495b24d9fc1237f9cd841451513a5e2b272ae467",class:"instant-apps-interactive-legend__header-action-container"},n("h3",{key:"dfbb8e1c08b6ce0bac789e983977c284a2b7efb3",class:`esri-widget__heading esri-legend__service-label${o}`,title:null===(i=this.activeLayerInfo)||void 0===i?void 0:i.title},null===(a=this.activeLayerInfo)||void 0===a?void 0:a.title)),this.featureCount&&s?n("instant-apps-interactive-legend-count",{activeLayerInfo:this.activeLayerInfo,"show-total":!0,messages:this.messages,legendvm:this.legendvm}):null))}toggleExpanded(){return()=>{this.expanded=!this.expanded,this.layerCaptionElementExpandUpdatedEvent.emit(this.expanded)}}get el(){return i(this)}};u.style=".sc-instant-apps-interactive-legend-layer-element-caption-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-color-text-1);--instant-apps-interactive-legend-ui-padding:15px 10px}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption{overflow:hidden;margin:0;overflow-x:hidden;display:inline-block;font-size:var(--instant-apps-interactive-legend-heading-font-size);font-weight:var(--instant-apps-interactive-legend-heading-font-weight)}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption header.sc-instant-apps-interactive-legend-layer-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption{display:flex;text-align:left;padding:var(--instant-apps-interactive-legend-ui-padding);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption h3.sc-instant-apps-interactive-legend-layer-element-caption{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal;color:var(--instant-apps-interactive-legend-secondary-color);margin-bottom:5px}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption .instant-apps-interactive-legend__heading-text--group-item.sc-instant-apps-interactive-legend-layer-element-caption{-webkit-line-clamp:2;line-clamp:2}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption span.sc-instant-apps-interactive-legend-layer-element-caption{width:100%;font-size:var(--instant-apps-interactive-legend-total-feature-count-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption .instant-apps-interactive-legend__header-action-container.sc-instant-apps-interactive-legend-layer-element-caption{display:flex;align-items:center}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption header.sc-instant-apps-interactive-legend-layer-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget--panel.sc-instant-apps-interactive-legend-layer-element-caption{margin:0}.calcite-mode-dark.sc-instant-apps-interactive-legend-layer-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-layer-element-caption{background-color:#242424;color:var(--calcite-color-text-1)}.calcite-mode-light.sc-instant-apps-interactive-legend-layer-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-layer-element-caption{background-color:#ffffff;color:var(--calcite-color-text-1)}";export{f as instant_apps_interactive_legend_count,u as instant_apps_interactive_legend_layer_element_caption}
@@ -1,6 +0,0 @@
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 e,h as i,H as n,g as s}from"./p-fa1ceaf9.js";import{g as o}from"./p-c9b22653.js";import"./p-c4160bf7.js";const r={storage:{},memory:!0,get(t){let e;try{e=window.localStorage&&window.localStorage.getItem(t)||this.storage[t]}catch(i){e=this.storage[t]}if(e)try{return JSON.parse(e)}catch(t){return}},set(t,e){const i=JSON.stringify(e);try{window.localStorage.setItem(t,i)}catch(i){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[t]=e}},delete(t){try{window.localStorage.removeItem(t)}catch(e){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[t]}}},a="esri-telemetry";class c extends Error{}const l=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"];class d{constructor(t){var e,i,n;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.disabled=function(t={}){const{disabled:e,portal:i}=t;return!(!e&&!1!==(null==i?void 0:i.eueiEnabled)&&(!i||function(t){return t.eueiEnabled&&t.user&&t.user.orgId===t.id}(i)||function(t){return t.user&&!t.user.orgId&&"US"===t.ipCntryCode}(i)||function(t){return!t.user&&"US"===t.ipCntryCode}(i)))}(t),this.logger=t.logger||console,this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");const s=(null===(e=t.portal)||void 0===e?void 0:e.user)||t.user;s&&this.setUser(s,null===(n=null===(i=t.portal)||void 0===i?void 0:i.subscriptionInfo)||void 0===n?void 0:n.type),this.disabled||this.initializeTrackers()}initializeTrackers(){this.options.plugins&&this.trackers.push(...this.options.plugins),this.trackers.length||this.logger.error(new Error("No trackers configured"))}getScriptTags(){return this.trackers.map((t=>t.getScriptTags&&t.getScriptTags())).join("")}async init(){const t=this.trackers.map((t=>t.init()));await Promise.all(t)}setUser(t={},e="Public"){let i;if(this.user=t="string"==typeof t?{username:t}:t,this.user.accountType=e,t.email&&t.email.split){const e=t.email.split("@")[1];i=l.filter((t=>e===t)).length>0}(i||["In House","Demo and Marketing"].indexOf(e)>-1)&&(this.user.internalUser=!0)}logPageView(t,e={},i={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;const n=this.trackers.filter((({disabled:t,hasError:e})=>!t&&!e));if(!n.length)return this.logger.warn("Page view was not logged because no enabled telemetry-plugins are registered."),!1;const s=this.preProcess(e,i);this.debug&&this.logger.info("Tracking page view",JSON.stringify(s));const o=n.map((e=>e.logPageView(t,s)));return Promise.all(o).then(),!0}logEvent(t,e={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;const i=this.trackers.filter((({disabled:t,hasError:e})=>!t&&!e));if(!i.length)return this.logger.warn("Event was not logged because no enabled telemetry-plugins are registered."),!1;const n=this.preProcess(t,e);this.debug&&this.logger.info("Tracking event",JSON.stringify(n));const s=i.map((t=>t.logEvent(n)));return Promise.all(s).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,e={}){const i={name:t,start:Date.now(),steps:[],workflowId:Math.floor(17592186044416*(1+Math.random())).toString(16)};this.saveWorkflow(i);const n=Object.assign({name:t,step:"start"},e);return this.logWorkflow(n),i}stepWorkflow(t,e,i={}){const n=Object.assign({name:t,step:e,details:"string"==typeof i?i:i.details},i);this.logWorkflow(n)}endWorkflow(t,e={}){const i=Object.assign({name:t,step:"finish"},e);this.logWorkflow(i)}cancelWorkflow(t,e={}){const i=Object.assign({name:t,step:"cancel"},e);this.logWorkflow(i)}getWorkflow(t){const e=r.get(`TELEMETRY-WORKFLOW:${t}`);if(e){if(Date.now()-e.start<18e5)return e;this.deleteWorkflow(e)}}saveWorkflow(t){r.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){r.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let e=this.getWorkflow(t.name);e||(this.startWorkflow(t.name),e=this.getWorkflow(t.name)),e.steps.push(t.step),e.duration=(Date.now()-e.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(e):this.saveWorkflow(e);const i=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:e.duration,workflowId:e.workflowId});this.logEvent(i)}preProcess(t={},e={}){let i={};return this.user&&(i={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),i)).reduce((n=e.omitComplexData,s=this.logger,function(t,[e,i]){return function(t){return["string","number","boolean","undefined"].includes(typeof t)||t&&"string"==typeof t.valueOf()}(i)?t[e]=i:n||(s.warn(`You are trying to log a non-primitive value, ${e}:${JSON.stringify(i)}. This will get logged as [object Object]`),t[e]=i),t}),{});var n,s}disableTracker(t){var e;const i=this.trackers.find((({name:e})=>e===t));i&&!i.hasError&&(i.disabled=!0,null===(e=i.disable)||void 0===e||e.call(i))}enableTracker(t){var e;const i=this.trackers.find((({name:e})=>e===t));i&&!i.hasError&&(i.disabled=!1,null===(e=i.enable)||void 0===e||e.call(i))}}"function"==typeof SuppressedError&&SuppressedError;class h{constructor(t){var e;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},"undefined"!=typeof window&&!(null===(e=null==t?void 0:t.measurementIds)||void 0===e?void 0:e.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return this._getScripts().map((t=>{const e=[];return["src","id","dataAttribute","type"].forEach((i=>{let n=i;"dataAttribute"===i&&(n="data-esri-telemetry"),t[i]&&e.push(`${n}="${t[i]}"`)})),["async","defer"].forEach((i=>{t[i]&&e.push(`${i}`)})),`<script ${e.join(" ")}>${t.body?t.body:""}<\/script>`})).join("")}async init(){if("undefined"==typeof window)throw new c("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map((t=>{return e=t,new Promise(((t,i)=>{e.onload=t,e.onerror=i;const n=function(t){const{body:e,src:i,id:n,dataAttribute:s,section:o="body",type:r="text/javascript",async:l=!1,defer:d=!1,onload:h,onerror:u}=t;if("undefined"==typeof window)throw new c("Window is undefined: Cannot add script element.");if(function(t){const{id:e,dataAttribute:i}=t;return!!document.getElementById(e)||!!document.querySelector(`[data-${a}="${i}"]`)}(t))return void console.log(`script (${n||s}) is already present, skipping`);const p=function({id:t,dataAttribute:e,type:i,async:n,defer:s,body:o,src:r,onload:c,onerror:l}){const d=document.createElement("script");return t&&(d.id=t),e&&d.setAttribute(`data-${a}`,e),r&&(d.src=r),o&&(d.innerText=o),d.type=i,d.async=n,d.defer=s,c&&(d.onload=c),l&&(d.onerror=l),d}({id:n,dataAttribute:s,type:r,async:l,defer:d,body:e,src:i,onload:h,onerror:u});return"body"===o?document.body.appendChild(p):document.head.appendChild(p)}(e);n&&!e.body||t()}));var e}))),this.injectConfig()}logPageView(t,e={}){const i=this.buildCustomParams(e),n=Object.assign({page_title:t||window.location.pathname},i);return window.gtag("event","page_view",n),!0}logEvent(t){let{action:e}=t,i=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}(t,["action"]);const n=e||"other",s=this.buildCustomParams(i);return window.gtag("event",n,s),!0}disable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=!0}))}enable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=void 0}))}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach((e=>{window.gtag("config",e,t)}))}buildCustomParams(t){let e,{category:i,label:n}=t;return e=this.verifyCustomDimensionAndMetrics(t),i&&(e=Object.assign(Object.assign({},e),{event_category:i})),n&&(e=Object.assign(Object.assign({},e),{event_label:n})),e}verifyCustomDimensionAndMetrics(t){const e=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),i=Object.values(e);return Object.keys(t).filter((t=>i.includes(t))).reduce(((e,i)=>Object.assign(e,{[i]:t[i]})),{})}createDimensionsAndMetricsCustomMap(t={},e={}){const i=this.createMetricCustomMap(e),n=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},i),n)}createMetricCustomMap(t={}){return Object.keys(t).map((function(e){return{key:`metric${t[e]}`,value:e}})).filter((t=>t)).reduce(((t,{key:e,value:i})=>(t[e]=i,t)),{})}createDimensionCustomMap(t={}){return Object.keys(t).map((function(e){return{key:`dimension${t[e]}`,value:e}})).filter((t=>t)).reduce(((t,{key:e,value:i})=>(t[e]=i,t)),{})}}const u=class{constructor(i){t(this,i),this.consentGranted=e(this,"consentGranted",7),this._consentGranted=!1,this._loaded=!1,this.firstUseVar=void 0,this.measurementIds=void 0,this.portal=void 0,this._shouldRender=void 0,this._translations=void 0}async getInstance(){return"true"===localStorage.getItem(this.firstUseVar)?(await this._init(),this._telemetryInstance):void 0}async componentWillLoad(){await this._getTranslations(),this._shouldRender=null===localStorage.getItem(this.firstUseVar)}render(){return this._shouldRender?i(n,null,i("calcite-panel",{class:"consent-panel calcite-mode-dark",id:"cookie-policy"},i("div",{class:"cookie-consent-popup-container"},i("div",{id:"cookie-policy-description-top",tabindex:"-1"},i("p",null,this._translations.dearVisitor),i("p",null,this._translations.useAnalytics)),i("div",{class:"button-container"},i("calcite-button",{appearance:"solid",class:"padding-end-1",kind:"brand",onClick:()=>this._refuse()},this._translations.refuseAnalytics),i("calcite-button",{appearance:"solid",kind:"brand",onClick:()=>this._accept()},this._translations.acceptAnalytics)),i("div",null,i("p",null,this._translations.moreInfo," ",i("calcite-link",{class:"link-text",href:"https://www.arcgis.com/",rel:"noopener noreferrer",target:"_blank"},this._translations.protectionPolicy),this._translations.our," ",i("calcite-link",{class:"link-text",href:"https://www.arcgis.com/",rel:"noopener noreferrer",target:"_blank"},this._translations.cookiePolicy," "),this._translations.andOur," ",i("calcite-link",{class:"link-text",href:"https://www.arcgis.com/",rel:"noopener noreferrer",target:"_blank"},this._translations.cookiesInventory)))))):void 0}async componentDidLoad(){this.consentGranted.emit({granted:"true"===localStorage.getItem(this.firstUseVar)})}async _init(){var t;if(!this._loaded&&(null===(t=this.measurementIds)||void 0===t?void 0:t.length)>0&&this.portal){const t=new h({measurementIds:this.measurementIds});this._telemetryInstance=new d({plugins:[t],portal:this.portal}),await this._telemetryInstance.init(),this._loaded=!0}}_accept(){this._consentGranted=!0,this._handleConsent()}_refuse(){this._consentGranted=!1,this._handleConsent()}_handleConsent(){this._shouldRender=!1,localStorage.setItem(this.firstUseVar,this._consentGranted.toString()),this.consentGranted.emit({granted:this._consentGranted})}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}get el(){return s(this)}};u.style=":host{display:block}.consent-panel{position:fixed;display:block;z-index:5000;bottom:0;left:0;width:100%;height:auto;text-align:center}.cookie-consent-popup-container{position:relative;display:block;bottom:0;left:0;width:100%;margin:0;padding-top:1rem;padding-bottom:1rem;transition:transform 0.5s ease-out 0s;background-color:rgba(51, 51, 51, 0.95);color:#fff}.button-container{position:static;margin-bottom:1rem;display:flex;justify-content:center;flex-wrap:wrap}.padding-end-1{padding-inline-end:1rem}.link-text{--calcite-ui-text-link:var(--calcite-color-text-inverse);--calcite-ui-brand:var(--calcite-color-text-inverse);--calcite-color-text-link:var(--calcite-color-text-inverse);--calcite-color-brand-underline:var(--calcite-color-text-inverse);--calcite-color-brand:var(--calcite-color-text-inverse)}";export{u as consent_manager}
@@ -1,6 +0,0 @@
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,h as s,H as e,F as a,g as h}from"./p-fa1ceaf9.js";import{l as o,g as l}from"./p-c9b22653.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-996c1ac5.js";import"./p-c4160bf7.js";import"./p-c1cf3ebc.js";const m=class{constructor(s){t(this,s),this.togglePanel=i(this,"togglePanel",7),this.center=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.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.theme="light",this.zoomToScale=void 0,this._featureCreationFailedErrorMsg=void 0,this._filterActive=!1,this._filterOpen=!1,this._flowItems=[],this._hasValidLayers=!1,this._loadingFeatureDetails=void 0,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}async isMobileWatchHandler(){this._sidePanelCollapsed=!1}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.setMapView()}))}async componentWillLoad(){var t;this._urlParamsLoaded=!1,await this._initModules(),await this._getTranslations(),await(null===(t=this.mapView)||void 0===t?void 0:t.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 s(e,{key:"e512e2693a586f8a6da7bcfa171feb60da26aee3"},this._reportSubmitted&&s("calcite-alert",{key:"e5805ba948f1dc43eba2a78716af452cf71a8222","auto-close":!0,class:t+" report-submitted-msg",icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._reportSubmitted=!1},open:!0,placement:"top"},s("div",{key:"95b9accf1f09186c09c81cfb02a8939c4869ae8d",slot:"message"},this.reportSubmittedMessage?this.reportSubmittedMessage:this._translations.submitMsg)),this._featureCreationFailedErrorMsg&&s("calcite-alert",{key:"cab7f0e0f0d882612b4fa6f00799be9870aea6c5","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._featureCreationFailedErrorMsg=""},open:!0,placement:"top"},s("div",{key:"b9453672d85e26cf7bdeae0923cd36020d259d49",slot:"title"},this._translations.error),s("div",{key:"5084315857bc88b8f80aaa411ac3fd5e4493e918",slot:"message"},this._featureCreationFailedErrorMsg)),this._commentSubmitted&&s("calcite-alert",{key:"62b7d9818913c3331ca9c8e4ed23c7f0c48a7946","auto-close":!0,class:"report-submitted "+t,icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._commentSubmitted=!1},open:!0,placement:"top"},s("div",{key:"5f18444fd375657db0c2a403cb453ead75536181",slot:"message"},this._translations.commentSubmittedMsg)),this._addingCommentFailed&&s("calcite-alert",{key:"732f08960095fc9fefcc79fc8df387a5a4c3f781","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._addingCommentFailed=!1},open:!0,placement:"top"},s("div",{key:"16415430cf33ce53c0d49cab19dce2c3e34257d6",slot:"title"},this._translations.error),s("div",{key:"83e5918e00902bd49512165f4aa62813cecb4619",slot:"message"},this._translations.addingCommentFailedMsg)),s("div",{key:"3e9dadd880319708e64e717ba7e7adaddf97b935"},s("calcite-shell",{key:"c72664d361b3904bc191668207c3ad31ff1f98c9","content-behind":!0},this._getReporter())),this.filterModal())}async _initModules(){const[t]=await o(["esri/core/reactiveUtils"]);this.reactiveUtils=t}async setSelectedLayer(t,i){this._selectedLayerId=t,this._selectedLayer=await c(this.mapView,t),this._selectedLayerName=i,this._validLayers.forEach((i=>{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"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())}})),s("calcite-panel",{class:"width-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},this.mapView?s("calcite-flow",null,(null==t?void 0:t.length)>0&&t):s("calcite-loader",{label:"",scale:"m"}))}filterModal(){var t,i;const e=this.layerExpressions?this.layerExpressions.filter((t=>t.id===this._selectedLayerId)):[];return e.length>0&&s("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},null===(i=null===(t=this._translations)||void 0===t?void 0:t.filterLayerTitle)||void 0===i?void 0:i.replace("{{title}}",this._selectedLayerName)),s("div",{slot:"content"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>{this._closeFilter()},comboboxOverlayPositioning:"fixed",layerExpressions:e,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1})))}_closeFilter(){this._filterOpen&&(this._filterOpen=!1)}_toggleFilter(){this._filterOpen=!this._filterOpen}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 s("calcite-popover",{autoClose:!0,label:"",offsetDistance:0,placement:this.isMobile?"leading-start":"auto",pointerDisabled:!0,referenceElement:"sort-popover"},s("calcite-list",{"selection-mode":"single"},s("calcite-list-item",{label:this._translations.sortNewest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"desc","sortNewest")},selected:"sortNewest"===this._updatedSortOption,value:"sortNewest"}),s("calcite-list-item",{label:this._translations.sortOldest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"asc","sortOldest")},selected:"sortOldest"===this._updatedSortOption,value:"sortOldest"}),t&&s(a,null,s("calcite-list-item",{label:this._translations.sortHighestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"desc","sortHighestVoted")},selected:"sortHighestVoted"===this._updatedSortOption,value:"sortHighestVoted"}),s("calcite-list-item",{label:this._translations.sortLowestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"asc","sortLowestVoted")},selected:"sortLowestVoted"===this._updatedSortOption,value:"sortLowestVoted"}))))}_handleFilterListReset(){this._filterActive=!1,this._featureList.refresh()}_handleFilterUpdate(){this._filterActive=this._filterList.urlParams.getAll("filter").length>0,this._featureList.refresh()}getLayerListFlowItem(){var t;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportsHeader},this.isMobile&&this.getActionToExpandCollapsePanel(),this._hasValidLayers&&this.enableNewReports&&s("calcite-button",{appearance:"solid",onClick:this.navigateToChooseCategory.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),s("calcite-panel",{"full-height":!0,"full-width":!0},s("layer-list",{class:"height-full",layers:(null===(t=this._editableLayerIds)||void 0===t?void 0:t.length)>0?this._editableLayerIds:this._layers,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 s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("calcite-panel",{"full-height":!0,"full-width":!0},s("div",{class:"progress-bar"},s("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.chooseCategoryMsg)),s("layer-list",{class:"height-full",layers:t,mapView:this.mapView,onLayerSelect:this.navigateToCreateFeature.bind(this),showFeatureCount:!1,showNextIcon:!1})))}getFeatureCreateFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,onCalciteFlowItemBack:this.backFromCreateFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),this._showSubmitCancelButton&&s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateFeaturePanel.bind(this),width:"full"},this._translations.cancel)),s("calcite-panel",{"full-height":!0,"full-width":!0},s("div",{class:"progress-bar"},s("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.featureEditFormInfoMsg)),s("create-feature",{customizeSubmit:!0,mapView:this.mapView,onDrawComplete:this.onFormReady.bind(this),onEditingAttachment:this.showSubmitCancelButton.bind(this),onFail:this.createFeatureFailed.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.updateFormState(!0),this._showSubmitCancelButton=!0}showSubmitCancelButton(t){this._showSubmitCancelButton=!t.detail}onCreateFeatureSubmitButtonClick(){this._createFeature&&this._createFeature.submit()}backFromCreateFeaturePanel(){this._createFeature&&this._createFeature.close(),this.isFormOpen&&this.updateFormState(!1),this.backFromSelectedPanel()}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature&&this._createRelatedFeature.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature&&(this._createRelatedFeature.close(),this._showSubmitCancelButton=!1),this.isFormOpen&&this.updateFormState(!1),this.backFromSelectedPanel()}createFeatureFailed(t){console.error(t.detail),this._featureCreationFailedErrorMsg=t.detail.message}onReportSubmitted(){this.isFormOpen&&this.updateFormState(!1),this._reportSubmitted=!0,this.navigateToHomePage()}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(){this._createFeature&&this._createFeature.close(),this._layerList&&this._layerList.refresh(),await this.setSelectedFeatures([]),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&&this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._showSubmitCancelButton=!1,this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this._flowItems=[...this._flowItems,"reporting-layer-list"]}async layerListLoaded(t){const i=t.detail,s=await n(this.mapView),e=[];this._validLayers=[],s.forEach((t=>{var s;i.includes(t.id)&&(this._validLayers.push(t),(null===(s=this._getLayersConfig(t.id))||void 0===s?void 0:s.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())}displayFeaturesList(t){this._updatedSorting={field:"",order:"desc"},this._filterActive=!1,this._updatedSortOption="sortNewest",this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._flowItems=[...this._flowItems,"feature-list"]}backFromSelectedPanel(){this._updatedProgressBarStatus=.25;const t=[...this._flowItems];"comment-details"!==t[t.length-1]&&"add-comment"!==t[t.length-1]&&this.clearHighlights(),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.isFormOpen})}updateFormState(t){this.isFormOpen=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this.isFormOpen})}async onFeatureSelectFromList(t){this._showLoadingIndicator=!0,await this.setSelectedFeatures([t.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){const t=this._currentFeature.layer.relationships[0].relatedTableId,i=(await r(this.mapView)).filter((i=>t===i.layerId));this._relatedTable=i[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])}async onCommentSelectFromList(t){this._selectedRelatedFeature=[t.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(t,i){var e,a;const h=null===(e=this.layerExpressions)||void 0===e?void 0:e.filter((t=>t.id===this._selectedLayerId)),o=(null===(a=this._getLayersConfig(this._selectedLayerId))||void 0===a?void 0:a.reporting)&&this._layerItemsHash[this._selectedLayerId].supportsAdd,l=(null==h?void 0:h.length)>0;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:i,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this._toggleSort(),s("calcite-action",{icon:"sort-ascending-arrow",id:"sort-popover",slot:"header-actions-end",text:this._translations.sort,title:this._translations.sort}),l&&s("calcite-action",{icon:"filter",indicator:this._filterActive,onClick:this._toggleFilter.bind(this),slot:"header-actions-end",text:this._translations.filter,title:this._translations.filter}),this.isMobile&&this.getActionToExpandCollapsePanel(),this.enableNewReports&&o&&s("calcite-button",{appearance:"solid",onClick:this.navigateToCreateFeature.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),s("calcite-panel",{"full-height":!0},s("feature-list",{class:"height-full",highlightOnHover:!0,mapView:this.mapView,noFeaturesFoundMsg:this._translations.featureErrorMsg,onFeatureSelect:this.onFeatureSelectFromList.bind(this),pageSize:30,ref:t=>this._featureList=t,selectedLayerId:t,sortingInfo:this._updatedSorting})))}getFeatureDetailsFlowItem(){var t;const i=(null===(t=this._getLayersConfig(this._selectedLayerId))||void 0===t?void 0:t.comment)&&this._selectedLayer.relationships.length>0;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("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(),s("calcite-panel",null,s("feature-details",{class:"full-height",graphics:this._selectedFeature,layerItemsHash:this._layerItemsHash,mapView:this.mapView,onCommentSelect:this.onCommentSelectFromList.bind(this),onFeatureSelectionChange:this.selectionChanged.bind(this),onLoadingStatus:t=>{this.updatingFeatureDetails(t.detail)},ref:t=>this._featureDetails=t,reportingOptions:this.reportingOptions}),i&&s("calcite-button",{appearance:"solid",onClick:()=>this._flowItems=[...this._flowItems,"add-comment"],slot:"footer",width:"full"},this._translations.comment)))}getFeaturesPagination(){return s("div",{class:"feature-pagination"},s("div",null,s("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-left",id:"solutions-back",onClick:()=>{this._featureDetails.back()},scale:"s",width:"full"}),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},s("span",null,this._translations.back))),s("calcite-button",{appearance:"transparent",onClick:()=>{this._featureDetails.toggleListView()},scale:"s"},s("span",{class:"pagination-count"},this._getCount())),s("div",null,s("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-right",id:"solutions-next",onClick:()=>{this._featureDetails.next()},scale:"s",width:"full"}),s("calcite-tooltip",{placement:"top","reference-element":"solutions-next"},s("span",null,this._translations.next))))}getCommentDetailsFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("calcite-panel",{"full-height":!0},s("info-card",{allowEditing:!1,graphics:this._selectedRelatedFeature,highlightEnabled:!1,isLoading:!1,isMobile:!1,mapView:this.mapView,paginationEnabled:!1})))}getAddCommentFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromCreateRelatedFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("div",{class:"width-full",slot:"footer"},this._showSubmitCancelButton&&s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateRelatedFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateRelatedFeaturePanel.bind(this),width:"full"},this._translations.cancel))),s("calcite-panel",null,s("create-related-feature",{customizeSubmit:!0,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){var i;if(this._currentFeature=t,t&&t.layer){const s=t.layer;this.setSelectedLayer(s.id,s.title),this._currentFeatureId=t.attributes[s.objectIdField],(null===(i=this._getLayersConfig(s.id))||void 0===i?void 0:i.comment)&&s.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 s("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(){var t;await this.getLayersToShowInList(),1===(null===(t=this._editableLayerIds)||void 0===t?void 0:t.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=>{var i;return!this._validLayers.includes(t.layer)&&(null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.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 l(this.el);this._translations=t[0]}reduceToConfiguredLayers(t){return Object.keys(t).reduce(((i,s)=>{var e;return(this.reportingOptions?null===(e=this._getLayersConfig(s))||void 0===e?void 0:e.visible:t[s].supportsAdd)&&i.push(s),i}),[])}async getLayersToShowInList(){const t=await p(this.mapView,!0);(await n(this.mapView)).forEach((i=>{var s,e;"feature"===(null==i?void 0:i.type)&&(null==i?void 0:i.editingEnabled)&&(null===(e=null===(s=null==i?void 0:i.capabilities)||void 0===s?void 0:s.operations)||void 0===e?void 0:e.supportsAdd)&&(t[i.id].supportsAdd=!0)})),this._editableLayerIds=this.reduceToConfiguredLayers(t),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(){var t,i;const s=null===(t=this._shareNode)||void 0===t?void 0:t.shareUrl;if(!s)return;const e=new URL(s);this._selectedLayerId?e.searchParams.set("layerid",this._selectedLayerId):e.searchParams.delete("layerid"),(null===(i=this._selectedFeature)||void 0===i?void 0:i.length)?e.searchParams.set("oid",this._currentFeatureId):e.searchParams.delete("oid"),this._shareNode.shareUrl=e.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])}}}get el(){return h(this)}static get watchers(){return{isMobile:["isMobileWatchHandler"],mapView:["mapViewWatchHandler"]}}};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}
@@ -1,6 +0,0 @@
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,H as s,g as l}from"./p-fa1ceaf9.js";import{g as o}from"./p-49250010.js";import"./p-d029b513.js";import"./p-c4160bf7.js";import"./p-89f6ff72.js";const a=class{constructor(i){t(this,i),this.messages=void 0,this.view=void 0}render(){var t,l,o,a,e,n,d;const h="2d"!==(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.type)&&(null==this?void 0:this.view)?this._getSceneViewCommands():this._getMapViewCommands(),r=this._isMacLike()?"Option":"Alt";return i(s,{key:"1615e98de266144d79e2baf2dbb5e0bb98ab507a"},i("calcite-block",{key:"0721f5667ee3a6b0cfd5436d638854ce5cc2765d",open:!0,class:"instant-apps-keyboard-shortcuts__content",heading:null===(o=null===(l=null==this?void 0:this.messages)||void 0===l?void 0:l.generalShortcuts)||void 0===o?void 0:o.label},i("table",{key:"9d9ddb241698b71663af04b802a2993c686a6716"},this.renderTableHeader(),i("tr",{key:"5be103940f9753990ec8791a48f7adba86e1eac3"},i("td",{key:"02bc3df06e11288345221026a0ac3063083d095f"},`${r} + M`),i("td",{key:"e1287efc2f26478e0aae1ce7748436ce1d3e2aef"},null===(e=null===(a=null==this?void 0:this.messages)||void 0===a?void 0:a.generalShortcuts)||void 0===e?void 0:e.title))),i("calcite-label",{key:"ed5b360bc8272722ff7fc26acd2bcb251e0fc6c0"},null===(d=null===(n=null==this?void 0:this.messages)||void 0===n?void 0:n.generalShortcuts)||void 0===d?void 0:d.title),i("table",{key:"012ec3b39e439dab43797a33af87ac530b53bf37"},this.renderTableHeader(),h.map((t=>i("tr",null,i("td",null,t.alias),i("td",null,t.title)))))))}componentDidLoad(){o(this)}renderTableHeader(){var t,s;return(null==this?void 0:this.messages)?i("tr",null,i("th",null,null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.generalShortcuts.shortcut),i("th",null,null===(s=null==this?void 0:this.messages)||void 0===s?void 0:s.generalShortcuts.action)):null}_getMapViewCommands(){return(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge},{alias:"N",title:null==this?void 0:this.messages.mapShortcuts.N},{alias:"A",title:null==this?void 0:this.messages.mapShortcuts.A},{alias:"D",title:null==this?void 0:this.messages.mapShortcuts.D},{alias:"+",title:null==this?void 0:this.messages.mapShortcuts.plus},{alias:"-",title:null==this?void 0:this.messages.mapShortcuts.minus}]:[]}_getSceneViewCommands(){var t;const i="global"===(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.viewingMode),s=(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge,show:!!i},{alias:"P",title:null==this?void 0:this.messages.sceneShortcuts.P,show:!0},{alias:"N",title:null==this?void 0:this.messages.sceneShortcuts.N,show:!0},{alias:"W",title:null==this?void 0:this.messages.sceneShortcuts.W,show:!0},{alias:"A",title:null==this?void 0:this.messages.sceneShortcuts.A,show:!0},{alias:"D",title:null==this?void 0:this.messages.sceneShortcuts.D,show:!0},{alias:"S",title:null==this?void 0:this.messages.sceneShortcuts.S,show:!0},{alias:"J",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.J,show:!!i},{alias:"U",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.U,show:!!i}]:[];return(null==this?void 0:this.messages)?null==s?void 0:s.filter((t=>t.show)):[]}_isMacLike(){return/(Mac)/i.test(navigator.platform)}get el(){return l(this)}};a.style=":host .instant-apps-keyboard-shortcuts__content{display:flex;flex-direction:column;font-family:var(--calcite-sans-family);font-size:0.875rem;background-color:var(--calcite-color-background);color:var(--calcite-color-text-1);width:auto;padding:0.5em;margin-bottom:0;overflow:auto}:host .instant-apps-keyboard-shortcuts__content table{border:none;border-collapse:collapse;width:100%;margin-bottom:1em}:host .instant-apps-keyboard-shortcuts__content table td,:host .instant-apps-keyboard-shortcuts__content table th{border:solid 1px var(--calcite-color-border-1);padding:0.5rem 0.75rem 0.5rem 0.75rem;white-space:normal}:host .instant-apps-keyboard-shortcuts__content table td:lang(ja),:host .instant-apps-keyboard-shortcuts__content table td:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja){white-space:nowrap}:host .instant-apps-keyboard-shortcuts__content tr:nth-child(even){background-color:var(--calcite-color-foreground-2)}:host .instant-apps-keyboard-shortcuts__content tr th{padding:0.5em 0.7em;font-weight:400}";export{a as instant_apps_keyboard_shortcuts}