@arcgis/map-components 4.29.0-test.0 → 4.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (739) hide show
  1. package/LICENSE.md +13 -0
  2. package/README.md +21 -0
  3. package/dist/arcgis-map-components/arcgis-map-components.esm.js +6 -0
  4. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ar.json +37 -0
  5. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.bg.json +37 -0
  6. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.bs.json +37 -0
  7. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ca.json +37 -0
  8. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.cs.json +37 -0
  9. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.da.json +37 -0
  10. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.de.json +37 -0
  11. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.el.json +37 -0
  12. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.en.json +37 -0
  13. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.es.json +37 -0
  14. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.et.json +37 -0
  15. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.fi.json +37 -0
  16. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.fr.json +37 -0
  17. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.he.json +37 -0
  18. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.hr.json +37 -0
  19. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.hu.json +37 -0
  20. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.id.json +37 -0
  21. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.it.json +37 -0
  22. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ja.json +37 -0
  23. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ko.json +37 -0
  24. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.lt.json +37 -0
  25. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.lv.json +37 -0
  26. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.nb.json +37 -0
  27. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.nl.json +37 -0
  28. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.pl.json +37 -0
  29. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.pt-BR.json +37 -0
  30. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.pt-PT.json +37 -0
  31. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ro.json +37 -0
  32. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.ru.json +37 -0
  33. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.sk.json +37 -0
  34. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.sl.json +37 -0
  35. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.sr.json +37 -0
  36. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.sv.json +37 -0
  37. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.th.json +37 -0
  38. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.tr.json +37 -0
  39. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.uk.json +37 -0
  40. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.vi.json +37 -0
  41. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.zh-CN.json +37 -0
  42. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.zh-HK.json +37 -0
  43. package/dist/arcgis-map-components/assets/version-management/t9n/version-management.t9n.zh-TW.json +37 -0
  44. package/dist/arcgis-map-components/index.esm.js +5 -0
  45. package/dist/arcgis-map-components/p-03ba0fda.entry.js +6 -0
  46. package/dist/arcgis-map-components/p-09d1fa30.entry.js +6 -0
  47. package/dist/arcgis-map-components/p-0a7d9b10.js +7 -0
  48. package/dist/arcgis-map-components/p-0ab58f56.entry.js +6 -0
  49. package/dist/arcgis-map-components/p-0c15b118.entry.js +6 -0
  50. package/dist/arcgis-map-components/p-0e12b068.entry.js +6 -0
  51. package/dist/arcgis-map-components/p-11dc096a.entry.js +6 -0
  52. package/dist/arcgis-map-components/p-138f344c.entry.js +6 -0
  53. package/dist/arcgis-map-components/p-1392e55e.entry.js +6 -0
  54. package/dist/arcgis-map-components/p-13df63e3.entry.js +6 -0
  55. package/dist/arcgis-map-components/p-168fc61b.entry.js +6 -0
  56. package/dist/arcgis-map-components/p-1af0c58d.entry.js +6 -0
  57. package/dist/arcgis-map-components/p-1b5e55d0.entry.js +6 -0
  58. package/dist/arcgis-map-components/p-1e56dd90.entry.js +6 -0
  59. package/dist/arcgis-map-components/p-20272b55.js +6 -0
  60. package/dist/arcgis-map-components/p-291893c2.entry.js +6 -0
  61. package/dist/arcgis-map-components/p-2c06ba12.entry.js +6 -0
  62. package/dist/arcgis-map-components/p-2dc640ed.entry.js +6 -0
  63. package/dist/arcgis-map-components/p-3a0a6efa.entry.js +6 -0
  64. package/dist/arcgis-map-components/p-3c0e7652.entry.js +6 -0
  65. package/dist/arcgis-map-components/p-4690c4ff.entry.js +6 -0
  66. package/dist/arcgis-map-components/p-4b1e3886.entry.js +6 -0
  67. package/dist/arcgis-map-components/p-4f09345f.entry.js +6 -0
  68. package/dist/arcgis-map-components/p-56a95ba3.entry.js +6 -0
  69. package/dist/arcgis-map-components/p-584899e6.entry.js +6 -0
  70. package/dist/arcgis-map-components/p-58f212ae.entry.js +6 -0
  71. package/dist/arcgis-map-components/p-60a89824.entry.js +6 -0
  72. package/dist/arcgis-map-components/p-6c23ce45.entry.js +6 -0
  73. package/dist/arcgis-map-components/p-6e718744.entry.js +6 -0
  74. package/dist/arcgis-map-components/p-7b84ae7e.entry.js +6 -0
  75. package/dist/arcgis-map-components/p-8080f998.js +6 -0
  76. package/dist/arcgis-map-components/p-84026e39.entry.js +6 -0
  77. package/dist/arcgis-map-components/p-86eceb6c.entry.js +6 -0
  78. package/dist/arcgis-map-components/p-992cdc4c.entry.js +6 -0
  79. package/dist/arcgis-map-components/p-9ce44aab.entry.js +6 -0
  80. package/dist/arcgis-map-components/p-9e771c3c.js +6 -0
  81. package/dist/arcgis-map-components/p-a1943b88.entry.js +6 -0
  82. package/dist/arcgis-map-components/p-a6ff2d23.entry.js +6 -0
  83. package/dist/arcgis-map-components/p-a732030c.entry.js +6 -0
  84. package/dist/arcgis-map-components/p-ad253fba.entry.js +6 -0
  85. package/dist/arcgis-map-components/p-b074cff0.entry.js +6 -0
  86. package/dist/arcgis-map-components/p-b34848cd.entry.js +6 -0
  87. package/dist/arcgis-map-components/p-b4fcd367.entry.js +6 -0
  88. package/dist/arcgis-map-components/p-b556c334.entry.js +6 -0
  89. package/dist/arcgis-map-components/p-bcf32e68.entry.js +6 -0
  90. package/dist/arcgis-map-components/p-cb46e2af.entry.js +6 -0
  91. package/dist/arcgis-map-components/p-d5a46dcd.entry.js +6 -0
  92. package/dist/arcgis-map-components/p-d630c013.entry.js +6 -0
  93. package/dist/arcgis-map-components/p-dacdacd6.entry.js +6 -0
  94. package/dist/arcgis-map-components/p-de09fd10.entry.js +6 -0
  95. package/dist/arcgis-map-components/p-defc03a6.entry.js +6 -0
  96. package/dist/arcgis-map-components/p-df09cadb.entry.js +6 -0
  97. package/dist/arcgis-map-components/p-e38096f1.entry.js +6 -0
  98. package/dist/arcgis-map-components/p-ea5f7ab9.entry.js +6 -0
  99. package/dist/arcgis-map-components/p-ebde73ef.entry.js +6 -0
  100. package/dist/arcgis-map-components/p-eef4eccf.entry.js +6 -0
  101. package/dist/arcgis-map-components/p-f0f6c75d.entry.js +6 -0
  102. package/dist/arcgis-map-components/p-f3055fe7.entry.js +6 -0
  103. package/dist/arcgis-map-components/p-f7cfe67a.entry.js +6 -0
  104. package/dist/arcgis-map-components/p-f9fcdc47.entry.js +6 -0
  105. package/dist/arcgis-map-components/p-ffd00564.entry.js +6 -0
  106. package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +116 -0
  107. package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +124 -0
  108. package/dist/cjs/arcgis-attachments.cjs.entry.js +110 -0
  109. package/dist/cjs/arcgis-basemap-gallery_2.cjs.entry.js +723 -0
  110. package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +362 -0
  111. package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +123 -0
  112. package/dist/cjs/arcgis-bookmarks.cjs.entry.js +250 -0
  113. package/dist/cjs/arcgis-building-explorer.cjs.entry.js +147 -0
  114. package/dist/cjs/arcgis-compass.cjs.entry.js +129 -0
  115. package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +237 -0
  116. package/dist/cjs/arcgis-daylight.cjs.entry.js +222 -0
  117. package/dist/cjs/arcgis-directional-pad.cjs.entry.js +108 -0
  118. package/dist/cjs/arcgis-directions.cjs.entry.js +254 -0
  119. package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +136 -0
  120. package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +121 -0
  121. package/dist/cjs/arcgis-editor.cjs.entry.js +316 -0
  122. package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +288 -0
  123. package/dist/cjs/arcgis-expand.cjs.entry.js +219 -0
  124. package/dist/cjs/arcgis-feature-form.cjs.entry.js +152 -0
  125. package/dist/cjs/arcgis-feature-table.cjs.entry.js +459 -0
  126. package/dist/cjs/arcgis-feature-templates.cjs.entry.js +140 -0
  127. package/dist/cjs/arcgis-feature.cjs.entry.js +244 -0
  128. package/dist/cjs/arcgis-features.cjs.entry.js +242 -0
  129. package/dist/cjs/arcgis-floor-filter.cjs.entry.js +131 -0
  130. package/dist/cjs/arcgis-fullscreen.cjs.entry.js +91 -0
  131. package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +211 -0
  132. package/dist/cjs/arcgis-histogram.cjs.entry.js +151 -0
  133. package/dist/cjs/arcgis-home.cjs.entry.js +126 -0
  134. package/dist/cjs/arcgis-layer-list.cjs.entry.js +295 -0
  135. package/dist/cjs/arcgis-legend.cjs.entry.js +150 -0
  136. package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +120 -0
  137. package/dist/cjs/arcgis-locate.cjs.entry.js +173 -0
  138. package/dist/cjs/arcgis-map-components.cjs.js +28 -0
  139. package/dist/cjs/arcgis-measurement.cjs.entry.js +139 -0
  140. package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +101 -0
  141. package/dist/cjs/arcgis-placement.cjs.entry.js +55 -0
  142. package/dist/cjs/arcgis-print.cjs.entry.js +190 -0
  143. package/dist/cjs/arcgis-scale-bar.cjs.entry.js +103 -0
  144. package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +208 -0
  145. package/dist/cjs/arcgis-scene.cjs.entry.js +651 -0
  146. package/dist/cjs/arcgis-search.cjs.entry.js +339 -0
  147. package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +249 -0
  148. package/dist/cjs/arcgis-sketch.cjs.entry.js +508 -0
  149. package/dist/cjs/arcgis-slice.cjs.entry.js +148 -0
  150. package/dist/cjs/arcgis-slider.cjs.entry.js +234 -0
  151. package/dist/cjs/arcgis-swipe.cjs.entry.js +123 -0
  152. package/dist/cjs/arcgis-table-list.cjs.entry.js +283 -0
  153. package/dist/cjs/arcgis-time-slider.cjs.entry.js +236 -0
  154. package/dist/cjs/arcgis-track.cjs.entry.js +189 -0
  155. package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +353 -0
  156. package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +224 -0
  157. package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +100 -0
  158. package/dist/cjs/arcgis-value-picker.cjs.entry.js +180 -0
  159. package/dist/cjs/arcgis-version-management-service-item_2.cjs.entry.js +156 -0
  160. package/dist/cjs/arcgis-version-management-version-item_2.cjs.entry.js +92 -0
  161. package/dist/cjs/arcgis-version-management.cjs.entry.js +170 -0
  162. package/dist/cjs/arcgis-weather.cjs.entry.js +108 -0
  163. package/dist/cjs/arcgis-zoom.cjs.entry.js +116 -0
  164. package/dist/cjs/component-utils-f77c943e.js +164 -0
  165. package/dist/cjs/disconnected-ec1c1b85.js +47 -0
  166. package/dist/cjs/index-11a44e53.js +2476 -0
  167. package/{cjs/index-bfda1cdc.js → dist/cjs/index-8bce9d37.js} +212 -188
  168. package/dist/cjs/index.cjs.js +7 -0
  169. package/dist/cjs/loader.cjs.js +18 -0
  170. package/{components → dist/components}/arcgis-area-measurement-2d.d.ts +2 -2
  171. package/dist/components/arcgis-area-measurement-2d.js +144 -0
  172. package/{components → dist/components}/arcgis-area-measurement-3d.d.ts +2 -2
  173. package/dist/components/arcgis-area-measurement-3d.js +155 -0
  174. package/{components → dist/components}/arcgis-attachments.d.ts +2 -2
  175. package/dist/components/arcgis-attachments.js +145 -0
  176. package/{components → dist/components}/arcgis-basemap-gallery.d.ts +2 -2
  177. package/dist/components/arcgis-basemap-gallery.js +156 -0
  178. package/{components → dist/components}/arcgis-basemap-layer-list.d.ts +2 -2
  179. package/dist/components/arcgis-basemap-layer-list.js +435 -0
  180. package/{components → dist/components}/arcgis-basemap-toggle.d.ts +2 -2
  181. package/dist/components/arcgis-basemap-toggle.js +152 -0
  182. package/{components → dist/components}/arcgis-bookmarks.d.ts +2 -2
  183. package/dist/components/arcgis-bookmarks.js +307 -0
  184. package/{components → dist/components}/arcgis-building-explorer.d.ts +2 -2
  185. package/dist/components/arcgis-building-explorer.js +183 -0
  186. package/{components → dist/components}/arcgis-compass.d.ts +2 -2
  187. package/dist/components/arcgis-compass.js +158 -0
  188. package/{components → dist/components}/arcgis-coordinate-conversion.d.ts +2 -2
  189. package/dist/components/arcgis-coordinate-conversion.js +288 -0
  190. package/{components → dist/components}/arcgis-daylight.d.ts +2 -2
  191. package/dist/components/arcgis-daylight.js +271 -0
  192. package/dist/components/arcgis-directional-pad.d.ts +11 -0
  193. package/dist/components/arcgis-directional-pad.js +135 -0
  194. package/{components → dist/components}/arcgis-directions.d.ts +2 -2
  195. package/dist/components/arcgis-directions.js +303 -0
  196. package/{components → dist/components}/arcgis-directline-measurement-3d.d.ts +2 -2
  197. package/dist/components/arcgis-directline-measurement-3d.js +168 -0
  198. package/{components → dist/components}/arcgis-distance-measurement-2d.d.ts +2 -2
  199. package/dist/components/arcgis-distance-measurement-2d.js +150 -0
  200. package/{components → dist/components}/arcgis-editor.d.ts +2 -2
  201. package/dist/components/arcgis-editor.js +381 -0
  202. package/{components → dist/components}/arcgis-elevation-profile.d.ts +2 -2
  203. package/dist/components/arcgis-elevation-profile.js +347 -0
  204. package/{components → dist/components}/arcgis-expand.d.ts +2 -2
  205. package/{components → dist/components}/arcgis-expand.js +6 -1
  206. package/{components → dist/components}/arcgis-feature-form.d.ts +2 -2
  207. package/dist/components/arcgis-feature-form.js +194 -0
  208. package/{components → dist/components}/arcgis-feature-table.d.ts +2 -2
  209. package/dist/components/arcgis-feature-table.js +550 -0
  210. package/{components → dist/components}/arcgis-feature-templates.d.ts +2 -2
  211. package/dist/components/arcgis-feature-templates.js +180 -0
  212. package/{components → dist/components}/arcgis-feature.d.ts +2 -2
  213. package/dist/components/arcgis-feature.js +293 -0
  214. package/{components → dist/components}/arcgis-features.d.ts +2 -2
  215. package/dist/components/arcgis-features.js +296 -0
  216. package/{components → dist/components}/arcgis-floor-filter.d.ts +2 -2
  217. package/dist/components/arcgis-floor-filter.js +163 -0
  218. package/{components → dist/components}/arcgis-fullscreen.d.ts +2 -2
  219. package/dist/components/arcgis-fullscreen.js +116 -0
  220. package/{components → dist/components}/arcgis-histogram-range-slider.d.ts +2 -2
  221. package/dist/components/arcgis-histogram-range-slider.js +267 -0
  222. package/{components → dist/components}/arcgis-histogram.d.ts +2 -2
  223. package/dist/components/arcgis-histogram.js +196 -0
  224. package/{components → dist/components}/arcgis-home.d.ts +2 -2
  225. package/dist/components/arcgis-home.js +157 -0
  226. package/{components → dist/components}/arcgis-layer-list.d.ts +2 -2
  227. package/dist/components/arcgis-layer-list.js +356 -0
  228. package/{components → dist/components}/arcgis-legend.d.ts +2 -2
  229. package/dist/components/arcgis-legend.js +185 -0
  230. package/{components → dist/components}/arcgis-line-of-sight.d.ts +2 -2
  231. package/dist/components/arcgis-line-of-sight.js +150 -0
  232. package/{components → dist/components}/arcgis-locate.d.ts +2 -2
  233. package/dist/components/arcgis-locate.js +212 -0
  234. package/{components → dist/components}/arcgis-map.d.ts +2 -2
  235. package/dist/components/arcgis-map.js +697 -0
  236. package/{components → dist/components}/arcgis-measurement.d.ts +2 -2
  237. package/dist/components/arcgis-measurement.js +173 -0
  238. package/{components → dist/components}/arcgis-navigation-toggle.d.ts +2 -2
  239. package/dist/components/arcgis-navigation-toggle.js +127 -0
  240. package/dist/components/arcgis-placement.d.ts +11 -0
  241. package/dist/components/arcgis-placement.js +76 -0
  242. package/{components → dist/components}/arcgis-print.d.ts +2 -2
  243. package/dist/components/arcgis-print.js +232 -0
  244. package/{components → dist/components}/arcgis-scale-bar.d.ts +2 -2
  245. package/dist/components/arcgis-scale-bar.js +130 -0
  246. package/{components → dist/components}/arcgis-scale-range-slider.d.ts +2 -2
  247. package/dist/components/arcgis-scale-range-slider.js +253 -0
  248. package/{components → dist/components}/arcgis-scene.d.ts +2 -2
  249. package/dist/components/arcgis-scene.js +748 -0
  250. package/{components → dist/components}/arcgis-search.d.ts +2 -2
  251. package/dist/components/arcgis-search.js +412 -0
  252. package/{components → dist/components}/arcgis-shadow-cast.d.ts +2 -2
  253. package/dist/components/arcgis-shadow-cast.js +303 -0
  254. package/{components → dist/components}/arcgis-sketch.d.ts +2 -2
  255. package/dist/components/arcgis-sketch.js +604 -0
  256. package/{components → dist/components}/arcgis-slice.d.ts +2 -2
  257. package/dist/components/arcgis-slice.js +184 -0
  258. package/{components → dist/components}/arcgis-slider.d.ts +2 -2
  259. package/dist/components/arcgis-slider.js +298 -0
  260. package/{components → dist/components}/arcgis-swipe.d.ts +2 -2
  261. package/dist/components/arcgis-swipe.js +156 -0
  262. package/{components → dist/components}/arcgis-table-list.d.ts +2 -2
  263. package/dist/components/arcgis-table-list.js +342 -0
  264. package/{components → dist/components}/arcgis-time-slider.d.ts +2 -2
  265. package/dist/components/arcgis-time-slider.js +289 -0
  266. package/{components → dist/components}/arcgis-track.d.ts +2 -2
  267. package/dist/components/arcgis-track.js +231 -0
  268. package/{components → dist/components}/arcgis-utility-network-associations.d.ts +2 -2
  269. package/dist/components/arcgis-utility-network-associations.js +422 -0
  270. package/{components → dist/components}/arcgis-utility-network-trace.d.ts +2 -2
  271. package/dist/components/arcgis-utility-network-trace.js +271 -0
  272. package/{components → dist/components}/arcgis-utility-network-validate-topology.d.ts +2 -2
  273. package/dist/components/arcgis-utility-network-validate-topology.js +127 -0
  274. package/{components → dist/components}/arcgis-value-picker.d.ts +2 -2
  275. package/dist/components/arcgis-value-picker.js +221 -0
  276. package/dist/components/arcgis-version-management-service-item.d.ts +11 -0
  277. package/dist/components/arcgis-version-management-service-item.js +11 -0
  278. package/dist/components/arcgis-version-management-version-item.d.ts +11 -0
  279. package/dist/components/arcgis-version-management-version-item.js +11 -0
  280. package/dist/components/arcgis-version-management-version-list.d.ts +11 -0
  281. package/dist/components/arcgis-version-management-version-list.js +11 -0
  282. package/dist/components/arcgis-version-management-version-properties.d.ts +11 -0
  283. package/dist/components/arcgis-version-management-version-properties.js +11 -0
  284. package/dist/components/arcgis-version-management.d.ts +11 -0
  285. package/dist/components/arcgis-version-management.js +223 -0
  286. package/{components → dist/components}/arcgis-weather.d.ts +2 -2
  287. package/dist/components/arcgis-weather.js +135 -0
  288. package/{components → dist/components}/arcgis-zoom.d.ts +2 -2
  289. package/dist/components/arcgis-zoom.js +145 -0
  290. package/dist/components/component-utils.js +154 -0
  291. package/dist/components/disconnected.js +45 -0
  292. package/dist/components/expand.js +262 -0
  293. package/dist/components/index.d.ts +33 -0
  294. package/dist/components/index.js +6 -0
  295. package/{components → dist/components}/index2.js +211 -188
  296. package/dist/components/version-management-service-item.js +115 -0
  297. package/dist/components/version-management-version-item.js +59 -0
  298. package/dist/components/version-management-version-list.js +96 -0
  299. package/dist/components/version-management-version-properties.js +114 -0
  300. package/dist/esm/arcgis-area-measurement-2d.entry.js +112 -0
  301. package/dist/esm/arcgis-area-measurement-3d.entry.js +120 -0
  302. package/dist/esm/arcgis-attachments.entry.js +106 -0
  303. package/dist/esm/arcgis-basemap-gallery_2.entry.js +718 -0
  304. package/dist/esm/arcgis-basemap-layer-list.entry.js +358 -0
  305. package/dist/esm/arcgis-basemap-toggle.entry.js +119 -0
  306. package/dist/esm/arcgis-bookmarks.entry.js +246 -0
  307. package/dist/esm/arcgis-building-explorer.entry.js +143 -0
  308. package/dist/esm/arcgis-compass.entry.js +125 -0
  309. package/dist/esm/arcgis-coordinate-conversion.entry.js +233 -0
  310. package/dist/esm/arcgis-daylight.entry.js +218 -0
  311. package/dist/esm/arcgis-directional-pad.entry.js +104 -0
  312. package/dist/esm/arcgis-directions.entry.js +250 -0
  313. package/dist/esm/arcgis-directline-measurement-3d.entry.js +132 -0
  314. package/dist/esm/arcgis-distance-measurement-2d.entry.js +117 -0
  315. package/dist/esm/arcgis-editor.entry.js +312 -0
  316. package/dist/esm/arcgis-elevation-profile.entry.js +284 -0
  317. package/dist/esm/arcgis-expand.entry.js +215 -0
  318. package/dist/esm/arcgis-feature-form.entry.js +148 -0
  319. package/dist/esm/arcgis-feature-table.entry.js +455 -0
  320. package/dist/esm/arcgis-feature-templates.entry.js +136 -0
  321. package/dist/esm/arcgis-feature.entry.js +240 -0
  322. package/dist/esm/arcgis-features.entry.js +238 -0
  323. package/dist/esm/arcgis-floor-filter.entry.js +127 -0
  324. package/dist/esm/arcgis-fullscreen.entry.js +87 -0
  325. package/dist/esm/arcgis-histogram-range-slider.entry.js +207 -0
  326. package/dist/esm/arcgis-histogram.entry.js +147 -0
  327. package/dist/esm/arcgis-home.entry.js +122 -0
  328. package/dist/esm/arcgis-layer-list.entry.js +291 -0
  329. package/dist/esm/arcgis-legend.entry.js +146 -0
  330. package/dist/esm/arcgis-line-of-sight.entry.js +116 -0
  331. package/dist/esm/arcgis-locate.entry.js +169 -0
  332. package/dist/esm/arcgis-map-components.js +23 -0
  333. package/dist/esm/arcgis-measurement.entry.js +135 -0
  334. package/dist/esm/arcgis-navigation-toggle.entry.js +97 -0
  335. package/dist/esm/arcgis-placement.entry.js +51 -0
  336. package/dist/esm/arcgis-print.entry.js +186 -0
  337. package/dist/esm/arcgis-scale-bar.entry.js +99 -0
  338. package/dist/esm/arcgis-scale-range-slider.entry.js +204 -0
  339. package/dist/esm/arcgis-scene.entry.js +647 -0
  340. package/dist/esm/arcgis-search.entry.js +335 -0
  341. package/dist/esm/arcgis-shadow-cast.entry.js +245 -0
  342. package/dist/esm/arcgis-sketch.entry.js +504 -0
  343. package/dist/esm/arcgis-slice.entry.js +144 -0
  344. package/dist/esm/arcgis-slider.entry.js +230 -0
  345. package/dist/esm/arcgis-swipe.entry.js +119 -0
  346. package/dist/esm/arcgis-table-list.entry.js +279 -0
  347. package/dist/esm/arcgis-time-slider.entry.js +232 -0
  348. package/dist/esm/arcgis-track.entry.js +185 -0
  349. package/dist/esm/arcgis-utility-network-associations.entry.js +349 -0
  350. package/dist/esm/arcgis-utility-network-trace.entry.js +220 -0
  351. package/dist/esm/arcgis-utility-network-validate-topology.entry.js +96 -0
  352. package/dist/esm/arcgis-value-picker.entry.js +176 -0
  353. package/dist/esm/arcgis-version-management-service-item_2.entry.js +151 -0
  354. package/dist/esm/arcgis-version-management-version-item_2.entry.js +87 -0
  355. package/dist/esm/arcgis-version-management.entry.js +166 -0
  356. package/dist/esm/arcgis-weather.entry.js +104 -0
  357. package/dist/esm/arcgis-zoom.entry.js +112 -0
  358. package/dist/esm/component-utils-352c412f.js +154 -0
  359. package/dist/esm/disconnected-3f01362d.js +45 -0
  360. package/{esm/index-c227d296.js → dist/esm/index-94c85b30.js} +211 -188
  361. package/dist/esm/index-ee66e916.js +2446 -0
  362. package/dist/esm/index.js +5 -0
  363. package/dist/esm/loader.js +14 -0
  364. package/dist/loader/cdn.js +7 -0
  365. package/dist/loader/index.cjs.js +7 -0
  366. package/{loader → dist/loader}/index.d.ts +2 -2
  367. package/dist/loader/index.es2017.js +7 -0
  368. package/{loader → dist/loader}/index.js +5 -1
  369. package/dist/types/components/area-measurement-2d/area-measurement-2d.d.ts +38 -0
  370. package/dist/types/components/area-measurement-3d/area-measurement-3d.d.ts +41 -0
  371. package/dist/types/components/attachments/attachments.d.ts +33 -0
  372. package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +41 -0
  373. package/dist/types/components/basemap-layer-list/basemap-layer-list.d.ts +86 -0
  374. package/dist/types/components/basemap-toggle/basemap-toggle.d.ts +40 -0
  375. package/dist/types/components/bookmarks/bookmarks.d.ts +71 -0
  376. package/dist/types/components/building-explorer/building-explorer.d.ts +47 -0
  377. package/dist/types/components/compass/compass.d.ts +47 -0
  378. package/dist/types/components/coordinate-conversion/coordinate-conversion.d.ts +62 -0
  379. package/dist/types/components/daylight/daylight.d.ts +60 -0
  380. package/dist/types/components/directional-pad/directional-pad.d.ts +37 -0
  381. package/dist/types/components/directions/directions.d.ts +62 -0
  382. package/dist/types/components/directline-measurement-3d/directline-measurement-3d.d.ts +43 -0
  383. package/dist/types/components/distance-measurement-2d/distance-measurement-2d.d.ts +40 -0
  384. package/dist/types/components/editor/editor.d.ts +76 -0
  385. package/dist/types/components/elevation-profile/elevation-profile.d.ts +71 -0
  386. package/dist/types/components/expand/expand.d.ts +57 -0
  387. package/dist/types/components/feature/feature.d.ts +61 -0
  388. package/dist/types/components/feature-form/feature-form.d.ts +42 -0
  389. package/dist/types/components/feature-table/feature-table.d.ts +104 -0
  390. package/dist/types/components/feature-templates/feature-templates.d.ts +38 -0
  391. package/dist/types/components/features/features.d.ts +67 -0
  392. package/dist/types/components/floor-filter/floor-filter.d.ts +42 -0
  393. package/dist/types/components/fullscreen/fullscreen.d.ts +26 -0
  394. package/dist/types/components/histogram/histogram.d.ts +41 -0
  395. package/dist/types/components/histogram-range-slider/histogram-range-slider.d.ts +52 -0
  396. package/dist/types/components/home/home.d.ts +41 -0
  397. package/dist/types/components/layer-list/layer-list.d.ts +73 -0
  398. package/dist/types/components/legend/legend.d.ts +46 -0
  399. package/dist/types/components/line-of-sight/line-of-sight.d.ts +41 -0
  400. package/dist/types/components/locate/locate.d.ts +53 -0
  401. package/dist/types/components/map/map.d.ts +373 -0
  402. package/dist/types/components/measurement/measurement.d.ts +35 -0
  403. package/dist/types/components/navigation-toggle/navigation-toggle.d.ts +36 -0
  404. package/dist/types/components/placement/placement.d.ts +18 -0
  405. package/dist/types/components/print/print.d.ts +56 -0
  406. package/dist/types/components/scale-bar/scale-bar.d.ts +37 -0
  407. package/dist/types/components/scale-range-slider/scale-range-slider.d.ts +56 -0
  408. package/dist/types/components/scene/scene.d.ts +131 -0
  409. package/dist/types/components/search/search.d.ts +93 -0
  410. package/dist/types/components/shadow-cast/shadow-cast.d.ts +65 -0
  411. package/dist/types/components/sketch/sketch.d.ts +113 -0
  412. package/dist/types/components/slice/slice.d.ts +47 -0
  413. package/dist/types/components/slider/slider.d.ts +72 -0
  414. package/dist/types/components/swipe/swipe.d.ts +34 -0
  415. package/dist/types/components/table-list/table-list.d.ts +72 -0
  416. package/dist/types/components/time-slider/time-slider.d.ts +66 -0
  417. package/dist/types/components/track/track.d.ts +56 -0
  418. package/dist/types/components/utility-network-associations/utility-network-associations.d.ts +79 -0
  419. package/dist/types/components/utility-network-trace/utility-network-trace.d.ts +64 -0
  420. package/dist/types/components/utility-network-validate-topology/utility-network-validate-topology.d.ts +37 -0
  421. package/dist/types/components/value-picker/value-picker.d.ts +48 -0
  422. package/dist/types/components/version-management/t9n-types.d.ts +43 -0
  423. package/dist/types/components/version-management/version-management.d.ts +31 -0
  424. package/dist/types/components/version-management-service-item/version-management-service-item.d.ts +32 -0
  425. package/dist/types/components/version-management-version-item/version-management-version-item.d.ts +14 -0
  426. package/dist/types/components/version-management-version-list/version-management-version-list.d.ts +27 -0
  427. package/dist/types/components/version-management-version-properties/version-management-version-properties.d.ts +22 -0
  428. package/dist/types/components/weather/weather.d.ts +37 -0
  429. package/dist/types/components/zoom/zoom.d.ts +39 -0
  430. package/dist/types/components.d.ts +4395 -0
  431. package/{types → dist/types}/stencil-public-runtime.d.ts +61 -17
  432. package/dist/types/utils/SubWidget.d.ts +22 -0
  433. package/dist/types/utils/Widget.d.ts +38 -0
  434. package/dist/types/utils/component-utils.d.ts +31 -0
  435. package/{types → dist/types}/utils/disconnected.d.ts +1 -1
  436. package/dist/types/utils/expandable.d.ts +7 -0
  437. package/dist/types/utils/globalCss.d.ts +43 -0
  438. package/dist/types/utils/legacyIcon.d.ts +100 -0
  439. package/{types → dist/types}/utils/mapping-utils.d.ts +1 -1
  440. package/dist/types/utils/types.d.ts +3 -0
  441. package/package.json +54 -8
  442. package/arcgis-map-components/arcgis-map-components.esm.js +0 -1
  443. package/arcgis-map-components/index.esm.js +0 -0
  444. package/arcgis-map-components/p-01d9efae.entry.js +0 -1
  445. package/arcgis-map-components/p-11e7ce02.entry.js +0 -1
  446. package/arcgis-map-components/p-1435356e.entry.js +0 -1
  447. package/arcgis-map-components/p-174f9d11.entry.js +0 -1
  448. package/arcgis-map-components/p-18c653a4.entry.js +0 -1
  449. package/arcgis-map-components/p-1b5e33ea.entry.js +0 -1
  450. package/arcgis-map-components/p-1c631990.entry.js +0 -1
  451. package/arcgis-map-components/p-1e5e5ed9.js +0 -2
  452. package/arcgis-map-components/p-21721d4b.entry.js +0 -1
  453. package/arcgis-map-components/p-2becbf01.entry.js +0 -1
  454. package/arcgis-map-components/p-2c5be6b0.entry.js +0 -1
  455. package/arcgis-map-components/p-2d3406f7.js +0 -1
  456. package/arcgis-map-components/p-312ff83f.entry.js +0 -1
  457. package/arcgis-map-components/p-3361d81f.entry.js +0 -1
  458. package/arcgis-map-components/p-3587b4d8.entry.js +0 -1
  459. package/arcgis-map-components/p-3b5560bb.entry.js +0 -1
  460. package/arcgis-map-components/p-3e676259.entry.js +0 -1
  461. package/arcgis-map-components/p-47629a4c.entry.js +0 -1
  462. package/arcgis-map-components/p-4b5fa9a2.entry.js +0 -1
  463. package/arcgis-map-components/p-4bb15110.entry.js +0 -1
  464. package/arcgis-map-components/p-4c103777.entry.js +0 -1
  465. package/arcgis-map-components/p-4d5e7ddd.entry.js +0 -1
  466. package/arcgis-map-components/p-4fa3c6fe.entry.js +0 -1
  467. package/arcgis-map-components/p-501861a1.entry.js +0 -1
  468. package/arcgis-map-components/p-535bf289.entry.js +0 -1
  469. package/arcgis-map-components/p-5a91868a.entry.js +0 -1
  470. package/arcgis-map-components/p-5cabdee7.js +0 -1
  471. package/arcgis-map-components/p-5d835456.entry.js +0 -1
  472. package/arcgis-map-components/p-5db2786d.entry.js +0 -1
  473. package/arcgis-map-components/p-5ea3ce11.entry.js +0 -1
  474. package/arcgis-map-components/p-620959fc.js +0 -1
  475. package/arcgis-map-components/p-721673c8.entry.js +0 -1
  476. package/arcgis-map-components/p-8c18a99c.entry.js +0 -1
  477. package/arcgis-map-components/p-8d184d92.entry.js +0 -1
  478. package/arcgis-map-components/p-8fde8001.entry.js +0 -1
  479. package/arcgis-map-components/p-927f8748.entry.js +0 -1
  480. package/arcgis-map-components/p-9aad48fe.entry.js +0 -1
  481. package/arcgis-map-components/p-9c1b8e69.entry.js +0 -1
  482. package/arcgis-map-components/p-9e667282.entry.js +0 -1
  483. package/arcgis-map-components/p-a67dda4e.entry.js +0 -1
  484. package/arcgis-map-components/p-acb4a35a.entry.js +0 -1
  485. package/arcgis-map-components/p-b19043d5.entry.js +0 -1
  486. package/arcgis-map-components/p-b813c9e6.js +0 -1
  487. package/arcgis-map-components/p-bb6e5f04.entry.js +0 -1
  488. package/arcgis-map-components/p-bfae0a1f.entry.js +0 -1
  489. package/arcgis-map-components/p-c63a5c7f.entry.js +0 -1
  490. package/arcgis-map-components/p-ce14e49f.entry.js +0 -1
  491. package/arcgis-map-components/p-d3fbbf3f.entry.js +0 -1
  492. package/arcgis-map-components/p-d8be8a46.entry.js +0 -1
  493. package/arcgis-map-components/p-dafb17cf.entry.js +0 -1
  494. package/arcgis-map-components/p-ec2cc024.entry.js +0 -1
  495. package/arcgis-map-components/p-ef0b3818.entry.js +0 -1
  496. package/arcgis-map-components/p-f0e5dcc7.entry.js +0 -1
  497. package/arcgis-map-components/p-f5cc7f2d.entry.js +0 -1
  498. package/arcgis-map-components/p-f7b74cd4.entry.js +0 -1
  499. package/cjs/arcgis-area-measurement-2d.cjs.entry.js +0 -101
  500. package/cjs/arcgis-area-measurement-3d.cjs.entry.js +0 -94
  501. package/cjs/arcgis-attachments.cjs.entry.js +0 -73
  502. package/cjs/arcgis-basemap-gallery.cjs.entry.js +0 -97
  503. package/cjs/arcgis-basemap-layer-list.cjs.entry.js +0 -144
  504. package/cjs/arcgis-basemap-toggle.cjs.entry.js +0 -115
  505. package/cjs/arcgis-bookmarks.cjs.entry.js +0 -140
  506. package/cjs/arcgis-building-explorer.cjs.entry.js +0 -80
  507. package/cjs/arcgis-compass.cjs.entry.js +0 -90
  508. package/cjs/arcgis-coordinate-conversion.cjs.entry.js +0 -158
  509. package/cjs/arcgis-daylight.cjs.entry.js +0 -116
  510. package/cjs/arcgis-directions.cjs.entry.js +0 -194
  511. package/cjs/arcgis-directline-measurement-3d.cjs.entry.js +0 -114
  512. package/cjs/arcgis-distance-measurement-2d.cjs.entry.js +0 -106
  513. package/cjs/arcgis-editor.cjs.entry.js +0 -180
  514. package/cjs/arcgis-elevation-profile.cjs.entry.js +0 -136
  515. package/cjs/arcgis-expand_4.cjs.entry.js +0 -793
  516. package/cjs/arcgis-feature-form.cjs.entry.js +0 -36
  517. package/cjs/arcgis-feature-templates.cjs.entry.js +0 -73
  518. package/cjs/arcgis-feature.cjs.entry.js +0 -106
  519. package/cjs/arcgis-features.cjs.entry.js +0 -133
  520. package/cjs/arcgis-floor-filter.cjs.entry.js +0 -134
  521. package/cjs/arcgis-fullscreen.cjs.entry.js +0 -92
  522. package/cjs/arcgis-histogram-range-slider.cjs.entry.js +0 -80
  523. package/cjs/arcgis-histogram.cjs.entry.js +0 -36
  524. package/cjs/arcgis-home.cjs.entry.js +0 -108
  525. package/cjs/arcgis-layer-list.cjs.entry.js +0 -128
  526. package/cjs/arcgis-legend.cjs.entry.js +0 -146
  527. package/cjs/arcgis-line-of-sight.cjs.entry.js +0 -94
  528. package/cjs/arcgis-locate.cjs.entry.js +0 -158
  529. package/cjs/arcgis-map-components.cjs.js +0 -23
  530. package/cjs/arcgis-measurement.cjs.entry.js +0 -123
  531. package/cjs/arcgis-navigation-toggle.cjs.entry.js +0 -97
  532. package/cjs/arcgis-print.cjs.entry.js +0 -163
  533. package/cjs/arcgis-scale-bar.cjs.entry.js +0 -106
  534. package/cjs/arcgis-scale-range-slider.cjs.entry.js +0 -146
  535. package/cjs/arcgis-scene.cjs.entry.js +0 -126
  536. package/cjs/arcgis-shadow-cast.cjs.entry.js +0 -95
  537. package/cjs/arcgis-sketch.cjs.entry.js +0 -201
  538. package/cjs/arcgis-slice.cjs.entry.js +0 -103
  539. package/cjs/arcgis-slider.cjs.entry.js +0 -233
  540. package/cjs/arcgis-swipe.cjs.entry.js +0 -117
  541. package/cjs/arcgis-table-list.cjs.entry.js +0 -118
  542. package/cjs/arcgis-time-slider.cjs.entry.js +0 -216
  543. package/cjs/arcgis-track.cjs.entry.js +0 -147
  544. package/cjs/arcgis-utility-network-associations.cjs.entry.js +0 -220
  545. package/cjs/arcgis-utility-network-trace.cjs.entry.js +0 -162
  546. package/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +0 -110
  547. package/cjs/arcgis-value-picker.cjs.entry.js +0 -160
  548. package/cjs/arcgis-weather.cjs.entry.js +0 -86
  549. package/cjs/arcgis-zoom.cjs.entry.js +0 -100
  550. package/cjs/component-utils-cbd20e88.js +0 -77
  551. package/cjs/disconnected-306cb220.js +0 -55
  552. package/cjs/index-6b51d5a0.js +0 -1611
  553. package/cjs/index.cjs.js +0 -2
  554. package/cjs/loader.cjs.js +0 -22
  555. package/cjs/mapping-utils-c2c7b994.js +0 -40
  556. package/components/arcgis-area-measurement-2d.js +0 -128
  557. package/components/arcgis-area-measurement-3d.js +0 -121
  558. package/components/arcgis-attachments.js +0 -99
  559. package/components/arcgis-basemap-gallery.js +0 -124
  560. package/components/arcgis-basemap-layer-list.js +0 -175
  561. package/components/arcgis-basemap-toggle.js +0 -143
  562. package/components/arcgis-bookmarks.js +0 -169
  563. package/components/arcgis-building-explorer.js +0 -105
  564. package/components/arcgis-compass.js +0 -109
  565. package/components/arcgis-coordinate-conversion.js +0 -193
  566. package/components/arcgis-daylight.js +0 -144
  567. package/components/arcgis-directions.js +0 -230
  568. package/components/arcgis-directline-measurement-3d.js +0 -142
  569. package/components/arcgis-distance-measurement-2d.js +0 -133
  570. package/components/arcgis-editor.js +0 -219
  571. package/components/arcgis-elevation-profile.js +0 -166
  572. package/components/arcgis-expand2.js +0 -107
  573. package/components/arcgis-feature-form.js +0 -55
  574. package/components/arcgis-feature-table.js +0 -355
  575. package/components/arcgis-feature-templates.js +0 -98
  576. package/components/arcgis-feature.js +0 -133
  577. package/components/arcgis-features.js +0 -169
  578. package/components/arcgis-floor-filter.js +0 -164
  579. package/components/arcgis-fullscreen.js +0 -111
  580. package/components/arcgis-histogram-range-slider.js +0 -106
  581. package/components/arcgis-histogram.js +0 -55
  582. package/components/arcgis-home.js +0 -129
  583. package/components/arcgis-layer-list.js +0 -158
  584. package/components/arcgis-legend.js +0 -177
  585. package/components/arcgis-line-of-sight.js +0 -120
  586. package/components/arcgis-locate.js +0 -184
  587. package/components/arcgis-map.js +0 -168
  588. package/components/arcgis-measurement.js +0 -153
  589. package/components/arcgis-navigation-toggle.js +0 -117
  590. package/components/arcgis-print.js +0 -197
  591. package/components/arcgis-scale-bar.js +0 -133
  592. package/components/arcgis-scale-range-slider.js +0 -177
  593. package/components/arcgis-scene.js +0 -150
  594. package/components/arcgis-search.js +0 -330
  595. package/components/arcgis-shadow-cast.js +0 -121
  596. package/components/arcgis-sketch.js +0 -238
  597. package/components/arcgis-slice.js +0 -130
  598. package/components/arcgis-slider.js +0 -281
  599. package/components/arcgis-swipe.js +0 -140
  600. package/components/arcgis-table-list.js +0 -147
  601. package/components/arcgis-time-slider.js +0 -256
  602. package/components/arcgis-track.js +0 -171
  603. package/components/arcgis-utility-network-associations.js +0 -258
  604. package/components/arcgis-utility-network-trace.js +0 -197
  605. package/components/arcgis-utility-network-validate-topology.js +0 -137
  606. package/components/arcgis-value-picker.js +0 -198
  607. package/components/arcgis-weather.js +0 -111
  608. package/components/arcgis-zoom.js +0 -121
  609. package/components/disconnected.js +0 -122
  610. package/components/index.d.ts +0 -83
  611. package/components/index.js +0 -54
  612. package/components/mapping-utils.js +0 -38
  613. package/esm/arcgis-area-measurement-2d.entry.js +0 -97
  614. package/esm/arcgis-area-measurement-3d.entry.js +0 -90
  615. package/esm/arcgis-attachments.entry.js +0 -69
  616. package/esm/arcgis-basemap-gallery.entry.js +0 -93
  617. package/esm/arcgis-basemap-layer-list.entry.js +0 -140
  618. package/esm/arcgis-basemap-toggle.entry.js +0 -111
  619. package/esm/arcgis-bookmarks.entry.js +0 -136
  620. package/esm/arcgis-building-explorer.entry.js +0 -76
  621. package/esm/arcgis-compass.entry.js +0 -86
  622. package/esm/arcgis-coordinate-conversion.entry.js +0 -154
  623. package/esm/arcgis-daylight.entry.js +0 -112
  624. package/esm/arcgis-directions.entry.js +0 -190
  625. package/esm/arcgis-directline-measurement-3d.entry.js +0 -110
  626. package/esm/arcgis-distance-measurement-2d.entry.js +0 -102
  627. package/esm/arcgis-editor.entry.js +0 -176
  628. package/esm/arcgis-elevation-profile.entry.js +0 -132
  629. package/esm/arcgis-expand_4.entry.js +0 -786
  630. package/esm/arcgis-feature-form.entry.js +0 -32
  631. package/esm/arcgis-feature-templates.entry.js +0 -69
  632. package/esm/arcgis-feature.entry.js +0 -102
  633. package/esm/arcgis-features.entry.js +0 -129
  634. package/esm/arcgis-floor-filter.entry.js +0 -130
  635. package/esm/arcgis-fullscreen.entry.js +0 -88
  636. package/esm/arcgis-histogram-range-slider.entry.js +0 -76
  637. package/esm/arcgis-histogram.entry.js +0 -32
  638. package/esm/arcgis-home.entry.js +0 -104
  639. package/esm/arcgis-layer-list.entry.js +0 -124
  640. package/esm/arcgis-legend.entry.js +0 -142
  641. package/esm/arcgis-line-of-sight.entry.js +0 -90
  642. package/esm/arcgis-locate.entry.js +0 -154
  643. package/esm/arcgis-map-components.js +0 -18
  644. package/esm/arcgis-measurement.entry.js +0 -119
  645. package/esm/arcgis-navigation-toggle.entry.js +0 -93
  646. package/esm/arcgis-print.entry.js +0 -159
  647. package/esm/arcgis-scale-bar.entry.js +0 -102
  648. package/esm/arcgis-scale-range-slider.entry.js +0 -142
  649. package/esm/arcgis-scene.entry.js +0 -122
  650. package/esm/arcgis-shadow-cast.entry.js +0 -91
  651. package/esm/arcgis-sketch.entry.js +0 -197
  652. package/esm/arcgis-slice.entry.js +0 -99
  653. package/esm/arcgis-slider.entry.js +0 -229
  654. package/esm/arcgis-swipe.entry.js +0 -113
  655. package/esm/arcgis-table-list.entry.js +0 -114
  656. package/esm/arcgis-time-slider.entry.js +0 -212
  657. package/esm/arcgis-track.entry.js +0 -143
  658. package/esm/arcgis-utility-network-associations.entry.js +0 -216
  659. package/esm/arcgis-utility-network-trace.entry.js +0 -158
  660. package/esm/arcgis-utility-network-validate-topology.entry.js +0 -106
  661. package/esm/arcgis-value-picker.entry.js +0 -156
  662. package/esm/arcgis-weather.entry.js +0 -82
  663. package/esm/arcgis-zoom.entry.js +0 -96
  664. package/esm/component-utils-2ebdae59.js +0 -73
  665. package/esm/disconnected-bc5fc8bc.js +0 -52
  666. package/esm/index-eb3ead33.js +0 -1583
  667. package/esm/index.js +0 -1
  668. package/esm/loader.js +0 -18
  669. package/esm/mapping-utils-26beb904.js +0 -38
  670. package/esm/polyfills/css-shim.js +0 -1
  671. package/loader/cdn.js +0 -3
  672. package/loader/index.cjs.js +0 -3
  673. package/loader/index.es2017.js +0 -3
  674. package/types/components/arcgis-area-measurement-2d/arcgis-area-measurement-2d.d.ts +0 -29
  675. package/types/components/arcgis-area-measurement-3d/arcgis-area-measurement-3d.d.ts +0 -28
  676. package/types/components/arcgis-attachments/arcgis-attachments.d.ts +0 -24
  677. package/types/components/arcgis-basemap-gallery/arcgis-basemap-gallery.d.ts +0 -29
  678. package/types/components/arcgis-basemap-layer-list/arcgis-basemap-layer-list.d.ts +0 -37
  679. package/types/components/arcgis-basemap-toggle/arcgis-basemap-toggle.d.ts +0 -31
  680. package/types/components/arcgis-bookmarks/arcgis-bookmarks.d.ts +0 -38
  681. package/types/components/arcgis-building-explorer/arcgis-building-explorer.d.ts +0 -25
  682. package/types/components/arcgis-compass/arcgis-compass.d.ts +0 -24
  683. package/types/components/arcgis-coordinate-conversion/arcgis-coordinate-conversion.d.ts +0 -45
  684. package/types/components/arcgis-daylight/arcgis-daylight.d.ts +0 -32
  685. package/types/components/arcgis-directions/arcgis-directions.d.ts +0 -46
  686. package/types/components/arcgis-directline-measurement-3d/arcgis-directline-measurement-3d.d.ts +0 -32
  687. package/types/components/arcgis-distance-measurement-2d/arcgis-distance-measurement-2d.d.ts +0 -30
  688. package/types/components/arcgis-editor/arcgis-editor.d.ts +0 -47
  689. package/types/components/arcgis-elevation-profile/arcgis-elevation-profile.d.ts +0 -36
  690. package/types/components/arcgis-expand/arcgis-expand.d.ts +0 -23
  691. package/types/components/arcgis-feature/arcgis-feature.d.ts +0 -30
  692. package/types/components/arcgis-feature-form/arcgis-feature-form.d.ts +0 -18
  693. package/types/components/arcgis-feature-table/arcgis-feature-table.d.ts +0 -71
  694. package/types/components/arcgis-feature-templates/arcgis-feature-templates.d.ts +0 -24
  695. package/types/components/arcgis-features/arcgis-features.d.ts +0 -37
  696. package/types/components/arcgis-floor-filter/arcgis-floor-filter.d.ts +0 -35
  697. package/types/components/arcgis-fullscreen/arcgis-fullscreen.d.ts +0 -25
  698. package/types/components/arcgis-histogram/arcgis-histogram.d.ts +0 -18
  699. package/types/components/arcgis-histogram-range-slider/arcgis-histogram-range-slider.d.ts +0 -25
  700. package/types/components/arcgis-home/arcgis-home.d.ts +0 -29
  701. package/types/components/arcgis-layer-list/arcgis-layer-list.d.ts +0 -37
  702. package/types/components/arcgis-legend/arcgis-legend.d.ts +0 -38
  703. package/types/components/arcgis-line-of-sight/arcgis-line-of-sight.d.ts +0 -28
  704. package/types/components/arcgis-locate/arcgis-locate.d.ts +0 -40
  705. package/types/components/arcgis-map/arcgis-map.d.ts +0 -33
  706. package/types/components/arcgis-measurement/arcgis-measurement.d.ts +0 -35
  707. package/types/components/arcgis-navigation-toggle/arcgis-navigation-toggle.d.ts +0 -26
  708. package/types/components/arcgis-print/arcgis-print.d.ts +0 -47
  709. package/types/components/arcgis-scale-bar/arcgis-scale-bar.d.ts +0 -30
  710. package/types/components/arcgis-scale-range-slider/arcgis-scale-range-slider.d.ts +0 -40
  711. package/types/components/arcgis-scene/arcgis-scene.d.ts +0 -29
  712. package/types/components/arcgis-search/arcgis-search.d.ts +0 -82
  713. package/types/components/arcgis-shadow-cast/arcgis-shadow-cast.d.ts +0 -28
  714. package/types/components/arcgis-sketch/arcgis-sketch.d.ts +0 -53
  715. package/types/components/arcgis-slice/arcgis-slice.d.ts +0 -30
  716. package/types/components/arcgis-slider/arcgis-slider.d.ts +0 -71
  717. package/types/components/arcgis-swipe/arcgis-swipe.d.ts +0 -33
  718. package/types/components/arcgis-table-list/arcgis-table-list.d.ts +0 -35
  719. package/types/components/arcgis-time-slider/arcgis-time-slider.d.ts +0 -54
  720. package/types/components/arcgis-track/arcgis-track.d.ts +0 -38
  721. package/types/components/arcgis-utility-network-associations/arcgis-utility-network-associations.d.ts +0 -52
  722. package/types/components/arcgis-utility-network-trace/arcgis-utility-network-trace.d.ts +0 -48
  723. package/types/components/arcgis-utility-network-validate-topology/arcgis-utility-network-validate-topology.d.ts +0 -30
  724. package/types/components/arcgis-value-picker/arcgis-value-picker.d.ts +0 -48
  725. package/types/components/arcgis-weather/arcgis-weather.d.ts +0 -26
  726. package/types/components/arcgis-zoom/arcgis-zoom.d.ts +0 -27
  727. package/types/components.d.ts +0 -2151
  728. package/types/utils/component-utils.d.ts +0 -22
  729. package/types/utils/expandable.d.ts +0 -6
  730. /package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  731. /package/{esm → dist/esm}/polyfills/dom.js +0 -0
  732. /package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  733. /package/{esm → dist/esm}/polyfills/index.js +0 -0
  734. /package/{esm → dist/esm}/polyfills/system.js +0 -0
  735. /package/{index.cjs.js → dist/index.cjs.js} +0 -0
  736. /package/{index.js → dist/index.js} +0 -0
  737. /package/{loader → dist/loader}/package.json +0 -0
  738. /package/{types → dist/types}/components/types.d.ts +0 -0
  739. /package/{types → dist/types}/index.d.ts +0 -0
@@ -0,0 +1,2446 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.29/esri/copyright.txt for details.
4
+ * v4.29.0
5
+ */
6
+ const NAMESPACE = 'arcgis-map-components';
7
+ const BUILD = /* arcgis-map-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
8
+
9
+ /**
10
+ * Virtual DOM patching algorithm based on Snabbdom by
11
+ * Simon Friis Vindum (@paldepind)
12
+ * Licensed under the MIT License
13
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
14
+ *
15
+ * Modified for Stencil's renderer and slot projection
16
+ */
17
+ let scopeId;
18
+ let contentRef;
19
+ let hostTagName;
20
+ let useNativeShadowDom = false;
21
+ let checkSlotFallbackVisibility = false;
22
+ let checkSlotRelocate = false;
23
+ let isSvgMode = false;
24
+ let queuePending = false;
25
+ const getAssetPath = (path) => {
26
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
27
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
28
+ };
29
+ const createTime = (fnName, tagName = '') => {
30
+ {
31
+ return () => {
32
+ return;
33
+ };
34
+ }
35
+ };
36
+ const uniqueTime = (key, measureText) => {
37
+ {
38
+ return () => {
39
+ return;
40
+ };
41
+ }
42
+ };
43
+ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
44
+ /**
45
+ * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
46
+ *
47
+ * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
48
+ * support as of Stencil v4.
49
+ */
50
+ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
51
+ /**
52
+ * Default style mode id
53
+ */
54
+ /**
55
+ * Reusable empty obj/array
56
+ * Don't add values to these!!
57
+ */
58
+ const EMPTY_OBJ = {};
59
+ const isDef = (v) => v != null;
60
+ /**
61
+ * Check whether a value is a 'complex type', defined here as an object or a
62
+ * function.
63
+ *
64
+ * @param o the value to check
65
+ * @returns whether it's a complex type or not
66
+ */
67
+ const isComplexType = (o) => {
68
+ // https://jsperf.com/typeof-fn-object/5
69
+ o = typeof o;
70
+ return o === 'object' || o === 'function';
71
+ };
72
+ /**
73
+ * Helper method for querying a `meta` tag that contains a nonce value
74
+ * out of a DOM's head.
75
+ *
76
+ * @param doc The DOM containing the `head` to query against
77
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
78
+ * exists or the tag has no content.
79
+ */
80
+ function queryNonceMetaTagContent(doc) {
81
+ var _a, _b, _c;
82
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
83
+ }
84
+ /**
85
+ * Production h() function based on Preact by
86
+ * Jason Miller (@developit)
87
+ * Licensed under the MIT License
88
+ * https://github.com/developit/preact/blob/master/LICENSE
89
+ *
90
+ * Modified for Stencil's compiler and vdom
91
+ */
92
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
93
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
94
+ const h = (nodeName, vnodeData, ...children) => {
95
+ let child = null;
96
+ let slotName = null;
97
+ let simple = false;
98
+ let lastSimple = false;
99
+ const vNodeChildren = [];
100
+ const walk = (c) => {
101
+ for (let i = 0; i < c.length; i++) {
102
+ child = c[i];
103
+ if (Array.isArray(child)) {
104
+ walk(child);
105
+ }
106
+ else if (child != null && typeof child !== 'boolean') {
107
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
108
+ child = String(child);
109
+ }
110
+ if (simple && lastSimple) {
111
+ // If the previous child was simple (string), we merge both
112
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
113
+ }
114
+ else {
115
+ // Append a new vNode, if it's text, we create a text vNode
116
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
117
+ }
118
+ lastSimple = simple;
119
+ }
120
+ }
121
+ };
122
+ walk(children);
123
+ if (vnodeData) {
124
+ if (vnodeData.name) {
125
+ slotName = vnodeData.name;
126
+ }
127
+ // normalize class / className attributes
128
+ {
129
+ const classData = vnodeData.className || vnodeData.class;
130
+ if (classData) {
131
+ vnodeData.class =
132
+ typeof classData !== 'object'
133
+ ? classData
134
+ : Object.keys(classData)
135
+ .filter((k) => classData[k])
136
+ .join(' ');
137
+ }
138
+ }
139
+ }
140
+ const vnode = newVNode(nodeName, null);
141
+ vnode.$attrs$ = vnodeData;
142
+ if (vNodeChildren.length > 0) {
143
+ vnode.$children$ = vNodeChildren;
144
+ }
145
+ {
146
+ vnode.$name$ = slotName;
147
+ }
148
+ return vnode;
149
+ };
150
+ /**
151
+ * A utility function for creating a virtual DOM node from a tag and some
152
+ * possible text content.
153
+ *
154
+ * @param tag the tag for this element
155
+ * @param text possible text content for the node
156
+ * @returns a newly-minted virtual DOM node
157
+ */
158
+ const newVNode = (tag, text) => {
159
+ const vnode = {
160
+ $flags$: 0,
161
+ $tag$: tag,
162
+ $text$: text,
163
+ $elm$: null,
164
+ $children$: null,
165
+ };
166
+ {
167
+ vnode.$attrs$ = null;
168
+ }
169
+ {
170
+ vnode.$name$ = null;
171
+ }
172
+ return vnode;
173
+ };
174
+ const Host = {};
175
+ /**
176
+ * Check whether a given node is a Host node or not
177
+ *
178
+ * @param node the virtual DOM node to check
179
+ * @returns whether it's a Host node or not
180
+ */
181
+ const isHost = (node) => node && node.$tag$ === Host;
182
+ /**
183
+ * Parse a new property value for a given property type.
184
+ *
185
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
186
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
187
+ * 1. `any`, the type given to `propValue` in the function signature
188
+ * 2. the type stored from `propType`.
189
+ *
190
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
191
+ *
192
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
193
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
194
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
195
+ * ```tsx
196
+ * <my-cmp prop-val={0}></my-cmp>
197
+ * ```
198
+ *
199
+ * HTML prop values on the other hand, will always a string
200
+ *
201
+ * @param propValue the new value to coerce to some type
202
+ * @param propType the type of the prop, expressed as a binary number
203
+ * @returns the parsed/coerced value
204
+ */
205
+ const parsePropertyValue = (propValue, propType) => {
206
+ // ensure this value is of the correct prop type
207
+ if (propValue != null && !isComplexType(propValue)) {
208
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
209
+ // per the HTML spec, any string value means it is a boolean true value
210
+ // but we'll cheat here and say that the string "false" is the boolean false
211
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
212
+ }
213
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
214
+ // force it to be a number
215
+ return parseFloat(propValue);
216
+ }
217
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
218
+ // could have been passed as a number or boolean
219
+ // but we still want it as a string
220
+ return String(propValue);
221
+ }
222
+ // redundant return here for better minification
223
+ return propValue;
224
+ }
225
+ // not sure exactly what type we want
226
+ // so no need to change to a different type
227
+ return propValue;
228
+ };
229
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
230
+ const createEvent = (ref, name, flags) => {
231
+ const elm = getElement(ref);
232
+ return {
233
+ emit: (detail) => {
234
+ return emitEvent(elm, name, {
235
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
236
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
237
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
238
+ detail,
239
+ });
240
+ },
241
+ };
242
+ };
243
+ /**
244
+ * Helper function to create & dispatch a custom Event on a provided target
245
+ * @param elm the target of the Event
246
+ * @param name the name to give the custom Event
247
+ * @param opts options for configuring a custom Event
248
+ * @returns the custom Event
249
+ */
250
+ const emitEvent = (elm, name, opts) => {
251
+ const ev = plt.ce(name, opts);
252
+ elm.dispatchEvent(ev);
253
+ return ev;
254
+ };
255
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
256
+ const registerStyle = (scopeId, cssText, allowCS) => {
257
+ let style = styles.get(scopeId);
258
+ if (supportsConstructableStylesheets && allowCS) {
259
+ style = (style || new CSSStyleSheet());
260
+ if (typeof style === 'string') {
261
+ style = cssText;
262
+ }
263
+ else {
264
+ style.replaceSync(cssText);
265
+ }
266
+ }
267
+ else {
268
+ style = cssText;
269
+ }
270
+ styles.set(scopeId, style);
271
+ };
272
+ const addStyle = (styleContainerNode, cmpMeta, mode) => {
273
+ var _a;
274
+ const scopeId = getScopeId(cmpMeta);
275
+ const style = styles.get(scopeId);
276
+ // if an element is NOT connected then getRootNode() will return the wrong root node
277
+ // so the fallback is to always use the document for the root node in those cases
278
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
279
+ if (style) {
280
+ if (typeof style === 'string') {
281
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
282
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
283
+ let styleElm;
284
+ if (!appliedStyles) {
285
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
286
+ }
287
+ if (!appliedStyles.has(scopeId)) {
288
+ {
289
+ styleElm = doc.createElement('style');
290
+ styleElm.innerHTML = style;
291
+ // Apply CSP nonce to the style tag if it exists
292
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
293
+ if (nonce != null) {
294
+ styleElm.setAttribute('nonce', nonce);
295
+ }
296
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
297
+ }
298
+ // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
299
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
300
+ styleElm.innerHTML += SLOT_FB_CSS;
301
+ }
302
+ if (appliedStyles) {
303
+ appliedStyles.add(scopeId);
304
+ }
305
+ }
306
+ }
307
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
308
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
309
+ }
310
+ }
311
+ return scopeId;
312
+ };
313
+ const attachStyles = (hostRef) => {
314
+ const cmpMeta = hostRef.$cmpMeta$;
315
+ const elm = hostRef.$hostElement$;
316
+ const flags = cmpMeta.$flags$;
317
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
318
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
319
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
320
+ // only required when we're NOT using native shadow dom (slot)
321
+ // or this browser doesn't support native shadow dom
322
+ // and this host element was NOT created with SSR
323
+ // let's pick out the inner content for slot projection
324
+ // create a node to represent where the original
325
+ // content was first placed, which is useful later on
326
+ // DOM WRITE!!
327
+ elm['s-sc'] = scopeId;
328
+ elm.classList.add(scopeId + '-h');
329
+ }
330
+ endAttachStyles();
331
+ };
332
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
333
+ /**
334
+ * Production setAccessor() function based on Preact by
335
+ * Jason Miller (@developit)
336
+ * Licensed under the MIT License
337
+ * https://github.com/developit/preact/blob/master/LICENSE
338
+ *
339
+ * Modified for Stencil's compiler and vdom
340
+ */
341
+ /**
342
+ * When running a VDom render set properties present on a VDom node onto the
343
+ * corresponding HTML element.
344
+ *
345
+ * Note that this function has special functionality for the `class`,
346
+ * `style`, `key`, and `ref` attributes, as well as event handlers (like
347
+ * `onClick`, etc). All others are just passed through as-is.
348
+ *
349
+ * @param elm the HTMLElement onto which attributes should be set
350
+ * @param memberName the name of the attribute to set
351
+ * @param oldValue the old value for the attribute
352
+ * @param newValue the new value for the attribute
353
+ * @param isSvg whether we're in an svg context or not
354
+ * @param flags bitflags for Vdom variables
355
+ */
356
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
357
+ if (oldValue !== newValue) {
358
+ let isProp = isMemberInElement(elm, memberName);
359
+ let ln = memberName.toLowerCase();
360
+ if (memberName === 'class') {
361
+ const classList = elm.classList;
362
+ const oldClasses = parseClassList(oldValue);
363
+ const newClasses = parseClassList(newValue);
364
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
365
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
366
+ }
367
+ else if (memberName === 'ref') {
368
+ // minifier will clean this up
369
+ if (newValue) {
370
+ newValue(elm);
371
+ }
372
+ }
373
+ else if ((!isProp ) &&
374
+ memberName[0] === 'o' &&
375
+ memberName[1] === 'n') {
376
+ // Event Handlers
377
+ // so if the member name starts with "on" and the 3rd characters is
378
+ // a capital letter, and it's not already a member on the element,
379
+ // then we're assuming it's an event listener
380
+ if (memberName[2] === '-') {
381
+ // on- prefixed events
382
+ // allows to be explicit about the dom event to listen without any magic
383
+ // under the hood:
384
+ // <my-cmp on-click> // listens for "click"
385
+ // <my-cmp on-Click> // listens for "Click"
386
+ // <my-cmp on-ionChange> // listens for "ionChange"
387
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
388
+ memberName = memberName.slice(3);
389
+ }
390
+ else if (isMemberInElement(win, ln)) {
391
+ // standard event
392
+ // the JSX attribute could have been "onMouseOver" and the
393
+ // member name "onmouseover" is on the window's prototype
394
+ // so let's add the listener "mouseover", which is all lowercased
395
+ memberName = ln.slice(2);
396
+ }
397
+ else {
398
+ // custom event
399
+ // the JSX attribute could have been "onMyCustomEvent"
400
+ // so let's trim off the "on" prefix and lowercase the first character
401
+ // and add the listener "myCustomEvent"
402
+ // except for the first character, we keep the event name case
403
+ memberName = ln[2] + memberName.slice(3);
404
+ }
405
+ if (oldValue || newValue) {
406
+ // Need to account for "capture" events.
407
+ // If the event name ends with "Capture", we'll update the name to remove
408
+ // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
409
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
410
+ // Make sure we only replace the last instance of "Capture"
411
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
412
+ if (oldValue) {
413
+ plt.rel(elm, memberName, oldValue, capture);
414
+ }
415
+ if (newValue) {
416
+ plt.ael(elm, memberName, newValue, capture);
417
+ }
418
+ }
419
+ }
420
+ else {
421
+ // Set property if it exists and it's not a SVG
422
+ const isComplex = isComplexType(newValue);
423
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
424
+ try {
425
+ if (!elm.tagName.includes('-')) {
426
+ const n = newValue == null ? '' : newValue;
427
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
428
+ if (memberName === 'list') {
429
+ isProp = false;
430
+ }
431
+ else if (oldValue == null || elm[memberName] != n) {
432
+ elm[memberName] = n;
433
+ }
434
+ }
435
+ else {
436
+ elm[memberName] = newValue;
437
+ }
438
+ }
439
+ catch (e) {
440
+ /**
441
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
442
+ */
443
+ }
444
+ }
445
+ if (newValue == null || newValue === false) {
446
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
447
+ {
448
+ elm.removeAttribute(memberName);
449
+ }
450
+ }
451
+ }
452
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
453
+ newValue = newValue === true ? '' : newValue;
454
+ {
455
+ elm.setAttribute(memberName, newValue);
456
+ }
457
+ }
458
+ }
459
+ }
460
+ };
461
+ const parseClassListRegex = /\s/;
462
+ /**
463
+ * Parsed a string of classnames into an array
464
+ * @param value className string, e.g. "foo bar baz"
465
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
466
+ */
467
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
468
+ const CAPTURE_EVENT_SUFFIX = 'Capture';
469
+ const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
470
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
471
+ // if the element passed in is a shadow root, which is a document fragment
472
+ // then we want to be adding attrs/props to the shadow root's "host" element
473
+ // if it's not a shadow root, then we add attrs/props to the same element
474
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
475
+ ? newVnode.$elm$.host
476
+ : newVnode.$elm$;
477
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
478
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
479
+ {
480
+ // remove attributes no longer present on the vnode by setting them to undefined
481
+ for (memberName in oldVnodeAttrs) {
482
+ if (!(memberName in newVnodeAttrs)) {
483
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
484
+ }
485
+ }
486
+ }
487
+ // add new & update changed attributes
488
+ for (memberName in newVnodeAttrs) {
489
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
490
+ }
491
+ };
492
+ /**
493
+ * Create a DOM Node corresponding to one of the children of a given VNode.
494
+ *
495
+ * @param oldParentVNode the parent VNode from the previous render
496
+ * @param newParentVNode the parent VNode from the current render
497
+ * @param childIndex the index of the VNode, in the _new_ parent node's
498
+ * children, for which we will create a new DOM node
499
+ * @param parentElm the parent DOM node which our new node will be a child of
500
+ * @returns the newly created node
501
+ */
502
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
503
+ // tslint:disable-next-line: prefer-const
504
+ const newVNode = newParentVNode.$children$[childIndex];
505
+ let i = 0;
506
+ let elm;
507
+ let childNode;
508
+ let oldVNode;
509
+ if (!useNativeShadowDom) {
510
+ // remember for later we need to check to relocate nodes
511
+ checkSlotRelocate = true;
512
+ if (newVNode.$tag$ === 'slot') {
513
+ if (scopeId) {
514
+ // scoped css needs to add its scoped id to the parent element
515
+ parentElm.classList.add(scopeId + '-s');
516
+ }
517
+ newVNode.$flags$ |= newVNode.$children$
518
+ ? // slot element has fallback content
519
+ 2 /* VNODE_FLAGS.isSlotFallback */
520
+ : // slot element does not have fallback content
521
+ 1 /* VNODE_FLAGS.isSlotReference */;
522
+ }
523
+ }
524
+ if (newVNode.$text$ !== null) {
525
+ // create text node
526
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
527
+ }
528
+ else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
529
+ // create a slot reference node
530
+ elm = newVNode.$elm$ =
531
+ doc.createTextNode('');
532
+ }
533
+ else {
534
+ // create element
535
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
536
+ ? 'slot-fb'
537
+ : newVNode.$tag$));
538
+ // add css classes, attrs, props, listeners, etc.
539
+ {
540
+ updateElement(null, newVNode, isSvgMode);
541
+ }
542
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
543
+ // if there is a scopeId and this is the initial render
544
+ // then let's add the scopeId as a css class
545
+ elm.classList.add((elm['s-si'] = scopeId));
546
+ }
547
+ if (newVNode.$children$) {
548
+ for (i = 0; i < newVNode.$children$.length; ++i) {
549
+ // create the node
550
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
551
+ // return node could have been null
552
+ if (childNode) {
553
+ // append our new node
554
+ elm.appendChild(childNode);
555
+ }
556
+ }
557
+ }
558
+ }
559
+ // This needs to always happen so we can hide nodes that are projected
560
+ // to another component but don't end up in a slot
561
+ elm['s-hn'] = hostTagName;
562
+ {
563
+ if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
564
+ // remember the content reference comment
565
+ elm['s-sr'] = true;
566
+ // remember the content reference comment
567
+ elm['s-cr'] = contentRef;
568
+ // remember the slot name, or empty string for default slot
569
+ elm['s-sn'] = newVNode.$name$ || '';
570
+ // check if we've got an old vnode for this slot
571
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
572
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
573
+ {
574
+ // we've got an old slot vnode and the wrapper is being replaced
575
+ // so let's move the old slot content back to its original location
576
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
577
+ }
578
+ }
579
+ }
580
+ }
581
+ return elm;
582
+ };
583
+ const putBackInOriginalLocation = (parentElm, recursive) => {
584
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
585
+ const oldSlotChildNodes = parentElm.childNodes;
586
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
587
+ const childNode = oldSlotChildNodes[i];
588
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
589
+ // and relocate it back to it's original location
590
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
591
+ // remove the old original location comment entirely
592
+ // later on the patch function will know what to do
593
+ // and move this to the correct spot if need be
594
+ childNode['s-ol'].remove();
595
+ childNode['s-ol'] = undefined;
596
+ // Reset so we can correctly move the node around again.
597
+ childNode['s-sh'] = undefined;
598
+ checkSlotRelocate = true;
599
+ }
600
+ if (recursive) {
601
+ putBackInOriginalLocation(childNode, recursive);
602
+ }
603
+ }
604
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
605
+ };
606
+ /**
607
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
608
+ * add them to the DOM in the appropriate place.
609
+ *
610
+ * @param parentElm the DOM node which should be used as a parent for the new
611
+ * DOM nodes
612
+ * @param before a child of the `parentElm` which the new children should be
613
+ * inserted before (optional)
614
+ * @param parentVNode the parent virtual DOM node
615
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
616
+ * @param startIdx the index in the child virtual DOM nodes at which to start
617
+ * creating DOM nodes (inclusive)
618
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
619
+ * creating DOM nodes (inclusive)
620
+ */
621
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
622
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
623
+ let childNode;
624
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
625
+ containerElm = containerElm.shadowRoot;
626
+ }
627
+ for (; startIdx <= endIdx; ++startIdx) {
628
+ if (vnodes[startIdx]) {
629
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
630
+ if (childNode) {
631
+ vnodes[startIdx].$elm$ = childNode;
632
+ containerElm.insertBefore(childNode, referenceNode(before) );
633
+ }
634
+ }
635
+ }
636
+ };
637
+ /**
638
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
639
+ * This can be used to, for instance, clean up after a list of children which
640
+ * should no longer be shown.
641
+ *
642
+ * This function also handles some of Stencil's slot relocation logic.
643
+ *
644
+ * @param vnodes a list of virtual DOM nodes to remove
645
+ * @param startIdx the index at which to start removing nodes (inclusive)
646
+ * @param endIdx the index at which to stop removing nodes (inclusive)
647
+ */
648
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
649
+ for (let index = startIdx; index <= endIdx; ++index) {
650
+ const vnode = vnodes[index];
651
+ if (vnode) {
652
+ const elm = vnode.$elm$;
653
+ nullifyVNodeRefs(vnode);
654
+ if (elm) {
655
+ {
656
+ // we're removing this element
657
+ // so it's possible we need to show slot fallback content now
658
+ checkSlotFallbackVisibility = true;
659
+ if (elm['s-ol']) {
660
+ // remove the original location comment
661
+ elm['s-ol'].remove();
662
+ }
663
+ else {
664
+ // it's possible that child nodes of the node
665
+ // that's being removed are slot nodes
666
+ putBackInOriginalLocation(elm, true);
667
+ }
668
+ }
669
+ // remove the vnode's element from the dom
670
+ elm.remove();
671
+ }
672
+ }
673
+ }
674
+ };
675
+ /**
676
+ * Reconcile the children of a new VNode with the children of an old VNode by
677
+ * traversing the two collections of children, identifying nodes that are
678
+ * conserved or changed, calling out to `patch` to make any necessary
679
+ * updates to the DOM, and rearranging DOM nodes as needed.
680
+ *
681
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
682
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
683
+ * 'windows' by storing start and end indices and references to the
684
+ * corresponding array entries. Initially the two 'windows' are basically equal
685
+ * to the entire array, but we progressively narrow the windows until there are
686
+ * no children left to update by doing the following:
687
+ *
688
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
689
+ * that if we have an initial array like the following we'll end up dealing
690
+ * only with a window bounded by the highlighted elements:
691
+ *
692
+ * [null, null, VNode1 , ... , VNode2, null, null]
693
+ * ^^^^^^ ^^^^^^
694
+ *
695
+ * 2. Check to see if the elements at the head and tail positions are equal
696
+ * across the windows. This will basically detect elements which haven't
697
+ * been added, removed, or changed position, i.e. if you had the following
698
+ * VNode elements (represented as HTML):
699
+ *
700
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
701
+ * newVNode: `<div><p><span>THERE</span></p></div>`
702
+ *
703
+ * Then when comparing the children of the `<div>` tag we check the equality
704
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
705
+ * same tag in the same position, we'd be able to avoid completely
706
+ * re-rendering the subtree under them with a new DOM element and would just
707
+ * call out to `patch` to handle reconciling their children and so on.
708
+ *
709
+ * 3. Check, for both windows, to see if the element at the beginning of the
710
+ * window corresponds to the element at the end of the other window. This is
711
+ * a heuristic which will let us identify _some_ situations in which
712
+ * elements have changed position, for instance it _should_ detect that the
713
+ * children nodes themselves have not changed but merely moved in the
714
+ * following example:
715
+ *
716
+ * oldVNode: `<div><element-one /><element-two /></div>`
717
+ * newVNode: `<div><element-two /><element-one /></div>`
718
+ *
719
+ * If we find cases like this then we also need to move the concrete DOM
720
+ * elements corresponding to the moved children to write the re-order to the
721
+ * DOM.
722
+ *
723
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
724
+ * nodes in the old children which have the same key as the first element in
725
+ * our window on the new children. If we find such a node we handle calling
726
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
727
+ * what we find.
728
+ *
729
+ * Finally, once we've narrowed our 'windows' to the point that either of them
730
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
731
+ * insertion or deletion that needs to happen to get a DOM state that correctly
732
+ * reflects the new child VNodes. If, for instance, after our window on the old
733
+ * children has collapsed we still have more nodes on the new children that
734
+ * we haven't dealt with yet then we need to add them, or if the new children
735
+ * collapse but we still have unhandled _old_ children then we need to make
736
+ * sure the corresponding DOM nodes are removed.
737
+ *
738
+ * @param parentElm the node into which the parent VNode is rendered
739
+ * @param oldCh the old children of the parent node
740
+ * @param newVNode the new VNode which will replace the parent
741
+ * @param newCh the new children of the parent node
742
+ * @param isInitialRender whether or not this is the first render of the vdom
743
+ */
744
+ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
745
+ let oldStartIdx = 0;
746
+ let newStartIdx = 0;
747
+ let oldEndIdx = oldCh.length - 1;
748
+ let oldStartVnode = oldCh[0];
749
+ let oldEndVnode = oldCh[oldEndIdx];
750
+ let newEndIdx = newCh.length - 1;
751
+ let newStartVnode = newCh[0];
752
+ let newEndVnode = newCh[newEndIdx];
753
+ let node;
754
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
755
+ if (oldStartVnode == null) {
756
+ // VNode might have been moved left
757
+ oldStartVnode = oldCh[++oldStartIdx];
758
+ }
759
+ else if (oldEndVnode == null) {
760
+ oldEndVnode = oldCh[--oldEndIdx];
761
+ }
762
+ else if (newStartVnode == null) {
763
+ newStartVnode = newCh[++newStartIdx];
764
+ }
765
+ else if (newEndVnode == null) {
766
+ newEndVnode = newCh[--newEndIdx];
767
+ }
768
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
769
+ // if the start nodes are the same then we should patch the new VNode
770
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
771
+ // indices to reflect that. We don't need to move any DOM Nodes around
772
+ // since things are matched up in order.
773
+ patch(oldStartVnode, newStartVnode, isInitialRender);
774
+ oldStartVnode = oldCh[++oldStartIdx];
775
+ newStartVnode = newCh[++newStartIdx];
776
+ }
777
+ else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
778
+ // likewise, if the end nodes are the same we patch new onto old and
779
+ // decrement our end indices, and also likewise in this case we don't
780
+ // need to move any DOM Nodes.
781
+ patch(oldEndVnode, newEndVnode, isInitialRender);
782
+ oldEndVnode = oldCh[--oldEndIdx];
783
+ newEndVnode = newCh[--newEndIdx];
784
+ }
785
+ else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
786
+ // case: "Vnode moved right"
787
+ //
788
+ // We've found that the last node in our window on the new children is
789
+ // the same VNode as the _first_ node in our window on the old children
790
+ // we're dealing with now. Visually, this is the layout of these two
791
+ // nodes:
792
+ //
793
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
794
+ // ^^^^^^^^^^^
795
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
796
+ // ^^^^^^^^^^^^^
797
+ //
798
+ // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
799
+ // and move the DOM element for `oldStartVnode`.
800
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
801
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
802
+ }
803
+ patch(oldStartVnode, newEndVnode, isInitialRender);
804
+ // We need to move the element for `oldStartVnode` into a position which
805
+ // will be appropriate for `newEndVnode`. For this we can use
806
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
807
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
808
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
809
+ //
810
+ // <old-start-node />
811
+ // <some-intervening-node />
812
+ // <old-end-node />
813
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
814
+ // <next-sibling />
815
+ //
816
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
817
+ // the node for `oldStartVnode` at the end of the children of
818
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
819
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
820
+ // append it to the children of the parent element.
821
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
822
+ oldStartVnode = oldCh[++oldStartIdx];
823
+ newEndVnode = newCh[--newEndIdx];
824
+ }
825
+ else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
826
+ // case: "Vnode moved left"
827
+ //
828
+ // We've found that the first node in our window on the new children is
829
+ // the same VNode as the _last_ node in our window on the old children.
830
+ // Visually, this is the layout of these two nodes:
831
+ //
832
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
833
+ // ^^^^^^^^^^^^^
834
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
835
+ // ^^^^^^^^^^^
836
+ //
837
+ // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
838
+ // (which will handle updating any changed attributes, reconciling their
839
+ // children etc) but we also need to move the DOM node to which
840
+ // `oldEndVnode` corresponds.
841
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
842
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
843
+ }
844
+ patch(oldEndVnode, newStartVnode, isInitialRender);
845
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
846
+ // the same node, so since we're here we know that they are not. Thus we
847
+ // can move the element for `oldEndVnode` _before_ the element for
848
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
849
+ // future.
850
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
851
+ oldEndVnode = oldCh[--oldEndIdx];
852
+ newStartVnode = newCh[++newStartIdx];
853
+ }
854
+ else {
855
+ {
856
+ // We either didn't find an element in the old children that matches
857
+ // the key of the first new child OR the build is not using `key`
858
+ // attributes at all. In either case we need to create a new element
859
+ // for the new node.
860
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
861
+ newStartVnode = newCh[++newStartIdx];
862
+ }
863
+ if (node) {
864
+ // if we created a new node then handle inserting it to the DOM
865
+ {
866
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
867
+ }
868
+ }
869
+ }
870
+ }
871
+ if (oldStartIdx > oldEndIdx) {
872
+ // we have some more new nodes to add which don't match up with old nodes
873
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
874
+ }
875
+ else if (newStartIdx > newEndIdx) {
876
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
877
+ // in the new array, so lets remove them (which entails cleaning up the
878
+ // relevant DOM nodes)
879
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
880
+ }
881
+ };
882
+ /**
883
+ * Compare two VNodes to determine if they are the same
884
+ *
885
+ * **NB**: This function is an equality _heuristic_ based on the available
886
+ * information set on the two VNodes and can be misleading under certain
887
+ * circumstances. In particular, if the two nodes do not have `key` attrs
888
+ * (available under `$key$` on VNodes) then the function falls back on merely
889
+ * checking that they have the same tag.
890
+ *
891
+ * So, in other words, if `key` attrs are not set on VNodes which may be
892
+ * changing order within a `children` array or something along those lines then
893
+ * we could obtain a false negative and then have to do needless re-rendering
894
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
895
+ *
896
+ * @param leftVNode the first VNode to check
897
+ * @param rightVNode the second VNode to check
898
+ * @param isInitialRender whether or not this is the first render of the vdom
899
+ * @returns whether they're equal or not
900
+ */
901
+ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
902
+ // compare if two vnode to see if they're "technically" the same
903
+ // need to have the same element tag, and same key to be the same
904
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
905
+ if (leftVNode.$tag$ === 'slot') {
906
+ return leftVNode.$name$ === rightVNode.$name$;
907
+ }
908
+ return true;
909
+ }
910
+ return false;
911
+ };
912
+ const referenceNode = (node) => {
913
+ // this node was relocated to a new location in the dom
914
+ // because of some other component's slot
915
+ // but we still have an html comment in place of where
916
+ // it's original location was according to it's original vdom
917
+ return (node && node['s-ol']) || node;
918
+ };
919
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
920
+ /**
921
+ * Handle reconciling an outdated VNode with a new one which corresponds to
922
+ * it. This function handles flushing updates to the DOM and reconciling the
923
+ * children of the two nodes (if any).
924
+ *
925
+ * @param oldVNode an old VNode whose DOM element and children we want to update
926
+ * @param newVNode a new VNode representing an updated version of the old one
927
+ * @param isInitialRender whether or not this is the first render of the vdom
928
+ */
929
+ const patch = (oldVNode, newVNode, isInitialRender = false) => {
930
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
931
+ const oldChildren = oldVNode.$children$;
932
+ const newChildren = newVNode.$children$;
933
+ const tag = newVNode.$tag$;
934
+ const text = newVNode.$text$;
935
+ let defaultHolder;
936
+ if (text === null) {
937
+ {
938
+ if (tag === 'slot')
939
+ ;
940
+ else {
941
+ // either this is the first render of an element OR it's an update
942
+ // AND we already know it's possible it could have changed
943
+ // this updates the element's css classes, attrs, props, listeners, etc.
944
+ updateElement(oldVNode, newVNode, isSvgMode);
945
+ }
946
+ }
947
+ if (oldChildren !== null && newChildren !== null) {
948
+ // looks like there's child vnodes for both the old and new vnodes
949
+ // so we need to call `updateChildren` to reconcile them
950
+ updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
951
+ }
952
+ else if (newChildren !== null) {
953
+ // no old child vnodes, but there are new child vnodes to add
954
+ if (oldVNode.$text$ !== null) {
955
+ // the old vnode was text, so be sure to clear it out
956
+ elm.textContent = '';
957
+ }
958
+ // add the new vnode children
959
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
960
+ }
961
+ else if (oldChildren !== null) {
962
+ // no new child vnodes, but there are old child vnodes to remove
963
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
964
+ }
965
+ }
966
+ else if ((defaultHolder = elm['s-cr'])) {
967
+ // this element has slotted content
968
+ defaultHolder.parentNode.textContent = text;
969
+ }
970
+ else if (oldVNode.$text$ !== text) {
971
+ // update the text content for the text only vnode
972
+ // and also only if the text is different than before
973
+ elm.data = text;
974
+ }
975
+ };
976
+ /**
977
+ * Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
978
+ * are slot fallbacks nodes.
979
+ *
980
+ * A slot fallback node should be visible by default. Then, it should be
981
+ * conditionally hidden if:
982
+ *
983
+ * - it has a sibling with a `slot` property set to its slot name or if
984
+ * - it is a default fallback slot node, in which case we hide if it has any
985
+ * content
986
+ *
987
+ * @param elm the element of interest
988
+ */
989
+ const updateFallbackSlotVisibility = (elm) => {
990
+ const childNodes = elm.childNodes;
991
+ for (const childNode of childNodes) {
992
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
993
+ if (childNode['s-sr']) {
994
+ // this is a slot fallback node
995
+ // get the slot name for this slot reference node
996
+ const slotName = childNode['s-sn'];
997
+ // by default always show a fallback slot node
998
+ // then hide it if there are other slots in the light dom
999
+ childNode.hidden = false;
1000
+ // we need to check all of its sibling nodes in order to see if
1001
+ // `childNode` should be hidden
1002
+ for (const siblingNode of childNodes) {
1003
+ // Don't check the node against itself
1004
+ if (siblingNode !== childNode) {
1005
+ if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
1006
+ // this sibling node is from a different component OR is a named
1007
+ // fallback slot node
1008
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1009
+ (slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
1010
+ childNode.hidden = true;
1011
+ break;
1012
+ }
1013
+ }
1014
+ else {
1015
+ // this is a default fallback slot node
1016
+ // any element or text node (with content)
1017
+ // should hide the default fallback slot node
1018
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1019
+ (siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
1020
+ childNode.hidden = true;
1021
+ break;
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+ // keep drilling down
1028
+ updateFallbackSlotVisibility(childNode);
1029
+ }
1030
+ }
1031
+ };
1032
+ /**
1033
+ * Component-global information about nodes which are either currently being
1034
+ * relocated or will be shortly.
1035
+ */
1036
+ const relocateNodes = [];
1037
+ /**
1038
+ * Mark the contents of a slot for relocation via adding references to them to
1039
+ * the {@link relocateNodes} data structure. The actual work of relocating them
1040
+ * will then be handled in {@link renderVdom}.
1041
+ *
1042
+ * @param elm a render node whose child nodes need to be relocated
1043
+ */
1044
+ const markSlotContentForRelocation = (elm) => {
1045
+ // tslint:disable-next-line: prefer-const
1046
+ let node;
1047
+ let hostContentNodes;
1048
+ let j;
1049
+ for (const childNode of elm.childNodes) {
1050
+ // we need to find child nodes which are slot references so we can then try
1051
+ // to match them up with nodes that need to be relocated
1052
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1053
+ // first get the content reference comment node ('s-cr'), then we get
1054
+ // its parent, which is where all the host content is now
1055
+ hostContentNodes = node.parentNode.childNodes;
1056
+ const slotName = childNode['s-sn'];
1057
+ // iterate through all the nodes under the location where the host was
1058
+ // originally rendered
1059
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
1060
+ node = hostContentNodes[j];
1061
+ // check that the node is not a content reference node or a node
1062
+ // reference and then check that the host name does not match that of
1063
+ // childNode.
1064
+ // In addition, check that the slot either has not already been relocated, or
1065
+ // that its current location's host is not childNode's host. This is essentially
1066
+ // a check so that we don't try to relocate (and then hide) a node that is already
1067
+ // where it should be.
1068
+ if (!node['s-cn'] &&
1069
+ !node['s-nr'] &&
1070
+ node['s-hn'] !== childNode['s-hn'] &&
1071
+ (!BUILD.experimentalSlotFixes )) {
1072
+ // if `node` is located in the slot that `childNode` refers to (via the
1073
+ // `'s-sn'` property) then we need to relocate it from it's current spot
1074
+ // (under the host element parent) to the right slot location
1075
+ if (isNodeLocatedInSlot(node, slotName)) {
1076
+ // it's possible we've already decided to relocate this node
1077
+ let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1078
+ // made some changes to slots
1079
+ // let's make sure we also double check
1080
+ // fallbacks are correctly hidden or shown
1081
+ checkSlotFallbackVisibility = true;
1082
+ // ensure that the slot-name attr is correct
1083
+ node['s-sn'] = node['s-sn'] || slotName;
1084
+ if (relocateNodeData) {
1085
+ relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
1086
+ // we marked this node for relocation previously but didn't find
1087
+ // out the slot reference node to which it needs to be relocated
1088
+ // so write it down now!
1089
+ relocateNodeData.$slotRefNode$ = childNode;
1090
+ }
1091
+ else {
1092
+ node['s-sh'] = childNode['s-hn'];
1093
+ // add to our list of nodes to relocate
1094
+ relocateNodes.push({
1095
+ $slotRefNode$: childNode,
1096
+ $nodeToRelocate$: node,
1097
+ });
1098
+ }
1099
+ if (node['s-sr']) {
1100
+ relocateNodes.map((relocateNode) => {
1101
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1102
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1103
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
1104
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1105
+ }
1106
+ }
1107
+ });
1108
+ }
1109
+ }
1110
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1111
+ // the node is not found within the slot (`childNode`) that we're
1112
+ // currently looking at, so we stick it into `relocateNodes` to
1113
+ // handle later. If we never find a home for this element then
1114
+ // we'll need to hide it
1115
+ relocateNodes.push({
1116
+ $nodeToRelocate$: node,
1117
+ });
1118
+ }
1119
+ }
1120
+ }
1121
+ }
1122
+ // if we're dealing with any type of element (capable of itself being a
1123
+ // slot reference or containing one) then we recur
1124
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1125
+ markSlotContentForRelocation(childNode);
1126
+ }
1127
+ }
1128
+ };
1129
+ /**
1130
+ * Check whether a node is located in a given named slot.
1131
+ *
1132
+ * @param nodeToRelocate the node of interest
1133
+ * @param slotName the slot name to check
1134
+ * @returns whether the node is located in the slot or not
1135
+ */
1136
+ const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1137
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1138
+ if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
1139
+ // if the node doesn't have a slot attribute, and the slot we're checking
1140
+ // is not a named slot, then we assume the node should be within the slot
1141
+ return true;
1142
+ }
1143
+ if (nodeToRelocate.getAttribute('slot') === slotName) {
1144
+ return true;
1145
+ }
1146
+ return false;
1147
+ }
1148
+ if (nodeToRelocate['s-sn'] === slotName) {
1149
+ return true;
1150
+ }
1151
+ return slotName === '';
1152
+ };
1153
+ /**
1154
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1155
+ * them with `null`. This signals that the DOM element corresponding to the VDom
1156
+ * node has been removed from the DOM.
1157
+ *
1158
+ * @param vNode a virtual DOM node
1159
+ */
1160
+ const nullifyVNodeRefs = (vNode) => {
1161
+ {
1162
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1163
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1164
+ }
1165
+ };
1166
+ /**
1167
+ * The main entry point for Stencil's virtual DOM-based rendering engine
1168
+ *
1169
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1170
+ * function will handle creating a virtual DOM tree with a single root, patching
1171
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
1172
+ * relocation, and reflecting attributes.
1173
+ *
1174
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1175
+ * the DOM node into which it should be rendered.
1176
+ * @param renderFnResults the virtual DOM nodes to be rendered
1177
+ * @param isInitialLoad whether or not this is the first call after page load
1178
+ */
1179
+ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1180
+ var _a, _b, _c, _d;
1181
+ const hostElm = hostRef.$hostElement$;
1182
+ const cmpMeta = hostRef.$cmpMeta$;
1183
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1184
+ // if `renderFnResults` is a Host node then we can use it directly. If not,
1185
+ // we need to call `h` again to wrap the children of our component in a
1186
+ // 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
1187
+ // implicitly that the top-level vdom node is 1) an only child and 2)
1188
+ // contains attrs that need to be set on the host element.
1189
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1190
+ hostTagName = hostElm.tagName;
1191
+ if (cmpMeta.$attrsToReflect$) {
1192
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1193
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1194
+ }
1195
+ // On the first render and *only* on the first render we want to check for
1196
+ // any attributes set on the host element which are also set on the vdom
1197
+ // node. If we find them, we override the value on the VDom node attrs with
1198
+ // the value from the host element, which allows developers building apps
1199
+ // with Stencil components to override e.g. the `role` attribute on a
1200
+ // component even if it's already set on the `Host`.
1201
+ if (isInitialLoad && rootVnode.$attrs$) {
1202
+ for (const key of Object.keys(rootVnode.$attrs$)) {
1203
+ // We have a special implementation in `setAccessor` for `style` and
1204
+ // `class` which reconciles values coming from the VDom with values
1205
+ // already present on the DOM element, so we don't want to override those
1206
+ // attributes on the VDom tree with values from the host element if they
1207
+ // are present.
1208
+ //
1209
+ // Likewise, `ref` and `key` are special internal values for the Stencil
1210
+ // runtime and we don't want to override those either.
1211
+ if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
1212
+ rootVnode.$attrs$[key] = hostElm[key];
1213
+ }
1214
+ }
1215
+ }
1216
+ rootVnode.$tag$ = null;
1217
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1218
+ hostRef.$vnode$ = rootVnode;
1219
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1220
+ {
1221
+ scopeId = hostElm['s-sc'];
1222
+ }
1223
+ {
1224
+ contentRef = hostElm['s-cr'];
1225
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1226
+ // always reset
1227
+ checkSlotFallbackVisibility = false;
1228
+ }
1229
+ // synchronous patch
1230
+ patch(oldVNode, rootVnode, isInitialLoad);
1231
+ {
1232
+ // while we're moving nodes around existing nodes, temporarily disable
1233
+ // the disconnectCallback from working
1234
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1235
+ if (checkSlotRelocate) {
1236
+ markSlotContentForRelocation(rootVnode.$elm$);
1237
+ for (const relocateData of relocateNodes) {
1238
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1239
+ if (!nodeToRelocate['s-ol']) {
1240
+ // add a reference node marking this node's original location
1241
+ // keep a reference to this node for later lookups
1242
+ const orgLocationNode = doc.createTextNode('');
1243
+ orgLocationNode['s-nr'] = nodeToRelocate;
1244
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1245
+ }
1246
+ }
1247
+ for (const relocateData of relocateNodes) {
1248
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1249
+ const slotRefNode = relocateData.$slotRefNode$;
1250
+ if (slotRefNode) {
1251
+ const parentNodeRef = slotRefNode.parentNode;
1252
+ // When determining where to insert content, the most simple case would be
1253
+ // to relocate the node immediately following the slot reference node. We do this
1254
+ // by getting a reference to the node immediately following the slot reference node
1255
+ // since we will use `insertBefore` to manipulate the DOM.
1256
+ //
1257
+ // If there is no node immediately following the slot reference node, then we will just
1258
+ // end up appending the node as the last child of the parent.
1259
+ let insertBeforeNode = slotRefNode.nextSibling;
1260
+ // If the node we're currently planning on inserting the new node before is an element,
1261
+ // we need to do some additional checks to make sure we're inserting the node in the correct order.
1262
+ // The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
1263
+ // to make sure they get inserted into their new how in the same order they were declared in their original location.
1264
+ //
1265
+ // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1266
+ {
1267
+ let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1268
+ while (orgLocationNode) {
1269
+ let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
1270
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1271
+ refNode = refNode.nextSibling;
1272
+ if (!refNode || !refNode['s-nr']) {
1273
+ insertBeforeNode = refNode;
1274
+ break;
1275
+ }
1276
+ }
1277
+ orgLocationNode = orgLocationNode.previousSibling;
1278
+ }
1279
+ }
1280
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1281
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1282
+ // we've checked that it's worth while to relocate
1283
+ // since that the node to relocate
1284
+ // has a different next sibling or parent relocated
1285
+ if (nodeToRelocate !== insertBeforeNode) {
1286
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1287
+ // probably a component in the index.html that doesn't have its hostname set
1288
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1289
+ }
1290
+ // Add it back to the dom but in its new home
1291
+ // If we get to this point and `insertBeforeNode` is `null`, that means
1292
+ // we're just going to append the node as the last child of the parent. Passing
1293
+ // `null` as the second arg here will trigger that behavior.
1294
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1295
+ // Reset the `hidden` value back to what it was defined as originally
1296
+ // This solves a problem where a `slot` is dynamically rendered and `hidden` may have
1297
+ // been set on content originally, but now it has a slot to go to so it should have
1298
+ // the value it was defined as having in the DOM, not what we overrode it to.
1299
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1300
+ nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
1301
+ }
1302
+ }
1303
+ }
1304
+ }
1305
+ else {
1306
+ // this node doesn't have a slot home to go to, so let's hide it
1307
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1308
+ // Store the initial value of `hidden` so we can reset it later when
1309
+ // moving nodes around.
1310
+ if (isInitialLoad) {
1311
+ nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
1312
+ }
1313
+ nodeToRelocate.hidden = true;
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ if (checkSlotFallbackVisibility) {
1319
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1320
+ }
1321
+ // done moving nodes around
1322
+ // allow the disconnect callback to work again
1323
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1324
+ // always reset
1325
+ relocateNodes.length = 0;
1326
+ }
1327
+ };
1328
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1329
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1330
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1331
+ }
1332
+ };
1333
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1334
+ {
1335
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1336
+ }
1337
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1338
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1339
+ return;
1340
+ }
1341
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1342
+ // there is no ancestor component or the ancestor component
1343
+ // has already fired off its lifecycle update then
1344
+ // fire off the initial update
1345
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1346
+ return writeTask(dispatch) ;
1347
+ };
1348
+ /**
1349
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1350
+ * component lifecycle methods like `componentWillLoad` as well as
1351
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
1352
+ *
1353
+ * @param hostRef a reference to a host DOM node
1354
+ * @param isInitialLoad whether we're on the initial load or not
1355
+ * @returns an empty Promise which is used to enqueue a series of operations for
1356
+ * the component
1357
+ */
1358
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1359
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1360
+ const instance = hostRef.$lazyInstance$ ;
1361
+ // We're going to use this variable together with `enqueue` to implement a
1362
+ // little promise-based queue. We start out with it `undefined`. When we add
1363
+ // the first function to the queue we'll set this variable to be that
1364
+ // function's return value. When we attempt to add subsequent values to the
1365
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
1366
+ // the new function off of that `Promise` using `.then()`. This will give our
1367
+ // queue two nice properties:
1368
+ //
1369
+ // 1. If all functions added to the queue are synchronous they'll be called
1370
+ // synchronously right away.
1371
+ // 2. If all functions added to the queue are asynchronous they'll all be
1372
+ // called in order after `dispatchHooks` exits.
1373
+ let maybePromise;
1374
+ if (isInitialLoad) {
1375
+ {
1376
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
1377
+ // whatever's going on in that `Promise` before we launch into
1378
+ // rendering the component, doing other lifecycle stuff, etc. So
1379
+ // in that case we assign the returned promise to the variable we
1380
+ // declared above to hold a possible 'queueing' Promise
1381
+ maybePromise = safeCall(instance, 'componentWillLoad');
1382
+ }
1383
+ }
1384
+ endSchedule();
1385
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1386
+ };
1387
+ /**
1388
+ * This function uses a Promise to implement a simple first-in, first-out queue
1389
+ * of functions to be called.
1390
+ *
1391
+ * The queue is ordered on the basis of the first argument. If it's
1392
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1393
+ * be called synchronously (although note that this function may return a
1394
+ * `Promise`). The idea is that then the return value of that enqueueing
1395
+ * operation is kept around, so that if it was a `Promise` then subsequent
1396
+ * functions can be enqueued by calling this function again with that `Promise`
1397
+ * as the first argument.
1398
+ *
1399
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1400
+ * @param fn a function to enqueue
1401
+ * @returns either a `Promise` or the return value of the provided function
1402
+ */
1403
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1404
+ /**
1405
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1406
+ * instance of the `Promise` global. In a few circumstances, in particular if
1407
+ * the global has been overwritten, this is could be misleading, so we also do
1408
+ * a little 'duck typing' check to see if the `.then` property of the value is
1409
+ * defined and a function.
1410
+ *
1411
+ * @param maybePromise it might be a promise!
1412
+ * @returns whether it is or not
1413
+ */
1414
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1415
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1416
+ /**
1417
+ * Update a component given reference to its host elements and so on.
1418
+ *
1419
+ * @param hostRef an object containing references to the element's host node,
1420
+ * VDom nodes, and other metadata
1421
+ * @param instance a reference to the underlying host element where it will be
1422
+ * rendered
1423
+ * @param isInitialLoad whether or not this function is being called as part of
1424
+ * the first render cycle
1425
+ */
1426
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1427
+ var _a;
1428
+ const elm = hostRef.$hostElement$;
1429
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1430
+ const rc = elm['s-rc'];
1431
+ if (isInitialLoad) {
1432
+ // DOM WRITE!
1433
+ attachStyles(hostRef);
1434
+ }
1435
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1436
+ {
1437
+ callRender(hostRef, instance, elm, isInitialLoad);
1438
+ }
1439
+ if (rc) {
1440
+ // ok, so turns out there are some child host elements
1441
+ // waiting on this parent element to load
1442
+ // let's fire off all update callbacks waiting
1443
+ rc.map((cb) => cb());
1444
+ elm['s-rc'] = undefined;
1445
+ }
1446
+ endRender();
1447
+ endUpdate();
1448
+ {
1449
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1450
+ const postUpdate = () => postUpdateComponent(hostRef);
1451
+ if (childrenPromises.length === 0) {
1452
+ postUpdate();
1453
+ }
1454
+ else {
1455
+ Promise.all(childrenPromises).then(postUpdate);
1456
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1457
+ childrenPromises.length = 0;
1458
+ }
1459
+ }
1460
+ };
1461
+ /**
1462
+ * Handle making the call to the VDom renderer with the proper context given
1463
+ * various build variables
1464
+ *
1465
+ * @param hostRef an object containing references to the element's host node,
1466
+ * VDom nodes, and other metadata
1467
+ * @param instance a reference to the underlying host element where it will be
1468
+ * rendered
1469
+ * @param elm the Host element for the component
1470
+ * @param isInitialLoad whether or not this function is being called as part of
1471
+ * @returns an empty promise
1472
+ */
1473
+ const callRender = (hostRef, instance, elm, isInitialLoad) => {
1474
+ try {
1475
+ /**
1476
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1477
+ * method, so we can call the method immediately. If not, check before calling it.
1478
+ */
1479
+ instance = instance.render() ;
1480
+ {
1481
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1482
+ }
1483
+ {
1484
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1485
+ }
1486
+ {
1487
+ {
1488
+ // looks like we've got child nodes to render into this host element
1489
+ // or we need to update the css class/attrs on the host element
1490
+ // DOM WRITE!
1491
+ {
1492
+ renderVdom(hostRef, instance, isInitialLoad);
1493
+ }
1494
+ }
1495
+ }
1496
+ }
1497
+ catch (e) {
1498
+ consoleError(e, hostRef.$hostElement$);
1499
+ }
1500
+ return null;
1501
+ };
1502
+ const postUpdateComponent = (hostRef) => {
1503
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1504
+ const elm = hostRef.$hostElement$;
1505
+ const endPostUpdate = createTime('postUpdate', tagName);
1506
+ const instance = hostRef.$lazyInstance$ ;
1507
+ const ancestorComponent = hostRef.$ancestorComponent$;
1508
+ {
1509
+ safeCall(instance, 'componentDidRender');
1510
+ }
1511
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1512
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1513
+ {
1514
+ // DOM WRITE!
1515
+ addHydratedFlag(elm);
1516
+ }
1517
+ {
1518
+ safeCall(instance, 'componentDidLoad');
1519
+ }
1520
+ endPostUpdate();
1521
+ {
1522
+ hostRef.$onReadyResolve$(elm);
1523
+ if (!ancestorComponent) {
1524
+ appDidLoad();
1525
+ }
1526
+ }
1527
+ }
1528
+ else {
1529
+ endPostUpdate();
1530
+ }
1531
+ {
1532
+ hostRef.$onInstanceResolve$(elm);
1533
+ }
1534
+ // load events fire from bottom to top
1535
+ // the deepest elements load first then bubbles up
1536
+ {
1537
+ if (hostRef.$onRenderResolve$) {
1538
+ hostRef.$onRenderResolve$();
1539
+ hostRef.$onRenderResolve$ = undefined;
1540
+ }
1541
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1542
+ nextTick(() => scheduleUpdate(hostRef, false));
1543
+ }
1544
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1545
+ }
1546
+ // ( •_•)
1547
+ // ( •_•)>⌐■-■
1548
+ // (⌐■_■)
1549
+ };
1550
+ const appDidLoad = (who) => {
1551
+ // on appload
1552
+ // we have finish the first big initial render
1553
+ {
1554
+ addHydratedFlag(doc.documentElement);
1555
+ }
1556
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1557
+ };
1558
+ /**
1559
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1560
+ * e.g. custom element node. If a build figures out that e.g. no component
1561
+ * has a `componentDidLoad` method, the instance method gets removed from the
1562
+ * output bundle and this function returns `undefined`.
1563
+ * @param instance any object that may or may not contain methods
1564
+ * @param method method name
1565
+ * @param arg single arbitrary argument
1566
+ * @returns result of method call if it exists, otherwise `undefined`
1567
+ */
1568
+ const safeCall = (instance, method, arg) => {
1569
+ if (instance && instance[method]) {
1570
+ try {
1571
+ return instance[method](arg);
1572
+ }
1573
+ catch (e) {
1574
+ consoleError(e);
1575
+ }
1576
+ }
1577
+ return undefined;
1578
+ };
1579
+ const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
1580
+ ;
1581
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1582
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1583
+ // check our new property value against our internal value
1584
+ const hostRef = getHostRef(ref);
1585
+ const elm = hostRef.$hostElement$ ;
1586
+ const oldVal = hostRef.$instanceValues$.get(propName);
1587
+ const flags = hostRef.$flags$;
1588
+ const instance = hostRef.$lazyInstance$ ;
1589
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1590
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1591
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1592
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1593
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1594
+ // gadzooks! the property's value has changed!!
1595
+ // set our new value!
1596
+ hostRef.$instanceValues$.set(propName, newVal);
1597
+ if (instance) {
1598
+ // get an array of method names of watch functions to call
1599
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1600
+ const watchMethods = cmpMeta.$watchers$[propName];
1601
+ if (watchMethods) {
1602
+ // this instance is watching for when this property changed
1603
+ watchMethods.map((watchMethodName) => {
1604
+ try {
1605
+ // fire off each of the watch methods that are watching this property
1606
+ instance[watchMethodName](newVal, oldVal, propName);
1607
+ }
1608
+ catch (e) {
1609
+ consoleError(e, elm);
1610
+ }
1611
+ });
1612
+ }
1613
+ }
1614
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1615
+ // looks like this value actually changed, so we've got work to do!
1616
+ // but only if we've already rendered, otherwise just chill out
1617
+ // queue that we need to do an update, but don't worry about queuing
1618
+ // up millions cuz this function ensures it only runs once
1619
+ scheduleUpdate(hostRef, false);
1620
+ }
1621
+ }
1622
+ }
1623
+ };
1624
+ /**
1625
+ * Attach a series of runtime constructs to a compiled Stencil component
1626
+ * constructor, including getters and setters for the `@Prop` and `@State`
1627
+ * decorators, callbacks for when attributes change, and so on.
1628
+ *
1629
+ * @param Cstr the constructor for a component that we need to process
1630
+ * @param cmpMeta metadata collected previously about the component
1631
+ * @param flags a number used to store a series of bit flags
1632
+ * @returns a reference to the same constructor passed in (but now mutated)
1633
+ */
1634
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1635
+ var _a;
1636
+ const prototype = Cstr.prototype;
1637
+ if (cmpMeta.$members$) {
1638
+ if (Cstr.watchers) {
1639
+ cmpMeta.$watchers$ = Cstr.watchers;
1640
+ }
1641
+ // It's better to have a const than two Object.entries()
1642
+ const members = Object.entries(cmpMeta.$members$);
1643
+ members.map(([memberName, [memberFlags]]) => {
1644
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1645
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1646
+ // proxyComponent - prop
1647
+ Object.defineProperty(prototype, memberName, {
1648
+ get() {
1649
+ // proxyComponent, get value
1650
+ return getValue(this, memberName);
1651
+ },
1652
+ set(newValue) {
1653
+ // proxyComponent, set value
1654
+ setValue(this, memberName, newValue, cmpMeta);
1655
+ },
1656
+ configurable: true,
1657
+ enumerable: true,
1658
+ });
1659
+ }
1660
+ else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1661
+ memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1662
+ // proxyComponent - method
1663
+ Object.defineProperty(prototype, memberName, {
1664
+ value(...args) {
1665
+ var _a;
1666
+ const ref = getHostRef(this);
1667
+ return (_a = ref === null || ref === void 0 ? void 0 : ref.$onInstancePromise$) === null || _a === void 0 ? void 0 : _a.then(() => { var _a; return (_a = ref.$lazyInstance$) === null || _a === void 0 ? void 0 : _a[memberName](...args); });
1668
+ },
1669
+ });
1670
+ }
1671
+ });
1672
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1673
+ const attrNameToPropName = new Map();
1674
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1675
+ plt.jmp(() => {
1676
+ var _a;
1677
+ const propName = attrNameToPropName.get(attrName);
1678
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1679
+ // in the case where an attribute was set inline.
1680
+ // ```html
1681
+ // <my-component some-attribute="some-value"></my-component>
1682
+ // ```
1683
+ //
1684
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1685
+ // programmatically changes it before it has been upgraded as shown below:
1686
+ //
1687
+ // ```html
1688
+ // <!-- this component has _not_ been upgraded yet -->
1689
+ // <my-component id="test" some-attribute="some-value"></my-component>
1690
+ // <script>
1691
+ // // grab non-upgraded component
1692
+ // el = document.querySelector("#test");
1693
+ // el.someAttribute = "another-value";
1694
+ // // upgrade component
1695
+ // customElements.define('my-component', MyComponent);
1696
+ // </script>
1697
+ // ```
1698
+ // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
1699
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1700
+ // to the value that was set inline i.e. "some-value" from above example. When
1701
+ // the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
1702
+ //
1703
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
1704
+ // by connectedCallback as this attributeChangedCallback will not fire.
1705
+ //
1706
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1707
+ //
1708
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1709
+ // properties here given that this goes against best practices outlined here
1710
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1711
+ if (this.hasOwnProperty(propName)) {
1712
+ newValue = this[propName];
1713
+ delete this[propName];
1714
+ }
1715
+ else if (prototype.hasOwnProperty(propName) &&
1716
+ typeof this[propName] === 'number' &&
1717
+ this[propName] == newValue) {
1718
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1719
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1720
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1721
+ return;
1722
+ }
1723
+ else if (propName == null) {
1724
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1725
+ // on a vanilla web component
1726
+ const hostRef = getHostRef(this);
1727
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1728
+ // We only want to trigger the callback(s) if:
1729
+ // 1. The instance is ready
1730
+ // 2. The watchers are ready
1731
+ // 3. The value has changed
1732
+ if (flags &&
1733
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1734
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1735
+ newValue !== oldValue) {
1736
+ const instance = hostRef.$lazyInstance$ ;
1737
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1738
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1739
+ if (instance[callbackName] != null) {
1740
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1741
+ }
1742
+ });
1743
+ }
1744
+ return;
1745
+ }
1746
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1747
+ });
1748
+ };
1749
+ // Create an array of attributes to observe
1750
+ // This list in comprised of all strings used within a `@Watch()` decorator
1751
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1752
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1753
+ // an invalid attribute.
1754
+ Cstr.observedAttributes = Array.from(new Set([
1755
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1756
+ ...members
1757
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1758
+ .map(([propName, m]) => {
1759
+ var _a;
1760
+ const attrName = m[1] || propName;
1761
+ attrNameToPropName.set(attrName, propName);
1762
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1763
+ (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
1764
+ }
1765
+ return attrName;
1766
+ }),
1767
+ ]));
1768
+ }
1769
+ }
1770
+ return Cstr;
1771
+ };
1772
+ /**
1773
+ * Initialize a Stencil component given a reference to its host element, its
1774
+ * runtime bookkeeping data structure, runtime metadata about the component,
1775
+ * and (optionally) an HMR version ID.
1776
+ *
1777
+ * @param elm a host element
1778
+ * @param hostRef the element's runtime bookkeeping object
1779
+ * @param cmpMeta runtime metadata for the Stencil component
1780
+ * @param hmrVersionId an (optional) HMR version ID
1781
+ */
1782
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1783
+ let Cstr;
1784
+ // initializeComponent
1785
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1786
+ // Let the runtime know that the component has been initialized
1787
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1788
+ {
1789
+ // lazy loaded components
1790
+ // request the component's implementation to be
1791
+ // wired up with the host element
1792
+ Cstr = loadModule(cmpMeta);
1793
+ if (Cstr.then) {
1794
+ // Await creates a micro-task avoid if possible
1795
+ const endLoad = uniqueTime();
1796
+ Cstr = await Cstr;
1797
+ endLoad();
1798
+ }
1799
+ if (!Cstr.isProxied) {
1800
+ // we've never proxied this Constructor before
1801
+ // let's add the getters/setters to its prototype before
1802
+ // the first time we create an instance of the implementation
1803
+ {
1804
+ cmpMeta.$watchers$ = Cstr.watchers;
1805
+ }
1806
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1807
+ Cstr.isProxied = true;
1808
+ }
1809
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1810
+ // ok, time to construct the instance
1811
+ // but let's keep track of when we start and stop
1812
+ // so that the getters/setters don't incorrectly step on data
1813
+ {
1814
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1815
+ }
1816
+ // construct the lazy-loaded component implementation
1817
+ // passing the hostRef is very important during
1818
+ // construction in order to directly wire together the
1819
+ // host element and the lazy-loaded instance
1820
+ try {
1821
+ new Cstr(hostRef);
1822
+ }
1823
+ catch (e) {
1824
+ consoleError(e);
1825
+ }
1826
+ {
1827
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1828
+ }
1829
+ {
1830
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1831
+ }
1832
+ endNewInstance();
1833
+ }
1834
+ if (Cstr.style) {
1835
+ // this component has styles but we haven't registered them yet
1836
+ let style = Cstr.style;
1837
+ const scopeId = getScopeId(cmpMeta);
1838
+ if (!styles.has(scopeId)) {
1839
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1840
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1841
+ endRegisterStyles();
1842
+ }
1843
+ }
1844
+ }
1845
+ // we've successfully created a lazy instance
1846
+ const ancestorComponent = hostRef.$ancestorComponent$;
1847
+ const schedule = () => scheduleUpdate(hostRef, true);
1848
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1849
+ // this is the initial load and this component it has an ancestor component
1850
+ // but the ancestor component has NOT fired its will update lifecycle yet
1851
+ // so let's just cool our jets and wait for the ancestor to continue first
1852
+ // this will get fired off when the ancestor component
1853
+ // finally gets around to rendering its lazy self
1854
+ // fire off the initial update
1855
+ ancestorComponent['s-rc'].push(schedule);
1856
+ }
1857
+ else {
1858
+ schedule();
1859
+ }
1860
+ };
1861
+ const fireConnectedCallback = (instance) => {
1862
+ };
1863
+ const connectedCallback = (elm) => {
1864
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1865
+ const hostRef = getHostRef(elm);
1866
+ const cmpMeta = hostRef.$cmpMeta$;
1867
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1868
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1869
+ // first time this component has connected
1870
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1871
+ {
1872
+ // initUpdate
1873
+ // if the slot polyfill is required we'll need to put some nodes
1874
+ // in here to act as original content anchors as we move nodes around
1875
+ // host element has been connected to the DOM
1876
+ if ((// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1877
+ cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1878
+ setContentReference(elm);
1879
+ }
1880
+ }
1881
+ {
1882
+ // find the first ancestor component (if there is one) and register
1883
+ // this component as one of the actively loading child components for its ancestor
1884
+ let ancestorComponent = elm;
1885
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1886
+ // climb up the ancestors looking for the first
1887
+ // component that hasn't finished its lifecycle update yet
1888
+ if (ancestorComponent['s-p']) {
1889
+ // we found this components first ancestor component
1890
+ // keep a reference to this component's ancestor component
1891
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1892
+ break;
1893
+ }
1894
+ }
1895
+ }
1896
+ // Lazy properties
1897
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1898
+ if (cmpMeta.$members$) {
1899
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1900
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1901
+ const value = elm[memberName];
1902
+ delete elm[memberName];
1903
+ elm[memberName] = value;
1904
+ }
1905
+ });
1906
+ }
1907
+ {
1908
+ initializeComponent(elm, hostRef, cmpMeta);
1909
+ }
1910
+ }
1911
+ else {
1912
+ // fire off connectedCallback() on component instance
1913
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1914
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1915
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1916
+ }
1917
+ }
1918
+ endConnected();
1919
+ }
1920
+ };
1921
+ const setContentReference = (elm) => {
1922
+ // only required when we're NOT using native shadow dom (slot)
1923
+ // or this browser doesn't support native shadow dom
1924
+ // and this host element was NOT created with SSR
1925
+ // let's pick out the inner content for slot projection
1926
+ // create a node to represent where the original
1927
+ // content was first placed, which is useful later on
1928
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1929
+ contentRefElm['s-cn'] = true;
1930
+ elm.insertBefore(contentRefElm, elm.firstChild);
1931
+ };
1932
+ const disconnectInstance = (instance) => {
1933
+ {
1934
+ safeCall(instance, 'disconnectedCallback');
1935
+ }
1936
+ };
1937
+ const disconnectedCallback = async (elm) => {
1938
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1939
+ const hostRef = getHostRef(elm);
1940
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1941
+ disconnectInstance(hostRef.$lazyInstance$);
1942
+ }
1943
+ else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1944
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1945
+ }
1946
+ }
1947
+ };
1948
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1949
+ var _a;
1950
+ const endBootstrap = createTime();
1951
+ const cmpTags = [];
1952
+ const exclude = options.exclude || [];
1953
+ const customElements = win.customElements;
1954
+ const head = doc.head;
1955
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1956
+ const dataStyles = /*@__PURE__*/ doc.createElement('style');
1957
+ const deferredConnectedCallbacks = [];
1958
+ let appLoadFallback;
1959
+ let isBootstrapping = true;
1960
+ Object.assign(plt, options);
1961
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1962
+ let hasSlotRelocation = false;
1963
+ lazyBundles.map((lazyBundle) => {
1964
+ lazyBundle[1].map((compactMeta) => {
1965
+ var _a;
1966
+ const cmpMeta = {
1967
+ $flags$: compactMeta[0],
1968
+ $tagName$: compactMeta[1],
1969
+ $members$: compactMeta[2],
1970
+ $listeners$: compactMeta[3],
1971
+ };
1972
+ // Check if we are using slots outside the shadow DOM in this component.
1973
+ // We'll use this information later to add styles for `slot-fb` elements
1974
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
1975
+ hasSlotRelocation = true;
1976
+ }
1977
+ {
1978
+ cmpMeta.$members$ = compactMeta[2];
1979
+ }
1980
+ {
1981
+ cmpMeta.$attrsToReflect$ = [];
1982
+ }
1983
+ {
1984
+ cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1985
+ }
1986
+ const tagName = cmpMeta.$tagName$;
1987
+ const HostElement = class extends HTMLElement {
1988
+ // StencilLazyHost
1989
+ constructor(self) {
1990
+ // @ts-ignore
1991
+ super(self);
1992
+ self = this;
1993
+ registerHost(self, cmpMeta);
1994
+ if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1995
+ // this component is using shadow dom
1996
+ // and this browser supports shadow dom
1997
+ // add the read-only property "shadowRoot" to the host element
1998
+ // adding the shadow root build conditionals to minimize runtime
1999
+ {
2000
+ {
2001
+ self.attachShadow({ mode: 'open' });
2002
+ }
2003
+ }
2004
+ }
2005
+ }
2006
+ connectedCallback() {
2007
+ if (appLoadFallback) {
2008
+ clearTimeout(appLoadFallback);
2009
+ appLoadFallback = null;
2010
+ }
2011
+ if (isBootstrapping) {
2012
+ // connectedCallback will be processed once all components have been registered
2013
+ deferredConnectedCallbacks.push(this);
2014
+ }
2015
+ else {
2016
+ plt.jmp(() => connectedCallback(this));
2017
+ }
2018
+ }
2019
+ disconnectedCallback() {
2020
+ plt.jmp(() => disconnectedCallback(this));
2021
+ }
2022
+ componentOnReady() {
2023
+ return getHostRef(this).$onReadyPromise$;
2024
+ }
2025
+ };
2026
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
2027
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2028
+ cmpTags.push(tagName);
2029
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
2030
+ }
2031
+ });
2032
+ });
2033
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
2034
+ if (hasSlotRelocation) {
2035
+ dataStyles.innerHTML += SLOT_FB_CSS;
2036
+ }
2037
+ // Add hydration styles
2038
+ {
2039
+ dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
2040
+ }
2041
+ // If we have styles, add them to the DOM
2042
+ if (dataStyles.innerHTML.length) {
2043
+ dataStyles.setAttribute('data-styles', '');
2044
+ // Apply CSP nonce to the style tag if it exists
2045
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2046
+ if (nonce != null) {
2047
+ dataStyles.setAttribute('nonce', nonce);
2048
+ }
2049
+ // Insert the styles into the document head
2050
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
2051
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
2052
+ }
2053
+ // Process deferred connectedCallbacks now all components have been registered
2054
+ isBootstrapping = false;
2055
+ if (deferredConnectedCallbacks.length) {
2056
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
2057
+ }
2058
+ else {
2059
+ {
2060
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
2061
+ }
2062
+ }
2063
+ // Fallback appLoad event
2064
+ endBootstrap();
2065
+ };
2066
+ /**
2067
+ * Assigns the given value to the nonce property on the runtime platform object.
2068
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
2069
+ * @param nonce The value to be assigned to the platform nonce property.
2070
+ * @returns void
2071
+ */
2072
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
2073
+ /**
2074
+ * A WeakMap mapping runtime component references to their corresponding host reference
2075
+ * instances.
2076
+ */
2077
+ const hostRefs = /*@__PURE__*/ new WeakMap();
2078
+ /**
2079
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2080
+ *
2081
+ * @param ref the runtime ref of interest
2082
+ * @returns the Host reference (if found) or undefined
2083
+ */
2084
+ const getHostRef = (ref) => hostRefs.get(ref);
2085
+ /**
2086
+ * Register a lazy instance with the {@link hostRefs} object so it's
2087
+ * corresponding {@link d.HostRef} can be retrieved later.
2088
+ *
2089
+ * @param lazyInstance the lazy instance of interest
2090
+ * @param hostRef that instances `HostRef` object
2091
+ * @returns a reference to the host ref WeakMap
2092
+ */
2093
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2094
+ /**
2095
+ * Register a host element for a Stencil component, setting up various metadata
2096
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
2097
+ * metadata.
2098
+ *
2099
+ * @param hostElement the host element to register
2100
+ * @param cmpMeta runtime metadata for that component
2101
+ * @returns a reference to the host ref WeakMap
2102
+ */
2103
+ const registerHost = (hostElement, cmpMeta) => {
2104
+ const hostRef = {
2105
+ $flags$: 0,
2106
+ $hostElement$: hostElement,
2107
+ $cmpMeta$: cmpMeta,
2108
+ $instanceValues$: new Map(),
2109
+ };
2110
+ {
2111
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2112
+ }
2113
+ {
2114
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2115
+ hostElement['s-p'] = [];
2116
+ hostElement['s-rc'] = [];
2117
+ }
2118
+ return hostRefs.set(hostElement, hostRef);
2119
+ };
2120
+ const isMemberInElement = (elm, memberName) => memberName in elm;
2121
+ const consoleError = (e, el) => (0, console.error)(e, el);
2122
+ const cmpModules = /*@__PURE__*/ new Map();
2123
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2124
+ // loadModuleImport
2125
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
2126
+ const bundleId = cmpMeta.$lazyBundleId$;
2127
+ const module = cmpModules.get(bundleId) ;
2128
+ if (module) {
2129
+ return module[exportName];
2130
+ }
2131
+
2132
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
2133
+ const processMod = importedModule => {
2134
+ cmpModules.set(bundleId, importedModule);
2135
+ return importedModule[exportName];
2136
+ }
2137
+ switch(bundleId) {
2138
+
2139
+ case 'arcgis-basemap-gallery_2':
2140
+ return import(
2141
+ /* webpackMode: "lazy" */
2142
+ './arcgis-basemap-gallery_2.entry.js').then(processMod, consoleError);
2143
+ case 'arcgis-area-measurement-2d':
2144
+ return import(
2145
+ /* webpackMode: "lazy" */
2146
+ './arcgis-area-measurement-2d.entry.js').then(processMod, consoleError);
2147
+ case 'arcgis-area-measurement-3d':
2148
+ return import(
2149
+ /* webpackMode: "lazy" */
2150
+ './arcgis-area-measurement-3d.entry.js').then(processMod, consoleError);
2151
+ case 'arcgis-attachments':
2152
+ return import(
2153
+ /* webpackMode: "lazy" */
2154
+ './arcgis-attachments.entry.js').then(processMod, consoleError);
2155
+ case 'arcgis-basemap-layer-list':
2156
+ return import(
2157
+ /* webpackMode: "lazy" */
2158
+ './arcgis-basemap-layer-list.entry.js').then(processMod, consoleError);
2159
+ case 'arcgis-basemap-toggle':
2160
+ return import(
2161
+ /* webpackMode: "lazy" */
2162
+ './arcgis-basemap-toggle.entry.js').then(processMod, consoleError);
2163
+ case 'arcgis-bookmarks':
2164
+ return import(
2165
+ /* webpackMode: "lazy" */
2166
+ './arcgis-bookmarks.entry.js').then(processMod, consoleError);
2167
+ case 'arcgis-building-explorer':
2168
+ return import(
2169
+ /* webpackMode: "lazy" */
2170
+ './arcgis-building-explorer.entry.js').then(processMod, consoleError);
2171
+ case 'arcgis-compass':
2172
+ return import(
2173
+ /* webpackMode: "lazy" */
2174
+ './arcgis-compass.entry.js').then(processMod, consoleError);
2175
+ case 'arcgis-coordinate-conversion':
2176
+ return import(
2177
+ /* webpackMode: "lazy" */
2178
+ './arcgis-coordinate-conversion.entry.js').then(processMod, consoleError);
2179
+ case 'arcgis-daylight':
2180
+ return import(
2181
+ /* webpackMode: "lazy" */
2182
+ './arcgis-daylight.entry.js').then(processMod, consoleError);
2183
+ case 'arcgis-directional-pad':
2184
+ return import(
2185
+ /* webpackMode: "lazy" */
2186
+ './arcgis-directional-pad.entry.js').then(processMod, consoleError);
2187
+ case 'arcgis-directions':
2188
+ return import(
2189
+ /* webpackMode: "lazy" */
2190
+ './arcgis-directions.entry.js').then(processMod, consoleError);
2191
+ case 'arcgis-directline-measurement-3d':
2192
+ return import(
2193
+ /* webpackMode: "lazy" */
2194
+ './arcgis-directline-measurement-3d.entry.js').then(processMod, consoleError);
2195
+ case 'arcgis-distance-measurement-2d':
2196
+ return import(
2197
+ /* webpackMode: "lazy" */
2198
+ './arcgis-distance-measurement-2d.entry.js').then(processMod, consoleError);
2199
+ case 'arcgis-editor':
2200
+ return import(
2201
+ /* webpackMode: "lazy" */
2202
+ './arcgis-editor.entry.js').then(processMod, consoleError);
2203
+ case 'arcgis-elevation-profile':
2204
+ return import(
2205
+ /* webpackMode: "lazy" */
2206
+ './arcgis-elevation-profile.entry.js').then(processMod, consoleError);
2207
+ case 'arcgis-feature':
2208
+ return import(
2209
+ /* webpackMode: "lazy" */
2210
+ './arcgis-feature.entry.js').then(processMod, consoleError);
2211
+ case 'arcgis-feature-form':
2212
+ return import(
2213
+ /* webpackMode: "lazy" */
2214
+ './arcgis-feature-form.entry.js').then(processMod, consoleError);
2215
+ case 'arcgis-feature-table':
2216
+ return import(
2217
+ /* webpackMode: "lazy" */
2218
+ './arcgis-feature-table.entry.js').then(processMod, consoleError);
2219
+ case 'arcgis-feature-templates':
2220
+ return import(
2221
+ /* webpackMode: "lazy" */
2222
+ './arcgis-feature-templates.entry.js').then(processMod, consoleError);
2223
+ case 'arcgis-features':
2224
+ return import(
2225
+ /* webpackMode: "lazy" */
2226
+ './arcgis-features.entry.js').then(processMod, consoleError);
2227
+ case 'arcgis-floor-filter':
2228
+ return import(
2229
+ /* webpackMode: "lazy" */
2230
+ './arcgis-floor-filter.entry.js').then(processMod, consoleError);
2231
+ case 'arcgis-fullscreen':
2232
+ return import(
2233
+ /* webpackMode: "lazy" */
2234
+ './arcgis-fullscreen.entry.js').then(processMod, consoleError);
2235
+ case 'arcgis-histogram':
2236
+ return import(
2237
+ /* webpackMode: "lazy" */
2238
+ './arcgis-histogram.entry.js').then(processMod, consoleError);
2239
+ case 'arcgis-histogram-range-slider':
2240
+ return import(
2241
+ /* webpackMode: "lazy" */
2242
+ './arcgis-histogram-range-slider.entry.js').then(processMod, consoleError);
2243
+ case 'arcgis-home':
2244
+ return import(
2245
+ /* webpackMode: "lazy" */
2246
+ './arcgis-home.entry.js').then(processMod, consoleError);
2247
+ case 'arcgis-layer-list':
2248
+ return import(
2249
+ /* webpackMode: "lazy" */
2250
+ './arcgis-layer-list.entry.js').then(processMod, consoleError);
2251
+ case 'arcgis-legend':
2252
+ return import(
2253
+ /* webpackMode: "lazy" */
2254
+ './arcgis-legend.entry.js').then(processMod, consoleError);
2255
+ case 'arcgis-line-of-sight':
2256
+ return import(
2257
+ /* webpackMode: "lazy" */
2258
+ './arcgis-line-of-sight.entry.js').then(processMod, consoleError);
2259
+ case 'arcgis-locate':
2260
+ return import(
2261
+ /* webpackMode: "lazy" */
2262
+ './arcgis-locate.entry.js').then(processMod, consoleError);
2263
+ case 'arcgis-measurement':
2264
+ return import(
2265
+ /* webpackMode: "lazy" */
2266
+ './arcgis-measurement.entry.js').then(processMod, consoleError);
2267
+ case 'arcgis-navigation-toggle':
2268
+ return import(
2269
+ /* webpackMode: "lazy" */
2270
+ './arcgis-navigation-toggle.entry.js').then(processMod, consoleError);
2271
+ case 'arcgis-placement':
2272
+ return import(
2273
+ /* webpackMode: "lazy" */
2274
+ './arcgis-placement.entry.js').then(processMod, consoleError);
2275
+ case 'arcgis-print':
2276
+ return import(
2277
+ /* webpackMode: "lazy" */
2278
+ './arcgis-print.entry.js').then(processMod, consoleError);
2279
+ case 'arcgis-scale-bar':
2280
+ return import(
2281
+ /* webpackMode: "lazy" */
2282
+ './arcgis-scale-bar.entry.js').then(processMod, consoleError);
2283
+ case 'arcgis-scale-range-slider':
2284
+ return import(
2285
+ /* webpackMode: "lazy" */
2286
+ './arcgis-scale-range-slider.entry.js').then(processMod, consoleError);
2287
+ case 'arcgis-scene':
2288
+ return import(
2289
+ /* webpackMode: "lazy" */
2290
+ './arcgis-scene.entry.js').then(processMod, consoleError);
2291
+ case 'arcgis-search':
2292
+ return import(
2293
+ /* webpackMode: "lazy" */
2294
+ './arcgis-search.entry.js').then(processMod, consoleError);
2295
+ case 'arcgis-shadow-cast':
2296
+ return import(
2297
+ /* webpackMode: "lazy" */
2298
+ './arcgis-shadow-cast.entry.js').then(processMod, consoleError);
2299
+ case 'arcgis-sketch':
2300
+ return import(
2301
+ /* webpackMode: "lazy" */
2302
+ './arcgis-sketch.entry.js').then(processMod, consoleError);
2303
+ case 'arcgis-slice':
2304
+ return import(
2305
+ /* webpackMode: "lazy" */
2306
+ './arcgis-slice.entry.js').then(processMod, consoleError);
2307
+ case 'arcgis-slider':
2308
+ return import(
2309
+ /* webpackMode: "lazy" */
2310
+ './arcgis-slider.entry.js').then(processMod, consoleError);
2311
+ case 'arcgis-swipe':
2312
+ return import(
2313
+ /* webpackMode: "lazy" */
2314
+ './arcgis-swipe.entry.js').then(processMod, consoleError);
2315
+ case 'arcgis-table-list':
2316
+ return import(
2317
+ /* webpackMode: "lazy" */
2318
+ './arcgis-table-list.entry.js').then(processMod, consoleError);
2319
+ case 'arcgis-time-slider':
2320
+ return import(
2321
+ /* webpackMode: "lazy" */
2322
+ './arcgis-time-slider.entry.js').then(processMod, consoleError);
2323
+ case 'arcgis-track':
2324
+ return import(
2325
+ /* webpackMode: "lazy" */
2326
+ './arcgis-track.entry.js').then(processMod, consoleError);
2327
+ case 'arcgis-utility-network-associations':
2328
+ return import(
2329
+ /* webpackMode: "lazy" */
2330
+ './arcgis-utility-network-associations.entry.js').then(processMod, consoleError);
2331
+ case 'arcgis-utility-network-trace':
2332
+ return import(
2333
+ /* webpackMode: "lazy" */
2334
+ './arcgis-utility-network-trace.entry.js').then(processMod, consoleError);
2335
+ case 'arcgis-utility-network-validate-topology':
2336
+ return import(
2337
+ /* webpackMode: "lazy" */
2338
+ './arcgis-utility-network-validate-topology.entry.js').then(processMod, consoleError);
2339
+ case 'arcgis-value-picker':
2340
+ return import(
2341
+ /* webpackMode: "lazy" */
2342
+ './arcgis-value-picker.entry.js').then(processMod, consoleError);
2343
+ case 'arcgis-version-management':
2344
+ return import(
2345
+ /* webpackMode: "lazy" */
2346
+ './arcgis-version-management.entry.js').then(processMod, consoleError);
2347
+ case 'arcgis-weather':
2348
+ return import(
2349
+ /* webpackMode: "lazy" */
2350
+ './arcgis-weather.entry.js').then(processMod, consoleError);
2351
+ case 'arcgis-zoom':
2352
+ return import(
2353
+ /* webpackMode: "lazy" */
2354
+ './arcgis-zoom.entry.js').then(processMod, consoleError);
2355
+ case 'arcgis-version-management-service-item_2':
2356
+ return import(
2357
+ /* webpackMode: "lazy" */
2358
+ './arcgis-version-management-service-item_2.entry.js').then(processMod, consoleError);
2359
+ case 'arcgis-version-management-version-item_2':
2360
+ return import(
2361
+ /* webpackMode: "lazy" */
2362
+ './arcgis-version-management-version-item_2.entry.js').then(processMod, consoleError);
2363
+ case 'arcgis-expand':
2364
+ return import(
2365
+ /* webpackMode: "lazy" */
2366
+ './arcgis-expand.entry.js').then(processMod, consoleError);
2367
+ }
2368
+ }
2369
+ return import(
2370
+ /* @vite-ignore */
2371
+ /* webpackInclude: /\.entry\.js$/ */
2372
+ /* webpackExclude: /\.system\.entry\.js$/ */
2373
+ /* webpackMode: "lazy" */
2374
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
2375
+ {
2376
+ cmpModules.set(bundleId, importedModule);
2377
+ }
2378
+ return importedModule[exportName];
2379
+ }, consoleError);
2380
+ };
2381
+ const styles = /*@__PURE__*/ new Map();
2382
+ const win = typeof window !== 'undefined' ? window : {};
2383
+ const doc = win.document || { head: {} };
2384
+ const plt = {
2385
+ $flags$: 0,
2386
+ $resourcesUrl$: '',
2387
+ jmp: (h) => h(),
2388
+ raf: (h) => requestAnimationFrame(h),
2389
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2390
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2391
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
2392
+ };
2393
+ const promiseResolve = (v) => Promise.resolve(v);
2394
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2395
+ try {
2396
+ new CSSStyleSheet();
2397
+ return typeof new CSSStyleSheet().replaceSync === 'function';
2398
+ }
2399
+ catch (e) { }
2400
+ return false;
2401
+ })()
2402
+ ;
2403
+ const queueDomReads = [];
2404
+ const queueDomWrites = [];
2405
+ const queueTask = (queue, write) => (cb) => {
2406
+ queue.push(cb);
2407
+ if (!queuePending) {
2408
+ queuePending = true;
2409
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
2410
+ nextTick(flush);
2411
+ }
2412
+ else {
2413
+ plt.raf(flush);
2414
+ }
2415
+ }
2416
+ };
2417
+ const consume = (queue) => {
2418
+ for (let i = 0; i < queue.length; i++) {
2419
+ try {
2420
+ queue[i](performance.now());
2421
+ }
2422
+ catch (e) {
2423
+ consoleError(e);
2424
+ }
2425
+ }
2426
+ queue.length = 0;
2427
+ };
2428
+ const flush = () => {
2429
+ // always force a bunch of medium callbacks to run, but still have
2430
+ // a throttle on how many can run in a certain time
2431
+ // DOM READS!!!
2432
+ consume(queueDomReads);
2433
+ // DOM WRITES!!!
2434
+ {
2435
+ consume(queueDomWrites);
2436
+ if ((queuePending = queueDomReads.length > 0)) {
2437
+ // still more to do yet, but we've run out of time
2438
+ // let's let this thing cool off and try again in the next tick
2439
+ plt.raf(flush);
2440
+ }
2441
+ }
2442
+ };
2443
+ const nextTick = (cb) => promiseResolve().then(cb);
2444
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2445
+
2446
+ export { Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };