@arcgis/map-components 1.0.0-beta.14

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 (354) hide show
  1. package/LICENSE.md +13 -0
  2. package/dist/arcgis-map-components/arcgis-map-components.esm.js +1 -0
  3. package/dist/arcgis-map-components/index.esm.js +0 -0
  4. package/dist/arcgis-map-components/p-095e0075.js +1 -0
  5. package/dist/arcgis-map-components/p-0a81674b.entry.js +1 -0
  6. package/dist/arcgis-map-components/p-0b5368a6.entry.js +1 -0
  7. package/dist/arcgis-map-components/p-0dddef29.entry.js +1 -0
  8. package/dist/arcgis-map-components/p-0decaa03.entry.js +1 -0
  9. package/dist/arcgis-map-components/p-1126ae71.entry.js +1 -0
  10. package/dist/arcgis-map-components/p-1307fe8a.entry.js +1 -0
  11. package/dist/arcgis-map-components/p-1401deea.js +1 -0
  12. package/dist/arcgis-map-components/p-1e5e5ed9.js +2 -0
  13. package/dist/arcgis-map-components/p-23530601.entry.js +1 -0
  14. package/dist/arcgis-map-components/p-3b5c0098.entry.js +1 -0
  15. package/dist/arcgis-map-components/p-406f187c.entry.js +1 -0
  16. package/dist/arcgis-map-components/p-5396bcb5.entry.js +1 -0
  17. package/dist/arcgis-map-components/p-5a87f5c4.entry.js +1 -0
  18. package/dist/arcgis-map-components/p-5cabdee7.js +1 -0
  19. package/dist/arcgis-map-components/p-69214958.entry.js +1 -0
  20. package/dist/arcgis-map-components/p-6e69fe28.entry.js +1 -0
  21. package/dist/arcgis-map-components/p-741086a4.entry.js +1 -0
  22. package/dist/arcgis-map-components/p-79080368.entry.js +1 -0
  23. package/dist/arcgis-map-components/p-7e5545cf.entry.js +1 -0
  24. package/dist/arcgis-map-components/p-7e90f27c.entry.js +1 -0
  25. package/dist/arcgis-map-components/p-80fd5534.entry.js +1 -0
  26. package/dist/arcgis-map-components/p-81a3bd3b.entry.js +1 -0
  27. package/dist/arcgis-map-components/p-85b278c1.entry.js +1 -0
  28. package/dist/arcgis-map-components/p-866d57e1.entry.js +1 -0
  29. package/dist/arcgis-map-components/p-86acdf29.entry.js +1 -0
  30. package/dist/arcgis-map-components/p-8bf81a13.entry.js +1 -0
  31. package/dist/arcgis-map-components/p-95287b70.entry.js +1 -0
  32. package/dist/arcgis-map-components/p-95aa4e86.entry.js +1 -0
  33. package/dist/arcgis-map-components/p-9634a446.entry.js +1 -0
  34. package/dist/arcgis-map-components/p-9d16369e.entry.js +1 -0
  35. package/dist/arcgis-map-components/p-a094dafc.entry.js +1 -0
  36. package/dist/arcgis-map-components/p-a6ab7f72.entry.js +1 -0
  37. package/dist/arcgis-map-components/p-a7715a1a.entry.js +1 -0
  38. package/dist/arcgis-map-components/p-aa73b1cb.entry.js +1 -0
  39. package/dist/arcgis-map-components/p-ae017ef1.entry.js +1 -0
  40. package/dist/arcgis-map-components/p-b5182c68.entry.js +1 -0
  41. package/dist/arcgis-map-components/p-b813c9e6.js +1 -0
  42. package/dist/arcgis-map-components/p-bfb9ceb4.entry.js +1 -0
  43. package/dist/arcgis-map-components/p-c28ede1a.entry.js +1 -0
  44. package/dist/arcgis-map-components/p-c64bceeb.entry.js +1 -0
  45. package/dist/arcgis-map-components/p-c726b024.entry.js +1 -0
  46. package/dist/arcgis-map-components/p-d0dc4119.entry.js +1 -0
  47. package/dist/arcgis-map-components/p-d2274db9.entry.js +1 -0
  48. package/dist/arcgis-map-components/p-d5b79b4e.entry.js +1 -0
  49. package/dist/arcgis-map-components/p-d9c0253a.entry.js +1 -0
  50. package/dist/arcgis-map-components/p-db02ac80.entry.js +1 -0
  51. package/dist/arcgis-map-components/p-dfbbbdad.entry.js +1 -0
  52. package/dist/arcgis-map-components/p-e432eb73.entry.js +1 -0
  53. package/dist/arcgis-map-components/p-e4f5a3f5.entry.js +1 -0
  54. package/dist/arcgis-map-components/p-f32183ab.entry.js +1 -0
  55. package/dist/arcgis-map-components/p-f9b78102.entry.js +1 -0
  56. package/dist/arcgis-map-components/p-fa591c93.entry.js +1 -0
  57. package/dist/arcgis-map-components/p-fee8b15a.entry.js +1 -0
  58. package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +101 -0
  59. package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +94 -0
  60. package/dist/cjs/arcgis-attachments.cjs.entry.js +73 -0
  61. package/dist/cjs/arcgis-basemap-gallery_3.cjs.entry.js +281 -0
  62. package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +144 -0
  63. package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +115 -0
  64. package/dist/cjs/arcgis-bookmarks.cjs.entry.js +140 -0
  65. package/dist/cjs/arcgis-building-explorer.cjs.entry.js +80 -0
  66. package/dist/cjs/arcgis-compass.cjs.entry.js +90 -0
  67. package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +158 -0
  68. package/dist/cjs/arcgis-daylight.cjs.entry.js +116 -0
  69. package/dist/cjs/arcgis-directions.cjs.entry.js +194 -0
  70. package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +114 -0
  71. package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +106 -0
  72. package/dist/cjs/arcgis-editor.cjs.entry.js +180 -0
  73. package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +136 -0
  74. package/dist/cjs/arcgis-feature-form.cjs.entry.js +36 -0
  75. package/dist/cjs/arcgis-feature-table.cjs.entry.js +300 -0
  76. package/dist/cjs/arcgis-feature-templates.cjs.entry.js +73 -0
  77. package/dist/cjs/arcgis-feature.cjs.entry.js +106 -0
  78. package/dist/cjs/arcgis-features.cjs.entry.js +133 -0
  79. package/dist/cjs/arcgis-floor-filter.cjs.entry.js +134 -0
  80. package/dist/cjs/arcgis-fullscreen.cjs.entry.js +92 -0
  81. package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +80 -0
  82. package/dist/cjs/arcgis-histogram.cjs.entry.js +36 -0
  83. package/dist/cjs/arcgis-home.cjs.entry.js +108 -0
  84. package/dist/cjs/arcgis-layer-list.cjs.entry.js +128 -0
  85. package/dist/cjs/arcgis-legend.cjs.entry.js +146 -0
  86. package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +94 -0
  87. package/dist/cjs/arcgis-locate.cjs.entry.js +158 -0
  88. package/dist/cjs/arcgis-map-components.cjs.js +23 -0
  89. package/dist/cjs/arcgis-measurement.cjs.entry.js +123 -0
  90. package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +97 -0
  91. package/dist/cjs/arcgis-print.cjs.entry.js +163 -0
  92. package/dist/cjs/arcgis-scale-bar.cjs.entry.js +106 -0
  93. package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +146 -0
  94. package/dist/cjs/arcgis-scene.cjs.entry.js +106 -0
  95. package/dist/cjs/arcgis-search.cjs.entry.js +276 -0
  96. package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +95 -0
  97. package/dist/cjs/arcgis-sketch.cjs.entry.js +201 -0
  98. package/dist/cjs/arcgis-slice.cjs.entry.js +103 -0
  99. package/dist/cjs/arcgis-slider.cjs.entry.js +233 -0
  100. package/dist/cjs/arcgis-swipe.cjs.entry.js +117 -0
  101. package/dist/cjs/arcgis-table-list.cjs.entry.js +118 -0
  102. package/dist/cjs/arcgis-time-slider.cjs.entry.js +216 -0
  103. package/dist/cjs/arcgis-track.cjs.entry.js +147 -0
  104. package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +162 -0
  105. package/dist/cjs/arcgis-value-picker.cjs.entry.js +160 -0
  106. package/dist/cjs/arcgis-weather.cjs.entry.js +86 -0
  107. package/dist/cjs/arcgis-zoom.cjs.entry.js +100 -0
  108. package/dist/cjs/component-utils-933b7aca.js +76 -0
  109. package/dist/cjs/disconnected-306cb220.js +55 -0
  110. package/dist/cjs/index-6b51d5a0.js +1607 -0
  111. package/dist/cjs/index-ef2acc94.js +717 -0
  112. package/dist/cjs/index.cjs.js +2 -0
  113. package/dist/cjs/loader.cjs.js +22 -0
  114. package/dist/cjs/mapping-utils-c2c7b994.js +40 -0
  115. package/dist/components/arcgis-area-measurement-2d.d.ts +11 -0
  116. package/dist/components/arcgis-area-measurement-2d.js +128 -0
  117. package/dist/components/arcgis-area-measurement-3d.d.ts +11 -0
  118. package/dist/components/arcgis-area-measurement-3d.js +121 -0
  119. package/dist/components/arcgis-attachments.d.ts +11 -0
  120. package/dist/components/arcgis-attachments.js +99 -0
  121. package/dist/components/arcgis-basemap-gallery.d.ts +11 -0
  122. package/dist/components/arcgis-basemap-gallery.js +124 -0
  123. package/dist/components/arcgis-basemap-layer-list.d.ts +11 -0
  124. package/dist/components/arcgis-basemap-layer-list.js +175 -0
  125. package/dist/components/arcgis-basemap-toggle.d.ts +11 -0
  126. package/dist/components/arcgis-basemap-toggle.js +143 -0
  127. package/dist/components/arcgis-bookmarks.d.ts +11 -0
  128. package/dist/components/arcgis-bookmarks.js +169 -0
  129. package/dist/components/arcgis-building-explorer.d.ts +11 -0
  130. package/dist/components/arcgis-building-explorer.js +105 -0
  131. package/dist/components/arcgis-compass.d.ts +11 -0
  132. package/dist/components/arcgis-compass.js +109 -0
  133. package/dist/components/arcgis-coordinate-conversion.d.ts +11 -0
  134. package/dist/components/arcgis-coordinate-conversion.js +193 -0
  135. package/dist/components/arcgis-daylight.d.ts +11 -0
  136. package/dist/components/arcgis-daylight.js +144 -0
  137. package/dist/components/arcgis-directions.d.ts +11 -0
  138. package/dist/components/arcgis-directions.js +230 -0
  139. package/dist/components/arcgis-directline-measurement-3d.d.ts +11 -0
  140. package/dist/components/arcgis-directline-measurement-3d.js +142 -0
  141. package/dist/components/arcgis-distance-measurement-2d.d.ts +11 -0
  142. package/dist/components/arcgis-distance-measurement-2d.js +133 -0
  143. package/dist/components/arcgis-editor.d.ts +11 -0
  144. package/dist/components/arcgis-editor.js +219 -0
  145. package/dist/components/arcgis-elevation-profile.d.ts +11 -0
  146. package/dist/components/arcgis-elevation-profile.js +166 -0
  147. package/dist/components/arcgis-expand.d.ts +11 -0
  148. package/dist/components/arcgis-expand.js +6 -0
  149. package/dist/components/arcgis-expand2.js +107 -0
  150. package/dist/components/arcgis-feature-form.d.ts +11 -0
  151. package/dist/components/arcgis-feature-form.js +55 -0
  152. package/dist/components/arcgis-feature-table.d.ts +11 -0
  153. package/dist/components/arcgis-feature-table.js +355 -0
  154. package/dist/components/arcgis-feature-templates.d.ts +11 -0
  155. package/dist/components/arcgis-feature-templates.js +98 -0
  156. package/dist/components/arcgis-feature.d.ts +11 -0
  157. package/dist/components/arcgis-feature.js +133 -0
  158. package/dist/components/arcgis-features.d.ts +11 -0
  159. package/dist/components/arcgis-features.js +169 -0
  160. package/dist/components/arcgis-floor-filter.d.ts +11 -0
  161. package/dist/components/arcgis-floor-filter.js +164 -0
  162. package/dist/components/arcgis-fullscreen.d.ts +11 -0
  163. package/dist/components/arcgis-fullscreen.js +111 -0
  164. package/dist/components/arcgis-histogram-range-slider.d.ts +11 -0
  165. package/dist/components/arcgis-histogram-range-slider.js +106 -0
  166. package/dist/components/arcgis-histogram.d.ts +11 -0
  167. package/dist/components/arcgis-histogram.js +55 -0
  168. package/dist/components/arcgis-home.d.ts +11 -0
  169. package/dist/components/arcgis-home.js +129 -0
  170. package/dist/components/arcgis-layer-list.d.ts +11 -0
  171. package/dist/components/arcgis-layer-list.js +158 -0
  172. package/dist/components/arcgis-legend.d.ts +11 -0
  173. package/dist/components/arcgis-legend.js +177 -0
  174. package/dist/components/arcgis-line-of-sight.d.ts +11 -0
  175. package/dist/components/arcgis-line-of-sight.js +120 -0
  176. package/dist/components/arcgis-locate.d.ts +11 -0
  177. package/dist/components/arcgis-locate.js +184 -0
  178. package/dist/components/arcgis-map.d.ts +11 -0
  179. package/dist/components/arcgis-map.js +130 -0
  180. package/dist/components/arcgis-measurement.d.ts +11 -0
  181. package/dist/components/arcgis-measurement.js +153 -0
  182. package/dist/components/arcgis-navigation-toggle.d.ts +11 -0
  183. package/dist/components/arcgis-navigation-toggle.js +117 -0
  184. package/dist/components/arcgis-print.d.ts +11 -0
  185. package/dist/components/arcgis-print.js +197 -0
  186. package/dist/components/arcgis-scale-bar.d.ts +11 -0
  187. package/dist/components/arcgis-scale-bar.js +133 -0
  188. package/dist/components/arcgis-scale-range-slider.d.ts +11 -0
  189. package/dist/components/arcgis-scale-range-slider.js +177 -0
  190. package/dist/components/arcgis-scene.d.ts +11 -0
  191. package/dist/components/arcgis-scene.js +127 -0
  192. package/dist/components/arcgis-search.d.ts +11 -0
  193. package/dist/components/arcgis-search.js +330 -0
  194. package/dist/components/arcgis-shadow-cast.d.ts +11 -0
  195. package/dist/components/arcgis-shadow-cast.js +121 -0
  196. package/dist/components/arcgis-sketch.d.ts +11 -0
  197. package/dist/components/arcgis-sketch.js +238 -0
  198. package/dist/components/arcgis-slice.d.ts +11 -0
  199. package/dist/components/arcgis-slice.js +130 -0
  200. package/dist/components/arcgis-slider.d.ts +11 -0
  201. package/dist/components/arcgis-slider.js +281 -0
  202. package/dist/components/arcgis-swipe.d.ts +11 -0
  203. package/dist/components/arcgis-swipe.js +140 -0
  204. package/dist/components/arcgis-table-list.d.ts +11 -0
  205. package/dist/components/arcgis-table-list.js +147 -0
  206. package/dist/components/arcgis-time-slider.d.ts +11 -0
  207. package/dist/components/arcgis-time-slider.js +256 -0
  208. package/dist/components/arcgis-track.d.ts +11 -0
  209. package/dist/components/arcgis-track.js +171 -0
  210. package/dist/components/arcgis-utility-network-trace.d.ts +11 -0
  211. package/dist/components/arcgis-utility-network-trace.js +197 -0
  212. package/dist/components/arcgis-value-picker.d.ts +11 -0
  213. package/dist/components/arcgis-value-picker.js +198 -0
  214. package/dist/components/arcgis-weather.d.ts +11 -0
  215. package/dist/components/arcgis-weather.js +111 -0
  216. package/dist/components/arcgis-zoom.d.ts +11 -0
  217. package/dist/components/arcgis-zoom.js +121 -0
  218. package/dist/components/disconnected.js +122 -0
  219. package/dist/components/index.d.ts +81 -0
  220. package/dist/components/index.js +52 -0
  221. package/dist/components/index2.js +638 -0
  222. package/dist/components/mapping-utils.js +38 -0
  223. package/dist/esm/arcgis-area-measurement-2d.entry.js +97 -0
  224. package/dist/esm/arcgis-area-measurement-3d.entry.js +90 -0
  225. package/dist/esm/arcgis-attachments.entry.js +69 -0
  226. package/dist/esm/arcgis-basemap-gallery_3.entry.js +275 -0
  227. package/dist/esm/arcgis-basemap-layer-list.entry.js +140 -0
  228. package/dist/esm/arcgis-basemap-toggle.entry.js +111 -0
  229. package/dist/esm/arcgis-bookmarks.entry.js +136 -0
  230. package/dist/esm/arcgis-building-explorer.entry.js +76 -0
  231. package/dist/esm/arcgis-compass.entry.js +86 -0
  232. package/dist/esm/arcgis-coordinate-conversion.entry.js +154 -0
  233. package/dist/esm/arcgis-daylight.entry.js +112 -0
  234. package/dist/esm/arcgis-directions.entry.js +190 -0
  235. package/dist/esm/arcgis-directline-measurement-3d.entry.js +110 -0
  236. package/dist/esm/arcgis-distance-measurement-2d.entry.js +102 -0
  237. package/dist/esm/arcgis-editor.entry.js +176 -0
  238. package/dist/esm/arcgis-elevation-profile.entry.js +132 -0
  239. package/dist/esm/arcgis-feature-form.entry.js +32 -0
  240. package/dist/esm/arcgis-feature-table.entry.js +296 -0
  241. package/dist/esm/arcgis-feature-templates.entry.js +69 -0
  242. package/dist/esm/arcgis-feature.entry.js +102 -0
  243. package/dist/esm/arcgis-features.entry.js +129 -0
  244. package/dist/esm/arcgis-floor-filter.entry.js +130 -0
  245. package/dist/esm/arcgis-fullscreen.entry.js +88 -0
  246. package/dist/esm/arcgis-histogram-range-slider.entry.js +76 -0
  247. package/dist/esm/arcgis-histogram.entry.js +32 -0
  248. package/dist/esm/arcgis-home.entry.js +104 -0
  249. package/dist/esm/arcgis-layer-list.entry.js +124 -0
  250. package/dist/esm/arcgis-legend.entry.js +142 -0
  251. package/dist/esm/arcgis-line-of-sight.entry.js +90 -0
  252. package/dist/esm/arcgis-locate.entry.js +154 -0
  253. package/dist/esm/arcgis-map-components.js +18 -0
  254. package/dist/esm/arcgis-measurement.entry.js +119 -0
  255. package/dist/esm/arcgis-navigation-toggle.entry.js +93 -0
  256. package/dist/esm/arcgis-print.entry.js +159 -0
  257. package/dist/esm/arcgis-scale-bar.entry.js +102 -0
  258. package/dist/esm/arcgis-scale-range-slider.entry.js +142 -0
  259. package/dist/esm/arcgis-scene.entry.js +102 -0
  260. package/dist/esm/arcgis-search.entry.js +272 -0
  261. package/dist/esm/arcgis-shadow-cast.entry.js +91 -0
  262. package/dist/esm/arcgis-sketch.entry.js +197 -0
  263. package/dist/esm/arcgis-slice.entry.js +99 -0
  264. package/dist/esm/arcgis-slider.entry.js +229 -0
  265. package/dist/esm/arcgis-swipe.entry.js +113 -0
  266. package/dist/esm/arcgis-table-list.entry.js +114 -0
  267. package/dist/esm/arcgis-time-slider.entry.js +212 -0
  268. package/dist/esm/arcgis-track.entry.js +143 -0
  269. package/dist/esm/arcgis-utility-network-trace.entry.js +158 -0
  270. package/dist/esm/arcgis-value-picker.entry.js +156 -0
  271. package/dist/esm/arcgis-weather.entry.js +82 -0
  272. package/dist/esm/arcgis-zoom.entry.js +96 -0
  273. package/dist/esm/component-utils-d3552de2.js +73 -0
  274. package/dist/esm/disconnected-bc5fc8bc.js +52 -0
  275. package/dist/esm/index-ad26b6d0.js +638 -0
  276. package/dist/esm/index-eb3ead33.js +1579 -0
  277. package/dist/esm/index.js +1 -0
  278. package/dist/esm/loader.js +18 -0
  279. package/dist/esm/mapping-utils-26beb904.js +38 -0
  280. package/dist/esm/polyfills/core-js.js +11 -0
  281. package/dist/esm/polyfills/css-shim.js +1 -0
  282. package/dist/esm/polyfills/dom.js +79 -0
  283. package/dist/esm/polyfills/es5-html-element.js +1 -0
  284. package/dist/esm/polyfills/index.js +34 -0
  285. package/dist/esm/polyfills/system.js +6 -0
  286. package/dist/index.cjs.js +1 -0
  287. package/dist/index.js +1 -0
  288. package/dist/loader/cdn.js +3 -0
  289. package/dist/loader/index.cjs.js +3 -0
  290. package/dist/loader/index.d.ts +21 -0
  291. package/dist/loader/index.es2017.js +3 -0
  292. package/dist/loader/index.js +4 -0
  293. package/dist/loader/package.json +11 -0
  294. package/dist/types/components/arcgis-area-measurement-2d/arcgis-area-measurement-2d.d.ts +27 -0
  295. package/dist/types/components/arcgis-area-measurement-3d/arcgis-area-measurement-3d.d.ts +26 -0
  296. package/dist/types/components/arcgis-attachments/arcgis-attachments.d.ts +22 -0
  297. package/dist/types/components/arcgis-basemap-gallery/arcgis-basemap-gallery.d.ts +27 -0
  298. package/dist/types/components/arcgis-basemap-layer-list/arcgis-basemap-layer-list.d.ts +35 -0
  299. package/dist/types/components/arcgis-basemap-toggle/arcgis-basemap-toggle.d.ts +29 -0
  300. package/dist/types/components/arcgis-bookmarks/arcgis-bookmarks.d.ts +36 -0
  301. package/dist/types/components/arcgis-building-explorer/arcgis-building-explorer.d.ts +23 -0
  302. package/dist/types/components/arcgis-compass/arcgis-compass.d.ts +22 -0
  303. package/dist/types/components/arcgis-coordinate-conversion/arcgis-coordinate-conversion.d.ts +43 -0
  304. package/dist/types/components/arcgis-daylight/arcgis-daylight.d.ts +30 -0
  305. package/dist/types/components/arcgis-directions/arcgis-directions.d.ts +44 -0
  306. package/dist/types/components/arcgis-directline-measurement-3d/arcgis-directline-measurement-3d.d.ts +30 -0
  307. package/dist/types/components/arcgis-distance-measurement-2d/arcgis-distance-measurement-2d.d.ts +28 -0
  308. package/dist/types/components/arcgis-editor/arcgis-editor.d.ts +45 -0
  309. package/dist/types/components/arcgis-elevation-profile/arcgis-elevation-profile.d.ts +34 -0
  310. package/dist/types/components/arcgis-expand/arcgis-expand.d.ts +21 -0
  311. package/dist/types/components/arcgis-feature/arcgis-feature.d.ts +28 -0
  312. package/dist/types/components/arcgis-feature-form/arcgis-feature-form.d.ts +16 -0
  313. package/dist/types/components/arcgis-feature-table/arcgis-feature-table.d.ts +72 -0
  314. package/dist/types/components/arcgis-feature-templates/arcgis-feature-templates.d.ts +22 -0
  315. package/dist/types/components/arcgis-features/arcgis-features.d.ts +35 -0
  316. package/dist/types/components/arcgis-floor-filter/arcgis-floor-filter.d.ts +33 -0
  317. package/dist/types/components/arcgis-fullscreen/arcgis-fullscreen.d.ts +23 -0
  318. package/dist/types/components/arcgis-histogram/arcgis-histogram.d.ts +16 -0
  319. package/dist/types/components/arcgis-histogram-range-slider/arcgis-histogram-range-slider.d.ts +23 -0
  320. package/dist/types/components/arcgis-home/arcgis-home.d.ts +27 -0
  321. package/dist/types/components/arcgis-layer-list/arcgis-layer-list.d.ts +35 -0
  322. package/dist/types/components/arcgis-legend/arcgis-legend.d.ts +36 -0
  323. package/dist/types/components/arcgis-line-of-sight/arcgis-line-of-sight.d.ts +26 -0
  324. package/dist/types/components/arcgis-locate/arcgis-locate.d.ts +38 -0
  325. package/dist/types/components/arcgis-map/arcgis-map.d.ts +22 -0
  326. package/dist/types/components/arcgis-measurement/arcgis-measurement.d.ts +33 -0
  327. package/dist/types/components/arcgis-navigation-toggle/arcgis-navigation-toggle.d.ts +24 -0
  328. package/dist/types/components/arcgis-print/arcgis-print.d.ts +45 -0
  329. package/dist/types/components/arcgis-scale-bar/arcgis-scale-bar.d.ts +28 -0
  330. package/dist/types/components/arcgis-scale-range-slider/arcgis-scale-range-slider.d.ts +38 -0
  331. package/dist/types/components/arcgis-scene/arcgis-scene.d.ts +21 -0
  332. package/dist/types/components/arcgis-search/arcgis-search.d.ts +80 -0
  333. package/dist/types/components/arcgis-shadow-cast/arcgis-shadow-cast.d.ts +26 -0
  334. package/dist/types/components/arcgis-sketch/arcgis-sketch.d.ts +51 -0
  335. package/dist/types/components/arcgis-slice/arcgis-slice.d.ts +28 -0
  336. package/dist/types/components/arcgis-slider/arcgis-slider.d.ts +69 -0
  337. package/dist/types/components/arcgis-swipe/arcgis-swipe.d.ts +31 -0
  338. package/dist/types/components/arcgis-table-list/arcgis-table-list.d.ts +33 -0
  339. package/dist/types/components/arcgis-time-slider/arcgis-time-slider.d.ts +52 -0
  340. package/dist/types/components/arcgis-track/arcgis-track.d.ts +36 -0
  341. package/dist/types/components/arcgis-utility-network-trace/arcgis-utility-network-trace.d.ts +46 -0
  342. package/dist/types/components/arcgis-value-picker/arcgis-value-picker.d.ts +46 -0
  343. package/dist/types/components/arcgis-weather/arcgis-weather.d.ts +24 -0
  344. package/dist/types/components/arcgis-zoom/arcgis-zoom.d.ts +25 -0
  345. package/dist/types/components/types.d.ts +20 -0
  346. package/dist/types/components.d.ts +2053 -0
  347. package/dist/types/index.d.ts +1 -0
  348. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  349. package/dist/types/utils/component-utils.d.ts +22 -0
  350. package/dist/types/utils/disconnected.d.ts +2 -0
  351. package/dist/types/utils/expandable.d.ts +6 -0
  352. package/dist/types/utils/mapping-utils.d.ts +2 -0
  353. package/package.json +86 -0
  354. package/readme.md +17 -0
@@ -0,0 +1,1579 @@
1
+ const NAMESPACE = 'arcgis-map-components';
2
+
3
+ /**
4
+ * Virtual DOM patching algorithm based on Snabbdom by
5
+ * Simon Friis Vindum (@paldepind)
6
+ * Licensed under the MIT License
7
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
+ *
9
+ * Modified for Stencil's renderer and slot projection
10
+ */
11
+ let isSvgMode = false;
12
+ let queuePending = false;
13
+ const createTime = (fnName, tagName = '') => {
14
+ {
15
+ return () => {
16
+ return;
17
+ };
18
+ }
19
+ };
20
+ const uniqueTime = (key, measureText) => {
21
+ {
22
+ return () => {
23
+ return;
24
+ };
25
+ }
26
+ };
27
+ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
28
+ /**
29
+ * Default style mode id
30
+ */
31
+ /**
32
+ * Reusable empty obj/array
33
+ * Don't add values to these!!
34
+ */
35
+ const EMPTY_OBJ = {};
36
+ const isComplexType = (o) => {
37
+ // https://jsperf.com/typeof-fn-object/5
38
+ o = typeof o;
39
+ return o === 'object' || o === 'function';
40
+ };
41
+ /**
42
+ * Helper method for querying a `meta` tag that contains a nonce value
43
+ * out of a DOM's head.
44
+ *
45
+ * @param doc The DOM containing the `head` to query against
46
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
47
+ * exists or the tag has no content.
48
+ */
49
+ function queryNonceMetaTagContent(doc) {
50
+ var _a, _b, _c;
51
+ 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;
52
+ }
53
+ /**
54
+ * Production h() function based on Preact by
55
+ * Jason Miller (@developit)
56
+ * Licensed under the MIT License
57
+ * https://github.com/developit/preact/blob/master/LICENSE
58
+ *
59
+ * Modified for Stencil's compiler and vdom
60
+ */
61
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
62
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
63
+ const h = (nodeName, vnodeData, ...children) => {
64
+ let child = null;
65
+ let simple = false;
66
+ let lastSimple = false;
67
+ const vNodeChildren = [];
68
+ const walk = (c) => {
69
+ for (let i = 0; i < c.length; i++) {
70
+ child = c[i];
71
+ if (Array.isArray(child)) {
72
+ walk(child);
73
+ }
74
+ else if (child != null && typeof child !== 'boolean') {
75
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
76
+ child = String(child);
77
+ }
78
+ if (simple && lastSimple) {
79
+ // If the previous child was simple (string), we merge both
80
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
81
+ }
82
+ else {
83
+ // Append a new vNode, if it's text, we create a text vNode
84
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
85
+ }
86
+ lastSimple = simple;
87
+ }
88
+ }
89
+ };
90
+ walk(children);
91
+ if (vnodeData) {
92
+ {
93
+ const classData = vnodeData.className || vnodeData.class;
94
+ if (classData) {
95
+ vnodeData.class =
96
+ typeof classData !== 'object'
97
+ ? classData
98
+ : Object.keys(classData)
99
+ .filter((k) => classData[k])
100
+ .join(' ');
101
+ }
102
+ }
103
+ }
104
+ const vnode = newVNode(nodeName, null);
105
+ vnode.$attrs$ = vnodeData;
106
+ if (vNodeChildren.length > 0) {
107
+ vnode.$children$ = vNodeChildren;
108
+ }
109
+ return vnode;
110
+ };
111
+ /**
112
+ * A utility function for creating a virtual DOM node from a tag and some
113
+ * possible text content.
114
+ *
115
+ * @param tag the tag for this element
116
+ * @param text possible text content for the node
117
+ * @returns a newly-minted virtual DOM node
118
+ */
119
+ const newVNode = (tag, text) => {
120
+ const vnode = {
121
+ $flags$: 0,
122
+ $tag$: tag,
123
+ $text$: text,
124
+ $elm$: null,
125
+ $children$: null,
126
+ };
127
+ {
128
+ vnode.$attrs$ = null;
129
+ }
130
+ return vnode;
131
+ };
132
+ const Host = {};
133
+ /**
134
+ * Check whether a given node is a Host node or not
135
+ *
136
+ * @param node the virtual DOM node to check
137
+ * @returns whether it's a Host node or not
138
+ */
139
+ const isHost = (node) => node && node.$tag$ === Host;
140
+ /**
141
+ * Parse a new property value for a given property type.
142
+ *
143
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
144
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
145
+ * 1. `any`, the type given to `propValue` in the function signature
146
+ * 2. the type stored from `propType`.
147
+ *
148
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
149
+ *
150
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
151
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
152
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
153
+ * ```tsx
154
+ * <my-cmp prop-val={0}></my-cmp>
155
+ * ```
156
+ *
157
+ * HTML prop values on the other hand, will always a string
158
+ *
159
+ * @param propValue the new value to coerce to some type
160
+ * @param propType the type of the prop, expressed as a binary number
161
+ * @returns the parsed/coerced value
162
+ */
163
+ const parsePropertyValue = (propValue, propType) => {
164
+ // ensure this value is of the correct prop type
165
+ if (propValue != null && !isComplexType(propValue)) {
166
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
167
+ // per the HTML spec, any string value means it is a boolean true value
168
+ // but we'll cheat here and say that the string "false" is the boolean false
169
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
170
+ }
171
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
172
+ // force it to be a number
173
+ return parseFloat(propValue);
174
+ }
175
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
176
+ // could have been passed as a number or boolean
177
+ // but we still want it as a string
178
+ return String(propValue);
179
+ }
180
+ // redundant return here for better minification
181
+ return propValue;
182
+ }
183
+ // not sure exactly what type we want
184
+ // so no need to change to a different type
185
+ return propValue;
186
+ };
187
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
188
+ const createEvent = (ref, name, flags) => {
189
+ const elm = getElement(ref);
190
+ return {
191
+ emit: (detail) => {
192
+ return emitEvent(elm, name, {
193
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
194
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
195
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
196
+ detail,
197
+ });
198
+ },
199
+ };
200
+ };
201
+ /**
202
+ * Helper function to create & dispatch a custom Event on a provided target
203
+ * @param elm the target of the Event
204
+ * @param name the name to give the custom Event
205
+ * @param opts options for configuring a custom Event
206
+ * @returns the custom Event
207
+ */
208
+ const emitEvent = (elm, name, opts) => {
209
+ const ev = plt.ce(name, opts);
210
+ elm.dispatchEvent(ev);
211
+ return ev;
212
+ };
213
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
214
+ const registerStyle = (scopeId, cssText, allowCS) => {
215
+ let style = styles.get(scopeId);
216
+ if (supportsConstructableStylesheets && allowCS) {
217
+ style = (style || new CSSStyleSheet());
218
+ if (typeof style === 'string') {
219
+ style = cssText;
220
+ }
221
+ else {
222
+ style.replaceSync(cssText);
223
+ }
224
+ }
225
+ else {
226
+ style = cssText;
227
+ }
228
+ styles.set(scopeId, style);
229
+ };
230
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
231
+ var _a;
232
+ let scopeId = getScopeId(cmpMeta);
233
+ const style = styles.get(scopeId);
234
+ // if an element is NOT connected then getRootNode() will return the wrong root node
235
+ // so the fallback is to always use the document for the root node in those cases
236
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
237
+ if (style) {
238
+ if (typeof style === 'string') {
239
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
240
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
241
+ let styleElm;
242
+ if (!appliedStyles) {
243
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
244
+ }
245
+ if (!appliedStyles.has(scopeId)) {
246
+ {
247
+ {
248
+ styleElm = doc.createElement('style');
249
+ styleElm.innerHTML = style;
250
+ }
251
+ // Apply CSP nonce to the style tag if it exists
252
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
253
+ if (nonce != null) {
254
+ styleElm.setAttribute('nonce', nonce);
255
+ }
256
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
257
+ }
258
+ if (appliedStyles) {
259
+ appliedStyles.add(scopeId);
260
+ }
261
+ }
262
+ }
263
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
264
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
265
+ }
266
+ }
267
+ return scopeId;
268
+ };
269
+ const attachStyles = (hostRef) => {
270
+ const cmpMeta = hostRef.$cmpMeta$;
271
+ const elm = hostRef.$hostElement$;
272
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
273
+ addStyle(elm.getRootNode(), cmpMeta);
274
+ endAttachStyles();
275
+ };
276
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
277
+ /**
278
+ * Production setAccessor() function based on Preact by
279
+ * Jason Miller (@developit)
280
+ * Licensed under the MIT License
281
+ * https://github.com/developit/preact/blob/master/LICENSE
282
+ *
283
+ * Modified for Stencil's compiler and vdom
284
+ */
285
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
286
+ if (oldValue !== newValue) {
287
+ let isProp = isMemberInElement(elm, memberName);
288
+ memberName.toLowerCase();
289
+ if (memberName === 'class') {
290
+ const classList = elm.classList;
291
+ const oldClasses = parseClassList(oldValue);
292
+ const newClasses = parseClassList(newValue);
293
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
294
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
295
+ }
296
+ else if (memberName === 'ref') {
297
+ // minifier will clean this up
298
+ if (newValue) {
299
+ newValue(elm);
300
+ }
301
+ }
302
+ else {
303
+ // Set property if it exists and it's not a SVG
304
+ const isComplex = isComplexType(newValue);
305
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
306
+ try {
307
+ if (!elm.tagName.includes('-')) {
308
+ const n = newValue == null ? '' : newValue;
309
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
310
+ if (memberName === 'list') {
311
+ isProp = false;
312
+ }
313
+ else if (oldValue == null || elm[memberName] != n) {
314
+ elm[memberName] = n;
315
+ }
316
+ }
317
+ else {
318
+ elm[memberName] = newValue;
319
+ }
320
+ }
321
+ catch (e) { }
322
+ }
323
+ if (newValue == null || newValue === false) {
324
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
325
+ {
326
+ elm.removeAttribute(memberName);
327
+ }
328
+ }
329
+ }
330
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
331
+ newValue = newValue === true ? '' : newValue;
332
+ {
333
+ elm.setAttribute(memberName, newValue);
334
+ }
335
+ }
336
+ }
337
+ }
338
+ };
339
+ const parseClassListRegex = /\s/;
340
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
341
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
342
+ // if the element passed in is a shadow root, which is a document fragment
343
+ // then we want to be adding attrs/props to the shadow root's "host" element
344
+ // if it's not a shadow root, then we add attrs/props to the same element
345
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
346
+ ? newVnode.$elm$.host
347
+ : newVnode.$elm$;
348
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
349
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
350
+ {
351
+ // remove attributes no longer present on the vnode by setting them to undefined
352
+ for (memberName in oldVnodeAttrs) {
353
+ if (!(memberName in newVnodeAttrs)) {
354
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
355
+ }
356
+ }
357
+ }
358
+ // add new & update changed attributes
359
+ for (memberName in newVnodeAttrs) {
360
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
361
+ }
362
+ };
363
+ /**
364
+ * Create a DOM Node corresponding to one of the children of a given VNode.
365
+ *
366
+ * @param oldParentVNode the parent VNode from the previous render
367
+ * @param newParentVNode the parent VNode from the current render
368
+ * @param childIndex the index of the VNode, in the _new_ parent node's
369
+ * children, for which we will create a new DOM node
370
+ * @param parentElm the parent DOM node which our new node will be a child of
371
+ * @returns the newly created node
372
+ */
373
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
374
+ // tslint:disable-next-line: prefer-const
375
+ const newVNode = newParentVNode.$children$[childIndex];
376
+ let i = 0;
377
+ let elm;
378
+ let childNode;
379
+ {
380
+ // create element
381
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
382
+ // add css classes, attrs, props, listeners, etc.
383
+ {
384
+ updateElement(null, newVNode, isSvgMode);
385
+ }
386
+ if (newVNode.$children$) {
387
+ for (i = 0; i < newVNode.$children$.length; ++i) {
388
+ // create the node
389
+ childNode = createElm(oldParentVNode, newVNode, i);
390
+ // return node could have been null
391
+ if (childNode) {
392
+ // append our new node
393
+ elm.appendChild(childNode);
394
+ }
395
+ }
396
+ }
397
+ }
398
+ return elm;
399
+ };
400
+ /**
401
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
402
+ * add them to the DOM in the appropriate place.
403
+ *
404
+ * @param parentElm the DOM node which should be used as a parent for the new
405
+ * DOM nodes
406
+ * @param before a child of the `parentElm` which the new children should be
407
+ * inserted before (optional)
408
+ * @param parentVNode the parent virtual DOM node
409
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
410
+ * @param startIdx the index in the child virtual DOM nodes at which to start
411
+ * creating DOM nodes (inclusive)
412
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
413
+ * creating DOM nodes (inclusive)
414
+ */
415
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
416
+ let containerElm = (parentElm);
417
+ let childNode;
418
+ for (; startIdx <= endIdx; ++startIdx) {
419
+ if (vnodes[startIdx]) {
420
+ childNode = createElm(null, parentVNode, startIdx);
421
+ if (childNode) {
422
+ vnodes[startIdx].$elm$ = childNode;
423
+ containerElm.insertBefore(childNode, before);
424
+ }
425
+ }
426
+ }
427
+ };
428
+ /**
429
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
430
+ * This can be used to, for instance, clean up after a list of children which
431
+ * should no longer be shown.
432
+ *
433
+ * This function also handles some of Stencil's slot relocation logic.
434
+ *
435
+ * @param vnodes a list of virtual DOM nodes to remove
436
+ * @param startIdx the index at which to start removing nodes (inclusive)
437
+ * @param endIdx the index at which to stop removing nodes (inclusive)
438
+ * @param vnode a VNode
439
+ * @param elm an element
440
+ */
441
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
442
+ for (; startIdx <= endIdx; ++startIdx) {
443
+ if ((vnode = vnodes[startIdx])) {
444
+ elm = vnode.$elm$;
445
+ callNodeRefs(vnode);
446
+ // remove the vnode's element from the dom
447
+ elm.remove();
448
+ }
449
+ }
450
+ };
451
+ /**
452
+ * Reconcile the children of a new VNode with the children of an old VNode by
453
+ * traversing the two collections of children, identifying nodes that are
454
+ * conserved or changed, calling out to `patch` to make any necessary
455
+ * updates to the DOM, and rearranging DOM nodes as needed.
456
+ *
457
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
458
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
459
+ * 'windows' by storing start and end indices and references to the
460
+ * corresponding array entries. Initially the two 'windows' are basically equal
461
+ * to the entire array, but we progressively narrow the windows until there are
462
+ * no children left to update by doing the following:
463
+ *
464
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
465
+ * that if we have an initial array like the following we'll end up dealing
466
+ * only with a window bounded by the highlighted elements:
467
+ *
468
+ * [null, null, VNode1 , ... , VNode2, null, null]
469
+ * ^^^^^^ ^^^^^^
470
+ *
471
+ * 2. Check to see if the elements at the head and tail positions are equal
472
+ * across the windows. This will basically detect elements which haven't
473
+ * been added, removed, or changed position, i.e. if you had the following
474
+ * VNode elements (represented as HTML):
475
+ *
476
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
477
+ * newVNode: `<div><p><span>THERE</span></p></div>`
478
+ *
479
+ * Then when comparing the children of the `<div>` tag we check the equality
480
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
481
+ * same tag in the same position, we'd be able to avoid completely
482
+ * re-rendering the subtree under them with a new DOM element and would just
483
+ * call out to `patch` to handle reconciling their children and so on.
484
+ *
485
+ * 3. Check, for both windows, to see if the element at the beginning of the
486
+ * window corresponds to the element at the end of the other window. This is
487
+ * a heuristic which will let us identify _some_ situations in which
488
+ * elements have changed position, for instance it _should_ detect that the
489
+ * children nodes themselves have not changed but merely moved in the
490
+ * following example:
491
+ *
492
+ * oldVNode: `<div><element-one /><element-two /></div>`
493
+ * newVNode: `<div><element-two /><element-one /></div>`
494
+ *
495
+ * If we find cases like this then we also need to move the concrete DOM
496
+ * elements corresponding to the moved children to write the re-order to the
497
+ * DOM.
498
+ *
499
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
500
+ * nodes in the old children which have the same key as the first element in
501
+ * our window on the new children. If we find such a node we handle calling
502
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
503
+ * what we find.
504
+ *
505
+ * Finally, once we've narrowed our 'windows' to the point that either of them
506
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
507
+ * insertion or deletion that needs to happen to get a DOM state that correctly
508
+ * reflects the new child VNodes. If, for instance, after our window on the old
509
+ * children has collapsed we still have more nodes on the new children that
510
+ * we haven't dealt with yet then we need to add them, or if the new children
511
+ * collapse but we still have unhandled _old_ children then we need to make
512
+ * sure the corresponding DOM nodes are removed.
513
+ *
514
+ * @param parentElm the node into which the parent VNode is rendered
515
+ * @param oldCh the old children of the parent node
516
+ * @param newVNode the new VNode which will replace the parent
517
+ * @param newCh the new children of the parent node
518
+ */
519
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
520
+ let oldStartIdx = 0;
521
+ let newStartIdx = 0;
522
+ let oldEndIdx = oldCh.length - 1;
523
+ let oldStartVnode = oldCh[0];
524
+ let oldEndVnode = oldCh[oldEndIdx];
525
+ let newEndIdx = newCh.length - 1;
526
+ let newStartVnode = newCh[0];
527
+ let newEndVnode = newCh[newEndIdx];
528
+ let node;
529
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
530
+ if (oldStartVnode == null) {
531
+ // VNode might have been moved left
532
+ oldStartVnode = oldCh[++oldStartIdx];
533
+ }
534
+ else if (oldEndVnode == null) {
535
+ oldEndVnode = oldCh[--oldEndIdx];
536
+ }
537
+ else if (newStartVnode == null) {
538
+ newStartVnode = newCh[++newStartIdx];
539
+ }
540
+ else if (newEndVnode == null) {
541
+ newEndVnode = newCh[--newEndIdx];
542
+ }
543
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
544
+ // if the start nodes are the same then we should patch the new VNode
545
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
546
+ // indices to reflect that. We don't need to move any DOM Nodes around
547
+ // since things are matched up in order.
548
+ patch(oldStartVnode, newStartVnode);
549
+ oldStartVnode = oldCh[++oldStartIdx];
550
+ newStartVnode = newCh[++newStartIdx];
551
+ }
552
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
553
+ // likewise, if the end nodes are the same we patch new onto old and
554
+ // decrement our end indices, and also likewise in this case we don't
555
+ // need to move any DOM Nodes.
556
+ patch(oldEndVnode, newEndVnode);
557
+ oldEndVnode = oldCh[--oldEndIdx];
558
+ newEndVnode = newCh[--newEndIdx];
559
+ }
560
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
561
+ patch(oldStartVnode, newEndVnode);
562
+ // We need to move the element for `oldStartVnode` into a position which
563
+ // will be appropriate for `newEndVnode`. For this we can use
564
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
565
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
566
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
567
+ //
568
+ // <old-start-node />
569
+ // <some-intervening-node />
570
+ // <old-end-node />
571
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
572
+ // <next-sibling />
573
+ //
574
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
575
+ // the node for `oldStartVnode` at the end of the children of
576
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
577
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
578
+ // append it to the children of the parent element.
579
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
580
+ oldStartVnode = oldCh[++oldStartIdx];
581
+ newEndVnode = newCh[--newEndIdx];
582
+ }
583
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
584
+ patch(oldEndVnode, newStartVnode);
585
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
586
+ // the same node, so since we're here we know that they are not. Thus we
587
+ // can move the element for `oldEndVnode` _before_ the element for
588
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
589
+ // future.
590
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
591
+ oldEndVnode = oldCh[--oldEndIdx];
592
+ newStartVnode = newCh[++newStartIdx];
593
+ }
594
+ else {
595
+ {
596
+ // We either didn't find an element in the old children that matches
597
+ // the key of the first new child OR the build is not using `key`
598
+ // attributes at all. In either case we need to create a new element
599
+ // for the new node.
600
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
601
+ newStartVnode = newCh[++newStartIdx];
602
+ }
603
+ if (node) {
604
+ // if we created a new node then handle inserting it to the DOM
605
+ {
606
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
607
+ }
608
+ }
609
+ }
610
+ }
611
+ if (oldStartIdx > oldEndIdx) {
612
+ // we have some more new nodes to add which don't match up with old nodes
613
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
614
+ }
615
+ else if (newStartIdx > newEndIdx) {
616
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
617
+ // in the new array, so lets remove them (which entails cleaning up the
618
+ // relevant DOM nodes)
619
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
620
+ }
621
+ };
622
+ /**
623
+ * Compare two VNodes to determine if they are the same
624
+ *
625
+ * **NB**: This function is an equality _heuristic_ based on the available
626
+ * information set on the two VNodes and can be misleading under certain
627
+ * circumstances. In particular, if the two nodes do not have `key` attrs
628
+ * (available under `$key$` on VNodes) then the function falls back on merely
629
+ * checking that they have the same tag.
630
+ *
631
+ * So, in other words, if `key` attrs are not set on VNodes which may be
632
+ * changing order within a `children` array or something along those lines then
633
+ * we could obtain a false negative and then have to do needless re-rendering
634
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
635
+ *
636
+ * @param leftVNode the first VNode to check
637
+ * @param rightVNode the second VNode to check
638
+ * @returns whether they're equal or not
639
+ */
640
+ const isSameVnode = (leftVNode, rightVNode) => {
641
+ // compare if two vnode to see if they're "technically" the same
642
+ // need to have the same element tag, and same key to be the same
643
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
644
+ return true;
645
+ }
646
+ return false;
647
+ };
648
+ /**
649
+ * Handle reconciling an outdated VNode with a new one which corresponds to
650
+ * it. This function handles flushing updates to the DOM and reconciling the
651
+ * children of the two nodes (if any).
652
+ *
653
+ * @param oldVNode an old VNode whose DOM element and children we want to update
654
+ * @param newVNode a new VNode representing an updated version of the old one
655
+ */
656
+ const patch = (oldVNode, newVNode) => {
657
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
658
+ const oldChildren = oldVNode.$children$;
659
+ const newChildren = newVNode.$children$;
660
+ {
661
+ {
662
+ {
663
+ // either this is the first render of an element OR it's an update
664
+ // AND we already know it's possible it could have changed
665
+ // this updates the element's css classes, attrs, props, listeners, etc.
666
+ updateElement(oldVNode, newVNode, isSvgMode);
667
+ }
668
+ }
669
+ if (oldChildren !== null && newChildren !== null) {
670
+ // looks like there's child vnodes for both the old and new vnodes
671
+ // so we need to call `updateChildren` to reconcile them
672
+ updateChildren(elm, oldChildren, newVNode, newChildren);
673
+ }
674
+ else if (newChildren !== null) {
675
+ // add the new vnode children
676
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
677
+ }
678
+ else if (oldChildren !== null) {
679
+ // no new child vnodes, but there are old child vnodes to remove
680
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
681
+ }
682
+ }
683
+ };
684
+ const callNodeRefs = (vNode) => {
685
+ {
686
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
687
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
688
+ }
689
+ };
690
+ /**
691
+ * The main entry point for Stencil's virtual DOM-based rendering engine
692
+ *
693
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
694
+ * function will handle creating a virtual DOM tree with a single root, patching
695
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
696
+ * relocation, and reflecting attributes.
697
+ *
698
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
699
+ * the DOM node into which it should be rendered.
700
+ * @param renderFnResults the virtual DOM nodes to be rendered
701
+ */
702
+ const renderVdom = (hostRef, renderFnResults) => {
703
+ const hostElm = hostRef.$hostElement$;
704
+ const cmpMeta = hostRef.$cmpMeta$;
705
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
706
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
707
+ if (cmpMeta.$attrsToReflect$) {
708
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
709
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
710
+ }
711
+ rootVnode.$tag$ = null;
712
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
713
+ hostRef.$vnode$ = rootVnode;
714
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
715
+ // synchronous patch
716
+ patch(oldVNode, rootVnode);
717
+ };
718
+ const attachToAncestor = (hostRef, ancestorComponent) => {
719
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
720
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
721
+ }
722
+ };
723
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
724
+ {
725
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
726
+ }
727
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
728
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
729
+ return;
730
+ }
731
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
732
+ // there is no ancestor component or the ancestor component
733
+ // has already fired off its lifecycle update then
734
+ // fire off the initial update
735
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
736
+ return writeTask(dispatch) ;
737
+ };
738
+ const dispatchHooks = (hostRef, isInitialLoad) => {
739
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
740
+ const instance = hostRef.$lazyInstance$ ;
741
+ let promise;
742
+ if (isInitialLoad) {
743
+ {
744
+ promise = safeCall(instance, 'componentWillLoad');
745
+ }
746
+ }
747
+ endSchedule();
748
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
749
+ };
750
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
751
+ // updateComponent
752
+ const elm = hostRef.$hostElement$;
753
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
754
+ const rc = elm['s-rc'];
755
+ if (isInitialLoad) {
756
+ // DOM WRITE!
757
+ attachStyles(hostRef);
758
+ }
759
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
760
+ {
761
+ callRender(hostRef, instance);
762
+ }
763
+ if (rc) {
764
+ // ok, so turns out there are some child host elements
765
+ // waiting on this parent element to load
766
+ // let's fire off all update callbacks waiting
767
+ rc.map((cb) => cb());
768
+ elm['s-rc'] = undefined;
769
+ }
770
+ endRender();
771
+ endUpdate();
772
+ {
773
+ const childrenPromises = elm['s-p'];
774
+ const postUpdate = () => postUpdateComponent(hostRef);
775
+ if (childrenPromises.length === 0) {
776
+ postUpdate();
777
+ }
778
+ else {
779
+ Promise.all(childrenPromises).then(postUpdate);
780
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
781
+ childrenPromises.length = 0;
782
+ }
783
+ }
784
+ };
785
+ const callRender = (hostRef, instance, elm) => {
786
+ try {
787
+ instance = instance.render && instance.render();
788
+ {
789
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
790
+ }
791
+ {
792
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
793
+ }
794
+ {
795
+ {
796
+ // looks like we've got child nodes to render into this host element
797
+ // or we need to update the css class/attrs on the host element
798
+ // DOM WRITE!
799
+ {
800
+ renderVdom(hostRef, instance);
801
+ }
802
+ }
803
+ }
804
+ }
805
+ catch (e) {
806
+ consoleError(e, hostRef.$hostElement$);
807
+ }
808
+ return null;
809
+ };
810
+ const postUpdateComponent = (hostRef) => {
811
+ const tagName = hostRef.$cmpMeta$.$tagName$;
812
+ const elm = hostRef.$hostElement$;
813
+ const endPostUpdate = createTime('postUpdate', tagName);
814
+ const instance = hostRef.$lazyInstance$ ;
815
+ const ancestorComponent = hostRef.$ancestorComponent$;
816
+ {
817
+ safeCall(instance, 'componentDidRender');
818
+ }
819
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
820
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
821
+ {
822
+ // DOM WRITE!
823
+ addHydratedFlag(elm);
824
+ }
825
+ {
826
+ safeCall(instance, 'componentDidLoad');
827
+ }
828
+ endPostUpdate();
829
+ {
830
+ hostRef.$onReadyResolve$(elm);
831
+ if (!ancestorComponent) {
832
+ appDidLoad();
833
+ }
834
+ }
835
+ }
836
+ else {
837
+ endPostUpdate();
838
+ }
839
+ {
840
+ hostRef.$onInstanceResolve$(elm);
841
+ }
842
+ // load events fire from bottom to top
843
+ // the deepest elements load first then bubbles up
844
+ {
845
+ if (hostRef.$onRenderResolve$) {
846
+ hostRef.$onRenderResolve$();
847
+ hostRef.$onRenderResolve$ = undefined;
848
+ }
849
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
850
+ nextTick(() => scheduleUpdate(hostRef, false));
851
+ }
852
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
853
+ }
854
+ // ( •_•)
855
+ // ( •_•)>⌐■-■
856
+ // (⌐■_■)
857
+ };
858
+ const appDidLoad = (who) => {
859
+ // on appload
860
+ // we have finish the first big initial render
861
+ {
862
+ addHydratedFlag(doc.documentElement);
863
+ }
864
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
865
+ };
866
+ const safeCall = (instance, method, arg) => {
867
+ if (instance && instance[method]) {
868
+ try {
869
+ return instance[method](arg);
870
+ }
871
+ catch (e) {
872
+ consoleError(e);
873
+ }
874
+ }
875
+ return undefined;
876
+ };
877
+ const then = (promise, thenFn) => {
878
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
879
+ };
880
+ const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
881
+ ;
882
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
883
+ const setValue = (ref, propName, newVal, cmpMeta) => {
884
+ // check our new property value against our internal value
885
+ const hostRef = getHostRef(ref);
886
+ const elm = hostRef.$hostElement$ ;
887
+ const oldVal = hostRef.$instanceValues$.get(propName);
888
+ const flags = hostRef.$flags$;
889
+ const instance = hostRef.$lazyInstance$ ;
890
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
891
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
892
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
893
+ const didValueChange = newVal !== oldVal && !areBothNaN;
894
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
895
+ // gadzooks! the property's value has changed!!
896
+ // set our new value!
897
+ hostRef.$instanceValues$.set(propName, newVal);
898
+ if (instance) {
899
+ // get an array of method names of watch functions to call
900
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
901
+ const watchMethods = cmpMeta.$watchers$[propName];
902
+ if (watchMethods) {
903
+ // this instance is watching for when this property changed
904
+ watchMethods.map((watchMethodName) => {
905
+ try {
906
+ // fire off each of the watch methods that are watching this property
907
+ instance[watchMethodName](newVal, oldVal, propName);
908
+ }
909
+ catch (e) {
910
+ consoleError(e, elm);
911
+ }
912
+ });
913
+ }
914
+ }
915
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
916
+ // looks like this value actually changed, so we've got work to do!
917
+ // but only if we've already rendered, otherwise just chill out
918
+ // queue that we need to do an update, but don't worry about queuing
919
+ // up millions cuz this function ensures it only runs once
920
+ scheduleUpdate(hostRef, false);
921
+ }
922
+ }
923
+ }
924
+ };
925
+ /**
926
+ * Attach a series of runtime constructs to a compiled Stencil component
927
+ * constructor, including getters and setters for the `@Prop` and `@State`
928
+ * decorators, callbacks for when attributes change, and so on.
929
+ *
930
+ * @param Cstr the constructor for a component that we need to process
931
+ * @param cmpMeta metadata collected previously about the component
932
+ * @param flags a number used to store a series of bit flags
933
+ * @returns a reference to the same constructor passed in (but now mutated)
934
+ */
935
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
936
+ if (cmpMeta.$members$) {
937
+ if (Cstr.watchers) {
938
+ cmpMeta.$watchers$ = Cstr.watchers;
939
+ }
940
+ // It's better to have a const than two Object.entries()
941
+ const members = Object.entries(cmpMeta.$members$);
942
+ const prototype = Cstr.prototype;
943
+ members.map(([memberName, [memberFlags]]) => {
944
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
945
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
946
+ // proxyComponent - prop
947
+ Object.defineProperty(prototype, memberName, {
948
+ get() {
949
+ // proxyComponent, get value
950
+ return getValue(this, memberName);
951
+ },
952
+ set(newValue) {
953
+ // proxyComponent, set value
954
+ setValue(this, memberName, newValue, cmpMeta);
955
+ },
956
+ configurable: true,
957
+ enumerable: true,
958
+ });
959
+ }
960
+ else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
961
+ memberFlags & 64 /* MEMBER_FLAGS.Method */) {
962
+ // proxyComponent - method
963
+ Object.defineProperty(prototype, memberName, {
964
+ value(...args) {
965
+ const ref = getHostRef(this);
966
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
967
+ },
968
+ });
969
+ }
970
+ });
971
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
972
+ const attrNameToPropName = new Map();
973
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
974
+ plt.jmp(() => {
975
+ const propName = attrNameToPropName.get(attrName);
976
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
977
+ // in the case where an attribute was set inline.
978
+ // ```html
979
+ // <my-component some-attribute="some-value"></my-component>
980
+ // ```
981
+ //
982
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
983
+ // programmatically changes it before it has been upgraded as shown below:
984
+ //
985
+ // ```html
986
+ // <!-- this component has _not_ been upgraded yet -->
987
+ // <my-component id="test" some-attribute="some-value"></my-component>
988
+ // <script>
989
+ // // grab non-upgraded component
990
+ // el = document.querySelector("#test");
991
+ // el.someAttribute = "another-value";
992
+ // // upgrade component
993
+ // customElements.define('my-component', MyComponent);
994
+ // </script>
995
+ // ```
996
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
997
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
998
+ // to the value that was set inline i.e. "some-value" from above example. When
999
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1000
+ //
1001
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1002
+ // by connectedCallback as this attributeChangedCallback will not fire.
1003
+ //
1004
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1005
+ //
1006
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1007
+ // properties here given that this goes against best practices outlined here
1008
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1009
+ if (this.hasOwnProperty(propName)) {
1010
+ newValue = this[propName];
1011
+ delete this[propName];
1012
+ }
1013
+ else if (prototype.hasOwnProperty(propName) &&
1014
+ typeof this[propName] === 'number' &&
1015
+ this[propName] == newValue) {
1016
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1017
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1018
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1019
+ return;
1020
+ }
1021
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1022
+ });
1023
+ };
1024
+ // create an array of attributes to observe
1025
+ // and also create a map of html attribute name to js property name
1026
+ Cstr.observedAttributes = members
1027
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1028
+ .map(([propName, m]) => {
1029
+ const attrName = m[1] || propName;
1030
+ attrNameToPropName.set(attrName, propName);
1031
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1032
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1033
+ }
1034
+ return attrName;
1035
+ });
1036
+ }
1037
+ }
1038
+ return Cstr;
1039
+ };
1040
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1041
+ // initializeComponent
1042
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1043
+ {
1044
+ // we haven't initialized this element yet
1045
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1046
+ // lazy loaded components
1047
+ // request the component's implementation to be
1048
+ // wired up with the host element
1049
+ Cstr = loadModule(cmpMeta);
1050
+ if (Cstr.then) {
1051
+ // Await creates a micro-task avoid if possible
1052
+ const endLoad = uniqueTime();
1053
+ Cstr = await Cstr;
1054
+ endLoad();
1055
+ }
1056
+ if (!Cstr.isProxied) {
1057
+ // we've never proxied this Constructor before
1058
+ // let's add the getters/setters to its prototype before
1059
+ // the first time we create an instance of the implementation
1060
+ {
1061
+ cmpMeta.$watchers$ = Cstr.watchers;
1062
+ }
1063
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1064
+ Cstr.isProxied = true;
1065
+ }
1066
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1067
+ // ok, time to construct the instance
1068
+ // but let's keep track of when we start and stop
1069
+ // so that the getters/setters don't incorrectly step on data
1070
+ {
1071
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1072
+ }
1073
+ // construct the lazy-loaded component implementation
1074
+ // passing the hostRef is very important during
1075
+ // construction in order to directly wire together the
1076
+ // host element and the lazy-loaded instance
1077
+ try {
1078
+ new Cstr(hostRef);
1079
+ }
1080
+ catch (e) {
1081
+ consoleError(e);
1082
+ }
1083
+ {
1084
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1085
+ }
1086
+ {
1087
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1088
+ }
1089
+ endNewInstance();
1090
+ }
1091
+ if (Cstr.style) {
1092
+ // this component has styles but we haven't registered them yet
1093
+ let style = Cstr.style;
1094
+ const scopeId = getScopeId(cmpMeta);
1095
+ if (!styles.has(scopeId)) {
1096
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1097
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1098
+ endRegisterStyles();
1099
+ }
1100
+ }
1101
+ }
1102
+ // we've successfully created a lazy instance
1103
+ const ancestorComponent = hostRef.$ancestorComponent$;
1104
+ const schedule = () => scheduleUpdate(hostRef, true);
1105
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1106
+ // this is the initial load and this component it has an ancestor component
1107
+ // but the ancestor component has NOT fired its will update lifecycle yet
1108
+ // so let's just cool our jets and wait for the ancestor to continue first
1109
+ // this will get fired off when the ancestor component
1110
+ // finally gets around to rendering its lazy self
1111
+ // fire off the initial update
1112
+ ancestorComponent['s-rc'].push(schedule);
1113
+ }
1114
+ else {
1115
+ schedule();
1116
+ }
1117
+ };
1118
+ const connectedCallback = (elm) => {
1119
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1120
+ const hostRef = getHostRef(elm);
1121
+ const cmpMeta = hostRef.$cmpMeta$;
1122
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1123
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1124
+ // first time this component has connected
1125
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1126
+ {
1127
+ // find the first ancestor component (if there is one) and register
1128
+ // this component as one of the actively loading child components for its ancestor
1129
+ let ancestorComponent = elm;
1130
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1131
+ // climb up the ancestors looking for the first
1132
+ // component that hasn't finished its lifecycle update yet
1133
+ if (ancestorComponent['s-p']) {
1134
+ // we found this components first ancestor component
1135
+ // keep a reference to this component's ancestor component
1136
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1137
+ break;
1138
+ }
1139
+ }
1140
+ }
1141
+ // Lazy properties
1142
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1143
+ if (cmpMeta.$members$) {
1144
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1145
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1146
+ const value = elm[memberName];
1147
+ delete elm[memberName];
1148
+ elm[memberName] = value;
1149
+ }
1150
+ });
1151
+ }
1152
+ {
1153
+ initializeComponent(elm, hostRef, cmpMeta);
1154
+ }
1155
+ }
1156
+ endConnected();
1157
+ }
1158
+ };
1159
+ const disconnectedCallback = (elm) => {
1160
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1161
+ const hostRef = getHostRef(elm);
1162
+ const instance = hostRef.$lazyInstance$ ;
1163
+ {
1164
+ safeCall(instance, 'disconnectedCallback');
1165
+ }
1166
+ }
1167
+ };
1168
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1169
+ var _a;
1170
+ const endBootstrap = createTime();
1171
+ const cmpTags = [];
1172
+ const exclude = options.exclude || [];
1173
+ const customElements = win.customElements;
1174
+ const head = doc.head;
1175
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1176
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1177
+ const deferredConnectedCallbacks = [];
1178
+ let appLoadFallback;
1179
+ let isBootstrapping = true;
1180
+ Object.assign(plt, options);
1181
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1182
+ lazyBundles.map((lazyBundle) => {
1183
+ lazyBundle[1].map((compactMeta) => {
1184
+ const cmpMeta = {
1185
+ $flags$: compactMeta[0],
1186
+ $tagName$: compactMeta[1],
1187
+ $members$: compactMeta[2],
1188
+ $listeners$: compactMeta[3],
1189
+ };
1190
+ {
1191
+ cmpMeta.$members$ = compactMeta[2];
1192
+ }
1193
+ {
1194
+ cmpMeta.$attrsToReflect$ = [];
1195
+ }
1196
+ {
1197
+ cmpMeta.$watchers$ = {};
1198
+ }
1199
+ const tagName = cmpMeta.$tagName$;
1200
+ const HostElement = class extends HTMLElement {
1201
+ // StencilLazyHost
1202
+ constructor(self) {
1203
+ // @ts-ignore
1204
+ super(self);
1205
+ self = this;
1206
+ registerHost(self, cmpMeta);
1207
+ }
1208
+ connectedCallback() {
1209
+ if (appLoadFallback) {
1210
+ clearTimeout(appLoadFallback);
1211
+ appLoadFallback = null;
1212
+ }
1213
+ if (isBootstrapping) {
1214
+ // connectedCallback will be processed once all components have been registered
1215
+ deferredConnectedCallbacks.push(this);
1216
+ }
1217
+ else {
1218
+ plt.jmp(() => connectedCallback(this));
1219
+ }
1220
+ }
1221
+ disconnectedCallback() {
1222
+ plt.jmp(() => disconnectedCallback(this));
1223
+ }
1224
+ componentOnReady() {
1225
+ return getHostRef(this).$onReadyPromise$;
1226
+ }
1227
+ };
1228
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1229
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1230
+ cmpTags.push(tagName);
1231
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1232
+ }
1233
+ });
1234
+ });
1235
+ {
1236
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1237
+ visibilityStyle.setAttribute('data-styles', '');
1238
+ // Apply CSP nonce to the style tag if it exists
1239
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1240
+ if (nonce != null) {
1241
+ visibilityStyle.setAttribute('nonce', nonce);
1242
+ }
1243
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1244
+ }
1245
+ // Process deferred connectedCallbacks now all components have been registered
1246
+ isBootstrapping = false;
1247
+ if (deferredConnectedCallbacks.length) {
1248
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1249
+ }
1250
+ else {
1251
+ {
1252
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1253
+ }
1254
+ }
1255
+ // Fallback appLoad event
1256
+ endBootstrap();
1257
+ };
1258
+ /**
1259
+ * Assigns the given value to the nonce property on the runtime platform object.
1260
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1261
+ * @param nonce The value to be assigned to the platform nonce property.
1262
+ * @returns void
1263
+ */
1264
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1265
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1266
+ const getHostRef = (ref) => hostRefs.get(ref);
1267
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1268
+ const registerHost = (elm, cmpMeta) => {
1269
+ const hostRef = {
1270
+ $flags$: 0,
1271
+ $hostElement$: elm,
1272
+ $cmpMeta$: cmpMeta,
1273
+ $instanceValues$: new Map(),
1274
+ };
1275
+ {
1276
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
1277
+ }
1278
+ {
1279
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1280
+ elm['s-p'] = [];
1281
+ elm['s-rc'] = [];
1282
+ }
1283
+ return hostRefs.set(elm, hostRef);
1284
+ };
1285
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1286
+ const consoleError = (e, el) => (0, console.error)(e, el);
1287
+ const cmpModules = /*@__PURE__*/ new Map();
1288
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1289
+ // loadModuleImport
1290
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1291
+ const bundleId = cmpMeta.$lazyBundleId$;
1292
+ const module = cmpModules.get(bundleId) ;
1293
+ if (module) {
1294
+ return module[exportName];
1295
+ }
1296
+
1297
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1298
+ const processMod = importedModule => {
1299
+ cmpModules.set(bundleId, importedModule);
1300
+ return importedModule[exportName];
1301
+ }
1302
+ switch(bundleId) {
1303
+
1304
+ case 'arcgis-basemap-gallery_3':
1305
+ return import(
1306
+ /* webpackMode: "lazy" */
1307
+ './arcgis-basemap-gallery_3.entry.js').then(processMod, consoleError);
1308
+ case 'arcgis-area-measurement-2d':
1309
+ return import(
1310
+ /* webpackMode: "lazy" */
1311
+ './arcgis-area-measurement-2d.entry.js').then(processMod, consoleError);
1312
+ case 'arcgis-area-measurement-3d':
1313
+ return import(
1314
+ /* webpackMode: "lazy" */
1315
+ './arcgis-area-measurement-3d.entry.js').then(processMod, consoleError);
1316
+ case 'arcgis-attachments':
1317
+ return import(
1318
+ /* webpackMode: "lazy" */
1319
+ './arcgis-attachments.entry.js').then(processMod, consoleError);
1320
+ case 'arcgis-basemap-layer-list':
1321
+ return import(
1322
+ /* webpackMode: "lazy" */
1323
+ './arcgis-basemap-layer-list.entry.js').then(processMod, consoleError);
1324
+ case 'arcgis-basemap-toggle':
1325
+ return import(
1326
+ /* webpackMode: "lazy" */
1327
+ './arcgis-basemap-toggle.entry.js').then(processMod, consoleError);
1328
+ case 'arcgis-bookmarks':
1329
+ return import(
1330
+ /* webpackMode: "lazy" */
1331
+ './arcgis-bookmarks.entry.js').then(processMod, consoleError);
1332
+ case 'arcgis-building-explorer':
1333
+ return import(
1334
+ /* webpackMode: "lazy" */
1335
+ './arcgis-building-explorer.entry.js').then(processMod, consoleError);
1336
+ case 'arcgis-compass':
1337
+ return import(
1338
+ /* webpackMode: "lazy" */
1339
+ './arcgis-compass.entry.js').then(processMod, consoleError);
1340
+ case 'arcgis-coordinate-conversion':
1341
+ return import(
1342
+ /* webpackMode: "lazy" */
1343
+ './arcgis-coordinate-conversion.entry.js').then(processMod, consoleError);
1344
+ case 'arcgis-daylight':
1345
+ return import(
1346
+ /* webpackMode: "lazy" */
1347
+ './arcgis-daylight.entry.js').then(processMod, consoleError);
1348
+ case 'arcgis-directions':
1349
+ return import(
1350
+ /* webpackMode: "lazy" */
1351
+ './arcgis-directions.entry.js').then(processMod, consoleError);
1352
+ case 'arcgis-directline-measurement-3d':
1353
+ return import(
1354
+ /* webpackMode: "lazy" */
1355
+ './arcgis-directline-measurement-3d.entry.js').then(processMod, consoleError);
1356
+ case 'arcgis-distance-measurement-2d':
1357
+ return import(
1358
+ /* webpackMode: "lazy" */
1359
+ './arcgis-distance-measurement-2d.entry.js').then(processMod, consoleError);
1360
+ case 'arcgis-editor':
1361
+ return import(
1362
+ /* webpackMode: "lazy" */
1363
+ './arcgis-editor.entry.js').then(processMod, consoleError);
1364
+ case 'arcgis-elevation-profile':
1365
+ return import(
1366
+ /* webpackMode: "lazy" */
1367
+ './arcgis-elevation-profile.entry.js').then(processMod, consoleError);
1368
+ case 'arcgis-feature':
1369
+ return import(
1370
+ /* webpackMode: "lazy" */
1371
+ './arcgis-feature.entry.js').then(processMod, consoleError);
1372
+ case 'arcgis-feature-form':
1373
+ return import(
1374
+ /* webpackMode: "lazy" */
1375
+ './arcgis-feature-form.entry.js').then(processMod, consoleError);
1376
+ case 'arcgis-feature-table':
1377
+ return import(
1378
+ /* webpackMode: "lazy" */
1379
+ './arcgis-feature-table.entry.js').then(processMod, consoleError);
1380
+ case 'arcgis-feature-templates':
1381
+ return import(
1382
+ /* webpackMode: "lazy" */
1383
+ './arcgis-feature-templates.entry.js').then(processMod, consoleError);
1384
+ case 'arcgis-features':
1385
+ return import(
1386
+ /* webpackMode: "lazy" */
1387
+ './arcgis-features.entry.js').then(processMod, consoleError);
1388
+ case 'arcgis-floor-filter':
1389
+ return import(
1390
+ /* webpackMode: "lazy" */
1391
+ './arcgis-floor-filter.entry.js').then(processMod, consoleError);
1392
+ case 'arcgis-fullscreen':
1393
+ return import(
1394
+ /* webpackMode: "lazy" */
1395
+ './arcgis-fullscreen.entry.js').then(processMod, consoleError);
1396
+ case 'arcgis-histogram':
1397
+ return import(
1398
+ /* webpackMode: "lazy" */
1399
+ './arcgis-histogram.entry.js').then(processMod, consoleError);
1400
+ case 'arcgis-histogram-range-slider':
1401
+ return import(
1402
+ /* webpackMode: "lazy" */
1403
+ './arcgis-histogram-range-slider.entry.js').then(processMod, consoleError);
1404
+ case 'arcgis-home':
1405
+ return import(
1406
+ /* webpackMode: "lazy" */
1407
+ './arcgis-home.entry.js').then(processMod, consoleError);
1408
+ case 'arcgis-layer-list':
1409
+ return import(
1410
+ /* webpackMode: "lazy" */
1411
+ './arcgis-layer-list.entry.js').then(processMod, consoleError);
1412
+ case 'arcgis-legend':
1413
+ return import(
1414
+ /* webpackMode: "lazy" */
1415
+ './arcgis-legend.entry.js').then(processMod, consoleError);
1416
+ case 'arcgis-line-of-sight':
1417
+ return import(
1418
+ /* webpackMode: "lazy" */
1419
+ './arcgis-line-of-sight.entry.js').then(processMod, consoleError);
1420
+ case 'arcgis-locate':
1421
+ return import(
1422
+ /* webpackMode: "lazy" */
1423
+ './arcgis-locate.entry.js').then(processMod, consoleError);
1424
+ case 'arcgis-measurement':
1425
+ return import(
1426
+ /* webpackMode: "lazy" */
1427
+ './arcgis-measurement.entry.js').then(processMod, consoleError);
1428
+ case 'arcgis-navigation-toggle':
1429
+ return import(
1430
+ /* webpackMode: "lazy" */
1431
+ './arcgis-navigation-toggle.entry.js').then(processMod, consoleError);
1432
+ case 'arcgis-print':
1433
+ return import(
1434
+ /* webpackMode: "lazy" */
1435
+ './arcgis-print.entry.js').then(processMod, consoleError);
1436
+ case 'arcgis-scale-bar':
1437
+ return import(
1438
+ /* webpackMode: "lazy" */
1439
+ './arcgis-scale-bar.entry.js').then(processMod, consoleError);
1440
+ case 'arcgis-scale-range-slider':
1441
+ return import(
1442
+ /* webpackMode: "lazy" */
1443
+ './arcgis-scale-range-slider.entry.js').then(processMod, consoleError);
1444
+ case 'arcgis-scene':
1445
+ return import(
1446
+ /* webpackMode: "lazy" */
1447
+ './arcgis-scene.entry.js').then(processMod, consoleError);
1448
+ case 'arcgis-search':
1449
+ return import(
1450
+ /* webpackMode: "lazy" */
1451
+ './arcgis-search.entry.js').then(processMod, consoleError);
1452
+ case 'arcgis-shadow-cast':
1453
+ return import(
1454
+ /* webpackMode: "lazy" */
1455
+ './arcgis-shadow-cast.entry.js').then(processMod, consoleError);
1456
+ case 'arcgis-sketch':
1457
+ return import(
1458
+ /* webpackMode: "lazy" */
1459
+ './arcgis-sketch.entry.js').then(processMod, consoleError);
1460
+ case 'arcgis-slice':
1461
+ return import(
1462
+ /* webpackMode: "lazy" */
1463
+ './arcgis-slice.entry.js').then(processMod, consoleError);
1464
+ case 'arcgis-slider':
1465
+ return import(
1466
+ /* webpackMode: "lazy" */
1467
+ './arcgis-slider.entry.js').then(processMod, consoleError);
1468
+ case 'arcgis-swipe':
1469
+ return import(
1470
+ /* webpackMode: "lazy" */
1471
+ './arcgis-swipe.entry.js').then(processMod, consoleError);
1472
+ case 'arcgis-table-list':
1473
+ return import(
1474
+ /* webpackMode: "lazy" */
1475
+ './arcgis-table-list.entry.js').then(processMod, consoleError);
1476
+ case 'arcgis-time-slider':
1477
+ return import(
1478
+ /* webpackMode: "lazy" */
1479
+ './arcgis-time-slider.entry.js').then(processMod, consoleError);
1480
+ case 'arcgis-track':
1481
+ return import(
1482
+ /* webpackMode: "lazy" */
1483
+ './arcgis-track.entry.js').then(processMod, consoleError);
1484
+ case 'arcgis-utility-network-trace':
1485
+ return import(
1486
+ /* webpackMode: "lazy" */
1487
+ './arcgis-utility-network-trace.entry.js').then(processMod, consoleError);
1488
+ case 'arcgis-value-picker':
1489
+ return import(
1490
+ /* webpackMode: "lazy" */
1491
+ './arcgis-value-picker.entry.js').then(processMod, consoleError);
1492
+ case 'arcgis-weather':
1493
+ return import(
1494
+ /* webpackMode: "lazy" */
1495
+ './arcgis-weather.entry.js').then(processMod, consoleError);
1496
+ case 'arcgis-zoom':
1497
+ return import(
1498
+ /* webpackMode: "lazy" */
1499
+ './arcgis-zoom.entry.js').then(processMod, consoleError);
1500
+ }
1501
+ }
1502
+ return import(
1503
+ /* @vite-ignore */
1504
+ /* webpackInclude: /\.entry\.js$/ */
1505
+ /* webpackExclude: /\.system\.entry\.js$/ */
1506
+ /* webpackMode: "lazy" */
1507
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
1508
+ {
1509
+ cmpModules.set(bundleId, importedModule);
1510
+ }
1511
+ return importedModule[exportName];
1512
+ }, consoleError);
1513
+ };
1514
+ const styles = /*@__PURE__*/ new Map();
1515
+ const win = typeof window !== 'undefined' ? window : {};
1516
+ const doc = win.document || { head: {} };
1517
+ const plt = {
1518
+ $flags$: 0,
1519
+ $resourcesUrl$: '',
1520
+ jmp: (h) => h(),
1521
+ raf: (h) => requestAnimationFrame(h),
1522
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1523
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1524
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1525
+ };
1526
+ const promiseResolve = (v) => Promise.resolve(v);
1527
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1528
+ try {
1529
+ new CSSStyleSheet();
1530
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1531
+ }
1532
+ catch (e) { }
1533
+ return false;
1534
+ })()
1535
+ ;
1536
+ const queueDomReads = [];
1537
+ const queueDomWrites = [];
1538
+ const queueTask = (queue, write) => (cb) => {
1539
+ queue.push(cb);
1540
+ if (!queuePending) {
1541
+ queuePending = true;
1542
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1543
+ nextTick(flush);
1544
+ }
1545
+ else {
1546
+ plt.raf(flush);
1547
+ }
1548
+ }
1549
+ };
1550
+ const consume = (queue) => {
1551
+ for (let i = 0; i < queue.length; i++) {
1552
+ try {
1553
+ queue[i](performance.now());
1554
+ }
1555
+ catch (e) {
1556
+ consoleError(e);
1557
+ }
1558
+ }
1559
+ queue.length = 0;
1560
+ };
1561
+ const flush = () => {
1562
+ // always force a bunch of medium callbacks to run, but still have
1563
+ // a throttle on how many can run in a certain time
1564
+ // DOM READS!!!
1565
+ consume(queueDomReads);
1566
+ // DOM WRITES!!!
1567
+ {
1568
+ consume(queueDomWrites);
1569
+ if ((queuePending = queueDomReads.length > 0)) {
1570
+ // still more to do yet, but we've run out of time
1571
+ // let's let this thing cool off and try again in the next tick
1572
+ plt.raf(flush);
1573
+ }
1574
+ }
1575
+ };
1576
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1577
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1578
+
1579
+ export { bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };